/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:          #ffffff;
  --bg-soft:     #f5f5f5;
  --paper:       #ffffff;
  --ink:         #15161a;
  --ink-soft:    #3d3f47;
  --ink-mute:    #6c6f7a;

  --glass:        rgba(255, 255, 255, 0.55);
  --glass-2:      rgba(255, 255, 255, 0.30);
  --glass-solid:  rgba(255, 255, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.65);
  --line:         rgba(21, 22, 26, 0.10);

  --cyan:     #00b2d6;
  --magenta:  #ec2a7d;
  --yellow:   #ffc400;
  --ink-black: #16171c;

  --accent:   var(--magenta);
  --accent-2: var(--cyan);
  --accent-3: var(--yellow);

  --whatsapp: #22c55e;

  --shadow-soft: 0 20px 45px -20px rgba(21, 22, 26, 0.22);
  --shadow-card: 0 30px 60px -25px rgba(21, 22, 26, 0.28);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --container: 1180px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 800;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--ink); color: #fff;
  border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .container { padding-inline: 2rem; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--magenta), var(--cyan));
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.75rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: .6rem;
  position: relative; padding-bottom: 1.1rem;
}
.section-head h2::after,
.about-text h2::after,
.category-header h1::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 64px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
}
.section-head p { margin-top: .9rem; color: var(--ink-mute); font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center h2::after { left: 50%; transform: translateX(-50%); }

section { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem); }

