:root {
    --primary: #FFD700;
    /* Gold/Yellow */
    --bg-color: #000000;
    /* Pure Black background */
    --card-bg: rgba(10, 10, 10, 0.95);
    /* Very dark card */
    --text-main: #ffffff;
    /* White text */
    --text-sec: #a0a0b8;
    /* Light grey text */
    --border: #FFD700;
    /* Gold/Yellow border */
    --shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
    --radius: 20px;
    --safe-area-bottom: env(safe-area-inset-bottom);
    --accent: #FFC107;
    /* Lighter yellow accent */
    --gradient: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
    /* Gold gradient */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: radial-gradient(at 20% 30%, rgba(255, 215, 0, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(255, 215, 0, 0.2) 0px, transparent 50%);
}

/* Parallax Background */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    background-size: cover;
    background-position: center;
    z-index: -1;
    will-change: transform;
}

.parallax-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Dark overlay */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
}

/* Header */
/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 2px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    /* Removed animation: breathe-bg to avoid performance hit on sticky element */
    background-color: rgba(0, 0, 0, 0.9);
}

.logo {
    height: 100px;
    border-radius: 12px;
    object-fit: contain;
    animation: breathe 6s ease-in-out infinite;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    will-change: transform, filter;
    /* Ensure clickability if it was a link, but it's just an img for now */
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
    }
}

/* Logo Marquee Animation (Background Layer) */
.logo-marquee {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Covers the whole header */
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 1;
    /* Behind main logo (z-index 10) */
    opacity: 0.4;
    /* Slightly transparent to not distract from main logo */
    pointer-events: none;
    /* Allow clicks to pass through if needed */
}

.logo-marquee-content {
    display: flex;
    animation: marquee-scroll 30s linear infinite;
    /* Slower for background effect */
    height: 100%;
    align-items: center;
    will-change: transform;
}

.marquee-logo {
    height: 50px;
    /* Smaller than main logo */
    width: auto;
    margin: 0 1.5rem;
    object-fit: contain;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

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

    100% {
        transform: translateX(-50%);
        /* Assuming content is duplicated for seamless loop */
    }
}



/* Category Select */
.category-wrapper {
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.custom-select {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 12px rgba(45, 90, 45, 0.3);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 12px;
    transition: all 0.2s;
}

.custom-select:focus {
    outline: none;
    transform: scale(1.01);
    border-color: var(--border);
    box-shadow: 0 0 0 3px rgba(45, 90, 45, 0.3);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 100px;
    /* Bottom padding for footer */
    max-width: 1200px;
    margin: 0 auto;
}

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

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

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Shine effects removed */

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6);
    border-color: #FFD700;
    /* Gold on hover */
}

.product-media {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background: rgba(255, 215, 0, 0.1);
    overflow: hidden;
}

.product-media img,
.product-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.multi-media-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    /* Centrage du texte */
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.2;
    color: #ffffff;
}

.product-desc {
    font-size: 0.8rem;
    color: var(--text-sec);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-left: auto;
    /* Pour centrer le bloc si nécessaire */
    margin-right: auto;
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-tag {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--border);
    background: rgba(255, 215, 0, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.btn-view {
    background: var(--primary);
    color: white;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Footer Nav */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 2px solid var(--border);
    /* Ajout de 20px supplémentaires en plus de la safe-area */
    padding: 0.8rem 0 calc(1.5rem + var(--safe-area-bottom));
    display: flex;
    justify-content: space-around;
    z-index: 900;
    box-shadow: 0 -4px 20px rgba(255, 215, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    transition: color 0.2s;
    width: 33%;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.nav-item.active {
    color: white;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Plus sombre pour meilleur focus */
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Centré par défaut */
    padding: 20px;
    overflow-y: auto;
    /* Permet le scroll si le modal est trop grand */
}

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

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: auto;
    display: flex;
    flex-direction: column;
    /* Garde la contrainte mais avec overflow interne */
    /* Scroll interne important */
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

@media (max-width: 767px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        /* Bottom sheet effect sur mobile */
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        margin: 0;
        transform: translateY(100%);
        opacity: 1;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
        opacity: 1;
        margin: 0;
    }
}

.modal-close {
    position: sticky;
    top: 8px;
    margin-left: auto;
    margin-right: 8px;
    margin-top: 8px;
    margin-bottom: -24px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    font-size: 1.3rem;
    color: #000;
    font-weight: bold;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.6);
}

/* Modal Logo */
.modal-logo {
    height: 70px;
    border-radius: 12px;
    object-fit: contain;
    position: relative;
    display: inline-block;
}

/* Modal Product Specifics */
.modal-slider-container {
    height: 40vh;
    background: rgba(17, 22, 15, 0.95);
    position: relative;
}

.modal-slider {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.slide {
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.modal-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
}

.modal-dot.active {
    background: white;
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
    color: var(--text-color);
    text-align: center;
    /* Center everything in body by default */
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    text-align: center;
}

.modal-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-sec);
    margin-bottom: 1.5rem;
    white-space: pre-line;
    /* Respect line breaks from DB */
    text-align: center;
}

.modal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.modal-price-row:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary);
    transform: translateX(5px);
}

