/* Mobile & Tablet */
@media (max-width: 1023px) {
    .hide-on-mobile-tablet {
        display: none;
    }

    .header-premium {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 10;
        height: var(--header-height);
    }

    .container {
        margin-top: calc(var(--header-height) + 10px);
    }

    .header-logo {
        margin-right: auto;
        /* Push others to right */
    }

    .logo-img {
        max-height: 28px;
        /* Smaller logo */
        width: auto;
    }

    /* Hide Desktop Search */
    .header-search-premium {
        display: none;
    }

    /* Cart positioning */
    .header__cart-list {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 100%;
        padding: 0 calc((100% - 644px) / 2);
    }

    /* Mobile Category */
    .mobile-category {
        display: block;
    }

    .mobile-category__list,
    .mobile-category-list {
        display: flex;
        list-style: none;
        padding-left: 0;
        max-width: 100%;
        overflow-x: auto;
        margin-bottom: 5px;
    }

    .mobile-category__list::-webkit-scrollbar,
    .mobile-category-list::-webkit-scrollbar {
        display: none;
    }

    .mobile-category__item,
    .mobile-category-item {
        flex-shrink: 0;
        margin-right: 10px;
    }

    .mobile-category__item-link,
    .mobile-category-item-link {
        --line-height: 2rem;
        text-decoration: none;
        color: white;
        font-size: 1.4rem;
        line-height: var(--line-height);
        height: var(--line-height);
        overflow: hidden;
        text-align: center;
        display: block;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        border-radius: 4px;
        font-weight: 300;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        padding: 0 6px;
        background-color: #000;
        border: 1px solid #333;
    }

    .mobile-category__item-link:active,
    .mobile-category-item-link:active {
        background-color: var(--accent-color);
    }

    /* Product Grid Tweaks */
    .home-product-item__name {
        font-size: 1.1rem;
        height: 2.2rem;
        /* 2 lines */
    }

    .home-product-item__price {
        flex-wrap: wrap;
    }

    .home-product-item__price-new {
        font-size: 1.3rem;
    }
}

/* Tablet */
@media (min-width: 740px) and (max-width: 1023px) {
    :root {
        --header-height: 68px;
    }

    .hide-on-tablet {
        display: none;
    }

    .header__cart {
        width: 80px;
        text-align: right;
    }
}

/* Mobile */
@media (max-width: 739px) {
    :root {
        --header-height: 60px;
        /* Slightly taller for premium feel */
    }

    .hide-on-mobile {
        display: none;
    }

    .header-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    /* Hide text buttons */
    .user-action .action-link,
    .user-action .action-btn {
        display: none;
    }

    /* Mobile User Icon */
    .header__mobile-user-icon {
        display: block;
        font-size: 2.0rem;
        color: var(--white-color);
        margin-left: 10px;
        text-decoration: none;
    }

    /* Adjust Actions container */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
        /* Spacing between Cart, Search, User */
    }

    .action-item {
        margin: 0;
    }

    /* Mobile Search Icon Trigger (Reusing existing logic or adding new) */
    .header__mobile-search-icon {
        display: block;
        font-size: 2.0rem;
        color: white;
    }

    .home-product .row.row.sm-gutter {
        margin: 0 2px;
    }

    .pagination-item {
        padding: 0;
    }

    .pagination-item-link {
        font-size: 1.6rem;
        min-width: 36px;
    }

    /* Footer tweaks */
    .main-footer-info {
        padding: 0 16px;
    }
}