/* ═══════════════════════════════════════════════════════════════════
   MISHELL BOUTIQUE - DISEÑO PROFESIONAL Y ELEGANTE
   Paleta: Rosado Claro (#D988B9) × Blanco
   ═══════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────────────
   1. IMPORTACIONES DE FUENTES (Optimizado con font-display)
   ──────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ────────────────────────────────────────────────────────────────────
   2. VARIABLES DEL SISTEMA DE DISEÑO
   ──────────────────────────────────────────────────────────────────── */
:root {
    /* Paleta de Colores Original */
    --color-primario: #D988B9;
    --color-primario-claro: #F5E8ED;
    --color-primario-hover: #E3B0CC;
    --color-primario-oscuro: #C273A2;

    /* Colores Base */
    --color-fondo: #ffffff;
    --color-fondo-secundario: #FAFAFA;
    --color-borde: #E5E5E5;
    --color-borde-hover: #D1D5DB;

    /* Texto */
    --color-texto: #333333;
    --color-texto-secundario: #666666;
    --color-texto-claro: #999999;

    /* Tipografía Clara y Legible */
    --fuente-principal: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Espaciado */
    --radio-sm: 8px;
    --radio-md: 12px;
    --radio-lg: 16px;

    /* Sombras Sutiles */
    --sombra-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --sombra-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --sombra-lg: 0 8px 16px rgba(0, 0, 0, 0.1);

    /* Transiciones */
    --transicion: 0.3s ease;
}

/* ────────────────────────────────────────────────────────────────────
   3. ESTILOS BASE
   ──────────────────────────────────────────────────────────────────── */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    min-width: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-principal);
    background: #f8f7f4;
    color: var(--color-texto);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;

    /* Prevenir bounce scroll en iOS */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.modal-search-open {
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
}

main {
    flex-grow: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fuente-principal);
    font-weight: 600;
    color: var(--color-texto);
}

/* ────────────────────────────────────────────────────────────────────
   4. COMPONENTES BOOTSTRAP
   ──────────────────────────────────────────────────────────────────── */
.btn {
    font-family: var(--fuente-principal);
    font-weight: 500;
    border-radius: var(--radio-md);
    padding: 10px 20px;
    border: none;
    transition: all var(--transicion);
    box-shadow: var(--sombra-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--color-primario-hover) !important;
    border-color: var(--color-primario-hover) !important;
    color: white !important;
    box-shadow: var(--sombra-md);
}

.btn-primary:disabled {
    background-color: #ccc;
    border-color: #ccc;
    box-shadow: none;
}

.form-control,
.form-select {
    font-family: var(--fuente-principal);
    border-radius: var(--radio-md);
    border: 1.5px solid var(--color-borde);
    padding: 10px 15px;
    transition: all var(--transicion);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(217, 136, 185, 0.1);
    outline: none;
}

/* ────────────────────────────────────────────────────────────────────
   5. HEADER Y NAVEGACIÓN (Estilo Mattelsa)
   ──────────────────────────────────────────────────────────────────── */
.site-header {
    z-index: 1030;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding-top: env(safe-area-inset-top);
}

.header-gradient {
    height: 3px;
    background: linear-gradient(90deg, var(--color-primario) 0%, var(--color-primario-oscuro) 50%, #a8638a 100%);
}

.header-nav {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0;
}

.header-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 54px;
    position: relative;
}

/* Left: Nav links */
.header-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link-header {
    font-family: var(--fuente-principal);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-texto);
    background: none;
    border: none;
    padding: 18px 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--color-primario);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link-header:hover {
    color: var(--color-primario);
    background: none;
    transform: none;
    box-shadow: none;
}

.nav-link-header:hover::after {
    transform: scaleX(1);
}

.nav-link-header.active {
    color: var(--color-primario);
    background: none;
    box-shadow: none;
}

.nav-link-header.active::after {
    transform: scaleX(1);
}

/* Sale button */
.nav-link-header.filter-promo {
    color: #dc2626;
    background: none;
    box-shadow: none;
}

.nav-link-header.filter-promo:hover {
    color: #b91c1c;
    background: none;
}

/* Center: Brand */
.header-brand {
    font-family: var(--fuente-principal);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--color-texto) !important;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    padding: 0 8px;
}

.header-brand:hover {
    color: var(--color-primario) !important;
    text-decoration: none;
}

/* Right: Icons */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.header-icon {
    font-size: 1.2rem;
    position: relative;
    color: var(--color-texto);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.header-icon:hover {
    color: var(--color-primario);
}

.header-icon .cart-counter {
    background-color: var(--color-primario);
    color: white;
    position: absolute;
    top: -6px;
    right: -10px;
    font-size: 0.58rem;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Buscador Desktop */
.search-box {
    position: relative;
    width: 180px;
}

.search-box input {
    border-radius: 50px;
    padding: 7px 12px 7px 34px;
    background: #f5f5f5;
    border: 1px solid transparent;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    width: 100%;
}

.search-box input:focus {
    background: white;
    border-color: var(--color-borde);
    box-shadow: 0 0 0 3px rgba(217, 136, 185, 0.08);
    outline: none;
}

.search-box .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-texto-claro);
    font-size: 0.85rem;
    pointer-events: none;
}

/* Mobile: hamburger menu */
.header-left-mobile {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-left-mobile .nav-link-header {
    padding: 10px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown de Categorías */
.dropdown-menu-enhanced {
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: var(--radio-md);
    padding: 6px;
    min-width: 200px;
    max-height: none;
    overflow-y: visible;
}

.dropdown-menu-enhanced .dropdown-item {
    border-radius: var(--radio-sm);
    padding: 9px 14px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-menu-enhanced .dropdown-item:hover {
    background-color: var(--color-primario-claro);
    color: var(--color-primario);
    transform: translateX(3px);
}

/* Filter-group base */
.filter-group {
    border: none;
    background: none;
    box-shadow: none;
}

.filter-badge-container {
    position: relative;
}

.filter-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ── Responsive header ── */
@media (max-width: 991.98px) {
    .header-layout {
        grid-template-columns: 40px 1fr 40px;
        min-height: 48px;
        padding: 0 4px;
    }

    .header-brand {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }

    .header-left-mobile {
        justify-self: start;
    }

    .header-right {
        justify-self: end;
    }

    .dropdown-menu-enhanced {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dropdown-menu-enhanced::-webkit-scrollbar {
        width: 4px;
    }

    .dropdown-menu-enhanced::-webkit-scrollbar-thumb {
        background: var(--color-primario-claro);
        border-radius: 10px;
    }
}

@media (max-width: 374.98px) {
    .header-brand {
        font-size: 0.95rem;
        letter-spacing: 2px;
    }
}

/* ────────────────────────────────────────────────────────────────────
   6. TARJETAS DE PRODUCTO - Grid Minimalista
   ──────────────────────────────────────────────────────────────────── */
#products-container {
    /* gaps via row g-2/g-md-3 en HTML */
}

.product-card {
    background: white;
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-image-wrapper {
    overflow: hidden;
    position: relative;
    background: #f8f5f6;
}

.product-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: #f0ece9;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

.product-card:hover img {
    opacity: 0.9;
    transform: scale(1.03);
}

.product-card-body {
    padding: 8px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.product-card .product-title {
    font-size: 0.72rem;
    font-weight: 500;
    margin-bottom: 0;
    color: #2a2a2a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-desc {
    font-size: 0.65rem;
    color: #aaa;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.card-colors {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.card-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    background-clip: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.card-color-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.card-color-dot.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.card-sizes {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.card-size-chip {
    font-size: 0.55rem;
    color: #999;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid #e8e0e4;
    padding: 1px 5px;
    line-height: 1.6;
    background: white;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}

.price-detal-card {
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.2px;
}

.price-detal-old-card {
    font-size: 0.68rem;
    color: #bbb;
    text-decoration: line-through;
    margin-right: 5px;
    font-weight: 400;
}

.btn-add-card {
    background: var(--color-primario);
    color: white;
    border: none;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 9px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-add-card:hover {
    background: var(--color-primario-oscuro);
}

/* Badges */
.badge-promo {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: white;
    padding: 3px 8px;
    border-radius: 0;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.badge-agotado {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 0;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* Productos agotados — se pueden ver, solo no comprar */
.product-card[data-stock="0"] {
    cursor: pointer;
}
.product-card[data-stock="0"] .product-image-wrapper img {
    filter: grayscale(60%);
    opacity: 0.75;
    transition: filter 0.3s, opacity 0.3s;
}
.product-card[data-stock="0"]:hover .product-image-wrapper img {
    filter: grayscale(20%);
    opacity: 0.9;
}
.product-card[data-stock="0"] .product-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Botón "Agotado" en el modal */
.mp-btn-add:disabled[textContent="Agotado"],
#btn-add-cart.agotado {
    background: #888;
    color: #fff;
    border-color: #888;
    cursor: not-allowed;
}

/* ────────────────────────────────────────────────────────────────────
   7. HERO STRIP (Banner sutil)
   ──────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────
   8. MODALES
   ──────────────────────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--radio-lg);
    box-shadow: var(--sombra-lg);
}

.modal-header {
    background: white;
    border-bottom: 1px solid var(--color-borde);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* Layout de imagen controlado por #productModal */
.modal-product-image {
    width: 100%;
    display: block;
}

.selector-label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Botones de talla y color */
.size-color-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.size-color-btn {
    padding: 8px 16px;
    border: 2px solid var(--color-borde);
    background-color: white;
    border-radius: var(--radio-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.size-color-btn:hover:not(:disabled) {
    border-color: var(--color-primario);
    background-color: rgba(217, 136, 185, 0.1);
    transform: translateY(-1px);
}

.size-color-btn.selected {
    background-color: var(--color-primario);
    color: white;
    border-color: var(--color-primario);
}

.size-color-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.size-color-btn.unica-talla,
.size-color-btn.unico-color {
    cursor: default;
    border-color: var(--color-primario);
    background-color: rgba(217, 136, 185, 0.1);
    color: var(--color-primario);
    font-weight: 600;
}

.price-detal-modal .price-detal {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primario);
}

.stock-display {
    background: var(--color-primario-claro);
    border: 1px solid var(--color-primario-hover);
    padding: 12px;
    border-radius: var(--radio-md);
    text-align: center;
    font-weight: 500;
    color: var(--color-primario);
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--color-primario);
    border-radius: var(--radio-md);
    padding: 5px;
    width: fit-content;
}

.quantity-selector .quantity-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    width: 40px;
    height: 40px;
    box-shadow: none;
}

.quantity-selector .quantity-btn:hover {
    background: rgba(255,255,255,0.1);
}

.quantity-selector input {
    width: 50px;
    border: none;
    background: white;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 6px;
}

.offcanvas-header {
    background: white;
    border-bottom: 1px solid var(--color-borde);
    padding: 1.5rem;
}

.offcanvas-title {
    font-weight: 600;
}

.cart-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-borde);
}

.cart-item-image {
    width: 80px;
    height: 100px;
    object-fit: contain;
    background-color: var(--color-borde);
    border-radius: var(--radio-md);
    border: 1px solid var(--color-borde);
}

/* Alerta de stock en el carrito */
.cart-stock-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff8e1;
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 12px 8px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.4;
}
.cart-stock-icon { flex-shrink: 0; font-size: 15px; }

.cart-total {
    background: var(--color-primario-claro);
    padding: 1.5rem;
    border-top: 1px solid var(--color-borde);
}

.total-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primario);
}

/* ────────────────────────────────────────────────────────────────────
   9. FOOTER
   ──────────────────────────────────────────────────────────────────── */
.footer-minimal {
    padding: 28px 20px 20px;
    background-color: #fafafa;
    border-top: 1px solid var(--color-borde);
    text-align: center;
    margin-top: auto;
}

.footer-link {
    color: var(--color-primario);
    text-decoration: none;
}
.footer-link:hover {
    text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────────────
   10. NAVEGACIÓN MÓVIL — FLOATING PILL
   ──────────────────────────────────────────────────────────────────── */
.mobile-bottom-nav {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    /* Combina centrado + GPU compositing */
    transform: translateX(-50%) translateZ(0);
    -webkit-transform: translateX(-50%) translateZ(0);
    width: auto;
    padding: 6px 4px;
    /* Frosted glass sobre fondo */
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    /* Pill shape */
    border-radius: 44px;
    border: 0.5px solid rgba(0, 0, 0, 0.07);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 1px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 1000;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 46px;
    border-radius: 32px;
    position: relative;
    cursor: pointer;
    color: #adadb8;
    transition: color 0.18s, background 0.18s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.45rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Solo iconos — sin etiquetas */
.nav-item span {
    display: none;
}

.nav-item.active {
    color: var(--color-primario);
    background: rgba(217, 136, 185, 0.11);
}

.nav-item.active i {
    transform: scale(1.08);
}

.nav-item .cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    min-width: 16px;
    font-size: 0.5rem;
    font-weight: 700;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: var(--color-primario);
    color: white;
}

/* ── Búsqueda inline en barra de navegación ── */

/* Nav expandida para búsqueda */
.mobile-bottom-nav.search-active {
    width: calc(100% - 32px);
    padding: 6px 10px;
    border-radius: 28px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav {
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ocultar botones del nav cuando está en modo búsqueda */
.mobile-bottom-nav.search-active .nav-item {
    display: none;
}

/* Barra de búsqueda inline — oculta por defecto */
.nav-inline-search {
    display: none;
    align-items: center;
    width: 100%;
    gap: 4px;
}

.mobile-bottom-nav.search-active .nav-inline-search {
    display: flex;
}

/* Botón volver */
.nis-back {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.05rem;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, background 0.15s;
}

.nis-back:active {
    background: rgba(0, 0, 0, 0.06);
}

/* Input inline */
.nis-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 0.92rem;
    font-family: var(--fuente-principal);
    color: var(--color-texto);
    background: transparent;
    padding: 6px 0;
    caret-color: var(--color-primario);
}

.nis-input::placeholder {
    color: #c4c4cc;
    font-style: italic;
    font-weight: 300;
}

/* Botón limpiar */
.nis-clear {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.07);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1rem;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}

.nis-clear:active {
    background: rgba(0, 0, 0, 0.14);
}

/* Panel de sugerencias de categorías — encima del nav */
.nav-search-suggestions {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.1),
        0 1px 6px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
    z-index: 999;
    display: none;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.nav-search-suggestions.visible {
    display: flex;
}

.nss-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.nss-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nss-cat-chip {
    background: var(--color-primario-claro);
    color: var(--color-primario);
    border: none;
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--fuente-principal);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
}

.nss-cat-chip:active,
.nss-cat-chip:hover {
    background: var(--color-primario);
    color: white;
}

/* ────────────────────────────────────────────────────────────────────
   11. PROMOCIONES
   ──────────────────────────────────────────────────────────────────── */
.promotions-section {
    background: linear-gradient(135deg, var(--color-primario-claro) 0%, var(--color-primario-hover) 100%);
    border: 1px solid var(--color-primario-hover);
    border-radius: var(--radio-lg);
    padding: 20px;
}

.promotions-title {
    font-size: 1.5rem;
    color: var(--color-primario);
    margin-bottom: 15px;
    text-align: center;
}

/* ────────────────────────────────────────────────────────────────────
   12. UTILIDADES
   ──────────────────────────────────────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-borde);
    border-top: 3px solid var(--color-primario);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Toast / Notificaciones ── */
.toast-container {
    z-index: 9999;
    position: fixed !important;
    /* Móvil por defecto: centrado encima del nav */
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 380px;
    padding: 0 !important;
    pointer-events: none;
}

#liveToast.toast {
    pointer-events: auto;
    width: 100%;
    border-radius: 14px;
    padding: 0;
    border: none;
    overflow: hidden;
    background: white;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.13),
        0 2px 8px rgba(0, 0, 0, 0.07);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Layout interno: icono | mensaje | X */
