/* Enlaces y Botones */
.nav-link {
    color: var(--on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
}
.nav-link:hover { 
    color: var(--primary); 
    border-bottom-color: var(--secondary);
}

.nav-link.active-link {
    color: var(--primary);
    border-bottom-color: var(--secondary);
    font-weight: 600;
}

/* ======================================================== */
/* DROPDOWN DE NAVEGACIÓN Y SOPORTE                         */
/* ======================================================== */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--on-surface-variant);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-dropdown-btn:hover {
    color: var(--primary);
    border-bottom-color: var(--secondary);
}

.nav-dropdown-btn .arrow {
    font-size: 18px;
    transition: transform 0.3s;
}

.nav-dropdown-wrapper:hover .nav-dropdown-btn .arrow {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface-container-lowest);
    border: 1.5px solid var(--outline-variant);
    border-radius: 8px;
    min-width: 240px;
    box-shadow: 0 8px 30px rgba(68, 42, 34, 0.12);
    z-index: 100;
    padding: 8px 0;
}

.nav-dropdown-wrapper:hover .nav-dropdown-content {
    display: block;
    animation: slideDown 0.2s ease-out forwards;
}

.nav-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--on-surface-variant);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-dropdown-content a:hover {
    background-color: var(--surface-container-low);
    color: var(--primary);
}

.nav-dropdown-content a.active-link {
    color: var(--primary);
    background-color: var(--surface-container);
    font-weight: 600;
}

.nav-dropdown-wrapper.active-link .nav-dropdown-btn {
    color: var(--primary);
    border-bottom-color: var(--secondary);
    font-weight: 600;
}

@media (max-width: 992px) {
    .nav-dropdown-wrapper {
        display: block;
        width: 100%;
    }
    
    .nav-dropdown-btn {
        width: 100%;
        justify-content: space-between;
        padding: 12px 0;
        border-bottom: 1.5px solid var(--surface-container-high);
    }
    
    .nav-dropdown-content {
        position: static;
        display: none; /* Oculto por defecto en móvil */
        transform: none;
        box-shadow: none;
        border: none;
        background-color: transparent;
        padding-left: 16px;
        padding-top: 4px;
        padding-bottom: 4px;
        min-width: unset;
        animation: none;
    }
    
    .nav-dropdown-wrapper.open .nav-dropdown-content {
        display: block; /* Se muestra al minimizarse/expandirse */
    }
    
    .nav-dropdown-wrapper.open .nav-dropdown-btn .arrow {
        transform: rotate(180deg); /* Rota la flecha cuando está abierto */
    }
    
    .nav-dropdown-content a {
        padding: 10px 0;
        border-bottom: 1.5px solid var(--surface-container-low);
    }
    
    .nav-dropdown-content a:last-child {
        border-bottom: none;
    }
}


.icon-btn { 
    background: none; border: none; cursor: pointer; 
    color: var(--on-surface-variant); transition: color 0.3s; 
}
.icon-btn:hover { color: var(--primary); }

/* TIPOGRAFÍA 4: 'Poppins' — reservada para botones, badges, precios y filtros
   (textos cortos y de acción, distintos de títulos, subtítulos y cuerpo de texto) */
.btn, .filter-btn, .badge, .card-price, .cart-badge {
    font-family: 'Poppins', 'Be Vietnam Pro', sans-serif;
}

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 32px; border-radius: 8px; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all 0.3s;
}
.btn-primary { background-color: var(--primary); color: var(--on-primary); border: none; }
.btn-primary:hover { background-color: var(--primary-container); }
.btn-outline { border: 1px solid var(--secondary); color: var(--secondary); background: transparent; }
.btn-outline:hover { background-color: var(--secondary); color: var(--on-secondary); }