[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: .32s; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1.05rem 1.8rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800; font-size: .96rem; letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0) 55%),
    linear-gradient(130deg, #0284c7, #0ea5e9 45%, #38bdf8);
  box-shadow: 0 18px 40px -14px rgba(14, 165, 233, 0.55), 0 6px 18px -8px rgba(2, 132, 199, 0.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -14px rgba(14, 165, 233, 0.6), 0 8px 22px -8px rgba(2, 132, 199, 0.45);
}

.btn-whatsapp {
  color: #fff;
  background: linear-gradient(120deg, #25d366, #128c4c);
  box-shadow: 0 16px 32px -14px rgba(18, 140, 76, 0.55);
}
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -16px rgba(18, 140, 76, 0.6); }

.btn-ghost {
  color: var(--ink);
  background: var(--glass-solid);
  border: 1px solid var(--line);
}
.btn-ghost:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.btn-sm { padding: .65rem 1.1rem; font-size: .85rem; }

.btn-icon { width: 46px; height: 46px; padding: 0; flex-shrink: 0; }
.btn-icon svg { width: 20px; height: 20px; }

.btn-search { height: 46px; padding: 0 1.3rem; gap: .55rem; flex-shrink: 0; }
.btn-search svg { width: 19px; height: 19px; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
}

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  padding-block: 1.1rem;
  transition: padding .35s var(--ease-out), background-color .35s var(--ease-out), backdrop-filter .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.nav.is-scrolled {
  padding-block: .65rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo {
  height: 108px; width: auto;
  flex-shrink: 0;
  transition: height .35s var(--ease-out);
}
.nav.is-scrolled .brand-logo { height: 80px; }
.brand-logo--footer { height: 172px; }

@media (max-width: 480px) {
  .brand-logo { height: 64px; }
  .nav.is-scrolled .brand-logo { height: 56px; }
  .btn-search span { display: none; }
  .btn-search { width: 46px; padding: 0; gap: 0; }
}

.nav-links { display: none; align-items: center; gap: 2rem; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative; font-weight: 600; font-size: .93rem; color: var(--ink-soft);
  padding-block: .3rem;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: .75rem; }
.nav-actions-end { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nav-actions a[data-phone-link] { display: none; }
@media (min-width: 720px) { .nav-actions a[data-phone-link] { display: inline-flex; } }
.nav-catalog-link { display: none; }
@media (min-width: 640px) {
  .nav-catalog-link { display: inline-flex; }
  .nav-actions { flex: 1 1 auto; justify-content: space-between; }
  .btn-search { flex: 1 1 auto; max-width: 480px; }
}

.nav-toggle {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: var(--glass-solid); border: 1px solid var(--line);
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 20px; height: 20px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  display: grid; place-items: center;
  clip-path: circle(0% at 100% 0%);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: circle(150% at 100% 0%); }
.nav-mobile-list { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.nav-mobile-list a { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.nav-mobile-foot { position: absolute; bottom: 2.5rem; left: 0; right: 0; text-align: center; }

/* =============================================================
   5b. Search overlay
   ============================================================= */
.search-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: grid; align-items: start; justify-items: center;
  padding: 8vh 1.25rem 1.25rem;
  background: rgba(21, 22, 26, 0.55);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
@supports (backdrop-filter: blur(4px)) {
  .search-overlay { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
}
.search-overlay[aria-hidden="false"] { opacity: 1; pointer-events: auto; }

.search-panel {
  width: 100%; max-width: 560px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.1rem 1.3rem 1.3rem;
  transform: translateY(-16px) scale(.98);
  opacity: 0;
  transition: transform .35s var(--ease-soft), opacity .3s var(--ease-out);
}
.search-overlay[aria-hidden="false"] .search-panel { transform: translateY(0) scale(1); opacity: 1; }

.search-input-row {
  display: flex; align-items: center; gap: .75rem;
  padding-bottom: .9rem; margin-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.search-icon { width: 20px; height: 20px; color: var(--ink-mute); flex-shrink: 0; }
.search-input-row input {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 1.05rem; color: var(--ink);
  background: none; border: 0; outline: none;
}
.search-input-row input::placeholder { color: var(--ink-mute); }
.search-close {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: var(--ink-mute);
  transition: background .2s, color .2s;
}
.search-close:hover { background: var(--bg-soft); color: var(--ink); }
.search-close svg { width: 16px; height: 16px; }

.search-results { max-height: 50vh; overflow-y: auto; }
.search-result {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem .6rem; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--ink);
  transition: background .2s;
}
.search-result:hover, .search-result:focus-visible { background: var(--bg-soft); }
.search-result-title { font-size: .98rem; }
.search-result-cat { font-size: .78rem; font-weight: 600; color: var(--ink-mute); white-space: nowrap; }
.search-result--category { background: rgba(236, 42, 125, .06); }
.search-result--category:hover, .search-result--category:focus-visible { background: rgba(236, 42, 125, .12); }
.search-result--category .search-result-cat {
  color: #fff; padding: .2rem .55rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
}

.search-empty { padding: 1rem .6rem .2rem; text-align: center; }
.search-empty p { color: var(--ink-mute); margin-bottom: .9rem; font-size: .95rem; }
.search-hint { padding: .6rem .6rem 0; color: var(--ink-mute); font-size: .85rem; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-top: clamp(10.5rem, 16vw, 13rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
  overflow: clip;
  isolation: isolate;
}
.hero--minimal {
  padding-top: 120px;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}
@media (min-width: 481px) {
  .hero--minimal { padding-top: 168px; }
}

.pt-nav-clear { padding-top: 120px; }
@media (min-width: 481px) {
  .pt-nav-clear { padding-top: 168px; }
}

@property --mesh-a { syntax: "<percentage>"; inherits: false; initial-value: 20%; }
@property --mesh-b { syntax: "<percentage>"; inherits: false; initial-value: 70%; }

.hero-mesh {
  position: absolute; inset: -15% -10%; z-index: -1;
  background: var(--bg);
}
@keyframes meshDrift {
  0%   { --mesh-a: 18%; --mesh-b: 78%; }
  50%  { --mesh-a: 38%; --mesh-b: 58%; }
  100% { --mesh-a: 18%; --mesh-b: 78%; }
}

.hero-grid {
  display: grid; gap: 3rem; align-items: center;
}
.hero-grid > div { max-width: 700px; }

.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  max-width: 15ch;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--magenta), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin-top: 1.3rem; font-size: 1.12rem; color: var(--ink-mute); max-width: 46ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.banner-section { padding-block: 0 clamp(2rem, 5vw, 3.5rem); }
.banner-wrap {
  max-width: 920px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .banner-wrap { padding-inline: 2rem; } }

.banner-slider {
  position: relative;
  aspect-ratio: 2.5 / 1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}
.banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .7s var(--ease-soft);
}
.banner-slide.is-active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }

.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.85);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity .3s var(--ease-out), background .3s;
}
.banner-arrow svg { width: 20px; height: 20px; }
.banner-arrow--prev { left: 14px; }
.banner-arrow--next { right: 14px; }
.banner-slider:hover .banner-arrow,
.banner-arrow:focus-visible { opacity: 1; }
.banner-arrow:hover { background: #fff; }
@media (hover: none) { .banner-arrow { opacity: 1; background: rgba(255,255,255,.7); } }

.banner-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; gap: .5rem;
}
.banner-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(21,22,26,.15);
  transition: background .3s, transform .3s;
}
.banner-dot.is-active { background: var(--magenta); transform: scale(1.2); }

.featured-section { padding-block: 0 clamp(2rem, 5vw, 3.5rem); }
.featured-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .featured-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .featured-grid { grid-template-columns: repeat(6, 1fr); } }