.toast-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 10px 13px 14px;
}

/* Icono de tipo */
.toast-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Mensaje */
.toast-msg {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.45;
    letter-spacing: 0.2px;
}

/* Botón X circular */
.toast-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.07);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.05rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}

.toast-close:active {
    background: rgba(0, 0, 0, 0.14);
}

/* Franjas de color + icono según tipo */
#liveToast.text-bg-success {
    background: white !important;
    border-left: 3.5px solid #28a06a !important;
}
#liveToast.text-bg-success .toast-icon { color: #28a06a; }

#liveToast.text-bg-danger {
    background: white !important;
    border-left: 3.5px solid #c62828 !important;
}
#liveToast.text-bg-danger .toast-icon { color: #c62828; }

#liveToast.text-bg-warning {
    background: white !important;
    border-left: 3.5px solid #d4870a !important;
}
#liveToast.text-bg-warning .toast-icon { color: #d4870a; }

/* Desktop: esquina inferior derecha (se oculta el nav pill en 992px) */
@media (min-width: 992px) {
    .toast-container {
        bottom: 1.5rem;
        left: auto;
        right: 1.5rem;
        transform: none;
        width: auto;
        max-width: 360px;
    }
    #liveToast.toast {
        min-width: 260px;
    }
}

.product-observations {
    font-size: 0.7rem;
    color: var(--color-texto-claro);
    margin: 2px 0 4px 0;
    line-height: 1.35;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ────────────────────────────────────────────────────────────────────
   13. RESPONSIVE
   ──────────────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

@media (max-width: 576px) {
    .modal-product-image {
        height: 300px;
    }

    .offcanvas {
        width: 90% !important;
    }
}


/* ────────────────────────────────────────────────────────────────────
   VISOR DE PANTALLA COMPLETA ESTILO SHEIN
   ──────────────────────────────────────────────────────────────────── */
.image-zoom-overlay {
    position: fixed;
    inset: 0;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    /* visibility cambia después del fade-out; aparece antes del fade-in */
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Propagar pointer-events:none a TODOS los hijos cuando el overlay está inactivo.
   Sin esto los botones hijos capturan clics aunque el overlay sea invisible. */
.image-zoom-overlay * {
    pointer-events: none;
}
.image-zoom-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    /* Al activar: visibility visible de inmediato, luego inicia el fade-in */
    transition: opacity 0.22s ease, visibility 0s linear;
}
.image-zoom-overlay.active * {
    pointer-events: auto;
}

/* ── Barra superior ── */
.izoom-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    height: 52px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.izoom-icon-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.izoom-icon-btn:active {
    background: rgba(0,0,0,0.07);
}
/* Botón expandir sin funcionalidad en iOS → oculto para no confundir */
.izoom-expand {
    display: none;
}

.izoom-counter {
    color: #666;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: var(--fuente-principal, sans-serif);
}

/* ── Área de imagen ── */
.izoom-img-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #fff;
    cursor: default;
}

.zoomed-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.15s ease;
}

/* ── Barra inferior: color + swatches + botón ── */
.izoom-bottombar {
    flex-shrink: 0;
    background: #1a1a1a;
    padding: 10px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.izoom-color-label {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--fuente-principal, sans-serif);
    min-height: 16px;
}

.izoom-swatches {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.izoom-swatches::-webkit-scrollbar { display: none; }

.izoom-swatch {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    background: #555;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.2);
}
.izoom-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.6);
    transform: scale(1.12);
}
.izoom-swatch:not(.active):active {
    transform: scale(0.92);
}

.izoom-add-btn {
    width: 100%;
    background: #1a1a1a;
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-family: var(--fuente-principal, sans-serif);
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.18s;
    -webkit-tap-highlight-color: transparent;
}
.izoom-add-btn:active {
    background: #333;
}
.izoom-add-btn:disabled,
.izoom-add-btn.unavailable {
    opacity: 0.45;
    cursor: default;
}

/* Ocultar si no hay colores */
.izoom-bottombar.no-colors .izoom-color-label,
.izoom-bottombar.no-colors .izoom-swatches {
    display: none;
}

/* Cursor de zoom en imagen del modal - estilos en bloque #productModal */

/* ═══════════════════════════════════════════════════════════════════
   PROTECCIÓN DE IMÁGENES - Anti-descarga
   ═══════════════════════════════════════════════════════════════════ */

