/* One mobile catalog layout for the Django storefront and Telegram shell.
   Keep these rules scoped to the catalog and the phone/tablet breakpoint. */
@media (min-width: 769px) {
    .catalog-page .results-count {
        display: none;
    }
}

@media (max-width: 768px) {
    .catalog-page .no-products {
        grid-column: 1 / -1;
        text-align: center;
        padding: 60px 20px;
        color: var(--text-secondary);
        font-size: 18px;
    }

    .catalog-page {
        line-height: 1.6;
    }

    .catalog-page .catalog-header {
        display: none !important;
    }

    .catalog-page .mobile-category-chips .chip-count,
    .catalog-page .filters-sidebar .filter-section--brands {
        display: none;
    }

    .catalog-page .products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 4px;
        padding: 0 5px;
    }

    .catalog-page .product-card {
        min-width: 0;
        min-height: 0;
    }

    .catalog-page .product-image {
        height: 165px !important;
        aspect-ratio: auto;
    }

    .catalog-page .product-info h3 {
        display: -webkit-box;
        margin-bottom: 3px !important;
        overflow: hidden;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .catalog-page .product-card .badge {
        position: absolute;
        top: 8px;
        right: auto;
        left: 8px !important;
        z-index: 2;
        padding: 4px 8px;
        border-radius: 8px;
        font-size: 10px;
        font-weight: 700;
        line-height: 15px;
        letter-spacing: 0;
    }

    .catalog-page .product-card .badge-new + .badge-hit {
        top: 34px;
    }

    .catalog-page .product-card .discount-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        left: auto;
        font-size: 10px;
        line-height: 15px;
        animation: none;
        transform: none;
    }

    .catalog-page .product-price {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        margin-bottom: 0;
    }

    .catalog-page .product-price .price-new {
        line-height: 1.2;
    }

    .catalog-page .catalog-cart-control {
        width: 100%;
        margin: 8px 0 0;
    }

    .catalog-page .catalog-cart-control [hidden] {
        display: none !important;
    }

    .catalog-page .catalog-cart-control .quick-add-btn,
    .catalog-page .catalog-cart-control .catalog-quantity-control {
        width: calc(100% - 20px) !important;
        min-height: 44px;
        margin: 8px 10px 10px !important;
        border-radius: 50px !important;
    }

    .catalog-page .catalog-cart-control .quick-add-btn {
        padding: 11px 12px !important;
        font: inherit;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 20px;
    }
}
