/**
 * Category Reviews CSS
 * Source: Final HTML/Reviews/Review Category _ Brand Page/index_13_review_tv_schema_itemlist_imageobject.html
 * Template: category-alagheza_review.php — /{category}/reviews/
 */

:root {
  --navy: #16285c;
  --navy-deep: #0f1d44;
  --blue-accent: #1f3a93;
  --green: #0f9d58;
  --green-bg: #e3f6ea;
  --green-text: #1a8a4c;
  --amber-bg: #fdf0db;
  --amber-text: #b8762a;
  --yellow-bg: #fbf3d6;
  --yellow-text: #a98b1f;
  --red-bg: #fde3e1;
  --red-text: #c44b3f;
  --border: #e7e9ee;
  --muted: #6b7280;
  --bg: #f7f8fa;
  --star: #f5a623;
}

* { box-sizing: border-box; }

body.category-reviews {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: #1a1f2b;
  direction: rtl;
}
body.category-reviews .page,
body.category-reviews #al-page {
  max-width: none;
  margin: 0;
  padding: 0;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }

/* ===== Section 1: Breadcrumb ===== */
.category-reviews .breadcrumb {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px 28px 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}
.category-reviews .breadcrumb span { color: #1a1f2b; font-weight: 600; }

/* ===== Section 2: Hero Wrap ===== */
.category-reviews .hero-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 28px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.category-reviews .hero-text h1 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 900;
  color: #10142a;
  line-height: 1.25;
}
.category-reviews .hero-text p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 620px;
}

.category-reviews .stat-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.category-reviews .stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  flex: 1;
  min-width: 0;
}
.category-reviews .stat-card b { display: block; font-size: 22px; font-weight: 800; color: #10142a; }
.category-reviews .stat-card span { font-size: 12px; color: var(--muted); }
.category-reviews .stat-card.date { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.category-reviews .stat-card.date b { font-size: 13px; }
.category-reviews .stat-card.date .clock { font-size: 11px; color: var(--muted); }

/* Hero image — TV scene */
.category-reviews .hero-image {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #d9c9b3, #cbb997);
  min-height: 215px;
}
.category-reviews .hero-image .tv-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.category-reviews .tv-stand-photo {
  width: 90%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
  margin-bottom: 0;
}
.category-reviews .tv-unit { position: relative; width: 62%; }
.category-reviews .tv-screen {
  width: 100%;
  height: 90px;
  border-radius: 4px;
  background: linear-gradient(120deg, #ff3d77, #7b2ff7, #00d4ff, #ffd166);
  box-shadow: 0 0 0 6px #111, 0 10px 25px rgba(0,0,0,.35);
}
.category-reviews .tv-stand-leg {
  width: 60%;
  height: 10px;
  background: #111;
  margin: 0 auto;
  border-radius: 2px;
}
.category-reviews .console {
  width: 100%;
  height: 55px;
  background: #5c4632;
  border-radius: 4px;
  margin-top: 8px;
  box-shadow: 0 8px 14px rgba(0,0,0,.2);
}
.category-reviews .plant {
  position: absolute;
  right: 6%;
  bottom: 46px;
  font-size: 46px;
}
.category-reviews .lamp {
  position: absolute;
  left: 8%;
  bottom: 60px;
  font-size: 34px;
}

/* Info card */
.category-reviews .info-card {
  background: var(--navy);
  border-radius: 14px;
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-reviews .info-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.category-reviews .info-card p { margin: 0; font-size: 13px; line-height: 1.9; color: #cdd4e8; }
.category-reviews .info-card .more-btn {
  margin-top: 16px;
  background: #fff;
  color: var(--navy);
  border: none;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ===== Section 3: Layout (Sidebar + Main) ===== */
.category-reviews .layout {
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 28px 60px !important;
  display: grid;
  grid-template-columns: 270px 1fr !important;
  gap: 24px;
  align-items: start;
}

/* Sidebar */
.category-reviews .sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: sticky;
  top: 18px;
}

.category-reviews .sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.category-reviews .sidebar-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.category-reviews .sidebar-head .reset { font-size: 12.5px; color: var(--muted); }
.category-reviews .sidebar-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.category-reviews .filter-block {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.category-reviews .filter-block:first-of-type { border-top: none; padding-top: 0; }
.category-reviews .filter-block h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }

/* Price slider */
.category-reviews .price-range {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.category-reviews .price-slider {
  position: relative;
  height: 20px;
  margin-bottom: 14px;
  direction: ltr;
}
.category-reviews .price-slider .track-bg {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 5px;
  background: #e6e8ee;
  border-radius: 4px;
  transform: translateY(-50%);
}
.category-reviews .price-slider .track-fill {
  position: absolute;
  top: 50%;
  height: 5px;
  background: var(--navy);
  border-radius: 4px;
  transform: translateY(-50%);
}
.category-reviews .price-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}
.category-reviews .price-slider input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}
.category-reviews .price-slider input[type="range"]::-moz-range-track {
  background: transparent;
}
.category-reviews .price-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  cursor: pointer;
}
.category-reviews .price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  cursor: pointer;
}

.category-reviews .minmax { display: flex; gap: 8px; }
.category-reviews .minmax input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  text-align: center;
  color: var(--navy);
  font-weight: 700;
  font-family: inherit;
}

.category-reviews .check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #333;
  padding: 6px 0;
}
.category-reviews .check-row label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.category-reviews .check-row input { width: 16px; height: 16px; accent-color: var(--navy); }
.category-reviews .check-row .count { color: var(--muted); font-size: 12.5px; }

