/* EXTREME - Web pública / Tienda */
:root {
    --primary: #ff5b00;
    --primary-dark: #ff5b00;
    --primary-soft: #fff5eb;
    /* Botones +/- cantidad (catálogo, modal, carrito flotante) */
    --qty-btn-bg: #171717;
    --qty-btn-hover: #2a2a2a;
    --qty-btn-shadow: rgba(0, 0, 0, 0.35);
    /* Footer / hero oscuros: negro carbón (sin tinte azul marino) */
    --secondary: #0a0a0a;
    --dark: #050505;
    --light: #f8f9fa;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --white: #fff;
}

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

/* Quita brillo azul de toque en móviles (Chrome/Android). */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.tienda-flash-msg {
    margin: 0.5rem 0;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.tienda-flash-msg--error {
    background: #fef2f2;
    color: #991b1b;
}
.tienda-flash-msg--ok {
    background: #ecfdf5;
    color: #065f46;
}

/* ----- Header / Nav ----- */
@keyframes headerGradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes headerShimmerSweep {
    0%   { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
    12%  { opacity: 0.28; }
    50%  { opacity: 0.42; }
    88%  { opacity: 0.22; }
    100% { transform: translateX(220%) skewX(-12deg); opacity: 0; }
}

.site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.24s ease;
    will-change: transform;
}
.site-header-wrap.site-header--hidden {
    transform: translateY(-110%);
}

.site-header {
    position: relative;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.42);
}
/* Degradado animado: negro bajo logo → ola plomo (gris metálico) hacia la derecha */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        #000000 0%,
        #000000 14%,
        #0a0a0a 22%,
        #141414 38%,
        #252525 54%,
        #383838 68%,
        #454545 80%,
        #3a3a3a 92%,
        #1a1a1a 100%
    );
    background-size: 220% 100%;
    animation: headerGradientFlow 11s ease-in-out infinite;
}
/* Brillo plateado que cruza la barra */
.site-header::after {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 42%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(90, 92, 96, 0.06) 35%,
        rgba(120, 122, 126, 0.10) 50%,
        rgba(70, 72, 76, 0.05) 65%,
        transparent 100%
    );
    animation: headerShimmerSweep 7.5s ease-in-out infinite;
}
/* ----- Barra de categorías (bajo el menú) ----- */
.tienda-catbar {
    background: linear-gradient(180deg, #6a6c72 0%, #52545a 55%, #4a4c52 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.tienda-catbar__track {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.55rem;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 36px;
    padding: 0.2rem 0.85rem;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tienda-catbar__track::-webkit-scrollbar { display: none; }
.tienda-catbar__item {
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 1.05rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    border-radius: 5px;
    transition:
        transform 0.22s cubic-bezier(0.21, 0.61, 0.35, 1),
        background 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
}
.tienda-catbar__item span {
    display: inline-block;
    position: relative;
    z-index: 1;
}
.tienda-catbar__item::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.21, 0.61, 0.35, 1);
    opacity: 0.95;
}
.tienda-catbar__item:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.32);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}
.tienda-catbar__item:hover::after {
    transform: scaleX(1);
}
.tienda-catbar__item.is-active {
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.tienda-catbar__item.is-active::after {
    transform: scaleX(1);
}

@media (max-width: 768px) {
    .tienda-catbar__track {
        justify-content: flex-start;
        gap: 0.4rem;
        min-height: 34px;
        padding: 0.18rem 0.5rem;
    }
    .tienda-catbar__item {
        padding: 0.36rem 0.8rem;
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }
    .tienda-catbar__item:hover {
        transform: translateY(-1px) scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tienda-catbar__item,
    .tienda-catbar__item::after {
        transition: none;
    }
    .tienda-catbar__item:hover {
        transform: none;
    }
}

.header-inner {
    position: relative;
    z-index: 2;
    max-width: none !important;
    width: 100% !important;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .site-header::before {
        animation: none;
        background-size: 100% 100%;
        background: linear-gradient(
            90deg,
            #000000 0%,
            #0a0a0a 24%,
            #222222 52%,
            #3a3a3a 82%,
            #454545 100%
        );
    }
    .site-header::after { display: none; }
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

/* Logo menú: brillo sutil (marca naranja) */
.logo-glow-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
}
.logo-glow-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 92%;
    height: 110%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse 65% 50% at 42% 50%,
        rgba(255, 91, 0, 0.14) 0%,
        rgba(255, 91, 0, 0.06) 50%,
        transparent 78%
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
    animation: logoMenuAura 5s ease-in-out infinite;
}
.logo-glow-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: 4px;
    background: linear-gradient(
        105deg,
        transparent 38%,
        rgba(255, 255, 255, 0.06) 48%,
        rgba(255, 200, 140, 0.12) 50%,
        rgba(255, 255, 255, 0.05) 52%,
        transparent 62%
    );
    background-size: 240% 100%;
    background-position: 140% 0;
    mix-blend-mode: soft-light;
    opacity: 0;
    animation: logoMenuShine 7s ease-in-out infinite;
}
@keyframes logoMenuAura {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.85; }
}
@keyframes logoMenuShine {
    0%, 70%, 100% { background-position: 140% 0; opacity: 0; }
    78%, 82%       { background-position: 20% 0; opacity: 0.45; }
}
.logo-link .logo-image {
    position: relative;
    z-index: 1;
    display: block;
    height: 44px;
    width: auto;
    max-width: min(68vw, 340px);
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 91, 0, 0.22));
    transition: filter 0.35s ease;
}
.logo-link:hover .logo-image,
.logo-link:focus-visible .logo-image {
    filter: drop-shadow(0 0 6px rgba(255, 91, 0, 0.38));
}
@media (prefers-reduced-motion: reduce) {
    .logo-glow-wrap::before,
    .logo-glow-wrap::after {
        animation: none;
    }
    .logo-glow-wrap::before {
        opacity: 0.55;
    }
    .logo-link .logo-image {
        filter: drop-shadow(0 0 3px rgba(255, 91, 0, 0.2));
    }
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-main a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-main a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nav-main a.cta-nav {
    background: var(--white);
    color: var(--primary-dark);
}

.nav-main a.cta-nav:hover {
    background: #1a1a1a;
    color: var(--white);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-main {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
    }
    .nav-main.open { display: flex; }
    .nav-main a { text-align: center; padding: 0.65rem 1rem; }
    .header-inner { padding: 0.75rem 1rem; }
    .logo-link .logo-image { height: 36px; max-width: 72vw; }
}

/* ----- Hero ----- */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 2.6rem 1.5rem 3.2rem;
    text-align: center;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

@media (min-height: 820px) {
    .hero {
        padding-top: 3rem;
        padding-bottom: 3.6rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2.2rem 1rem 2.6rem;
    }
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.35rem;
    }
    .hero-buttons {
        gap: 0.75rem;
    }
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ----- About / Quiénes somos ----- */
.about-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(5,5,5,0.82) 0%, rgba(5,5,5,0.70) 45%, rgba(5,5,5,0.88) 100%),
        radial-gradient(900px 520px at 20% 10%, rgba(255, 91, 0, 0.18), transparent 60%),
        radial-gradient(820px 420px at 85% 18%, rgba(255, 255, 255, 0.08), transparent 58%),
        var(--about-hero-bg);
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
}
.about-hero::before {
    content: "";
    position: absolute;
    inset: -2px;
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(255, 91, 0, 0.28), transparent 60%),
        radial-gradient(720px 380px at 85% 20%, rgba(255, 255, 255, 0.10), transparent 55%),
        radial-gradient(620px 520px at 55% 110%, rgba(255, 91, 0, 0.18), transparent 55%);
    pointer-events: none;
}
.about-hero__inner {
    position: relative;
    max-width: 980px;
}
.about-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.about-hero__pill i { color: var(--primary); }
.about-hero__kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 2rem;
    text-align: left;
}
.about-kpi {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0.9rem 0.95rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.about-kpi__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 91, 0, 0.18);
    border: 1px solid rgba(255, 91, 0, 0.28);
    color: #fff;
    flex: 0 0 auto;
}
.about-kpi__title { font-weight: 700; letter-spacing: -0.01em; }
.about-kpi__desc { opacity: 0.92; font-size: 0.92rem; line-height: 1.45; margin-top: 0.1rem; }
.about-section { padding-top: 2.6rem; }
.about-split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
}
.about-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.8rem;
}
.about-h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    margin: 0 0 0.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.about-lead {
    margin: 0;
    color: #334155;
    line-height: 1.7;
    max-width: 60ch;
}
.about-cards {
    margin-top: 1.1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
}
.about-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.05rem;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 0.9rem;
}
.about-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(255, 91, 0, 0.22);
}
.about-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.about-card p { margin: 0; color: #334155; font-size: 0.95rem; line-height: 1.65; }
.about-panel {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.05rem;
}
.about-panel--soft { background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%); }
.about-panel__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.about-panel__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0b0b0b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.about-panel__title { font-weight: 900; letter-spacing: -0.01em; }
.about-panel__subtitle { color: #64748b; font-size: 0.88rem; margin-top: 0.05rem; }
.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.about-list li {
    padding: 0.62rem 0.7rem;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #fafbfc;
    color: #334155;
    line-height: 1.45;
    font-size: 0.94rem;
}
.about-list--values li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
}
.about-list--values li i { color: var(--primary); margin-top: 0.12rem; }
.about-panel__cta {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2e8f0;
    display: grid;
    gap: 0.25rem;
}
.about-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}
.about-cta-link:hover { color: var(--primary-dark); text-decoration: underline; }
.about-cta-sub { color: #64748b; font-size: 0.9rem; line-height: 1.45; }
@media (max-width: 920px) {
    .about-hero__kpis { grid-template-columns: 1fr; }
    .about-split { grid-template-columns: 1fr; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

.btn:focus-visible,
.nav-main a:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); color: var(--white); }

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.8);
}

