/* =========================================================
   Miel Rubén — tienda apícola
   Base monocromática + acento aurora (mismo sistema que el
   portfolio del autor: Space Grotesk / JetBrains Mono).
   ========================================================= */

:root {
    --black: #000;
    --ink: #1f1f1f;
    --muted: #7f7f7f;
    --line: #e7e7e7;
    --soft: #f5f5f5;
    --paper: #fff;

    --aur-1: #37D7FA;
    --aur-2: #4B72FE;
    --aur-3: #FF8DF2;
    --aur-4: #FF8705;
    --aurora: linear-gradient(148.35deg,
        var(--aur-1) -0.08%, var(--aur-2) 39.93%,
        var(--aur-3) 67.94%, var(--aur-4) 99.94%);
    --aurora-soft: linear-gradient(90deg,
        rgba(55,215,250,0.10), rgba(75,114,254,0.10) 40%,
        rgba(255,141,242,0.10) 70%, rgba(255,135,5,0.10));
    --aurora-text: linear-gradient(120deg,
        var(--aur-1), var(--aur-2) 40%,
        var(--aur-3) 70%, var(--aur-4));

    --honey: #E8A13A;
    --amber: #B96A1B;
    --ok: #2e9e5b;
    --warn: #c77f0a;
    --bad: #d0453e;

    --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Inter",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
                 Menlo, Consolas, monospace;

    --gap: clamp(1rem, 3vw, 1.75rem);
    --full: minmax(var(--gap), 1fr);
    --content: calc(100% - 2 * var(--gap));
    --radius: 12px;
    --radius-lg: 20px;
    --max-w: 1180px;
    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--black); }
img, svg { max-width: 100%; display: block; }

.text-gradient {
    background: var(--aurora-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* =========================================================
   GRID + SECTION
   ========================================================= */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gap);
    grid-column: content;
}

.section {
    display: grid;
    grid-template-columns: [full-start] var(--full) [content-start] var(--content) [content-end] var(--full) [full-end];
    padding: 5rem 0;
    position: relative;
}
.section-white  { background: var(--paper); color: var(--ink); }
.section-light  { background: var(--soft);  color: var(--ink); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.label, .mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    color: var(--muted);
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    color: var(--ink);
}
.label::before {
    content: "";
    width: 4px; height: 4px;
    background: currentColor;
    display: inline-block;
}

.display {
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-size: clamp(2.5rem, 2.04rem + 2.1vw, 4rem);
    margin: 0 0 1.5rem;
    max-width: 20ch;
    text-wrap: balance;
}
.display-accent {
    display: block;
    color: var(--muted);
    font-weight: 500;
    margin-top: 0.4rem;
}

.h2 {
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-size: clamp(2rem, 1.54rem + 2.1vw, 3.5rem);
    margin: 0 0 1rem;
    max-width: 24ch;
    text-wrap: balance;
}

.h3 {
    font-weight: 500;
    letter-spacing: -0.02em;
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
    margin: 0 0 0.75rem;
    color: var(--black);
}

.lead {
    font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
    color: var(--ink);
    margin: 0 0 2rem;
    max-width: 62ch;
    text-wrap: pretty;
}
.lead.small { font-size: clamp(0.875rem, 0.83rem + 0.17vw, 1rem); color: var(--muted); margin-bottom: 0; }

