/* ============================================================
   PRODUCTS PAGE — SHARED CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --red:        #c0392b;
  --red-dark:   #a93226;
  --dark:       #1a1a1a;
  --mid:        #444;
  --light-text: #777;
  --border:     #e2e2e2;
  --bg-page:    #f8f8f8;
  --bg-card:    #ffffff;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 6px 24px rgba(0,0,0,.13);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.18);
  --radius:     6px;
  --font-head:  'Ubuntu', sans-serif;
  --font-body:  'Ubuntu', sans-serif;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Page Wrapper ---- */
.prod-section {
  background: var(--bg-page);
  font-family: var(--font-body);
  color: var(--dark);
  padding: 48px 0 80px;
}

.prod-container {
  max-width: 1400px;
  margin: 0 auto;
  /* padding: 0 24px; */
}

/* ============================================================
   LAYOUT: Sidebar + Main
   ============================================================ */
.prod-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.prod-sidebar {
  width: 240px;
  min-width: 220px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: sticky;
  top: 20px;
  box-shadow: var(--shadow-sm);
}

/* Search */
.sidebar-search-wrap {
  position: relative;
  margin-bottom: 28px;
}

.sidebar-search {
  width: 100%;
  padding: 9px 36px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--dark);
  background: #fafafa;
  outline: none;
  transition: border-color var(--transition);
}

.sidebar-search:focus {
  border-color: var(--red);
  background: #fff;
}

.sidebar-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
  pointer-events: none;
}

.sidebar-search-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-md);
  display: none;
}

.search-results-dropdown.active { display: block; }

.search-result-item {
  padding: 9px 14px;
  font-size: .88rem;
  color: var(--dark);
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--transition);
}

.search-result-item:hover { background: #fef2f2; color: var(--red); }
.search-result-item:last-child { border-bottom: none; }
.search-no-result {
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--light-text);
}

/* Filter Group */
.filter-group {
  margin-bottom: 26px;
}

.filter-group-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: .5px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

.filter-item label {
  font-size: .91rem;
  color: var(--mid);
  cursor: pointer;
  transition: color var(--transition);
}

.filter-item:hover label { color: var(--red); }

.filter-clear-btn {
  display: inline-block;
  margin-top: 6px;
  font-size: .82rem;
  color: var(--red);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  padding: 0;
  text-decoration: underline;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.prod-main {
  flex: 1;
  min-width: 0;
}

/* Page Heading strip */
.prod-page-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.prod-page-strip h2 {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prod-count {
  font-size: .88rem;
  color: var(--light-text);
}

/* Active filter tags */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef2f2;
  border: 1px solid #f5c6c2;
  color: var(--red);
  font-size: .8rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.filter-tag .remove-tag {
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: .7;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---- Product Card ---- */
.prod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
}

.prod-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: #ddd;
}

.prod-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
}

.prod-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .35s ease;
}

.prod-card:hover .prod-card-img-wrap img {
  transform: scale(1.06);
}

