/* ========================================
   PRODUCTS PAGE CSS
======================================== */

/* CSS Variables */
:root {
    --metallic-light: #D8DEE4;
    --metallic-mid: #8B98A8;
    --metallic-dark: #4A5A6A;
    --background-dark: #1F2B3A;
    --background-darker: #151E2A;
    --pure-white: #FFFFFF;
    --pure-black: #000000;
    --text-gray: #3A4A5A;
}

/* BREADCRUMB */
.breadcrumb-section {
    background: var(--metallic-light);
    padding: 15px 0;
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--metallic-mid);
}

.breadcrumb-item a {
    color: var(--metallic-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--background-darker);
}

.breadcrumb-item.active {
    color: var(--text-gray);
}

/* MAIN PAGE */
.products-page {
    background: var(--metallic-light);
    padding: 40px 0 80px;
}

/* SIDEBAR WRAPPER */
.sidebar-wrapper {
    position: relative;
    min-height: 500px;
}

.filter-toggle {
    width: 100%;
    padding: 15px;
    background: var(--metallic-dark);
    color: var(--pure-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: var(--background-darker);
}

.filters-wrapper {
    background: var(--pure-white);
    border-radius: 15px;
    padding: 0;
    padding-right: 5px;
    box-shadow: 0 2px 10px rgba(74, 90, 106, 0.15);
    position: relative;
    transition: none;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 120px);
}

/* Custom Scrollbar for Sidebar */
.filters-wrapper::-webkit-scrollbar {
    width: 8px;
}

.filters-wrapper::-webkit-scrollbar-track {
    background: var(--metallic-light);
    border-radius: 10px;
    margin: 10px 0;
}

.filters-wrapper::-webkit-scrollbar-thumb {
    background: var(--metallic-mid);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.filters-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--metallic-dark);
}

/* Firefox Scrollbar */
.filters-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--metallic-mid) var(--metallic-light);
}

/* Scrollbar hint effect */
.filters-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 15px 15px;
}

.filters-wrapper.has-scroll::after {
    opacity: 1;
}

.filter-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--metallic-light);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    color: var(--metallic-dark);
    font-size: 16px;
    transition: all 0.3s ease;
}

.filter-close:hover {
    background: var(--metallic-dark);
    color: var(--pure-white);
}

.filter-box {
    padding: 20px 25px;
    padding-right: 20px;
    border-bottom: 1px solid var(--metallic-light);
}

.filter-box:first-child {
    padding-top: 25px;
}

.filter-box:last-child {
    border-bottom: none;
    padding-bottom: 25px;
}

.filter-heading {
    background: var(--metallic-light);
    color: var(--pure-black);
    padding: 10px 15px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.filter-content {
    padding: 0;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--metallic-light);
    border-radius: 4px;
    font-size: 14px;
    background: var(--pure-white);
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    margin-bottom: 12px;
}

.filter-select:last-child {
    margin-bottom: 0;
}

.filter-select:focus {
    border-color: var(--metallic-dark);
}

.finder-form .filter-select {
    margin-bottom: 12px;
}

.price-input {
    width: 100% !important;
    padding: 10px 15px;
    border: 1px solid var(--metallic-light);
    border-radius: 4px;
    font-size: 14px;
    background: var(--pure-white);
    color: var(--text-gray);
    transition: all 0.3s ease;
    outline: none;
}

.price-input:focus {
    border-color: var(--metallic-dark);
}

.search-btn,
.apply-btn {
    width: 100%;
    padding: 12px;
    background: var(--metallic-dark);
    color: var(--pure-white);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-btn:hover,
.apply-btn:hover {
    background: var(--background-darker);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.price-input {
    width: auto;
    flex: 1;
}

.price-separator {
    color: var(--metallic-mid);
    font-weight: 700;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-gray);
}

.checkbox-label:hover {
    color: var(--pure-black);
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--metallic-dark);
}

.clear-filters-btn {
    width: 100%;
    padding: 12px;
    background: var(--metallic-light);
    color: var(--metallic-dark);
    border: 1px solid var(--metallic-mid);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clear-filters-btn:hover {
    background: var(--metallic-dark);
    color: var(--pure-white);
}

/* PAGE HEADER */
.page-header {
    background: var(--pure-white);
    border: 2px dashed var(--metallic-mid);
    border-radius: 40px;
    padding: 30px 40px;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-text {
    flex: 1;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--pure-black);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--metallic-dark);
    margin: 0;
}

