/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Shared store stylesheet used by IndexV2 and IndexV3.
 * Owns the drawer overlay system (.store-drawer*), the product-finder
 * wizard (.finder-*, .step-*), the quick-view content layout (.qv-*,
 * .quick-view-content), the delivery status indicator (.status-dot*,
 * .status-label, .delivery-status), and the mobile categories-drawer
 * tabs (.category-tab--mobile, .category-tabs--drawer).
 *
 * Fallback `--store-*` values are defined at :root so V3 (which does
 * not load IndexV2.css) renders correctly. On the V2 page IndexV2.css
 * loads AFTER this file and overrides the same variables, so V2 keeps
 * its original look unchanged.
 */

:root {
    --store-deep: #1a2238;
    --store-navy: #25334d;
    --store-gold: #c9a430;
    --store-gold-light: #e6b943;
    --store-gold-subtle: rgba(201, 164, 48, 0.12);
    --store-cream: #fdfaf3;
    --store-white: #ffffff;
    --store-text-primary: #1e2433;
    --store-text-secondary: #4b5563;
    --store-text-muted: #6b7280;
    --store-text-light: #ffffff;
    --store-text-light-muted: rgba(240, 240, 242, 0.78);
    --store-border: #e5e7eb;
    --store-border-light: #f3f4f6;
    --store-bg-light: #f9fafb;
    --store-teal: #1e8e6e;
    --store-teal-subtle: rgba(30, 142, 110, 0.10);
    --store-success: #10b981;
    --store-gray-200: #e5e7eb;
    --store-radius-sm: 8px;
    --store-radius-md: 10px;
    --store-radius-lg: 14px;
    --store-radius-xl: 18px;
    --store-radius-full: 999px;
    --store-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --store-shadow-gold: 0 4px 14px rgba(201, 164, 48, 0.2);
    --store-transition: all 0.2s ease;
    --store-font-serif: 'Playfair Display', Georgia, serif;
}

/* ============================================
   STORE HERO - shared by IndexV2 and IndexV3
   Dark cinematic header with title, subtitle, CTAs and trust strip.
   Padding-top accounts for the fixed-top navbar in the public layout.
   ============================================ */
.store-hero {
    position: relative;
    padding: 6rem 0 5rem;
    overflow: hidden;
    background: var(--store-deep);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(201, 164, 48, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(13, 148, 136, 0.10) 0%, transparent 50%);
}

.store-hero .hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.store-hero .hero-gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 164, 48, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.store-hero .hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.store-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: var(--store-gold);
    color: var(--store-deep);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-hero .hero-title {
    font-family: var(--store-font-serif);
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--store-text-light);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.store-hero .text-gradient {
    background: linear-gradient(135deg, var(--store-gold) 0%, var(--store-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.store-hero .hero-subtitle {
    font-size: 1.25rem;
    color: var(--store-text-light-muted);
    margin-bottom: 2rem;
    max-width: 700px;
    line-height: 1.7;
    margin-left: auto;
    margin-right: auto;
}

.store-hero .hero-cta-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.store-hero .btn-hero-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--store-gold);
    color: var(--store-deep);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--store-radius-md);
    text-decoration: none;
    transition: var(--store-transition);
    box-shadow: var(--store-shadow-gold);
}

.store-hero .btn-hero-primary:hover {
    background: var(--store-gold-light);
    color: var(--store-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 164, 48, 0.4);
    text-decoration: none;
}

.store-hero .btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--store-text-light);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--store-radius-md);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: var(--store-transition);
}

.store-hero .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--store-gold);
    color: var(--store-gold);
    text-decoration: none;
}

.store-hero .hero-trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.store-hero .trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--store-text-light-muted);
    font-size: 0.9375rem;
}

.store-hero .trust-item i {
    color: var(--store-gold);
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .store-hero {
        padding: 5rem 0 3rem;
    }
}

/* ============================================
   DRAWER PANELS - RESPONSIVE MODAL DRAWERS
   ============================================ */
.store-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.store-drawer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.store-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.store-drawer.open .store-drawer-backdrop {
    opacity: 1;
}