/* Deshabilitar selección de imágenes */
.product-card img,
.modal-product-image,
.zoomed-image {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Deshabilitar arrastrar imágenes */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Marca de agua sutil en imágenes de productos (opcional) */
.product-image-wrapper::after,
.modal-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    /* Products header optimizado */
    .products-header {
        padding: 0.75rem 0.5rem;
        gap: 0.75rem;
    }

    .products-count {
        font-size: 0.85rem;
        flex: 1;
        min-width: 0;
    }

    /* Descripción de producto compacta en móvil */
    .product-description {
        font-size: 0.68rem !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 1 !important;
        margin-bottom: 0.25rem !important;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .products-header {
        padding: 0.85rem;
    }

    .products-count {
        font-size: 0.9rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PROMOCIONES GLOBALES - BLACK FRIDAY
   ═══════════════════════════════════════════════════════════════════ */

/* Banner de Promoción Global */
.global-promo-banner {
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1050;
}

.global-promo-banner.blackfriday-banner {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    color: #fff;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
    border-bottom: 2px solid #ff0000;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.promo-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.promo-icon {
    font-size: 1.3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.promo-text {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.promo-text strong {
    color: #ff0000;
    font-weight: 800;
    text-transform: uppercase;
    animation: colorPulse 2s ease-in-out infinite;
}

@keyframes colorPulse {
    0%, 100% { color: #ff0000; }
    50% { color: #ff3333; }
}

/* Tema Black Friday - Ajustes globales */
body.blackfriday-theme {
    /* Mantener el diseño original pero con sutiles acentos */
}

body.blackfriday-theme .navbar {
    border-bottom: 2px solid rgba(255, 0, 0, 0.2);
}

body.blackfriday-theme .product-card:hover {
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.15);
}

body.blackfriday-theme .badge-promo {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateY(0); box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4); }
    50% { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 0, 0, 0.6); }
}

body.blackfriday-theme .btn-primary {
    background: linear-gradient(135deg, #D988B9, #E3B0CC);
    position: relative;
    overflow: hidden;
}

body.blackfriday-theme .btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

/* Responsive para el banner */
@media (max-width: 768px) {
    .promo-text {
        font-size: 0.8rem;
    }

    .promo-icon {
        font-size: 1.1rem;
    }

    .global-promo-banner {
        padding: 10px 0;
    }
}

/* ===== CHECKOUT - DISEÑO LIMPIO Y PROFESIONAL ===== */

#checkoutModal .modal-dialog {
    max-width: 520px;
}

#checkoutModal .modal-content.checkout-premium {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header limpio */
#checkoutModal .checkout-header {
    background: white;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 20px 24px;
    position: relative;
}

.pulse-dot { display: none; }

.header-content {
    text-align: left;
}

#checkoutModal .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-texto);
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
}

.header-subtitle {
    color: var(--color-texto-claro);
    font-size: 0.78rem;
    margin: 0;
    font-weight: 400;
}

.btn-close-white {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
    filter: none;
}

/* Body limpio */
#checkoutModal .modal-body {
    padding: 20px 24px 24px;
    background: #fafafa;
    max-height: 65vh;
    overflow-y: auto;
}

#checkout-form {
    position: relative;
    z-index: 1;
}

/* Secciones del form - sin cards flotantes */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    transition: border-color 0.2s ease;
}

.form-card:focus-within {
    border-color: var(--color-primario);
}

.form-card[data-card="1"],
.form-card[data-card="2"],
.form-card[data-card="3"],
.form-card[data-card="4"] {
    animation: none;
    opacity: 1;
    transform: none;
}

/* Headers de sección */
.card-header-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.card-icon {
    font-size: 1.1rem;
    filter: none;
}

.card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-texto);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 12px;
}

.form-group-modern:last-child {
    margin-bottom: 0;
}

/* Labels */
.selector-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--color-texto);
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.label-icon {
    font-size: 0.95rem;
}

/* Inputs limpios */
.form-control-modern,
.form-select.form-control-modern {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 400;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    color: var(--color-texto);
}

.form-control-modern:hover {
    border-color: #bbb;
}

.form-control-modern:focus {
    border-color: var(--color-primario);
    background: white;
    box-shadow: 0 0 0 3px rgba(217, 136, 185, 0.1);
    outline: none;
    transform: none;
}

textarea.form-control-modern {
    resize: none;
    min-height: 60px;
}

.form-control-modern::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Small text */
.form-group-modern small.text-muted {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #999;
    padding-left: 2px;
}

/* Payment Info */
#payment-info {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

#payment-info.text-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

/* Cash Payment Section */
#cash-payment-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
}

/* Change Card */
.change-card {
    background: white;
    border: 1px solid var(--color-primario);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.change-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.change-item.highlight {
    background: var(--color-primario-claro);
    margin: 6px -12px -12px;
    padding: 10px 12px;
    border-radius: 0 0 7px 7px;
}

.change-label {
    font-weight: 500;
    color: #666;
    font-size: 0.82rem;
}

.change-value {
    font-weight: 700;
    color: var(--color-texto);
    font-size: 0.95rem;
}

.change-item.highlight .change-value {
    font-size: 1.1rem;
    color: var(--color-primario);
}

/* Botón confirmar - limpio */
.btn-submit-premium {
    width: 100%;
    background: var(--color-texto);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 16px;
    transition: background 0.2s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.btn-submit-premium:hover {
    background: var(--color-primario-oscuro);
    transform: translateY(-1px);
}

.btn-submit-premium:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-submit-premium:hover .btn-icon {
    transform: translateX(3px);
}

/* Delivery Info */
.delivery-info {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
}

.delivery-info .info-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.delivery-info .info-content {
    color: #a16207;
    font-size: 0.75rem;
    margin-bottom: 8px;
    font-weight: 400;
}

.delivery-info .cedula-display {
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--color-texto);
    border: 1px solid #fbbf24;
    font-size: 0.88rem;
}

/* Order Summary */
.order-summary {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-label {
    font-weight: 500;
    color: #666;
    font-size: 0.85rem;
}

.summary-value {
    font-weight: 600;
    color: var(--color-texto);
    font-size: 0.95rem;
}

.summary-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.summary-row.total-row {
    background: white;
    margin: 0 -12px -12px;
    padding: 14px 12px;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #eee;
}

.summary-label-total {
    font-weight: 700;
    color: var(--color-texto);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value-total {
    font-weight: 800;
    color: var(--color-primario);
    font-size: 1.3rem;
}

.form-card[data-card="4"] {
    border: 1px solid var(--color-primario);
}

/* Responsive checkout */
@media (max-width: 575.98px) {
    #checkoutModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
    }

    #checkoutModal .modal-content.checkout-premium {
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh;
    }

    #checkoutModal .modal-body {
        max-height: none;
        padding: 16px;
    }

    .form-card {
        padding: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   MODAL DE PRODUCTO — REDISEÑO COMPLETO BOUTIQUE
   ═══════════════════════════════════════════════════════════════════ */

/* Dialog: ancho máximo */
#productModal .mpd {
    max-width: 900px;
    margin: auto;
}

/* Content: sin borde, redondeado; altura máxima que cabe en pantalla */
#productModal .mpc {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    background: white;
    position: relative;
    box-shadow: 0 24px 72px rgba(0,0,0,0.14);
    display: flex;
    flex-direction: column;
    max-height: min(92dvh, 700px);
}

/* Botón cerrar — flotante sobre la imagen */
.mp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
    backdrop-filter: blur(6px);
    line-height: 1;
}

.mp-close:hover {
    background: white;
    transform: rotate(90deg);
}

/* Grid 2 columnas: imagen | info — llena todo el dialog */
.mp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Columna imagen */
.mp-img-col {
    background: #f4f0ef;
    overflow: hidden;
    position: relative;
    cursor: default;
}

/* ─── Galería: wrapper flex que contiene thumbnails + imagen principal ─── */
.mp-gallery-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Tira de thumbnails vertical a la izquierda */
.mp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 8px;
    overflow-y: auto;
    background: #ede9e8;
    min-width: 70px;
    max-width: 70px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.mp-thumbs:empty,
.mp-thumbs[style*="display: none"],
.mp-thumbs[style*="display:none"] {
    display: none !important;
}

.mp-thumb {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #fff;
    transition: border-color 0.15s;
}
.mp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mp-thumb:hover {
    border-color: var(--color-primario, #D988B9);
}
.mp-thumb.active {
    border-color: var(--color-primario, #D988B9);
    box-shadow: 0 0 0 1px var(--color-primario, #D988B9);
}

/* Wrapper imagen principal — ocupa el espacio restante */
.mp-main-img-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

#productModal .modal-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
/* Estado de carga al cambiar color en la galería (fallback) */
#productModal .modal-product-image.gallery-loading {
    opacity: 0.4;
}

/* La transición de imagen se maneja con inline styles desde JS */

/* hover zoom desactivado: las animaciones de swipe lo reemplazan */
#productModal .modal-product-image:hover {
    transform: none;
}

/* Contador de posición X/N estilo SHEIN */
.mp-swipe-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 7;
    pointer-events: none;
    font-family: var(--fuente-principal, sans-serif);
}

/* Botón de zoom flotante sobre la imagen */
.mp-zoom-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 0.8rem;
    z-index: 5;
    transition: background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mp-zoom-btn:hover,
.mp-zoom-btn:active {
    background: white;
    transform: scale(1.12);
}

/* ─── Flechas de navegación prev/next (swipe entre colores) ─── */
.mp-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 52px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none;
    border-radius: 6px;
    font-size: 1.7rem;
    line-height: 1;
    color: #444;
    cursor: pointer;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}
.mp-nav-prev { left: 6px; }
.mp-nav-next { right: 6px; }

/* Mostrar flechas al pasar el cursor (desktop) */
.mp-main-img-wrapper:hover .mp-nav-arrow {
    opacity: 1;
}
/* En móvil siempre visibles cuando tienen contenido */
@media (max-width: 767px) {
    .mp-nav-arrow {
        opacity: 0.85;
        width: 30px;
        height: 44px;
        font-size: 1.4rem;
    }
}
.mp-nav-arrow:disabled {
    opacity: 0.2 !important;
    cursor: default;
}
.mp-nav-arrow:not(:disabled):hover {
    background: white;
}
.mp-nav-arrow:not(:disabled):active {
    transform: translateY(-50%) scale(0.93);
}

/* ─── Puntos de color (indicador de variante activa) ─── */
.mp-color-dots {
    display: none !important;  /* se quita: el contador y los botones de color ya indican la posición */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 6;
    padding: 4px 8px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
}

.mp-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.18);
}
.mp-color-dot.active {
    transform: scale(1.25);
    box-shadow: 0 0 0 2.5px white, 0 0 0 4px rgba(0,0,0,0.25);
}
.mp-color-dot:not(.active):hover {
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .mp-color-dots {
        bottom: 42px;
        gap: 5px;
    }
    .mp-color-dot {
        width: 13px;
        height: 13px;
    }
}

/* Columna info — scroll interno si el contenido excede */
.mp-info-col {
    padding: 36px 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    min-height: 0;
}

/* Nombre del producto */
.mp-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-texto);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

/* Descripción */
.mp-desc {
    font-size: 0.79rem;
    color: var(--color-texto-secundario);
    line-height: 1.75;
    margin: 0 0 14px 0;
}

/* Bloque de precio */
.mp-price-block {
    margin-bottom: 18px;
}

.mp-price-block .price-detal-modal .price-detal-old {
    display: block;
    font-size: 0.88rem;
    color: var(--color-texto-claro);
    text-decoration: line-through;
    font-weight: 400;
    margin-bottom: 2px;
}

.mp-price-block .price-detal-modal .price-detal {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-texto);
    letter-spacing: -0.5px;
    line-height: 1;
}

