.category-list-page {
    background-color: #f7f7f7;
    min-height: 80vh;
    font-size: 14px;
}

/* Filter panel */
.filter-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-block + .filter-block {
    margin-top: 18px;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.price-range-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.price-range {
    width: 100%;
}

/* checkboxes */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    cursor: pointer;
}
.filter-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
}
.filter-checkbox .count {
    margin-left: auto;
    color: #9ca3af;
}

/* view switch */
.view-switch {
    display: inline-flex;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.view-switch .view-btn {
    border: none;
    background: #fff;
    width: 34px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.view-switch .view-btn.active {
    background: #111827;
    color: #fff;
}

.sort-select {
    min-width: 220px;
}

/* Product cards */
.products-grid {
    margin-top: 8px;
    width: 1400px;
}

.product-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    padding: 10px 10px 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #f9fafb;
}

.product-image-wrap img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.product-image-wrap:hover img {
    transform: scale(1.04);
}

/* badges */
.badge-pill {
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
}
.badge-new {
    background-color: #16a34a;
}
.badge-oos {
    background-color: #f97316;
    top: auto;
    bottom: 8px;
}

/* body */
.product-body {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
}
.product-rating .stars {
    color: #facc15;
}
.product-rating .count {
    font-size: 0.75rem;
}

.product-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
    min-height: 2.3em;
}
.product-title:hover {
    text-decoration: underline;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #059669;
}

.product-add-btn {
    font-size: 0.8rem;
    border-radius: 999px;
    margin-top: 4px;
}
/* 1. Core Structure and Overlays (As defined previously) */
.hp-card {
    height: 400px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.hp-card__image-overlay-container {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px; 
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
}

.hp-card__product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-card__gradient-overlay {
    /* ... (Use the gradient from the previous answer) ... */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, rgb(0 131 90 / 0%) 0%, rgb(0 131 90 / 54%) 70%, rgb(0 131 90 / 79%) 100%);
    z-index: 2;
    backdrop-filter: blur(5.2px);
}

.hp-card__content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 3; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to the left inside the overlay */
    text-align: left;
}

/* 2. Styling the Price Wrapper */
.hp-card__price-wrapper-overlay {
    display: flex;
    flex-direction: column; /* Stack prices and badges vertically */
    align-items: flex-start;
    width: 100%;
    margin-bottom: 10px;
}

/* 3. Styling the Main Display Price (The bold $256) */
.hp-card__price-display-main {
    font-size: 1em; /* Very large price */
    font-weight: 700;
    color: white; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1;
    order: 1; /* Make sure the main price is displayed first (on top) */
}

/* 4. Styling the Title */
.hp-card__title-display {
    font-size: 1.2em;
    font-weight: 500;
    color: white; 
    margin-bottom: 5px;
    line-height: 1.2;
    width: 100%;
    text-align: left;
    order: 2; /* Position title below price */
}

/* 5. Styling the Old Price and Badges (Kept small and subtle) */
.hp-card__price--old {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7); /* Subtle white */
    text-decoration: line-through;
    order: 3; /* Position old price below the main price */
    margin-top: 5px;
}

.hp-card__promo-badge {
    font-size: 0.7em;
    background: #ff5e5e; /* Red color for promo */
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 5px;
    order: 4; /* Position badge at the bottom */
}

/* 6. Buy Now Button (The dark pill shape) */
.add-to-cart-form-overlay ,.add-to-cart-form {
    width: 100%;
    order: 3; 
    margin: 0px;
}

.hp-card__buy-btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 14px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    background-color: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(8px); 
    cursor: pointer;
    transition: background-color 0.2s;
}
.hp-card__buy-btn:hover {
    background: #dfdfdf94;
    transform: translateY(-1px);
}
/* السلايد نفسه عنده ارتفاع ثابت */
.hp-swiper .swiper-slide {
    height: 320px;        /* ارتفاع الكارت على الديسكتوب */
}

/* الكارت يملأ السلايد بالكامل */
.hp-card,
.hp-card__image-overlay-container {
    height: 100%;
}

/* الصورة تملأ مساحة الكارت */
.hp-card__product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* تقصّ من الصورة لكن تحافظ على التناسب */
    display: block;
}



/* محتوى النص والأزرار في الأسفل */
.hp-card__content-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}
@media (max-width: 1024px) {
    .hp-swiper .swiper-slide {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .hp-swiper .swiper-slide {
        height: 240px;
    }
    .home-sidebar{display: none;}
    .home-container{grid-template-columns: minmax(0, 1fr);}
}
/* Responsive adjustments */
@media (max-width: 991.98px) {
    .filter-panel {
        margin-bottom: 16px;
    }
}

@media (max-width: 575.98px) {
    .product-image-wrap img {
        height: 150px;
    }
}
