/* ===== CATEGORY PAGE STYLES (with real product images) ===== */

.cat-main {
  padding-top: 10px;
  padding-bottom: calc(var(--bnav-h) + 16px);
}
.cat-main:has(.app-footer-custom) {
  padding-bottom: 0;
}

/* ──────────── BREADCRUMB ──────────── */
.cat-breadcrumb {
  font-family: var(--font);
  padding: 10px 16px;
  margin: 12px 14px 4px;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.25s ease;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.breadcrumb-item {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.breadcrumb-home-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.breadcrumb-item a:hover {
  color: var(--green);
}
.breadcrumb-item a:hover .breadcrumb-home-icon {
  color: var(--green);
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "\f104"; /* FontAwesome chevron-left */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.65rem;
  color: var(--text-light);
  margin-inline-end: 8px;
  margin-inline-start: 2px;
}
.breadcrumb-item.active {
  color: var(--green);
  font-weight: 800;
}

/* ──────────── SEARCH & NAVIGATION GROUP ──────────── */
.search-nav-group {
  background: var(--white);
  margin: 10px 14px 14px;
  padding: 16px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: margin 0.2s, padding 0.2s;
}

/* ──────────── SEARCH ──────────── */
.cat-search-wrap {
  background: transparent;
  padding: 0;
}
.ai-search-bar {
  display: flex; 
  align-items: center; 
  gap: 12px;
  background: var(--white);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  padding: 6px 6px 6px 16px;
  box-shadow: 0 4px 20px rgba(120, 104, 242, 0.08), 0 0 0 1.5px rgba(120, 104, 242, 0.12);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html[dir="rtl"] .ai-search-bar {
  padding: 6px 16px 6px 6px;
}
.ai-search-bar:focus-within {
  box-shadow: 0 6px 24px rgba(120, 104, 242, 0.16), 0 0 0 3px rgba(120, 104, 242, 0.2);
  border-color: #7868f2;
}
.ai-search-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(43, 198, 210, 0.15), rgba(120, 104, 242, 0.15));
  border-radius: 50%;
  color: #7868f2;
  flex-shrink: 0;
}
.ai-search-robot-icon {
  font-size: 1rem;
  background: linear-gradient(135deg, #2bc6d2, #7868f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ai-pulse-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background-color: #2bc6d2;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  animation: aiPulse 2s infinite;
}
@keyframes aiPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(43, 198, 210, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(43, 198, 210, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(43, 198, 210, 0);
  }
}
.cat-search-input {
  border: none; 
  background: transparent;
  font-family: var(--font); 
  font-size: 0.88rem; 
  color: var(--text);
  width: 100%; 
  outline: none; 
  direction: rtl;
  font-weight: 600;
}
.cat-search-input::placeholder { 
  color: var(--text-light); 
  font-weight: 500;
}
.ai-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2bc6d2, #7868f2);
  color: var(--white);
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(120, 104, 242, 0.25);
  white-space: nowrap;
}
.ai-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(120, 104, 242, 0.4);
  background: linear-gradient(135deg, #32d5e2, #8575f5);
}
.ai-search-btn:active {
  transform: translateY(0);
}
.ai-search-btn i {
  font-size: 0.85rem;
}
@media (max-width: 480px) {
  .ai-search-btn span {
    display: none;
  }
  .ai-search-btn {
    padding: 8px 12px;
  }
}

/* ──────────── SUBCATEGORY GRID ──────────── */
.subcat-grid-wrap {
  position: relative;
  margin-top: 16px;
  padding: 20px 18px 12px;
  background:
    radial-gradient(circle at top right, rgba(46, 125, 50, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 249, 252, 0.98) 100%);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 28px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.subcat-grid-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(17, 147, 74, 0.9), rgba(114, 193, 121, 0.45), transparent 75%);
}
.subcat-grid {
  display: grid; 
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 14px;
  padding: 8px 0 12px;
  width: 100%;
}
@media (min-width: 768px) {
  .subcat-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 22px 18px;
  }
}
@media (max-width: 767px) {
  .subcat-grid-wrap {
    padding: 14px 10px 8px;
    border-radius: 22px;
  }
  .subcat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 0 6px;
  }
  .subcat-item {
    gap: 7px;
    padding: 10px 4px 10px;
    border-radius: 18px;
    min-height: 124px;
  }
  .subcat-item span {
    font-size: 0.62rem;
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 92%;
  }
  .subcat-icon {
    width: 40px;
    height: 40px;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.75),
      0 6px 14px rgba(15, 23, 42, 0.06);
  }
  .subcat-icon::before {
    inset: 3px;
  }
  .subcat-icon i {
    font-size: 0.82rem;
  }
  .subcat-item.active .subcat-icon {
    transform: translateY(-1px) scale(1.01);
  }
}
@media (max-width: 420px) {
  .subcat-grid {
    gap: 8px;
  }
  .subcat-item {
    min-height: 116px;
    padding: 9px 3px 9px;
  }
  .subcat-item span {
    font-size: 0.58rem;
    font-weight: 500;
  }
  .subcat-icon {
    width: 36px;
    height: 36px;
  }
  .subcat-icon i {
    font-size: 0.76rem;
  }
}
.subcat-item {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 12px;
  cursor: pointer; 
  position: relative;
  padding: 14px 10px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(247,250,252,0.94) 100%);
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 24px;
  font-family: var(--font); 
  min-width: 0;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.subcat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 214, 227, 0.98);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}