.btn-outline-light:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* ----- Secciones ----- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* ----- Mis pedidos (cuenta cliente) ----- */
.tienda-pedidos {
    max-width: 920px;
}
.tienda-pedidos__inner {
    margin: 0 auto;
}
.tienda-pedidos__header {
    margin-bottom: 1.15rem;
}
.tienda-pedidos__header h1 {
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.tienda-pedidos__lead {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 42rem;
}
.tienda-pedidos__hint {
    margin: 0 0 1rem;
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.45;
    max-width: 44rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.tienda-pedidos__card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.tienda-pedidos__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tienda-pedidos-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.tienda-pedidos-table thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}
.tienda-pedidos-table .tienda-pedidos__th-total {
    text-align: right;
}
.tienda-pedidos-table .tienda-pedidos__th-pdf {
    text-align: center;
    width: 5.5rem;
}
.tienda-pedidos-table .tienda-pedidos__th-xlsx {
    text-align: center;
    width: 5.5rem;
}
.tienda-pedidos-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text);
}
.tienda-pedidos-table tbody tr:last-child td {
    border-bottom: none;
}
.tienda-pedidos-table tbody tr:hover td {
    background: #fafbfc;
}
.tienda-pedidos__col-num {
    font-weight: 600;
    color: #475569;
    width: 3rem;
}
.tienda-pedidos__col-date {
    font-variant-numeric: tabular-nums;
    color: #334155;
    white-space: nowrap;
}
.tienda-pedidos__col-total {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.tienda-pedidos__col-pdf {
    text-align: center;
    white-space: nowrap;
}
.tienda-pedidos__pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tienda-pedidos__pdf-link:hover {
    background: var(--primary-soft);
    border-color: rgba(255, 91, 0, 0.25);
    color: var(--primary-dark);
}
.tienda-pedidos__pdf-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.tienda-pedidos__col-xlsx {
    text-align: center;
    white-space: nowrap;
}
.tienda-pedidos__xlsx-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: #1d6f42;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tienda-pedidos__xlsx-link:hover {
    background: #ecfdf5;
    border-color: rgba(29, 111, 66, 0.35);
    color: #14532d;
}
.tienda-pedidos__xlsx-link:focus-visible {
    outline: 2px solid #1d6f42;
    outline-offset: 2px;
}
@media (max-width: 420px) {
    .tienda-pedidos__pdf-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .tienda-pedidos__xlsx-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .tienda-pedidos__pdf-link {
        padding: 0.45rem;
        justify-content: center;
    }
    .tienda-pedidos__xlsx-link {
        padding: 0.45rem;
        justify-content: center;
    }
}
.tienda-pedidos-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.tienda-pedidos-badge--muted {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.tienda-pedidos__empty {
    padding: 2.25rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}
.tienda-pedidos__empty p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
.tienda-pedidos__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}
.tienda-pedidos__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid #e2e8f0;
    transition: background 0.2s, border-color 0.2s;
}
.tienda-pedidos__btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text);
}
.tienda-pedidos__footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
    padding: 1rem 1.15rem 1.15rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}
