/* ============================================================
   PRIMARIUS TECHNOLOGIES — Products Listing & Product Detail Styles
   products.css — imported by products.html and product.html
   ============================================================ */

/* ---------- Products Listing Page ---------- */

.products-layout {
  display: grid;
  grid-template-columns: minmax(260px, 292px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ---- Sidebar ---- */
.products-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 140px);
  overflow: visible;
  align-self: start;
}

.sidebar-card {
  position: relative;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar-card-header {
  padding: 18px 20px 16px;
  color: var(--dark);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.82)),
    radial-gradient(circle at top left, rgba(11,96,176,0.08), transparent 54%);
}

.sidebar-card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar-card-header i {
  font-size: 0.95rem;
  color: var(--primary);
}

.sidebar-drawer-close {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--gray-700);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-card-body {
  max-height: calc(100vh - 216px);
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.sidebar-card-body::-webkit-scrollbar {
  width: 7px;
}

.sidebar-card-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.sidebar-category + .sidebar-category {
  margin-top: 6px;
}

.sidebar-category {
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}

.sidebar-category.expanded {
  background: rgba(248, 250, 252, 0.88);
  border-color: rgba(148, 163, 184, 0.14);
}

.sidebar-category-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-cat-main,
.sidebar-cat-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.sidebar-cat-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 12px 12px 14px;
  font-family: var(--font-heading);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  border-radius: 12px;
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.sidebar-cat-main:hover,
.sidebar-cat-main.active {
  background: rgba(11, 96, 176, 0.08);
  color: var(--dark);
}

.sidebar-cat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(11, 96, 176, 0.12), rgba(15, 23, 42, 0.05));
  color: #0b60b0;
}

.sidebar-cat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-cat-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.sidebar-cat-meta {
  font-size: 0.73rem;
  color: var(--gray-500);
  line-height: 1.2;
}

.sidebar-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--gray-700);
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-cat-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--gray-500);
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.sidebar-cat-toggle:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--dark);
}

.sidebar-cat-toggle i.chevron {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.sidebar-category.expanded .sidebar-cat-toggle i.chevron {
  transform: rotate(90deg);
}

.sidebar-subcat-list {
  display: grid;
  gap: 4px;
  margin: 0 8px 6px 52px;
  padding-left: 16px;
  border-left: 1px solid rgba(148, 163, 184, 0.24);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-subcat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  font-family: var(--font-primary);
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--gray-600);
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.sidebar-subcat-btn:hover,
.sidebar-subcat-btn.active {
  color: var(--dark);
  background: rgba(11, 96, 176, 0.08);
}

.sidebar-subcat-label {
  min-width: 0;
  line-height: 1.35;
}

.sidebar-subcat-btn .count {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.08);
  color: var(--gray-600);
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-subcat-btn.active .count {
  background: rgba(11, 96, 176, 0.12);
  color: #0b60b0;
}

.sidebar-leaf-btn {
  color: var(--gray-500);
  padding-left: 18px;
}

.sidebar-leaf-btn .sidebar-subcat-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: rgba(148, 163, 184, 0.8);
}

.catalog-drawer-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.sidebar-drawer-overlay {
  display: none;
}

/* ---- Search bar above listing ---- */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.products-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 400px;
}

.products-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}

#productSearch {
  width: 100%;
  padding: 11px 16px 11px 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
}

#productSearch:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.1);
}

.products-count {
  font-size: 0.875rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.products-count span {
  font-weight: 700;
  color: var(--primary);
}

/* ---- Product Cards Grid ---- */
.products-grid-listing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-listing-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.product-listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: transparent;
}

.plc-image {
  height: 210px;
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
}

.plc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-listing-card:hover .plc-image img {
  transform: scale(1.06);
}

.plc-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  color: rgba(255,255,255,0.2);
  font-size: 3.5rem;
}

.plc-subcat-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  background: rgba(76, 44, 146, 0.85);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
}

.plc-body {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.plc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.plc-badge {
  padding: 3px 10px;
  background: rgba(123, 44, 191, 0.08);
  border: 1px solid rgba(123, 44, 191, 0.15);
  color: var(--primary-light);
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 50px;
}

.plc-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.plc-body p {
  font-size: 0.83rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.plc-footer {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--gray-100);
}

.plc-footer .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 20px;
  font-size: 0.85rem;
}

