/* ========== Global mobile fixes ========== */
html {
    scroll-behavior: smooth;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Sidebar overlay + premium menu */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 998;
    backdrop-filter: blur(4px);
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: #0a0a0a;
    border-right: 1px solid #333;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
    z-index: 999;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #333;
}

.sidebar-header span {
    font-family: "RobotoCondensed", sans-serif;
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar .close-btn {
    position: static;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
}

.sidebar .close-btn:hover {
    color: #ef4848;
}

.sidebar-icons {
    position: static;
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #222;
}

.sidebar-icons a {
    color: #fff;
    transition: color 0.2s;
}

.sidebar-icons a:hover {
    color: #ef4848;
}

.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 12px 0 40px;
}

.sidebar-links li {
    padding: 0;
    border-bottom: 1px solid #1a1a1a;
}

.sidebar-links li a {
    display: block;
    padding: 18px 24px;
    color: #fff;
    font-size: 1.05rem;
    font-family: "RobotoCondensed", sans-serif;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
}

.sidebar-links li a:hover,
.sidebar-links li a.active {
    background: #1a1a1a;
    color: #ef4848;
    padding-left: 32px;
}

/* ========== Navbar mobile — 3-column layout ========== */
@media (max-width: 1025px) {
    .navbar {
        padding: 10px 0;
    }

    /* Container becomes a 3-slot row: [hamburger] [brand] [logo] */
    .container {
        display: grid;
        grid-template-columns: 56px 1fr auto;
        align-items: center;
        padding: 0 12px 0 0;
        flex-wrap: nowrap;
        gap: 0;
    }

    /* Hamburger occupies first slot — positioned naturally */
    .hamburger {
        display: flex;
        position: static;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 8px;
        align-self: center;
        justify-self: start;
        z-index: 1003;
    }

    /* Brand sits in center slot */
    .brand {
        margin: 0;
        padding: 0;
        justify-content: center;
        gap: 10px;
        min-width: 0;
        flex-shrink: 1;
    }

    .brand img {
        max-height: 34px;
        width: auto;
    }

    /* Hide desktop nav links */
    .nav-links {
        display: none;
    }

    /* icolog sits in third slot — static, inside container */
    .icolog {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0;
        flex-shrink: 0;
    }

    .icolog .icons {
        display: none;
    }

    .icolog .logo {
        padding: 0;
        display: flex;
        align-items: center;
    }

    .icolog .logo img {
        max-height: 30px;
        width: auto;
    }

    /* Search bar overlay */
    .search-bar {
        position: fixed;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px 16px;
        background: rgba(0, 0, 0, 0.78);
        backdrop-filter: blur(14px);
        z-index: 1100;
        /* Remove from grid flow */
        grid-column: 1 / -1;
    }

    .search-bar.active {
        display: flex;
    }

    .search-bar .input-wrapper {
        width: 100%;
        max-width: 520px;
    }

    .search-bar .close-btn {
        right: 16px;
    }
}