.tienda-pedidos__footer-actions a {
    text-decoration: none;
}
@media (max-width: 520px) {
    .tienda-pedidos__header h1 {
        font-size: 1.35rem;
    }
    .tienda-pedidos-table thead th,
    .tienda-pedidos-table tbody td {
        padding: 0.75rem 0.75rem;
    }
}

/* Grid catálogo: 5 columnas en pantallas amplias */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    width: 100%;
}
@media (max-width: 1200px) {
    .catalog-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

.catalog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin: 1rem auto;
    padding: 0.75rem 1rem;
    max-width: 100%;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
}
.catalog-pagination--top {
    margin-bottom: 1rem;
}
.catalog-pagination--bottom {
    margin-top: 1.5rem;
}
.catalog-pagination__link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
}
.catalog-pagination__link:hover {
    background: #fff8f3;
    border-color: var(--primary);
}
.catalog-pagination__disabled {
    opacity: 0.45;
    padding: 0.5rem 0.75rem;
}
.catalog-pagination__info {
    font-weight: 600;
    color: var(--text);
}

/* Barra A–Z: estilos base tipo panel (catálogo público usa variante horizontal debajo del grid en catalogo.html) */
.catalog-alpha-bar.catalog-alpha-bar--sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0.75rem 0.55rem 0.65rem;
    max-width: 100%;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: center;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid #eef2f5;
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__letters {
    /* Grid 1 columna: evita que los enlaces se repartan en 2 columnas (flex/wrap del navegador). */
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.32rem;
    align-content: start;
    justify-items: stretch;
    max-height: min(52vh, 380px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 2.05rem;
    padding: 0.38rem 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--secondary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #d6dde5;
    background: #fff;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff8f3;
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 91, 0, 0.28);
}
.catalog-alpha-bar--sidebar .catalog-alpha-bar__btn--clear {
    font-weight: 800;
}
@media (max-width: 900px) {
    .catalog-alpha-bar--sidebar .catalog-alpha-bar__letters {
        max-height: min(40vh, 320px);
    }
}
@media (max-width: 640px) {
    .catalog-alpha-bar.catalog-alpha-bar--sidebar {
        padding: 0.55rem 0.45rem 0.5rem;
        margin-top: 0.85rem;
    }
    .catalog-alpha-bar--sidebar .catalog-alpha-bar__btn {
        min-height: 1.85rem;
        font-size: 0.76rem;
    }
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

/* Área fija para la foto: fondo blanco para alinear con fotos de producto */
.product-card__figure {
    width: 100%;
    height: 200px;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    min-width: 0;
}

.product-card__figure img:not(.tienda-caratula--layer) {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    background-color: #fff;
}
.product-card__figure > .product-card__media-frame {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}
.product-card__media-frame picture {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.product-card__media-frame picture img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}
/* Carátula: encima de la foto para que siempre se vea la marca/overlay cargado desde admin. */
.tienda-caratula--layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    z-index: 3;
    opacity: 1;
    mix-blend-mode: multiply;
}
.tienda-caratula {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 1;
    mix-blend-mode: multiply;
}
.product-card__media-frame,
.modal-img-zoom__frame,
.modal-img-lightbox__frame {
    isolation: isolate;
}
.product-card__media-frame > img:not(.tienda-caratula--layer),
.modal-img-zoom__frame > img.modal-detail-product-img,
.modal-img-lightbox__frame > img:first-of-type {
    position: relative;
    z-index: 2;
}

