/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Store IndexV3 styling.
 * Single-column store layout with full-bleed shared hero (.store-hero),
 * packs/featured/reports rails, category tiles, full product grids, and
 * a mobile bottom-tab navigation. The sidebar from the original V3 mock
 * has been removed per product feedback.
 * Reuses shared drawer markup from _StoreDrawers.cshtml and shared
 * styles from _storeShared.css (drawers, hero, finder, quick-view).
 */

:root {
    --v3-bg: #f4f6fa;
    --v3-surface: #ffffff;
    --v3-surface-alt: #f8fafc;
    --v3-border: #e5e9f0;
    --v3-text: #1e2433;
    --v3-text-muted: #6b7383;
    --v3-text-subtle: #95a0b3;
    --v3-primary: #1e8e6e;
    --v3-primary-dark: #16604a;
    --v3-accent: #f4c34a;
    --v3-accent-dark: #d9a325;
    --v3-yellow: #facc15;
    --v3-yellow-dark: #ca8a04;
    --v3-hero-bg: #1a2238;
    --v3-hero-bg-2: #25334d;
    --v3-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --v3-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    --v3-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.14);
    --v3-radius: 14px;
    --v3-radius-sm: 10px;
    --v3-radius-lg: 20px;
    --v3-main-max: 1240px;
}

/* ============================================
   ROOT WRAPPER
   ============================================ */
