/* ====================================================================
   SINFILA - TIENDA VIRTUAL (DISEÑO PREMIUM PWA)
   ==================================================================== */

:root {
    /* Paleta de Colores - Feria Americana / Festival Nocturno */
    --bg-main: #050408;
    --bg-surface: rgba(24, 16, 34, 0.88);
    --bg-surface-solid: #100914;
    --bg-surface-hover: rgba(48, 24, 60, 0.96);

    --primary: #00b386;
    --primary-light: #6ef9be;
    --primary-gradient: linear-gradient(135deg, #00b386 0%, #00e676 100%);

    --accent: #4caf50;
    --accent-gradient: linear-gradient(135deg, #00b386 0%, #4caf50 100%);

    --text-primary: #f7f4e8;
    --text-secondary: #c7d8b4;
    --text-muted: #8fae8b;

    --border-color: rgba(0, 200, 83, 0.12);
    --border-color-hover: rgba(0, 200, 83, 0.24);

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.42);

    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 183, 3, 0.12);

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at top left, rgba(0, 200, 83, 0.10), transparent 18%),
        radial-gradient(circle at 85% 10%, rgba(0, 255, 150, 0.09), transparent 20%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
    background-attachment: fixed;
    padding-bottom: 80px;
    /* Espacio para la bottom nav */
}

h1,
h2,
h3,
h4,
.brand-badge {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Helpers */
.hidden {
    display: none !important;
}

/* ====================================================================
   PANTALLAS OVERLAY (LOADING & ERROR)
   ==================================================================== */

.loading-overlay,
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 200, 83, 0.18);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.loader-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.error-card {
    background: var(--bg-surface-solid);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.error-icon {
    width: 56px;
    height: 56px;
    color: var(--accent);
    margin-bottom: 20px;
}

.error-card h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-retry {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-bounce);
}

.btn-retry:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* ====================================================================
   STORE LAYOUT & HEADER (HERO)
   ==================================================================== */

.store-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

.store-header {
    position: relative;
    min-height: clamp(360px, 58vh, 520px);
    width: min(1120px, 100%);
}

.store-layout>section {
    width: min(1120px, 100%);
}

@media (min-width: 1024px) {
    .store-layout {
        padding-left: 24px;
        padding-right: 24px;
    }

    .profile-panel {
        margin: 48px auto;
    }
}

.store-header {
    position: relative;
    min-height: clamp(360px, 58vh, 520px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image:
        linear-gradient(180deg, rgba(5, 4, 8, 0.25), rgba(5, 4, 8, 0.9)),
        url('/tienda/assets/fairground-hero.jpg'),
        url('https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=1200');
    display: flex;
    align-items: flex-end;
    padding-bottom: 24px;
    overflow: hidden;
}

.store-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 180, 0.14), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(0, 200, 255, 0.12), transparent 20%);
    pointer-events: none;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 4, 8, 0.38) 0%, rgba(5, 4, 8, 0.92) 75%, rgba(5, 4, 8, 0.98) 100%);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 18px 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: -190px;
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1100px;
}

.brand-badge {
    background: rgba(15, 15, 20, 0.6);
    border: var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.brand-badge i {
    color: var(--accent);
    width: 16px;
    height: 16px;
    fill: var(--accent);
}

.cart-trigger-btn {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: var(--transition-bounce);
}

.cart-trigger-btn:hover {
    transform: scale(1.1);
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--primary);
}

.cart-trigger-btn i {
    width: 22px;
    height: 22px;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 6px;
    border: 2px solid var(--bg-main);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 70, 239, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(217, 70, 239, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 70, 239, 0);
    }
}

.event-info {
    padding: 28px 24px 32px;
    background: rgba(5, 5, 10, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(28px) saturate(150%);
    margin-top: 0;
}

.event-info h1 {
    font-size: clamp(2.25rem, 4vw, 3.35rem);
    line-height: 1.05;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #7AFCEA 0%, #4EE186 30%, #00F9A4 65%, #89FFB8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.24);
}

.event-info p {
    color: rgba(241, 244, 246, 0.92);
    font-size: 1.03rem;
    margin-bottom: 18px;
    max-width: 680px;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.event-meta-details {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}

.meta-item-fullwidth {
    flex: 1 1 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.78rem;
    min-width: 0;
}

#event-meta {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-item-fullwidth i {
    width: 14px;
    height: 14px;
    color: var(--primary-light);
}

.event-hero-figure {
    position: relative;
    margin: 22px 0 0;
    width: 100%;
    height: min(280px, 48vw);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px) saturate(140%);
}