/* Fotos de producto (tienda): dificulta “guardar como” por arrastre y selección.
   No evita capturas de pantalla ni descarga por red (DevTools); la carátula/marca sigue siendo la mejor defensa visual. */
.product-card__media-frame img:not(.tienda-caratula--layer),
.product-card__media-frame picture img,
.modal-img-zoom__frame > img.modal-detail-product-img,
.modal-img-lightbox__frame > img:first-of-type,
.modal-img-lightbox__pan img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}
.product-card__figure .card-media-slot .product-card__media-frame {
    width: 100%;
    height: 100%;
    position: relative;
}
.product-card__figure .card-media-slot {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.product-card__figure .card-media-video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card__figure .card-media-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    min-height: 120px;
}
.product-card__figure .card-media-video--native video {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.product-card__figure .card-media-video-link {
    font-size: 0.8rem;
    text-align: center;
    padding: 0 4px;
}
.product-card__figure .card-media-video-link a {
    color: var(--primary);
    font-weight: 600;
}
.product-card__figure {
    position: relative;
}
.card-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    background: rgba(255, 255, 255, 0.94);
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    opacity: 0.92;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.card-media-nav--prev { left: 8px; }
.card-media-nav--next { right: 8px; }
.product-card:hover .card-media-nav { opacity: 1; transform: translateY(-50%) scale(1.04); }
.card-media-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    display: flex;
    gap: 6px;
    z-index: 4;
}
.card-media-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    background: rgba(107, 114, 128, 0.45);
    cursor: pointer;
    padding: 0;
}
.card-media-dot.is-active {
    background: var(--primary);
}

.product-card__figure .img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    border-radius: 8px;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2.5rem;
}