/* =========================================================
   HEADER
   ========================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem var(--gap);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--black); }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand-word { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--black); }

.nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; font-size: 0.9rem; }
.nav-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    color: var(--ink); padding: 0.5rem 0.25rem; font-size: 0.9rem;
    transition: color 0.15s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--black); }
.nav-link.active { box-shadow: inset 0 -2px 0 0 var(--aur-4); }

.header-right { display: flex; align-items: center; gap: 0.6rem; margin-left: 0.5rem; }

.lang-toggle {
    display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
    overflow: hidden; font-family: var(--font-mono); font-size: 0.68rem;
}
.lang-toggle button {
    background: var(--paper); border: 0; padding: 0.45rem 0.7rem; cursor: pointer;
    color: var(--muted); font: inherit; text-transform: uppercase; letter-spacing: 0.04em;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lang-toggle button[aria-pressed="true"] { background: var(--black); color: #fff; }

.cart-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--paper); cursor: pointer; color: var(--ink);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.cart-btn:hover { border-color: var(--ink); background: var(--soft); }
.cart-count {
    position: absolute; top: -6px; right: -6px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--black); color: #fff; border-radius: 999px;
    font-family: var(--font-mono); font-size: 0.62rem; line-height: 18px; text-align: center;
}
.cart-count[data-empty="true"] { display: none; }

.hamburger {
    display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer;
    width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px;
}
.hamburger span {
    display: block; width: 22px; height: 1.5px; background: var(--ink);
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
    display: none; flex-direction: column; gap: 0.5rem;
    padding: 1rem var(--gap) 1.5rem; border-top: 1px solid var(--line); background: var(--paper);
}
.mobile-nav[hidden] { display: none !important; }
.mobile-link { display: block; padding: 0.75rem 0.5rem; font-size: 1rem; color: var(--ink); border-radius: 8px; }
.mobile-link:hover, .mobile-link.active { background: var(--soft); }
.mobile-tools { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }

@media (max-width: 860px) {
    .nav { display: none; }
    .header-right .lang-toggle { display: none; }
    .hamburger { display: flex; }
    .mobile-nav:not([hidden]) { display: flex; }
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: var(--font-mono); text-transform: uppercase; font-size: 0.75rem;
    letter-spacing: 0.04em; line-height: 1; padding: 0.75rem 2rem;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
                color 0.15s var(--ease), background-size 0.3s var(--ease), opacity 0.15s var(--ease);
}
.btn-primary { background: var(--black); color: var(--soft); border-color: var(--black); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--black); border-color: var(--line); }
.btn-secondary:hover { background: var(--soft); }
.btn-gradient {
    background: var(--aurora); background-size: 100% 100%;
    color: #fff; border: 0; border-radius: var(--radius-lg); font-weight: 500;
}
.btn-gradient:hover { background-size: 140% 140%; color: #fff; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.68rem; }
.btn-block { width: 100%; }

.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }
.cta-row.center { justify-content: center; }

.link-arrow {
    font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--ink); display: inline-flex; align-items: center;
    gap: 0.5rem; padding-bottom: 2px; border-bottom: 1px solid var(--line);
    transition: border-color 0.15s var(--ease), gap 0.2s var(--ease);
}
.link-arrow:hover { color: var(--black); border-bottom-color: var(--ink); gap: 0.75rem; }

/* =========================================================
   HERO + MARQUEE + STATS
   ========================================================= */

.hero { padding: 7rem 0 5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(360px, 80%); height: auto; }

