/* ============================================================
   CATÁLOGO / PRODUCTOS PAGE — carmela.uy
   Premium showcase design — 2026
   ============================================================ */

/* ── Design tokens (inherit from home.css :root where loaded,
      redeclare for standalone use) ── */
.cat-page {
  --c-orange:      #e8530e;
  --c-orange-h:    #c44409;
  --c-orange-glow: rgba(232, 83, 14, 0.25);
  --c-orange-soft: rgba(232, 83, 14, 0.06);
  --c-navy:        #1e3a5f;
  --c-dark:        #0f172a;
  --c-white:       #ffffff;
  --c-surface:     #f8fafc;
  --c-surface-alt: #f1f5f9;
  --c-border:      #e2e8f0;
  --c-text:        #1e293b;
  --c-text-sec:    #475569;
  --c-muted:       #64748b;
  --max-w:         1140px;
  --font-ui:       roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  Boldy, 'Arial Black', sans-serif;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --shadow-sm:     0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:     0 4px 16px rgba(15,23,42,.08), 0 1px 3px rgba(15,23,42,.05);
  --shadow-lg:     0 12px 40px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
  --shadow-xl:     0 24px 60px rgba(15,23,42,.16), 0 8px 24px rgba(15,23,42,.08);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-ui);
  color: var(--c-text);
}

/* ── Scroll-reveal ── */
.cat-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.cat-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Staggered grid children ── */
.cat-stagger > * {
  opacity: 0;
  transform: translateY(24px) scale(.97);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.cat-stagger.is-staggered > * {
  opacity: 1;
  transform: none;
}


/* ============================================================
   HERO
   ============================================================ */
.cat-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  padding: 72px 28px 64px;
  text-align: center;
  color: #fff;
}
.cat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(232,83,14,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(30,58,95,.4) 0%, transparent 70%);
  z-index: 0;
}
.cat-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(255,255,255,.15) 50%, transparent 50%),
    radial-gradient(1px 1px at 65% 15%, rgba(255,255,255,.1) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 85% 65%, rgba(255,255,255,.08) 50%, transparent 50%),
    radial-gradient(1px 1px at 35% 75%, rgba(255,255,255,.12) 50%, transparent 50%);
  animation: catHeroFloat 20s ease-in-out infinite alternate;
}
@keyframes catHeroFloat {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-10px, -6px); }
}
.cat-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
}
.cat-hero-badge {
  display: inline-block;
  background: var(--c-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.cat-hero h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
  text-shadow: 0 4px 28px rgba(0,0,0,.3);
}
.cat-hero-sub {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin: 0 auto 28px;
}
.cat-hero-search {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
}
.cat-hero-search:focus-within {
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px var(--c-orange-glow);
}
.cat-hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
  padding: 14px 20px;
  font-family: var(--font-ui);
}
.cat-hero-search input::placeholder {
  color: rgba(255,255,255,.45);
}
.cat-hero-search button {
  background: var(--c-orange);
  border: none;
  color: #fff;
  padding: 14px 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: .04em;
  transition: background .2s;
}
.cat-hero-search button:hover {
  background: var(--c-orange-h);
}
.cat-hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
}
.cat-hero-stat {
  text-align: center;
}
.cat-hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
}
.cat-hero-stat span {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  text-transform: uppercase;
}


/* ============================================================
   SHARED SECTION LAYOUT
   ============================================================ */
.cat-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}
.cat-section + .cat-section {
  margin-top: 56px;
}
.cat-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cat-section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--c-dark);
  margin: 0;
  line-height: 1.2;
  position: relative;
  padding-left: 16px;
}
.cat-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 4px;
  background: var(--c-orange);
}
.cat-section-link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-orange);
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}
.cat-section-link:hover {
  color: var(--c-orange-h);
}


/* ============================================================
   CAMPAIGN BANNERS
   ============================================================ */
.cat-campaigns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.cat-campaign-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 180px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--c-dark), var(--c-navy));
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.cat-campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.cat-campaign-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 90% 100%, var(--c-orange-glow), transparent 70%);
  z-index: 0;
}
.cat-campaign-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  align-self: flex-start;
  background: var(--c-orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.cat-campaign-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
}
.cat-campaign-desc {
  position: relative;
  z-index: 1;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin: 0 0 14px;
  line-height: 1.5;
}
.cat-campaign-countdown {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.cat-campaign-countdown svg {
  width: 14px;
  height: 14px;
  opacity: .8;
}
.cat-campaign-products {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.cat-campaign-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.95);
  object-fit: contain;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.3);
}
.cat-campaign-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cat-campaign-cta svg {
  width: 16px;
  height: 16px;
  transition: transform .2s var(--ease-spring);
}
.cat-campaign-card:hover .cat-campaign-cta svg {
  transform: translateX(4px);
}


/* ============================================================
   PRODUCT SHELF (horizontal scroll)
   ============================================================ */