.featured-tile {
  display: flex; flex-direction: column;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  overflow: clip;
  text-align: center;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft), opacity .4s var(--ease-soft);
}
@supports (backdrop-filter: blur(20px)) {
  .featured-tile { backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); }
}
.featured-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.featured-grid.is-swapping .featured-tile { opacity: 0; transform: translateY(6px); }

.featured-tile-media {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  padding: 1rem;
}
.featured-tile-media img { width: 100%; height: 100%; max-width: 140px; max-height: 140px; object-fit: contain; margin-inline: auto; }

.featured-tile-title {
  padding: .7rem .8rem .9rem;
  font-size: .82rem; font-weight: 600; line-height: 1.3;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* =============================================================
   7. Marquee (brands)
   ============================================================= */
.brands { padding-block: 2.2rem; border-block: 1px solid var(--line); }
.brands-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); text-align: center; margin-bottom: 1.4rem; }
.marquee { overflow: hidden; position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.marquee-track { display: inline-flex; gap: 3.2rem; white-space: nowrap; will-change: transform; }
.marquee-track span {
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink-mute);
  opacity: .55;
}

/* =============================================================
   8. Product / category glass cards
   ============================================================= */
.products-grid {
  display: grid; gap: 1.3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }

.glass-card {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-soft);
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
@supports (backdrop-filter: blur(20px)) {
  .glass-card { backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); }
}
.glass-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }

.product-icon {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 1.2rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, .14), rgba(56, 189, 248, .14));
}
.product-icon svg { width: 28px; height: 28px; color: #0ea5e9; }
.glass-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.glass-card p { color: var(--ink-mute); font-size: .95rem; margin-bottom: 1.1rem; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .88rem; color: #0ea5e9; }
.card-link svg { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.card-link:hover svg { transform: translateX(3px); }

/* =============================================================
   8b. Product catalog cards (per-item, e.g. Papelería)
   ============================================================= */
.product-catalog-grid {
  display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
@media (min-width: 560px) { .product-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .product-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Catalog layout: product grid + right-hand category menu (e.g. Papelería) */
.catalog-layout {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
  .catalog-layout .product-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .catalog-layout .product-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.category-menu { order: -1; }
@media (min-width: 960px) {
  .category-menu {
    order: 2; position: sticky; top: 100px;
    max-height: calc(100vh - 120px); overflow-y: auto;
  }
}
.category-menu h4 {
  font-family: var(--display); font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 1rem;
}
.category-menu-list {
  display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
@media (min-width: 960px) {
  .category-menu-list { flex-direction: column; overflow-x: visible; gap: .3rem; padding-bottom: 0; }
}
.category-menu-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem; color: var(--ink-soft);
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--line);
  transition: background .25s, color .25s, border-color .25s;
}
.category-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-mute); transition: color .25s; }
.category-menu-item:hover { border-color: var(--cyan); }
.category-menu-item.is-active {
  background: linear-gradient(120deg, var(--magenta), var(--cyan));
  border-color: transparent; color: #fff;
}
.category-menu-item.is-active svg { color: #fff; }
@media (min-width: 960px) { .category-menu-item { width: 100%; } }

.category-menu-item--main { font-weight: 700; }
.category-menu-chevron { width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; transition: transform .25s; }
@media (max-width: 959px) { .category-menu-chevron { display: none; } }

.category-group, .category-submenu { display: contents; }

@media (min-width: 960px) {
  .category-menu-item--sub {
    width: calc(100% - 1.1rem);
    margin-left: 1.1rem;
    padding-block: .55rem;
    font-size: .85rem;
    border-left: 2px solid var(--line);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .category-menu-item--sub.is-active { border-left-color: transparent; }

  .category-group {
    display: flex; flex-direction: column;
  }
  .category-submenu {
    display: flex; flex-direction: column; gap: .3rem;
    overflow: hidden;
    max-height: 900px;
    margin-top: .3rem;
    transition: max-height .35s ease, opacity .25s ease, margin-top .35s ease;
  }
  .category-group:not(.is-expanded) .category-submenu {
    max-height: 0; opacity: 0; margin-top: 0;
  }
  .category-group:not(.is-expanded) .category-menu-chevron { transform: rotate(-90deg); }
}

.product-card {
  display: flex; flex-direction: column;
  min-width: 0;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  overflow: clip;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.product-card[hidden] { display: none; }
@supports (backdrop-filter: blur(20px)) {
  .product-card { backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); }
}
.product-card:target { outline: 3px solid var(--cyan); outline-offset: 4px; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }

.product-card-media {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  padding: 1.4rem;
}
.product-card-media img { width: 100%; height: 100%; max-width: 320px; max-height: 320px; object-fit: contain; margin-inline: auto; }
.product-card-media svg { width: 55%; height: 55%; }

.product-card-body { padding: 1.5rem 1.6rem 1.7rem; }
.product-card-body h3 { font-size: 1.05rem; margin-bottom: .8rem; }

.product-specs { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
.product-specs li {
  font-size: .88rem; color: var(--ink-mute); padding-left: 1.1rem; position: relative;
}
.product-specs li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--magenta), var(--cyan));
}
.product-sku {
  font-family: var(--display); font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-mute); margin-bottom: 1.1rem;
}
.product-card .btn { width: 100%; }

/* =============================================================
   9. Features / why us
   ============================================================= */
.features-grid {
  display: grid; gap: 1.3rem; grid-template-columns: 1fr;
}
@media (min-width: 780px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card { text-align: left; }
.feature-card .product-icon { background: none; padding: 0; margin-bottom: 1rem; width: auto; height: auto; }
.feature-card .product-icon svg { width: 40px; height: 40px; color: var(--accent-2); }

.stats-row {
  display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr);
  margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
}
@media (min-width: 720px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat strong {
  display: block; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800;
  background: linear-gradient(120deg, var(--magenta), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: .85rem; color: var(--ink-mute); font-weight: 600; }

/* =============================================================
   10. About split
   ============================================================= */
.about-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.about-visual {
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(236,42,125,.14), rgba(0,178,214,.14));
  border: 1px solid var(--glass-border);
  padding: 2.4rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem;
}
.about-visual .glass-card { background: var(--glass-solid); padding: 1.3rem; }
.about-visual .glass-card svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: .6rem; }
.about-visual .glass-card strong { display: block; font-family: var(--display); font-size: 1rem; margin-bottom: .2rem; }
.about-visual .glass-card p { font-size: .82rem; margin: 0; }

.about-text h2 { position: relative; padding-bottom: 1.1rem; }
.about-text p { color: var(--ink-mute); margin-top: 1rem; font-size: 1.02rem; }
.about-list { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .9rem; }
.about-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .96rem; color: var(--ink-soft); }
.about-list svg { width: 20px; height: 20px; color: var(--accent-2); flex-shrink: 0; margin-top: 2px; }

/* =============================================================
   11. CTA
   ============================================================= */
.cta-panel {
  position: relative; overflow: clip; isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  background: linear-gradient(135deg, #16171c, #23161e 45%, #101820);
  color: #fff;
}
.cta-panel::before {
  content: ""; position: absolute; inset: -30%; z-index: -1;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(236, 42, 125, .5), transparent 60%),
    radial-gradient(40% 40% at 80% 30%, rgba(0, 178, 214, .45), transparent 60%),
    radial-gradient(40% 40% at 50% 90%, rgba(255, 196, 0, .3), transparent 60%);
  filter: blur(70px);
  animation: meshDrift 24s ease-in-out infinite;
}
.cta-panel h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 20ch; margin-inline: auto; }
.cta-panel p { color: rgba(255,255,255,.72); margin-top: 1rem; max-width: 48ch; margin-inline: auto; font-size: 1.05rem; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.2rem; }

