/*==================================================
MOBILE / RESPONSIVE FIXES
==================================================*/

.product-card.is-hidden {
    display: none !important;
}

img {
    height: auto;
}

.offer-image img {
    width: 100%;
    max-width: 520px;
    border-radius: 18px;
    object-fit: cover;
}

.offer-banner .btn.outline {
    color: #fff;
    border: 2px solid #fff;
    background: transparent;
}

.offer-banner .btn.outline:hover {
    background: #fff;
    color: #111;
}

.scroll-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.logo img {
    max-width: 160px;
    width: auto;
    object-fit: contain;
}

/* Hero: prevent collapse on mobile when slides are absolute */
@media (max-width: 991px) {
    .hero {
        background: #f8f8f8;
    }

    .hero-slider {
        height: auto !important;
        min-height: 0;
    }

    .slide {
        position: relative !important;
        inset: auto !important;
        opacity: 0;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .slide.active {
        opacity: 1;
        visibility: visible;
        height: auto;
        overflow: visible;
        pointer-events: auto;
    }

    .hero-content {
        height: auto !important;
        flex-direction: column;
        text-align: center;
        padding: 48px 0 56px;
        gap: 28px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(30px, 8vw, 44px);
        line-height: 1.15;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-image {
        justify-content: center;
        margin-top: 0;
        width: 100%;
    }

    .hero-image img {
        width: min(100%, 420px);
        max-height: 360px;
        margin: 0 auto;
    }

    .navbar .container {
        gap: 12px;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo img {
        height: 52px;
        max-width: 140px;
    }

    .offer-banner {
        padding: 56px 0;
    }

    .offer-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .offer-content h2 {
        font-size: clamp(26px, 7vw, 36px);
    }

    .offer-content p {
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
    }

    .offer-btns {
        justify-content: center;
    }

    .offer-image {
        width: 100%;
        text-align: center;
    }

    .offer-image img {
        max-width: 100%;
        width: 100%;
        border-radius: 16px;
    }

    .product-filter {
        padding: 32px 0;
    }

    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .search-box {
        width: 100%;
    }

    .category-filter {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 6px;
        justify-content: flex-start;
        scrollbar-width: thin;
    }

    .category-filter button {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 11px 18px;
        font-size: 14px;
    }

    .products-page {
        padding: 56px 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-image img {
        height: 240px;
    }

    .product-hero {
        height: auto;
        min-height: 260px;
        padding: 70px 0 50px;
    }

    .product-hero-content h1 {
        font-size: clamp(30px, 8vw, 42px);
    }

    .top-header .container {
        padding-inline: 4px;
    }
}

@media (max-width: 576px) {
    .container {
        width: min(100% - 24px, 1320px);
        max-width: none;
    }

    .hero-content {
        padding: 36px 0 48px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image img {
        max-height: 280px;
    }

    .offer-btns {
        flex-direction: column;
        width: 100%;
    }

    .offer-btns .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .products-grid,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-image img {
        height: 280px;
    }

    .product-card:hover {
        transform: none;
    }

    .category-card {
        height: 300px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .product-topbar {
        padding: 20px 0;
    }

    .topbar-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .sort-box {
        width: 100%;
        justify-content: space-between;
    }

    .sort-box select {
        flex: 1;
        min-width: 0;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .logo img {
        height: 44px;
        max-width: 120px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }
}