.event-hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 0.8s ease, filter 0.6s ease;
    filter: saturate(1.08) contrast(1.05);
}

.event-hero-figure:hover .event-hero-image {
    transform: scale(1.05);
}

.event-hero-figure::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 5, 10, 0.03), rgba(5, 5, 10, 0.45));
}

/* Soft vignette / edge fade for the hero image */
.event-hero-image {
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
}

/* Description truncation + read more */
.event-desc-wrapper {
    margin-top: 18px;
    display: block;
    position: relative;
    gap: 8px;
}

#event-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(241, 244, 246, 0.92);
    font-size: 0.75rem;
    line-height: 1.6;
    padding-right: 12px;
    /* espacio mínimo para el botón */
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

#event-description.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.readmore {
    position: absolute;
    right: 8px;
    bottom: 2px;
    background: linear-gradient(to left, rgba(5, 5, 10, 0.88), transparent);
    border: none;
    color: var(--primary-light);
    font-weight: 700;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
}

.readmore.hidden {
    display: none;
}

/* Inline readmore button when injected into paragraph */
.readmore-inline {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-weight: 800;
    cursor: pointer;
    padding: 0 0 0 6px;
    font-size: 0.98rem;
}

.truncate-ellipsis {
    color: inherit;
    white-space: nowrap;
}

/* Marquee styles for meta items */
.meta-item {
    overflow: hidden;
    position: relative;
}

.meta-item .marquee-wrap {
    display: inline-flex;
    gap: 24px;
    white-space: nowrap;
}

.meta-item .marquee-content {
    display: inline-block;
    padding-right: 24px;
}