.marquee-section { padding: 3.5rem 0 4rem; }
.marquee { grid-column: full; display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; width: 100%; overflow: hidden; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; gap: 2.75rem; padding-right: 2.75rem; flex-shrink: 0; }
.marquee-item {
    display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
    color: var(--ink); font-size: 0.95rem; font-weight: 500; white-space: nowrap;
}
.marquee-item .hex { width: 14px; height: 14px; flex-shrink: 0; }
.marquee-item:hover span {
    background: var(--aurora-text); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.marquee-left  { animation: marquee-scroll-left 46s linear infinite; }
@keyframes marquee-scroll-left { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-left { animation: none; } }

.stats-frame { grid-column: full; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-list {
    list-style: none; margin: 1.5rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat-item { padding: 2.5rem 2rem 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
.stat-number { margin: 0; font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; font-size: clamp(3rem, 2.6rem + 2.1vw, 4.5rem); }
.stat-caption {
    margin: 0; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 0.75rem; color: var(--ink); display: inline-flex; align-items: center; gap: 0.6rem;
}
.stat-caption::before { content: ""; width: 4px; height: 4px; background: currentColor; display: inline-block; }
@media (max-width: 820px) { .stats-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-list { grid-template-columns: 1fr; } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

/* =========================================================
   PRODUCT CARDS + FILTERS
   ========================================================= */

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 2rem; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.95rem; background: var(--paper); border: 1px solid var(--line);
    border-radius: 999px; font-size: 0.82rem; color: var(--ink); cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
    font-family: var(--font-sans);
}
.filter-chip:hover { border-color: var(--ink); }
.filter-chip[aria-pressed="true"] { background: var(--black); color: #fff; border-color: var(--black); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.product-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    transition: border-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.product-card::before {
    content: ""; position: absolute; inset: 0; background: var(--aurora-soft);
    opacity: 0; transition: opacity 0.3s var(--ease); pointer-events: none;
}
.product-card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15); }
.product-card:hover::before { opacity: 1; }

.product-media {
    background: var(--soft); border-bottom: 1px solid var(--line);
    aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; cursor: pointer;
}
.product-media img { width: auto; height: 100%; max-height: 180px; object-fit: contain; }

.product-body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; position: relative; }
.product-cat { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.product-name { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--black); letter-spacing: -0.01em; }
.product-name a:hover { text-decoration: underline; }
.product-short { margin: 0; color: var(--muted); font-size: 0.86rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }
.product-price { font-weight: 600; font-size: 1.05rem; color: var(--black); letter-spacing: -0.01em; }
.product-price small { font-weight: 400; color: var(--muted); font-size: 0.7rem; display: block; }

.stock-note { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.stock-note.low { color: var(--warn); }
.stock-note.out { color: var(--bad); }

/* =========================================================
   CART DRAWER
   ========================================================= */

.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 80;
    opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
    background: var(--paper); border-left: 1px solid var(--line); z-index: 90;
    transform: translateX(100%); transition: transform 0.3s var(--ease);
    display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
}
.cart-head .h3 { margin: 0; font-size: 1.1rem; }
.cart-close { background: none; border: 0; cursor: pointer; padding: 0.4rem; color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-empty { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 3rem; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.85rem; align-items: center; }
.cart-item-img { width: 56px; height: 56px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-name { font-size: 0.88rem; font-weight: 500; color: var(--black); margin: 0; }
.cart-item-price { font-size: 0.78rem; color: var(--muted); margin: 0.15rem 0 0; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-stepper button {
    width: 26px; height: 26px; border: 0; background: var(--paper); cursor: pointer;
    font-size: 0.9rem; color: var(--ink); line-height: 1;
}
.qty-stepper button:hover { background: var(--soft); }
.qty-stepper span { min-width: 28px; text-align: center; font-size: 0.8rem; font-family: var(--font-mono); }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.cart-item-remove { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 0.72rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 0; }
.cart-item-remove:hover { color: var(--bad); }
.cart-foot { border-top: 1px solid var(--line); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--muted); }
.cart-total-row.grand { font-size: 1.05rem; color: var(--black); font-weight: 600; }
.shipping-hint { font-size: 0.75rem; color: var(--muted); }

/* =========================================================
   FORMS
   ========================================================= */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
    font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--muted);
}
.field input, .field select, .field textarea {
    font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink);
    padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 8px;
    background: var(--paper); outline: none; transition: border-color 0.15s var(--ease);
    width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 130px; }
.field .error-text { font-size: 0.75rem; color: var(--bad); min-height: 1em; }

#payment-element { margin: 0.5rem 0 1rem; }

