/* =========================================
   TIENDA WEB - CSS REDISEÑADO 2026
   Mobile First | Naranja Vibrante
   ========================================= */

/* --- VARIABLES --- */
:root {
    --primary: #F85F35;
    /* Naranja principal */
    --primary-dark: #D94F27;
    /* Naranja oscuro hover */
    --primary-light: #FFF0EB;
    /* Fondo suave naranja */
    --primary-shadow: rgba(248, 95, 53, 0.35);
    --dark: #1A1A1A;
    /* Texto oscuro */
    --gray: #6B7280;
    /* Texto secundario */
    --gray-light: #F3F4F6;
    /* Fondos gris suave */
    --white: #FFFFFF;
    --bg: #F7F7F7;
    /* Fondo general */
    --card-radius: 16px;
    --header-h: 60px;
    --tabs-h: 52px;
    --carousel-h: 200px;
    --fixed-h: 312px;
    /* carousel + header + tabs */
    --bottom-h: 72px;
}

@media (max-width: 600px) {
    :root {
        --carousel-h: 130px;
        --fixed-h: 242px;
    }
}

/* --- RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.4;
    padding-top: var(--fixed-h);
    padding-bottom: calc(var(--bottom-h) + 10px);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   HEADER FIJO + CARRUSEL + TABS
   ========================================= */
#fixed-header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* --- CARRUSEL Y SCROLL INTELIGENTE --- */
#fixed-header-container.scrolled .carousel-container {
    height: 0;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.carousel-container {
    width: 100%;
    height: var(--carousel-h);
    max-height: var(--carousel-h);
    position: relative;
    background: #111;
    overflow: hidden;
    opacity: 1;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

@media (min-width: 900px) {
    .carousel-slide {
        flex: 0 0 50%;
    }
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 60%);
}

/* Flechas del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: transform 0.15s;
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 20;
}

.dot {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary);
    width: 22px;
    border-radius: 4px;
}

/* --- HEADER --- */
.app-header {
    background: var(--white);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 10px; /* Reducir padding derecho para empujar botones */
    height: var(--header-h);
    gap: 5px;
}

/* Grupo izquierda del header: hamburguesa + logo + nombre */
.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Menú Hamburguesa */
.btn-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.btn-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.25s;
}

/* Marca */
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    cursor: pointer;
    flex: 1;
}

.header-logo-mini {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.1;
    margin-bottom: 2px;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--gray);
    display: block;
    margin-top: -1px;
}

/* Iconos derecha header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Botón Seguir Pedido — OUTLINE (fondo blanco, borde naranja) */
.btn-seguir {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    padding: 4px 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(248, 95, 53, 0.15);
}

@media (max-width: 600px) {
    .btn-seguir {
        padding: 3px 6px;
        gap: 0;
        white-space: normal;
        text-align: center;
        line-height: 1;
        border-radius: 8px;
    }
    .btn-seguir-text {
        display: inline-block;
        max-width: 45px;
        font-size: 0.6rem;
    }
    .btn-seguir-icon {
        display: none;
    }
}

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

/* Badge del carrito */
.icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid white;
}

.badge.visible {
    transform: scale(1);
}

/* --- TABS CATEGORÍAS --- */
.category-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    height: var(--tabs-h);
    background: var(--white);
    padding: 8px 10px;
    gap: 8px;
    scrollbar-width: none;
    border-top: 1px solid #F0F0F0;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

/* Tabs estilo PILL — inactivo con borde suave */
.tab-btn {
    flex-shrink: 0;
    background: white;
    border: 1.5px solid #E5E7EB;
    border-radius: 20px;
    padding: 0 15px;
    height: 36px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Tab ACTIVO — naranja relleno, texto blanco */
.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 3px 10px var(--primary-shadow);
}

.tab-btn:active {
    opacity: 0.85;
}

/* =========================================
   MENÚ LATERAL (OFF-CANVAS)
   ========================================= */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 501;
    transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-drawer.open {
    left: 0;
}

.nav-drawer-header {
    padding: 50px 20px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-drawer-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.nav-drawer-title {
    color: white;
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.2;
}

.nav-drawer-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    margin-top: 2px;
}

.nav-menu {
    padding: 10px 0;
    flex: 1;
    list-style: none;
}

.nav-menu li a,
.nav-menu li button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.nav-menu li a:active,
.nav-menu li button:active {
    background: var(--gray-light);
}

.nav-menu-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: #F0F0F0;
    margin: 5px 20px;
}

/* Modal nav (Nosotros/Sucursales) */
.nav-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 600;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.nav-modal-overlay.open {
    display: flex;
}

.nav-modal-sheet {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 20px 22px 120px;
    animation: slideUp 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.nav-modal-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    margin: 0 auto 18px;
}