/* Tarjetas de Producto (EVIDENCIA DE UI/UX PREMIUM) */
.product-card {
    background-color: var(--surface-container-lowest);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1.5px solid rgba(130, 84, 37, 0.06);
    box-shadow: 0 10px 30px -10px rgba(68, 42, 34, 0.08), 0 1px 3px rgba(68, 42, 34, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.product-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 20px 40px -15px rgba(68, 42, 34, 0.14), 0 0 0 2px rgba(130, 84, 37, 0.2); 
}

.product-card img { 
    width: 100%; 
    height: 240px; 
    object-fit: cover; 
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); 
    border-bottom: 1.5px solid rgba(130, 84, 37, 0.04);
}

.product-card:hover img { 
    transform: scale(1.04); 
}

.card-content { 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    gap: 14px; 
}

.card-top { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px;
}

.card-top h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.card-price { 
    background-color: var(--secondary-container); 
    color: var(--on-secondary-container); 
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(130, 84, 37, 0.1);
    align-self: flex-start; /* Asegura que la etiqueta naranja no se estire */
}

/* Distribución y Ancho de Catálogo Ampliado */
.container-large {
    max-width: 1400px !important;
}

.gap-large {
    gap: 36px !important;
}

.badge { 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 10px; 
    text-transform: uppercase; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    background-color: var(--surface-container-high);
    color: var(--primary);
    border: 1px solid var(--outline-variant);
    align-self: flex-start;
}

/* Hero Section */
.hero { 
    position: relative; 
    height: calc(100vh - 72px); 
    min-height: 600px;
    display: flex; 
    align-items: center; 
    overflow: hidden; 
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0;
    /* Lighter background overlay as requested (darker on left for text legibility, light on right for cake display) */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.15) 100%),
                linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, transparent 20%, rgba(0, 0, 0, 0.4) 100%);
}
.hero-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    width: 100%;
}
@media (max-width: 992px) {
    .hero {
        height: auto;
        padding: 100px 0 80px 0;
    }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}
.hero-content { position: relative; z-index: 10; max-width: 100%; }
.hero-tag { color: var(--secondary-container); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: 15px; margin-bottom: 16px; display: block; }
.hero-title { font-size: 32px; color: var(--primary); margin-bottom: 16px; line-height: 1.2; }
.hero-desc { font-size: 18px; color: var(--on-surface-variant); margin-bottom: 40px; }

/* Styles specifically for the homepage hero dark theme */
.hero .hero-title { font-size: 60px; color: #ffffff; margin-bottom: 24px; line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.hero .hero-desc { font-size: 21px; color: rgba(255, 255, 255, 0.98); margin-bottom: 40px; text-shadow: 0 1px 3px rgba(0,0,0,0.4); line-height: 1.5; }

/* Premium 3D Cake Carousel on the Right */
.hero-carousel-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Align closer to the right of the page */
    align-items: center;
    z-index: 10;
}
@media (max-width: 992px) {
    .hero-carousel-wrapper {
        justify-content: center; /* Center it when stacked vertically */
    }
    .hero-title {
        font-size: 40px;
    }
    .hero-desc {
        font-size: 18px;
    }
}
.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 440px;
    border-radius: 20px;
    overflow: visible; /* Must be visible to allow 3D card translations on the sides */
    background: transparent;
}
@media (max-width: 576px) {
    .hero-carousel {
        max-width: 300px;
        height: 360px;
    }
}
.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
}
.carousel-slide {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border-radius: 20px;
    overflow: hidden;
    /* Smooth 3D animation displacement */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease, z-index 0.8s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: var(--surface-container-lowest);
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    z-index: 1;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    padding: 24px 20px 28px 20px;
    color: #ffffff;
    z-index: 3;
}
.carousel-caption h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
    font-family: 'Noto Serif', serif;
}
.carousel-caption p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* 3D Slide Rotations & Displacements in a Circle */
.carousel-slide.active {
    transform: translate3d(0, 0, 100px) rotateY(0deg) scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55);
}
.carousel-slide.prev-slide {
    transform: translate3d(-110px, 0, -80px) rotateY(32deg) scale(0.84);
    opacity: 0.7;
    z-index: 5;
    pointer-events: none;
}
.carousel-slide.next-slide {
    transform: translate3d(110px, 0, -80px) rotateY(-32deg) scale(0.84);
    opacity: 0.7;
    z-index: 5;
    pointer-events: none;
}
.carousel-slide.hidden-slide {
    transform: translate3d(0, 0, -220px) rotateY(180deg) scale(0.7);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Adjustments for smaller viewports to prevent screen overflow */
@media (max-width: 576px) {
    .carousel-slide.prev-slide {
        transform: translate3d(-60px, 0, -100px) rotateY(25deg) scale(0.8);
        opacity: 0.45;
    }
    .carousel-slide.next-slide {
        transform: translate3d(60px, 0, -100px) rotateY(-25deg) scale(0.8);
        opacity: 0.45;
    }
}

/* Navigation Controls - Positioned outside the 3D rotating space */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.carousel-control:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(130, 84, 37, 0.4);
}
.carousel-control.prev {
    left: -60px;
}
.carousel-control.next {
    right: -60px;
}
@media (max-width: 768px) {
    .carousel-control.prev {
        left: -20px;
    }
    .carousel-control.next {
        right: -20px;
    }
}
@media (max-width: 480px) {
    .carousel-control.prev {
        left: -10px;
        width: 40px;
        height: 40px;
    }
    .carousel-control.next {
        right: -10px;
        width: 40px;
        height: 40px;
    }
}