.store-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    max-width: 600px;
    height: 100vh;
    background: var(--store-white);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1061;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
}

.store-drawer.open .store-drawer-panel {
    transform: translateX(0);
}

.store-drawer-header {
    background: linear-gradient(135deg, var(--store-deep) 0%, var(--store-navy) 100%);
    color: var(--store-text-light);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.store-drawer-title {
    font-family: var(--store-font-serif);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--store-text-light);
    margin: 0;
    flex-grow: 1;
    padding-right: 16px;
}

.store-drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.25rem;
    color: var(--store-text-light);
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.store-drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.store-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    background: var(--store-cream);
}

.store-drawer-footer {
    padding: 20px 24px;
    background: var(--store-white);
    border-top: 1px solid var(--store-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.store-drawer-close-btn {
    background: var(--store-gold);
    color: var(--store-deep);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--store-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--store-transition);
}

.store-drawer-close-btn:hover {
    background: var(--store-gold-light);
    color: var(--store-deep);
}

@media (max-width: 768px) {
    .store-drawer-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: 85vh;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    }

    .store-drawer.open .store-drawer-panel {
        transform: translateY(0);
    }

    .store-drawer-header {
        border-radius: 24px 24px 0 0;
        padding: 16px 20px;
        position: relative;
    }

    .store-drawer-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .store-drawer-backdrop {
        background: rgba(0, 0, 0, 0.3);
    }

    .store-drawer-body {
        padding: 20px;
    }

    .store-drawer-footer {
        padding: 16px 20px;
    }
}

/* ============================================
   QUICK VIEW CONTENT
   ============================================ */
.quick-view-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qv-image-wrapper {
    width: 100%;
    margin: 0 0 0.5rem 0;
    border-radius: var(--store-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #F9FAFB 0%, #EDF2F7 100%);
    aspect-ratio: 16 / 10;
}

.qv-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qv-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--store-text-primary);
}

.qv-pricing {
    margin-bottom: 0.75rem;
}

.qv-price-original {
    font-size: 1rem;
    color: var(--store-text-muted);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.qv-price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--store-gold);
}

.qv-description {
    color: var(--store-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.qv-description ul,
.qv-description ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.qv-description li {
    margin-bottom: 0.5rem;
}

.qv-description p {
    margin-bottom: 0.75rem;
}

.qv-description strong,
.qv-description b {
    font-weight: 700;
    color: var(--store-text-primary);
}

.qv-description small {
    font-size: 0.875rem;
    color: var(--store-text-muted);
}

.qv-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.qv-actions .btn {
    padding: 0.875rem 1.5rem;
}

@media (max-width: 768px) {
    .qv-image-wrapper {
        margin-bottom: 0.75rem;
    }

    .quick-view-content {
        gap: 1rem;
    }

    .qv-title {
        font-size: 1.25rem;
    }

    .qv-price-current {
        font-size: 1.75rem;
    }

    .qv-actions {
        flex-direction: column;
    }

    .qv-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PRODUCT FINDER WIZARD
   ============================================ */
.finder-progress-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1rem 0 0.5rem;
}

.finder-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--store-border-light);
    color: var(--store-text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.finder-dot.active {
    background: var(--store-gold);
    color: var(--store-deep);
    box-shadow: 0 0 0 3px rgba(201, 164, 48, 0.2);
}

.finder-dot.completed {
    background: var(--store-success, #22c55e);
    color: #fff;
}

.finder-dot-line {
    width: 2.5rem;
    height: 2px;
    background: var(--store-border-light);
    transition: background 0.3s ease;
}

.finder-dot-line.completed {
    background: var(--store-success, #22c55e);
}

.finder-wizard {
    padding: 1rem 0;
}

.finder-step {
    display: none;
}

.finder-step.active {
    display: block;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--store-text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.step-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.step-option {
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid var(--store-border);
    border-radius: var(--store-radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--store-text-primary);
    cursor: pointer;
    transition: var(--store-transition);
}

.step-option:hover {
    border-color: var(--store-gold);
    background: var(--store-gold-subtle);
}

.step-option.selected {
    border-color: var(--store-gold);
    background: var(--store-gold);
    color: var(--store-deep);
}

.finder-provider-note {
    margin-bottom: 1rem;
}

.finder-provider-note-inner {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--store-teal-subtle);
    border-radius: var(--store-radius-md);
    font-size: 0.875rem;
    color: var(--store-text-secondary);
}

.finder-provider-convert {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--store-text-muted);
}

.finder-provider-convert a {
    color: var(--store-teal);
    text-decoration: none;
}

.finder-provider-convert a:hover {
    text-decoration: underline;
}

.finder-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.finder-rec-card {
    background: var(--store-white);
    border-radius: var(--store-radius-lg);
    overflow: hidden;
    border: 2px solid var(--store-border);
    display: flex;
    flex-direction: column;
    transition: var(--store-transition);
}

.finder-rec-card:hover {
    box-shadow: var(--store-shadow-md);
}

.finder-rec-card-best {
    border-color: var(--store-gold);
    box-shadow: var(--store-shadow-gold);
}

.finder-rec-card-premium {
    border-color: var(--store-deep);
}

.finder-rec-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--store-radius-full);
    margin: 0.75rem 0.75rem 0;
    align-self: flex-start;
}

.finder-rec-badge-best {
    background: var(--store-gold);
    color: var(--store-deep);
}

.finder-rec-badge-budget {
    background: var(--store-gray-200);
    color: var(--store-text-secondary);
}

.finder-rec-badge-premium {
    background: var(--store-deep);
    color: var(--store-gold);
}

.finder-rec-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--store-bg-light);
}