.meta-item .marquee-wrap.marquee-active {
    animation: marquee var(--marquee-duration, 8s) linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Ensure inner spans behave as measurable boxes */

/* Fallback CSS marquee (used if WA not available) */
.marquee-fallback {
    animation-name: marquee-left;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.event-hero-caption {
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.hero-badge,
.hero-note {
    display: inline-flex;
    align-items: center;
}

.hero-badge {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    color: #e8fdf4;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-note {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.4;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 8px;
    border: var(--glass-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-item i {
    width: 14px;
    height: 14px;
    color: var(--primary-light);
}

/* CTA visible without scroll */
.home-cta-container {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding: 8px 20px;
}

.btn-go-to-store {
    background: var(--primary-gradient);
    color: #091018;
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px; 
}

@media (max-width: 520px) {
    .btn-go-to-store {
        padding: 10px 16px;
        font-size: 0.95rem;
    }

    .event-info {
        padding: 16px;
        border-radius: 20px;
    }
}

/* ====================================================================
   SECTOR PUESTOS (TABS HORIZONTALES)
   ==================================================================== */

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.puestos-section {
    padding-top: 24px;
    background: radial-gradient(circle at top, rgba(0, 200, 83, 0.08), transparent 40%),
        linear-gradient(to bottom, rgba(5, 4, 8, 0.96) 0%, rgba(5, 4, 8, 1) 100%);
}

.section-title {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.puestos-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.puestos-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.puesto-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 200, 83, 0.14);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-bounce);
}

.puesto-tab.active {
    background: var(--primary-gradient);
    color: #121212;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(0, 200, 83, 0.25);
    transform: translateY(-2px);
}

.puesto-tab:not(.active):hover {
    background: rgba(0, 200, 83, 0.12);
    color: var(--text-primary);
    border-color: rgba(0, 200, 83, 0.18);
}

.puesto-tab-icon {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.puesto-tab-icon-placeholder {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.puesto-tab-icon-placeholder i {
    width: 12px;
    height: 12px;
}

/* Reglas para los logos en Mis Compras */
.orden-puesto-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orden-puesto-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.orden-puesto-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.entrega-puesto-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ccc;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

.entrega-puesto-logo-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    font-size: 14px;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ====================================================================
   CATALOGO DE PRODUCTOS (GRID Y TARJETAS)
   ==================================================================== */

.catalog-section {
    padding: 24px 0 60px;
    flex-grow: 1;
}

.category-group {
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.category-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    padding-left: 14px;
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media(min-width: 520px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media(min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media(min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.product-card {
    background: linear-gradient(180deg, rgba(24, 12, 36, 0.94), rgba(8, 4, 10, 0.96));
    border: 1px solid rgba(0, 200, 83, 0.12);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-bounce);
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 200, 83, 0.25);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 24px rgba(0, 200, 83, 0.16);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 110px;
    background: radial-gradient(circle at 35% 25%, rgba(0, 200, 83, 0.12), transparent 45%);
    overflow: hidden;
}

@media(min-width: 768px) {
    .product-image-container {
        height: 140px;
    }
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    gap: 8px;
}

.product-image-placeholder i {
    width: 32px;
    height: 32px;
}

/* Badge del puesto: nombre + logo sobre la imagen del producto */
.puesto-badge-on-card {
    position: absolute;
    bottom: 7px;
    left: 7px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(4, 4, 8, 0.72);
    backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 3px 8px 3px 5px;
    z-index: 2;
    max-width: calc(100% - 14px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.puesto-badge-nombre {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    line-height: 1;
    order: 2;
}

.puesto-badge-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    order: 1;
}

.puesto-badge-logo-ph {
    background: rgba(0, 200, 83, 0.18);
    border-color: rgba(0, 200, 83, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
}

.product-info {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media(min-width: 768px) {
    .product-name {
        font-size: 0.92rem;
    }
}

.product-description {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 4px;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    flex-shrink: 0;
}

@media(min-width: 768px) {
    .product-price {
        font-size: 1.1rem;
    }
}

/* Selector de cantidad / Botón añadir */
.add-to-cart-btn {
    background: rgba(0, 179, 134, 0.12);
    border: 1.5px solid var(--primary);
    color: var(--primary-light);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}

.add-to-cart-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    background: var(--primary-gradient);
    color: #0a1a0f;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 200, 83, 0.32);
    transform: scale(1.08);
}

.add-to-cart-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(255,255,255,0.1);
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
}

.qty-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 3px;
    gap: 8px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.qty-btn i {
    width: 14px;
    height: 14px;
}

.qty-number {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 18px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

/* Indicación de Stock Agotado */
.product-card.out-of-stock {
    opacity: 0.6;
}

.out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid #ef4444;
    color: #f87171;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    z-index: 2;
}

/* ====================================================================
   DRAWER DEL CARRITO (SIDEBAR / BOTTOM-SHEET)
   ==================================================================== */

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    height: 100%;
    background: var(--bg-surface-solid);
    border-top: var(--glass-border);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media(min-width: 500px) {
    .cart-drawer {
        top: 0;
        right: 0;
        bottom: auto;
        width: 420px;
        max-height: 100vh;
        height: 100%;
        border-top: none;
        border-left: var(--glass-border);
        border-radius: 0;
        transform: translateX(100%);
    }
}

.cart-drawer.active {
    transform: translateY(0);
}

@media(min-width: 500px) {
    .cart-drawer.active {
        transform: translateX(0);
    }
}

.cart-header {
    padding: 24px;
    border-bottom: var(--border-color) 1px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header-title i {
    color: var(--primary-light);
    width: 22px;
    height: 22px;
}

.cart-header-title h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.close-drawer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.close-drawer-btn i {
    width: 18px;
    height: 18px;
}

/* Items del Carrito */
.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-cart-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    height: 100%;
    text-align: center;
    gap: 16px;
    padding: 40px;
}

.empty-cart-state i {
    width: 64px;
    height: 64px;
    stroke-width: 1.5;
}

.empty-cart-state p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 250px;
    line-height: 1.4;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: var(--glass-border);
    border-radius: 16px;
    align-items: center;
    animation: fadeInUp 0.3s ease;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.cart-item-puesto {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 4px;
}

.btn-remove-item:hover {
    color: #ef4444;
}

.btn-remove-item i {
    width: 16px;
    height: 16px;
}

/* Footer del Carrito */
.cart-footer {
    padding: 24px;
    border-top: var(--border-color) 1px solid;
    background: rgba(10, 10, 15, 0.95);
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: var(--border-color) 1px dashed;
    padding-top: 14px;
    margin-bottom: 0;
}

.total-row span:last-child {
    font-family: 'Outfit', sans-serif;
    color: var(--accent-gradient);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
}

.btn-checkout {
    background: var(--accent-gradient);
    border: none;
    color: white;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; 
    transition: var(--transition-bounce);
}

.btn-checkout:hover {
    transform: translateY(-2px); 
}

.btn-checkout:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    filter: saturate(0.8);
}

.btn-checkout.loading {
    pointer-events: none;
    padding: 4px;
}

.btn-checkout.loading .loader {
    position: relative;
    width: 100%;
    height: 44px;
    min-width: 120px;
    background: transparent;
}

.btn-checkout.loading .loader:before {
    -webkit-animation: dots-flow .85s infinite ease;
            animation: dots-flow .85s infinite ease;
    border-radius: 100%;
    content: '';
    height: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -40px);
            transform: translate(-50%, -40px);
    width: 16px;
}

@-webkit-keyframes dots-flow {
  0%, 100% {
    -webkit-box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 0 white;
  }
  35% {
    -webkit-box-shadow: -26px 32px 0 4px purple, 0px 32px 0 0 white, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0 4px purple, 0px 32px 0 0 white, 26px 32px 0 0 white;
  }
  50% {
    -webkit-box-shadow: -26px 32px 0 0 white, 0px 32px 0 4px purple, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0 0 white, 0px 32px 0 4px purple, 26px 32px 0 0 white;
  }
  65% {
    -webkit-box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 4px purple;
            box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 4px purple;
  }
}

@keyframes dots-flow {
  0%, 100% {
    -webkit-box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 0 white;
  }
  35% {
    -webkit-box-shadow: -26px 32px 0 4px purple, 0px 32px 0 0 white, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0 4px purple, 0px 32px 0 0 white, 26px 32px 0 0 white;
  }
  50% {
    -webkit-box-shadow: -26px 32px 0 0 white, 0px 32px 0 4px purple, 26px 32px 0 0 white;
            box-shadow: -26px 32px 0 0 white, 0px 32px 0 4px purple, 26px 32px 0 0 white;
  }
  65% {
    -webkit-box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 4px purple;
            box-shadow: -26px 32px 0px 0 white, 0px 32px 0 0 white, 26px 32px 0 4px purple;
  }
}

@keyframes loader-text {
    to { background-size: 100% 100%; }
}

/* ====================================================================
   MODAL OVERLAY & CARD
   ==================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: var(--bg-surface-solid);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

.modal-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.modal-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-light);
}

.modal-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.modal-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: var(--transition-bounce);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.btn-full {
    width: 100%;
}

/* ====================================================================
   TOAST NOTIFICATION SYSTEM
   ==================================================================== */

.toast-container {
    position: fixed;
    bottom: 90px;
    /* Ajustado para que no lo tape la bottom nav */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3000;
    width: 90%;
    max-width: 350px;
}

.toast {
    background: rgba(20, 20, 28, 0.85);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    transition: var(--transition-smooth);
}

@keyframes toastIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-success i {
    color: #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-error i {
    color: #ef4444;
}

.toast.toast-info {
    border-left: 4px solid var(--primary);
}

.toast.toast-info i {
    color: var(--primary-light);
}

.toast i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ====================================================================
   FOOTER
   ==================================================================== */

.store-footer {
    background: #050508;
    padding: 40px 20px;
    text-align: center;
    border-top: var(--border-color) 1px solid;
}

.store-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ====================================================================
   SCROLLBAR DE CATEGORIAS SNAP Y OTROS COMPORTAMIENTOS TÁCTILES
   ==================================================================== */
.qty-btn:active {
    transform: scale(0.9);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* ====================================================================
   ESTILOS DE ACCIONES DE CABECERA Y BOTONES AUXILIARES (AUTH0)
   ==================================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-trigger-btn,
.nav-compras-btn {
    background: rgba(255, 255, 255, 0.08);
    border: var(--glass-border);
    backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-bounce);
}

.login-trigger-btn:hover,
.nav-compras-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.login-trigger-btn i,
.nav-compras-btn i {
    width: 16px;
    height: 16px;
}

.user-menu-container {
    position: relative;
}

.user-avatar-btn,
.login-trigger-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.user-avatar-btn:hover,
.login-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
}

.user-avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #111;
    font-weight: 700;
    font-size: 1rem;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    padding: 10px 0;
    z-index: 50;
}

.user-menu-dropdown.hidden {
    display: none;
}

.user-menu-action,
.user-menu-action i {
    width: 100%;
}

.user-menu-action {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    padding: 12px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.user-menu-action:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar-guest {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 1rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}



/* ====================================================================
   BOTTOM NAVIGATION BAR & SECTIONS (NEW UX)
   ==================================================================== */

.view-section {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.view-section.view-hidden {
    display: none !important;
    opacity: 0;
}

/* Home CTA */
.home-cta-container {
    display: flex;
    justify-content: center;
    padding: 28px 18px 36px;
}

.btn-go-to-store {
    background: var(--primary-gradient);
    border: none;
    color: #121212;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px; 
    transition: var(--transition-bounce);
}

.btn-go-to-store:hover {
    transform: translateY(-4px) scale(1.02); 
}

.btn-go-to-store i {
    width: 20px;
    height: 20px;
}

/* Panel Perfil */
.profile-panel {
    max-width: 600px;
    width: calc(100% - 32px);
    margin: 40px auto;
    padding: 30px 20px;
    background: var(--bg-surface-solid);
    border-radius: 24px;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.profile-avatar-area {
    margin-bottom: 30px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.2);
}

.profile-avatar-large .user-avatar-guest {
    font-size: 2.8rem;
    line-height: 1;
}

.profile-avatar-large .user-avatar-guest i,
.profile-avatar-large .user-avatar-guest svg {
    width: 2.8rem;
    height: 2.8rem;
}

.profile-avatar-large .user-avatar-initial {
    font-size: 2.8rem;
}

.profile-user-details {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.profile-user-name {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.profile-user-email {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.profile-guest-hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 80%;
    margin: 0 auto;
}

.profile-actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-action-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition-bounce);
    cursor: pointer;
    width: 100%;
}

.profile-action-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.profile-action-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 200, 83, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: var(--primary-light);
}

.profile-action-label {
    flex-grow: 1;
    text-align: left;
    font-size: 1.05rem;
}

.profile-action-chevron {
    color: var(--text-muted);
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.4);
    cursor: pointer;
    z-index: 600;
    transition: var(--transition-bounce);
}

.floating-cart-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(0, 200, 83, 0.5);
}

.floating-cart-btn i {
    width: 24px;
    height: 24px;
}

.floating-cart-btn .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    /* Rojo para destacar más como badge flotante */
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 6px;
    border: 2px solid var(--bg-surface-solid);
    animation: none;
}

.floating-cart-btn.cart-ping {
    animation: cartPingAnim 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cartPingAnim {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(0, 200, 83, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(0, 200, 83, 0.4);
    }
}

/* Bottom Navigation Bar (CodePen Replica Exacta) */
:root {
    --nav-clr: #222327;
    --nav-bg-cutout: var(--bg-main);
    /* Match exacto con el fondo de la app */
    --color-nav-active: #00b386;
}

.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.bottom-nav-list {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 420px;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: auto;
}

.nav-item {
    list-style: none;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 18px;
    min-width: 68px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px) saturate(140%);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-item:hover {
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.22);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(18px) saturate(160%) contrast(1.05);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

/* Refuerzo: asegurar que el override se aplique al bottom-nav específico */
.bottom-nav .nav-item.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(150%) contrast(1.02);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
}

.nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.25s ease, opacity 0.25s ease, color 0.25s ease;
    pointer-events: none;
}

.nav-icon {
    font-size: 1.15rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    z-index: 3;
    transition: transform 0.25s ease, color 0.25s ease;
    color: var(--nav-clr);
    overflow: visible;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    transform: scale(1.15);
    color: var(--color-nav-active);
}

.nav-item .nav-label {
    color: rgba(255, 255, 255, 0.94);
}

.nav-item.active .nav-label {
    color: #e3e4e8;
}

.nav-cart-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-cart-btn .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px;
    border: 2px solid rgba(0, 0, 0, 0.12);
}