.product-card .card-body {
    padding: 1.25rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.product-card h3 {
    font-size: 0.85rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    color: var(--text);
    font-weight: 600;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.product-card .medida {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.product-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.45rem;
    line-height: 1.35;
}
.product-card .meta .meta-k {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    margin-right: 0.2rem;
}

.product-card .codigo {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.product-card .precio {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
    line-height: 1.35;
}
.product-card .precio.precio--por-variante {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.01em;
}
.product-card .precio-iva {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.25rem;
    white-space: nowrap;
}

.product-card .stock {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Botón “Visualizar” / “Ver detalles”: ancho completo; margin-top auto alinea el pie entre tarjetas */
.product-card .product-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    padding: 11px 16px;
    font-size: 0.92rem;
    font-weight: 700;
    box-sizing: border-box;
}

/* Stepper de cantidad en tarjeta: mismo pie alineado que el botón de detalle */
.product-card .card-cart-row {
    margin-top: auto;
}

/* Misma barra oscura que el menú (.site-header) — solo tarjetas de catálogo */
.product-card .product-details-btn.btn-primary {
    background: linear-gradient(90deg, #0a0a0a 0%, #252525 100%);
    color: var(--white);
}
.product-card .product-details-btn.btn-primary:hover {
    background: linear-gradient(90deg, #050505 0%, #1a1a1a 100%);
    color: var(--white);
}

/* Filtros catálogo */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.catalog-toolbar input,
.catalog-toolbar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ----- Footer ----- */
.site-footer {
    background: linear-gradient(180deg, #101010 0%, var(--secondary) 55%, #000 100%);
    color: rgba(255,255,255,0.8);
    padding: 2.25rem 1.5rem 0.85rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.1fr;
    gap: 2rem;
    align-items: start;
}
.footer-col { min-width: 180px; }
.footer-brand-logo-wrap {
    display: inline-block;
    line-height: 0;
    margin-bottom: 0.55rem;
    text-decoration: none;
}
.footer-brand-logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: min(150px, 52vw);
    object-fit: contain;
    object-position: left center;
}
.footer-brand-logo-wrap:hover .footer-brand-logo {
    opacity: 0.9;
}
.footer-tagline {
    margin: 0.75rem 0 0;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.76);
    max-width: 22rem;
}
.footer-title {
    font-weight: 800;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.92);
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    text-transform: uppercase;
}
.footer-title--small {
    font-size: 0.82rem;
    margin: 1rem 0 0.45rem;
    opacity: 0.9;
}
.footer-links {
    display: grid;
    gap: 0.45rem;
}
.footer-mini {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.72);
}
.footer-social {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.footer-social__btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.footer-social__btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.footer-contact { display: grid; gap: 0.45rem; }
.footer-contact__row {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}
.footer-contact__row i { color: #25D366; font-size: 1.05rem; }
.footer-hours { margin-top: 0.75rem; }

.footer-inner {
    max-width: none !important;
    width: 100% !important;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-inner a { color: rgba(255,255,255,0.9); text-decoration: none; }
.footer-inner a:hover { color: var(--primary); }

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 0.85rem;
    padding-top: 0.55rem;
    padding-bottom: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.88rem;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    line-height: 1.35;
}
.footer-copy__line {
    font-size: 0.88rem;
    opacity: 0.9;
    margin: 0;
}
.footer-copy__credit {
    margin: 0;
    font-size: 0.72rem;
}
.footer-copy a.footer-copy__credit--link {
    font-size: 0.72rem;
    opacity: 0.7;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-weight: 500;
}
.footer-copy a.footer-copy__credit--link:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}

/* ===== Global Mobile Responsiveness ===== */
@media (max-width: 600px) {
    .section {
        padding: 1.5rem 0.75rem;
    }
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    .hero {
        padding: 2.5rem 1rem 3rem;
    }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .hero-buttons { gap: 0.75rem; }
    .hero-buttons .btn { padding: 10px 18px; font-size: 0.9rem; width: 100%; justify-content: center; }
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .product-card__figure { height: 160px; padding: 8px; }
    .product-card .card-body { padding: 10px; }
    .product-card h3 { font-size: 0.78rem; }
    .product-card .medida { font-size: 0.85rem; }
    .product-card .meta { font-size: 0.75rem; }
    .site-footer { padding: 1.35rem 1rem 0.75rem; margin-top: 2rem; }
    .footer-inner { flex-direction: column; gap: 1rem; text-align: center; font-size: 0.85rem; }
    .footer-copy { font-size: 0.8rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: left; }
    .footer-col { min-width: 0; }
    .footer-social { justify-content: flex-start; }
}

@media (max-width: 380px) {
    .catalog-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    .section { padding: 1rem 0.5rem; }
}

/* ===== Compact mode (móvil): menos espacios en TODA la tienda ===== */
@media (max-width: 520px) {
    body {
        font-size: 14px;
        line-height: 1.45;
    }

    .header-inner {
        padding: 0.65rem 0.85rem;
        gap: 0.75rem;
    }

    .hero {
        padding: 2.6rem 1rem 3rem;
    }
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.35rem;
    }

    .section {
        padding: 1.25rem 0.85rem;
    }
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    input, select, textarea {
        font-size: 0.95rem;
    }

    /* Tablas en móvil: scroll horizontal */
    .tienda-pedidos__table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tienda-pedidos-table {
        min-width: 620px;
    }
    .tienda-pedidos-table thead th,
    .tienda-pedidos-table tbody td {
        padding: 0.6rem 0.65rem;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    /* Cards más compactas */
    .tienda-pedidos__card {
        padding: 0.9rem;
        border-radius: 14px;
    }
}

/* Modal detalle producto (catálogo público) */
.product-card--clickable {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card--clickable:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.product-card--clickable .card-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Selector cantidad — stepper suave: pastilla neutra + botones circulares naranja */
.card-cart-row {
    display: grid;
    grid-template-columns: 36px minmax(44px, 1fr) 36px;
    align-items: center;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0.65rem;
    padding: 4px 8px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 3px rgba(15, 23, 42, 0.06);
}
.card-cart-row--modal {
    max-width: min(100%, 320px);
    width: 100%;
}
/* Stepper en filas de variantes: ancho fijo cómodo (no se aplasta con nombre largo) */
.modal-variants-list .modal-variant-line .card-cart-row--modal {
    max-width: 200px;
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    grid-template-columns: 42px 56px 42px;
    gap: 8px;
    padding: 6px 10px;
    margin-top: 0;
    box-sizing: border-box;
}
.modal-variants-list .modal-variant-line .card-cart-row--modal .card-qty-btn {
    width: 42px;
    height: 42px;
    font-size: 1.12rem;
}
.modal-variants-list .modal-variant-line .card-cart-row--modal .card-qty-input {
    min-width: 48px;
    max-width: 64px;
    min-height: 34px;
    padding: 4px 6px;
    font-size: 0.95rem;
}
.card-qty-btn {
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    justify-self: center;
    background: var(--qty-btn-bg);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 6px var(--qty-btn-shadow);
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.card-qty-btn:hover:not(:disabled) {
    background: var(--qty-btn-hover);
    color: #fff;
    box-shadow: 0 3px 10px var(--qty-btn-shadow);
}
.card-qty-btn:active:not(:disabled) {
    transform: scale(0.96);
}
/* Deshabilitado: gris neutro (no naranja “apagado”) para no chocar con el + */
.card-qty-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}
.card-qty-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 2.5rem;
    min-height: 30px;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    padding: 3px 8px;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card-qty-input::-webkit-outer-spin-button,
.card-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.card-qty-input:focus {
    border-color: rgba(255, 91, 0, 0.55);
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.04),
        0 0 0 3px rgba(255, 91, 0, 0.22);
}
.modal-cantidad-pedido {
    margin: 0.65rem 0 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
/* Producto sin variantes: mismo criterio de tamaño que el stepper por variante */
.modal-cantidad-pedido--compact {
    margin-top: 0.85rem;
}
.modal-cantidad-pedido--compact .card-cart-row--modal-single {
    max-width: 200px;
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    grid-template-columns: 42px 56px 42px;
    gap: 8px;
    padding: 6px 10px;
    margin-top: 0.35rem;
    box-sizing: border-box;
}
.modal-cantidad-pedido--compact .card-qty-btn--sm {
    width: 42px;
    height: 42px;
    font-size: 1.12rem;
}
.modal-cantidad-pedido--compact .card-qty-input--sm {
    min-width: 48px;
    max-width: 64px;
    min-height: 34px;
    padding: 4px 6px;
    font-size: 0.95rem;
}
.modal-cantidad-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.modal-cantidad-hint {
    margin: 0 0 0.45rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.modal-cantidad-hint strong {
    color: var(--primary);
}

.modal-variants-list {
    margin-top: 0.6rem;
    border-top: 1px solid var(--border);
    padding-top: 0.55rem;
}

.modal-variants-top-hint {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
}

.modal-variants-empty {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}

.modal-variant-line {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-variant-line__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.modal-variant-line__sku {
    font-size: 0.82rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.modal-variant-line__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.35;
}

.modal-variant-line__price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-variant-line__pres-vol {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.3;
}

.modal-variant-line__stock {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .modal-variant-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(200px, 200px);
        gap: 12px 14px;
        align-items: start;
    }
    .modal-variant-line .modal-variant-line__meta {
        grid-column: 1;
    }
    .modal-variant-line .card-cart-row--modal {
        grid-column: 2;
        margin-left: 0;
        margin-right: 0;
        justify-self: end;
    }
}

@media (max-width: 639px) {
    .modal-variants-list .modal-variant-line .card-cart-row--modal {
        width: 200px;
        max-width: 100%;
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
    }
}

.floating-pedido {
    position: fixed;
    z-index: 1800;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}
.floating-pedido > * {
    pointer-events: auto;
}
.floating-pedido__fab-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.floating-pedido__fab-total {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    background: var(--qty-btn-bg);
    padding: 5px 9px;
    border-radius: 10px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.22);
    max-width: min(calc(100vw - 40px), 200px);
    white-space: nowrap;
    line-height: 1.2;
    text-align: right;
}
/* display:flex del contenedor anula el atributo HTML hidden; forzar oculto al cerrar */
.floating-pedido[hidden],
#floatingPedido[hidden] {
    display: none !important;
}
.floating-pedido__panel[hidden] {
    display: none !important;
}
.floating-pedido__fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, var(--primary), #e55a00);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 8px 24px rgba(255, 91, 0, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.floating-pedido__fab:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(255, 91, 0, 0.5);
}
.floating-pedido__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}
.floating-pedido__panel {
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 420px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
.floating-pedido__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.floating-pedido__title {
    font-weight: 700;
    font-size: 0.95rem;
}
.floating-pedido__close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
}
.floating-pedido__close:hover {
    background: rgba(0, 0, 0, 0.06);
}
.floating-pedido__list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}
.floating-pedido__empty {
    margin: 0;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.floating-pedido__line {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
    min-width: 0;
    max-width: 100%;
}
.floating-pedido__line:last-child {
    border-bottom: none;
}
.floating-pedido__line-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.2rem;
}
.floating-pedido__line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.floating-pedido__line-thumb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.floating-pedido__line-thumb-link:focus-visible {
    outline: 2px solid var(--primary, #ff7a00);
    outline-offset: 2px;
    border-radius: 6px;
}
.floating-pedido__line-body {
    min-width: 0;
    max-width: 100%;
}
.floating-pedido__line-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.floating-pedido__line-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}
.floating-pedido__remove {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.floating-pedido__remove:hover {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
}
.floating-pedido__remove:active {
    background: rgba(185, 28, 28, 0.14);
}
.floating-pedido__line-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.floating-pedido__line-controls {
    display: grid;
    grid-template-columns: 36px minmax(36px, 1fr) 36px;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 7px;
    width: 100%;
    max-width: 210px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 3px rgba(15, 23, 42, 0.06);
}
.floating-pedido__line-controls .card-qty-btn {
    width: 32px;
    height: 32px;
    min-height: unset;
    font-size: 1rem;
}
.floating-pedido__line-controls .card-qty-input {
    min-height: 30px;
    font-size: 0.82rem;
    padding: 3px 6px;
    border-radius: 9px;
}
.floating-pedido__line-sub {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    align-self: start;
    padding-top: 2px;
    white-space: nowrap;
    justify-self: end;
    text-align: right;
}
.floating-pedido__footer {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}
.floating-pedido__totals-stack {
    margin-bottom: 8px;
}
.floating-pedido__total--sin {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 4px;
    line-height: 1.3;
}
.floating-pedido__total--con {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}
.floating-pedido__actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 4px;
}
.floating-pedido__btn {
    flex: 1 1 0;
    min-height: 42px;
    padding: 10px 10px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}
