/* ==========================================================
   SHOP PAGE SPECIFIC STYLES & FILTERS
   ========================================================== */
.breadcrumb-wrap { background: var(--bg-main); padding: 15px 0; border-bottom: 1px solid #eee; margin-bottom: 40px;}
.breadcrumb { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.breadcrumb a { color: var(--primary-black); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary-yellow); }
.mx-10 { margin: 0 10px; font-size: 11px; color: #ccc;}

.shop-layout { display: flex; gap: 30px; align-items: flex-start; }

/* Filter Sidebar */
.shop-sidebar { width: 280px; flex-shrink: 0; background: #ffffff; border-radius: 12px; padding: 25px; position: sticky; top: 100px; z-index: 99; border: 1px solid #eee; box-shadow: 0 5px 20px rgba(0,0,0,0.02);}
.filter-widget { margin-bottom: 25px; }

/* Sidebar Header (Mobile X Button Fix - Perfectly Aligned Right) */
.sidebar-header { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee;}
.sidebar-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--primary-black);}
.close-sidebar-btn { background: #f4f4f4; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; color: var(--primary-black); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);}
.close-sidebar-btn:hover { background: var(--danger); color: var(--white); transform: rotate(90deg);}

/* Hide close button ONLY on desktop completely */
@media (min-width: 1025px) { 
    .sidebar-header.hide-desktop { display: none !important; } 
}

/* Search Box */
.filter-title-new { font-size: 16px; font-weight: 700; color: var(--primary-black); margin-bottom: 15px;}
.border-top-line { border-top: 1px solid #eee; padding-top: 20px; margin-top: 10px;}
.sidebar-search { display: flex; background: var(--white); border: 1px solid #ddd; border-radius: 6px; overflow: hidden; transition: var(--transition);}
.sidebar-search:focus-within { border-color: var(--primary-yellow); box-shadow: 0 0 0 3px rgba(255,179,0,0.1);}
.sidebar-search input { flex: 1; border: none; background: transparent; padding: 12px 15px; outline: none; font-family: 'Poppins', sans-serif; font-size: 13px;}
.sidebar-search button { background: var(--primary-black); color: var(--primary-yellow); border: none; padding: 0 15px; cursor: pointer; transition: 0.3s;}

/* Price Filter Dual Slider (PERFECT DRAGGING FIX) */
.price-slider-wrap { position: relative; width: 100%; height: 5px; background: #ddd; margin: 25px 0 20px 0; border-radius: 5px;}
.slider-track-new { position: absolute; height: 100%; background: var(--primary-yellow); border-radius: 5px; top: 0; bottom: 0; left: 0; right: 0; z-index: 1;}

.price-slider-wrap input[type="range"] { 
    position: absolute; 
    width: 100%; 
    top: -7px; 
    -webkit-appearance: none; 
    appearance: none;
    background: transparent; 
    pointer-events: none; 
    z-index: 2; 
    margin: 0;
}
.price-slider-wrap input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none;
    height: 18px; 
    width: 18px; 
    border-radius: 50%; 
    background: #fff; 
    cursor: pointer; 
    pointer-events: auto; 
    border: 1px solid #999; 
    position: relative; 
    z-index: 10; 
}
.price-slider-wrap input[type="range"]::-moz-range-thumb { 
    height: 18px; 
    width: 18px; 
    border-radius: 50%; 
    background: #fff; 
    cursor: pointer; 
    pointer-events: auto; 
    border: 1px solid #999; 
    position: relative; 
    z-index: 10; 
}

/* Clean Number Inputs */
.price-inputs-new { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px;}
.price-field { display: flex; align-items: center; background: var(--white); border: 1px solid #ddd; border-radius: 6px; padding: 8px 10px; flex: 1; transition: 0.3s;}
.price-field:focus-within { border-color: var(--primary-yellow); }
.price-field .currency { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-right: 5px;}
.price-field input { width: 100%; border: none; background: transparent; font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--primary-black); outline: none; font-size: 13px;}
.price-field input[type=number]::-webkit-inner-spin-button, 
.price-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-field input[type=number] { -moz-appearance: textfield; }

.separator { color: var(--text-dark); font-weight: 700; font-size: 16px;}
.btn-filter-new { width: 100%; background: var(--primary-black); color: var(--primary-yellow); border: none; padding: 12px 0; border-radius: 8px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; transition: var(--transition); text-transform: uppercase;}
.btn-filter-new:hover { background: var(--hover-yellow); color: var(--primary-black); box-shadow: 0 4px 15px rgba(255,179,0,0.3);}

/* Category Checkboxes */
.category-list-new { list-style: none; padding: 0; margin-top: 10px;}
.category-list-new li { margin-bottom: 12px; }
.category-list-new li label { display: flex; align-items: center; gap: 10px; color: #333; font-size: 13px; font-weight: 500; transition: 0.3s; cursor: pointer; margin: 0;}
.category-list-new li label:hover { color: var(--primary-yellow); }
.category-list-new input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 4px; background-color: var(--white); cursor: pointer; position: relative; transition: var(--transition);}
.category-list-new input[type="checkbox"]:checked { background-color: var(--primary-yellow); border-color: var(--primary-yellow);}
.category-list-new input[type="checkbox"]:checked::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; color: var(--primary-black); font-size: 10px; left: 3px; top: 1px;}

/* Shop Main & Sort Select UI */
.shop-main { flex: 1; width: 100%; overflow: hidden;}
.shop-topbar { display: flex; justify-content: space-between; align-items: center; background: var(--white); padding: 15px 25px; border-radius: 12px; border: 1px solid #eee; margin-bottom: 30px;}
.shop-results { font-size: 13px; font-weight: 500; color: var(--text-muted); margin: 0;}

.shop-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--primary-black); }
.custom-sort-dropdown { position: relative; width: 170px; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500; user-select: none;}
.sort-selected { background-color: var(--white); border: 2px solid #fef0c7; padding: 8px 30px 8px 15px; border-radius: 8px; color: var(--primary-black); cursor: pointer; position: relative;}
.sort-selected::after { content: ''; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #333; transition: transform 0.3s;}
.custom-sort-dropdown.active .sort-selected { border-color: var(--primary-yellow); }
.custom-sort-dropdown.active .sort-selected::after { transform: translateY(-50%) rotate(180deg); }

.sort-options { position: absolute; top: calc(100% + 5px); left: 0; right: 0; background: var(--white); border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); list-style: none; padding: 5px 0; margin: 0; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 100;}
.custom-sort-dropdown.active .sort-options { opacity: 1; visibility: visible; transform: translateY(0); }
.sort-options li { padding: 8px 15px; cursor: pointer; color: #333; transition: background 0.2s; }
.sort-options li:hover { background-color: #e2e8f0; color: #0f172a; }
.sort-options li.active { background-color: #e2e8f0; color: #0284c7; }

/* Desktop Shop Grid overrides global */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr) !important; gap: 20px; width: 100%;}

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.page-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--white); border: 1px solid #eee; border-radius: 50%; font-size: 14px; font-weight: 600; color: var(--primary-black); transition: var(--transition);}
.page-link:hover, .page-link.active { background: var(--primary-yellow); border-color: var(--primary-yellow); }

.mobile-filter-btn { display: none; background: var(--primary-black); color: var(--primary-yellow); border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; align-items: center; gap: 8px; transition: var(--transition);}

/* Shop Responsive Layout */
@media (max-width: 1024px) {
    .shop-layout { flex-direction: column; display: block;}
    .shop-grid { grid-template-columns: repeat(3, 1fr) !important; }
    
    /* Mobile Filter Drawer Fix */
    .shop-sidebar { position: fixed; top: 0; left: -100%; width: 100%; max-width: 320px; height: 100vh; z-index: 2001; border-radius: 0; transition: var(--transition); overflow-y: auto; padding-top: 20px; background: #fff; box-shadow: none; border: none;}
    .shop-sidebar.show { left: 0; box-shadow: 5px 0 25px rgba(0,0,0,0.2); }
    .mobile-filter-btn { display: inline-flex; }
    .shop-topbar { flex-direction: column; gap: 15px; align-items: flex-start; width: 100%;}
}

@media (max-width: 768px) {
    .shop-sidebar { max-width: 280px; padding: 20px 15px; }
    .shop-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px; }
}

@media (max-width: 480px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
}

/* ==========================================================
   CUSTOM SORT DROPDOWN FIX (SHOP PAGE)
   ========================================================== */
.custom-sort-dropdown {
    position: relative;
    cursor: pointer;
}

.custom-sort-dropdown .sort-options-list {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 5px 0;
    margin: 5px 0 0 0;
    width: 180px;
    display: none; /* Default hidden */
    z-index: 999;
}

.custom-sort-dropdown.active .sort-options-list {
    display: block !important; /* Jab active class ho tab show ho */
}

.custom-sort-dropdown .sort-options-list li {
    padding: 10px 15px;
    font-size: 13px;
    color: #333;
    transition: 0.2s;
}

.custom-sort-dropdown .sort-options-list li:hover {
    background: #f8f9fa;
    color: #FFB300;
}

.custom-sort-dropdown .sort-options-list li.active {
    font-weight: 600;
    color: #FFB300;
}


