/* Mobile Drawer Styles */

@media (max-width: 1000px) {
    .category-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .search_plp {
        width: calc(100% - 40px) !important;
        max-width: none !important;
        margin: 10px auto 1rem auto;
        padding: 0;
        margin-bottom: 1rem;
    }

    .searchField {
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        max-width: none !important;
        width: 100% !important;
        height: 41px;
        border: 1px solid #b4b4b4;
        border-radius: 25px;
        padding: 0 10px;
        position: relative;
    }

    .sortBy {
        margin-bottom: 1rem;
        width: calc(100% - 40px) !important;
        margin: 0px auto;
    }

    .drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        padding-top: 0px;
    }

    /* Improved touch behavior for mobile drawer */
    .drawer-content {
        touch-action: none; /* Prevents iOS "bounce" during drag */
    }

    .drawer-handle {
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
        touch-action: none;
        padding: 10px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .handle-bar {
        width: 60px;
        height: 4px;
        background-color: #ccc;
        border-radius: 2px;
        pointer-events: none; /* Let events bubble up to parent */
    }

    .drawer-header {
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
        touch-action: none;
    }

    /* Mobile Accordion Sections - Only when opened */
    div#mobile-accordion-section-dept.open,
    div#mobile-accordion-section-class.open,
    div#mobile-accordion-section-subclass.open,
    div#mobile-accordion-section-collection.open,
    div#mobile-accordion-section-artist.open,
    div#mobile-accordion-section-holiday.open,
    div#mobile-accordion-section-color.open,
    div#mobile-accordion-section-price.open {
        display: flex !important;
        padding: 20px;
        gap: 10px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Mobile Filter Toggle Buttons */
    #mobileAccordionGroup .selectionFilter {
        margin: 0;
        padding: 0;
    }

    #mobileAccordionGroup .selectionFilter input[type="checkbox"] {
        display: none !important; /* Hide checkboxes */
    }

    #mobileAccordionGroup .selectionFilter label {
        display: inline-block;
        padding: 8px 16px;
        border: 2px solid #ccc;
        border-radius: 25px; /* Pill shape */
        background-color: #fff;
        color: #333;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
        min-width: 60px;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    #mobileAccordionGroup .selectionFilter label:hover {
        border-color: #999;
        background-color: #f5f5f5;
    }

    /* Selected state - black background */
    #mobileAccordionGroup .selectionFilter input[type="checkbox"]:checked + label {
        background-color: #000 !important;
        color: #fff !important;
        border-color: #000 !important;
        font-weight: 600;
    }

    /* Active/pressed state */
    #mobileAccordionGroup .selectionFilter label:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Mobile Price Filter Styles */
    div#mobile-accordion-section-price.open {
        display: block !important;
        padding: 20px;
        flex-direction: column;
    }
    
    div#mobile-accordion-section-price .priceSearch {
        width: 100%;
    }
    
    div#mobile-accordion-section-price #mobilePriceFilters {
        display: flex !important;
        gap: 10px;
        align-items: center;
        margin-bottom: 15px;
    }
    
    div#mobile-accordion-section-price .input-group {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    div#mobile-accordion-section-price .input-group label {
        font-size: 12px;
        margin-bottom: 5px;
        font-weight: 500;
    }
    
    div#mobile-accordion-section-price .input-with-symbol {
        position: relative;
        display: flex;
        align-items: center;
    }
    
    div#mobile-accordion-section-price .currency-symbol {
        position: absolute;
        left: 0px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 500;
        z-index: 2;
        color: #666;
        font-size: 14px;
        pointer-events: none;
        border-radius: 50px;
        height: 36px;
        width: 32px;
    }
    
    div#mobile-accordion-section-price input[type="text"] {
        width: 100%;
        padding: 10px 12px 10px 28px;
        border: 2px solid #ccc;
        border-radius: 25px;
        font-size: 14px;
        outline: none;
        box-sizing: border-box;
    }
    
    div#mobile-accordion-section-price input[type="text"]:focus {
        border-color: #000;
    }
    
    div#mobile-accordion-section-price .clear-price-text {
        text-align: center;
        color: #666;
        font-size: 14px;
        margin-bottom: 10px;
        cursor: pointer;
        text-decoration: underline;
    }
    
    div#mobile-accordion-section-price .cBTN {
        width: 100%;
        padding: 12px;
        background-color: #000;
        color: #fff;
        border: none;
        border-radius: 25px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }
    
    div#mobile-accordion-section-price .cBTN:hover {
        background-color: #333;
    }
    
    /* Mobile Filter Modal Enhancements */
    .filter-modal-overlay {
        z-index: 10001 !important;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .filter-modal {
        position: relative;
        z-index: 10002 !important;
        touch-action: pan-y;
        max-height: 90vh !important;
        margin: 5vh auto 0 auto;
    }
    
    .filter-modal-header {
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
        touch-action: pan-y;
        position: relative;
        z-index: 10003;
    }
    
    .filter-modal-header:active {
        cursor: grabbing;
    }
    
    .filter-modal-close {
        z-index: 10004 !important;
        pointer-events: auto !important;
        touch-action: manipulation;
    }
    
    .filter-modal-content {
        max-height: 60vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10003;
    }
    
    .filter-modal-footer button {
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .filter-modal-search input {
        -webkit-appearance: none;
        touch-action: manipulation;
    }
    
    .filter-modal-item {
        pointer-events: auto !important;
        touch-action: manipulation;
    }
    
    .filter-modal-item input[type="checkbox"] {
        pointer-events: auto !important;
        touch-action: manipulation;
    }
    
    .filter-modal-item label {
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure see-more button is always visible in mobile drawer */
    #mobileAccordionGroup .see-more-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        margin-top: 10px;
        padding: 8px 12px;
        background: #f0f0f0;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 12px;
        color: #666;
        cursor: pointer;
        box-sizing: border-box;
        position: relative;
        z-index: 1;
    }
    
    /* Specific styles for very small screens */
    @media (max-width: 444px) {
        #mobileAccordionGroup .see-more-btn {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            font-size: 10px;
            padding: 6px 10px;
            min-height: 30px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
} 