/* Hover overlay */
.prod-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(192, 57, 43, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.prod-card:hover .prod-card-overlay { opacity: 1; }

.prod-overlay-btn {
  background: #fff;
  color: var(--red);
  border: none;
  padding: 9px 22px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transform: translateY(8px);
  transition: transform var(--transition);
}

.prod-card:hover .prod-overlay-btn { transform: translateY(0); }

/* Card body */
.prod-card-body {
  padding: 14px 14px 16px;
  text-align: center;
}

.prod-card-name {
  font-family: 'Ubuntu', sans-serif;
  font-size: .98rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  text-transform: capitalize;
  letter-spacing: .2px;
}

.prod-card-cat {
  margin-top: 5px;
  font-size: .78rem;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* No results */
.prod-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--light-text);
  font-size: 1.05rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.prod-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.page-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.page-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.page-btn.dots {
  border: none;
  background: none;
  cursor: default;
  color: var(--light-text);
}

/* ============================================================
   POPUP / LIGHTBOX
   ============================================================ */
.prod-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.prod-popup-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.prod-popup {
  background: #fff;
  border-radius: 10px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(.93) translateY(20px);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}

.prod-popup-overlay.open .prod-popup {
  transform: scale(1) translateY(0);
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
  transition: background var(--transition);
}

.popup-close:hover { background: var(--red); }

.popup-img-wrap {
  width: 100%;
  background: #f2f2f2;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.popup-img-wrap img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 20px;
}

.popup-body {
  padding: 24px 28px 30px;
}

.popup-category {
  font-size: .8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.popup-name {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  text-transform: capitalize;
  /* margin-bottom: 16px; */
}

.popup-divider {
  height: 2px;
  background: var(--border);
  margin-bottom: 16px;
}

.popup-meta {
  font-size: .93rem;
  color: var(--mid);
  line-height: 1.7;
}

.popup-enquire-btn {
  display: inline-block;
  margin-top: 20px;
  background: var(--red);
  color: #fff;
  padding: 11px 30px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.popup-enquire-btn:hover { background: var(--red-dark); }

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 20px;
}

.sidebar-toggle-btn svg {
  width: 18px; height: 18px;
  stroke: #fff; fill: none; stroke-width: 2;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* XX-Large ≥1400px — already max-width handled */

/* X-Large ≥1200px */
@media (max-width: 1399px) {
  .prod-container { max-width: 1200px; }
}

/* Large ≥992px */
@media (max-width: 1199px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Medium ≥768px — sidebar collapses */
@media (max-width: 991px) {
  .prod-sidebar {
    width: 210px;
    min-width: 200px;
  }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .prod-layout { flex-direction: column; }
  .prod-sidebar {
    width: 100%;
    min-width: unset;
    position: static;
    display: none;
  }
  .prod-sidebar.open { display: block; }
  .sidebar-toggle-btn { display: flex; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .prod-page-strip h2 { font-size: 1.3rem; }
}

/* Small ≥576px */
@media (max-width: 575px) {
  .prod-grid { grid-template-columns: repeat(1, 1fr); }
  .prod-section { padding: 28px 0 60px; }
  .prod-container { padding: 0 14px; }
  .prod-card-name { font-size: .92rem; }
  .popup-name { font-size: 1.3rem; }
  .popup-body { padding: 18px 18px 22px; }
  .popup-img-wrap img { max-height: 300px; }
  .page-btn { width: 36px; height: 36px; font-size: .9rem; }
}

/* Extra Small <576px */
@media (max-width: 400px) {
  .prod-grid { gap: 12px; }
  .prod-card-body { padding: 10px; }
}



/* ---- POPUP: full fixed layout so it never clips ---- */
.prod-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.prod-popup-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Popup box: flex-column, fixed max sizes, scrollable body */
.prod-popup {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;          /* never taller than viewport */
  display: flex;
  flex-direction: column;    /* image on top, body below */
  overflow: hidden;          /* clip border-radius cleanly */
  position: relative;
  transform: scale(0.93) translateY(20px);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.prod-popup-overlay.open .prod-popup {
  transform: scale(1) translateY(0);
}

/* Image wrapper: fixed height, never overflow */
.popup-img-wrap {
  width: 100%;
  height: 380px;             /* fixed height so image is never clipped */
  flex-shrink: 0;            /* do NOT shrink this block */
  background: #f4f4f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* THE KEY FIX: contain so the FULL image is always visible */
.popup-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* show full image — no cropping */
  object-position: center;
  display: block;
  padding: 16px;             /* small breathing room around the image */
}

/* Body: allow scroll if content is tall */
.popup-body {
  /* padding: 22px 28px 28px; */
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 1;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
  line-height: 1;
}

.popup-close:hover { background: #c0392b; }

.popup-category {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c0392b;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.popup-name {
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  text-transform: capitalize;
  /* margin-bottom: 14px; */
}

.popup-divider {
  height: 1.5px;
  background: #e5e5e5;
  margin-bottom: 14px;
}

.popup-meta {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.75;
}

.popup-enquire-btn {
  display: inline-block;
  margin-top: 20px;
  background: #c0392b;
  color: #fff;
  padding: 11px 32px;
  border-radius: 4px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-enquire-btn:hover { background: #a93226; }

/* ---- Responsive popup image height ---- */
@media (max-width: 767px) {
  .popup-img-wrap { height: 280px; }
  .popup-body     { padding: 16px 18px 22px; }
  .popup-name     { font-size: 1.35rem; }
}

@media (max-width: 480px) {
  .popup-img-wrap { height: 220px; }
}


/* ---- Search dropdown: category label beside result ---- */
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.88rem;
  color: #222;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.18s;
}

.search-result-item:hover {
  background: #fef2f2;
  color: #c0392b;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item strong { color: #c0392b; }

/* Small category label on the right */
.srd-cat {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}