.nav-cart-btn.cart-ping {
    animation: cartPingAnim 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item:hover {
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.15rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    z-index: 3;
    transition: transform 0.25s ease, color 0.25s ease;
    color: var(--nav-clr);
    overflow: visible;
}

.nav-icon i,
.nav-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-icon .user-avatar-img,
.nav-icon .user-avatar-initial {
    width: 24px;
    height: 24px;
    border: none !important;
    transition: width 0.35s ease, height 0.35s ease;
    z-index: 3;
    display: block;
}

.nav-icon .user-avatar-initial {
    font-size: 0.8rem;
}

.nav-item.active .nav-icon {
    transform: translateY(-14px);
    color: var(--color-nav-active);
    background: transparent;
    box-shadow: none;
}

.nav-item.active .nav-icon .user-avatar-img,
.nav-item.active .nav-icon .user-avatar-initial {
    width: 28px;
    height: 28px;
}

.nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    transition: color 0.25s ease, text-shadow 0.25s ease;
    pointer-events: none;
}

.nav-item.active .nav-label {
    color: #f2f3f5;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.24);
}

.nav-item.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
    border: var(--glass-border);
}

.nav-item.active .nav-icon {
    transform: scale(1.25);
    color: var(--color-nav-active);
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
    color: var(--color-nav-active);
}