.mp-price-block .price-mayor-modal .price-mayor {
    font-size: 0.76rem;
    color: var(--color-texto-secundario);
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

/* Divisor */
.mp-divider {
    height: 1px;
    background: #eeeeee;
    margin: 4px 0 20px;
}

/* Grupos de selector */
.mp-group {
    margin-bottom: 18px;
}

.mp-group--obs {
    margin-top: auto;
    padding-top: 6px;
    margin-bottom: 0;
}

/* Etiqueta de selector */
.mp-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-texto-claro);
    margin-bottom: 9px;
}

.mp-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-style: italic;
    font-size: 0.62rem;
}

/* Botones talla/color */
#productModal .size-color-buttons {
    gap: 6px;
    margin-top: 0;
}

#productModal .size-color-btn {
    padding: 7px 13px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border: 1.5px solid #ddd;
    border-radius: 0;
    background: white;
    min-width: 40px;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
    font-family: var(--fuente-principal);
}

#productModal .size-color-btn:hover:not(:disabled) {
    border-color: var(--color-primario);
    background: var(--color-primario-claro);
    transform: none;
    box-shadow: none;
}

#productModal .size-color-btn.selected {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    box-shadow: none;
}

#productModal .size-color-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
}

#productModal .size-color-btn.unica-talla,
#productModal .size-color-btn.unico-color {
    border-color: var(--color-primario);
    background: var(--color-primario-claro);
    color: var(--color-primario-oscuro);
    cursor: default;
}

/* ─── Botones de color con swatch ─── */
#productModal .size-color-btn.has-swatch,
#colores-buttons .size-color-btn.has-swatch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 4px 2px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 10px;
    width: auto;
    height: auto;
    min-width: 44px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

#productModal .size-color-btn.has-swatch.selected,
#colores-buttons .size-color-btn.has-swatch.selected {
    background: transparent;
    border-color: transparent;
    color: inherit;
}

#productModal .size-color-btn.has-swatch:hover:not(.selected),
#colores-buttons .size-color-btn.has-swatch:hover:not(.selected) {
    transform: scale(1.08);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.color-swatch-circle {
    display: inline-block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.13);
    box-shadow: 0 1px 4px rgba(0,0,0,0.14);
    flex-shrink: 0;
    transition: box-shadow 0.15s ease;
}

.color-swatch-name {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-texto);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    max-width: 50px;
    line-height: 1.2;
    word-break: break-word;
}

.color-name-label {
    font-weight: 700;
    color: var(--color-texto);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.7rem;
}

#productModal .size-color-btn.has-swatch.selected .color-swatch-circle,
#colores-buttons .size-color-btn.has-swatch.selected .color-swatch-circle {
    box-shadow: 0 0 0 2.5px white, 0 0 0 4.5px #333;
    border-color: transparent;
}

/* Mensaje ayuda color */
.mp-color-help {
    font-size: 0.72rem;
    color: var(--color-texto-claro);
    font-style: italic;
    margin-bottom: 6px;
}

/* Aviso de selección de color */
.color-select-hint {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 0.63rem;
    font-weight: 600;
    color: var(--color-primario-oscuro);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.color-select-hint.visible {
    display: flex;
}

.color-select-hint::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primario);
    flex-shrink: 0;
    display: block;
}

/* Fila cantidad + stock */
.mp-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.mp-group--qty {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Selector de cantidad */
.mp-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #ddd;
    overflow: hidden;
}

.mp-qty-btn {
    width: 34px;
    height: 34px;
    background: white;
    border: none;
    font-size: 1.05rem;
    color: var(--color-texto);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-family: var(--fuente-principal);
    flex-shrink: 0;
}

.mp-qty-btn:hover {
    background: #f5f5f5;
}

#select-cantidad {
    width: 46px;
    height: 34px;
    border: none;
    border-left: 1.5px solid #ddd;
    border-right: 1.5px solid #ddd;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--fuente-principal);
    background: white;
    color: var(--color-texto);
    -moz-appearance: textfield;
}

#select-cantidad::-webkit-outer-spin-button,
#select-cantidad::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Stock en línea */
.mp-stock {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-texto-claro);
    line-height: 1.3;
}

/* Botón agregar al carrito */
.mp-btn-add {
    width: 100%;
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-family: var(--fuente-principal);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
}

.mp-btn-add:hover:not(:disabled) {
    background: var(--color-primario-oscuro);
}

.mp-btn-add:disabled {
    background: #d0d0d0;
    cursor: not-allowed;
}

/* Textarea de observación */
.mp-obs {
    width: 100%;
    border: 1.5px solid #e8e8e8;
    border-radius: 0;
    padding: 9px 12px;
    font-size: 0.78rem;
    font-family: var(--fuente-principal);
    color: var(--color-texto);
    resize: none;
    outline: none;
    transition: border-color 0.18s;
    background: #fafafa;
    margin-top: 0;
}

.mp-obs:focus {
    border-color: var(--color-primario);
    background: white;
}

.mp-obs::placeholder {
    color: #bbb;
    font-weight: 400;
}

/* ── RESPONSIVE: tablet ── */
@media (max-width: 991.98px) {
    #productModal .mpd {
        max-width: 700px;
    }
}

/* ── RESPONSIVE: mobile — pantalla completa, sin scroll externo ── */
@media (max-width: 767.98px) {
    #productModal {
        padding: 0 !important;
    }

    #productModal .mpd {
        margin: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100dvh;
    }

    #productModal .mpc {
        border-radius: 0;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Grid en columna única: imagen completa + info desplazan juntos */
    .mp-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    /* Imagen: altura natural, sin recorte */
    .mp-img-col {
        flex-shrink: 0;
    }

    /* Sin miniaturas en móvil — el contador reemplaza la navegación */
    .mp-gallery-wrapper {
        flex-direction: column;
    }
    .mp-thumbs {
        display: none !important;
    }

    /* Imagen sin scroll interno — se desplaza junto con el resto */
    .mp-main-img-wrapper {
        overflow: visible;
        align-items: flex-start;
    }

    /* Imagen ocupa el ancho completo con altura natural (no recortada, desplazable) */
    #productModal .modal-product-image {
        height: auto;
        width: 100%;
        object-fit: unset;
        background: #f0ebe9;
        transform: none !important;
    }
    #productModal .modal-product-image:hover {
        transform: none;
    }

    /* Contador en esquina inferior derecha (SHEIN style) */
    .mp-swipe-counter {
        bottom: 12px;
        right: 12px;
    }

    /* Zoom se mueve a la esquina superior derecha en móvil */
    .mp-zoom-btn {
        bottom: auto;
        top: 12px;
        right: 12px;
    }

    /* Flechas ocultas en móvil: el gesto táctil navega */
    .mp-nav-arrow {
        display: none !important;
    }

    /* Puntos de color reposicionados (no solapan el contador) */
    .mp-color-dots {
        bottom: 12px;
        left: 12px;
        right: auto;
        transform: none;
    }

    /* Info: flujo normal junto a la imagen, sin scroll interno */
    .mp-info-col {
        flex: 0 0 auto;
        overflow-y: visible;
        overflow-x: visible;
        padding: 12px 16px 18px;
    }

    /* Quitar el push al fondo en móvil */
    .mp-group--obs {
        margin-top: 0;
    }

    /* Compactar todo el contenido */
    .mp-name {
        font-size: 0.7rem;
        letter-spacing: 1.8px;
        margin-bottom: 4px;
    }

    .mp-desc {
        font-size: 0.73rem;
        line-height: 1.5;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mp-price-block {
        margin-bottom: 6px;
    }

    .mp-price-block .price-detal-modal .price-detal {
        font-size: 1.35rem;
    }

    .mp-divider {
        margin: 2px 0 8px;
    }

    .mp-group {
        margin-bottom: 8px;
    }

    .mp-label {
        font-size: 0.57rem;
        margin-bottom: 5px;
    }

    #productModal .size-color-btn {
        padding: 5px 10px;
        font-size: 0.62rem;
    }

    #productModal .size-color-buttons {
        gap: 5px;
    }

    .mp-qty-row {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
    }

    .mp-qty-btn {
        width: 30px;
        height: 30px;
    }

    #select-cantidad {
        height: 30px;
    }

    .mp-btn-add {
        padding: 11px 16px;
        margin-bottom: 10px;
        font-size: 0.64rem;
    }

    .mp-obs {
        height: 30px;
        resize: none;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    /* Botón cerrar fijo — visible al hacer scroll */
    .mp-close {
        position: fixed;
        z-index: 1060;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        right: calc(env(safe-area-inset-right, 0px) + 12px);
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   MODAL CONFIRMAR ELIMINACIÓN — BOUTIQUE
   ═══════════════════════════════════════════════════════════════════ */

.dcm-dialog {
    max-width: min(360px, calc(100vw - 32px));
    margin: auto;
}

.dcm-content {
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: white;
    position: relative;
    box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}

.dcm-body {
    padding: 40px 28px 28px;
}

.dcm-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-texto);
    margin: 0 0 10px 0;
}

.dcm-text {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.dcm-actions {
    display: flex;
    gap: 10px;
}

.dcm-btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    background: white;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-texto-secundario);
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: var(--fuente-principal);
}

.dcm-btn-cancel:hover {
    border-color: #bbb;
}

.dcm-btn-delete {
    flex: 1;
    padding: 12px;
    border: none;
    background: #1a1a1a;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--fuente-principal);
}

.dcm-btn-delete:hover {
    background: #333;
}

/* ═══════════════════════════════════════════════════════════════════
   CARRITO (OFFCANVAS) — ESTILO BOUTIQUE
   ═══════════════════════════════════════════════════════════════════ */

/* Header del offcanvas */
#cartOffcanvas .offcanvas-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: white;
}

#cartOffcanvas .offcanvas-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-texto);
}

/* Items del carrito */
.cart-item {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

/* Imagen del producto en carrito */
.cart-item-image {
    width: 68px;
    height: 88px;
    object-fit: cover;
    border-radius: 0;
    border: none;
    background: #f4f0ef;
    flex-shrink: 0;
}

/* Nombre del producto */
.cart-item h6 {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--color-texto);
    margin-bottom: 3px !important;
    line-height: 1.4 !important;
}

/* Talla / color */
.cart-item small.text-muted {
    font-size: 0.68rem;
    color: var(--color-texto-claro) !important;
    letter-spacing: 0.3px;
}

/* Precio × cantidad */
.cart-item .d-flex > span {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--color-texto);
}

/* Botón eliminar — minimal */
.cart-item .btn-outline-danger {
    border: 1.5px solid #e0e0e0 !important;
    color: #bbb !important;
    border-radius: 0 !important;
    background: white !important;
    box-shadow: none !important;
    transition: border-color 0.15s, color 0.15s !important;
}