/* Navigation Dots placed below the Carousel */
.carousel-dots {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}
.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dots .dot.active {
    background-color: #ffffff;
    width: 20px;
    border-radius: 4px;
}

/* Filtros */
.filter-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 48px; }
.filter-btn {
    padding: 8px 16px; border-radius: 8px; border: 1px solid var(--outline-variant);
    background-color: var(--surface); color: var(--on-surface); cursor: pointer; transition: all 0.3s;
}
.filter-btn.active { background-color: var(--primary-container); color: var(--on-primary-container); border-color: var(--primary-container); }
.filter-btn:hover:not(.active) { background-color: var(--surface-variant); }

/* ======================================================== */
/* ACORDEÓN DE PREGUNTAS FRECUENTES (FAQ)                   */
/* ======================================================== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--surface-container-lowest);
    border-radius: 12px;
    border: 1.5px solid var(--outline-variant);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active {
    border-color: var(--secondary);
    box-shadow: 0 6px 20px rgba(130, 84, 37, 0.08);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background-color: var(--surface-container-low);
}

.faq-icon {
    font-size: 24px;
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 24px;
    color: var(--on-surface-variant);
    font-size: 14.5px;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Suficiente para una respuesta estándar */
    padding-bottom: 20px;
}

/* Tarjeta de video con reproducción externa estilo YouTube */
/* Tarjeta de video con reproducción externa estilo YouTube */
.yt-mockup-link {
    display: block;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
    text-decoration: none;
    font-family: "Roboto", "Arial", sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.yt-mockup-link img.yt-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: filter 0.2s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.yt-mockup-link:hover img.yt-thumbnail {
    filter: brightness(0.95);
}

/* Gradient Overlay at top */
.yt-header-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Header Container */
.yt-header-info {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.yt-channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.yt-channel-avatar .material-symbols-outlined {
    font-size: 20px;
    color: #fff;
}

.yt-text-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yt-video-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    text-align: left;
}

.yt-channel-name {
    color: #ccc;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    text-align: left;
    margin-top: 1px;
}

/* Large Center Play Button (Red by default to match native hovered/active state) */
.yt-large-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: transform 0.1s cubic-bezier(0.0, 0.0, 0.2, 1);
    cursor: pointer;
}

.yt-large-play-btn svg {
    display: block;
    width: 68px;
    height: 48px;
}

.yt-large-play-btn svg .play-bg {
    fill: #ff0000;
    fill-opacity: 0.9;
    transition: fill-opacity 0.1s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.yt-mockup-link:hover .yt-large-play-btn svg .play-bg {
    fill-opacity: 1;
}

.yt-mockup-link:hover .yt-large-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Bottom Share Button (left) */
.yt-share-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.48);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background-color 0.2s, transform 0.2s;
}