/* Tarjeta ficticia del modo demo local */
.demo-card {
    position: relative;
    border: 1.5px dashed var(--muted);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex; flex-direction: column; gap: 0.85rem;
    background: var(--soft);
}
.demo-card input[readonly] { background: var(--paper); color: var(--muted); }
.demo-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.demo-badge {
    position: absolute; top: -10px; right: 12px;
    background: var(--black); color: #fff;
    font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.form-note { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.form-note svg { width: 14px; height: 14px; flex-shrink: 0; }

.alert {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem;
    font-size: 0.9rem; display: none;
}
.alert.show { display: block; }
.alert.error { border-color: var(--bad); color: var(--bad); background: rgba(208,69,62,0.05); }
.alert.success { border-color: var(--ok); color: var(--ok); background: rgba(46,158,91,0.05); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* =========================================================
   CHECKOUT LAYOUT
   ========================================================= */

.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.summary-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; position: sticky; top: 90px;
    display: flex; flex-direction: column; gap: 0.85rem;
}
.summary-line { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }
.summary-line .qty { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }
.summary-totals { border-top: 1px solid var(--line); padding-top: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.summary-totals .row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--muted); }
.summary-totals .row.grand { color: var(--black); font-weight: 600; font-size: 1.05rem; }

/* =========================================================
   CHARTS
   ========================================================= */

.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 800px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-box {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; position: relative; overflow: hidden;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.chart-box::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--aurora); opacity: 0; transition: opacity 0.25s var(--ease);
}
.chart-box:hover { border-color: var(--ink); transform: translateY(-2px); }
.chart-box:hover::before { opacity: 1; }
.chart-box.wide { grid-column: 1 / -1; }
.chart-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.chart-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em; }
.chart-title { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--black); letter-spacing: -0.01em; }
.chart-sub { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.85rem; }
.chart-svg { width: 100%; height: auto; }
.legend { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--ink); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .val { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* =========================================================
   TIMELINE (Historia)
   ========================================================= */

.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.timeline::before {
    content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.timeline-item { position: relative; padding: 0 0 2.25rem 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%;
    background: var(--paper); border: 1px solid var(--ink);
}
.timeline-item:nth-child(4n+1) .timeline-dot { border-color: var(--aur-1); }
.timeline-item:nth-child(4n+2) .timeline-dot { border-color: var(--aur-2); }
.timeline-item:nth-child(4n+3) .timeline-dot { border-color: var(--aur-3); }
.timeline-item:nth-child(4n+4) .timeline-dot { border-color: var(--aur-4); }
.timeline-year { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 0.2rem; }
.timeline-title { margin: 0 0 0.35rem; font-size: 1.1rem; font-weight: 500; color: var(--black); }
.timeline-text { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 60ch; }

/* =========================================================
   MODAL (ficha de producto)
   ========================================================= */

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100;
    display: none; align-items: center; justify-content: center; padding: 1.25rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--line);
    max-width: 880px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-close {
    position: absolute; top: 0.9rem; right: 0.9rem; z-index: 2;
    background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
    width: 34px; height: 34px; cursor: pointer; color: var(--ink);
}
.modal-close:hover { border-color: var(--ink); }
.modal-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; }
@media (max-width: 720px) { .modal-grid { grid-template-columns: 1fr; } }
.modal-media { background: var(--soft); display: flex; align-items: center; justify-content: center; padding: 2.5rem; }
.modal-media img { max-height: 260px; }
.modal-body { padding: 2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.modal-desc { margin: 0; color: var(--muted); font-size: 0.92rem; }
.modal-charts { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 0.5rem; }
.modal-charts .chart-title { font-size: 0.85rem; }
.modal-buy { display: flex; align-items: center; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.modal-price { font-size: 1.4rem; font-weight: 600; color: var(--black); letter-spacing: -0.02em; }

/* =========================================================
   CTA SECTION
   ========================================================= */

.cta-section { padding: 6rem 0; }
.cta-wrap {
    background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 4rem 2rem; position: relative; overflow: hidden;
}
.cta-wrap::before { content: ""; position: absolute; inset: 0; background: var(--aurora-soft); pointer-events: none; }
.cta-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.cta-title { margin: 0; max-width: 22ch; }

/* =========================================================
   FEATURE / VALUE CARDS
   ========================================================= */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; display: flex; flex-direction: column; gap: 0.85rem;
    position: relative; overflow: hidden;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.feature-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--aurora); opacity: 0; transition: opacity 0.25s var(--ease);
}
.feature-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }
.feature-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em; }
.feature-title { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--black); }
.feature-text { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* =========================================================
   ADMIN
   ========================================================= */

.admin-login { max-width: 420px; margin: 4rem auto; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 1.5rem; }
.admin-toolbar .spacer { flex: 1; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.kpi-value { margin: 0; font-size: 1.9rem; font-weight: 500; letter-spacing: -0.03em; color: var(--black); }
.kpi-label { margin: 0.25rem 0 0; font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th {
    text-align: left; padding: 0.75rem 1rem; font-family: var(--font-mono); font-size: 0.65rem;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--soft); }
.table .num { text-align: right; font-family: var(--font-mono); font-size: 0.78rem; }
.table .actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.status-pill {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.7rem;
    border-radius: 999px; font-family: var(--font-mono); font-size: 0.65rem;
    text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid var(--line);
    white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-awaiting_payment { color: var(--muted); }
.status-paid { color: var(--aur-2); }
.status-preparing { color: var(--warn); }
.status-shipped { color: var(--aur-1); }
.status-delivered { color: var(--ok); }
.status-cancelled, .status-failed { color: var(--bad); }

.order-detail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 1.5rem; margin-top: 1.5rem; display: none; }
.order-detail.open { display: block; }
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .order-detail-grid { grid-template-columns: 1fr; } }

.stock-input { width: 76px; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-mono); font-size: 0.78rem; }

