/* ==========================================================================
   Tanum Chile — Confección & Seguridad Industrial · SPA
   ========================================================================== */

:root {
    --red: #cb2121;
    --red-2: #e23030;
    --red-deep: #97140a;
    --gold: #f7bb32;
    --gold-deep: #d99a0e;

    --ink: #0b0b0c;
    --ink-2: #121214;
    --ink-3: #17171a;
    --line: rgba(255, 255, 255, .09);

    --paper: #f5f5f3;
    --paper-2: #ffffff;
    --muted: #ececea;

    --text: #14141a;
    --text-soft: #55555f;
    --text-invert: #f4f4f6;
    --text-invert-soft: #b6b6c0;

    --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-alt: "Space Grotesk", var(--font);

    --shell: 1240px;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .45);
    --shadow-red: 0 22px 50px -22px rgba(203, 33, 33, .5);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body { font-family: var(--font); color: var(--text); background: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.shell { width: min(100% - 44px, var(--shell)); margin-inline: auto; }
.shell.narrow { max-width: 820px; }
.section { padding: clamp(60px, 8vw, 120px) 0; background: var(--paper); position: relative; }
.section--dark { background: var(--ink); color: var(--text-invert); }
.section--muted { background: var(--muted); }

.h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; }
.h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: -.01em; font-weight: 600; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-alt); font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--gold); display: inline-block; }
.section--dark .eyebrow { color: var(--gold); }
.section-head { max-width: 720px; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::before { display: none; }
.section-head__lead { margin-top: 14px; color: var(--text-soft); font-size: 1.05rem; }
.section-cta { text-align: center; margin-top: clamp(38px, 5vw, 56px); }

/* Botones */
.btn { --bg: var(--red); --fg: #fff; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 100px; font-weight: 600; font-size: .96rem; background: var(--bg); color: var(--fg); overflow: hidden; isolation: isolate; transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .3s; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(120deg, var(--red-2), var(--red-deep)); transform: translateY(101%); transition: transform .45s var(--ease); }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-red); }
.btn:hover::after { transform: translateY(0); }
.btn--primary { --bg: var(--red); }
.btn--dark { --bg: var(--ink); }
.btn--dark::after { background: linear-gradient(120deg, var(--red), var(--red-deep)); }
.btn--gold { --bg: var(--gold); --fg: #1a1206; }
.btn--gold::after { background: linear-gradient(120deg, #ffcf5c, var(--gold-deep)); }
.btn--ghost { --fg: currentColor; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost::after { background: var(--red); }
.btn--ghost:hover { color: #fff; box-shadow: inset 0 0 0 1.5px var(--red); }
.btn--lg { padding: 17px 34px; font-size: 1.02rem; }
.btn--sm { padding: 10px 18px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--header-h); display: flex; align-items: center; transition: background .4s var(--ease), height .4s var(--ease), box-shadow .4s var(--ease); }
.site-header::before { content: ""; position: absolute; inset: 0; background: rgba(11, 11, 12, 0); backdrop-filter: blur(0); transition: background .4s var(--ease), backdrop-filter .4s var(--ease); z-index: -1; }
.site-header.is-scrolled { height: 66px; box-shadow: 0 1px 0 var(--line); }
.site-header.is-scrolled::before, .site-header.is-solid::before { background: rgba(11, 11, 12, .92); backdrop-filter: blur(14px); }
.site-header.is-solid { box-shadow: 0 1px 0 var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; width: min(100% - 44px, var(--shell)); margin-inline: auto; }
.brand img { height: 44px; width: auto; transition: transform .4s var(--ease); }
.site-header.is-scrolled .brand img { height: 38px; }
.brand:hover img { transform: scale(1.04); }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav > a, .main-nav__group > a { position: relative; padding: 10px 14px; font-size: .95rem; font-weight: 500; color: #fff; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav > a:hover::after, .main-nav__group:hover > a::after, .main-nav a.is-active::after { transform: scaleX(1); }

.main-nav__group { position: relative; display: flex; align-items: center; }
/* Desktop: flecha decorativa dentro del link; el botón real queda oculto y solo se usa en móvil */
.main-nav__group > a::before {
    content: ""; width: 8px; height: 8px; margin-left: 6px; border-right: 1.5px solid rgba(255,255,255,.65); border-bottom: 1.5px solid rgba(255,255,255,.65);
    transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease);
}
.main-nav__group:hover > a::before, .main-nav__group:focus-within > a::before { transform: rotate(225deg) translateY(1px); }
.main-nav__caret { display: none; }
.main-nav__dropdown {
    position: absolute; top: 100%; left: 0; width: 460px; padding: 10px;
    background: rgba(17,17,19,.97); backdrop-filter: blur(14px); border: 1px solid var(--line);
    border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s var(--ease), visibility .3s, transform .3s var(--ease);
}
.main-nav__group:hover .main-nav__dropdown, .main-nav__group:focus-within .main-nav__dropdown {
    opacity: 1; visibility: visible; transform: translateY(6px);
}
.main-nav__dropdown a {
    padding: 10px 14px; border-radius: 9px; font-size: .88rem; color: var(--text-invert-soft); transition: background .25s, color .25s;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.main-nav__dropdown a::after { display: none; }
.main-nav__dropdown a:hover { background: rgba(203,33,33,.18); color: #fff; }
.main-nav__dropdown a:first-child {
    grid-column: 1 / -1; color: var(--gold); font-weight: 600; border-bottom: 1px solid var(--line);
    border-radius: 9px 9px 0 0; margin-bottom: 6px; padding-bottom: 12px;
}
.main-nav__dropdown span.cnt { font-size: .74rem; color: #7a7a86; flex: 0 0 auto; }
.header-cta { padding: 10px 22px; color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; margin-left: auto; z-index: 61; }
.nav-toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), opacity .3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; opacity: 0; transition: opacity .35s; }
.nav-backdrop.is-visible { opacity: 1; }

/* Canvas y progreso */
.grid-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .45; }
.section, .site-footer, .app { position: relative; z-index: 1; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70; background: linear-gradient(90deg, var(--red), var(--gold)); box-shadow: 0 0 12px rgba(203,33,33,.6); }

/* Preloader */
.preloader { position: fixed; inset: 0; z-index: 999; display: grid; place-content: center; gap: 26px; justify-items: center; background: var(--ink); transition: opacity .6s var(--ease), visibility .6s; }
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__logo img { width: 220px; animation: pulse 1.3s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .65; transform: scale(.98); } }
.preloader__bar { width: 220px; height: 3px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold)); transition: width .3s var(--ease); }

/* App transitions */
.app { min-height: 60vh; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.app.is-leaving { opacity: 0; transform: translateY(14px); }
.app.is-entering { opacity: 0; transform: translateY(14px); transition: none; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; background: var(--ink); }
.hero__bg::before { content: ""; position: absolute; inset: 0; background-image: url("../img/hero/hero.webp"); background-size: cover; background-position: center; opacity: .55; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 32%, rgba(203,33,33,.32), transparent 55%), radial-gradient(circle at 18% 82%, rgba(247,187,50,.2), transparent 52%); }
.hero__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(11,11,12,.75), transparent 60%), linear-gradient(0deg, rgba(11,11,12,.85), transparent 45%); }
.hero__inner { position: relative; z-index: 2; padding: calc(var(--header-h) + 40px) 0 90px; max-width: 780px; }
.hero__eyebrow { font-family: var(--font-alt); letter-spacing: .2em; text-transform: uppercase; font-size: .82rem; color: var(--gold); margin-bottom: 20px; font-weight: 600; }
.hero__title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1; letter-spacing: -.03em; font-weight: 800; }
.hero__title span { display: block; overflow: hidden; }
.hero__title em { font-style: normal; color: var(--red-2); }
.hero__lead { margin: 26px 0 0; font-size: clamp(1.05rem, 1.5vw, 1.24rem); color: rgba(255,255,255,.86); max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__actions .btn--ghost { color: #fff; }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); margin-top: 52px; }
.stat b { display: block; font-family: var(--font-alt); font-size: clamp(1.8rem, 3.2vw, 2.7rem); font-weight: 700; color: #fff; line-height: 1; }
.stat span { font-size: .82rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; }
.hero__scroll { position: absolute; z-index: 3; bottom: 32px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.4); border-radius: 20px; display: grid; justify-items: center; padding-top: 8px; }
.hero__scroll span { width: 4px; height: 8px; background: #fff; border-radius: 3px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 80%,100% { opacity: 0; transform: translateY(14px); } }

/* Features */
.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.feature { background: var(--paper-2); border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 20px 40px -30px rgba(0,0,0,.3); border: 1px solid rgba(0,0,0,.05); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.section--dark .feature { background: var(--ink-2); border-color: var(--line); }
.feature:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(203,33,33,.35); }
.feature--lg { padding: 34px 28px; }
.feature__icon { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(140deg, var(--red), var(--red-deep)); margin-bottom: 18px; position: relative; box-shadow: var(--shadow-red); }
.feature__icon::before { content: ""; position: absolute; inset: 0; -webkit-mask: var(--i) center/26px no-repeat; mask: var(--i) center/26px no-repeat; background: #fff; }
.feature h3 { font-size: 1.12rem; font-weight: 600; }
.section--dark .feature h3 { color: #fff; }
.feature p { color: var(--text-soft); margin-top: 9px; font-size: .93rem; }
.section--dark .feature p { color: var(--text-invert-soft); }

[data-icon] { --i: none; }
[data-icon="shield"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2l8 3v6c0 5-3.4 8.5-8 11-4.6-2.5-8-6-8-11V5z'/%3E%3C/svg%3E"); }
[data-icon="scissors"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M14.7 12l6.3-9h-2.5l-4.8 6.9-1.7-2.4c.3-.6.5-1.3.5-2A3.5 3.5 0 106.5 9c.5 0 1-.1 1.4-.3L9.6 11l-1.7 2.3A3.5 3.5 0 106.5 20a3.5 3.5 0 003.5-3.5c0-.7-.2-1.4-.5-2L11 12l7.5 9H21zM6.5 7A1.5 1.5 0 116.5 4a1.5 1.5 0 010 3zm0 11a1.5 1.5 0 110-3 1.5 1.5 0 010 3z'/%3E%3C/svg%3E"); }
[data-icon="thread"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2a5 5 0 00-5 5v10a5 5 0 0010 0V7a5 5 0 00-5-5zm0 3a2 2 0 012 2v10a2 2 0 01-4 0V7a2 2 0 012-2z'/%3E%3C/svg%3E"); }
[data-icon="stack"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2l10 6-10 6L2 8zm0 9.2L20 6.5 22 8l-10 6L2 8l2-1.5zM2 12l10 6 10-6 0 3-10 6L2 15z'/%3E%3C/svg%3E"); }
[data-icon="award"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2a6 6 0 016 6c0 2.6-1.6 4.7-3.9 5.6L15 22l-3-2-3 2 .9-8.4A6 6 0 0112 2zm0 2a4 4 0 100 8 4 4 0 000-8z'/%3E%3C/svg%3E"); }
[data-icon="handshake"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 5l2-1 6 3v9h-3l-4 3-2-2 3-2-1-1-3 2-2-2 5-4-1-1-4 3-2-2z'/%3E%3C/svg%3E"); }
[data-icon="pin"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2a7 7 0 00-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 00-7-7zm0 9.5A2.5 2.5 0 1112 6a2.5 2.5 0 010 5.5z'/%3E%3C/svg%3E"); }
[data-icon="phone"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.4.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 013 4c0-.6.4-1 1-1h3.4c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.4 0 .8-.3 1z'/%3E%3C/svg%3E"); }
[data-icon="mail"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zm8 7L4 6.2V6l8 5 8-5v.2z'/%3E%3C/svg%3E"); }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 76px); align-items: center; }
.split__body p { color: var(--text-soft); margin-top: 15px; }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
.frame--gold::before { content: ""; position: absolute; inset: auto -14px -14px auto; width: 60%; height: 60%; border: 2px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.split__media { position: relative; }

/* Categorías (home) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card { position: relative; border-radius: var(--radius); padding: 26px 22px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
/* imagen de producto de fondo, semitransparente */
.cat-card__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .28; transform: scale(1.04); transition: opacity .45s var(--ease), transform .7s var(--ease); }
.cat-card.has-img .cat-card__bg { filter: saturate(1.05); }
.cat-card:hover .cat-card__bg { opacity: .42; transform: scale(1.12); }
.cat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(150deg, rgba(203,33,33,.55) 0%, rgba(11,11,12,.72) 55%, rgba(11,11,12,.9) 100%); transition: opacity .4s; }
.cat-card:nth-child(even)::before { background: linear-gradient(150deg, rgba(247,187,50,.5) 0%, rgba(11,11,12,.72) 55%, rgba(11,11,12,.92) 100%); }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.cat-card b { font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.cat-card span { font-size: .82rem; color: rgba(255,255,255,.6); }
.cat-card .arrow { position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; transition: background .3s, transform .3s; }
.cat-card:hover .arrow { background: var(--red); transform: rotate(-45deg); }
.cat-card .arrow::after { content: "→"; font-size: .9rem; }

/* Grid de productos */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prod-card { background: var(--paper-2); border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 34px -28px rgba(0,0,0,.4); border: 1px solid rgba(0,0,0,.05); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.prod-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(203,33,33,.4); }
.prod-card__media { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.prod-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .6s var(--ease); }
.prod-card:hover .prod-card__media img { transform: scale(1.06); }
.prod-card__badge { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #1a1206; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; }
.prod-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-card__cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red); font-weight: 600; }
.prod-card__name { font-size: .98rem; font-weight: 600; line-height: 1.25; color: var(--text); }
.prod-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.prod-card__link { font-size: .85rem; font-weight: 600; color: var(--red); display: inline-flex; align-items: center; gap: 5px; }
.prod-card__link::after { content: "→"; transition: transform .3s; }
.prod-card:hover .prod-card__link::after { transform: translateX(4px); }

/* Marcas */
.brand-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.brand-chip { padding: 12px 26px; border-radius: 100px; background: var(--paper-2); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08); font-weight: 600; font-family: var(--font-alt); color: var(--text); transition: all .3s; }
.brand-chip:hover { background: var(--ink); color: #fff; box-shadow: none; transform: translateY(-3px); }
.brand-chip span { color: var(--red); margin-left: 6px; font-size: .82rem; }

/* Page hero interior */
.page-hero { position: relative; min-height: 52vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; padding-bottom: 52px; background: var(--ink); }
.page-hero--sm { min-height: 40vh; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: inherit; background-size: cover; background-position: center; transform: scale(1.05); opacity: .5; z-index: 0; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,11,12,.96), rgba(11,11,12,.5) 60%, rgba(11,11,12,.7)); z-index: 1; }
.page-hero__inner { position: relative; z-index: 2; padding-top: calc(var(--header-h) + 26px); }
.page-hero__title { font-size: clamp(2.1rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; }
.page-hero__title span { display: inline-block; }
.page-hero__lead { margin-top: 14px; max-width: 620px; color: rgba(255,255,255,.82); font-size: 1.08rem; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .1em; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { opacity: .5; }

/* Catálogo */
.catalog__bar { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.search { flex: 1; min-width: 260px; position: relative; }
.catalog__sort { display: flex; align-items: center; gap: 10px; }
.catalog__sort label { font-size: .85rem; color: var(--text-soft); white-space: nowrap; }
.catalog__sort select {
    appearance: none; -webkit-appearance: none; font: inherit; font-size: .88rem; font-weight: 600;
    color: var(--text); background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2355555f' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") right 10px center/18px no-repeat;
    border: 1.5px solid rgba(0,0,0,.12); border-radius: 100px; padding: 10px 34px 10px 16px; cursor: pointer; transition: border-color .3s, box-shadow .3s;
}
.catalog__sort select:hover, .catalog__sort select:focus { border-color: var(--red); outline: none; }
.catalog__sort select:focus { box-shadow: 0 0 0 4px rgba(203,33,33,.12); }
.search input { width: 100%; padding: 15px 20px 15px 48px; border-radius: 100px; border: 1.5px solid rgba(0,0,0,.12); background: var(--paper-2); font: inherit; transition: border-color .3s, box-shadow .3s; }
.search::before { content: ""; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; background: var(--text-soft); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 10-.7.7l.3.3v.8l5 5 1.5-1.5zM10 14a4 4 0 110-8 4 4 0 010 8z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 10-.7.7l.3.3v.8l5 5 1.5-1.5zM10 14a4 4 0 110-8 4 4 0 010 8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(203,33,33,.12); }
.catalog__count { font-size: .9rem; color: var(--text-soft); }
.catalog__count b { color: var(--text); }
.catalog__layout { display: grid; grid-template-columns: 260px 1fr; gap: 34px; align-items: start; }
.catalog__filters { position: sticky; top: 90px; display: grid; gap: 26px; background: var(--paper-2); border-radius: var(--radius); padding: 24px; box-shadow: 0 16px 40px -30px rgba(0,0,0,.3); }
.filter-block h4 { font-size: .95rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,.08); }
.filter-list { display: grid; gap: 3px; max-height: 320px; overflow-y: auto; margin: -4px; padding: 4px; }
.filter-list label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: .88rem; color: var(--text-soft); cursor: pointer; transition: background .2s, color .2s; }
.filter-list label:hover { background: rgba(203,33,33,.06); color: var(--text); }
.filter-list input { accent-color: var(--red); width: 16px; height: 16px; }
.filter-list .cnt { margin-left: auto; font-size: .78rem; color: #a0a0aa; }
.filter-list label.is-checked { color: var(--text); font-weight: 600; }

.catalog__empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.catalog__empty p { margin-bottom: 16px; }
.catalog__more { text-align: center; margin-top: 40px; }

/* Filtros móviles */
.filter-fab { display: none; }

/* Ficha de producto */
.product-page { padding-top: calc(var(--header-h) + 40px); background: var(--paper); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.product__gallery { position: sticky; top: 96px; }
.product__main { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center; }
.product__main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; cursor: zoom-in; }
.product__thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.product__thumbs button { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08); transition: box-shadow .25s; }
.product__thumbs button.is-active { box-shadow: inset 0 0 0 2px var(--red); }
.product__thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product__crumbs { font-size: .82rem; color: var(--text-soft); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .08em; }
.product__crumbs a:hover { color: var(--red); }
.product__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.product__tag { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 5px 12px; border-radius: 100px; background: rgba(203,33,33,.1); color: var(--red); }
.product__tag--brand { background: rgba(247,187,50,.18); color: var(--gold-deep); }
.product__title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.product__sku { font-size: .85rem; color: var(--text-soft); margin-top: 8px; font-family: var(--font-alt); }
.product__desc { margin-top: 22px; color: var(--text-soft); line-height: 1.7; }
.product__desc ul { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.product__desc li { position: relative; padding-left: 26px; }
.product__desc li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 3px; background: var(--gold); }
.product__desc p { margin-top: 12px; }
.product__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.product__note { margin-top: 16px; font-size: .88rem; color: var(--text-soft); background: var(--muted); border-radius: 12px; padding: 14px 18px; }
.related { margin-top: clamp(50px, 7vw, 80px); }
.related h2 { font-size: 1.4rem; margin-bottom: 24px; }

/* Contacto */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(34px, 5vw, 60px); align-items: start; margin-bottom: 44px; }
.contact__list { display: grid; gap: 20px; margin-top: 24px; }
.contact__list li { display: flex; gap: 15px; align-items: flex-start; }
.contact__ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(140deg, var(--red), var(--red-deep)); position: relative; box-shadow: var(--shadow-red); }
.contact__ico::before { content: ""; position: absolute; inset: 0; -webkit-mask: var(--i) center/22px no-repeat; mask: var(--i) center/22px no-repeat; background: #fff; }
.contact__list b { font-size: .96rem; }
.contact__list p { color: var(--text-soft); font-size: .93rem; }
.contact__list a:hover { color: var(--red); }
.contact__form-wrap { background: var(--ink); border-radius: var(--radius); padding: clamp(26px, 4vw, 42px); box-shadow: var(--shadow); }
.contact-form { display: grid; gap: 22px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; background: transparent; color: #fff; border: 0; border-bottom: 1.5px solid rgba(255,255,255,.2); padding: 16px 2px 10px; font: inherit; transition: border-color .3s; }
.field textarea { resize: vertical; min-height: 120px; }
.field label { position: absolute; left: 2px; top: 16px; color: rgba(255,255,255,.5); pointer-events: none; transition: all .25s var(--ease); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field input:focus + label, .field textarea:focus + label, .field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label { top: -6px; font-size: .75rem; color: var(--gold); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field.has-error input, .field.has-error textarea { border-color: #ff5252; }
.btn__spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; display: none; animation: spin .7s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form__status { font-size: .92rem; min-height: 1.2em; }
.contact-form__status.is-ok { color: #37d17a; }
.contact-form__status.is-error { color: #ff8a8a; }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-map iframe { display: block; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.stat-card { background: var(--paper-2); border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: 0 16px 36px -30px rgba(0,0,0,.3); border-top: 3px solid var(--gold); }
.stat-card b { display: block; font-family: var(--font-alt); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: var(--red); line-height: 1; }
.stat-card span { font-size: .82rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }

/* 404 */
.notfound { text-align: center; padding-top: calc(var(--header-h) + 80px); }
.notfound__code { font-family: var(--font-alt); font-size: clamp(4rem, 14vw, 9rem); font-weight: 700; color: var(--red); line-height: 1; display: block; }
.notfound p { color: var(--text-soft); margin: 12px 0 30px; }

/* CTA band */
.band-cta { background: var(--ink); color: #fff; }
.band-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.band-cta p { color: var(--text-invert-soft); margin-top: 10px; max-width: 520px; }

/* Footer */
.site-footer { background: var(--ink-2); color: var(--text-invert); padding-top: clamp(56px, 7vw, 88px); border-top: 3px solid var(--red); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.site-footer__brand img { height: 46px; width: auto; margin-bottom: 18px; }
.site-footer__brand p { color: var(--text-invert-soft); font-size: .93rem; max-width: 360px; }
.site-footer__col h4 { font-size: 1rem; margin-bottom: 18px; position: relative; padding-bottom: 12px; }
.site-footer__col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--gold); }
.site-footer__col p { font-size: .9rem; color: var(--text-invert-soft); margin-bottom: 11px; }
.site-footer__col p span { display: block; color: #fff; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.site-footer__col a:hover { color: var(--gold); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid var(--line); font-size: .84rem; color: var(--text-invert-soft); }

/* Scroll top */
.scroll-top { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 48px; height: 48px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-red); opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: all .4s var(--ease); }
.scroll-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); }
.scroll-top svg { fill: currentColor; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(6,6,7,.94); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__stage { max-width: min(92vw, 900px); max-height: 84vh; text-align: center; }
.lightbox__stage img { max-width: 100%; max-height: 78vh; border-radius: 10px; background: #fff; box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); }
.lightbox figcaption { color: rgba(255,255,255,.75); margin-top: 14px; font-size: .95rem; }
.lightbox__close { position: absolute; top: 22px; right: 26px; font-size: 2.4rem; color: #fff; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 2rem; display: grid; place-items: center; transition: background .3s; }
.lightbox__nav:hover { background: var(--red); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* Reveal base */
[data-reveal], [data-stagger] > * { opacity: 0; }
.no-fx [data-reveal], .no-fx [data-stagger] > *, .no-fx [data-split], .no-fx [data-split-lines] { opacity: 1 !important; transform: none !important; }

/* Skeleton */
.skeleton { background: linear-gradient(100deg, #eee 30%, #f5f5f5 50%, #eee 70%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
    .cards--4, .cat-grid, .prod-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
    .catalog__layout { grid-template-columns: 1fr; }
    .catalog__filters { position: static; grid-template-columns: 1fr 1fr; display: grid; }
    .catalog__filters .btn { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    :root { --header-h: 66px; }
    .header-cta { display: none; }
    .nav-toggle { display: flex; }
    .main-nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); z-index: 60; background: rgba(15,15,17,.98); backdrop-filter: blur(16px); flex-direction: column; align-items: stretch; gap: 4px; padding: calc(var(--header-h) + 20px) 22px 30px; margin: 0; transform: translateX(100%); transition: transform .4s var(--ease); overflow-y: auto; }
    .main-nav.is-open { transform: none; }
    .main-nav > a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; }
    .main-nav a::after { display: none; }

    /* En móvil el submenú es un acordeón: colapsado por defecto, se abre al tocar la flecha */
    .main-nav__group { flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--line); }
    .main-nav__group > a { flex: 1; padding: 14px 12px; font-size: 1.05rem; border-bottom: 0; }
    .main-nav__group > a::before { display: none; } /* la flecha decorativa de desktop no aplica aquí */
    .main-nav__caret {
        display: flex; position: absolute; top: 0; right: 0; height: 100%; width: 52px; align-items: center; justify-content: center;
        pointer-events: auto;
    }
    .main-nav__caret span { width: 9px; height: 9px; border-right: 1.5px solid rgba(255,255,255,.6); border-bottom: 1.5px solid rgba(255,255,255,.6); transform: rotate(45deg); transition: transform .3s var(--ease); }
    .main-nav__group.is-open .main-nav__caret span { transform: rotate(225deg); }

    .main-nav__dropdown {
        position: static; opacity: 1; visibility: visible; transform: none; width: auto;
        grid-template-columns: 1fr; background: transparent; border: 0; box-shadow: none; padding: 0;
        max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
    }
    .main-nav__group.is-open .main-nav__dropdown { max-height: 70vh; overflow-y: auto; padding: 0 0 10px 14px; }
    .main-nav__dropdown a { color: var(--text-invert-soft); border-bottom: 0 !important; padding: 11px 10px; }
    .main-nav__dropdown a:first-child { margin-bottom: 0; padding-bottom: 11px; }
    .split, .product, .contact { grid-template-columns: 1fr; }
    .product__gallery { position: static; }
    .cards--3, .cards--4, .cat-grid, .prod-grid { grid-template-columns: repeat(2, 1fr); }
    .hero__scroll { display: none; }
    .site-footer__bottom { flex-direction: column; }
}
@media (max-width: 520px) {
    .shell { width: calc(100% - 32px); }
    .prod-grid, .cat-grid, .cards--3, .cards--4 { grid-template-columns: 1fr 1fr; }
    .hero__stats { gap: 20px; }
    .stat { flex: 1 1 40%; }
    .catalog__filters { grid-template-columns: 1fr; }
    .band-cta__inner .btn { width: 100%; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; }
    .grid-canvas { display: none; }
}