.floating-pedido__btn--primary {
    border: none;
    background: linear-gradient(145deg, var(--primary), #e55a00);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 91, 0, 0.42);
}
.floating-pedido__btn--primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 91, 0, 0.52);
}
.floating-pedido__btn--clear {
    background: #fff;
    color: #b91c1c;
    border: 2px solid #f87171;
    box-shadow: 0 2px 10px rgba(185, 28, 28, 0.14);
}
.floating-pedido__btn--clear:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}
/* Modal confirmación vaciar pedido (centrado, no dentro del panel) */
.floating-pedido-clear-modal {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}
.floating-pedido-clear-modal[hidden] {
    display: none !important;
}
body.floating-pedido-clear-modal-open {
    overflow: hidden;
}
.floating-pedido-clear-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 35, 0.5);
    cursor: pointer;
}
.floating-pedido-clear-modal__box {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 14px;
    padding: 1.15rem 1.1rem 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    border: 1px solid #e2e8f0;
}
.floating-pedido-clear-modal__title {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    text-align: center;
}
.floating-pedido-clear-modal__actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.floating-pedido-clear-modal__btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.floating-pedido-clear-modal__btn--no {
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #475569;
}
.floating-pedido-clear-modal__btn--no:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}
.floating-pedido-clear-modal__btn--yes {
    border: none;
    background: linear-gradient(145deg, #b91c1c, #991b1b);
    color: #fff;
    box-shadow: 0 3px 12px rgba(185, 28, 28, 0.35);
}
.floating-pedido-clear-modal__btn--yes:hover {
    filter: brightness(1.05);
}
@media (min-width: 860px) {
    .modal-cantidad-pedido {
        margin-top: 0.4rem;
    }
}
.product-modal[hidden] {
    display: none !important;
}
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.product-modal-backdrop {
    position: absolute;
    inset: 0;
    /* Un poco más claro: el catálogo detrás sigue legible (no “siluetas” ilegibles). */
    background: rgba(15, 15, 35, 0.42);
    cursor: pointer;
}
.product-modal-dialog {
    position: relative;
    background: var(--white);
    border-radius: 14px;
    max-width: 940px;
    width: 100%;
    max-height: min(92vh, 900px);
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}
.product-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
    z-index: 2;
}
.product-modal-close:hover {
    background: rgba(255, 91, 0, 0.15);
    color: var(--primary);
}
.product-modal-inner {
    padding: 1.1rem 1rem 0.95rem;
}

