/* PRODUCTS PAGE STYLES - RESTORED & OPTIMIZED */

/* Shop Offcanvas - Sticky Sidebar */
.shop-offcanvas-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
}

.shop-offcanvas-left {
    position: -webkit-sticky;
    position: sticky;
    top: 160px;
    z-index: 80;
    width: 300px;
    flex-shrink: 0;
    align-self: flex-start;
    height: fit-content;
}

@media (max-width: 991px) {
    .shop-offcanvas-left {
        display: none;
    }

    .shop-offcanvas-container {
        display: block;
    }
}

/* Filter Sidebar */
.filter-sidebar {
    background: #fff;
    padding-right: 10px;
    padding-left: 80px;
    height: 100%;
}

.filter-main-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
}

.filter-widget {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.filter-widget:last-child {
    border-bottom: none;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-title i {
    font-size: 12px;
    transition: transform 0.3s;
}

.widget-title[aria-expanded="false"] i {
    transform: rotate(180deg);
}

.widget-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Checkbox */
.custom-check-row {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    font-size: 15px;
    color: #333;
}

.custom-check-row input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-check-row .checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.custom-check-row input:checked~.checkmark {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

.custom-check-row .checkmark:after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-check-row input:checked~.checkmark:after {
    display: block;
}

.custom-check-row:hover .checkmark {
    border-color: #d32f2f;
}

/* Price Slider */
.price-slider-wrapper {
    padding: 10px 5px;
}

#price-slider-range,
#mobile-price-slider-range {
    height: 4px;
    background: #e0e0e0;
    border: none;
    margin-bottom: 20px;
}

#price-slider-range .ui-slider-range,
#mobile-price-slider-range .ui-slider-range {
    background: #d32f2f;
}

#price-slider-range .ui-slider-handle,
#mobile-price-slider-range .ui-slider-handle {
    background: #d32f2f;
    border: 2px solid #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: -6px;
    cursor: grab;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.price-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price-values .separator {
    color: #999;
}

.price-values .field {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.price-values input {
    width: 50px;
    border: none;
    background: transparent;
    outline: none;
    font-weight: 600;
    text-align: right;
    color: #333;
}

.price-values span {
    color: #666;
    margin-right: 4px;
}

/* Products Header & Sort */
.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

.products-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-wrapper label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.sort-select {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232d6a4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    min-width: 150px;
}

.sort-select:hover {
    border-color: #2d6a4f;
}

.sort-select:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.sort-select option {
    padding: 12px 16px;
    background: #fff;
    color: #333;
    font-weight: 500;
}

.sort-select option:checked,
.sort-select option:hover {
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    color: #fff;
}

/* Custom Dropdown */
.custom-dropdown-wrapper {
    position: relative;
    width: 220px;
    font-family: inherit;
    z-index: 101;
}

.custom-dropdown-trigger {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.custom-dropdown-trigger:hover,
.custom-dropdown-wrapper.active .custom-dropdown-trigger {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.custom-dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-dropdown-wrapper.active .custom-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.custom-option:hover {
    background: #f8f9fa;
    color: #2d6a4f;
}

.custom-option.selected {
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    color: #fff;
}

/* Product Grid Card */
.product-grid-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
}

.product-grid-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-grid-card .img {
    position: relative;
    background: linear-gradient(to bottom, #ffffff 65%, #FF5722 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.product-grid-card .img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

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

.product-grid-card .badge-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    background: #FF5722;
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-grid-card .content-wrap {
    padding: 20px;
}

.product-grid-card .content-wrap h4 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    line-height: 1.3;
}

.product-grid-card .content-wrap .desc-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.product-grid-card .rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.product-grid-card .rating-row .stars {
    color: #FFC107;
    font-size: 14px;
    letter-spacing: 1px;
}

.product-grid-card .rating-row .review-count {
    font-size: 13px;
    color: #999;
}

.product-grid-card .card-footer-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 5px;
}

.product-grid-card .price-block {
    display: flex;
    flex-direction: column;
}

.product-grid-card .price-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.product-grid-card .price-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-grid-card .old-price {
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}

.product-grid-card .current-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a4d2e;
}

.product-grid-card .btn-add-cart {
    background: #FFE135;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.product-grid-card .btn-add-cart:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.modern-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.modern-pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e9ecef;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modern-pagination a:hover {
    border-color: #2d6a4f;
    color: #2d6a4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-pagination a.active {
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    border-color: #2d6a4f;
    color: #fff;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.modern-pagination a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.modern-pagination a i {
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    body {
        padding-bottom: 80px;
    }

    .product-grid-card {
        display: flex;
        flex-direction: row;
        height: auto;
        min-height: 160px;
        align-items: stretch;
        margin-bottom: 15px;
        opacity: 1 !important;
    }

    .product-grid-card .img {
        width: 45%;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-size: cover;
    }

    .product-grid-card .img img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
    }

    .product-grid-card .badge-tag {
        position: absolute;
        top: 10px;
        left: 10px;
        right: auto;
        background: #FF5722;
        color: #fff;
        padding: 4px 12px;
        border-radius: 50px;
        font-size: 11px;
        font-weight: 600;
        z-index: 5;
    }

    .product-grid-card .content-wrap {
        width: 55%;
        /* padding: 12px; */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
    }

    .product-grid-card .rating-row {
        order: -1;
        margin-bottom: 4px;
        width: 100%;
        /* justify-content: flex-end; */
    }

    .product-grid-card .rating-row .stars {
        font-size: 12px;
    }

    .product-grid-card .content-wrap h4 {
        font-size: 14px;
        margin-bottom: 4px;
        white-space: normal;
        line-height: 1.2;
    }

    .product-grid-card .content-wrap .desc-text {
        font-size: 11px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-grid-card .card-footer-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 8px;
    }

    .product-grid-card .price-block {
        width: 100%;
    }

    .product-grid-card .price-values {
        gap: 5px;
        align-items: baseline;
        justify-content: flex-start;
    }

    .product-grid-card .price-label {
        display: block;
        font-size: 10px;
        color: #999;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .product-grid-card .current-price {
        font-size: 16px;
    }

    .product-grid-card .old-price {
        font-size: 12px;
    }

    .product-grid-card .btn-add-cart {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
        margin-top: 5px;
        text-align: center;
        flex-shrink: 0;
    }
}

/* Mobile Filter Extras */
.mobile-filter-bar {
    position: -webkit-sticky;
    position: sticky;
    top: 60px;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1;
    padding: 8px 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.mobile-filter-bar__btn {
    flex: 1;
    border: none;
    background: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mobile-filter-bar__divider {
    width: 1px;
    height: 20px;
    background: #ccc;
}

.mobile-filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-filter-drawer.active {
    transform: translateX(0);
}

.mobile-filter-drawer__header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-filter-drawer__back {
    border: none;
    background: none;
    font-size: 18px;
}

.mobile-filter-drawer__title {
    font-weight: 700;
    font-size: 16px;
}

.mobile-filter-drawer__body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.mobile-filter-drawer__footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.mobile-filter-section {
    margin-bottom: 25px;
}

.mobile-filter-section__title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 15px;
}

.mobile-filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.mobile-filter-input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.mobile-filter-option__checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filter-input:checked+.mobile-filter-option__checkmark {
    background: #d32f2f;
    border-color: #d32f2f;
}

.mobile-filter-input:checked+.mobile-filter-option__checkmark::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.mobile-filter-option__text {
    font-size: 14px;
    color: #333;
}