/* ---- Empty state ---- */
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}

.products-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.products-empty p {
  font-size: 1rem;
  color: var(--gray-500);
  margin: 0;
}

/* ---------- Section heading inside listing ---------- */
.products-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ============================================================
   PRODUCT DETAIL PAGE — product.html
============================================================ */

/* ---- Breadcrumb ---- */
.product-breadcrumb {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
}

.product-breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.product-breadcrumb a {
  color: var(--gray-500);
  transition: var(--transition);
}

.product-breadcrumb a:hover {
  color: var(--primary);
}

.product-breadcrumb i {
  font-size: 0.6rem;
  color: var(--gray-400);
}

.product-breadcrumb .current {
  color: var(--dark);
  font-weight: 600;
}

/* ---- Product Hero (top section) ---- */
.product-hero {
  padding: 48px 0 0;
  background: var(--white);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ---- Image Gallery ---- */
.product-gallery {
  position: sticky;
  top: 100px;
}

.product-main-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
  border: 1px solid var(--gray-200);
}

.product-main-image img {
  width: 100%;
  height: 100%;
  /* `object-fit: contain` preserves the full artwork — important for
     product photos where text or labels are baked into the image
     (e.g. the Aircom AI renders have the model name across the bottom
     edge). With `cover` the 4:3 container was cropping those labels;
     `contain` letterboxes square / portrait artwork instead. */
  object-fit: contain;
  padding: 16px;
  transition: transform 0.5s ease;
}

.product-main-image:hover img {
  transform: scale(1.04);
}

.product-main-image .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--gradient-dark);
  color: rgba(255,255,255,0.15);
  font-size: 5rem;
}

/* zoom indicator */
.zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0,0,0,0.4);
  color: var(--white);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: var(--transition);
}

.product-main-image:hover .zoom-hint {
  opacity: 1;
}

.product-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.product-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  background: var(--gray-100);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(76, 44, 146, 0.2);
}

/* ---- Product Info (right column) ---- */
.product-info {
  padding-top: 8px;
}

.product-subcat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.product-subcat-label i {
  font-size: 0.6rem;
}

.product-info h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 10px;
}

.product-tagline {
  font-size: 1rem;
  color: var(--gray-500);
  margin-bottom: 24px;
  font-weight: 400;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.product-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.product-badge-pill.blue {
  background: rgba(123, 44, 191, 0.08);
  border: 1px solid rgba(123, 44, 191, 0.2);
  color: var(--primary);
}

.product-badge-pill.green {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.product-badge-pill.purple {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--secondary);
}

.product-badge-pill i {
  font-size: 0.65rem;
}

/* Divider */
.product-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 24px 0;
}

/* Quick specs */
.product-quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.quick-spec-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  border-right: 1px solid var(--gray-100);
}

.quick-spec-item:nth-child(even) {
  border-right: none;
}

.quick-spec-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.quick-spec-item label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.quick-spec-item span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
}

/* CTA Buttons */
.product-cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.product-cta-btns .btn {
  flex: 1;
  justify-content: center;
  padding: 14px 20px;
  font-size: 0.875rem;
}

/* ============================================================
   PRODUCT TABS SECTION
============================================================ */
.product-tabs-section {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  margin-top: 56px;
}

.product-tabs-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 80px;
  z-index: 100;
}

.product-tabs-nav .container {
  display: flex;
  gap: 0;
}

.product-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 28px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: -1px;
  white-space: nowrap;
}

.product-tab-btn i {
  font-size: 0.9rem;
  transition: var(--transition);
}

.product-tab-btn:hover {
  color: var(--primary);
  background: rgba(76, 44, 146, 0.03);
}

.product-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

/* Tab Panels */
.product-tab-panel {
  display: none;
  padding: 52px 0;
}

.product-tab-panel.active {
  display: block;
}

/* Description tab */
.tab-description-content {
  max-width: 820px;
}

.tab-description-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin: 32px 0 14px;
}

.tab-description-content h4:first-child {
  margin-top: 0;
}