.yt-share-btn span {
    font-size: 20px;
    transform: scaleX(-1); /* Hace que la flecha apunte a la derecha */
}

.yt-share-btn:hover {
    background-color: rgba(0, 0, 0, 0.65);
    transform: scale(1.05);
}

/* Bottom Right "Mirar en YouTube" Pill */
.yt-watch-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.48);
    color: #fff;
    padding: 0 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 3;
    transition: background-color 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.yt-watch-btn:hover {
    background-color: rgba(0, 0, 0, 0.65);
    transform: scale(1.03);
}

.yt-pill-logo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'YouTube Sans', Roboto, sans-serif;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.6px;
}

/* ======================================================== */
/* CARRITO Y FAVORITOS (localStorage) - js/cart-favorites.js */
/* ======================================================== */

/* Corazón de favorito: color activo cuando el producto está guardado */
[data-fav-toggle] { transition: transform 0.2s ease, color 0.3s ease; }
[data-fav-toggle].is-favorite {
    color: #c94f4f;
}
[data-fav-toggle].is-favorite .material-symbols-outlined {
    color: #c94f4f;
}

/* EVIDENCIA DE ANIMACIÓN: pulso corto al agregar al carrito o marcar favorito */
@keyframes pulseFeedback {
    0% { transform: scale(1); }
    35% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.pulse-anim {
    animation: pulseFeedback 0.35s ease-out;
}

/* Contenedor de imagen del catálogo dinámico: permite posicionar el corazón de favorito */
.catalog-card-media {
    position: relative;
}

/* Botón "Agregar" deshabilitado visualmente cuando el producto está agotado */
.btn-add-cart[disabled],
[data-add-cart].is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Evita el scroll del fondo mientras el panel del carrito está abierto */
body.cart-drawer-open { overflow: hidden; }

/* Panel lateral del carrito */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    pointer-events: none;
}
.cart-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(29, 27, 23, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cart-drawer.open .cart-drawer-overlay {
    opacity: 1;
}

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 400px;
    max-width: 92vw;
    background-color: var(--surface);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    /* EVIDENCIA DE ANIMACIÓN: transición suave de entrada/salida */
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.cart-drawer.open .cart-drawer-panel {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--outline-variant);
}
.cart-drawer-header h3 {
    font-family: 'Noto Serif', serif;
    font-size: 19px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--on-surface-variant);
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.cart-drawer-close:hover { background-color: var(--surface-container-high); }

.cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-empty-msg {
    text-align: center;
    color: var(--on-surface-variant);
    margin-top: 60px;
    line-height: 1.6;
}

.cart-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-container-high);
    /* EVIDENCIA DE ANIMACIÓN: aparición suave de cada fila del carrito */
    animation: fadeInUp 0.3s ease-out forwards;
}

.cart-drawer-item img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-drawer-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cart-drawer-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-background);
}

.cart-drawer-item-price {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
}

.cart-drawer-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.cart-drawer-qty button {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--outline-variant);
    background-color: var(--surface-container-lowest);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--primary);
    transition: background-color 0.2s;
}
.cart-drawer-qty button:hover { background-color: var(--surface-container-high); }
.cart-drawer-qty span { font-size: 13.5px; font-weight: 600; min-width: 14px; text-align: center; }

.cart-drawer-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--on-surface-variant);
    flex-shrink: 0;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}
.cart-drawer-remove:hover { color: #c62828; background-color: #ffebee; }

.cart-drawer-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--outline-variant);
}
.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--on-surface-variant);
}
.cart-drawer-total strong {
    font-size: 20px;
    color: var(--primary);
    font-family: 'Noto Serif', serif;
}

@media (max-width: 480px) {
    .cart-drawer-panel { width: 100%; max-width: 100%; }
}