.nav-item:not(.active) .nav-icon,
.nav-item:not(.active) .nav-label {
    /* Mejorar legibilidad en estado no seleccionado */
    color: rgba(255, 255, 255, 0.92);
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    color: var(--color-nav-active);
}

.nav-item.active .nav-icon i,
.nav-item:hover .nav-icon i,
.nav-item.active .nav-icon svg,
.nav-item:hover .nav-icon svg {
    color: inherit;
}

.nav-item.active .nav-icon .user-avatar-img,
.nav-item:hover .nav-icon .user-avatar-img {
    filter: none;
}

.nav-item.active .nav-icon .user-avatar-initial,
.nav-item:hover .nav-icon .user-avatar-initial {
    color: inherit;
}

.nav-item:not(.active) .nav-icon,
.nav-item:not(.active) .nav-icon i,
.nav-item:not(.active) .nav-icon svg {
    color: #676973;
}

.nav-item:not(.active) .nav-label {
    color: #676973;
}

/* ====================================================================
   TIENDA REDISEÑO — BUSCADOR, CATEGORÍAS, SWITCH, PUESTOS GRID
   ==================================================================== */

/* ---- Buscador ---- */
.search-bar-wrapper {
    position: relative;
    padding: 16px 16px 8px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.search-bar-inner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 200, 83, 0.22);
    border-radius: 16px;
    padding: 0 14px;
    gap: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(16px) saturate(120%);
}

