/* ===== CATEGORY PRODUCTS PAGE (price comparison) =====
   Side spacing follows the same growing margin-inline scale used
   site-wide (see category-page.css / style.css): 14px -> 20px (600px)
   -> 28px (768px) -> 48px (1100px). No hard max-width/centering —
   sections simply sit flush with that shared gutter, like the rest
   of the site. */

.catx-main {
  direction: rtl;
  padding: 0 0 32px;
  background: var(--bg);
  min-height: calc(100vh - 80px);
}

/* ---------- BREADCRUMB (restored here since this page no longer
   loads products.css) ---------- */
.catx-main .pd-crumb {
  font-family: var(--font);
  padding: 10px 14px;
  margin: 12px 14px 4px;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  border: 1px solid rgba(209, 219, 231, 0.9);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.catx-main .pd-crumb .breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.catx-main .pd-crumb .breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.catx-main .pd-crumb .breadcrumb-item a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
}

.catx-main .pd-crumb .breadcrumb-home-icon {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.catx-main .pd-crumb .breadcrumb-item a:hover,
.catx-main .pd-crumb .breadcrumb-item a:hover .breadcrumb-home-icon {
  color: var(--green);
}

.catx-main .pd-crumb .breadcrumb-item + .breadcrumb-item::before {
  content: "\f104";
  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;
}

.catx-main .pd-crumb .breadcrumb-item.active {
  color: var(--green);
  font-weight: 800;
}

/* ---------- SEARCH (within this category, stays on this page) ---------- */
.catx-search-section {
  margin: 0 14px 22px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.catx-search-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

.catx-search-title i {
  color: var(--green);
  font-size: 0.86rem;
}

.catx-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catx-search-bar:focus-within {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.catx-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding-inline-end: 14px;
  padding-inline-start: 8px;
}

.catx-search-field i {
  flex-shrink: 0;
  color: var(--text-light);
  font-size: 1rem;
}

.catx-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
}

.catx-search-input:focus {
  outline: none;
}

.catx-search-input::placeholder {
  color: var(--text-light);
}

.catx-search-btn {
  flex-shrink: 0;
  padding: 12px 28px;
  color: #1a1a1a;
  background: var(--yellow);
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.catx-search-btn:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
}

.catx-search-btn:active {
  transform: translateY(0);
}

.catx-search-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--green-bg);
  border: 1px solid var(--green-mid);
  border-radius: var(--r-md);
}

.catx-search-active-text {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.catx-search-active-text strong {
  color: var(--green);
}

.catx-search-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 4px;
  padding: 0 6px;
  color: #fff;
  background: var(--green);
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 800;
}

.catx-search-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.catx-search-clear:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---------- HERO ---------- */
.catx-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 14px 14px;
  padding: 20px;
  background: linear-gradient(135deg, #0f7a42 0%, var(--green) 100%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.catx-hero-media {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  height: 92px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: var(--r-md);
  font-size: 1.4rem;
}

.catx-hero-media span {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
}

.catx-hero-media-has-img {
  padding: 0;
  border: 0;
  background: #fff;
  overflow: hidden;
}

.catx-hero-media-has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catx-hero-body {
  min-width: 0;
}

.catx-hero-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 12px;
  color: #7a5700;
  background: var(--yellow);
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 800;
}

.catx-hero-body h1 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
}

.catx-hero-body p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 600;
}

.catx-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catx-hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- COMPARISON WIDGET ---------- */
.catx-compare {
  position: relative;
  margin: 0 14px 14px;
  padding: 18px 16px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.catx-compare-tag {
  position: absolute;
  top: -12px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  color: #7a5700;
  background: var(--yellow);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.catx-compare-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.catx-compare-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catx-compare-img {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.catx-compare-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catx-compare-product h3 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

.catx-compare-product p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.catx-compare-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.catx-compare-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.catx-compare-row.is-best {
  background: var(--green-bg);
  border-color: var(--green-mid);
}

.catx-compare-retailer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.catx-compare-retailer small {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
}

.catx-compare-row strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
  white-space: nowrap;
}

.catx-compare-row.is-best strong {
  color: var(--green);
}

/* ---------- LETTER BADGE ---------- */
.catx-letter-badge {
  display: grid;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

/* ---------- PRODUCT GRID ---------- */
.catx-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 14px;
}

.catx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}

.catx-card-empty {
  grid-column: 1 / -1;
  align-items: center;
  text-align: center;
  padding: 36px 16px;
}

.catx-card-empty p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.catx-badge-inline {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 5px 10px;
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-weight: 800;
}

.catx-badge-save {
  background: var(--red);
}

.catx-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 108px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: var(--r-sm);
}