/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 150%);
    background: var(--black); color: #fff; padding: 0.8rem 1.4rem; border-radius: 10px;
    font-size: 0.85rem; z-index: 200; transition: transform 0.3s var(--ease);
    max-width: min(90vw, 420px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--bad); }

/* =========================================================
   FOOTER
   ========================================================= */

.big-footer { background: var(--paper); border-top: 1px solid var(--line); margin-top: 2rem; }
.big-footer-grid { display: grid; grid-template-columns: 1.4fr 2fr; gap: 3rem; padding: 5rem 0 4rem; align-items: start; }
@media (max-width: 800px) { .big-footer-grid { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; } }
.big-footer-lead { display: flex; flex-direction: column; gap: 1.5rem; }
.big-footer-title {
    margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05;
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); color: var(--black);
    max-width: 18ch; text-wrap: balance;
}
.big-footer-ctas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.big-footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 600px) { .big-footer-links { grid-template-columns: repeat(2, 1fr); } }
.footer-col-title {
    margin: 0 0 1rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 0.7rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.5rem;
}
.footer-col-title::before { content: ""; width: 4px; height: 4px; background: currentColor; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 0.5rem; }
.footer-col a { font-size: 0.9rem; color: var(--ink); transition: color 0.15s var(--ease); }
.footer-col a:hover { color: var(--black); }

.footer-bottom { border-top: 1px solid var(--line); background: var(--soft); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 0; }
.footer-bottom p { margin: 0; }
@media (max-width: 600px) { .footer-bottom-inner { flex-direction: column; align-items: flex-start; } }

.footer-mark { width: 100%; padding: 2.5rem var(--gap) 2rem; display: flex; justify-content: center; background: var(--paper); overflow: hidden; }
.footer-mark svg { width: 100%; max-width: 2400px; height: auto; display: block; }

/* =========================================================
   LOADER + A11Y
   ========================================================= */

#loader {
    position: fixed; inset: 0; background: var(--paper); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s var(--ease);
}
#loader.loaded { opacity: 0; pointer-events: none; }
.loader-mark { animation: loader-pulse 1.5s ease-in-out infinite; width: 48px; height: 48px; }
@keyframes loader-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50%      { opacity: 1;   transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .loader-mark { animation: none; }
}
::selection { background: var(--aur-3); color: #000; }
