/* =================================================================== */
/*             COMPLETE STYLESHEET FOR THE SHOP PAGE                 */
/* =================================================================== */


/* --- 1. Page Title & Breadcrumb Area --- */
.plp-page-title-area { background-size: cover; background-position: center; padding: 60px 0; text-align: center; color: #fff; }
.plp-page-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.plp-breadcrumb .breadcrumb { background-color: transparent; justify-content: center; margin-bottom: 0; padding: 0; }
.plp-breadcrumb .breadcrumb-item { font-size: 0.9rem; }
.plp-breadcrumb .breadcrumb-item a { color: #f0f0f0; text-decoration: none; }
.plp-breadcrumb .breadcrumb-item.active { color: #fff; font-weight: 500; }
.plp-breadcrumb .breadcrumb-item+.breadcrumb-item::before { color: #f0f0f0; }

/* --- 2. Main Content & Sidebar General Styling --- */
.plp-main-content { background-color: #f7f8fa; }
.plp-sidebar .card-style-widget { border: 1px solid #e9ecef; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.04); background-color: #fff; overflow: hidden; }
.plp-sidebar .widget-content-wrapper { padding: 20px; }
.plp-sidebar .widget-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; position: relative; padding-bottom: 10px; color: #212529; }
.plp-sidebar .widget-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 3px; background-color: #0d6efd; border-radius: 2px; }

/* 
=================================
NEW: Unified Shop Controls Panel
=================================
*/
.shop-controls-panel {
  background-color: rgba(255, 255, 255, 0.75); /* Semi-transparent white background */
  backdrop-filter: blur(5px); /* Frosted glass effect for modern browsers */
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.plp-top-bar {
  padding: 0 !important;
  background: transparent !important;
}

/* --- 3. Category Accordion Styling --- */
.plp-sidebar .category-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.plp-sidebar .category-item { border-bottom: 1px solid #f0f0f0; }
.plp-sidebar .category-item:last-child { border-bottom: none; }
.plp-sidebar .category-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; text-decoration: none; color: #333; transition: color 0.2s, background-color 0.2s; cursor: pointer; }
.plp-sidebar .category-link:hover, .plp-sidebar .category-item.active > .category-link { color: #0d6efd; font-weight: 500; }
.plp-sidebar .subcategory-list { list-style: none; padding-left: 20px; display: none; margin-top: -5px; margin-bottom: 10px; background-color: #fafafa; border-top: 1px solid #f0f0f0; }
.plp-sidebar .subcategory-list a { display: block; padding: 8px 5px; text-decoration: none; color: #555; font-size: 0.9rem; }
.plp-sidebar .subcategory-list a:hover { color: #0d6efd; }

/* --- 4. Price Slider Styling --- */
.price-range-slider { height: 6px; }
.noUi-target { background: #e9ecef; border-radius: 4px; border: none; box-shadow: none; }
.noUi-connect { background: #0d6efd; }
.noUi-handle { height: 18px; width: 18px; top: -6px; right: -9px; border-radius: 50%; background: #fff; border: 2px solid #0d6efd; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: grab; }
.noUi-handle:focus { outline: none; }
.noUi-handle::before, .noUi-handle::after { display: none; }

/* =================================================================== */
/* --- 5. Generic Product Card V2 Styling (GRID VIEW - UPDATED) --- */
/* =================================================================== */
.product-card-v2 {
    background-color: #fff;
    border: 1px solid #dee2e6; /* Slightly darker border */
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.product-card-v2:hover {
    border-color: #0d6efd;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.product-card-v2-image-wrapper {
    position: relative;
    background-color: #f8f9fa; /* Light grey background for image area */
}
.product-card-v2-image {
    aspect-ratio: 1 / 1;
    object-fit: contain; /* Use contain to prevent cropping */
    width: 100%;
    padding: 1rem; /* Padding around the image inside its wrapper */
}
.product-card-v2-content {
    padding: 1rem; /* Consistent padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-details-wrapper {
    text-align: left; /* KEY CHANGE: Left-align all text */
    flex-grow: 1;
}
.product-card-v2-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.product-card-v2-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem;
}
.product-card-v2-title a:hover {
    color: #0d6efd;
}
.product-card-v2-rating {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* KEY CHANGE: Left-align rating */
    gap: 5px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}
.rating-badge {
    background-color: #28a745;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.rating-count {
    color: #6c757d;
}
.product-card-v2-price {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}
.original-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 8px;
}
.product-actions-wrapper {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.product-actions-wrapper .btn {
    border-radius: 6px; /* Slightly more rounded buttons */
}
.product-actions-wrapper .btn-primary {
    background-color: #eaf5ff;
    color: #0d6efd;
    border-color: #eaf5ff;
}
.product-actions-wrapper .btn-primary:hover {
    background-color: #d8ecff;
}
.product-actions-wrapper .btn-outline-secondary {
    border-color: #ced4da;
    color: #495057;
}
.product-actions-wrapper .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* --- 6. Bootstrap 5 Pagination Styles --- */
.pagination { display: flex; padding-left: 0; list-style: none; border-radius: .375rem; }
.page-link { position: relative; display: block; padding: .5rem .75rem; color: #0d6efd; text-decoration: none; background-color: #fff; border: 1px solid #dee2e6; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
.page-link:hover { z-index: 2; color: #0a58ca; background-color: #e9ecef; border-color: #dee2e6; }
.page-link:focus { z-index: 3; color: #0a58ca; background-color: #e9ecef; outline: 0; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.page-item:not(:first-child) .page-link { margin-left: -1px; }
.page-item.active .page-link { z-index: 3; color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.page-item.disabled .page-link { color: #6c757d; pointer-events: none; background-color: #fff; border-color: #dee2e6; }
.page-item:first-child .page-link { border-top-left-radius: .375rem; border-bottom-left-radius: .375rem; }
.page-item:last-child .page-link { border-top-right-radius: .375rem; border-bottom-right-radius: .375rem; }

/* --- 7. Recent Products Widget Styling (Sidebar) --- */
.recent-product-list { margin: 0; padding: 0; list-style: none; }
.recent-product-item { display: flex; align-items: center; gap: 15px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #e9ecef; }
.recent-product-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.recent-product-image-link img { width: 65px; height: 65px; object-fit: cover; border-radius: 5px; border: 1px solid #e9ecef; flex-shrink: 0; }
.recent-product-info { flex-grow: 1; }
.recent-product-title a { font-size: 0.9rem; font-weight: 500; color: #333; text-decoration: none; line-height: 1.3; display: block; }
.recent-product-title a:hover { color: #0d6efd; }
.recent-product-price { margin: 4px 0; }
.recent-product-price .current-price { font-size: 1rem; font-weight: 700; color: #0d6efd; }
.recent-product-price .original-price { font-size: 0.85rem; color: #6c757d; text-decoration: line-through; margin-left: 8px; }
.recent-product-rating { font-size: 0.85rem; color: #6c757d; display: flex; align-items: center; }
.recent-product-rating .fa-star { color: #ffc107; margin-right: 4px; }

/* =================================================================== */
/* --- 8. LIST VIEW STYLING (DEFINITIVE FIX FOR WIREFRAME IMAGE) --- */
/* =================================================================== */
.product-card-v2-description { display: none; }
#productListingGrid.list-view-active .product-card-v2 { flex-direction: row; align-items: center; padding: 1.5rem; gap: 1.5rem; transform: none !important; border-color: #dee2e6; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
#productListingGrid.list-view-active .product-card-v2-image-wrapper { flex: 0 0 150px; height: 150px; }
#productListingGrid.list-view-active .product-card-v2-image { aspect-ratio: 1/1; height: 100%; }
#productListingGrid.list-view-active .product-card-v2-content { flex-direction: row; justify-content: space-between; align-items: center; flex-grow: 1; padding: 0; gap: 1.5rem; }
#productListingGrid.list-view-active .product-details-wrapper { flex-grow: 1; min-width: 0; text-align: left; }
#productListingGrid.list-view-active .product-card-v2-description { display: -webkit-box; font-size: 0.9rem; color: #6c757d; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.5rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#productListingGrid.list-view-active .product-actions-wrapper { flex: 0 0 180px; margin: 0; }

/* --- 9. PRICE INPUT FIELDS STYLING (SIDEBAR) --- */
.price-input-group { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 1rem; }
.price-input-separator { color: #adb5bd; font-weight: 500; }
.price-input-wrapper { position: relative; flex-grow: 1; }
.price-input-currency { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: #6c757d; font-size: 0.9rem; pointer-events: none; }
.price-input { width: 100%; border: 1px solid #ced4da; border-radius: 6px; padding: 8px 12px 8px 28px; font-size: 0.9rem; font-weight: 500; -moz-appearance: textfield; }
.price-input:focus { outline: none; border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.price-input::-webkit-outer-spin-button, .price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- 10. PRODUCT BADGES STYLING (ON-CARD) --- */
.product-card-v2-badges { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; gap: 5px; }
.badge-v2 { display: inline-block; padding: 4px 10px; font-size: 0.75rem; font-weight: 600; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.375rem; }
.badge-discount { background-color: #dc3545; color: #fff; }
.badge-verified-seller { background-color: #0d6efd; color: #fff; }

/*
=================================
11. MODIFIED: Active Filter Badges Styling
=================================
*/
.active-filters-area {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #e9ecef;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0d6efd;
    background-color: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 20px;
    white-space: nowrap;
}

.remove-filter-btn {
    border: none;
    background: none;
    color: #0d6efd;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
    margin-left: 8px;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}

.remove-filter-btn:hover {
    opacity: 1;
}