/* ============ ROOT COLORS & VARIABLES ============ */
:root {
    --prime-color: #0e3475;
    --prime-light: #1a4a9f;
    --secondary-color: #f5f7fa;
    --border-color: #e0e6ed;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ GENERAL STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: #fafbfc;
}

/* ============ PRODUCTS HEADER ============ */
.products-main {
    min-height: 100vh;
}

.products-header {
    background: linear-gradient(135deg, var(--prime-color) 0%, var(--prime-light) 100%);
    color: white;
    padding: 2rem 0;
}






.section-header {
    background: linear-gradient(180deg, #000000 0%, #666666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
    font-size: 2rem !important;
    margin-bottom: 0 !important;

}

/* ============ TOP CONTROLS ============ */
.top-controls {

    
 
   
    margin-bottom: 2rem;
}

.product-count {
    color: var(--text-light);
    font-weight: 500;
}

.filter-toggle-btn {
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: none;
}

.filter-toggle-btn:hover {
    background-color: var(--prime-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============ CUSTOM SELECT ============ */
.custom-select-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-label {
    color: var(--text-dark);
    font-weight: 600;
}

.custom-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.custom-select:hover {
    border-color: var(--prime-color);
    box-shadow: var(--shadow-sm);
}

.custom-select:focus {
    outline: none;
    border-color: var(--prime-color);
    box-shadow: 0 0 0 3px rgba(14, 52, 117, 0.1);
}

/* ============ FILTER SIDEBAR ============ */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.filter-overlay.show {
    opacity: 1;
    visibility: visible;
}

.filter-sidebar {
    background: white;
    padding: 16px;
    transition: var(--transition);
    height: 100vh;
    overflow-y: auto;
}

/* Desktop: Hidden by default, slides in on click */
@media (min-width: 992px) {
    .filter-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 350px;
        max-width: 350px;
        z-index: 2100;
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .filter-sidebar.show {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .content.filter-open {
        margin-left: 350px;
    }
}

.filter-header {
    padding: 1.5rem;
    background: white;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-main-title {
    font-size: 1.5rem;
    color: var(--prime-color);
}

.filter-close-btn {
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.filter-close-btn:hover {
    color: var(--prime-color);
    transform: rotate(90deg);
}

/* ============ FILTER GROUPS ============ */
.filter-group {
    background: white !important;
   
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.filter-group:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--prime-color);
}

.filter-group-header {
    padding: 1rem 1.25rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}


    

.filter-title {
    font-size: 1rem;
    color: var(--prime-color);
    margin: 0;
    font-weight: 700;
}

.filter-group-icon {
    color: var(--prime-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-group-header:hover .filter-group-icon {
    transform: scale(1.1);
}

.filter-group-content {
    padding: 1rem 1.25rem;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.filter-group-content.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ FILTER OPTIONS - CHECKBOXES ============ */
.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.filter-option:last-child {
    margin-bottom: 0;
}

.filter-option:hover {
    color: var(--prime-color);
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--prime-color);
    border-color: var(--prime-color);
    color: white;
}

.filter-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    font-size: 0.9rem;
    font-weight: bold;
}

.option-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.filter-option:hover .checkbox-custom {
    border-color: var(--prime-color);
    box-shadow: 0 0 0 2px rgba(14, 52, 117, 0.1);
}

/* ============ PRICE RANGE FILTER ============ */
.price-range-container {
    padding: 0.5rem 0;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.price-input {
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.price-input:focus {
    outline: none;
    border-color: var(--prime-color);
    box-shadow: 0 0 0 3px rgba(14, 52, 117, 0.1);
}

/* ============ RANGE SLIDER ============ */
.range-slider-container {
    position: relative;
    margin: 2rem 0;
}

.range-slider {
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--prime-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    transition: var(--transition);
    border: 2px solid white;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(14, 52, 117, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--prime-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    transition: var(--transition);
    border: 2px solid white;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(14, 52, 117, 0.2);
}

.range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.range-fill {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--prime-color), var(--prime-light));
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    left: 0;
    right: auto;
}

/* ============ PRODUCTS GRID & CARDS ============ */
.content {
    transition: var(--transition);
    width: 100%;
}

#products-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
   box-shadow: 0px 0px 34px 0px #B4B4B414;
    
    position: relative;
    height: auto;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-12px);
 
    border-color: var(--prime-color);
}

/* ============ PRODUCT IMAGE ============ */
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
   
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--danger-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8);
    z-index: 10;
}

.product-card:hover .favorite-btn {
    opacity: 1;
    transform: scale(1);
}

.favorite-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.favorite-btn.active i {
    color: var(--danger-color);
}

/* ============ PRODUCT INFO ============ */
.product-info {
    padding: 1.25rem;
}

.product-category {
    font-size: 1.03rem;
    color: var(--sec);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(180deg, #000000 0%, #666666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.product-rating i {
    color: var(--warning-color);
    font-size: 0.85rem;
}

.rating-value {
    color: var(--text-light);
    font-weight: 600;
    margin-left: 0.25rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 1rem;
}

.currency {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--prime-color);
}

/* ============ PRODUCT HOVER DETAILS ============ */
.product-hover-details {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
   
    padding: 0 1.25rem;
}

.product-card:hover .product-hover-details {
    max-height: 500px;
    
}

.product-features {
    margin-bottom: 1rem;
}

.feature-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.feature-group:last-child {
    border-bottom: none;
}

.feature-label {
    color: var(--text-light);
    font-weight: 600;
}

.feature-value {
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.feature-value.color-1 {
    background: linear-gradient(135deg, rgba(14, 52, 117, 0.1), rgba(14, 52, 117, 0.05));
    color: var(--prime-color);
}

.feature-value.color-2 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: var(--success-color);
}

/* ============ PRODUCT ACTION BUTTONS ============ */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-demand-price,
.btn-view-details {
    padding: 0.8rem 1rem;
    border: none;
   
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-demand-price {
    background: transparent;
    color: var(--main);
    border: 1px solid #2D8AB1 !important;
}

.btn-demand-price:hover {
    background:#2D8AB1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color:white
}

.btn-view-details {
    background: var(--prime-color);
    color: white;
    
}

.btn-view-details:hover {
    background: var(--prime-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============ RESPONSIVE DESIGN ============ */

/* Desktop (1200px and above) - Filter sidebar slides in from left */
@media (min-width: 1200px) {
    .filter-toggle-btn {
        display: inline-flex !important;
    }

    #products-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

  
 

    .content {
        width: 100%;
        transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .content.filter-open {
        margin-left: 350px;
    }

    .product-card {
        min-height: 450px;
    }
}

/* Medium Screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .filter-toggle-btn {
        display: inline-flex !important;
    }

    #products-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .content {
        width: 100%;
        transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .content.filter-open {
        margin-left: 350px;
    }

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

/* Tablet (576px - 991px) */
@media (max-width: 991px) {
    .filter-toggle-btn {
        display: inline-flex !important;
    }

    #products-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .filter-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transform: translateX(-100%);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }

    .filter-sidebar.show {
        transform: translateX(0);
    }

    .filter-header {
        border-radius: 0;
    }

    .filter-group {
        margin-bottom: 1rem;
    }

    .custom-select-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sort-label {
        margin-left: 0;
    }

    .custom-select {
        min-width: 100%;
    }

    .product-card {
        min-height: 400px;
    }
}

/* Mobile (below 576px) */
@media (max-width: 575px) {
    .top-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header {
        font-size: 1.75rem !important;
    }

    #products-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .price-inputs {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .product-card:hover .product-hover-details {
        max-height: 400px;
    }

    .product-card {
        min-height: 350px;
    }

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

/* ============ UTILITY CLASSES ============ */
.cursor-pointer {
    cursor: pointer;
}

.text-prime {
    color: var(--prime-color);
}

.main-bg {
    background-color: var(--prime-color) !important;
}

.second-text {
    color: var(--sec);
}



/* ============ SCROLLBAR STYLING ============ */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--prime-color);
}

/* ============ ANIMATION IMPROVEMENTS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ============ PRINT STYLES ============ */
@media print {
    .top-controls,
    .filter-sidebar,
    .filter-overlay {
        display: none;
    }
}