.finder-rec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.finder-rec-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.finder-rec-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--store-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.finder-rec-desc {
    font-size: 0.8125rem;
    color: var(--store-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex-grow: 1;
}

.finder-rec-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--store-gold);
    margin-bottom: 0.5rem;
}

.finder-rec-delivery {
    font-size: 0.75rem;
    color: var(--store-text-muted);
    margin-bottom: 0.75rem;
}

.finder-rec-delivery .status-dot {
    margin-right: 0.25rem;
}

.finder-rec-cta {
    width: 100%;
    justify-content: center;
}

.finder-restart {
    text-align: center;
}

.finder-restart .btn {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .finder-recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .finder-rec-card {
        flex-direction: row;
        text-align: left;
    }

    .finder-rec-image {
        width: 100px;
        min-width: 100px;
        aspect-ratio: 1;
        order: -1;
    }

    .finder-rec-badge {
        margin: 0.75rem 1rem 0;
        align-self: flex-start;
    }

    .finder-rec-content {
        padding: 1rem 1.25rem;
        min-width: 0;
    }
}

/* ============================================
   DELIVERY STATUS / STATUS DOTS
   ============================================ */
.delivery-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.status-dot-live {
    background-color: var(--store-success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-dot-queue {
    background-color: var(--store-text-muted, #94a3b8);
}

.status-label {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    color: var(--store-text-secondary);
    line-height: 1;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08); }
}

/* ============================================
   CATEGORY TABS - DRAWER (mobile categories)
   ============================================ */
.category-tabs--drawer {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    flex-wrap: nowrap;
    white-space: normal;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.category-tab--mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--store-radius-sm);
    font-size: 0.9375rem;
    background: transparent;
    color: var(--store-text-secondary);
    cursor: pointer;
    transition: var(--store-transition);
}

.category-tab--mobile:hover {
    background: var(--store-bg-light);
    color: var(--store-text-primary);
}

.category-tab--mobile.active {
    background: var(--store-gold-subtle);
    color: var(--store-gold);
    border-color: var(--store-gold);
}

.category-tab--mobile > span:not(.category-count) {
    flex-grow: 1;
}

.category-tab--mobile .category-count {
    margin-left: auto;
    background: var(--store-border-light);
    color: var(--store-text-muted);
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-tab--mobile.active .category-count {
    background: var(--store-gold);
    color: var(--store-deep);
}