.nav-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark);
}

.nav-modal-body {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.7;
    white-space: pre-wrap;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    font-family: inherit;
    transition: color 0.2s;
}

.close-modal:active {
    color: var(--primary);
}

/* =========================================
   CONTENIDO PRINCIPAL
   ========================================= */
.container {
    padding: 14px 12px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Secciones Categoría */
.category-section {
    scroll-margin-top: calc(var(--header-h) + var(--tabs-h) + 18px);
    padding-bottom: 28px;
}

/* Título de sección */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-ver-todas {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* =========================================
   GRID / SLIDER PRODUCTOS
   ========================================= */
.products-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 18px;
    }
}

/* DISEÑO DE ALTA GAMA PARA PC / DESKTOP (Alineación y Grid Expandido) */
@media (min-width: 900px) {
    .header-top,
    .category-tabs {
        max-width: 1360px;
        margin: 0 auto;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .category-tabs {
        justify-content: flex-start;
    }

    .container {
        max-width: 1360px;
        padding: 24px 20px;
    }

    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }

    .product-image {
        height: 165px;
    }
}

/* SLIDER HORIZONTAL PROMOS */
.products-horizontal-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    padding-left: 2px;
    padding-right: 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.products-horizontal-slider::-webkit-scrollbar {
    display: none;
}

.products-horizontal-slider .product-card {
    min-width: calc(33.3% - 8px);
    max-width: calc(33.3% - 8px);
    scroll-snap-align: start;
    flex-shrink: 0;
    height: auto;
}

/* Imágenes del slider más compactas para caber 3 */
.products-horizontal-slider .product-image {
    height: 105px;
}

.products-horizontal-slider .product-info {
    padding: 4px 8px 6px;
    gap: 3px;
}

.products-horizontal-slider .p-title {
    font-size: 0.78rem;
    margin-top: 0;
}

.products-horizontal-slider .p-desc {
    font-size: 0.65rem;
    -webkit-line-clamp: 2;
}

.products-horizontal-slider .product-footer {
    padding: 6px 6px;
    border-radius: 10px;
}

.products-horizontal-slider .p-price {
    font-size: 0.8rem;
    white-space: nowrap;
}

.products-horizontal-slider .p-price-original {
    font-size: 0.64rem;
    white-space: nowrap;
}

.products-horizontal-slider .btn-add {
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .products-horizontal-slider {
        scroll-snap-type: none;
        cursor: grab;
    }

    .products-horizontal-slider:active {
        cursor: grabbing;
    }

    .products-horizontal-slider .product-card {
        min-width: 185px;
        max-width: 185px;
    }

    .products-horizontal-slider .product-image {
        height: 120px;
    }
}

/* =========================================
   TARJETA DE PRODUCTO — NUEVO DISEÑO
   ========================================= */
.product-card {
    background: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
    height: 100%;
}

.product-card:active {
    transform: scale(0.975);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    }
}

/* Imagen — Pedestal Gourmet (Solución A) */
.product-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #1E232A 0%, #111418 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sombra 3D en platos sin fondo (Solución C) */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.38));
}

.product-card:hover .product-image img {
    transform: scale(1.06);
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.48));
}

.product-image.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* Badge descuento — cuadrado prominente */
.badge-descuento {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 8px;
    z-index: 2;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px var(--primary-shadow);
}

/* Favorito */
.btn-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
}

.btn-fav:active {
    transform: scale(1.3);
}

.btn-fav.active {
    color: var(--primary);
}

/* Info producto — Titanium 3D (Cuerpo Plata / Acero) */
.product-info {
    padding: 5px 10px 8px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
    background: linear-gradient(180deg, #E2E6EC 0%, #ECEFF4 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 -4px 12px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.p-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--dark);
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-desc {
    font-size: 0.72rem;
    color: var(--gray);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer tarjeta: precio + botón (Píldora Blanca Elevada en 3D) */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 8px 10px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-shrink: 1;
}

.p-price-original {
    font-size: 0.72rem;
    color: #A0AEC0;
    text-decoration: line-through;
    line-height: 1;
    white-space: nowrap;
}

.p-price {
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--primary);
    white-space: nowrap;
    line-height: 1.1;
}

.product-footer .p-price:only-child,
.product-footer .p-price {
    color: var(--primary);
}

/* Botón + */
.btn-add {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.3rem;
    flex-shrink: 0;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px var(--primary-shadow);
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.btn-add::before {
    content: '+';
}

.btn-add:active {
    transform: scale(0.9);
    background: var(--primary-dark);
}

/* =========================================
   MODAL OVERLAY
   ========================================= */
.modal-overlay,
.admin-modal,
.lightbox-overlay {
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 5000;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: block;
}

/* =========================================
   SIDEBAR CARRITO
   ========================================= */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: white;
    z-index: 5001;
    transition: right 0.32s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 16px 20px 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F0F0F0;
}

.cart-header-title {
    font-weight: 800;
    font-size: 1rem;
}

.cart-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray);
}