.subcat-item span {
  font-size: 0.84rem; 
  font-weight: 800; 
  color: #4f5d70;
  white-space: normal; 
  text-align: center;
  line-height: 1.35;
  transition: color 0.18s;
  display: block;
  max-width: 100%;
  text-decoration: none;
  text-wrap: balance;
}
.subcat-item.active span { 
  color: var(--green); 
}
.subcat-icon {
  width: 68px; 
  height: 68px; 
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 12px 24px rgba(15, 23, 42, 0.08);
  transition: background-color 0.18s, box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.subcat-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.48), transparent 60%);
  pointer-events: none;
}
.subcat-icon i {
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}
/* Individual subcat styles matching image filled tint colors */
.subcat-item[data-sub="all"] .subcat-icon {
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
  border: 1px solid rgba(213, 221, 230, 0.95);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}
.subcat-item[data-sub="all"].active .subcat-icon {
  background: linear-gradient(135deg, #11934a 0%, #0b7a3c 100%);
  border-color: rgba(17, 147, 74, 0.2);
}
.subcat-item[data-sub="all"] .subcat-icon i {
  color: var(--green);
}
.subcat-item[data-sub="all"].active .subcat-icon i {
  color: var(--white);
}

.subcat-item[data-sub="rice"] .subcat-icon {
  background-color: #f5f5f5;
}
.subcat-item[data-sub="rice"] .subcat-icon i {
  color: #5d4037;
}

.subcat-item[data-sub="oils"] .subcat-icon {
  background-color: #fff8e1;
}
.subcat-item[data-sub="oils"] .subcat-icon i {
  color: #ffb300;
}

.subcat-item[data-sub="dairy"] .subcat-icon {
  background-color: #e3f2fd;
}
.subcat-item[data-sub="dairy"] .subcat-icon i {
  color: #1e88e5;
}

.subcat-item[data-sub="drinks"] .subcat-icon {
  background-color: #fffde7;
}
.subcat-item[data-sub="drinks"] .subcat-icon i {
  color: #fbc02d;
}

.subcat-item[data-sub="clean"] .subcat-icon {
  background-color: #ede7f6;
}
.subcat-item[data-sub="clean"] .subcat-icon i {
  color: #5e35b1;
}

.subcat-item[data-sub="bakery"] .subcat-icon {
  background-color: #efebe9;
}
.subcat-item[data-sub="bakery"] .subcat-icon i {
  color: #8d6e63;
}

.subcat-item[data-sub="more"] .subcat-icon {
  background-color: #fafafa;
  border: 1.5px solid var(--border);
}
.subcat-item[data-sub="more"] .subcat-icon i {
  color: var(--text-muted);
}

.subcat-item.active .subcat-icon {
  box-shadow:
    0 18px 30px rgba(17, 147, 74, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.4);
  transform: translateY(-2px) scale(1.04);
}

.subcat-item:not([data-sub="all"]) .subcat-icon {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, var(--subcat-bg, #f3f4f6) 100%);
  border-color: rgba(255,255,255,0.75);
}

.subcat-item:not([data-sub="all"]) .subcat-icon i {
  color: var(--subcat-icon-color, #4b5563);
}

.subcat-item.active {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(242, 250, 245, 0.98) 100%);
  border-color: rgba(17, 147, 74, 0.14);
  box-shadow: 0 18px 36px rgba(17, 147, 74, 0.08);
}

/* ──────────── HERO CAROUSEL ──────────── */
.cat-hero-carousel {
  margin: 4px 14px 10px;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: margin 0.2s;
}
.cat-hero-carousel .carousel-item {
  min-height: 150px;
  padding-bottom: 26px;
  box-sizing: border-box;
}
.cat-hero-row {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px;
  height: 100%;
  width: 100%;
}
.cat-hero-basket-wrap {
  width: 44%; 
  max-width: 170px;
  flex-shrink: 0;
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.cat-hero-basket-img {
  width: 100%; 
  height: auto;
  max-height: 130px;
  object-fit: contain;
  display: block;
}
.cat-hero-text {
  flex: 1; 
  text-align: right;
  padding: 6px 0;
  min-width: 0;
}
.cat-hero-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  font-size: 1.25rem; 
  font-weight: 800;
  color: #1b5e20; 
  line-height: 1.35; 
  margin: 0 0 6px;
}
.section-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}
.section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-title-with-icon i {
  color: var(--green);
  font-size: 0.9em;
}
.cat-hero-sub {
  font-size: 0.82rem; 
  color: #388e3c; 
  font-weight: 600; 
  margin: 0 0 10px;
}
.cat-hero-badge {
  display: inline-flex; 
  align-items: center; 
  gap: 5px;
  background: rgba(46, 125, 50, 0.12); 
  color: #2e7d32;
  font-size: 0.78rem; 
  font-weight: 800;
  padding: 6px 14px; 
  border-radius: var(--r-pill);
}
.cat-hero-carousel .carousel-indicators {
  bottom: 4px;
  margin-bottom: 0;
  gap: 6px;
}
.cat-hero-carousel .carousel-indicators [data-bs-target] {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.15);
  border: none;
  transition: all 0.25s;
  opacity: 1;
}
.cat-hero-carousel .carousel-indicators .active {
  background-color: var(--green);
  width: 18px;
  border-radius: 3px;
}

