/* =========================================================
   Front-office styles
   ========================================================= */

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--primary); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- Top bar & header (always navy) ---------- */
.topbar { background: var(--navy-950); color: var(--on-navy-2); font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.topbar-info { display: flex; align-items: center; gap: 20px; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; transition: color 0.15s; }
a.topbar-item:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 21, 49, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--on-navy);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: #fff; flex-shrink: 0; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #3d7bff 0%, #3dd6f5 100%); color: #fff;
  box-shadow: 0 6px 18px -6px rgba(61, 123, 255, 0.8);
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--on-navy-2);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a.active { color: #fff; }
.main-nav a.active::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: -15px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary);
}
.nav-count {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
}

.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.site-header .icon-btn { color: var(--on-navy); }
.site-header .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang-btn { font-weight: 800; font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.18) !important; }
.menu-btn { display: none !important; }
.menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Quick search ---------- */
.quick-search { position: relative; flex: 1; max-width: 420px; margin-inline-start: auto; }
.quick-search .qs-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--on-navy-2); pointer-events: none; }
.quick-search input {
  height: 44px; min-height: 0; padding-inline: 42px 40px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; border-radius: 12px;
}
.quick-search input::placeholder { color: var(--on-navy-2); }
.quick-search input:focus { background: rgba(255, 255, 255, 0.11); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(61, 123, 255, 0.25); }
.quick-search input::-webkit-search-cancel-button { display: none; }
.qs-kbd {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  min-width: 22px; padding: 1px 6px; text-align: center;
  font: 600 12px/1.5 var(--font); color: var(--on-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
}
.quick-search input:focus ~ .qs-kbd { display: none; }

.qs-results {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 60;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; min-width: 320px;
}
.qs-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; transition: background 0.12s; }
.qs-item:hover, .qs-item.is-active { background: var(--primary-soft); }
.qs-item img { width: 46px; height: 46px; border-radius: 10px; background: var(--img-bg); object-fit: contain; flex-shrink: 0; }
.qs-item-text { flex: 1; min-width: 0; }
.qs-item-text strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-item-text small { color: var(--muted); font-size: 12.5px; }
.qs-item-price { font-weight: 700; color: var(--primary); white-space: nowrap; }
.qs-item mark { background: transparent; color: var(--primary); }
.qs-empty { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.qs-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; font-weight: 600; font-size: 14px; color: var(--primary); border-top: 1px solid var(--border); }
.qs-all:hover { background: var(--surface-2); }

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--navy-900); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 85% 30%, rgba(61, 123, 255, 0.45) 0%, transparent 60%),
    radial-gradient(45% 60% at 10% 90%, rgba(61, 214, 245, 0.18) 0%, transparent 60%),
    linear-gradient(160deg, #0a1f4a 0%, #071531 60%, #040c1f 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 70% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000 0%, transparent 75%);
}
.hero-inner { position: relative; padding-block: 48px 128px; }
.slides { display: grid; }
.slide {
  grid-area: 1 / 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0.7s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
.slide-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(61, 123, 255, 0.3);
}
.hero .eyebrow { background: rgba(61, 214, 245, 0.12); color: var(--accent); border-color: rgba(61, 214, 245, 0.3); }
.slide-title { font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
.slide-sub { font-size: 17.5px; color: var(--on-navy-2); max-width: 480px; }
.slide-media { display: flex; justify-content: center; }
.slide-media img { width: 100%; max-width: 560px; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.45)); }
.slide.is-active .slide-media img { animation: float-in 0.9s var(--ease) both; }
@keyframes float-in { from { transform: translateY(24px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.slider-controls { position: absolute; bottom: 64px; inset-inline-start: 20px; display: flex; align-items: center; gap: 14px; }
.slider-arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.slider-arrow:hover { background: var(--primary); border-color: var(--primary); }
.slider-arrow.sm { width: 38px; height: 38px; background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.slider-arrow.sm:hover { color: #fff; }
.slider-dots { display: flex; gap: 8px; }
.slider-dot { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.3); transition: width 0.3s var(--ease), background 0.3s; }
.slider-dot.is-active { width: 30px; background: var(--accent); }

/* ---------- Quick find ---------- */
.quick-find {
  position: relative; z-index: 2; margin-top: -42px;
  display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 12px; align-items: center;
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.qf-title { display: flex; align-items: center; gap: 10px; padding-inline: 8px 12px; color: var(--primary); }
.qf-title strong { color: var(--text); font-size: 15.5px; white-space: nowrap; }

/* ---------- Sections ---------- */
.section { padding-block: 64px 0; }
.section-tight { padding-block: 48px 0; }
.section-top-sm { padding-top: 32px; }
.section-band { margin-top: 64px; padding-block: 56px; background: var(--bg-elev); border-block: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin-top: 6px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section-actions { display: flex; align-items: center; gap: 10px; }
.section-actions .link-arrow { margin-inline-start: 8px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.link-arrow:hover { gap: 9px; }
.link-arrow .icon { transition: transform 0.15s; }

/* Brands */
.brand-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.brand-chip {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.brand-chip:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.brand-initial {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 18px;
}
.brand-chip strong { display: block; font-size: 14.5px; }
.brand-chip small { color: var(--muted); font-size: 12.5px; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform 0.22s var(--ease), box-shadow 0.22s, border-color 0.22s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.pc-media { position: relative; display: block; aspect-ratio: 1; background: var(--img-bg); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform 0.4s var(--ease); }
.product-card:hover .pc-media img { transform: scale(1.05); }
.pc-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-soldout {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(4, 12, 31, 0.55); color: #fff; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.pc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-brand { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pc-title { font-size: 16.5px; font-weight: 700; }
.pc-title a:hover { color: var(--primary); }
.pc-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.pc-specs { display: flex; flex-wrap: wrap; gap: 6px 12px; list-style: none; margin: 0; padding: 0; color: var(--text-2); font-size: 13px; }
.pc-specs li { display: inline-flex; align-items: center; gap: 5px; }
.pc-specs .icon { color: var(--muted); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price strong { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.price s { color: var(--muted); font-size: 13.5px; }
.compare-toggle { position: relative; z-index: 1; border: 1px solid var(--border-strong) !important; color: var(--text-2); }
.compare-toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary) !important; color: #fff; }

/* Horizontal scroller */
.scroll-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 8px;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; }

/* ---------- Features & CTA ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { display: flex; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.feature h3 { font-size: 15.5px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 13.5px; }
.feature-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
}
.feature-icon.wa { background: rgba(31, 168, 85, 0.14); color: #1fa855; }

.cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 44px; border-radius: var(--radius-xl); color: #fff;
  background:
    radial-gradient(50% 120% at 100% 0%, rgba(61, 214, 245, 0.25) 0%, transparent 60%),
    linear-gradient(120deg, var(--navy-700) 0%, var(--navy-600) 55%, #2563eb 100%);
}
.cta h2 { font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; margin-bottom: 8px; }
.cta p { color: rgba(255, 255, 255, 0.82); max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.reveal-btn small { font-size: 12px; font-weight: 600; opacity: 0.7; margin-inline-start: 4px; }
.reveal-btn.is-revealed small { display: none; }
.reveal-inline { padding: 0; border: 0; background: none; display: inline-flex; align-items: baseline; gap: 8px; color: var(--text); font-weight: 700; font-size: 16px; }
.reveal-inline small { color: var(--primary); font-weight: 600; font-size: 13px; text-decoration: underline; }
.reveal-inline.is-revealed small { display: none; }

/* ---------- Articles ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.22s var(--ease), box-shadow 0.22s; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ac-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.ac-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.article-card:hover .ac-media img { transform: scale(1.04); }
.ac-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.ac-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ac-body h3 { font-size: 18px; }
.ac-body h3 a:hover { color: var(--primary); }
.ac-body p { color: var(--text-2); font-size: 14.5px; }
.ac-body .link-arrow { margin-top: auto; padding-top: 4px; }

/* ---------- Page head & breadcrumbs ---------- */
.page-head { padding: 36px 0 28px; background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text-2); }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; padding-top: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.filters-close { display: none !important; }
.filter-group { border: 0; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--border); min-width: 0; }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { min-height: 40px; padding: 8px 10px; }
.filters-actions { display: grid; gap: 8px; padding-top: 14px; }
.filters-open { display: none !important; }
.filters-backdrop { display: none; }

.results-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.results-count { font-weight: 600; color: var(--text-2); }
.results-bar .select { margin-inline-start: auto; min-width: 210px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; }
.page-link { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; transition: all 0.15s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-gap { color: var(--muted); padding: 0 4px; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 64px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-state h2, .empty-state h1 { font-size: 21px; }
.empty-state p { color: var(--muted); max-width: 420px; margin-bottom: 8px; }
.empty-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.empty-404 { border-style: solid; }
.big-404 { font-size: clamp(72px, 12vw, 128px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Product page ---------- */
.product-page { padding-top: 24px; }
.product-main { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; margin-top: 18px; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 16px); }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--radius-xl); background: var(--img-bg); border: 1px solid var(--border); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 28px; transition: opacity 0.25s; }
.gallery-main .pc-badges { top: 18px; inset-inline-start: 18px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { width: 78px; height: 78px; flex-shrink: 0; padding: 4px; border-radius: 14px; border: 2px solid var(--border); background: var(--img-bg); transition: border-color 0.15s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--primary); }

.product-info { display: flex; flex-direction: column; gap: 18px; }
.pi-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pi-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin-top: -6px; }
.pi-cond-desc { color: var(--muted); margin-top: -10px; }
.stock { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.stock.in { color: var(--success); }
.stock.out { color: var(--danger); }
.pi-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pi-price strong { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.pi-price s { color: var(--muted); font-size: 18px; }
.pi-price .save { padding: 3px 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 700; }

.key-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
.key-specs li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-weight: 700; }
.key-specs .icon { color: var(--primary); }
.key-specs small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

.health { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.health-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.health-label span { display: inline-flex; align-items: center; gap: 8px; }
.health-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.health-bar span { display: block; height: 100%; border-radius: inherit; background: var(--success); transition: width 1s var(--ease); }
.health-ok .health-bar span { background: var(--warning); }
.health-low .health-bar span { background: var(--danger); }
.health-good strong { color: var(--success); }
.health-ok strong { color: var(--warning); }
.health-low strong { color: var(--danger); }

.contact-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-row .compare-toggle[aria-pressed="true"] { color: #fff; }
.reveal-actions { display: grid; }
.safe-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); }
.safe-tip .icon { margin-top: 3px; }
.pi-meta { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.pi-meta span { display: inline-flex; align-items: center; gap: 6px; }

.product-details { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; align-items: start; }
.product-details h2 { font-size: 19px; margin-bottom: 14px; }
.spec-table th, .spec-table td { padding: 11px 0; border-bottom: 1px solid var(--border); text-align: start; font-size: 14.5px; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--muted); }
.spec-table td { font-weight: 600; text-align: end; }

.prose { color: var(--text-2); font-size: 15.5px; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose h2 { color: var(--text); font-size: 22px; margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--primary); }
.prose-lg { font-size: 17px; }

/* ---------- Compare ---------- */
.compare-page { padding-top: 24px; }
.compare-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.compare-toolbar .select { min-width: 260px; }
.compare-toolbar [data-compare-clear] { margin-inline-start: auto; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.compare-table { min-width: calc(180px + var(--cols) * 210px); table-layout: fixed; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; font-size: 14.5px; }
.compare-table .ct-label { position: sticky; inset-inline-start: 0; z-index: 1; width: 180px; text-align: start; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.compare-table tbody .ct-label { display: table-cell; }
.compare-table tbody .ct-label .icon { display: inline-block; vertical-align: -3px; margin-inline-end: 8px; color: var(--muted); }
.ct-phone { position: relative; vertical-align: top !important; padding-top: 20px !important; }
.ct-remove { position: absolute; top: 8px; inset-inline-end: 8px; width: 32px; height: 32px; color: var(--muted); }
.ct-media { display: block; width: 130px; height: 130px; margin: 0 auto 10px; border-radius: 18px; background: var(--img-bg); }
.ct-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.ct-name { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }
.ct-name:hover { color: var(--primary); }
.ct-price { font-size: 18px !important; font-weight: 800; }
.compare-table td.is-best { background: var(--success-soft); font-weight: 700; }
.best-tag { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; background: var(--success); color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.mini-health { display: inline-block; width: 46px; height: 6px; margin-inline-end: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; vertical-align: 1px; }
.mini-health span { display: block; height: 100%; background: var(--success); }
.compare-table tr:last-child td, .compare-table tr:last-child th { border-bottom: 0; }
.compare-page.only-diff tr[data-same="1"] { display: none; }

/* Floating compare tray */
.compare-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  background: rgba(7, 21, 49, 0.96); color: var(--on-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  animation: slide-up 0.3s var(--ease);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
.compare-bar-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; padding-block: 10px; }
.compare-items { display: flex; gap: 10px; flex: 1; overflow-x: auto; }
.compare-item { position: relative; display: flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 6px 30px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); flex-shrink: 0; max-width: 220px; }
.compare-item img { width: 44px; height: 44px; border-radius: 9px; background: var(--navy-800); object-fit: contain; }
.compare-item span { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-item button { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--on-navy-2); }
.compare-item button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.compare-slot { width: 56px; height: 56px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, 0.2); flex-shrink: 0; }
.compare-bar-actions { display: flex; align-items: center; gap: 10px; }
.compare-bar-count { font-size: 13.5px; color: var(--on-navy-2); white-space: nowrap; }
.compare-bar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
body.has-compare-bar { padding-bottom: 80px; }
body.has-compare-bar .chat { bottom: 96px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90;
  padding: 12px 20px; border-radius: 12px; background: var(--navy-800); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.12);
  animation: toast-in 0.25s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.contact-info { display: grid; gap: 12px; }
.info-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.15s; }
a.info-card:hover { border-color: var(--primary); }
.info-card h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.info-card p { font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form .alert { margin: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .btn { align-self: flex-start; }

/* ---------- Article page ---------- */
.article-head { padding: 40px 0 28px; }
.article-head h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 12px; }
.article-lead { font-size: 18.5px; color: var(--text-2); margin-bottom: 14px; }
.article-cover { width: 100%; border-radius: var(--radius-xl); margin-bottom: 32px; border: 1px solid var(--border); aspect-ratio: 16 / 9; object-fit: cover; }
.back-link { margin-top: 36px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; background: var(--navy-950); color: var(--on-navy-2); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-block: 56px 40px; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-about p { margin: 16px 0 18px; max-width: 380px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--accent); }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: #fff; transition: background 0.15s; }
.socials a:hover { background: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }
.footer-langs { display: flex; gap: 14px; }
.footer-langs a.active { color: #fff; font-weight: 700; }

/* ---------- Live chat ---------- */
.chat { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 80; transition: bottom 0.3s var(--ease); }
.chat-fab {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #2a5fe0 100%); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(61, 123, 255, 0.75); transition: transform 0.2s var(--ease);
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab-open, .chat-fab-close { display: grid; place-items: center; }
.chat:not(.is-open) .chat-fab-close, .chat.is-open .chat-fab-open { display: none; }
.chat-badge { position: absolute !important; top: -2px; inset-inline-end: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; border: 2px solid var(--bg); }
.chat-panel {
  position: absolute; bottom: 74px; inset-inline-end: 0;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: chat-in 0.25s var(--ease);
  transform-origin: bottom right;
}
[dir="rtl"] .chat-panel { transform-origin: bottom left; }
@keyframes chat-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(120deg, var(--navy-800), var(--navy-600)); color: #fff; }
.chat-head strong { display: block; font-size: 15.5px; }
.chat-head small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--on-navy-2); }
.chat-head .chat-new { margin-inline-start: auto; color: #fff; }
.chat-head .chat-new:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-elev); }
.chat-body > div[data-chat-messages] { display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg-admin { align-self: flex-start; }
.chat-msg-visitor { align-self: flex-end; align-items: flex-end; }
.chat-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg-admin .chat-bubble { background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 4px; }
.chat-msg-visitor .chat-bubble { background: var(--primary); color: #fff; border-end-end-radius: 4px; }
.chat-time { font-size: 11px; color: var(--muted); margin-top: 3px; padding-inline: 4px; }
.chat-note { align-self: center; text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.chat-context { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px; color: var(--text-2); background: var(--primary-soft); border-top: 1px solid var(--border); }
.chat-start { display: grid; gap: 8px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-start input, .chat-start textarea { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.chat-start textarea { min-height: 64px; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-compose textarea { min-height: 42px; max-height: 120px; padding: 10px 14px; resize: none; border-radius: 21px; font-size: 14.5px; }
.btn-send { width: 42px; height: 42px; border-radius: 50%; background: var(--primary) !important; color: #fff !important; flex-shrink: 0; }
.btn-send:hover { filter: brightness(1.1); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .main-nav a { padding: 8px 10px; }
  .brand-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .menu-btn { display: inline-grid !important; }
  /* backdrop-filter would make the header the containing block of the fixed menu and squash it to header height */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--navy-900); }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { z-index: 95; }
  .main-nav {
    position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 70;
    width: min(320px, 85vw); flex-direction: column; align-items: stretch; gap: 4px;
    padding: 104px 16px 24px; overflow-y: auto; background: var(--navy-900); box-shadow: var(--shadow-lg);
    /* clip-path (not transform) so the closed drawer never creates horizontal overflow */
    clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path 0.3s var(--ease), visibility 0.3s;
  }
  [dir="rtl"] .main-nav { clip-path: inset(0 100% 0 0); }
  .main-nav.is-open { clip-path: inset(0); visibility: visible; }
  .main-nav a { padding: 12px 16px; font-size: 16px; }
  .main-nav a.active { background: rgba(61, 123, 255, 0.16); }
  .main-nav a.active::after { display: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 92; background: rgba(4, 12, 31, 0.6); }
  .menu-btn { position: relative; z-index: 75; }

  .product-grid, .product-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scroll-row { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .quick-find { grid-template-columns: 1fr 1fr 1fr auto; }
  .qf-title { display: none; }

  .shop-layout { grid-template-columns: 1fr; }
  .filters {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 85;
    width: min(340px, 88vw); max-height: none; border-radius: 0;
    clip-path: inset(0 100% 0 0); visibility: hidden; transition: clip-path 0.3s var(--ease), visibility 0.3s;
  }
  [dir="rtl"] .filters { clip-path: inset(0 0 0 100%); }
  .filters.is-open { clip-path: inset(0); visibility: visible; }
  .filters-close, .filters-open { display: inline-flex !important; }
  .filters-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 84; background: rgba(4, 12, 31, 0.6); }

  .product-main { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; max-width: 560px; margin-inline: auto; width: 100%; }
  .product-details { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .quick-search { order: 10; flex-basis: 100%; max-width: none; margin: 0 0 12px; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 12px; row-gap: 12px; }
  .qs-kbd { display: none; }
  .slide { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .slide-text { align-items: center; margin-inline: auto; }
  .slide-media { order: -1; }
  .slide-media img { max-width: 360px; }
  .hero-inner { padding-block: 24px 120px; }
  .slider-controls { inset-inline-start: 50%; transform: translateX(-50%); }
  [dir="rtl"] .slider-controls { transform: translateX(50%); }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-wrap: wrap; align-items: flex-start; }
  .section-actions .slider-arrow { display: none; }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .hide-sm { display: none !important; }
  .topbar-info { gap: 14px; }
  .product-grid, .product-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .scroll-row { grid-auto-columns: 72%; gap: 12px; }
  .pc-body { padding: 12px 12px 14px; gap: 6px; }
  .pc-title { font-size: 15px; }
  .price strong { font-size: 17px; }
  .pc-top .cond { display: none; }
  .hide-xs { display: none !important; }
  .brand-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .features { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .quick-find { grid-template-columns: 1fr; margin-top: -48px; }
  .cta { padding: 28px 22px; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; }
  .key-specs { grid-template-columns: 1fr 1fr; }
  .pi-price strong { font-size: 32px; }
  .results-bar .select { min-width: 0; flex: 1; }
  .results-count { display: none; }
  .compare-bar-inner { gap: 10px; }
  .compare-bar-actions .btn-ghost { display: none; }
  .compare-items .compare-item span { display: none; }
  .compare-item { padding-inline-end: 26px; }
  .compare-bar-count, .compare-slot { display: none; }
  .chat { bottom: 16px; inset-inline-end: 16px; }
  .chat-panel { position: fixed; inset: auto 8px 86px 8px; width: auto; height: min(70vh, 560px); }
  .compare-toolbar .select { min-width: 0; flex-basis: 100%; }
}