.header-logo {
    flex-shrink: 0;
}

.logo-box {
    border: 2px solid var(--metallic-light);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-text {
    font-size: 20px;
    font-weight: 900;
    color: var(--metallic-dark);
    letter-spacing: 1px;
}

.read-more-section {
    margin-top: 15px;
}

.read-more-link {
    color: var(--background-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    color: var(--background-darker);
}

.expanded-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 15px;
}

.expanded-description p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 12px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
}

.feature-list li i {
    color: var(--metallic-dark);
    font-size: 14px;
}

/* PRODUCTS GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* PRODUCT CARD */
.product-card {
    background: var(--pure-white);
    border: 2px dashed var(--metallic-mid);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--metallic-dark);
    box-shadow: 0 8px 25px rgba(74, 90, 106, 0.2);
    transform: translateY(-5px);
}

.warranty-badge {
    background: var(--metallic-mid);
    color: var(--pure-white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

.brand-logo-small {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--pure-white);
    border: 1px solid var(--metallic-light);
    border-radius: 8px;
    padding: 5px 12px;
}

.brand-logo-small span {
    font-size: 12px;
    font-weight: 900;
    color: var(--metallic-dark);
    letter-spacing: 0.5px;
}

.product-image {
    background: linear-gradient(135deg, var(--metallic-light), var(--pure-white));
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    gap: 5px;
    font-size: 13px;
}

.detail-label {
    color: var(--text-gray);
    font-weight: 600;
}

.detail-value {
    color: var(--pure-black);
    font-weight: 400;
}

.product-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.product-rating i {
    color: var(--metallic-mid);
    font-size: 14px;
}

.discount-badge {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--background-darker);
    color: var(--pure-white);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.price-section {
    margin-bottom: 12px;
}

.current-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--background-darker);
    margin-bottom: 5px;
}

.mrp-price {
    font-size: 13px;
    color: var(--text-gray);
}

.strike {
    text-decoration: line-through;
}

.price-options {
    background: var(--metallic-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.price-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.price-option:last-child {
    margin-bottom: 0;
}

.price-option.with-old i {
    color: var(--metallic-dark);
    font-size: 16px;
}

.price-text {
    font-weight: 700;
    color: var(--pure-black);
}

.option-label {
    color: var(--text-gray);
}

.view-details-btn {
    background: var(--background-darker);
    color: var(--pure-white);
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: block;
}

.view-details-btn:hover {
    background: var(--background-dark);
    color: var(--pure-white);
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--metallic-dark);
    margin-top: auto;
}

.delivery-info i {
    font-size: 16px;
}

.delivery-info strong {
    color: var(--pure-black);
}

/* NO RESULTS */
.no-results {
    background: var(--pure-white);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(74, 90, 106, 0.1);
}

.no-results i {
    font-size: 64px;
    color: var(--metallic-mid);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 25px;
}

/* RESPONSIVE */
@media (max-width: 1199.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        margin-bottom: 30px;
        min-height: auto;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filters-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 320px !important;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999 !important;
        overflow-y: auto;
        transition: left 0.3s ease !important;
        border-radius: 0;
        padding-right: 0;
    }
    
    .filters-wrapper.active {
        left: 0 !important;
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    }
    
    .filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    body.filters-open {
        overflow: hidden;
    }
    
    body.filters-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-box {
        padding-right: 25px;
    }
}

@media (max-width: 767.98px) {
    .products-page {
        padding: 30px 0 60px;
    }
    
    .page-header {
        padding: 25px 30px;
        border-radius: 25px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .discount-badge {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        padding: 20px;
        border-radius: 20px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .logo-box {
        padding: 10px 20px;
    }
    
    .brand-logo-text {
        font-size: 16px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image {
        padding: 20px;
        min-height: 150px;
    }
    
    .product-title {
        font-size: 15px;
    }
    
    .current-price {
        font-size: 20px;
    }
    
    .filters-wrapper {
        width: 100% !important;
        max-width: 320px !important;
    }
}

@media (max-width: 400px) {
    .product-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-separator {
        display: none;
    }
}
