.product-list-page .products-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px; /* Space between cards */
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-list-page .product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 450px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; /* Ensure correct positioning of the icon */
}

.product-list-page .favorite-icon-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.favorite-icon {
    display: block; /* Ensure the icon is always visible */
    width: 30px; /* Adjust size as needed */
    height: 30px; /* Adjust size as needed */
    object-fit: contain;
}


/* Removing hover effect from favorite icon */
.product-list-page .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}



.product-list-page .product-image-container {
    flex-grow: 1; /* Allow the image to take up available space */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Ensure full width */
    height: 70%; /* Adjust height for the image container */
    overflow: hidden; /* Ensure no overflow */
}

.product-list-page .product-image-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.product-list-page .product-details {
    padding: 10px;
}


.big-product-name {
    font-size: 18px;
    font-weight: bold;
    color: black;
    text-align: center;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    display: block;
    line-height: 1.3;
    height: auto;
}



.product-list-page .products-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.product-list-page .product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 450px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.product-list-page .favorite-icon-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}
.favorite-icon {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.product-list-page .product-image-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 70%;
    overflow: hidden;
}
.product-list-page .product-image-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.product-list-page .product-details {
    padding: 10px;
}

/* Container for the product card */
.product-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.product-card .product-icons {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Show icons on hover */
.product-card:hover .product-icons {
    opacity: 1;
}

/* Icon styles */
.product-icons a {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

/* Change icon background on hover */
.product-icons a:hover {
    background: #007bff;
    color: white;
}

/* Icon images */
.product-icons img {
    width: 20px;
    height: 20px;
}
.product-icons {
position: absolute;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 10px;
opacity: 0;
transition: opacity 0.3s ease-in-out;
 }

.product-card:hover .product-icons {
    opacity: 1;
}

.product-icons i {
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-icons i:hover {
    color: #ff6600;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}
.pagination li {
    display: inline;
}
.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.pagination .active span {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.ai-suggestion {
    margin-top: 12px;
    padding: 10px;
    background: #eef4ff;
    border-left: 4px solid #4a90e2;
    font-style: italic;
    color: #222;
    border-radius: 4px;
}
.ai-suggestion a {
    color: #007bff;
    text-decoration: underline;
}
  /* ── Variables ── */
  :root {
    --teal:       #1a6b5c;
    --teal-light: #22897a;
    --teal-bg:    #f0f7f5;
    --accent:     #e84c3d;
    --text:       #1c2b2a;
    --muted:      #6b7c7a;
    --border:     #d4e4e1;
    --card-bg:    #ffffff;
    --sidebar-w:  270px;
    --radius:     10px;
    --shadow:     0 2px 12px rgba(26,107,92,.08);
    --shadow-hover: 0 8px 28px rgba(26,107,92,.16);
    --font-body:  'Nunito', 'Segoe UI', sans-serif;
    --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  }
  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

  * { box-sizing: border-box; }

  body { font-family: var(--font-body); color: var(--text); background: #f4f8f7; }

  /* ── Layout Shell ── */
  .mp-shell {
    display: flex;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    align-items: flex-start;
  }

  /* ══════════════════════════════════
     SIDEBAR
  ══════════════════════════════════ */
  .mp-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .mp-sidebar::-webkit-scrollbar { width: 4px; }
  .mp-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 2;
  }
  .sidebar-header h3 {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--teal);
    margin: 0;
  }
  .sidebar-clear-btn {
    font-size: .75rem;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
  }
  .sidebar-clear-btn:hover { background: var(--teal-bg); color: var(--teal); }

  /* Filter group */
  .filter-group {
    border-bottom: 1px solid var(--border);
  }
  .filter-group:last-child { border-bottom: none; }

  .filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text);
    text-align: left;
    transition: background .15s;
  }
  .filter-toggle:hover { background: var(--teal-bg); }
  .filter-toggle .chevron {
    font-size: .65rem;
    color: var(--muted);
    transition: transform .25s;
  }
  .filter-toggle.open .chevron { transform: rotate(180deg); }

  .filter-body {
    padding: 0 20px 14px;
    display: none;
    flex-direction: column;
    gap: 6px;
  }
  .filter-body.open { display: flex; }

  /* Checkbox items */
  .check-item {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .12s;
  }
  .check-item:hover { background: var(--teal-bg); }
  .check-item input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--teal);
    cursor: pointer;
    flex-shrink: 0;
  }
  .check-item label {
    font-size: .85rem;
    color: var(--text);
    cursor: pointer;
    flex: 1;
    line-height: 1.3;
  }
  .check-count {
    font-size: .7rem;
    color: var(--muted);
    background: #eef4f2;
    padding: 1px 6px;
    border-radius: 20px;
  }

  /* Price range */
  .price-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
  }
  .price-inputs input {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .82rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color .15s;
    background: #fafffe;
  }
  .price-inputs input:focus { border-color: var(--teal); }
  .price-sep { color: var(--muted); font-size: .8rem; }

  .apply-price-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
  }
  .apply-price-btn:hover { background: var(--teal-light); }

  /* Stock toggle */
  .stock-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
  }
  .toggle-switch {
    position: relative;
    width: 38px; height: 20px;
    flex-shrink: 0;
  }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; inset: 0;
    background: #cdd8d6;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s;
  }
  .toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
  }
  .toggle-switch input:checked + .toggle-slider { background: var(--teal); }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
  .stock-label { font-size: .84rem; color: var(--text); cursor: pointer; }

  /* ══════════════════════════════════
     MAIN CONTENT
  ══════════════════════════════════ */
  .mp-main { flex: 1; min-width: 0; }

  /* Toolbar */
  .mp-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
  }
  .search-wrap .search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1rem;
    pointer-events: none;
  }
  .search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .9rem;
    font-family: var(--font-body);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .search-wrap input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26,107,92,.1);
  }

  .sort-select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .85rem;
    font-family: var(--font-body);
    background: #fff;
    color: var(--text);
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
    min-width: 180px;
  }
  .sort-select:focus { border-color: var(--teal); }

  /* Result meta */
  .result-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .result-count {
    font-size: .85rem;
    color: var(--muted);
  }
  .result-count strong { color: var(--teal); font-weight: 700; }

  /* AI suggestion */
  .ai-suggestion {
    display: none;
    background: linear-gradient(135deg, #e8f5f2, #d4ede8);
    border: 1px solid #b8ddd6;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .85rem;
    color: var(--text);
    margin-bottom: 16px;
    gap: 8px;
    align-items: center;
  }
  .ai-suggestion.visible { display: flex; }
  .ai-suggestion a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
  }

  /* Pagination */
  .pagination-wrap {
    margin-bottom: 20px;
  }
  .pagination-wrap ul {
    display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap;
  }
  .pagination-wrap li a,
  .pagination-wrap li span {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
  }
  .pagination-wrap li a:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-bg); }
  .pagination-wrap li span.active {
    background: var(--teal); color: #fff; border-color: var(--teal);
  }

  /* ── Product Grid ── */
  .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
  }

  .product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    transition: transform .22s, box-shadow .22s;
    display: flex;
    flex-direction: column;
    border: 1.5px solid transparent;
  }
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--teal-bg);
  }

  /* Favorite */
  .fav-btn {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 3;
    background: rgba(255,255,255,.9);
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: background .15s, transform .15s;
  }
  .fav-btn:hover { background: #fff; transform: scale(1.12); }
  .fav-btn img { width: 18px; height: 18px; object-fit: contain; }

  /* Image area */
  .card-img-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8fcfb;
    position: relative;
  }
  .card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform .3s;
  }
  .product-card:hover .card-img-wrap img { transform: scale(1.05); }

  /* Stock badge */
  .stock-badge {
    position: absolute;
    bottom: 8px; left: 8px;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .stock-badge.in-stock { background: #d4f0e8; color: #0e7a52; }
  .stock-badge.low-stock { background: #fff3cd; color: #856404; }
  .stock-badge.out-stock { background: #fde8e8; color: #c0392b; }

  /* Card body */
  .card-body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .card-brand {
    font-size: .7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
  }
  .card-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-price {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--teal);
    margin-top: auto;
    padding-top: 8px;
  }

  /* Add to cart */
  .add-to-cart-form { margin-top: 8px; }
  .cart-btn {
    width: 100%;
    padding: 9px 0;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .83rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .02em;
  }
  .cart-btn:hover { background: var(--teal-light); }
  .cart-btn:active { transform: scale(.97); }
  .cart-btn.in-cart {
    background: #e8f5f2;
    color: var(--teal);
    border: 1.5px solid var(--teal);
  }
  .unavailable-tag {
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    padding: 9px 0;
    font-style: italic;
  }

  /* Empty state */
  .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
  }
  .empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
  .empty-state p { font-size: 1rem; }

  /* Active filter chips */
  .active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
  }
  .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--teal-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--teal);
    cursor: pointer;
    transition: background .12s;
  }
  .filter-chip:hover { background: #cde8e2; }
  .filter-chip .chip-x { font-size: .8rem; line-height: 1; }

  /* Mobile filter button */
  .mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    position: relative;
  }
  .mobile-filter-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 9998;
  }
  .mp-sidebar.mobile-open { display: flex !important; flex-direction: column; }

  @media (max-width: 900px) {
    .mp-sidebar {
      display: none;
      position: fixed;
      top: 0; left: 0; bottom: 0;
      width: 290px;
      z-index: 9999;
      border-radius: 0;
      max-height: 100vh;
      padding-top: 16px;
    }
    .mp-sidebar.mobile-open {
      display: flex !important;
      flex-direction: column;
      top: 0 !important;
    }
    .mobile-filter-btn { display: flex; }
    .mobile-filter-overlay.visible { display: block; }
  }
  @media (max-width: 600px) {
    .mp-toolbar { flex-direction: column; align-items: stretch; }
    .sort-select { min-width: unset; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  }
.own-product {
    background: #fdecea !important;
    color: #8b1e1e !important;
    font-weight: 700;
    cursor: not-allowed;
}