.search-bar-inner:focus-within {
    border-color: rgba(0, 200, 83, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12), 0 4px 20px rgba(0, 200, 83, 0.1);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    font-weight: 400;
    padding: 14px 0;
    caret-color: var(--primary);
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Remove browser default search cancel button */
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.search-clear-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

.search-clear-btn i { width: 16px; height: 16px; }

/* Dropdown de sugerencias */
.search-dropdown {
    position: absolute;
    top: calc(100% - 8px);
    left: 16px;
    right: 16px;
    background: rgba(12, 8, 18, 0.97);
    backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(0, 200, 83, 0.22);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 400;
    overflow: hidden;
    animation: dropdownIn 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    max-height: 380px;
    overflow-y: auto;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.search-suggestion-item:last-child { border-bottom: none; }

.search-suggestion-item:hover {
    background: rgba(0, 200, 83, 0.08);
}

.suggestion-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-img-ph {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}

.suggestion-img-ph i { width: 18px; height: 18px; }

.suggestion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.suggestion-nombre {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-puesto {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.suggestion-precio {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-light);
    flex-shrink: 0;
}

.search-highlight {
    background: rgba(0, 200, 83, 0.25);
    color: var(--primary-light);
    border-radius: 3px;
    padding: 0 1px;
    font-style: normal;
}

.search-no-results {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-no-results i { width: 18px; height: 18px; }

.search-ver-todos {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 200, 83, 0.08);
    border: none;
    border-top: 1px solid rgba(0, 200, 83, 0.12);
    color: var(--primary-light);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: 'Inter', sans-serif;
}

/* ================== MANUSCRIPT PRODUCT LAYOUT FOR TICKETS ================== */
.productos-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    width: 100%;
    text-align: left;
}

.productos-manuscritos {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.producto-manuscrito {
    font-family: 'Gloria Hallelujah', 'Indie Flower', cursive;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.3;
    color: #111;
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 10px 0;
    white-space: normal;
    word-break: break-word;
}

.producto-manuscrito.tachado .tachado-texto {
    color: #999;
}

.tachado-svg {
    position: absolute;
    left: -6%;
    top: 8%;
    width: 112%;
    height: 84%;
    pointer-events: none;
    overflow: visible;
}

/* Siempre dos columnas, incluso en pantallas chicas */
@media (max-width: 520px) {
    .productos-columnas { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
    .producto-manuscrito { font-size: 1.35rem; }
}

/* ========================================================================== */

.search-ver-todos:hover { background: rgba(0, 200, 83, 0.15); }
.search-ver-todos i { width: 15px; height: 15px; }

/* Resultados de búsqueda en el catálogo */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.search-results-count i { width: 16px; height: 16px; color: var(--primary); }

.search-results-clear {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: 'Inter', sans-serif;
}

.search-results-clear:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.search-results-clear i { width: 13px; height: 13px; }

/* ---- Fila de controles ---- */
.tienda-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 4px 16px 8px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Botón ordenar por precio */
.btn-sort-price {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-family: 'Inter', sans-serif;
}

.btn-sort-price i { width: 14px; height: 14px; }

.btn-sort-price:hover {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.3);
    color: var(--primary-light);
    transform: translateY(-1px);
}

.btn-sort-price.active {
    background: rgba(0, 200, 83, 0.15);
    border-color: var(--primary);
    color: var(--primary-light);
    box-shadow: 0 0 12px rgba(0, 200, 83, 0.2);
}

/* ---- Toggle Switch "Ver por puestos" ---- */
.toggle-puestos-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-label-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.toggle-label-text i { width: 15px; height: 15px; }

.toggle-puestos-label:has(input:checked) .toggle-label-text {
    color: var(--primary-light);
}

.toggle-switch-wrap { position: relative; }

.toggle-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.15);
    position: relative;
    transition: background 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.toggle-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.25s ease;
}

.toggle-switch-input:checked + .toggle-switch-track {
    background: var(--primary-gradient);
    border-color: transparent;
}

.toggle-switch-input:checked + .toggle-switch-track .toggle-switch-thumb {
    transform: translateX(20px);
    background: white;
}

/* ---- Categorías Pills ---- */
.categorias-section {
    padding: 4px 16px 8px;
    overflow: hidden;
}

.categorias-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.categoria-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(0, 200, 83, 0.18);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    white-space: nowrap;
}

