/* ============================================================
   MEDIA QUERIES - Responsive overrides
   ============================================================ */

@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Hide sidebar on tablet */
    .col-lg-3 {
        display: none;
    }

    .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Show mobile filters */
    .aside-block.d-none.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 10px;
    }

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }
    h2 {
        font-size: 18px;
    }
    h3 {
        font-size: 16px;
    }

    /* Stack columns */
    .row {
        flex-direction: column;
    }

    .col-lg-3,
    .col-lg-9,
    .col-lg-12,
    .col-md-4,
    .col-md-6,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    /* Hide sidebar completely on mobile */
    .col-lg-3 {
        display: none;
    }

    .catalog-menu__panels {
        overflow: visible;
    }
    .catalog-menu__inner {
        overflow-y: auto;
    }

    /* Footer mobile */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Buttons full width on mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        padding: 20px 16px;
    }

    .foot-grid {
        padding-bottom: 20px;
    }

    .foot-bottom {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .foot-bottom .container {
        height: auto;
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .foot-bottom a {
        max-width: 70%;
        display: inline-flex;
    }

    .main-news-anons {
        padding-bottom: 30px;
    }

}

@media (max-width: 760px) {
    .topbar__links,
    .topbar__hours {
        display: none;
    }
    .header {
        flex-wrap: wrap;
        height: auto;
        padding: 14px 0;
        gap: 14px;
    }
    .search-wrap {
        order: 3;
        flex-basis: 100%;
    }
    .head-action .lbl {
        display: none;
    }
    .cats-grid,
    .cats { 
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .catalog-objects.tile,
    .catalog-objects.tile-4,
    .catalog-category.tile {
        grid-template-columns: 1fr;
    }
    .promos,
    .main-news-anons {
        grid-template-columns: 1fr;
    }
    .foot-grid {
        grid-template-columns: 1fr 1fr;
    }

    .orders-table .order-row {

        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .orders-table .order-row td {
        padding-top: 0;
    }

    .cart-table-item td {
        display: flex;
        justify-content: space-between;
        text-align: right;
        align-items: center;
        gap: 10px;
        flex-direction: column;
        padding: 0;
    }

    .orders-table .order-sum-cell {
        display: block;
        width: 100%;
    }
    .orders-table .order-item-row {
        border-bottom: 4px dashed #9b9b9b;
    }

    .cart-table-item.order-item-row td {
        justify-content: center;
        flex-direction: row;
        gap: 3px;
    }
}

@media (max-width: 575px) {
    .container {
        max-width: 100%;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Product cards 2 per row on small screens */
    .tile {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card__title {
        font-size: 12px;
        min-height: 48px;
    }

    .product-card__price-current {
        font-size: 16px;
    }

    .product-card__image img {
        max-height: 140px;
    }

    .catalog-controls-block {
        flex-wrap: wrap;
    }
    .catalog-controls-block__sort-title {
        width: 100%;
    }

}

@media (min-width: 576px) {
    .d-sm-block {
        display: block !important;
    }
    .d-sm-none {
        display: none !important;
    }
}
