/* Tienda SANTOS — shell visual retail con paleta Equipo Médico Santos */
:root {
    --brand-blue: #003366;
    --brand-orange: #F26A21;
    --brand-green: #2f855a;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-400: #a0aec0;
    --gray-600: #718096;
    --gray-800: #2d3748;
    --bg-body: #F4F8FB;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --shadow-soft: 0 10px 30px rgba(0, 51, 102, 0.08);
    --shadow-card: 0 1px 4px rgba(0, 51, 102, 0.1);
    --border-color: #edf2f7;
    --border-light: #edf2f7;
    --promo: #F26A21;
    --success: #003366;
    --danger: #003366;
    --header-h: 72px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-body);
    margin: 0;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 48px;
    flex-grow: 1;
    width: 100%;
}

/* ——— Top bar + header ——— */
.tienda-header-shell {
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 51, 102, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.tienda-topbar {
    background: linear-gradient(90deg, var(--brand-blue) 0%, #004d8c 55%, #005a9e 100%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    padding: 7px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.tienda-topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.tienda-topbar a:hover { color: var(--brand-orange); }
.topbar-tagline { font-weight: 600; }
.topbar-user { font-weight: 700; color: #fff; }
.topbar-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-left: auto; white-space: nowrap; }
.topbar-links a { color: #fff; font-weight: 600; text-decoration: none; font-size: 12px; }
.topbar-links a:hover { color: var(--brand-orange); }
.topbar-sep { opacity: 0.4; margin: 0 2px; font-weight: 400; }
.topbar-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-tienda {
    background: #fff;
    color: var(--text-main);
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 3px solid var(--brand-orange);
    min-height: var(--header-h);
}
.header-tienda .brand {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.header-tienda .logo-box {
    background: linear-gradient(145deg, #fff 0%, #f0f7ff 100%);
    padding: 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    border: 2px solid var(--brand-blue);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.12);
}
.header-tienda .logo-box img { height: 44px; width: 44px; object-fit: contain; border-radius: 6px; }
.header-tienda .brand-text-container { display: flex; flex-direction: column; }
.header-tienda .brand-title { font-size: 17px; font-weight: 800; line-height: 1.15; margin: 0; color: var(--brand-blue); }
.header-tienda .brand-slogan { font-size: 10px; font-weight: 700; color: var(--brand-orange); text-transform: uppercase; letter-spacing: 0.8px; margin: 0; }

.header-search {
    flex: 1;
    max-width: 560px;
    display: flex;
    align-items: stretch;
    border: 2px solid #dbe4ef;
    border-radius: 8px;
    overflow: visible;
    background: #f8fafc;
    min-width: 200px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.header-search:focus-within {
    border-color: var(--brand-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}
.header-search input {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    min-height: 44px;
}
.header-search button {
    background: linear-gradient(180deg, var(--brand-orange) 0%, #e05a15 100%);
    color: #fff;
    border: none;
    padding: 0 22px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s;
}
.header-search button:hover { background: linear-gradient(180deg, #c05621 0%, #a84a18 100%); color: #fff; }
.header-search-suggestions {
    position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 1100;
    border: 1px solid var(--brand-blue); background: #fff; border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow-card); max-height: 320px; overflow-y: auto;
}
.header-search-suggestions[hidden] { display: none !important; }
.header-search-suggestions .sug-item {
    padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border-light);
    font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.header-search-suggestions .sug-item:hover { background: #ebf8ff; color: var(--brand-blue); }
.header-search-suggestions .sug-item .sug-name { font-weight: 600; }
.header-search-suggestions .sug-item .sug-meta { color: var(--gray-600); font-size: 11px; font-weight: 700; }

.header-tienda .nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.header-tienda .nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.header-tienda .nav-links a:hover { background: #ebf8ff; color: var(--brand-blue); }
.header-tienda .btn-carrito {
    background: var(--brand-orange);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: none;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.header-tienda .btn-carrito:hover { background: #c05621; color: #fff !important; transform: none; }
.header-tienda .btn-coti-nav {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--brand-blue) !important;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.header-tienda .btn-coti-nav:hover { background: #ebf8ff; border-color: var(--brand-blue); color: var(--brand-blue) !important; }
.header-tienda .user-greeting { color: var(--brand-blue); font-weight: 700; border-right: 1px solid var(--border-light); padding-right: 12px; }
.header-tienda.header-tienda-minimal {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 51, 102, 0.12);
    justify-content: center;
    border-bottom: 3px solid var(--brand-orange);
}
.header-tienda .logout-link { color: var(--brand-orange) !important; }
.header-tienda .logout-link:hover { background: #fff4ed !important; color: #c05621 !important; }

/* ——— Menú tipo catálogo (categorías) ——— */
.tienda-catalog-nav {
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(0, 51, 102, 0.06);
    z-index: 900;
}
.catalog-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 52px;
}
.catalog-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.catalog-menu-btn:hover,
.tienda-catalog-nav.is-open .catalog-menu-btn { background: var(--brand-orange); }
.catalog-menu-caret { font-size: 11px; }
/* Sin scroll lateral: las categorías se acomodan en varias líneas */
.catalog-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 0;
    flex: 1;
    min-width: 0;
}
.container > .catalog-chips { margin-bottom: 20px; flex: none; width: 100%; }
.catalog-chip {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    background: var(--gray-100);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.catalog-chip:hover { background: #ebf8ff; border-color: var(--brand-blue); color: var(--brand-blue); }
.catalog-chip.is-active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.catalog-mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 3px solid var(--brand-orange);
    box-shadow: 0 18px 40px rgba(0, 51, 102, 0.18);
    z-index: 950;
}
.catalog-mega-head {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--brand-blue);
    font-size: 15px;
    font-weight: 900;
}
.catalog-mega-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
}
.catalog-mega-close:hover { color: var(--brand-orange); }
.catalog-mega-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    align-items: start;
}
.catalog-mega-cats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 4px;
}
.catalog-mega-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.catalog-mega-item:hover,
.catalog-mega-item.is-hovered { background: #ebf8ff; border-color: var(--brand-blue); color: var(--brand-blue); }
.catalog-mega-item.is-active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.catalog-mega-item.is-active .catalog-mega-count { background: rgba(255,255,255,0.2); color: #fff; }
.catalog-mega-count {
    background: #e2e8f0;
    color: var(--gray-600);
    border-radius: 99px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
.catalog-mega-prods {
    max-height: 62vh;
    overflow-y: auto;
    border-left: 1px solid var(--border-light);
    padding-left: 16px;
}
.catalog-mega-prodgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 6px;
}
.catalog-mega-prod {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.catalog-mega-prod:hover { background: #ebf8ff; border-color: var(--brand-blue); }
.catalog-mega-prod img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
}
.catalog-mega-prodname {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-mega-prodprice {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-blue);
    white-space: nowrap;
    flex-shrink: 0;
}
.catalog-mega-vertodo {
    display: inline-block;
    margin-top: 12px;
}

/* ——— Hero / banner carrusel (full-bleed) ——— */
/* Altura = imagen activa (width 100% / height auto). Sin perspective/3D
   en el contenedor: en Chrome/Safari recortaba el borde inferior. */
.tienda-banner-carousel {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    border-radius: 0;
    overflow: hidden;
    height: auto;
    box-shadow: 0 8px 28px rgba(0, 51, 102, 0.16);
    background: var(--brand-blue);
}
.banner-track {
    position: relative;
    width: 100%;
    line-height: 0;
}
.banner-slide {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    line-height: 0;
}
.banner-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 3;
}
.banner-slide.is-leaving {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.banner-slide-bg {
    display: block;
    width: 100%;
    aspect-ratio: 1920 / 420;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.banner-slide-img {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: top;
}
.banner-slide-bg-default {
    background: linear-gradient(125deg, #003366 0%, #004d8c 45%, #005a9e 70%, #F26A21 140%);
}
.banner-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(0,20,45,0.82) 0%, rgba(0,51,102,0.45) 45%, rgba(0,51,102,0.15) 100%);
}
.banner-slide-shine {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    transform: translateX(-120%);
    animation: bannerShine 5s ease-in-out infinite;
}
@keyframes bannerShine {
    0%, 70% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

/* Efectos 2D (sin rotateX/Y: evitaban ver el borde inferior) */
.banner-slide.fx-cube-in { animation: bannerSlideIn 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.banner-slide.fx-cube-out { animation: bannerSlideOut 1.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes bannerSlideIn {
    0%   { opacity: 0; transform: translateX(12%); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes bannerSlideOut {
    0%   { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-10%); }
}

.banner-slide.fx-appear-in { animation: bannerAppearIn 1.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.banner-slide.fx-appear-out { animation: bannerAppearOut 1.4s ease-in forwards; }
@keyframes bannerAppearIn {
    0%   { opacity: 0; filter: blur(12px); }
    100% { opacity: 1; filter: blur(0); }
}
@keyframes bannerAppearOut {
    0%   { opacity: 1; filter: blur(0); }
    100% { opacity: 0; filter: blur(10px); }
}

.banner-slide.fx-diagonal-in { animation: bannerDiagonalIn 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.banner-slide.fx-diagonal-out { animation: bannerDiagonalOut 1.5s ease-in forwards; }
@keyframes bannerDiagonalIn {
    0%   { opacity: 1; clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
    100% { opacity: 1; clip-path: inset(0); }
}
@keyframes bannerDiagonalOut {
    0%   { opacity: 1; clip-path: inset(0); }
    100% { opacity: 0; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
}

.banner-slide.fx-flip-in { animation: bannerRiseIn 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.banner-slide.fx-flip-out { animation: bannerRiseOut 1.5s ease-in forwards; }
@keyframes bannerRiseIn {
    0%   { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes bannerRiseOut {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-14px); }
}

.banner-slide-content {
    position: absolute; z-index: 3; left: 0; right: 0; top: 0; bottom: 0;
    padding: 48px 40px 56px;
    max-width: 620px; color: #fff;
    box-sizing: border-box;
    pointer-events: none;
    line-height: normal;
}
.banner-slide-content a { pointer-events: auto; }
.banner-slide.is-active .banner-slide-content {
    animation: bannerTextIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
@keyframes bannerTextIn {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
.banner-slide-title {
    margin: 0 0 10px; font-size: clamp(26px, 4vw, 36px); font-weight: 900;
    line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.banner-slide-sub {
    margin: 0 0 16px; font-size: clamp(14px, 2vw, 17px); font-weight: 600;
    opacity: 0.95; line-height: 1.5;
}
.banner-slide-badge {
    display: inline-block; background: rgba(242, 106, 33, 0.92); color: #fff;
    padding: 10px 18px; border-radius: 4px; font-size: 13px; font-weight: 800;
    border: 1px solid rgba(255,255,255,0.25); margin-bottom: 12px;
}
.banner-slide-cta {
    display: inline-block; margin-top: 8px; background: #fff; color: var(--brand-blue);
    padding: 12px 24px; border-radius: 4px; font-weight: 800; text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.banner-slide-cta:hover { background: var(--brand-orange); color: #fff; }
.banner-controls {
    position: absolute; bottom: 16px; left: 0; right: 0; z-index: 5;
    display: flex; align-items: center; justify-content: center; gap: 14px;
}
.banner-nav {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.2); color: #fff; font-size: 16px; cursor: pointer;
    backdrop-filter: blur(4px); transition: background 0.15s;
}
.banner-nav:hover { background: var(--brand-orange); }
.banner-dots { display: flex; gap: 8px; }
.banner-dot {
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7);
    background: transparent; padding: 0; cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.banner-dot.is-active { background: var(--brand-orange); border-color: var(--brand-orange); transform: scale(1.15); }
.banner-progress {
    position: absolute; bottom: 0; left: 0; right: 0; height: 4px; z-index: 5;
    background: rgba(255,255,255,0.2);
}
.banner-progress-bar {
    height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-orange), #fff);
    animation: bannerProgress 9s linear infinite;
}
@keyframes bannerProgress { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
    .banner-slide.fx-cube-in,
    .banner-slide.fx-cube-out,
    .banner-slide.fx-appear-in,
    .banner-slide.fx-appear-out,
    .banner-slide.fx-diagonal-in,
    .banner-slide.fx-diagonal-out,
    .banner-slide.fx-flip-in,
    .banner-slide.fx-flip-out {
        animation: none !important;
    }
    .banner-slide.is-active { opacity: 1; transform: none; filter: none; clip-path: none; }
}

.header-tools {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.header-moneda-select {
    height: 38px; padding: 0 10px; border: 2px solid var(--brand-blue); border-radius: 4px;
    font-size: 13px; font-weight: 700; color: var(--brand-blue); background: #fff;
    min-width: 130px; font-family: inherit;
}
.header-ofertas-chk {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    color: var(--brand-orange); cursor: pointer; white-space: nowrap;
    background: #fff4ed; padding: 8px 12px; border-radius: 4px;
    border: 2px dashed #f5c9a8; margin: 0;
}
.header-ofertas-chk input { accent-color: var(--brand-orange); width: 15px; height: 15px; }

/* ——— Koala oculto en tienda ——— */
.tienda-koala,
.carrito-koala,
.rastreo-koala,
.auth-koala,
.catalog-koala-row { display: none !important; }
.koala-wrap,
.filter-wrapper.koala-wrap,
.rastreo-wrap.koala-wrap,
.carrito-koala-wrap.koala-wrap,
.auth-container.koala-wrap,
.page-koala-wrap.koala-wrap { margin-top: 0 !important; }

/* ——— Hero legacy (removido del catálogo) ——— */
.tienda-hero {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #004d8c 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: 4px;
    margin: 24px 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.tienda-hero h1 { margin: 0; font-size: 26px; font-weight: 800; }
.tienda-hero p { margin: 6px 0 0; opacity: 0.9; font-size: 14px; font-weight: 500; }
.tienda-hero-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
}

.catalog-meta {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin: 20px 0 16px;
}
.catalog-meta strong { color: var(--brand-blue); }
.catalog-meta .btn-filter-clear { margin-left: 12px; font-size: 13px; }

.catalog-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 16px; margin: 16px 0 0; padding: 14px 18px;
    background: #fff; border: 1px solid var(--border-light); border-radius: 4px;
}
.toolbar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.toolbar-moneda { display: flex; align-items: center; gap: 10px; }
.toolbar-label {
    font-size: 11px; font-weight: 800; color: var(--gray-600);
    text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap;
}
.toolbar-select {
    height: 40px; padding: 0 12px; border: 2px solid var(--brand-blue); border-radius: 4px;
    font-size: 14px; font-weight: 700; color: var(--brand-blue); background: #fff;
    min-width: 150px;
}
.toolbar-ofertas {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
    color: var(--brand-orange); cursor: pointer; height: 40px;
    background: #fff4ed; padding: 0 16px; border-radius: 4px;
    border: 2px dashed #f5c9a8; margin: 0; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.toolbar-ofertas:hover { background: #ffe8d9; border-color: var(--brand-orange); }
.toolbar-ofertas input { accent-color: var(--brand-orange); width: 16px; height: 16px; }
.catalog-empty-live {
    grid-column: 1 / -1; text-align: center; padding: 60px 20px;
    background: var(--card-bg); border-radius: 4px; border: 1px solid var(--border-light);
}
.catalog-empty-live[hidden] { display: none !important; }

/* ——— Página de categoría (estilo colección) ——— */
.collection-breadcrumb {
    margin: 18px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.collection-breadcrumb a { color: var(--brand-blue); text-decoration: none; }
.collection-breadcrumb a:hover { text-decoration: underline; }
.collection-breadcrumb-sep { color: var(--text-light); }
.collection-breadcrumb-actual { color: var(--text-main); }
.collection-hero { border-bottom: 1px solid var(--border-light); margin-bottom: 20px; }
.collection-hero .tienda-page-title { margin-bottom: 4px; }
.collection-hero .tienda-page-subtitle { margin-bottom: 18px; }
.collection-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}
.collection-side {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.collection-facet {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 16px;
}
.collection-facet-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.collection-facet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.collection-facet-link:hover { background: #f0f7ff; color: var(--brand-blue); }
.collection-facet-link.is-active { background: var(--brand-blue); color: #fff; }
.collection-facet-link.is-active .catalog-mega-count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.collection-clear { justify-content: center; }
.collection-toolbar { margin: 0 0 16px; }
.collection-count { margin: 0; }
.collection-main .grid-productos { margin-top: 0; }

/* ——— Koala mascota ——— */
.koala-wrap { position: relative; }
.filter-wrapper.koala-wrap { margin-top: 52px; }
.rastreo-wrap.koala-wrap { margin-top: 52px; }
.carrito-koala-wrap.koala-wrap { margin-top: 52px; }
.auth-container.koala-wrap { margin-top: 56px; }
.page-koala-wrap.koala-wrap { margin-top: 52px; }
.tienda-koala,
.carrito-koala,
.rastreo-koala,
.auth-koala {
    position: absolute;
    top: -54px;
    right: 20px;
    width: 100px;
    height: auto;
    z-index: 6;
    mix-blend-mode: multiply;
    opacity: 0.95;
    pointer-events: none;
    animation: koalaPeek 4s ease-in-out infinite;
}
@keyframes koalaPeek {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ——— Filtros ——— */
.filter-wrapper { position: relative; margin: 16px 0 24px; }
.filter-bar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    border: 1px solid var(--border-light);
}
.filter-group { display: flex; flex-direction: column; flex: 1; min-width: 160px; position: relative; }
.filter-group label.title-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px;
}
.filter-group input[type="text"],
.filter-group select {
    height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 4px;
    font-size: 14px; outline: none; width: 100%; background: #fff; color: var(--text-main); font-weight: 500;
}
.filter-group input:focus, .filter-group select:focus { border-color: var(--brand-blue); }
.autocomplete-items {
    position: absolute; border: 1px solid var(--brand-blue); border-top: none; z-index: 99;
    top: 100%; left: 0; right: 0; background: #fff; border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow-card); max-height: 280px; overflow-y: auto;
}
.autocomplete-items div {
    padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border-light);
    font-size: 14px; display: flex; justify-content: space-between; align-items: center;
}
.autocomplete-items div:hover { background: #f0f7ff; }
.auto-sku { color: var(--text-light); font-size: 11px; font-weight: 700; }
.checkbox-promo {
    display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700;
    color: var(--brand-orange); cursor: pointer; height: 44px; background: #fff4ed;
    padding: 0 14px; border-radius: 4px; border: 1px dashed #f5c9a8; margin: 0; white-space: nowrap;
}
.btn-filter {
    height: 44px; background: var(--brand-blue); color: #fff; border: none;
    padding: 0 22px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 14px;
    transition: background 0.15s;
}
.btn-filter:hover { background: #002244; color: #fff; }
.btn-filter-clear {
    height: 44px; background: #fff; color: var(--gray-800); border: 1px solid var(--border-color);
    padding: 0 16px; border-radius: 4px; font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; font-size: 14px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-filter-clear:hover { background: var(--gray-200); border-color: var(--brand-blue); color: var(--brand-blue); }
.filter-group-promo { flex: 0; min-width: 140px; }
.filter-actions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.moneda-selector-inline {
    border-color: var(--brand-blue) !important;
    color: var(--brand-blue) !important;
    font-weight: 900;
}

/* ——— Grid productos (cards tipo Liverpool) ——— */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.prod-card {
    background: var(--card-bg);
    border-radius: 4px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    box-shadow: none;
}
.prod-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-color);
}
.badge-promo {
    position: absolute; top: 10px; left: 10px; background: var(--brand-orange); color: #fff;
    padding: 4px 10px; border-radius: 2px; font-size: 11px; font-weight: 800; z-index: 2;
}
.badge-variantes {
    position: absolute; top: 10px; right: 10px; background: var(--brand-blue); color: #fff;
    padding: 4px 10px; border-radius: 2px; font-size: 10px; font-weight: 800; z-index: 2;
}
.prod-img {
    background: #fff; height: 240px; display: flex; justify-content: center; align-items: center;
    padding: 16px; cursor: pointer; position: relative; border-bottom: 1px solid var(--border-light);
}
.prod-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.25s; }
.prod-card:hover .prod-img img { transform: scale(1.03); }
.prod-img::after { display: none; }

.prod-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex-grow: 1; }
.prod-brand { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 4px; }
.prod-sku { display: none; }
.prod-name {
    font-size: 14px; font-weight: 600; margin: 0 0 10px; min-height: 40px;
    overflow: hidden; color: var(--text-main); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.price-box { margin-top: auto; }
.price-old { text-decoration: line-through; color: var(--text-light); font-size: 12px; }
.price-desde { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.prod-price { color: var(--brand-blue); font-weight: 800; font-size: 20px; }
.promo-price { color: var(--brand-orange); }
.btn-add {
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-blue); color: #fff; border: none;
    padding: 11px; border-radius: 4px; font-size: 13px; font-weight: 800; margin-top: 12px;
    cursor: pointer; width: 100%; text-decoration: none; transition: 0.2s;
}
.btn-add:hover { background: #002244; color: #fff; box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.page-link {
    padding: 8px 14px; background: #fff; border: 1px solid var(--border-color); border-radius: 4px;
    color: var(--text-main); text-decoration: none; font-weight: 600; font-size: 14px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.page-link:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.page-link.active { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.page-link.active:hover { background: #002244; color: #fff; border-color: #002244; }

/* ——— PDP / Modal producto ——— */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}
.modal.is-open {
    display: flex !important;
}
.modal-content {
    background: #fff;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    width: 100%;
    max-width: 1140px;
    max-height: 90vh;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    top: auto;
    left: auto;
    transform: none;
    flex-shrink: 0;
    align-self: center;
}
.modal-content-sm { max-width: 560px; padding: 32px; }
#tiendaPromoModal .modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
#tiendaPromoModal .modal-content > a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#tiendaPromoModal .modal-content img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
#tiendaPromoModal .close-modal {
    background: #fff;
    color: var(--brand-blue);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.close-modal {
    position: absolute; right: 16px; top: 12px; color: var(--text-muted);
    font-size: 28px; font-weight: 400; cursor: pointer; z-index: 20; line-height: 1;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #f5f5f5;
}
.close-modal:hover { color: var(--brand-blue); background: #ebf8ff; }

.pdp-breadcrumb {
    padding: 14px 24px; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}
.pdp-breadcrumb a { color: var(--brand-blue); text-decoration: none; }
.pdp-breadcrumb a:hover { text-decoration: underline; }

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.modal-grid-pdp { grid-template-columns: 1.1fr 0.9fr; }

.modal-img-box {
    background: #fafafa; padding: 32px 24px; border-right: 1px solid var(--border-light);
    display: block;
}
.pdp-gallery { display: flex; gap: 16px; align-items: flex-start; }
.m-thumbs-vertical {
    display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; max-height: 420px; overflow-y: auto;
}
.m-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.m-thumb, .m-thumb-v {
    width: 64px; height: 64px; border-radius: 4px; border: 2px solid var(--border-color);
    background: #fff; padding: 4px; cursor: pointer; object-fit: contain;
}
.m-thumb.is-active, .m-thumb-v.is-active { border-color: var(--brand-blue); }
.pdp-main-wrap {
    flex: 1; position: relative; display: block; min-height: 260px; min-width: 0;
    background: #fff; border: 1px solid var(--border-light); border-radius: 4px; padding: 0;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.pdp-main-wrap:active { cursor: grabbing; }
.pdp-main-wrap > .m-thumbs {
    display: flex; flex-wrap: nowrap; gap: 0; width: 100%; height: 400px;
    overflow: visible;
    will-change: transform;
    transform: translate3d(0,0,0);
    transition: transform 0.28s ease;
}
.pdp-main-wrap > .m-thumbs > .m-thumb {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-width: none;
    border: none;
    border-radius: 0;
    padding: 16px;
    object-fit: contain;
    cursor: inherit;
    background: #fff;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}
.pdp-main-wrap > .banner-controls {
    position: absolute; left: 0; right: 0; bottom: 12px;
    display: flex; justify-content: center; pointer-events: none; z-index: 3;
    background: none; padding: 0;
}
.pdp-main-wrap > .banner-controls .banner-dot {
    border-color: rgba(255, 255, 255, 0.85);
    background: transparent;
}
.pdp-main-wrap > .banner-controls .banner-dot.is-active {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}
.pdp-main-wrap > .m-sku {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    background: rgba(0, 0, 0, 0.55); color: #fff; margin: 0;
    padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
}
#galleryFsModal {
    z-index: 2100;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: none;
    padding: 0;
}
#galleryFsModal .modal-content {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    background: #000;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
#galleryFsModal .close-modal {
    position: fixed; top: 12px; right: 12px; z-index: 2200;
    background: rgba(255, 255, 255, 0.15); color: #fff;
}
#galleryFsModal .close-modal:hover { background: var(--brand-orange); color: #fff; }
#galleryFsModal .pdp-main-wrap {
    width: 100%; height: 100%; min-height: 0; border: none; border-radius: 0; background: #000;
}
#galleryFsModal .pdp-main-wrap > .m-thumbs { height: 100%; }
#galleryFsModal .pdp-main-wrap > .m-thumbs > .m-thumb {
    background: #000; padding: 48px 16px 64px; cursor: default;
}
#galleryFsModal .pdp-main-wrap > .banner-controls .banner-dots {
    background: rgba(255, 255, 255, 0.12);
}
#galleryFsModal .pdp-main-wrap > .m-sku {
    top: max(16px, env(safe-area-inset-top, 0px));
    right: 64px;
}

.modal-info { padding: 28px 32px 32px; display: flex; flex-direction: column; }
.m-brand { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.m-brand a { color: var(--brand-blue); text-decoration: underline; }
.m-title { margin: 8px 0 12px; font-size: 22px; font-weight: 700; color: var(--text-main); line-height: 1.3; }
.m-sku { font-size: 12px; color: var(--text-light); font-weight: 500; margin-bottom: 16px; background: none; padding: 0; }
.m-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; border-bottom: 1px solid var(--border-light); padding-bottom: 20px; }
.m-price-box { margin-bottom: 20px; }
.m-price-normal { font-size: 28px; font-weight: 800; color: var(--brand-blue); }
.m-price-promo { font-size: 36px; font-weight: 900; color: var(--brand-orange); }
.m-savings-badge {
    font-size: 14px; background: #fff4ed; color: var(--brand-orange); padding: 4px 10px;
    border-radius: 8px; vertical-align: middle; margin-left: 10px; font-weight: bold;
    border: 1px dashed #f5c9a8; display: inline-block;
}
.m-price-iva-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; font-weight: 600; }

.variant-block { margin-bottom: 20px; }
.variant-label { font-size: 13px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; display: block; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip {
    border: 1px solid var(--border-color); background: #fff; color: var(--text-main);
    padding: 8px 16px; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; min-width: 44px;
}
.variant-chip:hover:not(.is-disabled):not(.is-active) { border-color: var(--brand-blue); background: #ebf8ff; color: var(--brand-blue); }
.variant-chip.is-active { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
.variant-chip.is-disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

.pdp-envio-nota {
    background: #ebf8ff; border: 1px solid #bee3f8; padding: 12px 14px; border-radius: 4px;
    font-size: 13px; font-weight: 600; color: var(--brand-blue); margin-bottom: 20px;
}
.pdp-fulfillment {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.pdp-fulfill-card {
    border: 1px solid var(--border-color); border-radius: 4px; padding: 12px; text-align: center;
    font-size: 12px; font-weight: 600; color: var(--text-muted); background: #fafafa;
}
.pdp-fulfill-card strong { display: block; color: var(--text-main); font-size: 13px; margin-bottom: 4px; }

.add-to-cart-form { display: flex; flex-direction: column; gap: 12px; }
.pdp-qty-row { display: flex; align-items: center; gap: 12px; }
.pdp-qty-label { font-size: 13px; font-weight: 700; min-width: 70px; }
.qty-stepper {
    display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden;
}
.qty-stepper button {
    width: 40px; height: 40px; border: none; background: #f5f5f5; font-size: 18px; font-weight: 700;
    cursor: pointer; color: var(--text-main);
}
.qty-stepper button:hover { background: var(--gray-200); color: var(--brand-blue); }
.qty-input {
    width: 52px; height: 40px; border: none; border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color); text-align: center; font-size: 16px; font-weight: 700;
    outline: none; background: #fff; -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-modal-add, .btn-comprar-ahora {
    width: 100%; background: var(--brand-orange); color: #fff; border: none; border-radius: 4px;
    font-size: 16px; font-weight: 800; cursor: pointer; padding: 16px; transition: 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.btn-modal-add:hover, .btn-comprar-ahora:hover { background: #c05621; color: #fff; }
.btn-modal-sec {
    width: 100%; background: #fff; color: var(--brand-blue); border: 2px solid var(--brand-blue);
    border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer; padding: 12px;
    transition: background 0.15s, color 0.15s;
}
.btn-modal-sec:hover { background: var(--brand-blue); color: #fff; }
.btn-modal-cerrar {
    width: 100%; background: var(--brand-blue); color: #fff; border: none; border-radius: 4px;
    font-size: 15px; font-weight: 700; cursor: pointer; padding: 14px 20px; margin-top: 8px;
    transition: background 0.15s;
}
.btn-modal-cerrar:hover { background: #002244; color: #fff; }

/* ——— Carrito estilo bolsa ——— */
.cart-page-title { font-size: 28px; font-weight: 700; margin: 24px 0 20px; color: var(--text-main); }
.cart-layout {
    display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start;
}
.cart-main { background: #fff; border: 1px solid var(--border-light); border-radius: 4px; padding: 0; }
.cart-summary-panel {
    background: #fff; border: 1px solid var(--border-light); border-radius: 4px;
    padding: 24px; position: sticky; top: calc(var(--header-h) + 16px);
}
.cart-summary-panel h2 { margin: 0 0 20px; font-size: 18px; font-weight: 800; }
.cart-summary-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    font-size: 14px; color: var(--text-muted); border-bottom: 1px solid var(--border-light);
}
.cart-summary-row.total {
    border-bottom: none; font-size: 18px; font-weight: 800; color: var(--text-main); padding-top: 16px;
}
.cart-summary-row.total span:last-child { color: var(--brand-blue); font-size: 24px; }

.cart-item-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 88px 110px 120px 40px;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    box-sizing: border-box;
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-img {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.cart-item-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.c-sku { font-size: 11px; color: var(--text-light); font-weight: 600; margin-bottom: 0; display: block; }
.c-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.7em;
}
.c-badge { font-size: 10px; background: var(--brand-orange); color: #fff; padding: 3px 8px; border-radius: 2px; display: inline-block; margin-top: 2px; font-weight: 700; }
.prod-body .c-badge { margin: 0 0 10px; align-self: flex-start; }
.modal-info .s-banner { margin: 0 0 16px; }
.btn-ver-prod {
    margin-top: 4px; display: inline-flex; align-items: center; gap: 4px;
    background: transparent; color: var(--brand-blue); border: none; padding: 0;
    font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline;
    transition: color 0.15s;
}
.btn-ver-prod:hover { color: var(--brand-orange); }
.cart-item-qty {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.cart-item-qty .price-desde,
.cart-item-price .price-desde,
.cart-item-subtotal .price-desde {
    display: block;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.cart-item-price {
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    line-height: 1.25;
}
.price-was { text-decoration: line-through; font-size: 12px; display: block; color: var(--text-light); }
.cart-item-subtotal {
    font-weight: 800;
    font-size: 16px;
    color: var(--text-main);
    min-width: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    line-height: 1.25;
}
.cart-item-subtotal .precio-dinamico {
    font-weight: 800;
    font-size: 16px;
    color: var(--brand-blue);
}
.btn-del {
    color: var(--text-light); text-decoration: none; font-size: 22px; font-weight: 400;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: transparent; border: none; flex-shrink: 0;
    justify-self: center;
}
.btn-del:hover { color: var(--brand-orange); background: #fff4ed; }

.cart-card { background: transparent; padding: 0; box-shadow: none; border: none; }
.carrito-wrapper { margin-top: 0; }
.cart-header-flex { display: none; }
.moneda-selector {
    width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px;
    font-weight: 600; margin-bottom: 16px;
}
.action-bar { display: flex; justify-content: space-between; padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
.btn-return { color: var(--brand-blue); font-weight: 700; text-decoration: none; font-size: 14px; transition: color 0.15s; }
.btn-return:hover { color: var(--brand-orange); }
.btn-empty {
    color: var(--brand-orange); border: 1px solid var(--brand-orange); padding: 8px 16px;
    border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: 700; background: #fff;
    transition: background 0.15s, color 0.15s;
}
.btn-empty:hover { background: var(--brand-orange); color: #fff; }
.checkout-box { display: none; }
.btn-mp {
    background: var(--brand-orange); color: #fff !important; padding: 16px; border-radius: 4px;
    text-decoration: none; font-weight: 800; font-size: 15px; display: block; text-align: center;
    box-shadow: none; border: none; width: 100%; margin-top: 8px;
}
.btn-mp:hover { background: #c05621; color: #fff !important; transform: none; }
.btn-simular, .btn-cotizar-suc {
    display: block; text-align: center; padding: 12px; border-radius: 4px; text-decoration: none;
    font-weight: 700; font-size: 13px; margin-top: 8px; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-simular { background: var(--gray-200); color: var(--gray-800) !important; border: 1px solid var(--border-color); }
.btn-simular:hover { background: #e2e8f0; border-color: var(--gray-600); color: var(--gray-800) !important; }
.btn-cotizar-suc { background: #fff; color: var(--brand-blue) !important; border: 1px solid var(--brand-blue); }
.btn-cotizar-suc:hover { background: var(--brand-blue); color: #fff !important; }
.checkout-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }
.ahorro-badge { background: #ebf8ff; color: var(--brand-blue); padding: 8px 12px; border-radius: 4px; font-size: 13px; font-weight: 700; margin-bottom: 12px; display: block; border: 1px solid #bee3f8; }

/* Similares */
.similar-section { margin-top: 40px; width: 100%; }
.similar-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--text-main); }
.grid-similares {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}
.sim-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.sim-card:hover { box-shadow: var(--shadow-card); }
.sim-img {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}
.sim-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.sim-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
}
.sim-brand { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.sim-name {
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0 8px;
    min-height: 36px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}
.sim-price { color: var(--text-main); font-weight: 800; font-size: 16px; margin-top: 4px; }
.sim-add {
    display: block;
    text-align: center;
    background: var(--brand-blue);
    color: #fff;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
    border-radius: 0 0 4px 4px;
    transition: background 0.15s;
}
.sim-add:hover { background: #002244; color: #fff; }

/* Alerts / banners */
.alert-danger { background: #fff4ed; color: var(--brand-orange); padding: 14px; border-radius: 4px; border: 1px solid #f5c9a8; font-weight: 600; margin: 16px 0; text-align: center; }
.s-banner { padding: 16px; border-radius: 4px; text-align: center; }
.s-banner strong { display: block; margin-bottom: 6px; font-size: 14px; }
.s-banner span { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; }
.sb-local { background: #ebf8ff; border: 1px solid #bee3f8; }
.sb-local strong { color: #285e61; }
.sb-local span { color: #319795; }
.sb-nacional { background: #fff4ed; border: 1px solid #f5c9a8; }
.sb-nacional strong { color: #9c4221; }
.sb-nacional span { color: #dd6b20; }
.sb-store { background: #ebf8ff; border: 1px solid #bee3f8; }
.sb-store strong { color: #553c9a; }
.sb-store span { color: #805ad5; }

.coti-input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 15px; margin-bottom: 16px; }
.table-responsive { display: none; }

/* ——— Checkout ——— */
.checkout-page-title { font-size: 28px; font-weight: 700; margin: 24px 0 8px; color: var(--text-main); }
.btn-return-header {
    color: var(--brand-blue); text-decoration: none; font-weight: 700; font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
}
.btn-return-header:hover { text-decoration: underline; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 2; }
.checkout-card {
    background: #fff; border: 1px solid var(--border-light); border-radius: 4px;
    padding: 24px; box-shadow: var(--shadow-card); position: relative; z-index: 2;
}
.checkout-card h2 {
    color: var(--brand-blue); margin: 0 0 20px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light); font-size: 18px; font-weight: 800;
}
.checkout-card h3 {
    margin: 0 0 16px; color: var(--brand-blue); font-size: 15px; font-weight: 800;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 11px; font-weight: 700; margin-bottom: 6px;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 4px;
    box-sizing: border-box; font-family: inherit; font-size: 14px; background: #fff;
    color: var(--text-main); font-weight: 500; outline: none; transition: 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.08);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-2-span-2 { grid-column: span 2; }

.shipping-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; position: relative; z-index: 4; }
.shipping-card {
    border: 1px solid var(--border-color); border-radius: 4px; padding: 18px 14px;
    cursor: pointer; transition: 0.2s; background: #fafafa; position: relative; text-align: center;
    width: 100%; font-family: inherit; font-size: inherit; margin: 0;
    appearance: none; -webkit-appearance: none; display: block; color: inherit;
    pointer-events: auto; touch-action: manipulation;
}
button.shipping-card:focus-visible {
    outline: 3px solid var(--brand-orange); outline-offset: 2px;
}
.shipping-card:hover { border-color: var(--brand-blue); }
.shipping-card.selected { border-color: var(--brand-blue); background: #ebf8ff; box-shadow: var(--shadow-card); }
.shipping-card input { display: none; }
.shipping-price-badge { pointer-events: none; }
.shipping-icon, .shipping-title, .shipping-desc { pointer-events: none; }
.shipping-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.shipping-title { font-weight: 800; color: var(--brand-blue); display: block; margin-bottom: 4px; font-size: 14px; }
.shipping-desc { font-size: 12px; color: var(--text-muted); font-weight: 500; line-height: 1.4; }
.shipping-price-badge {
    background: var(--brand-orange); color: #fff; font-size: 10px; padding: 4px 8px;
    border-radius: 4px; font-weight: 700; position: absolute; top: -8px; right: -8px;
}
.shipping-price-badge.is-free { background: var(--brand-blue); }

.checkout-sucursal-box {
    background: #ebf8ff; padding: 16px; border-radius: 4px; margin-bottom: 8px;
    border: 1px solid #bee3f8;
}
.checkout-sucursal-box label {
    font-weight: 700; font-size: 12px; color: var(--brand-blue);
    display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px;
}
.checkout-sucursal-box select {
    width: 100%; padding: 12px; border-radius: 4px; border: 1px solid var(--border-color);
    font-weight: 600; color: var(--brand-blue); background: #fff;
}
.checkout-sucursal-dir { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 10px; }

.checkout-map-panel {
    background: #fafafa; border: 1px dashed var(--border-color); padding: 20px;
    border-radius: 4px; margin-top: 20px; position: relative; z-index: 1;
    overflow: hidden; isolation: isolate;
}
#mapa_contenedor {
    height: 300px; border-radius: 4px; border: 1px solid var(--border-color);
    margin-top: 10px; margin-bottom: 12px; background: #e8eef4;
    overflow: hidden; position: relative; touch-action: none;
}
.map-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.map-toolbar .btn-mapa { flex: 1; min-width: 160px; }
.map-hint-intro { margin: 0 0 14px; text-align: left; }
.map-search-group { position: relative; margin-bottom: 12px; }
.map-search-row {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch;
}
.map-search-row input {
    flex: 1; min-width: 200px; padding: 12px 14px; border: 1px solid var(--border-color);
    border-radius: 4px; font-family: inherit; font-size: 14px; background: #fff;
}
.map-search-row input:focus {
    border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.08); outline: none;
}
.map-search-row .btn-mapa { width: auto; min-width: 120px; flex: 0 0 auto; }
.map-sugerencias {
    border: 1px solid var(--brand-blue); background: #fff; border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow-card); max-height: 220px; overflow-y: auto; margin-top: 4px;
}
.map-sugerencias[hidden] { display: none !important; }
.map-sug-item {
    display: block; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--border-light);
    background: #fff; padding: 12px 14px; font-family: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-main); cursor: pointer;
}
.map-sug-item:hover { background: #ebf8ff; color: var(--brand-blue); }
.map-sug-item:last-child { border-bottom: none; }
.btn-mapa-sec {
    background: #fff; color: var(--brand-blue); border: 2px solid var(--brand-blue);
}
.map-hint-error { color: #c53030 !important; }
.checkout-map-panel .leaflet-container { z-index: 1; font-family: inherit; border-radius: 4px; }
.svo-pin {
    background: var(--brand-orange); width: 22px; height: 22px; border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg); border: 3px solid white; box-shadow: 0 4px 12px rgba(242,106,33,0.45);
}
.svo-pin::after {
    content: ''; width: 8px; height: 8px; background: white; border-radius: 50%;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.map-hint { font-size: 12px; color: var(--brand-orange); font-weight: 700; text-align: center; margin-bottom: 12px; }
.btn-mapa {
    background: var(--brand-blue); color: #fff; border: none; padding: 12px; border-radius: 4px;
    font-weight: 700; cursor: pointer; font-size: 13px; width: 100%; font-family: inherit;
}
.btn-mapa:hover { background: #002244; color: #fff; }
.btn-mapa-sec:hover,
.btn-mapa.btn-mapa-sec:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}

.checkout-summary-panel {
    background: #fff; border: 1px solid var(--border-light); border-radius: 4px;
    padding: 24px; position: sticky; top: calc(var(--header-h) + 16px);
}
.checkout-summary-panel h2 {
    margin: 0 0 20px; font-size: 18px; font-weight: 800; color: var(--text-main);
    border-bottom: 1px solid var(--border-light); padding-bottom: 14px;
}
.checkout-items-scroll { max-height: 240px; overflow-y: auto; padding-right: 8px; margin-bottom: 8px; }
.resumen-item {
    display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 12px;
    color: var(--text-main); font-weight: 600; gap: 12px;
}
.resumen-item span:first-child {
    color: var(--text-muted); max-width: 68%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.resumen-item span:last-child { font-weight: 800; color: var(--brand-blue); flex-shrink: 0; }
.subtotales-box { border-top: 1px solid var(--border-light); margin-top: 16px; padding-top: 16px; }
.sub-row {
    display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px;
    font-weight: 600; color: var(--text-muted);
}
.sub-row span:last-child { color: var(--text-main); font-weight: 700; }
.sub-row.is-shipping span:last-child { color: var(--brand-orange); }
.sub-row.is-discount span:last-child { color: var(--brand-blue); }
.total-row {
    display: flex; justify-content: space-between; align-items: center; font-size: 16px;
    font-weight: 800; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light);
    color: var(--text-main);
}
.total-row span:last-child { color: var(--brand-blue); font-size: 24px; }
.security-badge {
    text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 14px;
    font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
}

.alert-mp-error {
    background: #fff4ed; color: var(--brand-orange); border: 1px solid #f5c9a8;
    padding: 14px 18px; border-radius: 4px; font-weight: 700; margin: 16px 0;
}
.cupon-box {
    background: #ebf8ff; border: 1px dashed #bee3f8; border-radius: 4px;
    padding: 14px; margin-top: 16px;
}
.cupon-box label {
    font-weight: 800; font-size: 11px; color: var(--brand-blue);
    text-transform: uppercase; letter-spacing: 0.3px; display: block;
}
.cupon-row { display: flex; gap: 8px; margin-top: 8px; }
.cupon-row input {
    flex: 1; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 4px;
    font-weight: 700; text-transform: uppercase; font-size: 13px;
}
.btn-cupon {
    background: var(--brand-orange); color: #fff; border: none; padding: 0 16px;
    border-radius: 4px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.btn-cupon:hover { background: #c05621; color: #fff; }
.cupon-msg { font-size: 12px; margin-top: 8px; font-weight: 700; }
.cupon-msg.ok { color: var(--brand-blue); }
.cupon-msg.err { color: var(--brand-orange); }

.checkout-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.checkout-actions .btn-mp {
    cursor: pointer; font-family: inherit; font-size: 16px; padding: 16px;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.checkout-actions .btn-simular { cursor: pointer; font-family: inherit; border: none; width: 100%; }

.alert-coti-ok { background: #ebf8ff; border: 1px solid #bee3f8; padding: 14px 18px; border-radius: 4px; margin-bottom: 20px; font-weight: 700; color: var(--brand-blue); }
.cart-empty { text-align: center; padding: 60px 20px; background: #fff; border: 1px solid var(--border-light); border-radius: 4px; }
.cart-empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; display: block; }
.btn-return-primary { display: inline-block; font-size: 15px; background: var(--brand-blue); color: #fff; padding: 14px 28px; border-radius: 4px; text-decoration: none; font-weight: 700; margin-top: 8px; transition: background 0.15s; }
.btn-return-primary:hover { background: #002244; color: #fff; }
.input-qty {
    width: 64px; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px;
    text-align: center; font-size: 15px; font-weight: 700; color: var(--text-main); outline: none; background: #fff;
}
.input-qty:focus { border-color: var(--brand-blue); }
.input-qty[readonly] { background: #f5f5f5; color: var(--text-muted); cursor: not-allowed; }
.btn-checkout-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#flyGhost { position: fixed; z-index: 9999; pointer-events: none; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1), opacity 0.6s; }

/* ——— Efecto empaque ——— */
.pack-overlay {
    position: fixed; inset: 0; z-index: 6000;
    background: rgba(0, 20, 45, 0.85);
    backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    opacity: 1; visibility: visible;
}
.pack-overlay[hidden] { display: none !important; }
.pack-overlay:not([hidden]) { display: flex; }
.pack-overlay.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.pack-card {
    background: linear-gradient(165deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 4px; padding: 36px 28px 28px;
    width: min(92vw, 400px); text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    animation: packCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes packCardIn { from { opacity:0; transform: scale(0.88) translateY(20px); } to { opacity:1; transform: scale(1) translateY(0); } }
.pack-stage { position: relative; height: 210px; margin: 0 auto 10px; perspective: 700px; }
.pack-box-wrap { position: absolute; left: 50%; bottom: 18px; width: 160px; height: 120px; transform: translateX(-50%); transform-style: preserve-3d; }
.pack-box { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.pack-face { position: absolute; background: linear-gradient(145deg, #e8c9a0, #c9956a); border: 2px solid #8b6914; box-sizing: border-box; }
.pack-front { width: 160px; height: 90px; transform: translateZ(55px); bottom: 0; border-radius: 0 0 6px 6px; }
.pack-back { width: 160px; height: 90px; transform: translateZ(-55px) rotateY(180deg); bottom: 0; }
.pack-left { width: 110px; height: 90px; transform: rotateY(-90deg) translateZ(55px); bottom: 0; left: 25px; background: linear-gradient(145deg, #d4a574, #b8844a); }
.pack-right { width: 110px; height: 90px; transform: rotateY(90deg) translateZ(105px); bottom: 0; left: 25px; background: linear-gradient(145deg, #dfc092, #c9956a); }
.pack-bottom { width: 160px; height: 110px; transform: rotateX(90deg) translateZ(0); bottom: 0; background: #b8844a; }
.pack-flap-left, .pack-flap-right {
    position: absolute; width: 80px; height: 70px; top: 0;
    background: linear-gradient(180deg, #f0ddb8, #e0c090);
    border: 2px solid #8b6914; transform-origin: bottom center;
    animation-duration: 4s; animation-fill-mode: forwards; animation-timing-function: ease-in-out;
}
.pack-flap-left { left: 0; transform: rotateX(110deg); animation-name: flapLeftClose; }
.pack-flap-right { right: 0; transform: rotateX(110deg); animation-name: flapRightClose; }
@keyframes flapLeftClose { 0%, 45% { transform: rotateX(110deg); } 65%, 100% { transform: rotateX(0deg); } }
@keyframes flapRightClose { 0%, 55% { transform: rotateX(110deg); } 75%, 100% { transform: rotateX(0deg); } }
.pack-tape-strip {
    position: absolute; left: 50%; top: 42px; width: 0; height: 16px;
    background: rgba(242,106,33,0.9); border-radius: 3px;
    transform: translateX(-50%); z-index: 5;
    animation: tapeGrow 4s ease forwards;
}
@keyframes tapeGrow { 0%, 78% { width: 0; opacity: 0; } 88%, 100% { width: 90px; opacity: 1; } }
.pack-icon { position: absolute; font-size: 28px; z-index: 2; filter: drop-shadow(0 4px 8px rgba(0,51,102,.2)); animation: iconDrop 4s ease-in-out forwards; }
.pack-icon.i1 { left: 28%; top: 0; }
.pack-icon.i2 { left: 50%; top: -8px; animation-delay: 0.15s; }
.pack-icon.i3 { left: 68%; top: 2px; animation-delay: 0.3s; }
.pack-icon.i4 { left: 42%; top: -14px; animation-delay: 0.45s; }
@keyframes iconDrop {
    0% { opacity: 0; transform: translateY(-40px) scale(0.5) rotate(-15deg); }
    12% { opacity: 1; transform: translateY(20px) scale(1) rotate(0deg); }
    28% { transform: translateY(55px) scale(0.95); opacity: 1; }
    42%, 100% { transform: translateY(72px) scale(0.3); opacity: 0; }
}
.pack-shadow { position: absolute; bottom: 0; left: 50%; width: 180px; height: 16px; background: rgba(0,51,102,0.12); border-radius: 50%; transform: translateX(-50%); }
.pack-title { font-size: 20px; font-weight: 900; color: var(--brand-blue); margin: 12px 0 6px; }
.pack-sub { font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 0 0 18px; }
.pack-progress { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.pack-progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue)); animation: packProgress 4s linear forwards; }
@keyframes packProgress { to { width: 100%; } }

/* ——— Auth (login / registro) ——— */
.auth-container { max-width: 480px; margin: 40px auto; padding: 0 20px; width: 100%; flex-grow: 1; }
.auth-card {
    background: #fff; padding: 40px 36px; border-radius: 4px;
    box-shadow: var(--shadow-soft); border: 1px solid var(--border-light);
    position: relative; z-index: 1;
}
.auth-card h1 { color: var(--brand-blue); margin: 0 0 8px; font-size: 26px; font-weight: 800; text-align: center; }
.auth-card .subtitle { color: var(--text-muted); text-align: center; margin-bottom: 28px; font-size: 15px; font-weight: 500; line-height: 1.5; }
.auth-card .form-group textarea { min-height: 90px; resize: vertical; }
.btn-auth-primary {
    width: 100%; background: var(--brand-orange); color: #fff; border: none;
    padding: 16px; border-radius: 4px; font-size: 16px; font-weight: 800;
    cursor: pointer; transition: 0.2s; margin-top: 8px; font-family: inherit;
}
.btn-auth-primary:hover { background: #c05621; color: #fff; }
.auth-link { font-size: 14px; color: var(--text-muted); margin: 20px 0; text-align: center; font-weight: 600; }
.auth-link a { color: var(--brand-blue); font-weight: 800; text-decoration: underline; }
.back-link { font-size: 14px; color: var(--text-light); text-decoration: none; display: inline-block; font-weight: 700; margin-top: 8px; }
.back-link:hover { color: var(--brand-blue); }
.alert-error-auth {
    background: #fff4ed; color: var(--brand-orange); padding: 14px; border-radius: 4px;
    font-size: 14px; margin-bottom: 20px; border: 1px solid #f5c9a8; font-weight: 700;
}

/* ——— Mis compras / pedidos ——— */
.tienda-page-title { color: var(--brand-blue); margin: 24px 0 6px; font-size: 28px; font-weight: 800; }
.tienda-page-subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }
.filter-date-bar {
    background: #fff; padding: 18px; border-radius: 4px; box-shadow: var(--shadow-card);
    margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
    border: 1px solid var(--border-light);
}
.order-card { background: #fff; border-radius: 4px; box-shadow: var(--shadow-card); border: 1px solid var(--border-light); margin-bottom: 24px; overflow: hidden; }
.order-header { background: #fafafa; padding: 18px 20px; border-bottom: 1px solid var(--border-light); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.order-body > .btn-ticket,
.order-body > .order-details {
    margin-left: 20px;
    margin-right: 20px;
}
.order-body > .order-details { margin-top: 16px; margin-bottom: 12px; }
.order-body > .btn-ticket { margin-bottom: 14px; }
.order-body > .btn-ticket:first-child { margin-top: 16px; }
.page-koala-wrap > .order-details { margin-bottom: 20px; }
.meta-label { font-size: 11px; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
.meta-value { font-size: 15px; color: var(--text-main); font-weight: 600; }
.order-total-header { color: var(--brand-blue); font-size: 18px; font-weight: 800; }
.order-status { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; color: #fff; background: var(--text-light); }
.status-entregado { background: var(--brand-green); }
.status-enviado { background: var(--brand-orange); }
.status-pendiente { background: var(--brand-orange); }
.status-cancelado { background: var(--text-muted); }
.product-item { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border-light); }
.product-thumb { width: 60px; height: 60px; border-radius: 4px; border: 1px solid var(--border-light); overflow: hidden; display: flex; justify-content: center; align-items: center; background: #fff; padding: 4px; flex-shrink: 0; }
.product-name { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 3px; }
.product-snippet { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin: 0; }
.product-pricing-qty { text-align: right; font-size: 14px; flex-shrink: 0; }
.tienda-empty-state { background: #fff; text-align: center; padding: 48px 24px; border-radius: 4px; border: 1px solid var(--border-light); }

/* ——— Rastreo ——— */
.tracking-card { background: #fff; padding: 32px 28px; border-radius: 4px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-light); max-width: 720px; margin: 24px auto; }
.tracking-card h1 { color: var(--brand-blue); margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.stepper { display: flex; justify-content: space-between; margin: 32px 0; position: relative; }
.stepper::before { content: ''; position: absolute; top: 18px; left: 12%; width: 76%; height: 3px; background: var(--border-color); z-index: 0; }
.step { text-align: center; position: relative; z-index: 1; flex: 1; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-weight: 800; font-size: 14px; color: var(--text-muted); }
.step.active .step-circle { border-color: var(--brand-orange); background: var(--brand-orange); color: #fff; }
.step.done .step-circle { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
.step-label { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.step.done .step-label { color: var(--brand-blue); }
.step.active .step-label { color: var(--brand-orange); }
.tracking-card .subtitle { text-align: center; color: var(--text-muted); font-size: 15px; margin-bottom: 28px; font-weight: 600; line-height: 1.5; }
.rastreo-wrap { max-width: 720px; margin: 24px auto; padding: 0 20px 48px; }
.btn-track {
    width: 100%; background: var(--brand-blue); color: #fff; padding: 16px; border: none;
    border-radius: 4px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit;
    transition: background 0.2s;
}
.btn-track:hover { background: #002244; color: #fff; }
.tracking-alert-error {
    background: #fff5f5; color: #c53030; padding: 16px; border-radius: 4px; font-size: 14px;
    margin-bottom: 20px; border: 1px solid #fed7d7; text-align: center; font-weight: 700;
}
.result-box { margin-top: 32px; border-top: 2px dashed var(--border-color); padding-top: 32px; }

/* ——— Facturación tienda ——— */
.tracking-card h2 { color: var(--brand-blue); font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.tracking-card a.btn-track {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-align: center; text-decoration: none;
}
.factura-acciones { display: flex; flex-direction: column; gap: 14px; }
.factura-acciones .btn-filter-clear { justify-content: center; }
.factura-hint {
    color: var(--text-muted); font-size: 13px; font-weight: 600;
    margin: 0; text-align: center; line-height: 1.5;
}
.factura-hint-form { text-align: left; margin-bottom: 18px; }
.status-badge-container { text-align: center; margin-bottom: 32px; }
.status-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #ebf8ff; color: var(--brand-blue); padding: 10px 22px; border-radius: 99px;
    font-size: 14px; font-weight: 800; border: 2px solid #bee3f8; text-transform: uppercase;
}
.order-details {
    background: #f8fafc; padding: 20px; border-radius: 4px; font-size: 14px;
    color: var(--text-main); border: 1px solid var(--border-light); line-height: 1.8; margin-bottom: 20px;
}
.order-details strong { color: var(--brand-blue); font-weight: 800; }
.package-list { margin-top: 20px; border-top: 1px dashed var(--border-color); padding-top: 20px; }
.package-list-title { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; }
.package-item {
    background: #fff; padding: 14px; border-radius: 4px; border: 1px solid var(--border-light);
    margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.package-item strong { color: var(--brand-blue); font-size: 14px; display: block; margin-bottom: 4px; }
.package-item small { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.pkg-badge { padding: 4px 12px; border-radius: 99px; font-size: 10px; font-weight: 800; text-transform: uppercase; color: #fff; }
.btn-ticket {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: var(--brand-blue); border: 2px solid var(--brand-blue);
    padding: 14px; border-radius: 4px; font-weight: 800; text-decoration: none;
}
.btn-ticket:hover { background: var(--brand-blue); color: #fff; }
.btn-ticket + .btn-ticket { margin-top: 10px; }
#deliveryOverlay,
.delivery-overlay {
    position: fixed; inset: 0; z-index: 5500;
    background: linear-gradient(180deg, #87CEEB 0%, #e8f4fc 45%, #f4f8fb 100%);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: opacity 0.55s ease, visibility 0.55s ease;
}
#deliveryOverlay.hide,
.delivery-overlay.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.delivery-stage { position: relative; width: min(96vw, 520px); height: 220px; }
.delivery-skyline {
    position: absolute; bottom: 48px; left: 0; right: 0; height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 70'%3E%3Crect fill='%23cbd5e0' x='0' y='40' width='60' height='30' rx='2'/%3E%3Crect fill='%23a0aec0' x='70' y='25' width='45' height='45' rx='2'/%3E%3Crect fill='%23e2e8f0' x='130' y='35' width='55' height='35'/%3E%3Crect fill='%23cbd5e0' x='200' y='20' width='40' height='50'/%3E%3Crect fill='%23a0aec0' x='260' y='30' width='70' height='40'/%3E%3Crect fill='%23e2e8f0' x='350' y='15' width='50' height='55'/%3E%3Crect fill='%23cbd5e0' x='420' y='38' width='100' height='32'/%3E%3C/svg%3E") repeat-x bottom;
    background-size: 520px 70px; animation: skylineScroll 4s linear forwards; opacity: 0.7;
}
@keyframes skylineScroll { from { background-position: 0 0; } to { background-position: -520px 0; } }
.delivery-road {
    position: absolute; bottom: 0; left: 0; right: 0; height: 52px;
    background: #4a5568; border-radius: 8px 8px 0 0; box-shadow: inset 0 8px 0 rgba(255,255,255,0.08);
}
.delivery-road::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 4px;
    background: repeating-linear-gradient(90deg, #f6e05e 0, #f6e05e 24px, transparent 24px, transparent 48px);
    animation: roadLines 0.6s linear infinite;
}
@keyframes roadLines { to { transform: translateX(-48px); } }
.delivery-van-wrap {
    position: absolute; bottom: 18px; left: -140px;
    animation: vanDrive 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2));
}
@keyframes vanDrive {
    0% { left: -140px; } 15% { left: 8%; } 85% { left: 72%; } 100% { left: calc(100% + 20px); }
}
.delivery-van-wrap svg { width: 130px; height: auto; display: block; }
.van-wheel { transform-origin: center; animation: wheelSpin 0.5s linear infinite; }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.delivery-caption { position: absolute; top: 0; left: 50%; transform: translateX(-50%); text-align: center; width: 100%; }
.delivery-caption h3 { margin: 0; font-size: 18px; font-weight: 900; color: var(--brand-blue); }
.delivery-caption p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* ——— Páginas éxito / gracias ——— */
.gracias-body {
    font-family: inherit; background: var(--bg-body);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; margin: 0; padding: 20px 16px;
}
.success-card {
    background: #fff; padding: clamp(28px, 5vw, 48px); border-radius: 4px;
    box-shadow: var(--shadow-soft); text-align: center; width: min(450px, 100%);
    border: 1px solid var(--border-light);
}
.success-card .icon {
    background: var(--brand-blue); color: #fff; width: 72px; height: 72px; line-height: 72px;
    border-radius: 50%; font-size: 36px; margin: 0 auto 20px;
}
.success-card h1 { color: var(--text-main); margin: 0; font-size: clamp(22px, 5vw, 26px); }
.success-card .lead, .gracias-lead { color: var(--text-muted); line-height: 1.6; margin: 12px 0 0; font-weight: 600; }
.success-card .icon-error { background: var(--text-muted); }
.folio-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; color: var(--text-muted); }
.btn-group { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.folio-badge {
    background: #ebf8ff; color: var(--brand-blue); padding: 16px 14px; border-radius: 4px;
    font-weight: 800; font-size: clamp(18px, 4.5vw, 22px); margin: 20px 0;
    border: 1px dashed #bee3f8; word-break: break-word;
}
.btn-home { background: var(--brand-orange); color: #fff; width: 100%; max-width: 280px; display: inline-block; padding: 14px 20px; border-radius: 4px; text-decoration: none; font-weight: 700; }
.btn-home:hover { background: #c05621; color: #fff; }

/* ——— Cotización sucursal ——— */
.page-wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; width: 100%; }
.tienda-page-card {
    background: #fff; border-radius: 4px; padding: 28px 24px;
    box-shadow: var(--shadow-soft); border: 1px solid var(--border-light);
}
.tienda-page-card h1 { color: var(--brand-blue); margin: 0 0 10px; font-size: clamp(22px, 4vw, 26px); }
.tienda-page-card .lead { color: var(--text-muted); font-weight: 600; line-height: 1.6; margin-bottom: 20px; }
.tienda-page-card .s-banner { margin: 8px 0 4px; text-align: left; }
.checkout-card .s-banner { margin-top: 16px; text-align: left; }
.checkout-card .shipping-card { cursor: default; }
.checkout-summary-panel .total-pill { margin-top: 16px; margin-bottom: 0; }
.btn-primary-tienda {
    background: var(--brand-orange); color: #fff; border: none; padding: 14px 20px;
    border-radius: 4px; font-weight: 800; cursor: pointer; font-family: inherit; width: 100%;
    transition: background 0.15s; text-align: center; text-decoration: none; display: inline-block; box-sizing: border-box;
}
.btn-primary-tienda:hover { background: #c05621; color: #fff; }
.btn-secondary-tienda {
    background: #fff; color: var(--brand-blue); border: 1px solid var(--brand-blue);
    padding: 12px 18px; border-radius: 4px; font-weight: 700; text-decoration: none; display: inline-block;
    transition: background 0.15s, color 0.15s; text-align: center; width: 100%; box-sizing: border-box;
}
.btn-secondary-tienda:hover { background: var(--brand-blue); color: #fff; }
.alert-ok { text-align: center; }
.alert-ok-icon { font-size: 48px; margin-bottom: 8px; }
.token-box {
    background: #ebf8ff; border: 2px dashed var(--brand-blue); border-radius: 4px;
    padding: 18px 16px; font-family: monospace; font-size: clamp(14px, 2.5vw, 18px); font-weight: 800; color: var(--brand-blue);
    word-break: break-all; margin: 12px 0 20px; letter-spacing: 0.5px;
}
.action-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.total-pill {
    background: #ebf8ff; color: var(--brand-blue); padding: 12px 16px; border-radius: 4px;
    font-weight: 800; margin-bottom: 20px; border: 1px solid #bee3f8; font-size: 13px;
}
.alert-err {
    background: #fff5f5; color: #c53030; padding: 14px; border-radius: 4px;
    margin: 16px 0; border: 1px solid #fed7d7; font-weight: 600;
}
.tienda-table-wrap { background: #fff; border-radius: 4px; border: 1px solid var(--border-light); overflow-x: auto; }
.tienda-table { width: 100%; border-collapse: collapse; }
.tienda-table th, .tienda-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); text-align: left; font-size: 14px; }
.tienda-table th { background: #fafafa; color: var(--text-main); font-weight: 700; }
.badge-estatus { padding: 5px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase; }
.badge-preparando { background: var(--brand-orange); }
.badge-camino { background: var(--brand-blue); }
.badge-entregado { background: var(--brand-green); }
.loader-mp {
    width: 45px; height: 45px; border: 5px solid #e2e8f0; border-top-color: var(--brand-orange);
    border-radius: 50%; animation: spinMp 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spinMp { to { transform: rotate(360deg); } }
.mp-blue { color: var(--brand-blue); font-weight: 800; }
.order-total-paid { color: var(--brand-blue); font-weight: 900; }
.order-pay-method { font-size: 11px; text-transform: uppercase; color: var(--text-muted); }
.pkg-badge-entregado { background: var(--brand-green); }
.pkg-badge-transito { background: var(--brand-orange); }

/* ——— Proyecto / footer tienda ——— */
.tienda-proyecto {
    background: #f7fafc;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 36px 0 40px;
    margin-top: 24px;
    margin-bottom: 0;
}
.tienda-proyecto-head {
    text-align: center;
    margin-bottom: 24px;
}
.tienda-proyecto-head .tienda-page-title {
    margin-bottom: 8px;
    color: var(--brand-blue);
}
.tienda-proyecto-head .tienda-page-subtitle {
    margin: 0 auto;
    max-width: 720px;
    color: var(--text-muted);
}
.tienda-proyecto-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.tienda-proyecto-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 148px;
    padding: 22px 20px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tienda-proyecto-card:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.08);
    transform: translateY(-2px);
    color: var(--text-main);
}
.tienda-proyecto-card-title {
    font-size: 17px;
    line-height: 1.35;
    color: var(--brand-blue);
}
.tienda-proyecto-card-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    font-weight: 600;
    flex: 1;
}
.tienda-proyecto-card-cta {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.tienda-footer {
    background: var(--brand-blue);
    color: #fff;
    margin-top: 48px;
    padding: 36px 0 28px;
}
.tienda-footer-logo {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}
.tienda-footer-social-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.tienda-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}
.tienda-footer-copy {
    margin: 0;
    font-size: 12px;
    color: #bee3f8;
    font-weight: 600;
}
.tienda-footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tienda-footer-info .tienda-footer-social-links {
    gap: 8px;
    max-width: 640px;
}
.tienda-footer-info .tienda-social-link {
    min-height: 0;
    padding: 6px 12px;
    font-size: 12px;
}
.tienda-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s;
}
.tienda-social-link:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}
.tienda-social-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .header-search { order: 3; flex: 1 1 100%; max-width: none; }
    .modal-grid, .modal-grid-pdp { grid-template-columns: 1fr; }
    .modal-img-box { border-right: none; border-bottom: 1px solid var(--border-light); }
    .pdp-gallery { flex-direction: column; }
    .m-thumbs-vertical { display: none; }
    .pdp-main-wrap > .m-thumbs { height: 300px; }
    .cart-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary-panel { position: static; }
    .shipping-options { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .tienda-proyecto-grid { grid-template-columns: 1fr 1fr; }
    .tienda-footer-inner { flex-direction: column; }
    .grid-2-span-2 { grid-column: span 1; }
    .cart-item-row {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        position: relative;
    }
    .cart-item-img {
        width: 80px;
        height: 80px;
    }
    .cart-item-qty,
    .cart-item-price,
    .cart-item-subtotal {
        grid-column: 2;
        text-align: left;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .cart-item-qty {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .cart-item-qty .price-desde,
    .cart-item-price .price-desde,
    .cart-item-subtotal .price-desde {
        text-align: left;
        width: auto;
    }
    .cart-item-price,
    .cart-item-subtotal {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 8px;
    }
    .cart-item-subtotal .precio-dinamico {
        font-size: 15px;
    }
    .btn-del { position: absolute; right: 16px; top: 16px; }
    .grid-similares { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sim-img {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }
}

@media (max-width: 600px) {
    .grid-productos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .prod-img { height: 160px; }
    .prod-name { font-size: 13px; min-height: 36px; }
    .prod-price { font-size: 17px; }
}