/* ──────────── FILTER ROW ──────────── */
.filter-row {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg);
  margin-top: 2px;
}
.filter-btn {
  display: flex; 
  align-items: center; 
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border); 
  border-radius: var(--r-pill);
  font-size: 0.8rem; 
  font-weight: 700; 
  color: var(--text);
  background: var(--white); 
  transition: all 0.2s; 
  white-space: nowrap;
  font-family: var(--font);
}
.filter-btn:hover { 
  border-color: var(--green); 
  color: var(--green); 
  background: var(--green-bg); 
}
.filter-sort-wrap {
  display: flex; 
  align-items: center; 
  gap: 6px;
  border: 1.5px solid var(--border); 
  border-radius: var(--r-pill);
  padding: 8px 14px; 
  cursor: pointer; 
  min-width: 0;
  background: var(--white);
  transition: border-color 0.2s;
}
.filter-sort-wrap:hover {
  border-color: var(--green-mid);
}
.filter-sort-label { 
  font-size: 0.78rem; 
  color: var(--text-muted); 
  white-space: nowrap; 
}
.filter-sort-btn {
  font-size: 0.8rem; 
  font-weight: 700; 
  color: var(--text);
  display: flex; 
  align-items: center; 
  gap: 4px;
  background: none; 
  border: none; 
  font-family: var(--font);
  white-space: nowrap;
}
.filter-sort-btn i { 
  font-size: 0.7rem; 
  color: var(--text-light); 
}
.filter-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* ──────────── PRODUCT CARDS ──────────── */
.cat-products-section { 
  background: var(--white); 
  padding: 16px 0 12px; 
  margin-top: 10px;
  margin-bottom: 14px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  margin-inline: 14px;
  overflow: hidden;
}
.cat-products-section .section-header { 
  padding: 0 16px 12px; 
}
.cat-products-section .products-slider-wrap { 
  padding: 0; 
}
.cat-products-section .products-slider {
  display: flex;
  gap: 8px !important;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px 14px 10px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-products-section .products-slider::-webkit-scrollbar {
  display: none;
}
.cat-products-section .slider-dots {
  padding: 4px 0 2px;
}
.cat-products-section:last-of-type {
  margin-bottom: 0;
}
.cat-product-card {
  flex: 0 0 calc((100% - 16px) / 3); /* exactly 3 cards visible on mobile */
  min-width: 0;
  max-width: none;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  font-family: var(--font); /* Cairo font */
}
.cat-product-card:hover { 
  box-shadow: var(--shadow-md); 
  transform: translateY(-2px); 
}
@media (max-width: 480px) {
  .card-image {
    height: 90px !important;
    padding: 6px !important;
  }
  .card-name {
    font-size: 0.65rem !important;
    min-height: 2.6em !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
  }
  .card-offers {
    font-size: 0.58rem !important;
  }
  .card-fav {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.72rem !important;
    top: 6px !important;
    left: 6px !important;
  }
  .discount-badge {
    font-size: 0.62rem !important;
    padding: 2px 4px !important;
    top: 6px !important;
    right: 6px !important;
  }
}
@media (min-width: 480px) and (max-width: 767px) {
  .cat-products-section .products-slider {
    gap: 10px !important;
  }
  .cat-product-card {
    flex: 0 0 calc((100% - 30px) / 4); /* exactly 4 cards visible */
  }
}
@media (min-width: 768px) {
  .cat-products-section .products-slider {
    gap: 12px !important;
    padding-inline: 28px !important;
  }
  .cat-product-card {
    flex: 0 0 calc((100% - 60px) / 6); /* exactly 6 cards visible */
  }
}
@media (min-width: 1024px) {
  .cat-products-section .products-slider {
    gap: 12px !important;
    padding-inline: 48px !important;
  }
  .cat-product-card {
    flex: 0 0 calc((100% - 84px) / 8); /* exactly 8 cards visible */
  }
}

.card-image {
  position: relative;
  height: 124px;
  background: #fafafa;
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}
.card-img {
  max-width: 100%; 
  max-height: 100%;
  width: auto; 
  height: auto;
  object-fit: contain;
  display: block;
}
.discount-badge {
  position: absolute; 
  top: 8px; 
  left: auto;
  right: 8px;
  background: #e53935; 
  color: #fff;
  font-size: 0.68rem; 
  font-weight: 800;
  padding: 3px 6px; 
  border-radius: 6px; 
  z-index: 2;
  box-shadow: 0 2px 4px rgba(229,57,53,0.2);
}
.card-fav {
  position: absolute; 
  top: 8px; 
  left: 8px;
  right: auto;
  width: 28px; 
  height: 28px;
  background: rgba(255,255,255,0.95); 
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: var(--text-light); 
  font-size: 0.82rem; 
  z-index: 2;
  box-shadow: var(--shadow-xs); 
  transition: all 0.2s;
  border: none; 
  cursor: pointer;
}
.card-fav:hover, .card-fav.liked { 
  color: #e53935; 
}
.card-fav.liked i:before { 
  content: "\f004"; 
  font-weight: 900; 
}

.card-body { 
  padding: 10px 12px 12px; 
}
.card-name {
  font-size: 0.78rem; 
  font-weight: 700; 
  color: var(--text);
  line-height: 1.45; 
  margin-bottom: 6px;
  display: -webkit-box; 
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; 
  overflow: hidden;
  min-height: 2.3em;
}
.card-offers {
  font-size: 0.72rem; 
  color: var(--text-muted);
  margin-bottom: 0;
  display: flex; 
  align-items: center; 
  gap: 4px;
}
.card-offers i { 
  color: var(--text-light); 
  font-size: 0.72rem; 
}

/* ──────────── TRENDING SEARCHES ──────────── */
.trending-searches-wrap {
  margin-top: 14px;
}
.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.trending-title {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.view-all-trending {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  border: 1.5px solid var(--green);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all-trending:hover {
  background: var(--green);
  color: var(--white);
}
.trending-chips { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.trend-chip {
  display: inline-flex; 
  align-items: center;
  padding: 5px 12px; 
  border-radius: var(--r-pill);
  background: rgba(17,147,74,0.05); 
  border: 1px solid rgba(17,147,74,0.12);
  font-family: var(--font);
  font-size: 0.68rem; 
  font-weight: 600; 
  color: var(--green);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.trend-chip:hover { 
  background: var(--green); 
  border-color: var(--green); 
  color: var(--white); 
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(17,147,74,0.18);
}

/* ──────────── BEST RETAILERS ──────────── */
.cat-retailers-section {
  background:
    radial-gradient(circle at top right, rgba(46, 125, 50, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  padding: 18px 0 20px;
  margin-top: 12px;
  border-radius: var(--r-lg);
  border: 1.5px solid rgba(46, 125, 50, 0.12);
  box-shadow: 0 10px 28px rgba(19, 52, 32, 0.06);
  margin-inline: 14px;
  overflow: hidden;
}
.cat-retailers-section .section-header { 
  padding: 0 18px 14px; 
  position: relative;
}
.cat-retailers-section .section-header::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 125, 50, 0.16), transparent);
}
.cat-retailers-row {
  display: flex; 
  gap: 10px;
  overflow-x: auto;
  padding: 14px 14px 4px;
  scrollbar-width: none; 
  -ms-overflow-style: none;
}
.cat-retailers-row::-webkit-scrollbar { 
  display: none; 
}
.cat-ret-card {
  display: flex; 
  flex-direction: column; 
  align-items: center;
  gap: 6px; 
  flex-shrink: 0;
  padding: 12px 12px 14px;
  cursor: pointer; 
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  min-width: 112px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(46, 125, 50, 0.08);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.cat-ret-card:hover { 
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(46, 125, 50, 0.18);
}
.cat-ret-circle {
  width: 66px; 
  height: 66px; 
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  border: 1.5px solid rgba(46, 125, 50, 0.12);
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden; 
  padding: 9px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 2px;
}
.cat-ret-circle img {
  width: 100%; 
  height: 100%;
  object-fit: contain;
}
.cat-ret-name { 
  font-size: 0.82rem; 
  font-weight: 800; 
  color: var(--text); 
  text-align: center;
  line-height: 1.25;
}
.cat-ret-count { 
  font-size: 0.68rem; 
  color: var(--text-muted); 
  font-weight: 700; 
}
.cat-ret-pct-badge {
  display: inline-block;
  background: linear-gradient(180deg, #edf8ef 0%, #dff3e4 100%);
  color: #2e7d32;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-top: 2px;
  box-shadow: inset 0 0 0 1px rgba(46, 125, 50, 0.08);
}

/* ──────────── BROCHURES ──────────── */
.cat-brochures-section {
  background: var(--white); 
  padding: 16px 0 20px;
  margin-top: 8px;
  border-radius: var(--r-lg);
  margin-inline: 14px;
}
.cat-brochures-section .section-header { 
  padding: 0 16px 12px; 
}
.brochures-slider .brochure-card {
  min-width: 144px; 
  max-width: 144px;
  flex-shrink: 0; 
  scroll-snap-align: start;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.brochures-slider .brochure-card:hover { 
  box-shadow: var(--shadow-md); 
  transform: translateY(-2px); 
}
.brochure-cover {
  width: 100%; 
  height: 130px;
  background: #f5f5f5;
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden;
}
.brochure-cover img {
  width: 100%; 
  height: 100%;
  object-fit: cover;
}
.brochure-info { 
  padding: 10px 12px; 
}
.brochure-store { 
  font-size: 0.82rem; 
  font-weight: 800; 
  color: var(--text); 
}
.brochure-validity { 
  font-size: 0.7rem; 
  color: var(--text-muted); 
  margin-top: 2px; 
}
.brochure-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.brochure-date {
  font-size: 0.65rem; 
  color: var(--text-muted); 
  font-weight: 600;
  display: flex; 
  align-items: center; 
  gap: 4px;
}
.brochure-pdf-icon {
  font-size: 0.85rem;
  color: var(--red);
  line-height: 1;
}

/* ──────────── AI SUGGESTION ──────────── */
.ai-suggest-section {
  background: #f4effe;
  margin: 10px 14px 14px;
  border-radius: var(--r-lg);
  border: 1.5px solid rgba(126, 87, 194, 0.08);
}
.ai-suggest-inner {
  display: flex; 
  align-items: center; 
  gap: 0;
  padding: 12px 14px;
}
.ai-suggest-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline-start: 14px;
  padding-inline-end: 4px;
  border-inline-start: 1.5px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  max-width: 220px;
}
.ai-bot-icon {
  width: 38px; 
  height: 38px; 
  border-radius: 50%;
  background: var(--white); 
  color: #6200ea;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.ai-suggest-text {
  text-align: right;
  min-width: 0;
}
.ai-suggest-title { 
  font-size: 0.8rem; 
  font-weight: 800; 
  color: var(--text); 
  line-height: 1.35; 
}
.ai-suggest-sub { 
  font-size: 0.68rem; 
  color: var(--text-muted); 
  margin-top: 2px; 
  line-height: 1.35; 
}

.ai-suggest-scroll-container {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding-inline-start: 14px;
  position: relative;
}
.ai-suggest-scroll {
  display: flex; 
  gap: 12px; 
  overflow-x: auto;
  flex: 1; 
  scrollbar-width: none; 
}
.ai-suggest-scroll::-webkit-scrollbar { 
  display: none; 
}
.ai-suggest-item {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 6px;
  flex-shrink: 0; 
  text-decoration: none; 
  cursor: pointer;
  transition: all 0.22s ease;
  min-width: 72px;
  background: var(--white);
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(120, 104, 242, 0.03);
}
.ai-suggest-item:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(120, 104, 242, 0.12);
  border-color: rgba(98, 0, 234, 0.25);
}
.ai-item-img {
  width: 44px; 
  height: 44px; 
  border-radius: var(--r-sm);
  background: transparent;
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden; 
  padding: 0;
  box-shadow: none;
  border: none;
}
.ai-item-img img {
  max-width: 100%; 
  max-height: 100%;
  object-fit: contain;
}
.ai-item-name { 
  font-size: 0.72rem; 
  font-weight: 700; 
  color: var(--text); 
}

.ai-scroll-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-inline-end: 8px;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.ai-scroll-btn:hover {
  background: #6200ea;
  color: var(--white);
  border-color: #6200ea;
}

/* ──────────── BOTTOM SHEETS ──────────── */
.sheet-overlay {
  position: fixed; 
  inset: 0;
  background: rgba(0,0,0,0.45); 
  z-index: 390;
  opacity: 0; 
  pointer-events: none; 
  transition: opacity 0.3s;
}
.sheet-overlay.open { 
  opacity: 1; 
  pointer-events: all; 
}
.bottom-sheet {
  position: fixed; 
  bottom: -100%; 
  left: 0; 
  right: 0;
  background: var(--white); 
  border-radius: 20px 20px 0 0;
  z-index: 400; 
  padding: 12px 20px 32px;
  transition: bottom 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: 80vh; 
  overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.bottom-sheet.open { 
  bottom: 0; 
}
.sheet-handle {
  width: 36px; 
  height: 4px; 
  background: var(--border);
  border-radius: 2px; 
  margin: 0 auto 16px;
}
.sheet-title { 
  font-size: 1rem; 
  font-weight: 800; 
  color: var(--text); 
  margin-bottom: 16px; 
  text-align: center; 
}
.sheet-section { 
  margin-bottom: 16px; 
}
.sheet-label { 
  font-size: 0.8rem; 
  font-weight: 700; 
  color: var(--text-muted); 
  margin-bottom: 8px; 
}
.filter-chips { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.filter-chip {
  padding: 6px 14px; 
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  font-size: 0.78rem; 
  font-weight: 700; 
  color: var(--text-muted);
  background: var(--white); 
  font-family: var(--font);
  transition: all 0.18s; 
  cursor: pointer;
}
.filter-chip.active, .filter-chip:hover {
  background: var(--green-bg); 
  border-color: var(--green); 
  color: var(--green);
}
.sheet-apply-btn {
  width: 100%; 
  padding: 14px;
  background: var(--green); 
  color: #fff;
  border-radius: var(--r-pill); 
  font-size: 0.95rem; 
  font-weight: 800;
  font-family: var(--font); 
  margin-top: 8px;
  transition: background 0.18s; 
  cursor: pointer; 
  border: none;
}
.sheet-apply-btn:hover { 
  background: var(--green-light); 
}
.sort-options { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}
.sort-opt {
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 14px 12px; 
  border-radius: var(--r-md);
  font-size: 0.9rem; 
  font-weight: 700; 
  color: var(--text);
  cursor: pointer; 
  transition: background 0.18s, color 0.18s;
  border-bottom: 1px solid var(--border);
}
.sort-opt:last-child { 
  border-bottom: none; 
}
.sort-opt i { 
  color: var(--text-light); 
  font-size: 0.9rem; 
  width: 18px; 
}
.sort-opt.active { 
  color: var(--green); 
  background: var(--green-bg); 
}
.sort-opt.active i { 
  color: var(--green); 
}
.sort-opt:hover:not(.active) { 
  background: var(--bg); 
}

/* ──────────── RESPONSIVE ──────────── */
@media (max-width: 360px) {
  .cat-hero-title { font-size: 0.95rem; }
  .cat-hero-basket-wrap { width: 38%; }
  .cat-ret-card { min-width: 76px; }
  .cat-ret-circle { width: 52px; height: 52px; }
  .brochures-slider .brochure-card { min-width: 128px; max-width: 128px; }
  .brochure-cover { height: 110px; }
  .ai-suggest-label { max-width: 120px; gap: 6px; padding-inline-end: 8px; }
  .ai-bot-icon { width: 30px; height: 30px; font-size: 0.9rem; }
  .ai-suggest-title { font-size: 0.72rem; }
  .ai-suggest-sub { font-size: 0.6rem; }
}
@media (min-width: 480px) {
  .cat-hero-title { font-size: 1.15rem; }
  .cat-hero-sub { font-size: 0.88rem; }
  .cat-hero-basket-wrap { max-width: 200px; }
  .cat-hero-basket-img { max-height: 150px; }
  .cat-hero-basket-wrap { max-width: 200px; }
  .cat-ret-circle { width: 64px; height: 64px; }
  .brochures-slider .brochure-card { min-width: 156px; max-width: 156px; }
  .brochure-cover { height: 142px; }

  .search-nav-group { margin-inline: 20px; padding: 18px 20px; }
  .cat-breadcrumb { margin-inline: 20px; padding: 10px 20px; }
  .filter-row { padding: 12px 20px; }
  .cat-products-section { margin-inline: 20px; }
  .cat-retailers-section { margin-inline: 20px; }
  .cat-brochures-section { margin-inline: 20px; }
  .ai-suggest-section { margin: 10px 20px 14px; }
  .cat-hero-carousel { margin: 4px 20px 10px; }
}
@media (min-width: 768px) {
  .cat-main { padding-bottom: 0; }
  .cat-ret-card { min-width: 110px; }
  .cat-ret-circle { width: 72px; height: 72px; }
  .trending-chips { gap: 10px; }
  .ai-item-img { width: 56px; height: 56px; }

  .search-nav-group { margin-inline: 28px; padding: 20px 28px; }
  .cat-breadcrumb { margin-inline: 28px; padding: 12px 28px; }
  .filter-row {
    padding: 12px 28px;
    justify-content: flex-start;
    gap: 16px;
  }
  .filter-count-badge {
    margin-inline-start: auto;
  }
  .cat-products-section { margin-inline: 28px; }
  .cat-retailers-section { margin-inline: 28px; }
  .cat-brochures-section { margin-inline: 28px; }
  .ai-suggest-section { margin: 12px 28px 16px; }
  .cat-hero-carousel { margin: 4px 28px 10px; }

  .trending-title { font-size: 0.88rem; }
  .view-all-trending { font-size: 0.78rem; }
  .trend-chip { font-size: 0.72rem; }
}
@media (min-width: 1024px) {
  .cat-hero-carousel { min-height: 200px; }
  .cat-hero-basket-img { max-height: 180px; }
  .cat-hero-title { font-size: 1.4rem; }
  .cat-main { padding-top: 20px; }

  .search-nav-group { margin-inline: 48px; padding: 24px 48px; }
  .cat-breadcrumb { margin-inline: 48px; padding: 12px 32px; }
  .filter-row {
    padding: 16px 48px;
    justify-content: flex-start;
    gap: 20px;
  }
  .filter-btn {
    padding: 10px 24px;
    font-size: 0.88rem;
  }
  .filter-btn i {
    font-size: 0.95rem;
  }
  .filter-sort-wrap {
    padding: 10px 24px;
    gap: 10px;
  }
  .filter-sort-label {
    font-size: 0.86rem;
  }
  .filter-sort-btn {
    font-size: 0.88rem;
    gap: 6px;
  }
  .filter-sort-btn i {
    font-size: 0.8rem;
  }
  .filter-count-badge {
    padding: 10px 24px;
    font-size: 0.88rem;
    margin-inline-start: auto;
  }
  .cat-products-section { margin-inline: 48px; }
  .cat-retailers-section { margin-inline: 48px; }
  .cat-brochures-section { margin-inline: 48px; }
  .ai-suggest-section { margin: 14px 48px 24px; }
  .cat-hero-carousel { margin: 4px 48px 10px; }

  .trending-title { font-size: 0.94rem; }
  .view-all-trending { font-size: 0.84rem; }
  .trend-chip { font-size: 0.74rem; }
}