.cart-step {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-step.active {
    color: var(--primary);
    font-weight: 700;
}

.cart-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
}

.cart-step.active .cart-step-num {
    background: var(--primary);
    color: white;
}

.cart-step-divider {
    color: #DDD;
}

.close-modal {
    border: none;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--gray);
    padding: 4px;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0px 16px 16px 16px;
    -webkit-overflow-scrolling: touch;
}

.cart-body > * {
    flex-shrink: 0;
}

.cart-footer-summary {
    background: white;
    padding: 14px 16px 20px;
    border-top: 1px solid #F0F0F0;
}

.delivery-type-selector {
    display: flex;
    background: transparent;
    padding: 0;
    gap: 10px;
    margin-bottom: 16px;
}

.dtype-btn {
    flex: 1;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 10px;
    padding: 10px 4px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.dtype-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Formulario carrito */
.cart-form-section {
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
}

.cart-form-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.cart-input-group.full {
    grid-template-columns: 1fr;
}

.cart-input {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    background: white;
    color: var(--dark);
    transition: border-color 0.2s;
    outline: none;
}

.cart-input:focus {
    border-color: var(--primary);
}

.cart-input::placeholder {
    color: #C0C0C0;
}

/* Métodos de pago tarjetas */
.payment-methods {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.pay-method-btn {
    flex: 1;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 6px;
    background: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.pay-method-btn .pay-icon {
    font-size: 1.3rem;
}

.pay-method-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Lista productos en carrito */
.cart-product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
}

.cart-product-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
}

.cart-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cart-product-name {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.cart-product-price {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--dark);
    margin-top: 2px;
}

.item-note-input {
    border: none;
    border-bottom: 1px solid #EEE;
    background: transparent;
    font-family: inherit;
    font-size: 0.68rem;
    color: #999;
    outline: none;
    width: 100%;
    margin-top: 3px;
    padding: 0;
}

/* Control cantidad */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-light);
    border-radius: 20px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    color: var(--gray);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn.plus {
    color: var(--primary);
}

.qty-num {
    font-weight: 800;
    font-size: 0.82rem;
    min-width: 14px;
    text-align: center;
}

/* Botón seguir comprando */
.btn-seguir-comprando {
    width: 100%;
    padding: 11px;
    background: none;
    border: 1.5px dashed var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
    margin-top: 6px;
    transition: background 0.2s;
}

.btn-seguir-comprando:active {
    background: var(--primary-light);
}

/* Resumen precios */
.cart-summary {
    border-top: 1px solid #F0F0F0;
    padding-top: 12px;
    margin-bottom: 12px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    color: var(--gray);
    margin-bottom: 6px;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 900;
    color: var(--dark);
    margin-top: 8px;
}

.cart-total-amount {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 900;
}

/* Botón Confirmar / Realizar Pedido */
.btn-order-main {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px var(--primary-shadow);
    transition: all 0.2s;
}

.btn-order-main:active {
    transform: scale(0.97);
    background: var(--primary-dark);
}

.btn-order-main.disabled {
    background: #D1D5DB;
    box-shadow: none;
    pointer-events: none;
    color: #9CA3AF;
}

/* Alias compatibilidad antigua */
.btn-order-whatsapp {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px var(--primary-shadow);
    transition: all 0.2s;
    text-decoration: none;
    margin-top: 0;
}

.btn-order-whatsapp:active,
.btn-order-whatsapp:hover:not(.disabled) {
    background: var(--primary-dark);
    transform: scale(0.97);
}

.btn-order-whatsapp.disabled,
.btn-order-whatsapp:disabled {
    background: #D1D5DB !important;
    box-shadow: none !important;
    pointer-events: none;
    color: #9CA3AF !important;
}

.btn-calc-delivery {
    width: 100%;
    padding: 11px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* =========================================
   BARRA INFERIOR (BOTTOM BAR)
   ========================================= */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-h);
    background: white;
    border-top: 1px solid #EAEAEA;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    z-index: 1000;
    transition: opacity 0.3s;
}

body.cart-open .bottom-bar {
    opacity: 0;
    pointer-events: none;
}

.social-icons-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.social-bottom-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.social-bottom-label {
    font-size: 0.6rem;
    color: var(--gray);
    line-height: 1;
    margin-bottom: 4px;
}

.social-bottom-icons {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    border: none;
    text-decoration: none;
    overflow: hidden;
}