/* ========== Hero slider mobile ========== */
@media (max-width: 1024px) {
    .slider-container {
        height: clamp(380px, 72vh, 520px);
    }

    .slide-img-1 {
        transform: none;
        object-position: center 30%;
    }

    .slide-content {
        top: auto;
        bottom: 28px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 500px;
        padding: 16px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    }

    .slide-content h1 {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
        margin-bottom: 6px;
    }

    .slide-content p {
        font-size: clamp(0.9rem, 2.5vw, 1.15rem);
        margin-bottom: 12px;
    }

    .slide-content button {
        padding: 12px 32px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .navigation-wrapper {
        padding: 0 8px;
    }

    button.prev,
    button.next {
        font-size: 1.4rem;
        padding: 10px 14px;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: clamp(340px, 68vh, 440px);
    }

    .slide picture,
    .slide img {
        object-position: center center;
    }
}

/* ========== Series cards scroll ========== */
@media (max-width: 1024px) {
    .series-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 30px 16px;
        gap: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        box-sizing: border-box;
    }

    .series-container::-webkit-scrollbar {
        display: none;
    }

    .series-card {
        flex: 0 0 min(280px, 78vw);
        scroll-snap-align: center;
        width: auto;
    }

    .series-card h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ========== Product carousel (accueil) ========== */
.products-container {
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
}

.products-track {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.product-carousel-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    padding: 8px 16px 0;
    z-index: 2;
}

.product-carousel-btn {
    background: rgba(70, 70, 70, 0.85);
    border: 1px solid #555;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.product-carousel-btn:hover {
    background: #ef4848;
    border-color: #ef4848;
}

.products-container[data-brand="tuf"] .product-carousel-btn:hover {
    background: #ff9500;
    border-color: #ff9500;
}

.carousel-dots,
.carousel-dots1 {
    position: static;
    transform: none;
    margin-top: 8px;
    left: auto;
}

.carousel-dots .dot,
.carousel-dots1 .dot1 {
    min-width: 12px;
    min-height: 12px;
}

@media (max-width: 1024px) {
    .products-container {
        padding: 30px 0 24px;
        overflow: hidden;
    }

    .products-track {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        padding: 0 16px 8px;
        scroll-behavior: smooth;
    }

    .products-track::-webkit-scrollbar {
        display: none;
    }

    .products-container .product-card {
        flex: 0 0 min(300px, 88vw);
        width: min(300px, 88vw);
        scroll-snap-align: center;
        margin: 0;
    }

    .product-carousel-nav {
        display: flex;
    }

    .products-container .desc {
        margin-left: 12px;
        margin-right: 12px;
    }

    .products-container .btn,
    .products-container .btn1 {
        padding: 14px 36px;
        font-size: 0.9rem;
    }
}

/* Promo banners (desim / desam) */
.desim img,
.desam img {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.desim p,
.desam p {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
}

@media (max-width: 768px) {
    .offers-produit h2,
    .promo-1 h2,
    .promo-2 h2 {
        font-size: clamp(1.4rem, 5vw, 2rem);
        margin: 30px 16px 20px;
        padding: 0 8px;
    }

    .promo-1,
    .promo-2 {
        padding: 20px 12px;
    }
}

/* ========== Extra-small screens (≤ 480px) ========== */
@media (max-width: 480px) {
    /* Container slots get tighter proportions */
    .container {
        grid-template-columns: 48px 1fr auto;
        padding: 0 10px 0 0;
    }

    .hamburger {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    .brand {
        gap: 6px;
    }

    .brand img {
        max-height: 28px;
    }

    .brand .divider {
        padding-left: 6px;
        margin-left: 6px;
    }

    .brand .divider::before {
        top: 10px;
        height: 40%;
    }

    .icolog .logo img {
        max-height: 22px;
    }
}

/* Also-like banner — single cinematic image */
.also-like-media {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    min-height: 180px;
    max-height: 420px;
    overflow: hidden;
    background: #111;
}

.also-like-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.also-like-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(16px, 4vw, 40px);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
    pointer-events: none;
}

.also-like-overlay .also-like-tag {
    font-family: "ROGLyons", "RobotoCondensed", sans-serif;
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    color: #fff;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.also-like-overlay p {
    font-family: "TradeGothicLTPro", sans-serif;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: #ddd;
    margin: 0;
}

.also-like-link {
    display: block;
    text-decoration: none;
    border: 1px solid #333;
    transition: border-color 0.3s;
}

.also-like-link:hover {
    border-color: #ef4848;
}

.also-like-banner.tuf-banner .also-like-link:hover {
    border-color: #ff9500;
}

.also-like-caption {
    display: none;
}

@media (max-width: 768px) {
    .also-like-media {
        aspect-ratio: 16 / 10;
        max-height: 280px;
    }
}

/* Promotions grid mobile — no overlap */
@media (max-width: 1024px) {
    .products-grid--promo {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 24px 12px;
        box-sizing: border-box;
    }

    .products-grid .product-card {
        min-width: 0;
        width: 100%;
    }

    .page-products {
        overflow-x: hidden;
    }
}

/* Horizontal scroll option for promo grid on tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid--promo {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        grid-template-columns: unset;
        gap: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .products-grid--promo .product-card {
        flex: 0 0 min(300px, 45vw);
        scroll-snap-align: start;
    }
}

/* Nouveautés featured images */
@media (max-width: 768px) {
    .featured-card img {
        max-height: 200px;
        object-fit: cover;
        width: 100%;
    }

    .game-banner-inner {
        aspect-ratio: 16 / 9;
    }

    .game-banner-inner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .game-banner-cta {
        bottom: 12%;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* Newsletter mobile & tablet */
@media (max-width: 850px) {
    .newsletter-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .newsletter .content h2 {
        font-size: 24px;
    }

    .newsletter .content p {
        font-size: 14px;
    }

    .input-group {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .form {
        width: 100%;
    }

    .form input,
    #emailInput {
        width: 100%;
        box-sizing: border-box;
    }

    .bot {
        width: 100%;
        margin: 10px 0 0 0;
    }
}

/* Footer mobile */
@media (max-width: 768px) {
    .footer-column {
        width: 100%;
        min-width: unset;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .social-icons {
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
    }
}
