/* Sellers Page Mobile Responsive Styles */

/* Mobile Filter Toggle Button */
.mobile-filter-toggle-sellers {
    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-sellers:active {
    transform: scale(0.98);
}

/* Filter Sidebar Mobile Overlay */
.filter-sidebar-overlay-sellers {
    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-sellers.active {
    display: block;
    opacity: 1;
}

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

    /* Main container adjustments */
    .sellers-page > .container > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Sidebar becomes slide-in on tablet/mobile */
    .filters-sidebar {
        position: fixed !important;
        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);
    }

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

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

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

    .filter-close-btn-sellers {
        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-sellers:hover {
        background: rgba(255, 165, 0, 0.2);
        transform: rotate(90deg);
    }
}

/* Mobile Responsive (max-width: 768px) */
@media (max-width: 768px) {
    /* Page header */
    .sellers-page > .container > div:first-child h1 {
        font-size: 1.75rem !important;
    }

    .sellers-page > .container > div:first-child p {
        font-size: 0.9375rem !important;
    }

    /* Results count */
    #sellersContent > div:first-child {
        padding: 12px 15px !important;
    }

    #sellersContent > div:first-child p {
        font-size: 0.8125rem !important;
    }

    /* Sellers Grid - 2 columns on mobile */
    #sellersGrid > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Seller Card Mobile */
    .seller-card {
        border-radius: 10px !important;
    }

    .seller-card > div:first-child {
        padding: 20px 15px !important;
    }

    .seller-card > div:first-child > div:first-child {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 10px !important;
    }

    .seller-card > div:first-child > div:first-child > div {
        font-size: 32px !important;
    }

    .seller-card > div:first-child > span {
        padding: 4px 12px !important;
        font-size: 10px !important;
    }

    .seller-card > div:first-child > div:last-child span {
        padding: 4px 10px !important;
        font-size: 10px !important;
    }

    .seller-card > div:last-child {
        padding: 15px !important;
    }

    .seller-card > div:last-child > h3 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    .seller-card > div:last-child > div:first-child {
        padding: 10px 0 !important;
        margin-bottom: 12px !important;
    }

    .seller-card > div:last-child > div:first-child > div > div:first-child {
        font-size: 16px !important;
    }

    .seller-card > div:last-child > div:first-child > div > div:last-child {
        font-size: 9px !important;
    }

    .seller-card > div:last-child > a {
        padding: 12px !important;
        font-size: 13px !important;
    }

    /* Filter boxes mobile */
    .filters-sidebar > div {
        padding: 20px !important;
    }

    .filters-sidebar label {
        font-size: 13px !important;
    }

    .filters-sidebar input[type="text"],
    .filters-sidebar select {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .filters-sidebar button,
    .filters-sidebar a {
        padding: 10px !important;
        font-size: 13px !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Page header */
    .sellers-page > .container > div:first-child h1 {
        font-size: 1.5rem !important;
    }

    .sellers-page > .container > div:first-child p {
        font-size: 0.875rem !important;
    }

    /* Sellers Grid - Keep 2 columns but smaller */
    #sellersGrid > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Seller Card Extra Small */
    .seller-card > div:first-child {
        padding: 15px 10px !important;
    }

    .seller-card > div:first-child > div:first-child {
        width: 70px !important;
        height: 70px !important;
    }

    .seller-card > div:first-child > div:first-child > div {
        font-size: 28px !important;
    }

    .seller-card > div:last-child {
        padding: 12px !important;
    }

    .seller-card > div:last-child > h3 {
        font-size: 13px !important;
    }

    .seller-card > div:last-child > div:first-child > div > div:first-child {
        font-size: 14px !important;
    }

    .seller-card > div:last-child > div:first-child > div > div:last-child {
        font-size: 8px !important;
    }

    .seller-card > div:last-child > a {
        padding: 10px !important;
        font-size: 12px !important;
    }

    /* Sidebar */
    .filters-sidebar {
        width: 90% !important;
        max-width: 100% !important;
    }

    .filters-sidebar > div {
        padding: 15px !important;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #sellersGrid > div {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .mobile-filter-toggle-sellers,
    .filters-sidebar button,
    .filters-sidebar a,
    .filters-sidebar input[type="radio"],
    .filters-sidebar label {
        min-height: 44px;
    }

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

/* Loading state improvements for mobile */
@media (max-width: 768px) {
    .filter-loading {
        min-height: 300px;
    }

    .spinner {
        width: 35px;
        height: 35px;
        margin: 30px auto;
    }
}
