/* css/store.css - Dedicated CSS for the E-Commerce Storefront (Nodekeys Look) */

:root {
    --store-bg: #050505;       /* Deep dark background */
    --store-surface: #111111;  /* Slightly lighter for cards */
    --store-text: #e2e8f0;     /* Soft text */
    --store-text-light: #ffffff; /* Headings */
    --store-text-muted: #94a3b8;
    --store-primary: #D97706;  /* Amber Gold — aligned with brand */
    --store-primary-hover: #B45309;
    --store-accent: #10B981;   /* Teal accent — aligned with brand */
    --store-card-border: rgba(255, 255, 255, 0.06);
    --store-card-hover: rgba(56, 189, 248, 0.4);
    --store-glass-bg: rgba(17, 17, 17, 0.65);
    --store-glass-border: rgba(255, 255, 255, 0.08);
}

body.store-theme {
    background-color: var(--store-bg);
    color: var(--store-text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- STORE UTILITIES & GLOBALS --- */
* { box-sizing: border-box; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--store-bg); 
}
::-webkit-scrollbar-thumb {
    background: rgba(136, 146, 176, 0.3); 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--store-primary); 
}

/* --- UI UTILITIES --- */
.glass-panel {
    background: var(--store-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--store-glass-border);
    border-radius: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glow-effect:hover {
    box-shadow: 0 0 15px var(--store-card-hover), inset 0 0 10px var(--store-card-hover);
    border-color: var(--store-primary);
}

/* --- LOADING SKELETONS --- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 1.2rem; margin-bottom: 0.5rem; width: 100%; }
.skeleton-text.short { width: 60%; }
.skeleton-img { height: 180px; width: 100%; margin-bottom: 1rem; }

/* --- STORE NAVIGATION MULTI-TIER --- */
.store-nav-wrapper {
    background: #0b0c10;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Top Bar */
.store-top-bar {
    background: #050505;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.4rem 0;
}
.store-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.store-top-right {
    display: flex;
    gap: 1.5rem;
}
.store-top-link {
    color: var(--store-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.store-top-link:hover { color: var(--store-primary); }
.store-top-link i { margin-right: 4px; }

/* Main Navbar */
.store-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.store-brand-area { display: flex; align-items: center; }

.store-logo {
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
}

/* Search Bar */
.store-search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}
.store-search-form {
    display: flex;
    width: 100%;
}
.store-search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--store-card-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}
.store-search-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--store-primary);
}
.store-search-btn {
    background: var(--store-primary);
    color: #fff;
    border: none;
    padding: 0 1.2rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.store-search-btn:hover { background: var(--store-primary-hover); color: white; }

/* Nav Actions */
.store-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.store-action-btn {
    color: var(--store-text-muted);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.store-action-btn i { font-size: 1.25rem; }
.store-action-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.store-action-btn:hover {
    color: var(--store-primary);
}

.store-cart-counter {
    position: absolute;
    top: -5px;
    right: 5px;
    background: var(--store-accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
}

/* Bottom Nav */
.store-bottom-nav {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--store-card-border);
}
.store-bottom-container {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 15px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}
.store-cat-link {
    color: var(--store-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.store-cat-link:hover { color: var(--store-primary); }

@media (max-width: 900px) {
    .store-top-bar { display: none; }
    .store-search-container { margin: 0 1rem; }
    .store-bottom-container { justify-content: flex-start; }
}
@media (max-width: 768px) {
    .store-search-container { display: none; }
    .store-action-label { display: none; }
}

.btn-exit-store {
    background: transparent;
    border: 1px solid var(--store-text-muted);
    color: var(--store-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-exit-store:hover {
    border-color: var(--store-primary);
    color: var(--store-primary);
    background: rgba(102, 252, 241, 0.05);
}

/* --- STORE HERO --- */
.store-hero-unique {
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
                radial-gradient(circle at bottom left, rgba(45, 212, 191, 0.1) 0%, transparent 40%),
                var(--store-bg);
    padding: 3rem 15px 3rem; /* Considerably reduced height */
    text-align: center;
    border-bottom: 1px solid var(--store-card-border);
    position: relative;
    overflow: hidden;
}

.store-hero-carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.store-hero-carousel {
    overflow: hidden; /* Hide scrollbars for auto-scroll */
    padding: 1rem 0;
    position: relative;
    /* Optional edge fade effect */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.store-hero-carousel-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll-carousel 50s linear infinite;
}

.store-hero-carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-carousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 0.75rem)); }
}

.carousel-card {
    flex: 0 0 260px;
    background: var(--store-glass-bg);
    border: 1px solid var(--store-card-border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.carousel-card:hover {
    transform: translateY(-5px);
    border-color: var(--store-card-hover);
}

.carousel-img-wrapper {
    height: 140px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.carousel-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.carousel-card:hover .carousel-img-wrapper img {
    transform: scale(1.05);
}

.carousel-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.carousel-cat {
    font-size: 0.65rem;
    color: var(--store-primary);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.carousel-title {
    color: var(--store-text-light);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-price {
    margin-top: auto;
    color: var(--store-accent);
    font-weight: 800;
    font-size: 1.1rem;
}

.store-hero-unique::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.4), transparent);
}

/* Lightbox */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img { max-width: 90%; max-height: 90%; object-fit: contain; }
.lightbox-close {
    position: absolute; top: 2rem; right: 2rem;
    color: white; font-size: 2rem; cursor: pointer;
    background: none; border: none;
}

/* Star rating input */
.star-rating-input { display: flex; gap: 0.5rem; font-size: 1.5rem; margin-bottom: 1rem; }
.star-rating-input i { cursor: pointer; color: var(--store-text-muted); transition: color 0.2s; }
.star-rating-input i.active, .star-rating-input i.hovered { color: #f59e0b; }

/* Recently viewed strip */
.recent-strip { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; }
.recent-card {
    flex: 0 0 160px; background: var(--store-glass-bg);
    border: 1px solid var(--store-card-border); border-radius: 8px;
    padding: 1rem; text-decoration: none; transition: border-color 0.3s;
}
.recent-card:hover { border-color: var(--store-primary); }
.recent-card img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 0.5rem; }
.recent-card h4 { color: var(--store-text-light); font-size: 0.85rem; margin: 0 0 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-card .recent-price { color: var(--store-accent); font-weight: 700; font-size: 0.9rem; }

/* Review pagination */
.review-pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.review-pagination a { min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--store-glass-bg); border: 1px solid var(--store-card-border); border-radius: 4px; color: var(--store-text); text-decoration: none; font-size: 0.85rem; }
.review-pagination a.active { background: var(--store-primary); color: #000; border-color: var(--store-primary); }

/* Scarcity badge on cards */
.scarcity-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(239, 68, 68, 0.15); color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4); padding: 0.3rem 0.6rem;
    border-radius: 6px; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; z-index: 2;
}

/* --- STORE GRID & CARDS --- */
.store-main {
    padding: 4rem 15px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .store-layout {
        grid-template-columns: 1fr !important;
    }
    .store-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }
}

.product-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card-advanced {
    background: var(--store-glass-bg);
    border: 1px solid var(--store-card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.product-card-advanced:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--store-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.15);
}

.product-img-container {
    height: 220px;
    width: 100%;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.product-card-advanced:hover .product-img-container {
    background: rgba(0, 0, 0, 0.5);
}

.product-img-advanced {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

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

.product-cat-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(217, 119, 6, 0.15);
    color: var(--store-primary);
    border: 1px solid rgba(217, 119, 6, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.product-title-advanced {
    font-size: 1.1rem;
    color: var(--store-text-light);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-desc-advanced {
    color: var(--store-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.product-price-advanced {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--store-accent);
}

.btn-add-cart-advanced {
    background: rgba(217, 119, 6, 0.1);
    color: var(--store-primary);
    border: 1px solid rgba(217, 119, 6, 0.3);
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-add-cart-advanced:hover {
    background: var(--store-primary);
    color: #fff;
    border-color: var(--store-primary);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
}

/* --- CUSTOM SIDEBAR INPUTS --- */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--store-text);
    transition: color 0.2s;
}

.custom-checkbox-label:hover {
    color: white;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--store-text-muted);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background: var(--store-primary);
    border-color: var(--store-primary);
}

.custom-checkbox:checked::after {
    content: '\2714';
    font-size: 12px;
    color: #000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    outline: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--store-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* --- STORE FILTERS --- */
.store-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--store-card-border);
    color: var(--store-text);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(217, 119, 6, 0.1);
    color: var(--store-primary);
    border-color: var(--store-primary);
}

/* --- STORE PAGINATION --- */
.store-pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--store-card-border);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: var(--store-glass-bg);
    border: 1px solid var(--store-card-border);
    border-radius: 8px;
    color: var(--store-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.page-link:hover {
    background: rgba(217, 119, 6, 0.1);
    color: var(--store-text-light);
    border-color: rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--store-primary);
    color: #fff;
    border-color: var(--store-primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* --- DYNAMIC TOAST NOTIFICATION --- */
.dynamic-toast {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: var(--store-surface);
    border: 1px solid var(--store-primary);
    border-left: 4px solid var(--store-primary);
    color: var(--store-text-light);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1050;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dynamic-toast.show {
    bottom: 30px;
}

.dynamic-toast .icon-wrapper {
    color: var(--store-primary);
    font-size: 1.5rem;
}

/* --- STORE FOOTER --- */
.store-footer {
    background: #08080a;
    border-top: 1px solid var(--store-card-border);
    padding: 4rem 0 0;
    margin-top: auto;
}

.store-footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding: 0 15px 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.store-footer-links h4 {
    color: var(--store-text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

.store-footer-links a {
    display: block;
    color: var(--store-text-muted);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.store-footer-links a:hover {
    color: var(--store-primary);
}

.store-footer-bottom {
    background: #000;
    padding: 1.5rem 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.store-footer-bottom p {
    color: var(--store-text-muted);
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .store-footer-content { grid-template-columns: 1fr; }
    .store-hero-title { font-size: 2.5rem; }
    .cart-table-wrap { display: none; }
    .cart-mobile-cards { display: block; }
}


/* --- QUICK VIEW MODAL --- */
.qv-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8);
    z-index: 1060; opacity: 0; visibility: hidden; transition: all 0.3s;
    backdrop-filter: blur(8px);
}
.qv-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    width: 90%; max-width: 900px;
    background: var(--store-surface); z-index: 1070;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px; border: 1px solid var(--store-primary);
    padding: 2.5rem; overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}
.qv-overlay.show { opacity: 1; visibility: visible; }
.qv-modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.qv-close {
    position: absolute; top: 1rem; right: 1.5rem; background: transparent; border: none;
    color: var(--store-text-muted); font-size: 1.5rem; cursor: pointer; transition: 0.3s;
}
.qv-close:hover { color: #ef4444; transform: rotate(90deg); }

/* Quick View Overlay Button on Product Cards */
.quick-view-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.9); color: white; padding: 0.6rem 1.2rem;
    border-radius: 4px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
    border: 1px solid var(--store-primary); opacity: 0; transition: all 0.3s;
    display: flex; align-items: center; gap: 8px;
}
.quick-view-btn:hover { background: var(--store-primary); color: #000; }
.product-card-advanced:hover .quick-view-btn { opacity: 1; top: 45%; }

