/* ==========================================================================
   ECOMMARKET - WOODMART RESPONSIVE STYLESHEET
   Carefully tuned layouts for Laptop, Tablet and Mobile
   ========================================================================== */

/* Laptop & Medium Desktops (1024px - 1280px) */
@media (max-width: 1280px) {
    .hero-grid-split {
        grid-template-columns: 55% calc(45% - 1.25rem);
    }

    .products-grid-woodmart {
        grid-template-columns: repeat(3, 1fr);
    }

    .vendors-grid-woodmart {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-columns-grid {
        grid-template-columns: 1fr 1fr 1fr 1.2fr;
        gap: 2rem;
    }
}

/* Tablet Landscape & Small Laptops (up to 1024px) */
@media (max-width: 1024px) {
    .marketplace-main-area {
        margin-left: 0 !important;
    }

    /* On tablet/mobile screens, hide desktop floating submenu panels */
    .sidebar-floating-container {
        display: none !important;
    }

    .vertical-category-sidebar {
        width: 340px;
        max-width: 88vw;
    }

    .hero-grid-split {
        grid-template-columns: 1fr;
    }

    .hero-slider-container {
        min-height: 380px;
    }

    .categories-carousel-track {
        gap: 16px;
    }

    .category-carousel-item {
        width: 105px;
        min-width: 100px;
        max-width: 110px;
    }

    .products-grid-woodmart {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .perks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .deals-strip-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .footer-columns-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    .header-main-row {
        height: auto;
        padding: 0.85rem 0;
    }

    .header-main-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-logo-col {
        order: 1;
    }

    .header-support-col {
        order: 2;
        margin-left: auto;
    }

    .header-search-col {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .nav-menu-links {
        display: none;
    }

    .categories-carousel-track {
        gap: 14px;
    }

    .category-carousel-item {
        width: 100px;
        min-width: 95px;
        max-width: 105px;
    }

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

/* Mobile Devices (Under 768px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .container {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    /* Compact Header */
    .header-main-row {
        padding: 0.65rem 0;
    }

    .header-logo-img {
        width: 135px;
        max-width: 145px;
        max-height: 65px;
    }

    .footer-logo-img {
        width: 140px;
        max-width: 150px;
    }

    .auth-logo-img {
        width: 150px;
        max-width: 160px;
    }

    /* Mobile Category Sliding Drawer (340px, max 88vw) */
    .vertical-category-sidebar {
        width: min(340px, 88vw);
        max-width: 88vw;
    }

    .sidebar-header-box {
        padding: 10px 12px;
    }

    .sidebar-header-pill {
        height: 50px;
        padding: 0 12px;
    }

    .sidebar-cat-row {
        height: 52px;
        min-height: 52px;
        padding: 0 16px;
    }

    .sidebar-cat-title {
        font-size: 15px;
    }

    .sidebar-cat-icon {
        width: 22px;
        min-width: 22px;
        font-size: 1.05rem;
        margin-right: 12px;
    }

    .header-support-col .support-meta {
        display: none;
    }

    .header-support-col .support-icon-box {
        width: 36px;
        height: 36px;
    }

    .woodmart-search-form {
        height: 42px;
    }

    .search-submit-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    /* Second Row Nav */
    .header-nav-row {
        height: 50px;
    }

    .categories-trigger-label {
        font-size: 0.85rem;
    }

    .header-actions-group {
        gap: 0.75rem;
    }

    .header-action-icon:not(.header-cart-wrapper) {
        font-size: 1rem;
    }

    .cart-total-amount {
        display: none;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 0.85rem 0;
    }

    .hero-slider-container {
        min-height: 320px;
    }

    .hero-slide {
        padding: 2rem 1.5rem;
    }

    .slide-heading {
        font-size: 1.75rem;
    }

    .slide-desc {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .slider-dots-container {
        left: 1.5rem;
    }

    .slider-arrow-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    /* Sub Banners */
    .vendor-promo-banner {
        padding: 1.5rem;
    }

    .vendor-promo-title {
        font-size: 1.4rem;
    }

    .sub-banners-row {
        grid-template-columns: 1fr;
    }

    .sub-banner-card {
        min-height: 160px;
    }

    /* Mobile Category Horizontal Carousel (Single row, 3-4 visible, touch swipe) */
    .categories-section {
        padding: 1.25rem 0 0.85rem 0;
    }

    .categories-carousel-wrapper {
        margin-top: 0.25rem;
    }

    .categories-carousel-track {
        gap: 12px;
        padding: 6px 2px 10px 2px;
        scroll-snap-type: x proximity;
    }

    .category-carousel-item {
        width: 95px;
        min-width: 90px;
        max-width: 100px;
        padding: 2px 4px;
        scroll-snap-align: start;
    }

    .category-item-image-wrap {
        width: 65px;
        height: 65px;
        min-width: 65px;
        min-height: 65px;
        margin-bottom: 6px;
    }

    .category-item-png {
        width: 65px;
        height: 65px;
    }

    .category-item-name {
        font-size: 13.5px;
        line-height: 1.2;
    }

    .categories-carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    .categories-carousel-btn.prev-btn {
        left: -4px;
    }

    .categories-carousel-btn.next-btn {
        right: -4px;
    }

    /* Two-Column Product Grid on Mobile */
    .products-grid-woodmart {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-card-thumb {
        height: 160px;
    }

    .product-card-body {
        padding: 0.75rem;
    }

    .product-card-title {
        font-size: 0.85rem;
        min-height: 2.6em;
    }

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

    .price-regular-inr {
        font-size: 0.75rem;
    }

    .btn-card-add-cart {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    /* Deals Banner */
    .deals-strip-banner {
        padding: 1.5rem;
    }

    .deal-banner-content h3 {
        font-size: 1.4rem;
    }

    /* Vendors Grid */
    .vendors-grid-woodmart {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .perks-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-columns-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Very Small Mobile (< 430px) */
@media (max-width: 430px) {
    .category-carousel-item {
        width: 86px;
        min-width: 82px;
        max-width: 90px;
    }

    .category-item-image-wrap {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
    }

    .category-item-png {
        width: 60px;
        height: 60px;
    }

    .category-item-name {
        font-size: 13px;
    }

    .categories-carousel-btn {
        display: none !important;
        /* Seamless touch swipe on compact mobile */
    }
}

/* ==========================================================================
   Shop / Product Listing Page Responsive Rules
   ========================================================================== */
@media (max-width: 1280px) {
    .products-grid-shop.grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .shop-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .shop-filter-sidebar.desktop-only {
        display: none;
    }

    .btn-mobile-filter-toggle {
        display: inline-flex;
    }

    .mobile-filter-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background-color: #FFFFFF;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.25);
    }

    .mobile-filter-drawer.open {
        transform: translateX(0);
    }

    .mobile-filter-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        background-color: var(--nav-light-blue);
    }

    .mobile-filter-drawer-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary-blue);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-filter-close-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: #FFFFFF;
        border: 1px solid var(--border-color);
        color: var(--text-navy);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
    }

    .mobile-filter-drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 1.25rem;
    }

    .mobile-filter-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(3px);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    .mobile-filter-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .products-grid-shop.grid-4,
    .products-grid-shop.grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 767px) {
    .shop-header-banner {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .shop-header-meta {
        align-items: flex-start;
    }

    .shop-header-title {
        font-size: 1.35rem;
    }

    .shop-toolbar-bar {
        padding: 0.65rem 0.85rem;
    }

    .shop-view-switchers {
        display: none;
    }

    .products-grid-shop.grid-4,
    .products-grid-shop.grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 430px) {

    .products-grid-shop.grid-4,
    .products-grid-shop.grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Single Product Detail Page Responsive Rules
   ========================================================================== */
@media (max-width: 991px) {
    .product-hero-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .product-main-preview {
        height: 380px;
    }

    .reviews-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .shipping-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vendor-tab-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .vendor-tab-name {
        justify-content: center;
    }

    .vendor-tab-stats {
        justify-content: center;
    }

    .vendor-tab-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .product-detail-title {
        font-size: 1.35rem;
    }

    .product-main-preview {
        height: 300px;
    }

    .gallery-thumb-btn {
        width: 62px;
        height: 62px;
    }

    .price-current-large {
        font-size: 1.75rem;
    }

    .product-actions-row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .qty-stepper {
        order: 1;
    }

    .btn-product-wishlist {
        order: 2;
        margin-left: auto;
    }

    .btn-add-cart-detail {
        order: 3;
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 135px;
    }

    .btn-buy-now-detail {
        order: 4;
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 135px;
    }

    .tab-desc-features-grid {
        grid-template-columns: 1fr;
    }

    .product-trust-strip {
        grid-template-columns: 1fr;
    }

    .product-tabs-wrapper {
        padding: 1.25rem;
    }

    .specs-table th {
        width: 40%;
        padding: 0.65rem 0.75rem;
    }

    .specs-table td {
        padding: 0.65rem 0.75rem;
    }

    /* Checkout Page Tablet & Mobile Stacking */
    .checkout-main-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .checkout-right-col {
        position: static !important;
        order: 2;
    }

    .checkout-left-col {
        order: 1;
    }

    .checkout-progress-bar {
        gap: 0.6rem !important;
        margin-bottom: 1.5rem !important;
    }

    .step-connector {
        width: 20px !important;
    }

    .checkout-card {
        padding: 1.25rem !important;
    }

    .checkout-form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .checkout-option-card {
        padding: 0.85rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .step-connector {
        width: 12px !important;
    }

    .checkout-step-item:not(.step-active) .step-label {
        display: none;
    }
}