.cat-shelf-wrap {
  position: relative;
}
.cat-shelf {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.cat-shelf::-webkit-scrollbar { display: none; }

.cat-shelf-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 4px; right: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--c-white));
  pointer-events: none;
  z-index: 2;
}

.cat-shelf > .cat-pcard {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

/* Shelf navigation arrows */
.cat-shelf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: box-shadow .2s, transform .2s var(--ease-spring);
  color: var(--c-dark);
}
.cat-shelf-nav:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%) scale(1.08);
}
.cat-shelf-nav svg {
  width: 18px;
  height: 18px;
}
.cat-shelf-prev { left: -14px; }
.cat-shelf-next { right: -14px; }

@media (max-width: 768px) {
  .cat-shelf-nav { display: none; }
}


/* ============================================================
   PRODUCT CARD
   ============================================================ */
.cat-pcard {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s;
}
.cat-pcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15,23,42,.11);
  border-color: var(--c-orange-glow);
}
.cat-pcard-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--c-surface);
  overflow: hidden;
}
.cat-pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .32s ease;
}
.cat-pcard:hover .cat-pcard-img img {
  transform: scale(1.05);
}
.cat-pcard-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 1;
}
.cat-pcard-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  line-height: 1.3;
  letter-spacing: .02em;
}
.cat-pcard-badge--sale   { background: var(--c-orange); color: #fff; }
.cat-pcard-badge--pct    { background: #16a34a; color: #fff; }
.cat-pcard-badge--nuevo  { background: #0ea5e9; color: #fff; }
.cat-pcard-badge--dest   { background: #7c3aed; color: #fff; }
.cat-pcard-badge--stock  { background: #dc2626; color: #fff; }

.cat-pcard-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 16px;
  flex: 1;
}
.cat-pcard-name {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-dark);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.cat-pcard:hover .cat-pcard-name { color: var(--c-orange); }

.cat-pcard-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}
.cat-pcard-compare {
  font-size: .76rem;
  color: var(--c-muted);
  text-decoration: line-through;
}
.cat-pcard-price {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--c-orange);
  line-height: 1;
}
.cat-pcard-cta {
  font-size: .72rem;
  font-weight: 700;
  color: var(--c-orange);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s var(--ease-spring);
}
.cat-pcard:hover .cat-pcard-cta {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   PRODUCT GRID (for sections that use grid, not shelf)
   ============================================================ */
.cat-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}


/* ============================================================
   CATEGORY BROWSE GRID
   ============================================================ */
.cat-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.cat-browse-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  color: #fff;
  background: var(--c-surface-alt);
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.cat-browse-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.cat-browse-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.cat-browse-card:hover img { transform: scale(1.08); }

.cat-browse-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.72) 0%, rgba(15,23,42,.15) 50%, transparent 100%);
  z-index: 1;
}
.cat-browse-name {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  padding: 14px 10px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}


/* ============================================================
   COLLECTION SHELF
   ============================================================ */
.cat-col-section + .cat-col-section {
  margin-top: 48px;
}


/* ============================================================
   BOTTOM SPACING
   ============================================================ */
.cat-bottom-space {
  height: 72px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cat-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .cat-hero { padding: 52px 20px 48px; }
  .cat-hero h1 { font-size: 2.4rem; }
  .cat-hero-sub { font-size: 1rem; }
  .cat-hero-stats { gap: 28px; }
  .cat-hero-stat strong { font-size: 1.3rem; }
  .cat-section { padding: 0 20px; }
  .cat-section + .cat-section { margin-top: 44px; }
  .cat-shelf > .cat-pcard { flex: 0 0 190px; }
  .cat-browse-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

@media (max-width: 768px) {
  .cat-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .cat-campaigns {
    grid-template-columns: 1fr;
  }
  .cat-hero-stats { gap: 20px; flex-wrap: wrap; }
}

@media (max-width: 650px) {
  .cat-hero { padding: 40px 16px 36px; }
  .cat-hero h1 { font-size: 2rem; }
  .cat-hero-sub { font-size: .92rem; margin-bottom: 20px; }
  .cat-hero-search { flex-direction: column; }
  .cat-hero-search input { padding: 12px 16px; }
  .cat-hero-search button { padding: 12px 16px; }
  .cat-section { padding: 0 16px; }
  .cat-section + .cat-section { margin-top: 36px; }
  .cat-section-title { font-size: 1.2rem; }
  .cat-shelf > .cat-pcard { flex: 0 0 165px; }
  .cat-browse-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-browse-name { font-size: .75rem; padding: 10px 6px; }
}

@media (max-width: 440px) {
  .cat-hero h1 { font-size: 1.7rem; }
  .cat-hero-stat strong { font-size: 1.1rem; }
  .cat-browse-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-shelf > .cat-pcard { flex: 0 0 155px; }
  .cat-product-grid { gap: 10px; }
}
