:root {
  --red: #ce0e2d;
  --red-dark: #a90b24;
  --brand-red: #ef3e42;
  --green: #19a55a;
  --ink: #101010;
  --muted: #6c6c6c;
  --line: #e6e6e3;
  --page: #f0f0ee;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "Cairo", Tahoma, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.public-container { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }

.site-header { position: relative; z-index: 10; border-bottom: 1px solid rgba(0,0,0,.06); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.nav-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.store-logo { display: flex; align-items: baseline; gap: 9px; }
.store-logo span { font-size: 24px; font-weight: 900; letter-spacing: .04em; }
.store-logo small { color: var(--red); font-size: 14px; font-weight: 900; }
.store-link { display: inline-flex; align-items: center; gap: 9px; color: #5e5e5e; font-size: 14px; font-weight: 800; transition: color .2s ease; }
.store-link:hover { color: var(--red); }
.store-link span { color: var(--red); font-size: 20px; }

.catalog-hero { overflow: hidden; background: linear-gradient(135deg, #171717, #090909); color: white; }
.hero-inner { position: relative; padding-block: 76px 82px; }
.hero-inner::before { content: "العالم الحديث"; position: absolute; left: -4px; bottom: -55px; color: rgba(255,255,255,.035); font-size: min(22vw, 260px); line-height: 1; font-weight: 900; letter-spacing: -.08em; pointer-events: none; }
.eyebrow { margin: 0 0 9px; color: var(--red); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.catalog-hero .eyebrow { color: #ff4662; }
.catalog-hero h1 { position: relative; margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: 1.12; font-weight: 900; letter-spacing: -.05em; }
.catalog-hero p:not(.eyebrow) { position: relative; max-width: 720px; margin: 16px 0 0; color: rgba(255,255,255,.68); font-size: 17px; line-height: 2; }
.catalog-search { position: relative; display: block; width: min(560px, 100%); margin-top: 30px; }
.catalog-search span { position: absolute; top: 50%; right: 15px; transform: translateY(-54%); color: #999; font-size: 27px; line-height: 1; }
.catalog-search input { width: 100%; height: 54px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 0 49px 0 16px; background: rgba(255,255,255,.1); color: white; font-size: 15px; outline: none; }
.catalog-search input::placeholder { color: rgba(255,255,255,.48); }
.catalog-search input:focus { border-color: #ff4662; box-shadow: 0 0 0 4px rgba(206,14,45,.2); }

.categories-section, .products-section { padding-block: 58px 76px; }
.section-heading, .results-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -.035em; }
.count-chip { border: 1px solid #d8d8d5; border-radius: 999px; padding: 7px 13px; background: white; color: #777; font-size: 13px; font-weight: 800; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.category-card { position: relative; z-index: 0; overflow: hidden; border: 1px solid rgba(0,0,0,.07); border-radius: 27px; background: white; box-shadow: 0 14px 42px rgba(0,0,0,.055); transition: transform .25s ease, box-shadow .25s ease; }
.category-card::before, .product-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: none; background-repeat: space; background-size: 110px 56px; background-position: center; opacity: .05; pointer-events: none; }
.category-card:hover { transform: translateY(-4px); box-shadow: 0 22px 54px rgba(0,0,0,.09); }
.category-visual { height: 210px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f8f8f7, #e9e9e6); }
.category-visual img { width: 100%; height: 100%; object-fit: contain; padding: 17px; mix-blend-mode: multiply; transition: transform .4s ease; }
.category-card:hover .category-visual img { transform: scale(1.035); }
.category-visual span { color: #d1d1ce; font-size: 72px; font-weight: 900; letter-spacing: -.08em; }
.category-content { padding: 23px; }
.category-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-meta strong { color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.category-meta span { color: #aaa; font-size: 12px; font-weight: 700; }
.category-card h3 { margin: 10px 0 0; font-size: 22px; line-height: 1.55; font-weight: 900; }
.category-card p { margin: 1px 0 0; color: #999; font-size: 13px; font-weight: 700; text-align: right; }
.category-description { min-height: 52px; margin-top: 10px; color: #6f6f6f; font-size: 13px; line-height: 1.9; }
.open-category { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; border-top: 1px solid #eee; padding-top: 15px; color: #333; font-size: 13px; font-weight: 900; }
.open-category b { color: var(--red); font-size: 19px; }
.public-empty { display: grid; place-items: center; gap: 4px; border: 1px dashed #cfcfcb; border-radius: 24px; padding: 52px 20px; background: white; text-align: center; }
.public-empty[hidden] { display: none; }
.public-empty strong { font-size: 19px; }
.public-empty span { color: #888; font-size: 14px; }

.category-hero { border-bottom: 1px solid rgba(0,0,0,.05); }
.category-hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 34px; padding-block: 46px 38px; }
.brand-rule { display: flex; align-items: center; gap: 12px; color: var(--brand-red); direction: ltr; font-size: 13px; font-weight: 900; letter-spacing: .16em; }
.brand-rule i { width: 48px; height: 1px; background: currentColor; }
.category-hero h1 { margin: 7px 0 0; font-size: clamp(39px, 6vw, 64px); line-height: 1.2; font-weight: 900; letter-spacing: -.05em; }
.category-hero p { max-width: 690px; margin: 10px 0 0; color: #737373; font-size: 15px; line-height: 1.9; }
.category-tools { width: min(420px, 100%); display: flex; align-items: center; gap: 9px; }
.catalog-search.compact { flex: 1; margin: 0; }
.catalog-search.compact input { height: 48px; border-color: #dcdcd9; background: white; color: #111; }
.catalog-search.compact input::placeholder { color: #999; }
.results-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.results-row > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.results-row strong { font-size: 18px; font-weight: 900; }
.results-row span { color: #999; font-size: 13px; font-weight: 800; }
.view-filter { display: inline-flex; gap: 3px; border: 1px solid #dededb; border-radius: 12px; padding: 3px; background: white; flex: 0 0 auto; }
.view-option { min-width: 82px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; background: transparent; color: #777; cursor: pointer; font-size: 12px; font-weight: 900; }
.view-option span { color: currentColor; font-size: 17px; line-height: 1; }
.view-option.is-active { background: #111; color: white; }

.products-grid { display: grid; gap: 24px; }
.product-card { position: relative; z-index: 0; overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: 26px; background: white; box-shadow: 0 16px 58px rgba(15,15,15,.065); }
.product-heading-row { display: flex; align-items: flex-start; gap: 10px; padding: clamp(18px,3vw,32px) clamp(18px,4vw,40px) 0; }
.product-heading { flex: 0 0 80%; max-width: 80%; min-width: 0; }
.more-details-btn { flex: 0 0 20%; max-width: 20%; display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: normal; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; padding: 8px 6px; background: #f8f8f7; color: #333; cursor: pointer; font-size: clamp(8px,0.8vw,10px); font-weight: 900; line-height: 1.3; transition: .2s ease; }
.more-details-btn:hover { border-color: var(--red); color: var(--red); background: #fff5f6; }
.product-title-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 12px; }
.product-title-row h2 { margin: 0; font-size: clamp(19px, 2.1vw, 28px); line-height: 1.3; font-weight: 900; letter-spacing: -.02em; }
.product-title-row span { color: var(--brand-red); font-size: clamp(14px, 1.5vw, 19px); line-height: 1.3; font-weight: 900; }
.product-heading p { margin: 4px 0 0; color: #aaa; font-size: clamp(10px,0.9vw,12px); font-weight: 700; }

.product-main { display: grid; grid-template-columns: minmax(0,1fr) 40%; gap: 0; align-items: stretch; margin-top: 16px; }
.product-copy { display: flex; flex-direction: column; min-width: 0; padding: 0 clamp(18px,4vw,40px) clamp(18px,3vw,32px); }
.product-specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px clamp(10px,2vw,28px); margin: 0; }
.product-specs > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid #f0f0ef; padding-bottom: 7px; min-width: 0; }
.product-specs dt { color: #6e6e6e; font-size: clamp(9px,0.85vw,11px); font-weight: 800; }
.product-specs dd { margin: 0; text-align: left; font-size: clamp(10px,1vw,13px); font-weight: 900; }
.features-block { margin-top: clamp(10px,1.6vw,18px); }
.features-block h3 { margin: 0 0 6px; font-size: clamp(10px,0.9vw,12px); font-weight: 900; }
.features-block > div { display: flex; flex-wrap: wrap; gap: 5px; }
.features-block span { border-radius: 999px; padding: 4px 8px; background: #f3f3f2; color: #606060; font-size: clamp(9px,0.85vw,11px); line-height: 1.6; font-weight: 800; }
.product-footer-row { margin-top: auto; padding-top: clamp(10px,1.6vw,20px); }
.price-area { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.price-area strong { border-radius: 10px; padding: 6px 9px; background: #111; color: white; font-size: clamp(9px,0.85vw,12px); font-weight: 900; letter-spacing: .02em; }
.price-area small { display: block; margin-bottom: -2px; color: #aaa; font-size: 9px; font-weight: 800; }
.price-area span { font-size: clamp(14px,1.6vw,20px); font-weight: 900; font-variant-numeric: tabular-nums; }
.price-area em { margin-right: 3px; color: #777; font-size: 10px; font-style: normal; font-weight: 900; }

.product-image-col { display: flex; flex-direction: column; gap: 10px; padding: clamp(10px,2vw,20px); background: #f5f5f3; border-inline-start: 1px solid rgba(0,0,0,.05); }
.product-image-wrap { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 120px; flex: 1; }
.out-of-stock-stamp { position: absolute; inset: 0; z-index: 5; width: 62%; max-width: 190px; height: auto; margin: auto; object-fit: contain; pointer-events: none; }
.product-card.is-out-of-stock .product-image-wrap img:not(.out-of-stock-stamp) { opacity: .5; filter: grayscale(.35); }
.product-card.is-out-of-stock .whatsapp-link { background: #333; }
.product-card.is-out-of-stock .whatsapp-link:hover { background: #111; }
.product-image-wrap img { width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s ease; }
.product-card:hover .product-image-wrap img { transform: scale(1.025); }
.product-image-wrap span { color: #aaa; font-size: 11px; font-weight: 800; text-align: center; }
.buy-actions { display: grid; gap: 6px; }
.buy-actions a { height: clamp(30px,3.6vw,40px); display: inline-flex; align-items: center; justify-content: center; text-align: center; border: 1px solid transparent; border-radius: 10px; padding: 0 6px; font-size: clamp(9px,0.85vw,12px); font-weight: 900; line-height: 1.2; transition: .2s ease; }
.whatsapp-link { background: var(--green); color: white; }
.whatsapp-link:hover { background: #148a4b; }
.web-link { border-color: #d7d7d4 !important; background: white; }
.web-link:hover { border-color: var(--red) !important; background: #fff5f6; color: var(--red); }

.products-grid.products-grid-view { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.products-grid.products-grid-view .product-card { border-radius: 20px; }
.products-grid.products-grid-view .more-details-btn { padding: 6px 4px; font-size: 8px; }
.products-grid.products-grid-view .product-heading-row { padding: 14px 16px 0; gap: 6px; }
.products-grid.products-grid-view .product-title-row { display: block; text-align: right; }
.products-grid.products-grid-view .product-title-row h2 { font-size: 16px; }
.products-grid.products-grid-view .product-title-row span { display: block; font-size: 13px; }
.products-grid.products-grid-view .product-heading p { display: block; text-align: right; }
.products-grid.products-grid-view .product-main { grid-template-columns: 1fr; margin-top: 10px; }
.products-grid.products-grid-view .product-image-col { order: -1; border-inline-start: 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.products-grid.products-grid-view .product-image-wrap { min-height: 130px; }
.products-grid.products-grid-view .product-copy { padding: 12px 16px 16px; }
.products-grid.products-grid-view .product-specs { grid-template-columns: 1fr; gap: 6px; }
.products-grid.products-grid-view .buy-actions a { height: 34px; font-size: 10px; }

@media (min-width: 1200px) {
  .products-grid.products-grid-view { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

.details-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.details-modal[hidden] { display: none; }
.details-modal-overlay { position: absolute; inset: 0; background: rgba(15,15,15,.55); backdrop-filter: blur(2px); }
.details-modal-panel { position: relative; width: min(420px, 100%); max-height: 80vh; overflow-y: auto; border-radius: 22px; padding: 28px 24px 24px; background: white; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.details-modal-close { position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: #f3f3f2; color: #333; cursor: pointer; font-size: 18px; line-height: 1; }
.details-modal-close:hover { background: #ececea; color: var(--red); }
.details-modal-panel h3 { margin: 0 0 16px; padding-inline-end: 34px; font-size: 19px; font-weight: 900; }
#detailsModalLinks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#detailsModalLinks a { display: flex; align-items: center; justify-content: space-between; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; color: #222; font-size: 14px; font-weight: 800; transition: .2s ease; }
#detailsModalLinks a:hover { border-color: var(--red); background: #fff5f6; color: var(--red); }
#detailsModalEmpty { margin: 0; color: #888; font-size: 13px; }
body.modal-open { overflow: hidden; }

.public-footer { border-top: 1px solid rgba(0,0,0,.06); padding-block: 24px; background: white; color: #8b8b8b; font-size: 13px; font-weight: 700; }
.public-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.not-found { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f2f2f0; text-align: center; }
.not-found span { color: var(--red); font-size: 72px; font-weight: 900; }
.not-found h1 { margin: 0; font-size: 34px; }
.not-found p { margin: 8px 0 22px; color: #777; }
.primary-link { display: inline-flex; border-radius: 11px; padding: 11px 18px; background: var(--red); color: white; font-weight: 800; }

@media (max-width: 980px) {
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-hero-inner { align-items: flex-start; flex-direction: column; }
  .category-tools { width: 100%; }
  .products-grid.products-grid-view { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .public-container { width: min(100% - 20px,1240px); }
  .nav-row { min-height: 66px; }
  .store-logo span { font-size: 20px; }
  .store-link { font-size: 12px; }
  .hero-inner { padding-block: 52px 58px; }
  .catalog-hero h1 { font-size: 44px; }
  .catalog-hero p:not(.eyebrow) { font-size: 15px; }
  .categories-section, .products-section { padding-block: 38px 52px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-hero-inner { padding-block: 31px 28px; }
  .category-hero h1 { font-size: 42px; }
  .category-tools { align-items: stretch; flex-direction: column; }
  .results-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .view-filter { align-self: flex-start; }
  .product-card { border-radius: 20px; }
  .more-details-btn { padding: 7px 5px; font-size: 8px; }
  .product-heading-row { padding: 14px 14px 0; gap: 8px; }
  .product-main { grid-template-columns: minmax(0,1fr) 40%; margin-top: 12px; }
  .product-copy { padding: 0 14px 16px; }
  .products-grid.products-list-view .product-specs { grid-template-columns: 1fr; }
  .product-image-col { padding: 8px; gap: 8px; }
  .product-image-wrap { min-height: 90px; border-radius: 12px; }
  .public-footer > div { align-items: flex-start; flex-direction: column; }

  .products-grid.products-grid-view { grid-template-columns: 1fr; gap: 10px; }
  .products-grid.products-grid-view .product-image-wrap { min-height: 110px; }
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body, .category-hero { background: white !important; }
  .no-print, .site-header, .public-footer { display: none !important; }
  .public-container { width: 100%; }
  .category-hero-inner { padding: 0 0 8mm; }
  .category-hero h1 { font-size: 28pt; }
  .products-section { padding: 0; }
  .products-grid { gap: 6mm; }
  .product-card { break-inside: avoid; border: 1px solid #d7d7d7; border-radius: 18px; box-shadow: none; }
  .product-main { grid-template-columns: minmax(0,1fr) 68mm; min-height: 80mm; }
  .product-copy { padding: 6mm; }
  .product-image-wrap { grid-row: auto; min-height: 80mm; padding: 5mm; }
  .product-image-wrap img { max-height: 68mm; }
}

/* =========================================================
   v3.1 — Compact horizontal catalogue cards
   List mode follows the reference catalogue: visual/model on
   the left, technical information on the right, and remains
   horizontal on mobile.
   ========================================================= */
.model-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.model-line span { color: #aaa; font-size: 9px; font-weight: 800; }
.model-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.2; font-weight: 900; letter-spacing: .015em; }
.price-box { display: inline-flex; align-items: baseline; gap: 5px; }

/* LIST VIEW — DESKTOP / TABLET */
.products-grid.products-list-view { gap: 18px; }
.products-grid.products-list-view .product-card {
  border-color: rgba(0,0,0,.09);
  border-radius: 30px;
  box-shadow: 0 7px 22px rgba(15,15,15,.07);
}
.products-grid.products-list-view .product-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  min-height: 286px;
  margin-top: 0;
  align-items: stretch;
}
.products-grid.products-list-view .product-copy {
  min-width: 0;
  padding: 24px 34px 22px 26px;
}
.products-grid.products-list-view .product-heading-row {
  display: block;
  padding: 0 0 13px;
}
.products-grid.products-list-view .product-heading { max-width: none; }
.products-grid.products-list-view .product-title-row {
  display: block;
  text-align: right;
}
.products-grid.products-list-view .product-title-row h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.products-grid.products-list-view .product-title-row span {
  display: block;
  margin-top: 3px;
  color: var(--brand-red);
  font-size: clamp(12px, 1.15vw, 16px);
  line-height: 1.25;
}
.products-grid.products-list-view .product-heading p {
  margin-top: 5px;
  font-size: 10px;
}
.products-grid.products-list-view .product-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.products-grid.products-list-view .product-specs > div {
  display: grid;
  grid-template-columns: minmax(90px, 25%) minmax(0, 1fr);
  align-items: baseline;
  justify-content: initial;
  gap: 14px;
  min-height: 34px;
  border-bottom: 1px solid #eeeeec;
  padding: 6px 0;
}
.products-grid.products-list-view .product-specs dt {
  color: #666;
  font-size: 11.5px;
  line-height: 1.55;
  font-weight: 800;
}
.products-grid.products-list-view .product-specs dd {
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}
.products-grid.products-list-view .features-block {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 9px;
  margin-top: 11px;
}
.products-grid.products-list-view .features-block h3 {
  margin: 1px 0 0;
  color: #111;
  white-space: nowrap;
  font-size: 10.5px;
}
.products-grid.products-list-view .features-block > div {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: #555;
  font-size: 10px;
  line-height: 1.8;
}
.products-grid.products-list-view .features-block span {
  display: inline;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}
.products-grid.products-list-view .features-block span:not(:last-child)::after {
  content: "  |  ";
  color: #bbb;
}
.products-grid.products-list-view .product-footer-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}
.products-grid.products-list-view .price-area { display: block; }
.products-grid.products-list-view .price-box {
  border: 1.5px solid #171717;
  border-radius: 11px;
  padding: 5px 11px;
  background: #fff;
}
.products-grid.products-list-view .price-area small {
  margin: 0 0 0 4px;
  color: #999;
  font-size: 8px;
}
.products-grid.products-list-view .price-area span {
  font-size: clamp(15px, 1.55vw, 20px);
  line-height: 1;
}
.products-grid.products-list-view .price-area em { font-size: 9px; }
.products-grid.products-list-view .more-details-btn {
  flex: none;
  max-width: none;
  width: auto;
  min-height: 32px;
  border-radius: 10px;
  padding: 5px 11px;
  font-size: 9px;
}
.products-grid.products-list-view .product-image-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-inline-start: 1px solid rgba(0,0,0,.055);
  padding: 22px 20px 18px;
  background: #fbfbfa;
}
.products-grid.products-list-view .model-line { min-height: 23px; }
.products-grid.products-list-view .model-line strong { font-size: clamp(14px,1.4vw,19px); }
.products-grid.products-list-view .product-image-wrap {
  min-height: 155px;
  max-height: 176px;
  flex: 1;
  border-radius: 12px;
  padding: 2px;
}
.products-grid.products-list-view .product-image-wrap img {
  width: auto;
  max-width: 94%;
  height: auto;
  max-height: 168px;
  object-fit: contain;
}
.products-grid.products-list-view .buy-actions {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.products-grid.products-list-view .buy-actions a {
  height: 34px;
  border-radius: 9px;
  font-size: 9px;
}

/* GRID VIEW — keep the original option useful with the new markup */
.products-grid.products-grid-view .model-line { margin-bottom: 4px; }
.products-grid.products-grid-view .model-line span { font-size: 8px; }
.products-grid.products-grid-view .model-line strong { font-size: 12px; }
.products-grid.products-grid-view .product-heading-row { padding: 0 0 10px; }
.products-grid.products-grid-view .product-heading { max-width: none; }
.products-grid.products-grid-view .product-footer-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.products-grid.products-grid-view .price-box { display: inline-flex; align-items: baseline; gap: 4px; }
.products-grid.products-grid-view .more-details-btn { flex: none; max-width: none; width: auto; }

/* MOBILE LIST: horizontal card, one after another — never turns vertical. */
@media (max-width: 650px) {
  .products-section { padding-top: 28px; }
  .products-grid.products-list-view { gap: 12px; }
  .products-grid.products-list-view .product-card { border-radius: 21px; box-shadow: 0 5px 16px rgba(15,15,15,.065); }
  .products-grid.products-list-view .product-main {
    grid-template-columns: minmax(0, 1fr) 35%;
    min-height: 205px;
    margin-top: 0;
  }
  .products-grid.products-list-view .product-copy { padding: 13px 13px 11px 10px; }
  .products-grid.products-list-view .product-heading-row { padding: 0 0 7px; }
  .products-grid.products-list-view .product-title-row h2 {
    font-size: clamp(13px, 4.1vw, 16px);
    line-height: 1.28;
  }
  .products-grid.products-list-view .product-title-row span {
    margin-top: 2px;
    font-size: clamp(8.5px, 2.65vw, 10.5px);
    line-height: 1.25;
  }
  .products-grid.products-list-view .product-heading p {
    margin-top: 2px;
    font-size: 7.5px;
    line-height: 1.35;
  }
  .products-grid.products-list-view .product-specs > div {
    grid-template-columns: minmax(55px, 31%) minmax(0,1fr);
    gap: 6px;
    min-height: 22px;
    padding: 3px 0;
  }
  .products-grid.products-list-view .product-specs dt,
  .products-grid.products-list-view .product-specs dd {
    font-size: clamp(7.5px, 2.25vw, 9px);
    line-height: 1.4;
  }
  .products-grid.products-list-view .features-block {
    grid-template-columns: auto minmax(0,1fr);
    gap: 5px;
    margin-top: 6px;
  }
  .products-grid.products-list-view .features-block h3 {
    margin-top: 0;
    font-size: clamp(7.2px,2.1vw,8.5px);
    line-height: 1.6;
  }
  .products-grid.products-list-view .features-block > div {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: clamp(7px,2vw,8.2px);
    line-height: 1.55;
  }
  .products-grid.products-list-view .product-footer-row {
    gap: 6px;
    padding-top: 7px;
  }
  .products-grid.products-list-view .price-box {
    border-width: 1px;
    border-radius: 7px;
    padding: 3px 6px;
  }
  .products-grid.products-list-view .price-area small { display: none; }
  .products-grid.products-list-view .price-area span { font-size: clamp(10.5px,3.4vw,13px); }
  .products-grid.products-list-view .price-area em { font-size: 6.8px; }
  .products-grid.products-list-view .more-details-btn {
    min-height: 25px;
    border-radius: 7px;
    padding: 3px 5px;
    font-size: clamp(6.5px,1.9vw,7.8px);
  }
  .products-grid.products-list-view .product-image-col {
    gap: 5px;
    padding: 12px 8px 9px;
    background: #fafaf9;
  }
  .products-grid.products-list-view .model-line { display: block; min-height: 18px; text-align: left; }
  .products-grid.products-list-view .model-line span { display: none; }
  .products-grid.products-list-view .model-line strong {
    display: block;
    font-size: clamp(9.5px,3vw,12px);
    text-align: left;
  }
  .products-grid.products-list-view .product-image-wrap {
    min-height: 82px;
    max-height: 98px;
    border-radius: 8px;
    padding: 0;
  }
  .products-grid.products-list-view .product-image-wrap img {
    max-width: 98%;
    max-height: 94px;
  }
  .products-grid.products-list-view .product-image-wrap span { font-size: 8px; }
  .products-grid.products-list-view .buy-actions {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .products-grid.products-list-view .buy-actions a {
    height: 25px;
    border-radius: 7px;
    padding-inline: 3px;
    font-size: clamp(6.6px,2vw,8px);
  }
}

@media (max-width: 380px) {
  .products-grid.products-list-view .product-main { grid-template-columns: minmax(0,1fr) 34%; }
  .products-grid.products-list-view .product-copy { padding-inline: 10px 9px; }
  .products-grid.products-list-view .product-specs > div { grid-template-columns: 31% minmax(0,1fr); }
  .products-grid.products-list-view .features-block { display: block; }
  .products-grid.products-list-view .features-block h3 { margin-bottom: 1px; }
}

/* Shared size controls: readable, touch-friendly rows in every catalog view. */
.variant-selector {
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:8px;
  margin-top:12px;
  overflow:visible;
}
.variant-option {
  flex:0 1 auto;
  min-width:88px;
  min-height:60px;
  max-width:100%;
  overflow:hidden;
  border:2px solid #777;
  border-radius:9px;
  padding:0;
  background:#fff;
  color:#111;
  cursor:pointer;
  touch-action:manipulation;
  box-shadow:none;
  transition:box-shadow .16s ease, border-color .16s ease;
}
.variant-option:hover { border-color:var(--red-dark); }
.variant-option.is-active {
  border-color:var(--red-dark);
  box-shadow:0 0 0 1px var(--red-dark);
}
.variant-option:focus-visible {
  outline:3px solid #222;
  outline-offset:3px;
}
.variant-option .variant-size {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:4px 8px;
  background:#f1f1ef;
  color:#222;
  text-align:center;
  font-size:14px;
  line-height:1.5;
  font-weight:900;
}
.variant-option.is-active .variant-size { background:var(--red-dark); color:#fff; }
.variant-option.is-active .variant-size::after { content:"✓"; font-size:12px; }
.variant-option small {
  display:block;
  padding:3px 6px 4px;
  background:#fff;
  color:#222;
  text-align:center;
  font-size:12px;
  line-height:1.5;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
@media (max-width:650px) {
  .variant-selector { gap:8px; margin-top:10px; }
  .variant-option { flex:1 1 88px; }
}


/* =========================================================
   v3.4 — Sale prices + custom top-left product labels
   ========================================================= */
.product-corner-tag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  max-width: min(46%, 190px);
  overflow: hidden;
  border-radius: 26px 0 14px 0;
  padding: 8px 17px 9px;
  background: var(--brand-red);
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(206,14,45,.2);
}
.price-box .old-price {
  color: #999;
  font-size: .72em;
  font-weight: 800;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #888;
}
.price-box .sale-price {
  color: var(--brand-red);
  font-size: clamp(16px,1.7vw,22px);
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.price-box .sale-price[hidden] { display: none !important; }
.price-box.is-sale { border-color: var(--brand-red) !important; }
.variant-price-stack { display: grid !important; gap: 1px; }
.variant-price-stack del {
  color: #666;
  font-size: 12px;
  font-weight: 800;
}
.variant-price-stack strong {
  color: var(--red-dark);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 900;
}
.products-grid.products-list-view .price-box.is-sale {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  align-items: baseline;
  column-gap: 6px;
}
.products-grid.products-grid-view .product-corner-tag { border-radius: 20px 0 12px 0; }

/* Keep the corner tag clear of the model number in the image column. */
.product-card:has(.product-corner-tag) .model-line { margin-top: 34px; }

@media (max-width:650px) {
  .product-corner-tag {
    max-width: 48%;
    border-radius: 21px 0 9px 0;
    padding: 5px 9px 6px;
    font-size: 7px;
  }
  .product-card:has(.product-corner-tag) .model-line { margin-top: 22px; }
  .products-grid.products-list-view .price-box.is-sale {
    grid-template-columns: auto auto auto;
    gap: 3px;
  }
  .products-grid.products-list-view .price-box.is-sale > small { display: none; }
  .products-grid.products-list-view .price-box .old-price { font-size: 7.5px; }
  .products-grid.products-list-view .price-box .sale-price { font-size: clamp(10.5px,3.4vw,13px); }
}

@media print {
  .product-corner-tag { box-shadow: none; }
}
