/* ===== Mobile First / Tablet ===== */
@media (max-width: 1199px) {
    .popular-slider-prev {
        left: 8px;
    }

    .popular-slider-next {
        right: 8px;
    }
}

@media (max-width: 991px) {
    .header-nav {
        display: none !important;
    }

    .header-nav .header-contact {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        padding-top: 1rem;
        margin-top: 0.5rem;
    }

    .header-main .header-action-link .small {
        display: none;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .feature-card {
        height: 320px;
        min-height: 320px;
    }

    .popular-slider .swiper-slide {
        height: 340px;
    }

    .product-slide-card {
        height: 340px;
        min-height: 340px;
    }

    .product-slide-img-wrap,
    .product-slide-img {
        height: 150px;
    }

    .feature-card-tags,
    .feature-card-aux .feature-card-tags {
        max-width: 55%;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.25rem;
    }

    .feature-card {
        height: 280px;
        min-height: 280px;
    }

    .feature-card-title {
        font-size: 1.25rem;
    }

    .feature-card-tags,
    .feature-card-aux .feature-card-tags {
        max-width: 70%;
    }

    .popular-slider .swiper-slide {
        height: 320px;
    }

    .product-slide-card {
        height: 320px;
        min-height: 320px;
    }

    .product-slide-img-wrap,
    .product-slide-img {
        height: 140px;
    }

    .popular-title {
        font-size: 1.5rem;
    }

    .product-slide-name {
        font-size: 0.9rem;
    }

    .product-slide-desc {
        font-size: 0.8rem;
    }

    .product-slide-price-current {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 1.1rem;
    }

    .feature-card {
        height: 260px;
        min-height: 260px;
    }

    .feature-card-title {
        font-size: 1.1rem;
    }

    .feature-card-tags .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .popular-slider .swiper-slide {
        height: 300px;
    }

    .product-slide-card {
        height: 300px;
        min-height: 300px;
    }

    .product-slide-img-wrap,
    .product-slide-img {
        height: 120px;
    }

    .product-slide-body {
        padding: 0.75rem 0.75rem 0;
    }

    .product-slide-actions {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        gap: 0.5rem !important;
    }

    .product-slide-cart-btn,
    .product-slide-action-btn {
        width: 36px;
        height: 36px;
    }

    .popular-slider-prev,
    .popular-slider-next {
        width: 32px;
        height: 32px;
    }

    .popular-slider-prev::after,
    .popular-slider-next::after {
        font-size: 0.75rem;
    }

    .info-card {
        padding: 0.5rem !important;
    }

    .info-card-icon {
        width: 48px;
        height: 48px;
    }

    .info-card .info-card-icon img {
        width: 28px;
        height: 28px;
    }

    .info-card-label {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 767px) {
    .info-card-icon {
        width: 56px;
        height: 56px;
    }

    .info-card .info-card-icon img {
        width: 32px;
        height: 32px;
    }
}

/* ===== Container padding ===== */
@media (max-width: 991px) {
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .container-fluid {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ===== Footer adaptive ===== */
@media (max-width: 991px) {
    .footer-main {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .footer-main .col-lg-3,
    .footer-main .col-lg-2,
    .footer-main .col-lg-4 {
        margin-bottom: 2rem;
    }

    .footer-main .col-lg-3:last-child,
    .footer-main .col-lg-2:last-child,
    .footer-main .col-lg-4:last-child {
        margin-bottom: 0;
    }

    .footer-main .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 575px) {
    .footer-main {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer-logo {
        margin-bottom: 1rem !important;
    }

    .footer-col-title {
        font-size: 0.7rem;
    }

    .footer-link {
        font-size: 0.875rem;
    }
}

/* ===== Index page (product cards, meatec branding) ===== */
@media (max-width: 991px) {
    .meatec-brand {
        font-size: 2rem;
    }

    .meatec-engineering {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }

    .meatec-tagline {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .meatec-brand {
        font-size: 1.5rem;
    }

    .meatec-engineering {
        font-size: 0.875rem;
        letter-spacing: 0.15em;
    }

    .meatec-tagline {
        font-size: 0.9rem;
    }

    .product-card .card-title {
        font-size: 0.9rem;
    }

    .catalog-cta .cta-title {
        font-size: 0.9rem;
    }
}

/* ===== Header main: burger button on mobile ===== */
@media (max-width: 991px) {
    .header-main .btn-link[data-bs-toggle="offcanvas"] {
        color: #fff !important;
    }

    .header-main .btn-link[data-bs-toggle="offcanvas"]:hover {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .header-main .btn-link[data-bs-toggle="offcanvas"]:focus {
        box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.25);
    }
}

/* ===== Header main bar mobile ===== */
@media (max-width: 575px) {
    .header-actions {
        gap: 0.75rem !important;
    }

    .header-main .py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* ===== Main padding ===== */
@media (max-width: 991px) {
    main {
        padding: 2rem 0;
    }

    main.main-hero {
        padding: 2rem 0 3rem;
    }
}

@media (max-width: 575px) {
    main {
        padding: 1.5rem 0;
    }

    main.main-hero {
        padding: 1.5rem 0 2rem;
    }
}

/* ===== Modal adaptive ===== */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* ===== Hide offcanvas on desktop ===== */
@media (min-width: 992px) {
    .header-offcanvas {
        display: none !important;
    }
}

/* ===== Search result pages — adaptive ===== */
.search-result-mobile-search .input-group {
    border-radius: 0.375rem;
    overflow: hidden;
}

.search-result-mobile-search .form-control {
    border-right: none;
}

.search-result-mobile-search .btn {
    border-left: none;
}

@media (max-width: 992px) {
    .search-result-header {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .search-result-title {
        font-size: 1.25rem;
    }

    .search-result-page .row {
        flex-direction: column;
    }

    .search-result-page aside {
        margin-bottom: 1rem;
    }

    .search-filters-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .search-results-table {
        border-radius: 0.5rem !important;
    }

    .search-result-table {
        font-size: 0.875rem;
    }

    .search-result-thumb {
        width: 40px;
        height: 40px;
    }

    .search-result2-table .search-result2-thumb,
    .search-result2-table .search-result2-img-cell img {
        width: 40px;
        height: 40px;
    }

    .search-result2-icon-img {
        width: 32px;
        height: 32px;
    }

    .search-result2-table td:nth-child(6) {
        min-width: 140px;
    }
}

@media (min-width: 992px) {
    .collapse-lg.collapse {
        display: block !important;
        visibility: visible !important;
    }
}

@media (max-width: 767px) {
    .search-result-title {
        font-size: 1.1rem;
    }

    .search-result-table {
        font-size: 0.8125rem;
    }

    .search-result-thumb {
        width: 36px;
        height: 36px;
    }

    .search-result2-table .search-result2-thumb,
    .search-result2-table .search-result2-img-cell img {
        width: 36px;
        height: 36px;
    }

    .search-result2-icon-img {
        width: 28px;
        height: 28px;
    }

    .search-result2-badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }

    .search-result2-sub-code {
        padding-left: 1rem;
    }
}

@media (max-width: 575px) {
    .search-result-header {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .search-result-title {
        font-size: 1rem;
    }

    .search-result-toggle-box {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    .search-result-toggle-box .bi-plus-lg {
        font-size: 0.75rem;
    }

    .search-result-minus-line {
        width: 8px;
    }

    .search-result2-table .search-result2-img-cell {
        width: 60px !important;
    }

    .search-result2-table td:nth-child(6) {
        min-width: 120px;
    }
}

/* Second level page — adaptive */
@media (max-width: 767px) {
    .second-level-title {
        font-size: 1.5rem;
    }

    .second-level-card-img-wrap {
        width: 200px;
        height: 200px;
    }

    .second-level-card-img {
        width: 200px;
        height: 200px;
    }

    .second-level-card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 575px) {
    .second-level-title {
        font-size: 1.25rem;
    }

    .second-level-card {
        padding: 1rem;
    }

    .second-level-card-img-wrap {
        width: 200px;
        height: 200px;
    }

    .second-level-card-img {
        width: 200px;
        height: 200px;
    }
}

/* Cart page responsive */
@media (max-width: 991.98px) {
    .cart-page { padding: 1rem 0; }
    .cart-title { font-size: 1.5rem; }
    .cart-order-summary { position: static; margin-top: 0; }
    .cart-item { flex-wrap: wrap; gap: 1rem; padding: 1rem; }
    .cart-item-img { width: 64px; height: 64px; }
    .cart-item-details { order: 2; flex: 1 1 calc(100% - 80px); }
    .cart-item-name { font-size: 0.9375rem; }
    .cart-item-badge { order: 3; width: 100%; }
    .cart-item-qty { order: 4; }
    .cart-item-price { order: 5; margin-left: auto; }
}
@media (max-width: 767.98px) {
    .cart-page { padding: 0.75rem 0; }
    .cart-title { font-size: 1.375rem; }
    .cart-items-list { border-radius: 0.375rem; }
    .cart-actions-bar { flex-direction: column; align-items: stretch; padding: 0.75rem 1rem; gap: 0.75rem; }
    .cart-actions-left { flex-direction: column; gap: 0.5rem; }
    .cart-actions-bar .cart-action-btn { font-size: 0.8125rem; }
    .cart-item { padding: 0.875rem 1rem; gap: 0.75rem; }
    .cart-item-img { width: 56px; height: 56px; }
    .cart-item-details { flex: 1 1 calc(100% - 64px); }
    .cart-item-name { font-size: 0.875rem; }
    .cart-item-art { font-size: 0.8125rem; }
    .cart-item-actions .btn-link { font-size: 0.9375rem; }
    .cart-item-badge { width: auto; }
    .cart-summary-total-value { font-size: 1.125rem; }
    .cart-order-summary { padding: 1.25rem; }
    .cart-order-summary .btn-checkout { padding: 0.75rem 1rem; font-size: 0.9375rem; }
}
@media (max-width: 575.98px) {
    .cart-page .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .cart-title { font-size: 1.25rem; }
    .cart-items-list { border-radius: 0.25rem; }
    .cart-actions-bar { padding: 0.625rem 0.75rem; }
    .cart-actions-bar .cart-action-btn { font-size: 0.75rem; }
    .cart-actions-bar .cart-action-btn i { font-size: 0.875rem; }
    .cart-item { flex-direction: column; align-items: flex-start; padding: 0.75rem; gap: 0.5rem; }
    .cart-item-img { width: 80px; height: 80px; }
    .cart-item-details { flex: 1 1 100%; order: 2; }
    .cart-item-name { font-size: 0.875rem; }
    .cart-item-art { font-size: 0.75rem; margin-bottom: 0.375rem; }
    .cart-item-badge { order: 3; }
    .cart-item-qty { order: 4; }
    .cart-item-price { order: 5; margin-left: 0; font-size: 0.9375rem; min-width: auto; }
    .cart-order-summary { padding: 1rem; border-radius: 0.375rem; }
}

/* ===== Checkout, checkout_error, order_success — adaptive ===== */
@media (max-width: 991.98px) {
    .checkout-header .d-flex { flex-wrap: wrap; gap: 0.75rem; }
    .checkout-header .py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    .checkout-logo img { height: 28px; }
    .checkout-back-link span { display: none; }
    .checkout-phone span { font-size: 0.9rem; }
    .checkout-main { padding: 1.5rem 0 2rem; }
    .checkout-title { font-size: 1.5rem; }
    .checkout-form-card { padding: 1.25rem !important; }
    .checkout-section-title { font-size: 1rem; }
    .cart-order-summary { padding: 1.25rem; }
    .order-success-title { font-size: 1.625rem; }
    .order-success-icon { font-size: 2rem; }
    .order-success-desc { font-size: 0.9375rem; }
    .order-success-recommend .order-success-product-card { height: 320px; min-height: 320px; }
    .order-success-product-img-wrap { height: 200px; }
    .order-success-product-img { height: 180px; }
    .order-success-product-body { min-height: 120px; }
    .order-success-product-name { font-size: 0.875rem; }
}

@media (max-width: 767.98px) {
    .checkout-main { padding: 1.25rem 0 1.5rem; }
    .checkout-title { font-size: 1.375rem; }
    .checkout-form-card { padding: 1rem !important; }
    .checkout-comment { min-height: 80px; }
    .order-success-heading { flex-wrap: wrap; gap: 0.5rem; }
    .order-success-title { font-size: 1.5rem; }
    .order-success-icon { font-size: 1.75rem; }
    .order-success-block .d-flex { flex-direction: column; align-items: flex-start; }
    .order-success-recommend .order-success-product-card { height: 300px; min-height: 300px; }
    .order-success-product-img-wrap { height: 180px; }
    .order-success-product-img { height: 160px; }
    .order-success-product-body { min-height: 110px; padding: 0.875rem 1rem; }
    .order-success-product-name { font-size: 0.8125rem; }
}

@media (max-width: 575.98px) {
    .checkout-header .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .checkout-main .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .checkout-main { padding: 1rem 0 1.5rem; }
    .checkout-title { font-size: 1.25rem; margin-bottom: 1rem !important; }
    .checkout-form-card { padding: 0.875rem !important; border-radius: 0.5rem !important; }
    .checkout-section { margin-bottom: 1.25rem !important; }
    .checkout-section-title { font-size: 0.9375rem; margin-bottom: 0.75rem !important; }
    .checkout-form-card .row.g-3 > [class*="col-"] { margin-bottom: 0.5rem; }
    .checkout-comment { min-height: 70px; }
    .cart-order-summary { padding: 1rem; border-radius: 0.5rem; }
    .cart-order-summary .btn-checkout { padding: 0.75rem 1rem; font-size: 0.9375rem; }
    .checkout-footer .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .checkout-footer-copyright { font-size: 0.8125rem; }
    .checkout-error-toast { min-width: auto; left: 1rem; right: 1rem; top: 1rem; max-width: none; }
    .order-success-block { margin-bottom: 2rem !important; }
    .order-success-title { font-size: 1.25rem; }
    .order-success-icon { font-size: 1.5rem; }
    .order-success-desc { font-size: 0.875rem; margin-bottom: 1rem !important; }
    .order-success-btn-catalog,
    .order-success-btn-details { padding: 6px 12px; font-size: 0.875rem; }
    .order-success-recommend { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .order-success-recommend .popular-title { font-size: 1.375rem; margin-bottom: 1rem !important; }
    .order-success-recommend .row.g-4 { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0.75rem; }
    .order-success-recommend .col-6 { flex: 0 0 100%; max-width: 100%; }
    .order-success-recommend .order-success-product-card { height: 280px; min-height: 280px; }
    .order-success-product-img-wrap { height: 160px; }
    .order-success-product-img { height: 140px; }
    .order-success-product-body { min-height: 100px; padding: 0.75rem 1rem; }
    .order-success-product-name { font-size: 0.8125rem; }
}

@media (max-width: 575px) {
    .search-dropdown-empty {
        padding: 2rem 1rem !important;
    }
    .search-dropdown-empty img {
        max-width: 80px;
    }
}

/* LK responsive */
.lk-sidebar-offcanvas .lk-sidebar-nav-offcanvas {
    display: flex;
    flex-direction: column;
}
.lk-sidebar-offcanvas .lk-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin: 0 0.5rem;
    border-radius: 8px;
}
.lk-menu-btn-bar {
    width: 100%;
    margin-top: 1.5rem;
}
.btn-lk-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
}
.btn-lk-menu-toggle:hover {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #212529;
}
@media (max-width: 991px) {
    .lk-container .row { flex-direction: column; }
    .lk-main { padding: 1.25rem; }
    .lk-page-title { font-size: 1.5rem; }
    .lk-search-bar { flex-wrap: wrap; }
    .lk-search-fields { flex: 1 1 100%; max-width: 100%; width: 100%; }
    .lk-search-field { flex: 1 1 100%; width: 100%; min-width: 0; }
    .lk-search-input { width: 100%; }
    .lk-tabs { gap: 0.75rem; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
    .lk-tab { white-space: nowrap; font-size: 0.875rem; }
    .lk-pagination { flex-wrap: wrap; gap: 0.5rem; }
    .lk-pagination-inner { flex-wrap: wrap; }
    /* Календарь: два месяца вертикально, влезает на экран */
    .lk-date-range-picker { flex-direction: column; gap: 0.75rem; }
    .lk-date-filter-popup { max-width: min(560px, calc(100vw - 2rem)); max-height: 85vh; overflow-y: auto; }
    .lk-date-filter-popup .lk-datepicker-inline { min-width: 0; }
    .lk-date-filter-popup .flatpickr-calendar { width: 100%; max-width: 280px; }
}
/* ===== Product card page — adaptive ===== */
@media (max-width: 991px) {
    .product-card-page { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .product-card-page .row.g-4 { flex-direction: column; }
    .product-card-page .row.g-4 > .col-lg-10 { order: 1; }
    .product-card-page .row.g-4 > .col-lg-2 { order: 2; }
    .product-card-breadcrumb { margin-bottom: 1rem !important; }
    .product-card-breadcrumb .breadcrumb { flex-wrap: wrap; font-size: 0.8125rem; }
    .product-card-title { font-size: 1.375rem; }
    .product-card-main-block { padding: 1rem !important; flex-direction: column; gap: 1.5rem; }
    .product-card-gallery-zone { order: 1; flex-direction: column; }
    .product-card-specs-block { order: 2; }
    .product-card-gallery { flex-direction: column; gap: 1rem; }
    .product-card-gallery-hover-wrapper { order: 1; }
    .product-card-thumbs { order: 2; flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0.5rem; padding-bottom: 0.25rem; }
    .product-card-thumbs::-webkit-scrollbar { height: 4px; }
    .product-card-thumb { width: 52px; min-width: 52px; flex-shrink: 0; }
    .product-card-gallery .product-card-main-img { min-height: 220px; }
    .product-card-gallery .product-card-main-img img { max-height: 280px; }
    .product-card-gallery-hover-wrapper { min-height: 220px; }
    .product-card-sidebar { position: static; }
    .product-card-sidebar-block { padding: 1rem !important; }
    .product-card-price { font-size: 1.5rem !important; }
    .product-card-tabs-nav { margin-top: 1.5rem !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .product-card-tab-link { padding: 0.5rem 0.75rem; font-size: 0.875rem; white-space: nowrap; }
    .product-card-params-table { font-size: 0.875rem; }
    .product-card-params-table th,
    .product-card-params-table td { padding: 0.5rem 0.375rem; }
    .product-card-features-icons img { max-height: 28px; width: auto; }
}

@media (max-width: 767px) {
    .product-card-page { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .product-card-breadcrumb .breadcrumb-item { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .product-card-breadcrumb .breadcrumb-item + .breadcrumb-item::before { margin: 0 0.25rem; }
    .product-card-title { font-size: 1.25rem; }
    .product-card-art span { font-size: 0.875rem; }
    .product-card-main-block { padding: 0.75rem !important; gap: 1rem; border-radius: 0.5rem !important; }
    .product-card-thumb { width: 48px; min-width: 48px; }
    .product-card-gallery .product-card-main-img { min-height: 180px; }
    .product-card-gallery .product-card-main-img img { max-height: 220px; }
    .product-card-gallery-hover-wrapper { min-height: 180px; }
    .product-card-badges .badge,
    .product-card-badges > span { padding: 0.25rem 0.5rem !important; font-size: 0.75rem !important; }
    .product-card-specs-item { padding: 0.25rem 0; font-size: 0.875rem; }
    .product-card-description-short { font-size: 0.875rem; }
    .product-card-sidebar-block { padding: 0.75rem !important; border-radius: 0.5rem !important; }
    .product-card-price { font-size: 1.375rem !important; }
    .product-card-add-to-cart { padding: 0.625rem 1rem; font-size: 0.9375rem; }
    .product-card-stock .badge.search-result2-badge { font-size: 0.8125rem; padding: 0.35em 0.65em; }
    .product-card-stock-list-item { padding: 0.25rem 0; font-size: 0.875rem; }
    .product-card-tab-link { padding: 0.5rem 0.625rem; font-size: 0.8125rem; }
    .product-card-params-table { font-size: 0.8125rem; }
    .product-card-params-table th,
    .product-card-params-table td { padding: 0.4rem 0.25rem; }
}

/* Order detail page — adaptive */
@media (max-width: 991px) {
    .lk-order-detail-header { gap: 0.75rem; }
    .lk-order-detail-title { font-size: 1.5rem; }
    .lk-order-support-btn { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
    .lk-order-composition-tabs { gap: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
    .lk-order-composition-tabs .lk-tab { white-space: nowrap; }
}
@media (max-width: 767px) {
    .lk-order-detail-header { flex-wrap: nowrap; align-items: center; gap: 0.5rem; }
    .lk-order-header-spacer { flex: 1; min-width: 0.5rem; }
    .lk-order-detail-header .lk-order-support-btn { margin-left: 0 !important; flex-shrink: 0; }
    .lk-order-detail-title { font-size: 1.25rem; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lk-section-title { font-size: 1rem; }
    .lk-order-composition-content .lk-search-bar { flex-direction: column; align-items: stretch; }
    .lk-order-composition-content .lk-search-field { max-width: 100% !important; }
    .lk-order-items-table { font-size: 0.8125rem; min-width: 560px; }
    .lk-order-items-table thead th,
    .lk-order-items-table tbody td { padding: 0.5rem 0.5rem; }
    .lk-order-detail-footer { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .lk-order-detail-footer .lk-pagination { justify-content: center; }
    .lk-order-detail-footer .lk-order-total { text-align: center; }
    #supportModal .modal-dialog { max-width: calc(100% - 2rem); margin: 1rem; max-height: calc(100vh - 2rem); }
    #supportModal .lk-support-modal-body { max-height: calc(100vh - 8rem); overflow-y: auto; }
    #supportModal .lk-support-requests-table-wrap { margin-left: -0.5rem; margin-right: -0.5rem; }
    .lk-support-requests-table { font-size: 0.8125rem; min-width: 520px; }
    .lk-support-requests-table thead th,
    .lk-support-requests-table tbody td { padding: 0.4rem 0.5rem; }
    #newRequestModal .modal-dialog { max-width: calc(100% - 2rem); margin: 1rem; max-height: calc(100vh - 2rem); }
    #newRequestModal .modal-body { max-height: calc(100vh - 8rem); overflow-y: auto; }
}
@media (max-width: 575px) {
    .lk-order-detail-title { font-size: 1.125rem; }
    .lk-order-support-btn { font-size: 0.875rem; padding: 0.4rem 0.5rem; white-space: nowrap; }
    .lk-order-composition-content .lk-search-bar .lk-export-link { font-size: 0.875rem; }
    #supportModal .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
    #newRequestModal .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
}

/* Settings page — adaptive */
@media (max-width: 991px) {
    .lk-settings-main .lk-page-title { font-size: 1.5rem; }
    .lk-settings-main .lk-settings-tabs { gap: 1rem; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
    .lk-settings-main .lk-settings-tabs .lk-tab { white-space: nowrap; font-size: 0.875rem; }
    .lk-settings-main .lk-settings-block { padding: 1.25rem; }
    .lk-settings-main .lk-order-support-btn { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
}
@media (max-width: 767px) {
    .lk-settings-main .lk-page-title { font-size: 1.25rem; }
    .lk-settings-main .lk-settings-block { padding: 1rem; }
    .lk-settings-main .lk-settings-block-title { font-size: 0.9375rem; margin-bottom: 1rem; }
    .lk-settings-main .row.g-4 { --bs-gutter-y: 1rem; }
    .lk-settings-main .lk-settings-contacts-list .product-card-specs-item { font-size: 0.875rem; padding: 0.25rem 0; }
    .lk-settings-main .lk-settings-address-item .text-muted { font-size: 0.8125rem; }
    #addContactModal .modal-dialog,
    #addAddressModal .modal-dialog { max-width: calc(100% - 2rem); margin: 1rem; }
    #addContactModal .modal-body,
    #addAddressModal .modal-body { max-height: calc(100vh - 8rem); overflow-y: auto; }
}
@media (max-width: 575px) {
    .lk-settings-main .lk-page-title { font-size: 1.125rem; margin-bottom: 1rem !important; }
    .lk-settings-main .lk-settings-tabs { gap: 0.75rem; }
    .lk-settings-main .lk-settings-block { padding: 0.875rem; }
    .lk-settings-main .lk-settings-block-title { font-size: 0.875rem; }
    .lk-settings-main .lk-settings-info-item { font-size: 0.875rem; }
    .lk-settings-main .lk-order-support-btn { font-size: 0.8125rem; padding: 0.4rem 0.5rem; white-space: nowrap; }
    .lk-settings-main .lk-order-support-btn span { font-size: inherit; }
    .lk-settings-main .lk-settings-contact-item .d-flex.justify-content-between { flex-wrap: wrap; gap: 0.25rem; }
    .lk-settings-main .lk-settings-address-item .d-flex.justify-content-between { flex-wrap: wrap; gap: 0.25rem; }
    .lk-settings-main .lk-settings-address-item .fw-semibold { font-size: 0.9375rem; }
    #addContactModal .modal-dialog,
    #addAddressModal .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
}

/* Analogues page — adaptive */
@media (max-width: 991px) {
    .lk-analogues-main .lk-page-title { font-size: 1.5rem; }
    .lk-analogues-search-wrap { width: 100%; }
    .lk-analogues-main .lk-analogues-result-view .row { flex-direction: column; }
    .lk-analogues-main .search-filters { margin-bottom: 1rem; }
}
@media (max-width: 767px) {
    .lk-analogues-main .lk-page-title { font-size: 1.25rem; margin-bottom: 1rem !important; }
    .lk-analogues-search-wrap { margin-bottom: 1rem !important; }
    .lk-analogues-search-input { font-size: 0.9375rem; padding: 0.5rem 0.75rem; }
    .lk-analogues-search-btn { width: 40px; min-width: 40px; }
    .lk-analogues-clear-btn { width: 32px; min-width: 32px; }
    .lk-analogues-dropdown { max-height: 300px; }
    .lk-analogues-placeholder { min-height: 220px; padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .lk-analogues-placeholder-text { font-size: 0.875rem; }
    .lk-analogues-results-card { padding: 1rem; }
    .lk-analogues-results-title { font-size: 1rem; }
    .lk-analogues-results-hint { font-size: 0.875rem; }
    .lk-analogues-results-item { flex-wrap: wrap; padding: 0.75rem 0; }
    .lk-analogues-results-item-icons { order: 3; width: 100%; margin-top: 0.5rem; padding-left: 80px; }
    .lk-analogues-main .analogues-searched { padding: 1rem; }
    .lk-analogues-main .analogues-searched-title { font-size: 1.125rem; margin-bottom: 1rem; }
    .lk-analogues-main .analogues-searched-drawing-wrap { margin-bottom: 1rem; }
    .lk-analogues-main .analogues-searched-drawing img { max-width: 100%; height: auto; max-height: 120px; object-fit: contain; }
    .lk-analogues-main .analogues-searched-item { gap: 0.75rem; }
    .lk-analogues-main .analogues-searched-thumb { width: 64px; height: 64px; }
    .lk-analogues-main .analogues-searched-name-row { font-size: 1rem; flex-wrap: wrap; }
    .lk-analogues-main .search-result2-icon-img { width: 28px; height: 28px; }
    .lk-analogues-main .analogues-list-block { overflow-x: auto; }
    .lk-analogues-main .search-result2-table .search-result2-thumb,
    .lk-analogues-main .search-result2-table .search-result2-img-cell img { width: 36px; height: 36px; }
    .lk-analogues-main .search-result2-table td:nth-child(6) { min-width: 110px; }
    .lk-analogues-main .search-result2-icon-img { width: 26px; height: 26px; }
}
@media (max-width: 575px) {
    .lk-analogues-main .lk-page-title { font-size: 1.125rem; margin-bottom: 0.75rem !important; }
    .lk-analogues-placeholder { min-height: 180px; padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .lk-analogues-placeholder-icon img { max-width: 64px; }
    .lk-analogues-results-item-thumb { width: 48px; height: 48px; min-width: 48px; }
    .lk-analogues-results-item-icons { padding-left: 64px; margin-top: 0.35rem; }
    .lk-analogues-results-item-icons img { width: 26px; height: 26px; }
    .lk-analogues-main .analogues-searched { padding: 0.75rem; }
    .lk-analogues-main .analogues-searched-title { font-size: 1rem; margin-bottom: 0.75rem; }
    .lk-analogues-main .analogues-searched-drawing-wrap { margin-bottom: 0.75rem; }
    .lk-analogues-main .analogues-searched-drawing img { max-height: 100px; }
    .lk-analogues-main .analogues-searched-thumb { width: 56px; height: 56px; }
    .lk-analogues-main .analogues-searched-name-row { font-size: 0.9375rem; }
    .lk-analogues-main .analogues-searched-item { flex-direction: column; align-items: flex-start; }
    .lk-analogues-main .search-result2-icons { width: 100%; justify-content: flex-start; margin-top: 0.25rem; }
    .lk-analogues-main .search-result2-icon-img { width: 24px; height: 24px; }
    .lk-analogues-main .search-result2-table .search-result2-img-cell { width: 50px !important; }
    .lk-analogues-main .search-result2-table .search-result2-thumb,
    .lk-analogues-main .search-result2-table .search-result2-img-cell img { width: 32px; height: 32px; }
    .lk-analogues-main .search-result2-table .fw-bold { font-size: 0.875rem; }
    .lk-analogues-main .search-result2-table .text-secondary.small { font-size: 0.75rem; }
    .lk-analogues-main .search-result-toggle-cell { width: 40px !important; }
    .lk-analogues-main .search-filters { padding: 0.75rem; }
    .lk-analogues-main .search-filters .form-label { font-size: 0.8125rem; }
}

/* Support page — adaptive */
@media (max-width: 991px) {
    .lk-support-main .lk-support-header { gap: 0.75rem; }
    .lk-support-main .lk-page-title { font-size: 1.5rem; }
    .lk-support-main .lk-order-support-btn { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
    .lk-support-main .lk-search-bar { flex-wrap: wrap; }
    .lk-support-main .lk-support-search { flex: 1 1 100%; max-width: 100%; width: 100%; min-width: 0; }
    .lk-support-main .lk-support-table { font-size: 0.8125rem; min-width: 800px; }
    .lk-support-main .lk-support-table thead th,
    .lk-support-main .lk-support-table tbody td { padding: 0.5rem 0.5rem; }
}
@media (max-width: 767px) {
    .lk-support-main .lk-support-header { flex-wrap: nowrap; align-items: center; gap: 0.5rem; }
    .lk-support-main .lk-support-header .lk-order-support-btn { margin-left: 0 !important; flex-shrink: 0; }
    .lk-support-main .lk-page-title { font-size: 1.25rem; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lk-support-main .lk-search-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .lk-support-main .lk-support-search { max-width: 100% !important; }
    .lk-support-main .lk-support-table { font-size: 0.8125rem; min-width: 700px; }
    .lk-support-main .lk-support-table thead th,
    .lk-support-main .lk-support-table tbody td { padding: 0.45rem 0.4rem; }
    .lk-support-main .lk-support-table .lk-th-filter-inner > span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lk-support-main .lk-pagination { flex-direction: column; align-items: stretch; }
    .lk-support-main .lk-pagination-inner { justify-content: center; }
    .lk-support-main .lk-pagination-select-wrap { margin-left: 0; margin-top: 0.5rem; justify-content: center; }
    #newRequestModal .modal-dialog { max-width: calc(100% - 2rem); margin: 1rem; }
    #newRequestModal .modal-body { max-height: calc(100vh - 8rem); overflow-y: auto; }
}
@media (max-width: 575px) {
    .lk-support-main .lk-page-title { font-size: 1.125rem; }
    .lk-support-main .lk-order-support-btn { font-size: 0.8125rem; padding: 0.4rem 0.5rem; white-space: nowrap; }
    .lk-support-main .lk-order-support-btn span { font-size: inherit; }
    .lk-support-main .lk-support-table { min-width: 650px; font-size: 0.75rem; }
    .lk-support-main .lk-support-table thead th,
    .lk-support-main .lk-support-table tbody td { padding: 0.4rem 0.35rem; }
    .lk-support-main .lk-table-wrap { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
    #newRequestModal .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
}

@media (max-width: 575px) {
    .product-card-page .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .product-card-breadcrumb .breadcrumb { font-size: 0.75rem; }
    .product-card-breadcrumb .breadcrumb-item { max-width: 100px; }
    .product-card-title { font-size: 1.125rem; }
    .product-card-art { flex-wrap: wrap; }
    .product-card-main-block { padding: 0.5rem !important; gap: 0.75rem; }
    .product-card-thumb { width: 44px; min-width: 44px; }
    .product-card-gallery .product-card-main-img { min-height: 160px; }
    .product-card-gallery .product-card-main-img img { max-height: 200px; }
    .product-card-gallery-hover-wrapper { min-height: 160px; }
    .product-card-features-block { margin-bottom: 0.75rem !important; }
    .product-card-features-icons { gap: 0.35rem; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; -webkit-overflow-scrolling: touch; }
    .product-card-features-icons img { max-height: 24px; }
    .product-card-specs { margin-bottom: 0.75rem !important; }
    .product-card-sidebar-block { padding: 0.5rem !important; }
    .product-card-price { font-size: 1.25rem !important; }
    .product-card-actions a { font-size: 0.875rem; }
    .product-card-tabs-nav { margin-top: 1rem !important; margin-bottom: 0.75rem !important; }
    .product-card-tab-content { border-radius: 0 0 0.375rem 0.375rem; }
}

/* Hide hover popup gallery on touch devices (use modal instead) */
@media (hover: none) {
    .product-card-popup-gallery { display: none !important; }
}

/* Catalog dropdown full width on mobile */
@media (max-width: 767px) {
    .catalog-dropdown { width: calc(100% - 2rem); left: 1rem; right: 1rem; transform: none; max-width: none; }
}

/* Product gallery modal adaptive */
@media (max-width: 575px) {
    .product-gallery-thumbs-col { width: 70px; min-width: 70px; }
    .product-gallery-thumb { width: 48px; height: 48px; }
    .product-gallery-header { padding: 0.75rem 1rem; }
    .product-gallery-title { font-size: 0.875rem; }
    .product-gallery-main-img-wrap { padding: 1rem; }
}

@media (max-width: 767px) {
    .lk-main { padding: 1rem; }
    .lk-page-title { font-size: 1.375rem; }
    .lk-search-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .lk-search-fields { flex-direction: column; flex: 1 1 100%; max-width: 100%; width: 100%; }
    .lk-search-field { flex: 1 1 100%; width: 100%; min-width: 0; }
    .lk-search-input { width: 100%; box-sizing: border-box; }
    .lk-orders-table { font-size: 0.8125rem; min-width: 600px; }
    .lk-orders-table thead th,
    .lk-orders-table tbody td { padding: 0.5rem 0.5rem; }
    .lk-order-info-specs { grid-template-columns: 1fr; }
    .lk-table-wrap { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
    .lk-pagination { flex-direction: column; align-items: stretch; }
    .lk-pagination-inner { justify-content: center; }
    .lk-pagination-select-wrap { margin-left: 0; margin-top: 0.5rem; justify-content: center; }
    /* Календарь на узких экранах: один столбец, компактнее */
    .lk-date-filter-popup { max-width: min(320px, calc(100vw - 1rem)); padding: 0.5rem; }
    .lk-date-filter-popup .flatpickr-calendar { max-width: 260px; }
}

/* Sborki page — mobile / tablet */
@media (max-width: 991.98px) {
    .sborki-sidebar { max-height: 300px; }
    .sborki-row { gap: 1rem 0; }
    .sborki-main-header,
    .sborki-components { padding-left: 1rem; padding-right: 1rem; }
    .sborki-sidebar-header { padding-left: 1rem; padding-right: 1rem; }
    .sborki-list { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 767px) {
    .sborki-page { min-height: calc(100vh - 240px); }
    .sborki-sidebar { max-height: 280px; margin-bottom: 20px; }
    .sborki-sidebar-title { font-size: 1.125rem; white-space: normal; }
    .sborki-main-title { font-size: 1.125rem; white-space: normal; }
    .sborki-main-header { flex-wrap: wrap; padding: 1rem; }
    .sborki-main-title-wrap { width: 100%; }
    .sborki-main-actions { order: 1; width: 100%; justify-content: flex-end; }
    .sborki-component-card,
    .sborki-component-item { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.75rem; }
    .sborki-component-img { width: 48px; height: 48px; }
    .sborki-component-right { width: 100%; justify-content: flex-end; margin-top: 0.25rem; }
    .sborki-add-placeholder { padding: 1rem; font-size: 0.9375rem; }
    .sborki-empty-inner { padding: 2rem 1rem; }
    .sborki-empty-title { font-size: 1.125rem; }
    .sborki-add-element-modal .add-element-categories { flex-direction: column; gap: 1.5rem; }
    .sborki-add-element-modal .add-element-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .sborki-add-element-modal .add-element-grid-img { width: 60px; height: 60px; }
    .sborki-add-element-modal .add-element-grid-title { font-size: 0.8125rem; }
    .sborki-add-element-modal .add-element-modal-body { max-height: min(85vh, 500px); }
    .sborki-add-element-modal .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
}