.cart-item .btn-outline-danger:hover {
    border-color: #e53935 !important;
    color: #e53935 !important;
    background: white !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Footer: total + botón */
.cart-total {
    background: white;
    padding: 20px 24px;
    border-top: 1px solid #eee;
}

.total-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-texto-claro);
}

.total-amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-texto);
    letter-spacing: -0.5px;
}

/* Botón "Finalizar Pedido" */
#cartOffcanvas .btn-primary {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    border-radius: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    padding: 14px 20px !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background 0.2s !important;
}

#cartOffcanvas .btn-primary:hover {
    background: var(--color-primario-oscuro) !important;
    border-color: var(--color-primario-oscuro) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Estado vacío */
#cart-empty i {
    color: var(--color-texto-claro);
}

/* Advertencia de stock */
#cartOffcanvas .alert-warning {
    border-radius: 0;
    border: none;
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
    font-size: 0.78rem;
    padding: 10px 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   CHECKOUT — ESTILO BOUTIQUE
   ═══════════════════════════════════════════════════════════════════ */

/* Ajuste de redondeo del modal */
#checkoutModal .modal-content.checkout-premium {
    border-radius: 16px;
}

/* Título del header */
#checkoutModal .modal-title {
    font-size: 0.78rem;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Subtítulo */
.header-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.2px;
}

/* Body del checkout */
#checkoutModal .modal-body {
    background: #f8f7f4;
}

/* Cards de sección — esquinas cuadradas, borde fino */
.form-card {
    border-radius: 0;
    border: 1px solid #e8e8e8;
    padding: 18px 20px;
}

/* Headers internos de card */
.card-header-mini {
    margin-bottom: 18px;
}

.card-icon {
    font-size: 0.85rem;
    color: var(--color-texto-claro);
}

/* Título de cada sección del form */
.card-title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-texto-claro);
}

/* Labels de cada campo — igual que mp-label */
#checkout-form .selector-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--color-texto-claro);
    margin-bottom: 7px;
    gap: 0;
}

/* Inputs — cuadrados */
.form-control-modern,
.form-select.form-control-modern {
    border-radius: 0;
    border: 1.5px solid #e8e8e8;
    font-size: 0.83rem;
    padding: 10px 13px;
    box-shadow: none;
}

.form-control-modern:focus,
.form-select.form-control-modern:focus {
    border-color: var(--color-primario);
    box-shadow: none;
    outline: none;
}

/* Card de efectivo */
#cash-payment-section {
    border-radius: 0;
}

/* Tarjeta de vuelto */
.change-card {
    border-radius: 0;
    border: 1px solid #e8e8e8;
}

.change-item.highlight {
    border-radius: 0;
}

.change-item.highlight .change-value {
    color: var(--color-texto);
}

/* Resumen */
.order-summary {
    border-radius: 0;
}

.form-card[data-card="4"] {
    border: 1.5px solid #1a1a1a;
}

.summary-label-total {
    font-size: 0.62rem;
    letter-spacing: 2px;
    color: var(--color-texto-claro);
}

.summary-value-total {
    font-size: 1.5rem;
    color: var(--color-texto);
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* Botón confirmar — igual que mp-btn-add */
.btn-submit-premium {
    border-radius: 0;
    background: #1a1a1a;
    font-size: 0.7rem;
    letter-spacing: 2.5px;
    padding: 15px 20px;
    gap: 8px;
    box-shadow: none;
    transform: none;
}

.btn-submit-premium:hover {
    background: var(--color-primario-oscuro);
    transform: none;
    box-shadow: none;
}

/* Checkout — Bottom Sheet en móvil */
@media (max-width: 767.98px) {
    /* Animación: sube desde abajo */
    #checkoutModal.fade .modal-dialog {
        transform: translateY(60px);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #checkoutModal.show .modal-dialog {
        transform: translateY(0);
    }

    /* Dialog pegado al fondo, ancho completo */
    #checkoutModal .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Contenido: esquinas redondeadas arriba, altura máxima */
    #checkoutModal .modal-content.checkout-premium {
        border-radius: 20px 20px 0 0 !important;
        max-height: 92dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* Handle visual arriba */
    #checkoutModal .modal-header.checkout-header {
        position: relative;
        padding-top: 1.35rem;
        flex-shrink: 0;
    }
    #checkoutModal .modal-header.checkout-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(0, 0, 0, 0.12);
    }

    /* Body scrollable */
    #checkoutModal .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 65dvh;
    }

    /* Footer no sangra detrás del nav */
    #checkoutModal .modal-footer {
        flex-shrink: 0;
        padding-bottom: calc(env(safe-area-inset-bottom, 8px) + 0.75rem);
    }
}

/* ════════════════════════════════════════════════════════════════
   SECCIÓN VENTAS — DISEÑO RESPONSIVE MOBILE-FIRST
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   SECCIÓN VENTAS — REDISEÑO MODERNO POS
   ════════════════════════════════════════════════════════════════ */

/* ── Header ── */
.sv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.sv-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    letter-spacing: -0.02em;
}

.sv-tabs {
    display: flex;
    gap: 5px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
}