.categoria-pill i { width: 15px; height: 15px; }

.categoria-pill:hover {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.categoria-pill.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #0a1a0f; 
    transform: translateY(-2px);
}

/* ---- Catálogo con padding ---- */
.catalog-section {
    padding: 8px 0 80px;
    flex-grow: 1;
}

/* ---- Grid de puestos ---- */
.puestos-grid-section {
    padding: 12px 0 80px;
}

.puestos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

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

.puesto-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0, 200, 83, 0.14);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-bounce);
    gap: 10px;
    position: relative;
}

.puesto-card:hover {
    background: rgba(0, 200, 83, 0.07);
    border-color: rgba(0, 200, 83, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 200, 83, 0.15);
}

.puesto-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid rgba(0, 200, 83, 0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.puesto-card-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.12);
    border: 2px solid rgba(0, 200, 83, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.puesto-card-logo-placeholder i { width: 28px; height: 28px; }

.puesto-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.puesto-card-nombre {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.puesto-card-qty {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.puesto-card-chevron {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ---- Detalle de Puesto ---- */
.puesto-detalle-section {
    padding: 12px 0 80px;
}

.btn-volver-puestos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 9px 16px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
    font-family: 'Inter', sans-serif;
}

.btn-volver-puestos:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    transform: translateX(-2px);
}

.btn-volver-puestos i { width: 16px; height: 16px; }

.puesto-detalle-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(0, 200, 83, 0.1);
    border-radius: 18px;
}

.puesto-detalle-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 200, 83, 0.3);
    flex-shrink: 0;
}

