/* --- IOS-STYLE NAVIGATION & PRODUCT GRID --- */

/* Navigation Catégories - Style iOS */
.category-nav-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.75rem 0;
    border-bottom: 0.5px solid rgba(255, 222, 33, 0.15);
    margin-bottom: 1rem;
}

.category-nav {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem 0.625rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-btn {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 222, 33, 0.2);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.category-btn:active {
    transform: scale(0.96);
}

.category-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    color: #000000;
    border-color: transparent;
    font-weight: 600;
}

.category-btn i {
    margin-right: 0.35rem;
    font-size: 0.75rem;
}

/* Grille Produits - Optimisé Mobile */
.products-container {
    padding: 0 1rem 5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .products-container {
        padding: 0 1.5rem 6rem 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }
}

/* Carte Produit - Style iOS */
.product-card {
    background: rgba(28, 28, 30, 0.6);
    border: 0.5px solid rgba(255, 222, 33, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-card:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 222, 33, 0.3);
    }
}

.product-media {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #000000;
    overflow: hidden;
}

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

/* Placeholder for lazy-loaded media */
.product-media .lazy-media {
    background: linear-gradient(135deg, rgba(255, 222, 33, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
}

/* Play icon overlay for paused videos */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    border: 2px solid rgba(255, 222, 33, 0.8);
}

.video-play-overlay i {
    color: #FFDE21;
    font-size: 1.5rem;
    margin-left: 3px;
}

@media (hover: hover) {

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

.product-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.375rem;
}

.product-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.3;
    letter-spacing: -0.2px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.product-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-tag {
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFDE21;
    letter-spacing: -0.1px;
}

.btn-view {
    background: linear-gradient(135deg, rgba(255, 222, 33, 0.1) 0%, rgba(255, 222, 33, 0.05) 100%);
    border: 0.5px solid rgba(255, 222, 33, 0.4);
    color: #FFDE21;
    padding: 0.5rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    width: 100%;
    letter-spacing: -0.1px;
    -webkit-tap-highlight-color: transparent;
}

.btn-view:active {
    transform: scale(0.96);
}

@media (hover: hover) {
    .btn-view:hover {
        background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
        color: #000000;
        border-color: transparent;
    }
}

/* Indicateur Multi-media */
.multi-media-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #FFFFFF;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

/* Loading Logo with Breathe Animation */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    width: 100%;
    grid-column: 1 / -1;
}

.loading-spinner img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: breathe 1s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Commander Button in Navbar */
.commander-btn-nav {
    color: #FFDE21 !important;
    text-shadow: 0 0 10px rgba(255, 222, 33, 0.4);
}

.commander-btn-nav i {
    color: #FFDE21;
    filter: drop-shadow(0 0 5px rgba(255, 222, 33, 0.6));
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

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

.nav-item.commander-btn-nav:hover {
    transform: translateY(-5px);
    text-shadow: 0 0 15px rgba(255, 222, 33, 0.8);
}