/* Wholesale Page Mobile Responsive Styles */

/* Mobile Filter Toggle Button */
.mobile-filter-toggle-wholesale {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, #0d5c63 0%, #0a4a50 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    margin-bottom: 1.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    transition: all 0.3s ease;
}

.mobile-filter-toggle-wholesale:active {
    transform: scale(0.98);
}

/* Filter Sidebar Mobile Overlay */
.filter-sidebar-overlay-wholesale {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-sidebar-overlay-wholesale.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive (max-width: 1024px) */
@media (max-width: 1024px) {
    .mobile-filter-toggle-wholesale {
        display: flex;
    }

    /* Sidebar becomes slide-in on tablet/mobile */
    aside.lg\:w-64 {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: white;
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 1.25rem;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    aside.lg\:w-64.active {
        left: 0;
    }

    /* Filter Header for Mobile */
    .filter-sidebar-header-wholesale {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #0d5c63;
    }

    .filter-sidebar-header-wholesale h3 {
        font-size: 1.25rem;
        color: #2C3E50;
        margin: 0;
        font-weight: 700;
    }

    .filter-close-btn-wholesale {
        background: rgba(255, 165, 0, 0.1);
        border: none;
        font-size: 1.5rem;
        color: #2C3E50;
        cursor: pointer;
        padding: 0.375rem;
        line-height: 1;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .filter-close-btn-wholesale:hover {
        background: rgba(255, 165, 0, 0.2);
        transform: rotate(90deg);
    }
}

/* Mobile Responsive (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .wholesale-hero {
        padding: 3rem 0;
    }

    .wholesale-hero .hero-content {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .wholesale-hero .hero-text {
        order: 2;
    }

    .wholesale-hero .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

    .wholesale-hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .wholesale-hero .hero-text > p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .wholesale-hero .hero-stats {
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 2rem;
    }

    .wholesale-hero .stat-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem 1.25rem;
        width: 100%;
    }

    .wholesale-hero .stat-item i {
        font-size: 2rem;
        width: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #0d5c63, #0a4a50);
        color: white;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .wholesale-hero .stat-item div {
        text-align: left;
    }

    .wholesale-hero .stat-item h3 {
        font-size: 1.75rem;
    }

    .wholesale-hero .stat-item span {
        font-size: 0.8125rem;
    }

    .wholesale-hero .hero-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .wholesale-hero .btn-primary,
    .wholesale-hero .btn-secondary {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding: 1rem 2rem;
        font-size: 1rem;
        justify-content: center;
    }

    .wholesale-hero .hero-image {
        order: 1;
        max-width: 100%;
    }

    .wholesale-hero .hero-image img {
        border-radius: 1.25rem;
        max-height: 320px;
        object-fit: cover;
    }

    /* Products Grid Mobile */
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    /* Product Card Mobile */
    .wholesale-hero ~ .shop-section .product-card {
        border-radius: 0.75rem;
    }

    .wholesale-hero ~ .shop-section .product-image {
        height: 180px;
    }

    .wholesale-hero ~ .shop-section .product-info {
        padding: 0.75rem;
    }

    .wholesale-hero ~ .shop-section .product-category {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
    }

    .wholesale-hero ~ .shop-section .product-title {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .wholesale-hero ~ .shop-section .product-vendor {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }

    .wholesale-hero ~ .shop-section .product-rating {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .wholesale-hero ~ .shop-section .current-price {
        font-size: 1rem;
    }

    .wholesale-hero ~ .shop-section .original-price {
        font-size: 0.8125rem;
    }

    /* Product Actions - Always Visible on Mobile */
    .wholesale-hero ~ .shop-section .product-actions {
        opacity: 1;
        gap: 0.375rem;
    }

    .wholesale-hero ~ .shop-section .action-btn {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    /* Toolbar Mobile */
    .bg-white.rounded-lg.shadow-md.p-4 {
        flex-direction: column;
        gap: 0.875rem;
        padding: 0.875rem 1rem;
    }

    /* Filter Boxes Mobile */
    .bg-white.rounded-lg.shadow-md.p-5 {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Sidebar */
    aside.lg\:w-64 {
        width: 90%;
        max-width: 100%;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Hero Section Extra Small */
    .wholesale-hero h1 {
        font-size: 1.625rem;
    }

    .wholesale-hero .hero-text > p {
        font-size: 0.9375rem;
    }

    .wholesale-hero .stat-item {
        padding: 0.875rem 1rem;
    }

    .wholesale-hero .stat-item i {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
    }

    .wholesale-hero .stat-item h3 {
        font-size: 1.5rem;
    }

    .wholesale-hero .stat-item span {
        font-size: 0.75rem;
    }

    /* Products Grid - Keep 2 columns but smaller */
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .wholesale-hero ~ .shop-section .product-image {
        height: 150px;
    }

    .wholesale-hero ~ .shop-section .product-info {
        padding: 0.625rem;
    }

    .wholesale-hero ~ .shop-section .product-title {
        font-size: 0.8125rem;
    }

    .wholesale-hero ~ .shop-section .current-price {
        font-size: 0.9375rem;
    }

    .wholesale-hero ~ .shop-section .original-price {
        font-size: 0.75rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .wholesale-hero .hero-content {
        flex-direction: row;
    }

    .wholesale-hero .hero-text {
        order: 1;
        text-align: left;
    }

    .wholesale-hero .hero-image {
        order: 2;
        max-width: 50%;
    }

    .wholesale-hero .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .wholesale-hero .stat-item {
        flex: 1;
        min-width: 45%;
    }

    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .mobile-filter-toggle-wholesale,
    .wholesale-hero .btn-primary,
    .wholesale-hero .btn-secondary,
    .wholesale-hero ~ .shop-section .action-btn,
    .wholesale-hero ~ .shop-section .btn-add-cart {
        min-height: 44px;
    }

    .wholesale-hero ~ .shop-section .product-actions {
        opacity: 1;
    }

    button:active,
    a:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}