/* Invitados: CTA punto de venta + WhatsApp (modal producto) */
.modal-pdv-cta {
    margin: 0.55rem 0 1.05rem;
    padding: 1rem 1rem 1.05rem;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 91, 0, 0.09) 0%, rgba(0, 0, 0, 0.05) 55%, rgba(255, 91, 0, 0.05) 100%);
    border: 1px solid rgba(255, 91, 0, 0.22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.modal-pdv-cta__lead {
    margin: 0 0 0.85rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}
.modal-pdv-cta__lead .fas {
    color: var(--primary);
    margin-top: 0.12rem;
    flex-shrink: 0;
}
.modal-pdv-cta__wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.7rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    background: #25d366;
    color: var(--white) !important;
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.38);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.modal-pdv-cta__wa:hover {
    background: #1ebe57;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.48);
}
.modal-pdv-cta__wa .fab {
    font-size: 1.25rem;
}

/* Desktop/tablet ancho: imagen izquierda + contenido derecha */
@media (min-width: 860px) {
    .product-modal-inner {
        display: grid;
        grid-template-columns: minmax(360px, 46%) minmax(0, 1fr);
        column-gap: 1.25rem;
        align-items: start;
    }
    .product-modal-inner > .modal-img-zoom,
    .product-modal-inner > .modal-placeholder {
        grid-column: 1;
        grid-row: 1 / span 12;
        margin-bottom: 0;
        position: sticky;
        top: 0;
    }
    .product-modal-inner > h2,
    .product-modal-inner > .modal-codigo,
    .product-modal-inner > p,
    .product-modal-inner > dl,
    .product-modal-inner > .modal-gift-hint,
    .product-modal-inner > .modal-volume-hint,
    .product-modal-inner > .modal-precio,
    .product-modal-inner > .modal-stock,
    .product-modal-inner > .modal-variants-top-hint,
    .product-modal-inner > .modal-cantidad-pedido,
    .product-modal-inner > .modal-variants-list,
    .product-modal-inner > .modal-rel-wrap,
    .product-modal-inner > .modal-pdv-cta {
        grid-column: 2;
    }
}
@media (min-width: 860px) {
    .product-modal-inner .modal-img-zoom__viewport {
        height: 400px;
    }
}
@media (max-width: 859px) {
    .product-modal-inner .modal-img-zoom__viewport {
        height: clamp(240px, 52vh, 360px);
    }
    .product-modal {
        padding: 0.65rem;
    }
    .product-modal-inner {
        padding: 0.85rem 0.75rem 1rem;
    }
}
/* Miniatura en modal de detalle: clic abre vista grande (zoom solo allí) */
.modal-img-zoom {
    margin-bottom: 1rem;
    position: relative;
}
.modal-img-zoom__viewport {
    overflow: hidden;
    height: 280px;
    background: #fff;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    outline: none;
}
.modal-img-fallback {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
    background: #fafafa;
    border-radius: 8px;
}
.modal-img-zoom__viewport:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 91, 0, 0.45);
}
.modal-img-zoom__inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-img-zoom__inner .modal-img-zoom__frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    line-height: 0;
}
.modal-img-zoom--video-active .modal-img-zoom__viewport {
    cursor: default;
}
/* auto + max: evita salto de escala al decodificar (antes 100%×100% forzaba caja y luego object-fit “corría”). */
.modal-img-zoom__inner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    vertical-align: middle;
}
.modal-media-nav {
    position: absolute;
    top: 110px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.94);
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
}
.modal-media-nav--prev { left: 8px; }
.modal-media-nav--next { right: 8px; }
.modal-media-nav:hover { background: #fff; color: var(--primary); }
.modal-media-thumbs {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.modal-media-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.modal-media-thumb.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 91, 0, 0.18);
}
.modal-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.modal-media-thumb__video {
    color: #4b5563;
    font-size: 0.95rem;
}
.modal-media-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin-top: 8px;
}
@media (max-width: 640px) {
    .modal-media-nav { top: 90px; }
}
.modal-media-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: #d1d5db;
    cursor: pointer;
    padding: 0;
}
.modal-media-dot.is-active {
    background: var(--primary);
}
.modal-video-wrap {
    width: 100%;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #0a0a0a;
    aspect-ratio: 16 / 9;
    position: relative;
}
.modal-video-wrap iframe {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.modal-img-zoom__inner .modal-video-wrap {
    height: 100%;
    aspect-ratio: auto;
    border-radius: 8px;
}
.modal-video-wrap--native {
    aspect-ratio: auto;
    background: #000;
}
.modal-video-wrap--native video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
}
.modal-video-link {
    margin: 0;
    font-size: 0.95rem;
}
.modal-video-link a {
    color: var(--primary);
    font-weight: 600;
}
/* Vista solo imagen a pantalla completa: rueda = zoom, arrastrar = mover */
.modal-img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
}
.modal-img-lightbox[hidden] {
    display: none !important;
}
.modal-img-lightbox__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(10, 10, 22, 0.92);
    cursor: default;
}
.modal-img-lightbox__tip {
    position: absolute;
    top: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    max-width: min(96vw, 520px);
    padding: 0 3rem;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    pointer-events: none;
}
.modal-img-lightbox__tip-mobile {
    display: none;
}
@media (max-width: 768px) {
    .modal-img-lightbox__tip-desktop {
        display: none;
    }
    .modal-img-lightbox__tip-mobile {
        display: inline;
    }
    .modal-img-lightbox__tip {
        font-size: 0.68rem;
        padding: 0 2.5rem;
    }
}
.modal-img-lightbox__stage {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    width: 100%;
    margin-top: 3.25rem;
    padding: 0 0.75rem 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    box-sizing: border-box;
}
.modal-img-lightbox__stage--dragging {
    cursor: grabbing;
}
.modal-img-lightbox__stage--zoomed {
    cursor: grab;
}
.modal-img-lightbox__pan {
    transform-origin: center center;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-img-lightbox__frame {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: min(96vw, 100%);
    max-height: min(78vh, 78dvh);
}
.modal-img-lightbox__frame img {
    max-width: min(96vw, 100%);
    max-height: min(78vh, 78dvh);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}
.modal-img-lightbox__frame > img:not(.tienda-caratula--layer) {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}
.modal-img-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #333;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}
.modal-img-lightbox__close:hover {
    background: #fff;
    color: var(--primary);
}
body.modal-img-lightbox-open {
    overflow: hidden;
}

.product-modal-inner h2 {
    font-size: 1.08rem;
    color: var(--qty-btn-bg);
    margin-bottom: 0.3rem;
    line-height: 1.25;
    padding-right: 2rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.product-modal-inner .modal-codigo {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}
.product-modal-inner .modal-gift-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0 0 0.5rem;
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.28;
}
.product-modal-inner .modal-gift-hint__tag {
    flex-shrink: 0;
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-modal-inner .modal-gift-hint__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.product-modal-inner .modal-volume-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0 0 0.5rem;
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.28;
}
.product-modal-inner .modal-volume-hint__tag {
    flex-shrink: 0;
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-modal-inner .modal-volume-hint__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.product-modal-inner dl {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
}
.product-modal-inner .modal-block-dl {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}
.product-modal-inner dt {
    font-weight: 600;
    color: var(--secondary);
    margin-top: 0.45rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.product-modal-inner .modal-block-dl dt {
    margin-top: 0;
    flex: 0 0 auto;
}
.product-modal-inner .modal-block-dl:first-of-type {
    margin-top: 0.45rem;
}
.product-modal-inner dd {
    margin: 0.16rem 0 0;
    color: var(--text-muted);
    line-height: 1.3;
}
.product-modal-inner .modal-block-dl dd {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.product-modal-inner .modal-medidas-line {
    margin: 0.55rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.product-modal-inner .modal-medidas-line strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.12rem;
}
.product-modal-inner .modal-motos-pantro-list {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}
.product-modal-inner .modal-motos-pantro {
    position: relative;
}
.product-modal-inner .modal-motos-pantro-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 8;
    width: min(420px, 92vw);
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    padding: 8px 10px 10px;
}
.product-modal-inner .modal-motos-pantro-list li {
    margin: 0.2rem 0;
}
.product-modal-inner .modal-moto-tipo {
    font-size: 0.88em;
    opacity: 0.92;
}
.product-modal-inner .modal-precio {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.35rem;
}
.product-modal-inner .modal-stock {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.18rem;
}

.product-modal-inner .modal-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
body.modal-open {
    overflow: hidden;
}

.modal-rel-wrap {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
}
.modal-rel-titulo {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}
.modal-rel-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}
.modal-rel-lista li {
    margin-bottom: 0.35rem;
}
.modal-rel-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--light);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.modal-rel-btn:hover {
    border-color: var(--primary);
    background: #fff8f3;
}
.modal-rel-cod {
    font-weight: 600;
    color: var(--primary);
}
.modal-rel-med {
    color: var(--text-muted);
}
.modal-rel-pre {
    float: right;
    font-weight: 600;
    color: var(--text);
}