.category-reviews .brand-search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.category-reviews .show-more {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.category-reviews .apply-btn {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 18px;
}

/* ===== Section 4: Results Bar ===== */
.category-reviews .results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.category-reviews .results-bar .sort {
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-reviews .sort select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: #1a1f2b;
  background: #fff;
}
.category-reviews .view-toggle { display: flex; gap: 6px; }
.category-reviews .view-toggle .v {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 15px;
}

/* ===== Section 5: Product Grid ===== */
.category-reviews .grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-reviews .card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.category-reviews .card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(20,30,60,.08); }

.category-reviews .card > a { display: block; text-decoration: none; }.category-reviews .thumb {
  position: relative;
  height: 130px !important;
  background: #0d0d10;
  overflow: hidden;
}
.category-reviews .thumb img.screen {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 3px;
  object-fit: cover;
}

.category-reviews .rank {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.category-reviews .rank.top { background: var(--green); }

.category-reviews .fav {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #888;
  z-index: 2;
}

.category-reviews .card-body {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.category-reviews .card-body h4 { margin: 0; font-size: 14.5px; font-weight: 800; }.category-reviews .card-body h4 a { color: #10142a; text-decoration: none; }.category-reviews .card-body h4 a:hover { color: var(--blue); }
.category-reviews .size { font-size: 12.5px; color: var(--muted); margin-top: -4px; }

.category-reviews .rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.category-reviews .rating-row .score { font-weight: 800; color: #10142a; }
.category-reviews .stars { color: var(--star); font-size: 12px; letter-spacing: 1px; }
.category-reviews .rating-row .count { color: var(--muted); }

.category-reviews .badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-top: -2px;
}
.category-reviews .badge.excellent { background: var(--green-bg); color: var(--green-text); }
.category-reviews .badge.verygood { background: var(--amber-bg); color: var(--amber-text); }
.category-reviews .badge.good { background: var(--yellow-bg); color: var(--yellow-text); }
.category-reviews .badge.average { background: var(--red-bg); color: var(--red-text); }

.category-reviews .price { font-size: 14px; font-weight: 800; color: #10142a; }
.category-reviews .price .old {
  font-size: 11.5px;
  color: #b6b9c2;
  text-decoration: line-through;
  font-weight: 500;
  margin-right: 6px;
}

.category-reviews .card-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.category-reviews .read-review {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.category-reviews .compare-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.category-reviews .compare-btn:hover { background: var(--bg); }
.category-reviews .compare-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ===== Section 6: Pagination ===== */
.category-reviews .pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.category-reviews .page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  color: #2a2f3a;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.category-reviews .page-btn:hover { background: var(--bg); }
.category-reviews .page-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.category-reviews .page-btn.nav-arrow { font-size: 15px; }
.category-reviews .page-btn.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ===== Section 7: Footer Note ===== */
.category-reviews .footer-note {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 28px 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* ===== Mobile: Bottom Bar ===== */
.category-reviews .mobile-bottom-bar { display: none; }
.category-reviews .filter-backdrop { display: none; }
.category-reviews .sidebar-close { display: none; }

/* ===== Responsive: Tablet (max-width: 1200px) ===== */
@media (max-width: 1200px) {
  .category-reviews .hero-image { min-height: 180px; }
  .category-reviews .grid { grid-template-columns: repeat(3, 1fr); }
}

/* iPad portrait and smaller desktop */
@media (max-width: 1023px) {
  .category-reviews .hero-wrap { gap: 14px; }
}

@media (max-width: 767px) {
  .category-reviews .hero-wrap { grid-template-columns: 1fr; }
}

/* ===== Responsive: Mobile (max-width: 900px) ===== */
@media (max-width: 900px) {
  .category-reviews .layout {
    grid-template-columns: 1fr !important;
    padding: 20px 14px 78px !important;
  }

  .category-reviews .sidebar {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(10,15,30,.25);
    z-index: 56;
    padding: 18px 18px 24px;
    transform: translateY(110%);
    transition: transform .32s ease;
  }
  .category-reviews .sidebar.open {
    transform: translateY(0);
  }
  .category-reviews .sidebar-close {
    display: flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #444;
    flex-shrink: 0;
  }

  .category-reviews .grid { grid-template-columns: repeat(2, 1fr); }
  .category-reviews .stat-row { flex-wrap: wrap; }

  .category-reviews .filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,30,.45);
    z-index: 55;
  }
  .category-reviews .filter-backdrop.show { display: block; }

  /* Noon-style floating Sort | Filter pill */
  .category-reviews .mobile-bottom-bar {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 18px;
    left: 16px;
    z-index: 50;
    background: var(--navy);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(16,24,55,.38);
    overflow: hidden;
  }
  .category-reviews .bottom-bar-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    position: relative;
  }
  .category-reviews .bb-icon { font-size: 14px; line-height: 1; }
  .category-reviews .bottom-bar-divider {
    width: 1px;
    align-self: stretch;
    margin: 10px 0;
    background: rgba(255,255,255,.3);
  }
  .category-reviews .filter-badge {
    position: absolute;
    top: 9px;
    left: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--navy);
    padding: 0;
  }
}

/* ===== Responsive: Small Mobile (max-width: 560px) ===== */
@media (max-width: 560px) {
  .category-reviews .hero-wrap { padding: 12px 14px 0; }
  .category-reviews .hero-text h1 { font-size: 24px; }
  .category-reviews .hero-text p { font-size: 13px; }
  .category-reviews .stat-row { flex-wrap: wrap; }
  .category-reviews .stat-card { padding: 10px 8px; }
  .category-reviews .stat-card b { font-size: 17px; }
  .category-reviews .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-reviews .card-body { padding: 10px; }
  .category-reviews .card-body h4 { font-size: 13px; }
  .category-reviews .breadcrumb { padding: 14px 14px 0; font-size: 12px; }
}

/* Backend SEO/performance refinements */
.category-reviews .rank { display: none !important; }