.catx-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Thumbnail variant used in the title/weight/badge + image top row */
.catx-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.catx-card-top .catx-media {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  margin-bottom: 0;
}

.catx-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.catx-weight {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.catx-card h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.catx-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.catx-price-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.catx-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.catx-price-row.is-empty {
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.catx-price-row.is-best {
  padding: 12px 14px;
  background: var(--green-bg);
  border: 1px solid var(--green);
}

.catx-price-retailer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catx-price-retailer small {
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 800;
}

.catx-price-row strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.catx-price-row.is-best strong {
  color: var(--green);
  font-size: 1.05rem;
}

.catx-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: auto;
}

.catx-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  color: var(--green);
  background: #fff;
  border: 1px solid var(--green);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.catx-add-btn:hover {
  background: var(--green-bg);
}

/* ---------- SLIDER CARD VARIANT (used inside horizontal sliders on the parent category page) ---------- */
.catx-slide-card {
  flex: 0 0 62%;
  min-width: 0;
  scroll-snap-align: start;
}

@media (min-width: 480px) {
  .catx-slide-card {
    flex-basis: 44%;
  }
}

@media (min-width: 768px) {
  .catx-slide-card {
    flex-basis: 30%;
  }
}

@media (min-width: 1100px) {
  .catx-slide-card {
    flex-basis: 23%;
  }
}

/* ---------- SHOW MORE ---------- */
.catx-more {
  display: flex;
  justify-content: center;
  margin: 20px 14px 0;
}

.catx-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  color: var(--green);
  background: #fff;
  border: 1px solid var(--green-mid);
  border-radius: var(--r-pill);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.catx-more-btn:hover {
  background: var(--green-bg);
}

.catx-more-btn:disabled {
  color: var(--text-muted);
  background: var(--bg);
  border-color: var(--border);
  cursor: default;
  box-shadow: none;
}

/* ===================== RESPONSIVE SIDE GUTTER
   Matches the growing margin-inline scale used across category-page.css
   and style.css (header-inner, search-nav-group, cat-products-section…)
   so these sections line up with every other section on the page. ===================== */
@media (min-width: 600px) {
  .catx-main .pd-crumb,
  .catx-search-section,
  .catx-hero,
  .catx-compare,
  .catx-grid,
  .catx-more {
    margin-inline: 20px;
  }
}

@media (min-width: 768px) {
  .catx-main .pd-crumb,
  .catx-search-section,
  .catx-hero,
  .catx-compare,
  .catx-grid,
  .catx-more {
    margin-inline: 28px;
  }

  .catx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .catx-compare-inner {
    flex-direction: row;
    align-items: center;
  }

  .catx-compare-product {
    flex-shrink: 0;
    width: 240px;
  }

  .catx-compare-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1;
  }
}

@media (min-width: 1100px) {
  .catx-main .pd-crumb,
  .catx-search-section,
  .catx-hero,
  .catx-compare,
  .catx-grid,
  .catx-more {
    margin-inline: 48px;
  }

  .catx-hero {
    padding: 28px 32px;
    gap: 24px;
  }

  .catx-hero-media {
    width: 150px;
    height: 150px;
    font-size: 2rem;
  }

  .catx-hero-media span {
    font-size: 0.74rem;
  }

  .catx-hero-body h1 {
    font-size: 2rem;
  }

  .catx-hero-body p {
    font-size: 0.92rem;
  }

  .catx-compare-product {
    width: 280px;
  }

  .catx-compare-img {
    width: 76px;
    height: 76px;
  }

  .catx-compare-rows {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .catx-compare-row {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 14px 10px;
  }

  .catx-compare-retailer {
    align-items: center;
    text-align: center;
  }

  .catx-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .catx-card {
    padding: 18px 16px;
    border-radius: var(--r-lg);
  }

  .catx-media {
    height: 150px;
  }

  .catx-card h3 {
    font-size: 0.94rem;
    min-height: 44px;
  }
}
