@import url("./product-card-free-shipping.css");
@import url("./product-card-eta.css");

:root {
  --sk-pc-bg: #ffffff;
  --sk-pc-surface: #fafafa;
  --sk-pc-border: #e5e7eb;
  --sk-pc-border-hover: #d1d5db;

  --sk-pc-text-main: #111827;
  --sk-pc-text-muted: #6b7280;
  --sk-pc-text-light: #9ca3af;

  --sk-pc-brand: #ef4444;
  --sk-pc-brand-dark: #dc2626;
  --sk-pc-brand-soft: #fef2f2;

  --sk-pc-green: #16a34a;
  --sk-pc-star: #f59e0b;

  --sk-pc-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
  --sk-pc-shadow-hover: 0 12px 24px rgba(17, 24, 39, 0.12);

  --sk-pc-radius: 0px;
}

/* CARD */
.sk-product-card {
  background: var(--sk-pc-bg);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 0px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--sk-pc-text-main);
  text-decoration: none !important;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.02),
    0 2px 8px -2px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.sk-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.18);
  box-shadow: 
    0 0 0 1px rgba(239, 68, 68, 0.04),
    0 18px 30px -10px rgba(17, 24, 39, 0.18);
}

/* IMAGE */
.sk-product-card-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
}

.sk-product-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.sk-product-card:hover .sk-product-card-image-wrap img {
  transform: scale(1.03);
}

/* BADGES */
.sk-product-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sk-product-card-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sk-product-card-favorite-btn:hover {
  transform: scale(1.06);
}

.sk-product-card-favorite-btn.is-active {
  background: var(--sk-pc-brand);
  color: #fff;
}

.sk-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sk-product-badge--discount {
  background: var(--sk-pc-brand);
  color: #fff;
}

.sk-product-badge--new {
  background: #111827;
  color: #fff;
}

/* CONTENT */
.sk-product-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 14px 16px;
  gap: 8px;
}

/* TOP LINE */
.sk-product-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
}

.sk-product-card-category {
  display: inline-block;
  max-width: 72%;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--sk-pc-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sk-product-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sk-pc-text-muted);
  flex-shrink: 0;
}

.sk-product-card-rating-star {
  color: var(--sk-pc-star);
}

/* BODY */
.sk-product-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sk-product-card-title {
  margin: 0;
  color: var(--sk-pc-text-main);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.01em;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 2.5em;
}

.sk-product-card-provider {
  font-size: 0.82rem;
  color: var(--sk-pc-text-muted);
  line-height: 1.2;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sk-product-card-provider strong {
  color: var(--sk-pc-text-main);
  font-weight: 700;
}

.sk-store-verified-badge {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d9bf0;
  flex: 0 0 auto;
}

.sk-store-verified-badge svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* PRICE BLOCK - AQUÍ ESTABA TU PROBLEMA */
.sk-product-card-price-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.sk-product-price-old {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.86rem;
  color: #7b8798;
  line-height: 1.1;
  margin: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sk-product-price-old-label {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sk-product-price-old-value {
  color: #64748b;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(123, 135, 152, 0.9);
}

  .sk-product-card-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
  }

.sk-product-price-current {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--sk-pc-text-main);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.sk-product-price-discount-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1f3 0%, #ffe4e8 100%);
  border: 1px solid rgba(220, 38, 38, 0.12);
  color: var(--sk-pc-brand-dark);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
}

.sk-product-logistics-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.sk-product-logistics-primary-accent {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #810018;
  flex: 0 0 auto;
}

.sk-product-logistics-primary-accent svg {
  width: 40px;
  height: 40px;
  display: block;
}

.sk-product-logistics-free-shipping-icon {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.sk-product-logistics-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: #c2410c;
  line-height: 1.35;
}

.sk-product-logistics-tags-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c2410c;
  flex: 0 0 auto;
}

.sk-product-logistics-tags-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sk-product-logistics-helper {
  width: 100%;
  font-size: 0.76rem;
  font-weight: 700;
  color: #667085;
  line-height: 1.35;
}

.sk-product-card-logistics-note {
  margin-top: 6px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--sk-pc-text-muted);
}

/* FOOTER */
.sk-product-card-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sk-product-card-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 12px;
  background: linear-gradient(180deg, #fff6f8 0%, #ffe9ee 100%);
  border: 1px solid rgba(240, 51, 80, 0.16);
  font-size: 0.84rem;
  font-weight: 800;
  color: #b4233f;
  line-height: 1.2;
}

.sk-product-card-add-btn {
  width: 50px;
  height: 46px;
  flex: 0 0 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3a57 0%, #ef233c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(239, 35, 60, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sk-product-card-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(239, 35, 60, 0.28);
  filter: saturate(1.04);
}

.sk-product-card-add-btn-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sk-product-card-add-btn-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.14));
}

.sk-product-card-add-btn:focus-visible {
  outline: 3px solid rgba(239, 68, 68, 0.18);
  outline-offset: 2px;
}

/* MOBILE LIST */
.is-mobile-list .sk-product-card {
  flex-direction: row;
}

.is-mobile-list .sk-product-card-image-wrap {
  width: 124px;
  min-width: 124px;
  aspect-ratio: auto;
  padding: 10px;
  border-bottom: 0;
  border-right: 1px solid var(--sk-pc-border);
}

.is-mobile-list .sk-product-card-content {
  padding: 10px 12px;
}

.is-mobile-list .sk-product-card-title {
  min-height: auto;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 640px) {
  .sk-product-card {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.02),
      0 4px 14px -6px rgba(17, 24, 39, 0.12);
  }

  .sk-product-card-content {
    padding: 10px 10px 12px;
    gap: 6px;
    display: flex;
    flex-direction: column;
  }

  .sk-product-card-body {
    order: -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sk-product-card-topline {
    display: none;
  }

  .sk-product-card-provider {
    display: none;
  }

  .sk-product-card-title {
    font-size: 0.96rem;
    line-height: 1.28;
    -webkit-line-clamp: 2;
    margin-bottom: 0;
    min-height: auto;
    font-weight: 600;
  }

  .sk-product-price-current {
    font-size: 1.65rem;
    word-break: break-word;
  }
  
  .sk-product-logistics-primary-accent,
  .sk-product-logistics-tags,
  .sk-product-logistics-helper,
  .sk-product-card-logistics-note,
  .sk-product-card-footer-note {
    display: none;
  }

  .sk-product-price-discount-pill {
    display: inline-flex;
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.74rem;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sk-product-card-footer-note.is-free-shipping {
    display: inline-flex;
    min-height: 26px;
    padding: 0 8px;
    font-size: 0.72rem;
    width: fit-content;
    max-width: 100%;
  }

  .sk-product-price-old {
    min-height: 20px;
    font-size: 0.74rem;
    padding: 0 6px;
    margin-bottom: 2px;
  }

  .sk-product-price-old-label {
    font-size: 0.58rem;
  }

  .sk-product-card-eta {
    font-size: 0.8rem;
    padding: 6px 8px;
    line-height: 1.25;
    margin-top: 2px;
    color: #a61e3b;
  }

  .sk-product-logistics-summary {
    gap: 6px;
    margin-top: 4px;
  }

  .sk-product-card-footer {
    padding-top: 4px;
    gap: 6px;
    justify-content: space-between;
  }

  .sk-product-card-add-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .sk-product-card-add-btn-icon {
    width: 20px;
    height: 20px;
  }

  .sk-product-card-add-btn-icon svg {
    width: 18px;
    height: 18px;
  }
}