.tab-description-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--gray-600);
}

.tab-description-content ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-description-content ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.tab-description-content ul li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Specifications tab */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.specs-table thead {
  background: var(--gradient-primary);
}

.specs-table thead th {
  padding: 16px 24px;
  text-align: left;
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.specs-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s ease;
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.specs-table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.specs-table tbody tr:hover {
  background: rgba(123, 44, 191, 0.04);
}

.specs-table tbody td {
  padding: 14px 24px;
  vertical-align: middle;
}

.specs-table tbody td:first-child {
  font-weight: 600;
  color: var(--gray-700);
  width: 38%;
}

.specs-table tbody td:last-child {
  color: var(--dark);
}

/* Documents tab */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.document-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  text-decoration: none;
}

.document-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 20px rgba(76, 44, 146, 0.1);
  transform: translateY(-2px);
}

.doc-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.doc-icon.docx {
  background: rgba(76, 44, 146, 0.08);
  color: var(--primary);
}

.doc-icon.pdf {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}

.doc-icon.xls {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
}

/* External web link (e.g. "Official Product Page" pointing to a
   manufacturer's page). Tinted blue to read as a hyperlink, not a
   file. Used by the product.html documents renderer for entries
   flagged `external: true` or with an http(s) URL. */
.doc-icon.link {
  background: rgba(11, 96, 176, 0.10);
  color: #0b60b0;
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-info h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-info span {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-download {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.document-card:hover .doc-download {
  color: var(--primary);
  transform: translateY(2px);
}

/* ============================================================
   RELATED PRODUCTS
============================================================ */
.related-products {
  padding: 60px 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
}

.related-products .section-header {
  margin-bottom: 36px;
  text-align: left;
}

.related-products .section-header h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.related-card-img {
  height: 160px;
  overflow: hidden;
  background: var(--gray-100);
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-img img {
  transform: scale(1.07);
}

.related-card-img .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  color: rgba(255,255,255,0.15);
  font-size: 2.5rem;
}

.related-card-body {
  padding: 16px 18px;
}

.related-card-body .subcat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.related-card-body h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 4px;
}

.related-card-body p {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   LIGHTBOX
============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: minmax(232px, 260px) minmax(0, 1fr);
    gap: 28px;
  }

  .products-grid-listing {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .product-gallery {
    position: static;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .products-sidebar {
    position: static;
    top: auto;
    max-height: none;
  }

  .catalog-drawer-toggle {
    display: inline-flex;
  }

  .products-toolbar {
    align-items: stretch;
  }

  .products-count {
    order: 3;
  }

  .products-search-wrap {
    max-width: none;
  }

  .sidebar-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 59;
    display: block;
  }

  .sidebar-card {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, calc(100vw - 28px));
    max-width: 100%;
    border-radius: 0 20px 20px 0;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  }

  .sidebar-card-body {
    max-height: calc(100vh - 80px);
    padding-bottom: 28px;
  }

  .sidebar-drawer-close {
    display: inline-flex;
  }

  body.catalog-drawer-open {
    overflow: hidden;
  }

  body.catalog-drawer-open .sidebar-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.catalog-drawer-open .sidebar-card {
    transform: translateX(0);
  }

  .products-grid-listing {
    grid-template-columns: 1fr;
  }

  .product-quick-specs {
    grid-template-columns: 1fr;
  }

  .quick-spec-item {
    border-right: none;
  }

  .quick-spec-item:nth-last-child(2) {
    border-bottom: 1px solid var(--gray-100);
  }

  .product-tab-btn {
    padding: 16px 16px;
    font-size: 0.8rem;
    gap: 6px;
  }

  .product-tab-btn span {
    display: none;
  }

  .product-cta-btns .btn {
    flex: none;
    width: 100%;
  }

  .product-cta-btns {
    flex-direction: column;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-tabs-nav {
    top: 0;
  }
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .products-search-wrap {
    max-width: 100%;
  }

  .catalog-drawer-toggle {
    justify-content: center;
  }

  .sidebar-card {
    width: calc(100vw - 18px);
  }

  .product-thumbnails {
    gap: 8px;
  }

  .product-thumb {
    width: 64px;
    height: 64px;
  }
}