.sv-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sv-tab.active {
    background: linear-gradient(135deg, #f472b6 0%, #D988B9 50%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

/* ── Formulario general ── */
.sv-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 680px;
}

/* ── Secciones / Cards ── */
.sv-section {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sv-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #4b5563;
}

.sv-section-header i {
    color: var(--brand-500, #D988B9);
    font-size: 0.9rem;
}

.sv-section-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Cliente ── */
.sv-client-input {
    cursor: pointer !important;
    font-weight: 600;
    color: #1a1a2e;
}

.sv-btn-add-client {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6b7280;
}

.sv-btn-add-client:hover {
    background: #fdf2f8;
    border-color: var(--brand-300, #f9a8d4);
    color: var(--brand-600, #c026d3);
}

.sv-client-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ── Tipo + Entrega ── */
.sv-section-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.sv-inline-group {
    padding: 12px 16px;
}

.sv-inline-group:first-child {
    border-right: 1px solid #e9ecef;
}

.sv-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sv-field-label i {
    color: var(--brand-500, #D988B9);
}

/* ── Productos ── */
.sv-ig-text {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6b7280;
}

.sv-btn-search-product {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1.5px solid #f0e6f6;
    color: var(--brand-700, #a21caf);
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.2s;
}

.sv-btn-search-product:hover {
    background: linear-gradient(135deg, #fce7f3 0%, #f5d0fe 100%);
    border-color: var(--brand-400, #f472b6);
    color: var(--brand-800, #86198f);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(168, 85, 247, 0.2);
}

.sv-btn-camera {
    background: linear-gradient(135deg, #D988B9 0%, #c45fa0 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.2s;
}

.sv-btn-camera:hover,
.sv-btn-camera:active {
    background: linear-gradient(135deg, #c45fa0 0%, #a83f84 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(217, 136, 185, 0.4);
}

/* ── Catálogo ── */
.sv-catalog-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sv-catalog-qty {
    max-width: 75px;
    flex-shrink: 0;
}

/* ── Carrito ── */
.sv-cart {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sv-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-bottom: 1px solid #f0e6f6;
}

.sv-cart-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #4b5563;
}

.sv-cart-title i {
    color: var(--brand-500, #D988B9);
}

.sv-cart-count {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    background: rgba(168, 85, 247, 0.1);
    color: var(--brand-700, #a21caf);
    border-radius: 20px;
}

.sv-cart-body {
    min-height: 60px;
}

/* ── Panel de Pago ── */
.sv-payment {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sv-payment-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sv-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Notas + Descuento */
.sv-notes-discount {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.sv-discount-wrap {
    min-width: 130px;
}

.sv-discount-row {
    display: flex;
    gap: 5px;
}

/* Total */
.sv-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f472b6 0%, #D988B9 50%, #a855f7 100%);
    color: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.sv-total-label {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.9;
}

.sv-total-amount {
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* Métodos de pago */
.sv-pay-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sv-pay-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-align: center;
    background: #f9fafb;
}

.sv-pay-option i {
    font-size: 1.3rem;
}

.btn-check:checked + .sv-pay-option {
    border-color: var(--brand-400, #f472b6);
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: var(--brand-700, #a21caf);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

.sv-pay-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sv-change-info {
    font-size: 0.82rem;
    color: #059669;
    font-weight: 600;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.sv-change-danger {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.sv-mixto-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Botón Registrar Venta */
.sv-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f472b6 0%, #D988B9 50%, #a855f7 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

.sv-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.55);
}

.sv-submit-btn:active {
    transform: translateY(0);
}

/* ── Filtros del historial ── */
.sv-filters {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sv-filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    padding: 0 14px;
    transition: border-color 0.2s;
}

.sv-filter-search:focus-within {
    border-color: var(--brand-300, #f9a8d4);
    background: #fff;
}

.sv-filter-icon {
    color: #9ca3af;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sv-filter-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #1a1a2e;
    outline: none;
}

.sv-filter-input::placeholder {
    color: #9ca3af;
}

.sv-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sv-filter-row > .form-select,
.sv-filter-row > .form-control {
    flex: 1;
    min-width: 100px;
}

/* ════════════════════════════════════════════════════════════════
   CARRITO — clases vf-* usadas por renderCarrito() JS
   ════════════════════════════════════════════════════════════════ */

.vf-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    color: #c4a1d4;
    text-align: center;
}

.vf-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.vf-cart-item:last-child {
    border-bottom: none;
}

.vf-cart-item:hover {
    background: #fdf9fe;
}

.vf-cart-item-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #f0e6f6;
}

.vf-cart-item-img-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.1rem;
}

.vf-cart-item-info {
    flex: 1;
    min-width: 0;
}

.vf-cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-cart-item-unit {
    font-size: 0.75rem;
    color: #9b7db5;
    margin-top: 1px;
}

.vf-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vf-qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    height: 34px;
}

.vf-qty-btn {
    border: none;
    background: #f9fafb;
    width: 32px;
    height: 100%;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--brand-600, #c026d3);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.vf-qty-btn:hover {
    background: #fce7f3;
    color: var(--brand-700, #a21caf);
}

.vf-qty-input {
    width: 38px;
    height: 100%;
    border: none;
    border-left: 1.5px solid #e5e7eb;
    border-right: 1.5px solid #e5e7eb;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    -moz-appearance: textfield;
    padding: 0;
    background: #fff;
    color: #1a1a2e;
}

.vf-qty-input::-webkit-outer-spin-button,
.vf-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vf-cart-item-total {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-600, #c026d3);
    min-width: 70px;
    text-align: right;
}

.vf-cart-item-remove {
    border: none;
    background: transparent;
    color: #e8708a;
    padding: 4px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.vf-cart-item-remove:hover {
    background: #ffeef2;
    color: #dc3545;
}

/* ════════════════════════════════════════════════════════════════
   HISTORIAL DE VENTAS — clases usadas por renderSales() JS
   ════════════════════════════════════════════════════════════════ */

.ventas-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 580px) {
    .ventas-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .ventas-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ventas-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 16px;
    text-align: center;
}

.venta-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

.venta-card::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--grad-brand, linear-gradient(90deg, #f472b6, #D988B9, #a855f7));
    opacity: 0.6;
}

.venta-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.venta-card[data-estado="Anulada"]::before,
.venta-card[data-estado="Cancelada"]::before {
    background: linear-gradient(90deg, #f87171, #ef4444);
    opacity: 1;
}
.venta-card[data-estado="Pendiente"]::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    opacity: 1;
}
.venta-card[data-estado="Completada"]::before {
    background: linear-gradient(90deg, #34d399, #10b981);
    opacity: 1;
}

.venta-card-head {
    padding: 12px 15px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.venta-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.venta-card-fecha {
    font-size: 0.72rem;
    color: #9b7db5;
    font-weight: 500;
}

.venta-card-cliente-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.venta-card-cliente {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venta-card-products {
    padding: 10px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    border-bottom: 1px solid #f3f4f6;
}

.venta-prod-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.venta-prod-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1.5px solid #e9ecef;
}

.venta-prod-img-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.1rem;
    border: 1.5px solid #e9ecef;
}

.venta-prod-info {
    flex: 1;
    min-width: 0;
}

.venta-prod-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venta-prod-detail {
    font-size: 0.72rem;
    color: #9b7db5;
    margin-top: 2px;
}

.venta-card-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f9fafb;
    gap: 8px;
}

.venta-card-foot-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.venta-card-foot-right {
    text-align: right;
    flex-shrink: 0;
}

.venta-card-total {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--brand-600, #c026d3);
    display: block;
    letter-spacing: -0.02em;
}

.venta-card-pago {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.venta-pago-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.venta-pago-badge.efec {
    background: #d1fae5;
    color: #065f46;
}

.venta-pago-badge.transf {
    background: #dbeafe;
    color: #1e40af;
}

.venta-card-entrega {
    font-size: 0.71rem;
    color: #9b7db5;
}

.venta-card-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 15px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    flex-wrap: nowrap;
    overflow: hidden;
}

.venta-card-actions .btn-action {
    flex: 1;
    min-width: 0;
    font-size: 0.72rem;
    padding: 6px 7px;
    border-radius: 9px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-weight: 600;
    min-height: 34px;
}

.venta-card-actions .btn-action-delete {
    flex: 0 0 auto;
    min-width: 34px;
    width: 34px;
}

.venta-card-products::-webkit-scrollbar { width: 3px; }
.venta-card-products::-webkit-scrollbar-track { background: transparent; }
.venta-card-products::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 767px) {
    .sv-notes-discount {
        grid-template-columns: 1fr;
    }
    .sv-discount-wrap {
        min-width: unset;
    }
    .venta-card-actions {
        gap: 4px;
        padding: 8px 12px;
    }
    .venta-card-actions .btn-action {
        padding: 7px 5px;
        min-height: 38px;
        font-size: 0.7rem;
    }
    .sv-total-amount {
        font-size: 1.4rem;
    }
    .venta-card-total {
        font-size: 1.1rem;
    }
}

@media (max-width: 399px) {
    .vf-cart-item-total {
        min-width: 60px;
        font-size: 0.8rem;
    }
    .sv-total-amount {
        font-size: 1.25rem;
    }
    .venta-card-actions .btn-action-text {
        display: none;
    }
    .venta-card-actions .btn-action {
        min-height: 40px;
        padding: 8px 6px;
    }
    .ventas-card-grid {
        gap: 10px;
    }
    .sv-section-inline {
        grid-template-columns: 1fr;
    }
    .sv-inline-group:first-child {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
}

/* ════════════════════════════════════════════════════════════════
   SECCIÓN PRODUCTOS — FILTROS MEJORADOS
   ════════════════════════════════════════════════════════════════ */

.inv-filters-block {
    background: #fff;
    border: 1px solid #f0e6f6;
    border-left: 3px solid var(--brand-400, #f472b6);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(217,136,185,0.07);
}

.inv-filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 640px) {
    .inv-filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 960px) {
    .inv-filters-grid {
        grid-template-columns: 2fr 1fr 1fr auto;
        align-items: center;
    }
}

/* Campo de búsqueda */
.inv-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.inv-search-icon {
    position: absolute;
    left: 12px;
    color: var(--brand-500, #D988B9);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.inv-search-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1.5px solid #e8d5f0;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #fdf9fe;
    color: #2d1f3d;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.inv-search-input::placeholder { color: #b59ec8; }

.inv-search-input:focus {
    border-color: var(--brand-400, #f472b6);
    box-shadow: 0 0 0 3px rgba(244,114,182,0.12);
    background: #fff;
}

/* Selects de filtro */
.inv-select {
    padding: 9px 12px;
    border: 1.5px solid #e8d5f0;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #fdf9fe;
    color: #2d1f3d;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D988B9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.inv-select:focus {
    border-color: var(--brand-400, #f472b6);
    box-shadow: 0 0 0 3px rgba(244,114,182,0.12);
    background-color: #fff;
}

/* Fila con toggle y botón limpiar */
.inv-filters-row2 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inv-toggle-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.83rem;
    font-weight: 500;
    color: #5a3e6b;
    cursor: pointer;
    white-space: nowrap;
}

.inv-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1.5px solid #e8d5f0;
    border-radius: 10px;
    background: #fdf9fe;
    color: #9b7db5;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.inv-clear-btn:hover {
    background: #fce7f3;
    border-color: var(--brand-400, #f472b6);
    color: var(--brand-600, #c026d3);
}

/* Mejora header de la tabla de inventario */
.tbl-wrap {
    border: 1px solid #f0e6f6 !important;
}

.tbl-head {
    background: linear-gradient(90deg, #fdf2f8 0%, #fdf9fe 100%) !important;
    border-bottom: 1px solid #f0e6f6 !important;
}

.tbl-title {
    background: linear-gradient(90deg, var(--brand-600, #c026d3), var(--brand-400, #f472b6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800 !important;
}

/* Responsive: en móvil los dos selects van en columna */
@media (max-width: 639px) {
    .inv-filters-row2 {
        justify-content: space-between;
    }
    .inv-search-input,
    .inv-select {
        font-size: 0.9rem;
        padding: 10px 12px 10px 36px;
    }
    .inv-select { padding-left: 12px; }
}

/* ─── iOS/Safari: normalizar estilo nativo de inputs de fecha ─── */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
}

/* ─── iOS: evitar zoom automático al enfocar inputs (requiere font-size >= 16px) ─── */
@supports (-webkit-touch-callout: none) {
  .form-control,
  .form-select,
  .form-control-modern,
  input[type="text"],
  input[type="tel"],
  input[type="number"],
  input[type="email"],
  input[type="search"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT OVERLAY — Wizard 3 pasos, pantalla completa
   Mobile-first, sin scroll, auto-avance
   ═══════════════════════════════════════════════════════════════ */

/* Overlay base — display:none to avoid ANY transform on position:fixed
   (iOS Safari bug: inputs inside fixed+transform are non-interactive) */
.co-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    background: transparent;
}
.co-overlay.co-open {
    display: block;
}

/* Sheet — slides up via @keyframes (no persistent transform after animation,
   so iOS Safari inputs remain interactive once animation completes) */
.co-sheet {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* NO transform in resting state */
}
.co-overlay.co-open .co-sheet {
    animation: co-slide-up 0.35s cubic-bezier(.4,0,.2,1);
}
@keyframes co-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Prevent double-tap zoom on all interactive elements */
.co-overlay button,
.co-overlay input,
.co-overlay select,
.co-overlay textarea,
.co-overlay label {
    touch-action: manipulation;
}

/* ─── Header ─── */
.co-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-borde, #E5E5E5);
    flex-shrink: 0;
}
.co-header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.co-step-lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-texto, #333);
    letter-spacing: .01em;
}
.co-prog-track {
    width: 100%;
    height: 4px;
    background: var(--color-borde, #E5E5E5);
    border-radius: 2px;
    overflow: hidden;
}
.co-prog-fill {
    height: 100%;
    background: var(--color-primario, #D988B9);
    border-radius: 2px;
    transition: width 0.32s ease;
    width: 33.33%;
}
.co-icon-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-texto-secundario, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background .15s;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}
.co-icon-btn:hover { background: var(--color-primario-claro, #F5E8ED); }

/* ─── Steps — NO transforms anywhere near inputs (definitive iOS fix) ─── */
.co-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    overflow: hidden;
}
/* Slider is now just a stacking container — no width trick, no transform */
.co-slider {
    flex: 1;
    position: relative;
    min-height: 0;
}
/* Steps are absolutely stacked; only the active one is shown */
.co-step {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: none;
}
.co-step.co-step-active {
    display: block;
}

/* ─── Campos de formulario ─── */
.co-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-texto-secundario, #666);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}
.co-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-borde, #E5E5E5);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-texto, #333);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    outline: none;
}
.co-input:focus {
    border-color: var(--color-primario, #D988B9);
    box-shadow: 0 0 0 3px rgba(217,136,185,.15);
}
.co-textarea {
    resize: none;
    min-height: 68px;
}
.co-field { display: flex; flex-direction: column; }

/* ─── Autocomplete de barrios ─── */
.neighborhood-autocomplete { position: relative; }
.neighborhood-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--color-primario, #D988B9);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.neighborhood-suggestion-item {
    padding: 11px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #fce7f3;
}
.neighborhood-suggestion-item:last-child { border-bottom: none; }
.neighborhood-suggestion-item:hover,
.neighborhood-suggestion-item.ns-active { background: #fdf2f8; color: #be185d; }
.neighborhood-autocomplete .co-input:focus,
.neighborhood-autocomplete .form-control-modern:focus { border-radius: 10px 10px 0 0; }
.neighborhood-new-badge {
    font-size: 11px;
    color: #9ca3af;
    float: right;
    margin-top: 1px;
}

/* ─── Botón Continuar ─── */
.co-btn-next {
    width: 100%;
    padding: 14px;
    background: var(--color-primario, #D988B9);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, opacity .15s, transform .1s;
    margin-top: auto;
}
.co-btn-next:hover:not(:disabled) {
    background: var(--color-primario-oscuro, #C273A2);
    transform: translateY(-1px);
}
.co-btn-next:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

/* ─── Botón Confirmar ─── */
.co-btn-submit {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: auto;
}
.co-btn-submit:hover { background: #218838; transform: translateY(-1px); }
.co-btn-submit:active { transform: translateY(0); }

/* ─── Botones de ciudad ─── */
.co-city-toggle {
    display: flex;
    gap: 10px;
}
.co-city-opt {
    flex: 1;
    padding: 11px 8px;
    border: 1.5px solid var(--color-borde, #E5E5E5);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-texto-secundario, #666);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    text-align: center;
}
.co-city-opt.active {
    border-color: var(--color-primario, #D988B9);
    background: var(--color-primario-claro, #F5E8ED);
    color: var(--color-primario-oscuro, #C273A2);
    font-weight: 600;
}

/* ─── Info de envío externo (fuera de Montería) ─── */
#delivery-info {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #795548;
}

/* ─── Tarjetas de pago ─── */
.co-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.co-pay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 1.5px solid var(--color-borde, #E5E5E5);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-texto-secundario, #666);
}
.co-pay-card i { font-size: 24px; }
.co-pay-card.active {
    border-color: var(--color-primario, #D988B9);
    background: var(--color-primario-claro, #F5E8ED);
    color: var(--color-primario-oscuro, #C273A2);
}

/* ─── Resumen de ítems ─── */
.co-items-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-texto-secundario, #666);
    margin-bottom: -4px;
}
.co-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-borde, #E5E5E5);
}
.co-item:last-child { border-bottom: none; }
.co-item-img {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--color-fondo, #F9F9F9);
}
.co-item-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-borde, #E5E5E5);
    font-size: 20px;
    border: 1.5px solid var(--color-borde, #E5E5E5);
}
.co-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}
.co-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-texto, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.co-item-detail {
    font-size: 11px;
    color: var(--color-texto-claro, #999);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.co-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primario-oscuro, #C273A2);
    white-space: nowrap;
}
.co-empty-cart {
    color: var(--color-texto-claro, #999);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* ─── Pantalla de éxito ─── */
.co-success {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}
.co-success-inner {
    text-align: center;
    max-width: 340px;
}
.co-success-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    display: block;
}
.co-success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-texto, #333);
    margin-bottom: 8px;
}
.co-success-msg {
    font-size: 14px;
    color: var(--color-texto-secundario, #666);
    margin-bottom: 28px;
    line-height: 1.5;
}
.co-btn-done {
    display: inline-block;
    padding: 13px 32px;
    background: var(--color-primario, #D988B9);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s;
}
.co-btn-done:hover { background: var(--color-primario-oscuro, #C273A2); }

/* ─── Step inner wrapper ─── */
.co-step-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 16px 24px;
}
/* Push continue button to bottom when content is short */
.co-step-inner .co-btn-next,
.co-step-inner .co-btn-submit {
    margin-top: 12px;
}

/* ─── Title block ─── */
.co-title-block { margin-bottom: 4px; }
.co-title-block h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-texto, #333);
    margin: 0 0 4px;
    line-height: 1.2;
}
.co-title-block p {
    font-size: 13px;
    color: var(--color-texto-secundario, #666);
    margin: 0;
}

/* ─── Labels decorativos ─── */
.co-req { color: var(--color-primario, #D988B9); }
.co-opt { color: var(--color-texto-claro, #999); font-size: .9em; }

/* ─── Hints ─── */
.co-hint {
    font-size: 12px;
    color: var(--color-texto-claro, #999);
    margin-top: 2px;
    display: block;
}
.co-hint-info { color: #6b8cae; }

/* ─── Info strip ─── */
.co-info-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #795548;
}
.co-info-strip i { flex-shrink: 0; font-size: 15px; color: #f59e0b; }

/* ─── Payment card internals ─── */
.co-pay-ico { font-size: 26px; color: var(--color-texto-secundario, #666); }
.co-pay-card.active .co-pay-ico { color: var(--color-primario-oscuro, #C273A2); }
.co-pay-name { font-size: 13px; font-weight: 600; }
.co-pay-sub { font-size: 11px; color: var(--color-texto-claro, #999); }
.co-pay-chk {
    font-size: 16px;
    color: var(--color-borde, #E5E5E5);
    transition: color .15s;
}
.co-pay-card.active .co-pay-chk { color: var(--color-primario, #D988B9); }

/* ─── Payment info message ─── */
.co-pay-info-msg {
    font-size: 12px;
    color: var(--color-texto-secundario, #666);
    min-height: 16px;
    display: block;
}

/* ─── Cash section ─── */
#cash-payment-section .co-label { margin-bottom: 6px; }
.co-cash-wrap { display: flex; flex-direction: column; gap: 8px; }

/* ─── Transfer section ─── */
.co-transfer-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}
.co-transfer-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-texto-secundario, #666);
    margin: 0;
}
.co-transfer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.co-transfer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    border: 1.5px solid var(--color-borde, #E5E5E5);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-texto-secundario, #666);
}
.co-transfer-card.active {
    border-color: var(--color-primario, #D988B9);
    background: var(--color-primario-claro, #F5E8ED);
    color: var(--color-primario-oscuro, #C273A2);
}
.co-transfer-logo { font-size: 22px; }

/* ─── QR / account panel ─── */
.co-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--color-fondo, #F9F9F9);
    border-radius: 14px;
    padding: 16px;
}
.co-qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}
.co-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--color-primario, #D988B9);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    text-decoration: none;
    cursor: pointer;
}
.co-account-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.co-account-label {
    font-size: 12px;
    color: var(--color-texto-claro, #999);
}
.co-account-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-texto, #333);
    letter-spacing: 1px;
}

/* ─── Solo transferencia (fuera de Montería) ─── */
.co-only-transfer-notice {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.co-only-transfer-why {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8f0;
    border: 1.5px solid #f59e0b30;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}
.co-only-transfer-why i {
    font-size: 15px;
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 1px;
}
.co-only-transfer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 2px solid var(--color-primario, #D988B9);
    border-radius: 16px;
    background: var(--color-primario-claro, #F5E8ED);
    color: var(--color-primario-oscuro, #C273A2);
}
.co-only-transfer-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.co-only-transfer-left .co-pay-ico {
    font-size: 28px;
    color: var(--color-primario-oscuro, #C273A2);
}
.co-only-transfer-left .co-pay-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primario-oscuro, #C273A2);
}
.co-only-transfer-left .co-pay-sub {
    font-size: 12px;
    color: var(--color-primario, #D988B9);
}
.co-only-transfer-chk {
    font-size: 24px;
    color: var(--color-primario, #D988B9);
}

/* ─── QR zoom overlay ─── */
.qr-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    backdrop-filter: blur(4px);
}
.qr-zoom-img {
    max-width: min(90vw, 420px);
    max-height: 70vh;
    width: 100%;
    object-fit: contain;
    border-radius: 20px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.qr-zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.qr-zoom-hint {
    color: rgba(255,255,255,.7);
    font-size: 13px;
    text-align: center;
    margin: 0;
}
.co-qr-img { cursor: zoom-in; }

/* ─── Comprobante upload ─── */
.co-comprobante-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.co-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 110px;
    border: 2px dashed var(--color-borde, #E5E5E5);
    border-radius: 12px;
    cursor: pointer;
    padding: 16px;
    transition: border-color .15s;
    background: #fafafa;
}
.co-upload-area:hover { border-color: var(--color-primario, #D988B9); }
.co-upload-area.has-file { border-color: #28a745; border-style: solid; }
.co-upload-ico { font-size: 28px; color: var(--color-texto-claro, #999); }
.co-upload-text { font-size: 13px; color: var(--color-texto-secundario, #666); margin: 0; text-align: center; }
.co-comprobante-preview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
}

/* ─── Change display ─── */
.co-change {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.co-change-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--color-texto-secundario, #666);
}
.co-change-hl { margin-top: 2px; }
.co-change-hl span { font-weight: 500; color: var(--color-texto, #333); }
.co-change-hl strong { font-size: 15px; }

/* ─── Total bar ─── */
.co-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--color-primario-claro, #F5E8ED);
    border-radius: 10px;
}
.co-total-lbl {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-texto-secundario, #666);
}
.co-total-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primario-oscuro, #C273A2);
}

/* ─── Order items container ─── */
.co-order-items {
    border: 1px solid var(--color-borde, #E5E5E5);
    border-radius: 10px;
    padding: 4px 12px;
    max-height: 160px;
    overflow-y: auto;
}

/* ─── Success screen icon ─── */
.co-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-primario-claro, #F5E8ED), #fff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--color-primario-oscuro, #C273A2);
    box-shadow: 0 4px 20px rgba(217,136,185,.25);
}
.co-success-sub {
    font-size: 13px;
    color: var(--color-texto-claro, #999);
    margin-bottom: 24px;
    line-height: 1.5;
}
.co-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366 !important;
    color: #fff !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}
.co-btn-whatsapp:hover { background: #1ebe5d !important; }
.co-btn-listo {
    background: transparent !important;
    color: var(--color-texto-secundario, #666) !important;
    border: 1px solid #ddd !important;
    font-size: 14px;
    margin-top: 4px;
}
.co-btn-listo:hover { background: #f5f5f5 !important; }

/* ─── Sección vuelto en efectivo ─── */

/* ─── Responsive: pantallas grandes (tablet/desktop) ─── */
@media (min-width: 600px) {
    /* Fondo oscuro semitransparente */
    .co-overlay.co-open { background: rgba(0,0,0,.45); }
    /* Sheet centrado como modal — desktop uses transform safely (no iOS bug) */
    .co-sheet {
        position: absolute;
        top: 50%;
        left: 50%;
        inset: auto;
        width: min(480px, 96vw);
        height: min(700px, 92vh);
        border-radius: 20px;
        box-shadow: 0 24px 80px rgba(0,0,0,.22);
        opacity: 0;
        transform: translate(-50%, calc(-50% + 24px)) scale(0.97);
        transition: transform .32s cubic-bezier(.4,0,.2,1), opacity .25s ease;
    }
    .co-overlay.co-open .co-sheet {
        animation: none; /* override mobile keyframes */
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ══════════════════════════════════════════════════════════════════
   MEJORAS DE DISEÑO PROFESIONAL — v2.0
   ══════════════════════════════════════════════════════════════════ */

/* ── Tarjetas de producto: bordes redondeados y hover elevado ── */
.product-card {
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07) !important;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.28s cubic-bezier(.4,0,.2,1) !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(217, 136, 185, 0.22) !important;
}

.product-image-wrapper {
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

/* Badge de descuento: con porcentaje visible */
.badge-promo {
    border-radius: 6px !important;
    font-size: 0.68rem !important;
    padding: 4px 9px !important;
    letter-spacing: 0.5px !important;
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

/* Precio de venta: más prominente */
.price-detal-card {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
}

.price-detal-old-card {
    font-size: 0.7rem !important;
    color: #bbb !important;
    display: block;
}

/* ── Hero Banner ── */
.hero-banner {
    position: relative;
    overflow: hidden;
    padding: 44px 20px 52px;
    background: linear-gradient(145deg, #fff8fc 0%, #fce7f3 55%, #f4c8e8 100%);
    text-align: center;
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-dec-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, transparent 65%);
    top: -120px;
    right: -80px;
}

.hero-dec-2 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(217,136,185,0.18) 0%, transparent 70%);
    bottom: -60px;
    left: -50px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    background: var(--color-primario);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 14px;
    box-shadow: 0 3px 12px rgba(217, 136, 185, 0.4);
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.12;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 0.88rem;
    color: #666;
    max-width: 290px;
    margin: 0 auto 22px;
    line-height: 1.55;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primario);
    color: white;
    border: none;
    padding: 13px 30px;
    border-radius: 50px;
    font-family: var(--fuente-principal);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 5px 18px rgba(217, 136, 185, 0.42);
}

.hero-cta:hover {
    background: var(--color-primario-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 136, 185, 0.5);
}

.hero-cta i {
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .hero-banner {
        padding: 80px 40px 90px;
    }
    .hero-title {
        font-size: 3.4rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        max-width: 400px;
    }
}

/* ── Trust Strip ── */
.trust-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid var(--color-borde);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}

.trust-strip::-webkit-scrollbar {
    display: none;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
}

.trust-item:last-child {
    border-right: none;
}

.trust-item i {
    font-size: 1.05rem;
    color: var(--color-primario);
    flex-shrink: 0;
}

.trust-item span {
    font-size: 0.62rem;
    color: #555;
    font-weight: 500;
    line-height: 1.35;
}

/* ── Encabezado de Colección ── */
.collection-header {
    padding: 22px 16px 4px;
    text-align: center;
}

.collection-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-texto);
    margin-bottom: 0;
    position: relative;
    display: inline-block;
}

.collection-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--color-primario);
    margin: 7px auto 0;
    border-radius: 2px;
}

/* ── Footer mejorado ── */
.footer-brand-name {
    font-family: var(--fuente-principal);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--color-texto);
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.72rem;
    color: var(--color-primario);
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    font-style: italic;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: var(--color-borde);
    margin: 0 auto 14px;
}

/* ── Trust Strip en el Footer ── */
.trust-strip-footer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px 28px;
    padding: 20px 0 18px;
}

.trust-item-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
}

.trust-item-footer i {
    font-size: 1.3rem;
    color: var(--color-primario);
}

.trust-item-footer span {
    font-size: 0.65rem;
    color: #777;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* ── Paginación ── */
#pagination-container {
    padding: 20px 16px 8px;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--color-borde);
    background: white;
    border-radius: 10px;
    font-family: var(--fuente-principal);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-texto);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(.page-btn-active) {
    border-color: var(--color-primario);
    color: var(--color-primario);
    background: var(--color-primario-claro);
}

.page-btn-active {
    background: var(--color-primario);
    border-color: var(--color-primario);
    color: white;
    box-shadow: 0 3px 10px rgba(217, 136, 185, 0.4);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE MÓVIL COMPREHENSIVO v2.1 — 100% funcional en celular
   ══════════════════════════════════════════════════════════════════ */

/* ── 1. Prevenir desbordamiento horizontal en TODA la app ── */
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

img, video, iframe, embed, object {
    max-width: 100%;
}

/* ── 2. Grid de productos: tarjetas con altura IGUAL en cada fila ── */
#products-container {
    align-items: stretch !important;
}

#products-container > .col-6,
#products-container > .col-md-4,
#products-container > .col-lg-3 {
    display: flex !important;
    flex-direction: column;
}

.product-card {
    width: 100%;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.card-meta-row {
    flex: 1;
    min-height: 0;
}

/* El precio y botón siempre en la parte inferior */
.card-bottom {
    margin-top: auto !important;
    padding-top: 8px !important;
}

/* Limitar colores a 1 sola fila (no rompe el card) */
.card-colors {
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
}

/* ── 3. Carrito: ancho responsivo ── */
#cartOffcanvas {
    width: min(420px, 100vw) !important;
    max-width: 100vw !important;
}

/* ── 4. Dropdowns: nunca se salen del viewport ── */
.dropdown-menu-enhanced {
    max-width: calc(100vw - 24px) !important;
}

/* ── 5. Toast: contenido dentro del viewport ── */
.toast-container {
    max-width: calc(100vw - 32px) !important;
}

/* ── 6. Checkout: 100% funcional en todo tamaño ── */
.co-overlay {
    max-width: 100vw !important;
    overflow-x: hidden;
}

.co-sheet {
    max-width: 100vw !important;
    overflow-x: hidden;
}

/* ── 7. Imagen del producto en el modal: cover ── */
.modal-product-image {
    object-fit: cover;
    object-position: top center;
}

/* ── 8. Paginación: táctil y accesible ── */
.page-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ════════════════════════════════════════
   BREAKPOINTS RESPONSIVOS
   ════════════════════════════════════════ */

/* ── Pantallas MUY pequeñas (< 360px — Galaxy Fold, etc.) ── */
@media (max-width: 359.98px) {
    .header-brand {
        font-size: 0.85rem !important;
        letter-spacing: 2px !important;
    }

    .product-card .product-title {
        font-size: 0.62rem !important;
    }

    .product-card-desc {
        display: none; /* ocultar descripción en pantallas muy chicas */
    }

    .price-detal-card {
        font-size: 0.75rem !important;
    }

    .btn-add-card {
        font-size: 0.48rem !important;
        padding: 4px 6px !important;
        letter-spacing: 0.5px !important;
    }

    .card-color-dot {
        width: 18px !important;
        height: 18px !important;
    }

    .card-size-chip {
        font-size: 0.48rem !important;
        padding: 1px 4px !important;
    }

    .badge-promo {
        font-size: 0.58rem !important;
        padding: 3px 6px !important;
    }

    .collection-title {
        font-size: 0.65rem !important;
        letter-spacing: 2px !important;
    }

    .page-btn {
        min-width: 34px !important;
        height: 34px !important;
        font-size: 0.75rem !important;
        padding: 0 8px !important;
    }

    .trust-item-footer {
        min-width: 60px !important;
    }

    .trust-item-footer i {
        font-size: 1.1rem !important;
    }

    .trust-item-footer span {
        font-size: 0.58rem !important;
    }
}

/* ── Móvil estándar (360px – 480px) ── */
@media (min-width: 360px) and (max-width: 479.98px) {
    .product-card .product-title {
        font-size: 0.7rem;
    }

    .price-detal-card {
        font-size: 0.82rem !important;
    }

    .btn-add-card {
        font-size: 0.55rem;
        padding: 5px 8px;
    }
}

/* ── Todos los móviles (< 768px) ── */
@media (max-width: 767.98px) {
    /* Carrito ancho completo */
    #cartOffcanvas {
        width: 100vw !important;
    }

    /* Imágenes del carrito */
    .cart-item-image {
        width: 64px !important;
        height: 80px !important;
        flex-shrink: 0;
    }

    /* Checkout: modal hoja completa */
    .co-sheet {
        border-radius: 20px 20px 0 0;
        bottom: 0;
        width: 100vw !important;
    }

    /* Modal de producto: pantalla completa */
    .mpd.modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .mpc.modal-content {
        border-radius: 0 !important;
        min-height: 100dvh;
    }

    /* Descripción: máx 2 líneas en móvil */
    .product-card-desc {
        -webkit-line-clamp: 1 !important;
    }

    /* Padding de la sección de colección */
    .collection-header {
        padding: 16px 16px 4px !important;
    }

    /* Trust strip footer: más compacto */
    .trust-strip-footer {
        gap: 14px 18px !important;
        padding: 18px 16px !important;
    }

    .trust-item-footer i {
        font-size: 1.2rem;
    }

    .trust-item-footer span {
        font-size: 0.62rem;
    }

    /* Footer brand */
    .footer-brand-name {
        font-size: 0.95rem;
        letter-spacing: 4px;
    }
}

/* ── Tablet (768px – 1023px) ── */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .product-card .product-title {
        font-size: 0.75rem;
    }

    .price-detal-card {
        font-size: 0.85rem !important;
    }
}

/* ── Landscape móvil ── */
@media (max-height: 500px) and (max-width: 900px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .site-header {
        position: relative !important;
    }
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER LIMPIO v3 + PAGINACIÓN INTELIGENTE v2
   ══════════════════════════════════════════════════════════════════ */

/* ── Footer: minimalista y centrado ── */
.footer-minimal {
    padding: 24px 20px 20px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-brand-name {
    font-family: var(--fuente-principal) !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    letter-spacing: 5px !important;
    text-transform: uppercase !important;
    color: var(--color-texto) !important;
    margin-bottom: 8px !important;
}

.footer-divider {
    width: 32px !important;
    height: 1.5px !important;
    background: var(--color-primario) !important;
    border-radius: 2px;
    margin: 8px auto !important;
    display: block;
}

/* Ocultar estilos viejos del trust strip en footer */
.trust-strip-footer,
.trust-item-footer,
.footer-tagline {
    display: none !important;
}

/* ── Paginación inteligente ── */
#pagination-container {
    padding: 16px 16px 12px !important;
    width: 100%;
}

.pagination-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap;
    width: 100%;
}

.page-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border: 1.5px solid #e5e5e5 !important;
    background: white !important;
    border-radius: 10px !important;
    font-family: var(--fuente-principal) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--color-texto) !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    flex-shrink: 0 !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
}

.page-btn:hover:not(.page-btn-active):not(:disabled) {
    border-color: var(--color-primario) !important;
    color: var(--color-primario) !important;
    background: #fdf0f7 !important;
}

.page-btn-active {
    background: var(--color-primario) !important;
    border-color: var(--color-primario) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(217, 136, 185, 0.35) !important;
}

.page-btn-nav {
    min-width: 38px !important;
    padding: 0 !important;
    color: var(--color-texto-secundario) !important;
    font-size: 0.9rem !important;
}

.page-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.page-ellipsis {
    font-size: 0.85rem;
    color: #aaa;
    padding: 0 2px;
    line-height: 38px;
    flex-shrink: 0;
}

/* ── Ítem "Descuentos" en el menú hamburguesa ── */
.dropdown-promo-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #dc2626 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
}

.dropdown-promo-item i {
    font-size: 0.88rem;
    flex-shrink: 0;
}

.dropdown-promo-item:hover {
    background-color: #fff5f5 !important;
    color: #b91c1c !important;
}

.badge-sale-menu {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    flex-shrink: 0;
}