.store-v3 {
    background: var(--v3-bg);
    color: var(--v3-text);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.store-v3 *,
.store-v3 *::before,
.store-v3 *::after {
    box-sizing: border-box;
}

.store-v3-layout {
    max-width: var(--v3-main-max);
    margin: 0 auto;
    padding: 28px 24px 80px;
}

/* ============================================
   MAIN COLUMN
   ============================================ */
.store-v3-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

/* ============================================
   UTILITY BAR
   ============================================ */
.store-v3-utility {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 10px 14px;
    box-shadow: var(--v3-shadow-sm);
}

.store-v3-search {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.store-v3-search > i {
    position: absolute;
    left: 14px;
    color: var(--v3-text-muted);
}

.store-v3-search input {
    width: 100%;
    border: 1px solid var(--v3-border);
    background: var(--v3-surface-alt);
    border-radius: 10px;
    padding: 10px 38px 10px 38px;
    color: var(--v3-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.store-v3-search input:focus {
    border-color: var(--v3-primary);
    background: var(--v3-surface);
}

.store-v3-search-clear {
    position: absolute;
    right: 6px;
    border: 0;
    background: transparent;
    color: var(--v3-text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.store-v3-search-clear:hover {
    background: var(--v3-border);
}

.store-v3-utility-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-v3-sort {
    border: 1px solid var(--v3-border);
    background: var(--v3-surface);
    border-radius: 10px;
    padding: 9px 12px;
    color: var(--v3-text);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.store-v3-sort:focus {
    border-color: var(--v3-primary);
}

/* ============================================
   PROMO BANNER
   ============================================ */
.store-v3-promo {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    border-radius: var(--v3-radius);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.store-v3-promo-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.08);
    color: #5b4a00;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.store-v3-promo-title {
    margin: 8px 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #5b4a00;
}

.store-v3-promo-desc {
    margin: 0;
    color: #6e5300;
    font-size: 0.9rem;
}

.store-v3-promo-desc strong {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 8px;
    border-radius: 6px;
}

.store-v3-countdown {
    text-align: center;
    color: #5b4a00;
}

.store-v3-countdown-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.store-v3-countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.store-v3-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 4px 10px;
    min-width: 44px;
}

.store-v3-countdown-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

.store-v3-countdown-text {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.store-v3-countdown-sep {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION
   ============================================ */
.store-v3-section {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 22px 24px;
    box-shadow: var(--v3-shadow-sm);
}

.store-v3-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.store-v3-section-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--v3-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.store-v3-section-title i {
    color: var(--v3-primary);
    font-size: 1.05rem;
}

#section-featured .store-v3-section-title i {
    color: var(--v3-accent-dark);
}

.store-v3-section-sub {
    margin: 4px 0 0;
    color: var(--v3-text-muted);
    font-size: 0.88rem;
}

.store-v3-section-link {
    color: var(--v3-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.store-v3-section-link:hover {
    color: var(--v3-primary-dark);
    text-decoration: underline;
}

/* ============================================
   CARD ROW / CAROUSEL
   ============================================ */
.store-v3-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.store-v3-carousel-dots {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.store-v3-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v3-border);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.store-v3-carousel-dot.active {
    background: var(--v3-primary);
    transform: scale(1.3);
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.store-v3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.store-v3-category-section {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: var(--v3-shadow-sm);
}

.store-v3-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.store-v3-category-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.store-v3-category-info > i {
    background: rgba(30, 142, 110, 0.10);
    color: var(--v3-primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.store-v3-category-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--v3-text);
}

.store-v3-category-desc {
    margin: 2px 0 0;
    color: var(--v3-text-muted);
    font-size: 0.85rem;
}

.store-v3-category-count {
    font-size: 0.85rem;
    color: var(--v3-text-muted);
    font-weight: 500;
}

/* ============================================
   PRODUCT CARD V3
   ============================================ */
.product-card-v3 {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}

.product-card-v3:hover {
    transform: translateY(-3px);
    box-shadow: var(--v3-shadow-lg);
}

.product-card-v3 .card-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--v3-surface-alt);
}

.product-card-v3 .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

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

.product-card-v3 .card-badge-left {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card-v3 .card-badge-right {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.product-card-v3 .card-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
}

.product-card-v3 .card-badge-save {
    background: var(--v3-primary);
    color: #fff;
}

.product-card-v3 .card-badge-bestseller,
.product-card-v3 .card-badge-ribbon {
    background: #1a2238;
    color: #fff;
}

.product-card-v3 .card-badge-popular {
    background: var(--v3-yellow);
    color: #1a2238;
}

.product-card-v3 .card-wishlist-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--v3-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--v3-shadow-sm);
    cursor: pointer;
    transition: color .15s ease, transform .15s ease;
}

.product-card-v3 .card-wishlist-btn:hover {
    color: #e11d48;
    transform: scale(1.08);
}

.product-card-v3 .card-wishlist-btn.is-wishlisted {
    color: #e11d48;
}

.product-card-v3 .card-wishlist-btn.is-wishlisted i {
    font-weight: 900;
}

.product-card-v3 .card-quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--v3-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--v3-shadow-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease, color .15s ease;
}

.product-card-v3:hover .card-quick-view-btn {
    opacity: 1;
}

.product-card-v3 .card-quick-view-btn:hover {
    color: var(--v3-primary);
}

.product-card-v3 .card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-card-v3 .card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--v3-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-v3 .card-description {
    margin: 0;
    color: var(--v3-text-muted);
    font-size: 0.83rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-v3 .card-includes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--v3-primary-dark);
    font-weight: 600;
}

.product-card-v3 .card-includes i {
    color: var(--v3-primary);
}

.product-card-v3 .card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.product-card-v3 .card-price-original {
    color: var(--v3-text-subtle);
    font-size: 0.85rem;
    text-decoration: line-through;
}

.product-card-v3 .card-price-current {
    color: var(--v3-text);
    font-size: 1.2rem;
    font-weight: 800;
}

.product-card-v3 .card-price-unit {
    color: var(--v3-text-muted);
    font-size: 0.78rem;
}

.product-card-v3 .card-status-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--v3-text-muted);
}

.product-card-v3 .card-status-row .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.product-card-v3 .card-status-row .status-dot-live {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.product-card-v3 .card-status-row .status-dot-queue {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.product-card-v3 .card-actions {
    margin-top: auto;
    padding-top: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
}

.product-card-v3 .btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--v3-surface);
    color: var(--v3-text);
    border: 1px solid var(--v3-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.product-card-v3 .btn-details:hover {
    background: var(--v3-surface-alt);
    border-color: var(--v3-primary);
    color: var(--v3-primary);
}

.product-card-v3 .btn-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--v3-yellow);
    color: #1a2238;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color .15s ease, transform .12s ease;
}

.product-card-v3 .btn-add-to-cart:hover {
    background: var(--v3-yellow-dark);
    color: #1a2238;
    text-decoration: none;
}

.product-card-v3 .btn-add-to-cart:active {
    transform: translateY(1px);
}

/* ============================================
   CATEGORY TILES
   ============================================ */
.store-v3-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.store-v3-tile {
    position: relative;
    display: block;
    min-height: 140px;
    border-radius: var(--v3-radius);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background-color: var(--v3-hero-bg);
    background-size: cover;
    background-position: center;
    box-shadow: var(--v3-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

.store-v3-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--v3-shadow-lg);
    text-decoration: none;
    color: #fff;
}

.store-v3-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.10) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.store-v3-tile-content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 16px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.store-v3-tile-content > i {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.store-v3-tile-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.store-v3-tile-title {
    font-weight: 700;
    font-size: 1rem;
}

.store-v3-tile-count {
    font-size: 0.78rem;
    opacity: 0.85;
}

/* ============================================
   TRUST STRIP
   ============================================ */
.store-v3-trust-strip {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 18px 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    box-shadow: var(--v3-shadow-sm);
}

.store-v3-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.store-v3-trust-item > i {
    background: rgba(30, 142, 110, 0.10);
    color: var(--v3-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.store-v3-trust-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--v3-text);
}

.store-v3-trust-item span {
    font-size: 0.78rem;
    color: var(--v3-text-muted);
}

/* ============================================
   NO RESULTS
   ============================================ */
.store-v3-no-results {
    background: var(--v3-surface);
    border: 1px dashed var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 18px;
}

.store-v3-no-results-icon {
    font-size: 2.2rem;
    color: var(--v3-text-subtle);
    margin-bottom: 8px;
}

.store-v3-no-results h4 {
    color: var(--v3-text);
    margin: 0 0 4px;
}

.store-v3-no-results p {
    color: var(--v3-text-muted);
    margin: 0 0 14px;
}

/* ============================================
   MOBILE CATEGORY STRIP
   ============================================ */
.store-v3-category-strip {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.store-v3-category-strip::-webkit-scrollbar {
    display: none;
}

.store-v3-category-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: 999px;
    color: var(--v3-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.store-v3-category-chip i {
    color: var(--v3-primary);
}

.store-v3-category-chip:hover,
.store-v3-category-chip.active {
    background: var(--v3-primary);
    color: #fff;
    border-color: var(--v3-primary);
}

.store-v3-category-chip:hover i,
.store-v3-category-chip.active i {
    color: #fff;
}

/* ============================================
   BOTTOM TAB NAV
   ============================================ */
.store-v3-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--v3-border);
    padding: 8px 4px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.store-v3-bottom-item {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--v3-text-muted);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    text-decoration: none;
    font-size: 0.7rem;
    cursor: pointer;
}

.store-v3-bottom-item i {
    font-size: 1.1rem;
}

.store-v3-bottom-item:hover,
.store-v3-bottom-item.active {
    color: var(--v3-primary);
    text-decoration: none;
}

/* ============================================
   RESPONSIVE: TABLET
   ============================================ */
@media (max-width: 1199.98px) {
    .store-v3-layout {
        padding: 24px 16px 80px;
    }
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */
@media (max-width: 991.98px) {
    .store-v3-layout {
        padding: 16px 12px 100px;
    }

    /* Card rows become horizontal scroll-snap carousels */
    .store-v3-card-row {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .store-v3-card-row::-webkit-scrollbar {
        display: none;
    }

    .store-v3-card-row > .product-card-v3 {
        flex: 0 0 78%;
        max-width: 280px;
        scroll-snap-align: start;
    }

    .store-v3-carousel-dots {
        display: flex;
    }

    .store-v3-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .store-v3-category-strip {
        display: flex;
    }

    .store-v3-bottom-nav {
        display: flex;
    }

    .store-v3-section,
    .store-v3-category-section,
    .store-v3-trust-strip,
    .store-v3-utility,
    .store-v3-promo {
        padding: 16px;
    }

    .store-v3-promo {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .store-v3-utility {
        flex-wrap: wrap;
    }

    .store-v3-utility-right {
        width: 100%;
    }

    .store-v3-sort {
        flex: 1;
    }

    .product-card-v3 .card-title {
        font-size: 0.95rem;
    }

    .product-card-v3 .card-price-current {
        font-size: 1.05rem;
    }

    .product-card-v3 .card-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .store-v3-bottom-nav,
    .store-v3-utility,
    .store-v3-promo,
    .store-v3-category-strip,
    .card-wishlist-btn,
    .card-quick-view-btn,
    .store-hero {
        display: none !important;
    }

    .store-v3-layout {
        padding: 0;
    }
}