.modal-price-label {
    font-weight: 500;
    color: var(--text-main);
}

.modal-price-value {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-weight: 700;
}

/* Shine effect for Price Row */
.modal-price-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
    animation-delay: 2s;
    pointer-events: none;
}

.price-row .price {
    color: var(--border);
    font-weight: 800;
}

/* Links Modal */
.link-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
}

/* Shine effect for Link Item */
.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 7s infinite;
    animation-delay: 1s;
    pointer-events: none;
}

.link-item:active {
    background: rgba(255, 215, 0, 0.2);
}

.link-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: 1px solid var(--border);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.link-content {
    flex-grow: 1;
}

.link-content strong {
    display: block;
    font-size: 1rem;
}

.link-content small {
    color: var(--text-sec);
}

/* Sparkle Effect */
.sparkle {
    position: fixed;
    /* Important: fixed positioning relative to viewport */
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle-burst 0.8s cubic-bezier(0, .9, .57, 1) forwards;
    z-index: 9999;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.9);
    /* Gold Glow */
}

@keyframes sparkle-burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--primary), #FFA500);
    color: black;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* Order Buttons in Modal */
.order-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;

    .product-media {
        position: relative;
        width: 100%;
        padding-top: 100%;
        /* 1:1 Aspect Ratio */
        overflow: hidden;
        background: #000;
    }

    .product-media img,
    .product-media video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .video-play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        pointer-events: none;
        backdrop-filter: blur(4px);
        z-index: 2;
    }

    .order-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -150%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transform: skewX(-25deg);
        transition: left 0.5s;
    }

    .order-btn:hover::before {
        left: 150%;
    }

    .order-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .order-btn:active {
        transform: scale(0.98);
    }

    .threema-btn {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
        /* Gold to Orange */
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }

    .threema-btn:hover {
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    }

    .signal-btn {
        background: linear-gradient(135deg, #FF8C00 0%, #FF6347 100%);
        /* Dark Orange to Tomato */
        box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    }

    .signal-btn:hover {
        box-shadow: 0 8px 25px rgba(255, 140, 0, 0.6);
    }

    .telegram-btn {
        background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
        /* Gold to Goldenrod */
        box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
    }

    .telegram-btn:hover {
        box-shadow: 0 8px 25px rgba(218, 165, 32, 0.6);
    }

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

    /* Order Modal specific styles */
    #order-modal {
        z-index: 2200;
        /* Higher than #product-modal (2000) */
    }

    /* Order Modal Optimized */
    #order-modal .modal-content {
        background: #111;
        border: 1px solid var(--border);
        border-radius: 20px;
        max-width: 90%;
        /* Slight margin on sides on mobile */
        margin: 0 auto;
    }

    #order-modal .modal-body {
        padding: 1.5rem;
    }

    .order-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #order-modal .form-control {
        text-align: center;
        width: 100%;
        margin: 0 auto;
        display: block;
    }

    /* Center text */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    /* Center labels and inputs visually if they aren't full width */
}