.puesto-detalle-logo-ph {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.1);
    border: 2px solid rgba(0, 200, 83, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.puesto-detalle-logo-ph i { width: 24px; height: 24px; }

.puesto-detalle-nombre {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.puesto-detalle-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ---- Estado vacío genérico ---- */
.empty-catalog-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    height: 200px;
    text-align: center;
    gap: 14px;
    padding: 40px 20px;
}

.empty-catalog-state i { width: 52px; height: 52px; stroke-width: 1.5; }

.empty-catalog-state p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 260px;
    line-height: 1.4;
}

/* ---- qty-selector más compacto en el grid ---- */
.qty-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 200, 83, 0.18);
    border-radius: 10px;
    padding: 2px;
    gap: 4px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-primary);
    width: 26px;
    height: 26px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.qty-btn:hover { background: rgba(0, 200, 83, 0.18); }
.qty-btn i { width: 12px; height: 12px; }

.qty-number {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 18px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

/* ====================================================================
   MODAL DETALLE DE PRODUCTO
   ==================================================================== */

/* Overlay */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.product-modal-card {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh; /* Para que no exceda la altura de la pantalla */
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.product-modal-overlay.active .product-modal-card {
    transform: scale(1);
    opacity: 1;
}

/* Botón de cierre */
.product-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: background 0.2s ease;
}

.product-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.product-modal-close-btn i {
    width: 20px;
    height: 20px;
}

/* Contenido del producto */
.product-modal-content {
    display: flex;
    flex-direction: column;
    /* Eliminado overflow-y: auto; de aquí, ahora el info-section lo maneja */
    padding-bottom: 0; /* Ya no necesitamos padding aquí, la action-bar es absoluta */
    flex-grow: 1; /* Permitir que ocupe el espacio disponible */
    min-height: 0; /* Permitir que los elementos flex se contraigan */
}

.product-modal-image-section {
    position: relative;
    width: 100%;
    height: 250px; /* Altura fija para la imagen del modal */
    overflow: hidden;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    /* Eliminado el background gradient para evitar "márgenes" visuales */
    /* background: radial-gradient(circle at 35% 25%, rgba(0, 200, 83, 0.12), transparent 45%); */
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen llene el espacio sin márgenes */
}

.product-modal-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    gap: 8px;
}

.product-modal-image-placeholder i {
    width: 48px;
    height: 48px;
}

.puesto-badge-on-modal {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(4, 4, 8, 0.72);
    backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 5px 10px 5px 8px;
    z-index: 2;
    max-width: calc(100% - 20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.puesto-badge-on-modal .puesto-badge-nombre {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.puesto-badge-on-modal .puesto-badge-logo {
    width: 24px;
    height: 24px;
}

/* Info Section */
.product-modal-info-section {
    padding: 20px 20px 90px 20px; /* Aumentado el padding inferior para dejar espacio a la action-bar */
    overflow-y: auto; /* Solo esta sección es scrolleable */
    flex-grow: 1; /* Permitir que ocupe el espacio restante y se desplace */
    min-height: 0; /* Necesario para que overflow-y: auto funcione correctamente en flex items */
}

.product-modal-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.product-modal-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Action Bar (Precio y Botones) */
.product-modal-action-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(var(--bg-surface-solid-rgb), 0.95); /* Usar RGB para controlar opacidad */
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    z-index: 5;
}

.product-modal-price {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-light);
}

.product-modal-action-bar .add-to-cart-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem; /* Para el icono */
}

.product-modal-action-bar .qty-selector {
    padding: 5px;
    gap: 10px;
}

.product-modal-action-bar .qty-btn {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
}

.product-modal-action-bar .qty-number {
    font-size: 1.1rem;
    min-width: 25px;
}

/* Body lock scroll */
body.modal-open {
    overflow: hidden;
}

/* Ajustes para el badge de agotado en el modal */
.product-modal-image-section .out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid #ef4444;
    color: #f87171;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    z-index: 2;
}