/* ===================================================================
   VACH* — Hoja de estilos compartida para las páginas de Merchandising
   (home de Merchandising + las 11 subpáginas de categoría)

   Unifica tokens de color, tipografía, espaciados y breakpoints para
   que todas las páginas de esta sección compartan exactamente los
   mismos criterios. Cualquier ajuste hecho acá se refleja en todas.
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.cap-mobile { display: none; }
@media (max-width: 768px) {
  .cap-desktop { display: none; }
  .cap-mobile  { display: inline; }
}

:root {
  --black:  #0A0A0A;
  --yellow: #F5C800;
  --white:  #FFFFFF;
  --gray:   #888;
  --lgray:  #AAAAAA;
  --border: rgba(255,255,255,0.08);
}

html, body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 10%, rgba(245,200,0,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(245,200,0,0.06) 0%, transparent 50%),
    #0A0A0A;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2.5rem 4rem;
}

/* CATEGORY NAV — centered inside top nav bar (hidden on desktop, kept in DOM) */
.cat-nav {
  display: none;
}
.cat-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.cat-nav a:hover { opacity: 0.8; background: rgba(255,255,255,0.08); transform: scale(1.45); }
.cat-nav a:hover + a { transform: scale(0.85); }
.cat-nav a:has(+ a:hover) { transform: scale(0.85); }
.cat-nav a.active { opacity: 1; background: rgba(255,255,255,0.1); }
@media (max-width: 768px) { .cat-nav { display: none; } }

/* CATEGORY NAV — vertical sidebar left */
.cat-nav-side {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.25rem;
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 0.6rem 0.4rem;
  width: auto;
  right: auto;
}
.cat-nav-side a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.cat-nav-side a:hover { opacity: 0.8; background: rgba(255,255,255,0.08); transform: scale(1.45); }
.cat-nav-side a:hover + a { transform: scale(0.85); }
.cat-nav-side a:has(+ a:hover) { transform: scale(0.85); }
.cat-nav-side a.active { opacity: 1; background: rgba(255,255,255,0.1); }

/* CAT-NAV-SIDE TOOLTIP */
.cat-nav-side a {
  position: relative;
}
.cat-nav-side a::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,10,10,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.cat-nav-side a:hover::after {
  opacity: 1;
}
@media (max-width: 768px) {
  .cat-nav-side a::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .cat-nav-side {
    top: auto;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    padding: 0.4rem 0.6rem;
    border-radius: 100px;
  }
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}
.back:hover { color: var(--white); }
.logo { text-decoration: none; }
.logo img { height: 24px; width: auto; display: block; }

/* HERO */
.hero {
  margin-bottom: 4rem;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}
.hero p {
  font-size: 0.9rem;
  color: var(--lgray);
  max-width: 560px;
  line-height: 1.65;
}
.cat-hero-icon { font-size: 2.4rem; margin-bottom: 0.75rem; display: block; }

/* BRANDS */
.brands-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
}
.brands {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.brand-pill {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lgray);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  background: rgba(255,255,255,0.03);
}

/* SECTION / SUBCATEGORY TITLES */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1.25rem;
}
.subcat-block { margin-bottom: 2.25rem; }
.subcat-block:last-of-type { margin-bottom: 4rem; }
.subcat-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 0.85rem;
  letter-spacing: 0.01em;
}
.subcat-gallery { margin-bottom: 0; }

/* PRODUCTS GRID */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 4rem;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 100%, rgba(245,200,0,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card:hover {
  border-color: rgba(245,200,0,0.3);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.product-card:hover::before { opacity: 1; }

.product-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}
.product-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.product-desc {
  font-size: 0.8rem;
  color: var(--lgray);
  line-height: 1.5;
}
.product-tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  border: 1px solid rgba(245,200,0,0.25);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
}

/* EMPTY STATE CARD */
.empty-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  background: rgba(255,255,255,0.03);
  margin-bottom: 4rem;
}
.empty-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.6rem; }
.empty-card p { font-size: 0.92rem; color: var(--lgray); line-height: 1.6; max-width: 560px; }

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 4rem;
}
.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
  cursor: zoom-in;
  opacity: 0;
}
.gallery-item img.loaded { opacity: 1; }
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s infinite;
  z-index: 0;
  border-radius: 14px;
  transition: opacity 0.3s ease;
}
.gallery-item.img-loaded::before { opacity: 0; pointer-events: none; }
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  background: none;
  z-index: 2;
}
/* Overlay de contraste para que el caption se lea bien sobre cualquier foto */
.gallery-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.32) 55%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.gallery-item .gallery-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffd76a, #ffb238);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
@media (max-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .gallery-item .gallery-badge {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.12rem 0.35rem;
    font-size: 0.5rem;
    gap: 0.15rem;
  }
}

/* FLIP BUTTON (piezas bifaz) */
.flip-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s;
}
.flip-btn:hover { background: rgba(0,0,0,0.75); border-color: rgba(255,255,255,0.45); }

/* DIVIDER */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 3rem;
}

/* CTA */
.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.cta-text h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.cta-text p {
  font-size: 0.88rem;
  color: var(--lgray);
}
.cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  text-decoration: none;
  transition: box-shadow 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-yellow { background: var(--yellow); color: #000; }
.btn-yellow:hover { box-shadow: 0 0 24px rgba(245,200,0,0.45); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.35); }

footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 4rem;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 2rem;
  cursor: zoom-out;
  overscroll-behavior: none;
  touch-action: none;
}
.lightbox.active {
  display: flex;
  animation: lbFadeIn 0.22s ease;
}
.lightbox.active .lightbox-wrap {
  animation: lbSlideIn 0.26s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lbSlideIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-wrap {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
  line-height: 0;
  cursor: default;
}
.lightbox-wrap img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.lightbox-wrap img.lb-fade-in {
  animation: lbImgFade 0.2s ease;
}
@keyframes lbImgFade {
  from { opacity: 0.2; }
  to   { opacity: 1; }
}
.lightbox-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, transparent 100%);
  pointer-events: none;
}
.lightbox-caption {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.lightbox-logo {
  height: 16px;
  width: auto;
  opacity: 0.65;
  display: block;
  flex-shrink: 0;
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
@media (max-width: 480px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-prev,
  .lightbox-next { width: 38px; height: 38px; font-size: 1.1rem; }
}
.lightbox-flip {
  display: none;
  position: absolute;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.45);
  color: var(--white);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s, border-color 0.2s;
  z-index: 5;
}
.lightbox-flip:hover { background: rgba(0,0,0,0.7); border-color: rgba(255,255,255,0.6); }
.lightbox-flip.visible { display: flex; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .page { padding: 5rem 1.5rem 3rem; }
  nav { padding: 1rem 1.5rem; }
  .hero { margin-bottom: 2.5rem; }
  .products { grid-template-columns: 1fr 1fr; }
  .cta-section { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .products { grid-template-columns: 1fr; }
}
