/* =========================================
   RESPONSIVE DESIGN - Mobile First
   ========================================= */

/* Product Cards Responsive */
@media (max-width: 1400px) {
    .am-card .img-wrap {
        height: 140px;
    }
}

@media (max-width: 1200px) {
    .am-card {
        padding: 8px;
    }

    .am-card .img-wrap {
        height: 130px;
    }

    .am-card .p-name {
        font-size: 12px;
        height: 36px;
    }

    .am-card .p-price {
        font-size: 15px;
    }
}

@media (max-width: 991px) {
    .quick-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .am-card .img-wrap {
        height: 120px;
    }

    .section-header-plain {
        font-size: 16px;
        padding: 12px 15px;
    }
}

@media (max-width: 767px) {

    /* Card grid adjustments */
    .am-card {
        padding: 8px;
        overflow: visible;
        /* Ensure content isn't clipped */
    }

    .am-card .img-wrap {
        height: 110px;
    }

    .am-card .p-name {
        font-size: 11px;
        height: 32px;
    }

    .am-card .price-wrap {
        margin-top: 4px;
        gap: 3px;
        flex-wrap: wrap;
        width: 100%;
    }

    .am-card .p-price {
        font-size: 14px;
        max-width: 100%;
        flex-shrink: 0;
    }

    .am-card .p-old-price {
        font-size: 11px;
        max-width: 100%;
    }

    .am-card .discount-tag {
        font-size: 10px;
        padding: 2px 4px;
    }

    /* Quick grid */
    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .quick-item {
        padding: 8px;
    }

    .quick-item img {
        width: 32px;
        height: 32px;
    }

    .quick-item span {
        font-size: 11px;
    }

    /* Section headers */
    .section-header-plain {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* White box padding */
    .white-box {
        padding: 15px 10px;
    }

    /* Buttons */
    .btn-add-cart {
        width: 32px;
        height: 32px;
        bottom: 6px;
        right: 6px;
        padding: 0;
        font-size: 0;
        /* Hide text */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-add-cart i {
        font-size: 16px;
        margin-right: 0 !important;
    }

    .btn-add-cart-app,
    .btn-wishlist-app {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 0;
    }

    .btn-add-cart-app {
        width: 34px;
        height: 34px;
        bottom: 8px;
        right: 8px;
        font-size: 15px;
    }

    .btn-wishlist-app {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
        font-size: 14px;
    }

    .btn-add-cart-app i,
    .btn-wishlist-app i {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        margin: 0;
        padding: 0;
        width: 1em;
        height: 1em;
    }
}

@media (max-width: 576px) {

    /* Very small screens - 2 cards per row */
    .am-card .img-wrap {
        height: 120px;
    }

    .am-card .p-name {
        font-size: 12px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .am-card {
        padding: 6px;
    }

    .am-card .img-wrap {
        height: 100px;
        min-height: 100px;
    }

    .am-card .p-name {
        font-size: 11px;
        height: 30px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .am-card .p-price {
        font-size: 13px;
    }

    .section-header-plain {
        font-size: 13px;
        padding: 8px 10px;
    }

    .white-box {
        padding: 12px 8px;
    }
}

/* Product Details Page Responsive */
@media (max-width: 991px) {
    .single-product-container {
        padding: 20px 15px;
    }

    .product-info-column {
        padding-left: 15px;
        margin-top: 20px;
    }

    .p-name-main {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .single-product-container {
        padding: 15px 10px;
    }

    .product-info-column {
        padding-left: 0;
    }

    .single-product-gallery-item {
        height: 300px;
        max-width: 100%;
    }

    .p-name-main {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .p-current-price {
        font-size: 24px;
    }

    .buy-box-actions {
        flex-direction: column;
        gap: 10px;
    }

    .qty-control {
        justify-content: center;
        width: 100%;
    }

    .btn-add-to-cart-large {
        width: 100%;
        min-width: auto;
    }

    /* Accordion adjustments */
    .am-accordion-details .accordion-button {
        font-size: 14px;
        padding: 15px;
    }

    .am-accordion-details .accordion-body {
        padding: 15px 20px !important;
        font-size: 13px;
    }

    /* Alternative products */
    .alternative-header h3 {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .single-product-gallery-item {
        height: 280px;
    }

    .horizontal-thumb {
        width: 70px;
        height: 70px;
    }

    .p-name-main {
        font-size: 18px;
    }

    .p-current-price {
        font-size: 22px;
    }

    .trust-item {
        font-size: 12px;
    }
}

/* Filters Responsive */
@media (max-width: 991px) {
    .filter-section {
        margin-bottom: 15px;
    }

    .filter-title {
        font-size: 14px;
    }

    .filter-option {
        padding: 6px 0;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .sidebar-filter {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 9999;
        background: #fff;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar-filter.active {
        left: 0;
    }

    .filter-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }

    .filter-backdrop.active {
        display: block;
    }

    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 15px;
        background: var(--am-primary);
        color: #fff;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        margin-bottom: 15px;
        width: 100%;
    }

    .mobile-filter-toggle i {
        margin-right: 8px;
    }
}

/* Container and Layout Responsive */
@media (max-width: 1400px) {
    .awesome-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 991px) {
    .awesome-container {
        padding: 0 15px;
    }
}

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

    .white-box {
        border-radius: 4px;
    }
}

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