.social-btn:active {
    transform: scale(0.9);
}

.social-btn.whatsapp {
    background: #25D366;

}

.social-btn.whatsapp svg {
    fill: white;

}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: none;

}

.social-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;

}

.btn-order-container {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

/* Botón Ver Carrito — dos líneas + flecha derecha */
.btn-ver-carrito {
    width: 100%;
    max-width: 320px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 10px 16px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px var(--primary-shadow);
    transition: all 0.2s;
    text-align: left;
}

.btn-ver-carrito:active {
    transform: scale(0.97);
}

.btn-ver-carrito:disabled {
    background: #D1D5DB;
    box-shadow: none;
    pointer-events: none;
}

.btn-ver-carrito-count {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cart-btn-top {
    font-size: 0.82rem;
    font-weight: 800;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-btn-bottom {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
    display: block;
}

.btn-ver-carrito-arrow {
    font-size: 1.3rem;
    font-weight: 300;
    flex-shrink: 0;
    margin-left: 10px;
    opacity: 0.9;
}

/* =========================================
   MODALES ADMIN
   ========================================= */
.admin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 22px;
    border-radius: 18px;
    width: 92%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 6000;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-modal.open {
    display: block;
}

.admin-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--gray-light);
    border-radius: 10px;
    padding: 4px;
}

.admin-nav-btn {
    flex: 1;
    padding: 7px;
    border: none;
    border-radius: 7px;
    background: transparent;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
}

.admin-nav-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.admin-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

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

.btn-cancel {
    background: var(--gray-light);
    color: var(--dark);
}

.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.admin-dashboard {
    max-height: 50vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--gray);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    background: white;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* =========================================
   LIGHTBOX PRODUCTO
   ========================================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 7000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-overlay.open {
    display: flex;
    animation: fadeIn 0.25s;
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-content {
    background: white;
    border-radius: 20px;
    width: 92%;
    max-width: 460px;
    overflow: hidden;
    cursor: default;
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.lightbox-img-wrap {
    width: 100%;
    height: 230px;
    background: #111;
}

.lightbox-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lightbox-img-wrap.no-img-lightbox {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--gray-light);
}

.lightbox-details {
    padding: 20px;
    text-align: center;
}

.lightbox-details h2 {
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.lightbox-desc {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.55;
    margin-bottom: 14px;
}

.lightbox-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 16px;
}

.original-price {
    font-size: 0.9rem;
    color: #BBB;
    text-decoration: line-through;
}

.sale-price,
.lightbox-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}

.qty-btn-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #E5E7EB;
    background: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-weight: 300;
}

.qty-btn-circle:active {
    border-color: var(--primary);
    color: var(--primary);
}

.qty-display {
    font-size: 1.2rem;
    font-weight: 800;
    min-width: 28px;
    text-align: center;
}

.btn-lightbox-add,
.btn-add-lightbox {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-shadow);
    transition: all 0.2s;
}

.btn-lightbox-add:active {
    transform: scale(0.97);
    background: var(--primary-dark);
}

/* =========================================
   MISCELÁNEA
   ========================================= */
.pac-container {
    z-index: 9999 !important;
}

#cust-address {
    pointer-events: auto !important;
    user-select: text !important;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(248, 95, 53, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(248, 95, 53, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(248, 95, 53, 0);
    }
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status badge */
#shop-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Google maps autocomplete fix */
.delivery-result {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 6px;
    color: var(--primary);
}

. c a r t - p r o d u c t - l i s t    {
       m a x - h e i g h t :    3 5 v h ;
       o v e r f l o w - y :    a u t o ;
       p a d d i n g - r i g h t :    5 p x ;
       m a r g i n - b o t t o m :    1 0 p x ;
       b o r d e r - b o t t o m :    1 p x   s o l i d   # f 0 f 0 f 0 ;
       
}

     @ m e d i a   ( m a x - w i d t h :   4 8 0 p x )    {
       . b t n - s e g u i r - t e x t    {
           d i s p l a y :    n o n e ;
           
    }

       . b t n - s e g u i r    {
           p a d d i n g :    6 p x ;
           b o r d e r - r a d i u s :    5 0 % ;
           w i d t h :    3 4 p x ;
           h e i g h t :    3 4 p x ;
           j u s t i f y - c o n t e n t :    c e n t e r ;
           
    }

       
}

      html.cart-open,
body.cart-open {
    overflow: hidden !important;
    height: 100vh !important;
    overscroll-behavior: none;
}
/* Ocultar carrusel en pantallas muy bajas (modo horizontal) */
@media (max-height: 500px) {
    :root {
        --carousel-h: 0px !important;
        --fixed-h: 112px !important;
    }
    #main-carousel, .carousel-container {
        display: none !important;
    }
}
