
/* -------------------------
   GLOBAL SECTION
-------------------------- */


.shopify-section {
    padding: 50px 0;
    background: #fff;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

/* -------------------------
   SIDEBAR FILTER SECTION
-------------------------- */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e3e3e3;
}

.filter-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.clear-filters {
    background: none;
    border: none;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-filters:hover {
    color: #ff5252;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #e3e3e3;
    padding-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

.filter-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

.filter-toggle {
    transition: transform 0.3s ease;
}

.filter-toggle.rotated {
    transform: rotate(180deg);
}

.filter-options {
 max-height: none; /* or remove this line */
    overflow: visible;
}

.filter-options.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

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

.filter-option input {
    margin-right: 10px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
}

.filter-option:hover label {
    color: #000;
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.price-slider {
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    position: relative;
    margin-top: 10px;
}

.price-slider .progress {
    height: 100%;
    left: 0;
    right: 0;
    background: #ff5252;
    border-radius: 5px;
    position: absolute;
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    top: -5px;
    height: 5px;
    width: 100%;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    height: 17px;
    width: 17px;
    border-radius: 50%;
    background: #ff5252;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    height: 17px;
    width: 17px;
    border-radius: 50%;
    background: #ff5252;
    pointer-events: auto;
    border: none;
    cursor: pointer;
}

/* -------------------------
   PRODUCT GRID
-------------------------- */
.product-grid-container {
    flex: 1;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-count {
    font-size: 14px;
    color: #777;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* -------------------------
   PRODUCT CARD
-------------------------- */
.product-card {
    padding: 0;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    overflow: hidden;
        transform: translateY(0);
    transition: all 0.3s ease;
}


.product-card.hidden {
    opacity: 0;
    transform: translateY(10px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

/* IMAGE WRAPPER */
.product-img-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
  
}

.product-img-wrapper img {
    width: 100%;
   
    display: block;
    transition: opacity .35s ease, transform .35s ease;
}
.product-card .product-title,
.product-card .rating,
.product-card .reviews,
.product-card .price-box {
    padding: 0 15px;
}

/* HOVER IMAGE */
.product-img-wrapper img.hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* ON HOVER → second image show */
.product-card:hover .hover-img {
    opacity: 1;
    transform: scale(1.05);
}
.product-card:hover .main-img {
    opacity: 0;
}

/* -------------------------
   BADGE
-------------------------- */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fff;
    color: #f52626ff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    z-index: 5;
}

/* -------------------------
   TEXT CONTENT
-------------------------- */
.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0 8px;
}

.rating {
    color: #ffc106;
    font-size: 14px;
}

.rating-number {
    margin-left: 5px;
    font-weight: 600;
    color: #444;
}

.reviews {
    font-size: 13px;
    margin-top: 5px;
    color: #777;
}

.price-box {
    margin-top: 12px;
}

.new-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    margin-left: 8px;
}

/* -------------------------
   MOBILE FILTER TOGGLE
-------------------------- */
.mobile-filter-toggle {
    display: none;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* -------------------------
   RESPONSIVE
-------------------------- */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-sidebar {
        width: 250px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .filter-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .filter-sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
    
    .close-sidebar {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #333;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        min-height: auto;
        padding-bottom: 10px;
    }
    
    .product-title {
        font-size: 14px;
        line-height: 1.3;
        margin: 10px 0 6px;
        min-height: 36px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .rating {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    .reviews {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .price-box {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
        margin-top: auto;
        padding-bottom: 5px;
    }
    
    .new-price {
        font-size: 14px;
        font-weight: 700;
    }
    
    .old-price {
        font-size: 11px;
        margin-left: 0;
    }
    
    .product-card .product-title,
    .product-card .rating,
    .product-card .reviews,
    .product-card .price-box {
        padding: 0 10px;
    }
    
    .product-img-wrapper {
        height: 180px;
    }
    
    .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-options select {
        flex: 1;
    }
}

/* Additional fix for very small screens */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-title {
        font-size: 15px;
        min-height: auto;
    }
    
    .price-box {
        justify-content: space-between;
        width: 100%;
    }
}

