@media screen and (max-width:1059px) {
    header .header-top .panel .lang{
        display:none;
    }
    header .header-top .panel .phones + .separator{
        display: none;
    }
}
@media screen and (min-width:1020px) {
    body.active-mobile-menu{
        overflow: auto;
    }
    #mobileMenu{
        display: none;
    }
}
@media screen and (max-width:1019px) {
    header .header-top{
        display: none;
    }
    header .row-favorites-categories{
        display: none;
    }
    .search-field-wrapper{
        display:none;
    }
    header .tool-box{
        margin-left:auto;
    }
    header .tool-box a > span{
        display: none;
    }
    .catalog-btn-wrapper{
        display: none;
    }
    .hamburger-btn{
        display:block;
    }
    #catalog-menu,
    .overlay{
        display: none !important;
    }
}
@media screen and (max-width:950px) {
    .contacts{
        transform: none;
        left:20px;
    }
    .contacts:last-child{
        transform: none;
        right:20px;
        left:auto;
    }
}
@media screen and (max-width:899px) {
    #google-map{
        display:none;
    }
    .contacts-blc{
        height:auto;
        padding: 0 15px;
        max-width: 1380px;
        margin-left:auto;
        margin-right:auto;
        display: flex;
        flex-direction: column;
        gap:20px;
    }
    .contacts-blc h2.block-title{
        margin-bottom:0;
    }
    .contacts,
    .contacts:last-child{
        top:auto;
        left:auto;
        right:auto;
        width:auto;
        min-height:inherit;
        position: relative;
    }
}
@media screen and (max-width:864px) {
    .footer-content{
        flex-direction: column;
    }
    .footer-menu-wrapper{
        padding:0;
    }
    footer .logo{
        display: flex;
        justify-content: center;
        margin-bottom:20px;
    }
    footer .col-sm-4{
        text-align: center;
        padding-bottom:10px;
    }
    .footer-social{
        padding:0;
    }
}
@media screen and (max-width:767px) {
    .about__main {
        padding: 36px 35px 35px 35px;
    }
    .about__main__text {
        font-size: 23px;
    }
    .about__main__text {
        font-size: 23px;
        margin-bottom: 13px;
    }
    .about__main__num{
        font-size:65px;
    }
    .about__link {
        width: 100%;
        font-size: 16px;
    }
    .about__link::before {
        width: 279px;
        height: 116px;
        top: -12px;
        background-position: 0 29px;
        left: -8px;
        background-size: contain;
    }
    .about__pic {
        display: none;
    }
    .about {
        padding: 11px 0 40px 0;
        margin-top: 0;
        margin-bottom:40px;
    }
    .about__main {
        height: 293px;
    }
    .footer-info{
        justify-content: center;
    }

    .cat-grid {
        --auto-grid-min-size: 10rem;
    }
    
    .cart-table colgroup,
    .cart-table thead {
        display: none;
    }

    .cart-table{
        margin:0;
    }
    .cart-table,
    .cart-table tbody,
    .cart-table tfoot{
        display:block;
    }
    .cart-table tfoot tr,
    .cart-table tfoot td{
        display:block;
    }
    .cart-table tfoot td{
        padding-top:25px;
    }
    .cart-table tfoot td .btn{
        display: flex;
        justify-content:center;
        width: 100%;
    }
	
	
	.cart-table tbody tr td {
        display:block;
        padding:0;
    }
    .cart-table tbody tr td > div {
        width:100%;
    }
    
    .cart-table tbody tr{
        border-bottom: 1px solid #ddd;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        padding-bottom:30px;
        margin-bottom:30px;
        gap: 15px 10px;
        grid-auto-flow: row;
        grid-template-areas:
        "name name name name name name"
        "photo photo photo price price tool"
        "photo photo photo quantity quantity tool"
        "photo photo photo total total tool";
    }
    .cart-table tbody tr td.cell-photo{
        grid-area: photo;
        width:auto;
    }
    .cart-table tbody tr td.cell-name{
        grid-area: name;
    }
    .cart-table tbody tr td.cell-quantity{
        grid-area: quantity;
        display: flex;
        align-items: center;
    }
    .cart-table tbody tr td.cell-price{
        grid-area: price;
        display: flex;
        align-items: flex-end;
    }
    .cart-table tbody tr td.cell-total{
        grid-area: total;
        white-space: nowrap;
        position: relative;
        font-weight: 400;
        font-size: 26px;
        letter-spacing: -0.06em;
        line-height: 1;
    }
    
    .cart-table tbody tr td.cell-total::before{
        content:attr(data-text);
        position: relative;
        display: block;
        font-size: 10px;
        letter-spacing: 0.01em;
        font-weight: 700;
        line-height: 10px;
        margin-bottom: 3px;
    }
    .cart-table tbody tr td.cell-tool{
        grid-area: tool;
        text-align: right;
    }
    
    .cart-table .cell-photo .product-photo{
    	padding-right:5px;
    }
    
    .cart-table tbody tr td .product-pricing{
        display: flex;
        gap:20px;
        margin:0;
    }
    .cart-table tbody tr td .product-pricing .price{
        margin:0 !important;
    }
    .cart-table tbody tr td.cell-total{
        color:var(--gray-color);
    }
    .cart-table tbody tr td.cell-total::before{
        font-weight: normal;
    }
}
@media screen and (max-width:649px) {
    .logo img:first-child{
        width: 50px;
        height: 46px;
    }
    .logo img:last-child{
        width:100px;
        height:21px;
    }
}
@media screen and (max-width:585px) {
    .footer-menu-wrapper{
        flex-direction: column;
        align-items: center;
    }
    .footer-menu-wrapper ul li{
        text-align: center;
    }
    .listing-container:not(.owl-carousel) {
  		--auto-grid-min-size: 10rem;
	}
	.listing-container .list-item .product-line-tool .fav-btn, 
	.listing-container .list-item .product-line-tool .cart-btn{
		width: auto;
		min-width:28px;
	}
}
@media screen and (max-width:525px) {
   
    .novelties-container .more-listings{
        justify-content: center;
    }
    h2.block-title{
        justify-content: center;
    }
}
@media screen and (max-width:439px) {
    header .header-controls .panel{

    }
    header .tool-box {
        gap: 30px;
    }
    header .tool-box .nav-user-wrapper{
        display: none;
    }
    .hamburger-btn{
        margin-left:auto;
    }
}
@media screen and (max-width:370px) {
    .tool-box a[href*="favorites"]{
        display: none;
    }
}
@media screen and (max-width:320px) {
	.listing-container:not(.owl-carousel){
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    header .tool-box{
        display: none;
    }
    .hamburger-btn{
        margin-left:auto;
    }
}

@media screen and (max-width: 767px) {

    /* Прячем десктоп, показываем мобилку */
    .orders-desktop-view {
        display: none !important;
    }

    .orders-mobile-view {
        display: block !important;
    }

    /* ========================================
       КАРТОЧКА ЗАКАЗА
    ======================================== */

    .order-card {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    /* Шапка: номер + дата */
    .order-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .order-number {
        font-size: 18px;
        font-weight: 600;
        color: var(--main-general-color);
    }

    .order-date {
        font-size: 13px;
        color: #666;
    }

    /* Инфо: статус + сумма */
    .order-card-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        gap: 15px;
    }

    .order-status-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
    }

    .order-status-wrapper .label {
        font-size: 13px;
        color: #666;
        font-weight: 500;
    }

    .order-status-wrapper .badge {
        flex-shrink: 0;
    }

    .order-total {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .order-total .label {
        font-size: 13px;
        color: #666;
        font-weight: 500;
    }

    .order-total .value {
        font-size: 20px;
        font-weight: 600;
        color: var(--main-general-color);
    }

    /* Кнопка деталей */
    .btn-order-details-mobile {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 16px;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
    }

    .btn-order-details-mobile:hover {
        background: #e8e8e8;
    }

    .btn-order-details-mobile.active {
        background: var(--main-general-color);
        color: #fff;
        border-color: var(--main-general-color);
    }

    /* ========================================
       ДЕТАЛИ ЗАКАЗА (РАСКРЫВАЮЩИЙСЯ БЛОК)
    ======================================== */

    .order-card-details {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #e0e0e0;
    }

    .details-title {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 12px 0;
        color: #333;
    }

    /* Список товаров */
    .order-products {
        margin-bottom: 16px;
    }

    .product-item-mobile {
        display: flex;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .product-item-mobile:last-child {
        border-bottom: none;
    }

    .product-image {
        flex-shrink: 0;
        width: 60px;
        height: 60px;
        border-radius: 6px;
        overflow: hidden;
        background: #f5f5f5;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-info {
        flex: 1;
        min-width: 0;
    }

    .product-name {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .product-name a {
        color: #333;
        text-decoration: none;
    }

    .product-price-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        font-size: 13px;
    }

    .product-price-mobile .price {
        font-weight: 600;
        color: var(--main-general-color);
    }

    .product-price-mobile .quantity {
        color: #666;
    }

    .product-price-mobile .total {
        font-weight: 600;
        color: #333;
    }

    /* Итоги заказа */
    .order-summary-mobile {
        background: #f9f9f9;
        border-radius: 8px;
        padding: 12px;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        font-size: 14px;
    }

    .summary-row.total {
        margin-top: 8px;
        padding-top: 12px;
        border-top: 2px solid #e0e0e0;
        font-size: 16px;
    }

    .summary-label {
        color: #666;
    }

    .summary-value {
        font-weight: 500;
        color: #333;
    }

    .summary-row.total .summary-value {
        color: var(--main-general-color);
        font-size: 18px;
    }
}

/* =========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (< 400px)
========================================= */
@media screen and (max-width: 399px) {
    .order-card {
        padding: 12px;
    }

    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .order-card-info {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .order-total {
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }

    .product-image {
        width: 50px;
        height: 50px;
    }
}