/* =============================================================
   12. Footer
   ============================================================= */
.footer { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 2rem; }
.footer-grid {
  display: grid; gap: 2.5rem; grid-template-columns: 1fr;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--line);
}
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand p { margin-top: 1rem; color: var(--ink-mute); font-size: .92rem; max-width: 32ch; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.3rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass-solid); border: 1px solid var(--line);
  transition: transform .3s var(--ease-out), color .3s;
}
.footer-social a:hover { transform: translateY(-3px); color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; }

.footer-col h4 { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col a, .footer-col li { font-size: .95rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-contact-item { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact-item svg { width: 18px; height: 18px; color: var(--accent-2); flex-shrink: 0; margin-top: 2px; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding-top: 1.8rem; font-size: .85rem; color: var(--ink-mute);
}

/* =============================================================
   13. Floating WhatsApp button
   ============================================================= */
.fab-whatsapp {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 150;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #25d366, #128c4c);
  box-shadow: 0 18px 34px -12px rgba(18, 140, 76, 0.55);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-bounce);
}
.fab-whatsapp.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab-whatsapp:hover { transform: translateY(-4px) scale(1.05); }
.fab-whatsapp svg { width: 30px; height: 30px; color: #fff; }

/* =============================================================
   14. Category pages (cartuchos-toner.html, papeleria.html, etc.)
   ============================================================= */
.category-header {
  position: relative; overflow: clip; isolation: isolate;
  padding-top: clamp(9.5rem, 14vw, 11.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.category-header .hero-mesh { opacity: .8; }

.breadcrumb {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .88rem; font-weight: 700; color: var(--ink-mute);
  margin-bottom: 1.4rem;
}
.breadcrumb svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.breadcrumb:hover { color: var(--accent); }
.breadcrumb:hover svg { transform: translateX(-3px); }

.category-header-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.category-header-top .product-icon { margin-bottom: 0; }
.category-header h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 20ch; position: relative; padding-bottom: 1.1rem; }
.category-header .hero-sub { margin-top: .9rem; max-width: 56ch; }
.category-header .hero-actions { margin-top: 1.8rem; }

/* Cuando se llega desde un enlace de búsqueda con filtro (?cat=), se oculta el
   texto de bienvenida y solo se deja el breadcrumb, para ir directo al producto. */
.category-header--compact {
  padding-bottom: 1rem;
}
.category-header--compact .category-header-top,
.category-header--compact h1,
.category-header--compact .hero-sub,
.category-header--compact .hero-actions {
  display: none;
}

.product-card--empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(2.4rem, 6vw, 3.4rem) 1.8rem;
}
.product-card--empty .product-icon { margin-bottom: 1.2rem; }
.product-card--empty h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.product-card--empty p { color: var(--ink-mute); max-width: 46ch; margin-bottom: 1.4rem; }

/* =============================================================
   15. Cross-document view transitions (progressive enhancement)
   ============================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .5s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) { animation-name: viewFadeOutUp; }
::view-transition-new(root) { animation-name: viewFadeInUp; }
@keyframes viewFadeOutUp { to { opacity: 0; transform: translateY(-10px); } }
@keyframes viewFadeInUp { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   16. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .cta-panel::before { animation-duration: 60s; }
}