.form-group label {
    color: var(--primary);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    font-size: 1rem;
    text-align: center;
    /* Center input text */
    width: 100%;
    border-radius: 12px;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Center the radio group */
.radio-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.radio-label {
    flex: 1;
    background: black;
    border: 2px solid var(--primary);
    /* Yellow Border */
    color: var(--primary);
    /* Yellow Text */
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.radio-label i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.radio-label.selected {
    background: var(--primary);
    /* Yellow Background */
    color: black;
    /* Black Text */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
}

/* Simplify Product/Price Summary in Modal */
.product-summary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.product-summary h3 {
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* Progressive Form Steps Animation */
.form-step {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
}

.form-step:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Resize Header Logo - Animation breathe active */
    .logo {
        height: 80px !important;
        width: auto !important;
        max-width: 180px !important;
        /* Forcer l'animation sur mobile */
        animation: breathe-mobile 4s ease-in-out infinite !important;
    }

    @keyframes breathe-mobile {

        0%,
        100% {
            transform: scale(1);
            filter: drop-shadow(0 0 15px rgba(45, 90, 45, 0.8)) drop-shadow(0 0 30px rgba(45, 90, 45, 0.6));
        }

        50% {
            transform: scale(1.1);
            filter: drop-shadow(0 0 25px rgba(45, 90, 45, 1)) drop-shadow(0 0 50px rgba(45, 90, 45, 0.8));
        }
    }

    .logo-marquee {
        height: 60px !important;
    }

    .marquee-logo {
        height: 40px !important;
    }
}

/* Telegram Mini App Specifics */
body.telegram-app {
    width: 100vw;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    /* Prevent font scaling */
}

/* Loader & Skeleton */
.loader-container {
    width: 100%;
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* Skeleton Screens */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 20px 100px;
    }
}

@media (min-width: 1024px) {
    .skeleton-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skeleton-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 2px solid rgba(255, 215, 0, 0.1);
    height: 320px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.skeleton-media {
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.skeleton-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skeleton-text {
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    border-radius: 4px;
    width: 80%;
}

.skeleton-text.short {
    width: 40%;
    margin-top: auto;
}

.shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 215, 0, 0.05),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

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

/* Media Transitions */
.lazy-media {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy-media.loaded {
    opacity: 1;
}


/* Mode Buttons */
.mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.mode-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

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

/* Product Card Deployment Animation */
@keyframes deploy-card {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9) rotateX(10deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

.product-card {
    /* Animation waits for 'ready' class */
    opacity: 0;
    /* Start invisible */
    transform: translateY(30px);
    /* Initial state matching keyframe start */
}

.product-card.ready {
    animation: deploy-card 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Staggered animation delays for first few items */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Hero Mode Selector - ENHANCED VISUAL CARDS */
.mode-hero {
    padding: 0;
    background: transparent;
    margin-bottom: 0;
}

#mode-selector {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    gap: 30px;
}

#mode-selector h2 {
    color: var(--primary) !important;
    font-size: 2rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px !important;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    text-align: center;
}

.mode-buttons-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 500px;
}

.mode-btn-hero {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 160px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Animated gradient background */
.mode-btn-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 215, 0, 0.1) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.mode-btn-hero:hover::before {
    opacity: 1;
}

/* Glow border effect */
.mode-btn-hero::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 25px;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), #FFA500, var(--primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.mode-btn-hero:hover::after {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.mode-btn-hero i {
    font-size: 5rem;
    color: rgba(255, 215, 0, 0.8);
    transition: all 0.4s;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.4));
    z-index: 1;
}

.mode-btn-hero span {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.4s;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Active/Selected state */
.mode-btn-hero.active {
    background: linear-gradient(135deg,
            rgba(255, 215, 0, 0.3),
            rgba(255, 165, 0, 0.3));
    border-color: var(--primary);
    border-width: 4px;
    transform: scale(1.05);
    box-shadow:
        0 15px 60px rgba(255, 215, 0, 0.5),
        inset 0 0 50px rgba(255, 215, 0, 0.15);
}

.mode-btn-hero.active i {
    color: var(--primary);
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1));
}

.mode-btn-hero.active span {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

/* Hover state */
.mode-btn-hero:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow:
        0 20px 70px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mode-btn-hero:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.mode-btn-hero:hover span {
    color: var(--primary);
}

/* Active click state */
.mode-btn-hero:active {
    transform: translateY(-5px) scale(0.98);
}

/* Desktop layout */
@media (min-width: 768px) {
    .mode-buttons-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        max-width: 1000px;
    }

    .mode-btn-hero {
        padding: 60px 40px;
        min-height: 320px;
        border-radius: 30px;
    }

    .mode-btn-hero i {
        font-size: 7rem;
    }

    .mode-btn-hero span {
        font-size: 2.2rem;
    }

    #mode-selector h2 {
        font-size: 2.5rem !important;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .mode-buttons-container {
        max-width: 1200px;
        gap: 60px;
    }

    .mode-btn-hero {
        padding: 70px 50px;
        min-height: 360px;
    }

    .mode-btn-hero i {
        font-size: 8rem;
    }

    .mode-btn-hero span {
        font-size: 2.6rem;
    }
}

/* Cart System Styles */
.cart-header-icon {
    position: absolute;
    top: 50%;
    /* Center vertically */
    right: 20px;
    transform: translateY(-50%);
    /* Adjust for height */
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 102;
    transition: transform 0.2s;
    border: 1px solid var(--border);
    /* Thin border */
    border-radius: 50%;
    /* Round */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    /* Slight background for contrast */
}

.cart-header-icon:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
}

.btn-add-cart {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: var(--primary);
    color: black;
    transform: scale(1.1);
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.cart-item-row:hover {
    border-color: rgba(255, 215, 0, 0.3);
}

.cart-remove-btn {
    color: #ff4444;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.2s;
}

.cart-remove-btn:hover {
    color: #ff0000;
}

.cart-summary-total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
    }

    /* Ensure logos are sized correctly on mobile */
    .logo {
        height: 80px;
    }

    .mode-btn-hero {
        padding: 20px 15px;
        min-height: 120px;
        gap: 10px;
    }

    .mode-btn-hero i {
        font-size: 3rem;
    }

    .mode-btn-hero span {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
}