.cart-drawer-footer .btn[disabled],
.cart-drawer-footer .btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ======================================================== */
/* BUSCADOR DE TEXTO DEL CATÁLOGO (filtros + búsqueda)      */
/* ======================================================== */
.catalog-search {
    position: relative;
    max-width: 420px;
    margin: 0 auto 28px auto;
}
.catalog-search .material-symbols-outlined {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
    font-size: 20px;
    pointer-events: none;
}
.catalog-search input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border-radius: 30px;
    border: 1.5px solid var(--outline-variant);
    background-color: var(--surface-container-lowest);
    font-family: inherit;
    font-size: 14.5px;
    color: var(--on-background);
    transition: all 0.3s ease;
}
.catalog-search input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(130, 84, 37, 0.15);
}

/* ======================================================== */
/* ESTADOS DE PEDIDO (checkout, delivery, intranet)         */
/* ======================================================== */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.order-status-badge.status-registrado { background-color: #e3f2fd; color: #1565c0; }
.order-status-badge.status-en-preparacion { background-color: #fff3e0; color: #e65100; }
.order-status-badge.status-listo { background-color: var(--secondary-container); color: var(--on-secondary-container); }
.order-status-badge.status-entregado { background-color: #e8f5e9; color: #2e7d32; }
.order-status-badge.status-cancelado { background-color: #ffebee; color: #c62828; }

/* ======================================================== */
/* RESUMEN DE PEDIDO (checkout.html)                        */
/* ======================================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: flex-start;
}
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.order-summary-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.order-summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-container-high);
    animation: fadeInUp 0.3s ease-out forwards;
}
.order-summary-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.order-summary-item-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.order-summary-item-name { font-size: 14px; font-weight: 600; color: var(--on-background); }
.order-summary-item-price { font-size: 12.5px; color: var(--on-surface-variant); }
.order-summary-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}
.order-summary-qty button {
    width: 26px; height: 26px; border-radius: 6px;
    border: 1px solid var(--outline-variant);
    background-color: var(--surface-container-lowest);
    cursor: pointer; font-size: 14px; color: var(--primary);
    transition: background-color 0.2s;
}
.order-summary-qty button:hover { background-color: var(--surface-container-high); }
.order-summary-qty span { font-size: 13.5px; font-weight: 600; min-width: 16px; text-align: center; }
.order-summary-line-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.order-summary-remove {
    background: none; border: none; cursor: pointer;
    color: var(--on-surface-variant); flex-shrink: 0; padding: 6px; border-radius: 50%;
    transition: all 0.2s;
}
.order-summary-remove:hover { color: #c62828; background-color: #ffebee; }

.order-summary-totals {
    border-top: 1.5px solid var(--outline-variant);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.order-summary-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--on-surface-variant);
}
.order-summary-total-row.grand-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Noto Serif', serif;
}

.checkout-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--on-surface-variant);
}
.checkout-empty-state .material-symbols-outlined {
    font-size: 56px;
    color: var(--outline-variant);
    margin-bottom: 12px;
}

.delivery-fields-toggle {
    display: none;
}
.delivery-fields-toggle.is-visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.checkout-confirmation {
    text-align: center;
    padding: 40px 20px;
}
.checkout-confirmation .material-symbols-outlined.success-icon {
    font-size: 64px;
    color: #2e7d32;
    margin-bottom: 16px;
}
.checkout-confirmation-code {
    display: inline-block;
    background-color: var(--surface-container);
    border: 1.5px dashed var(--secondary);
    border-radius: 10px;
    padding: 10px 24px;
    font-family: 'Noto Serif', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
    letter-spacing: 1px;
}
.checkout-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.field-error-msg {
    display: none;
    color: #c62828;
    font-size: 12.5px;
    margin-top: 6px;
    line-height: 1.4;
}
.field-error-msg.is-visible {
    display: block;
}

.tracking-lookup-result {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    border: 1.5px solid var(--outline-variant);
    background-color: var(--surface-container-lowest);
    animation: fadeInUp 0.3s ease-out forwards;
}
.tracking-lookup-result.not-found {
    border-color: #ffcdd2;
    background-color: #ffebee;
    color: #c62828;
}

