/* ==========================================================================
   CCTV shop & service — main stylesheet
   ========================================================================== */

:root {
  --navy-900: #0B1220;
  --navy-800: #111B2E;
  --navy-700: #16233A;
  --navy-600: #1E293B;
  --navy-500: #22314A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #EEF2F7;
  --nav-muted: #C7D0DD;
  --ink: #0F172A;
  --bg: #F5F7FA;
  --white: #FFFFFF;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-800: #92400E;
  --amber-100: #FEF3C7;
  --amber-300: #FCD34D;
  --on-amber: #111827;
  --danger: #B91C1C;

  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Manrope, Inter, system-ui, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); margin: 0; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }

a { color: var(--ink); }
a:hover { color: var(--amber-700); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--amber-500); color: var(--on-amber);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 700; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--amber-500); color: var(--on-amber); }
.btn-primary:hover { background: var(--amber-600); color: var(--on-amber); }

.btn-outline { border-color: #475569; color: var(--white); font-weight: 600; }
.btn-outline:hover { border-color: var(--slate-400); color: var(--white); }

.btn-dark {
  width: 100%; min-height: 44px; border: 0;
  background: var(--navy-900); color: var(--white);
  font-weight: 600; font-size: 15px;
}
.btn-dark:hover { background: var(--navy-600); }

.btn-light {
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--slate-300); background: var(--white); color: var(--ink);
  font-weight: 600;
}

.btn-lg { min-height: 52px; padding: 0 28px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--navy-900); color: var(--white); }

.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 16px; padding-bottom: 16px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); text-decoration: none;
}
.brand:hover { color: var(--white); }
.brand-name {
  font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: .02em;
}

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 15px; }
.main-nav a { color: var(--nav-muted); text-decoration: none; }
.main-nav a:hover { color: var(--white); }
.main-nav a[aria-current="page"] { color: var(--white); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex; border: 1px solid var(--slate-700); border-radius: var(--radius-sm); overflow: hidden;
}
.lang-switch button {
  min-width: 44px; min-height: 36px; border: 0;
  background: transparent; color: var(--nav-muted);
  font-weight: 600; font-size: 13px;
}
.lang-switch button[aria-pressed="true"] { background: var(--amber-500); color: var(--on-amber); }

.cart-link {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--navy-600); color: var(--white);
}
.cart-link:hover { color: var(--white); background: var(--slate-700); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--amber-500); color: var(--on-amber);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-count.bump { animation: bump .3s ease; }
@keyframes bump { 50% { transform: scale(1.3); } }

/* ---------- Hero ---------- */
.hero { background: var(--navy-900); color: var(--white); border-top: 1px solid var(--navy-600); }
.hero-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 56px;
  padding-top: 88px; padding-bottom: 96px;
}
.hero-copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 24px; }
.badge {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  background: var(--navy-600); color: var(--amber-300);
  font-size: 13px; font-weight: 600;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; font-weight: 800; }
.hero-sub { font-size: 18px; line-height: 1.6; color: var(--nav-muted); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.cam-grid {
  flex: 1 1 420px; min-height: 340px; padding: 10px;
  border-radius: var(--radius-xl); background: var(--navy-800); border: 1px solid var(--navy-500);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.cam-tile {
  min-height: 150px; padding: 12px; border-radius: 12px; background: var(--navy-700);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cam-label { font-size: 11px; color: var(--slate-400); }
.cam-live {
  align-self: flex-start; padding: 2px 6px; border-radius: 4px;
  background: var(--amber-500); color: var(--on-amber); font-size: 11px; font-weight: 700;
}
.cam-live::before { content: "● "; animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Sections ---------- */
.section { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 32px; }
.section--lead { padding-top: 88px; padding-bottom: 40px; }
.section--end { padding-top: 40px; padding-bottom: 96px; }
.section-head { display: flex; flex-direction: column; gap: 8px; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-title { font-size: clamp(28px, 3.5vw, 36px); font-weight: 800; }
.section-sub { font-size: 17px; color: var(--slate-600); }
.link-accent { font-weight: 600; color: var(--amber-700); }

.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card h3 { font-size: 20px; font-weight: 700; }
.card p { font-size: 15px; line-height: 1.55; color: var(--slate-600); }
.icon-box {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--amber-100); color: var(--amber-800);
  display: flex; align-items: center; justify-content: center;
}

.why-card {
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  background: var(--white); border-top: 3px solid var(--amber-500); border-radius: 0 0 12px 12px;
}
.why-card h3 { font-size: 18px; font-weight: 700; }
.why-card p { font-size: 15px; line-height: 1.55; color: var(--slate-600); }

.cta-band {
  background: var(--navy-900); color: var(--white); border-radius: 24px;
  padding: 56px 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.cta-band p { font-size: 17px; color: var(--nav-muted); }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-grid--featured { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.product-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.product-media {
  height: 170px; background: var(--slate-100); color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.product-cat {
  font-size: 12px; font-weight: 600; color: var(--amber-800);
  text-transform: uppercase; letter-spacing: .06em;
}
.product-name { font-size: 16px; font-weight: 700; line-height: 1.35; }
.product-spec { font-size: 13px; color: var(--slate-600); }
.product-price { font-size: 18px; font-weight: 700; margin-top: auto; }

.empty-state {
  grid-column: 1 / -1; padding: 48px 24px; text-align: center;
  background: var(--white); border: 1px dashed var(--slate-300); border-radius: var(--radius-lg);
  color: var(--slate-600);
}

/* ---------- Shop page ---------- */
.page-head {
  padding-top: 48px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.page-title { font-size: clamp(30px, 4vw, 40px); font-weight: 800; line-height: 1.15; }
.page-sub { font-size: 16px; color: var(--slate-600); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field-label { font-size: 14px; font-weight: 600; color: var(--slate-700); }
.input {
  min-height: 44px; padding: 0 12px; width: 100%;
  border: 1px solid var(--slate-300); border-radius: var(--radius);
  background: var(--white); color: var(--ink); font-size: 15px;
}
textarea.input { padding: 10px 12px; min-height: 0; resize: vertical; }
.input:focus { border-color: var(--amber-600); outline: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); }

.search-field { min-width: 260px; }
.search-field label { font-size: 13px; }

.shop-layout {
  padding-top: 8px; padding-bottom: 96px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start;
}
.shop-sidebar { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 24px; }
.shop-results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.result-count { font-size: 14px; color: var(--slate-600); }

.filter-title {
  margin-bottom: 4px; font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--slate-700);
}
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-btn {
  min-height: 44px; padding: 0 14px; text-align: left;
  border: 1px solid var(--slate-200); border-radius: var(--radius);
  background: var(--white); color: var(--ink); font-size: 15px; font-weight: 500;
}
.filter-btn:hover { border-color: var(--slate-400); }
.filter-btn[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

.help-box {
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md);
}
.help-box h2 { font-size: 16px; font-weight: 700; }
.help-box p { font-size: 14px; line-height: 1.55; color: var(--slate-600); }
.help-box .btn { min-height: 44px; font-size: 14px; padding: 0 16px; }

/* ---------- Service page ---------- */
.service-layout {
  padding-top: 56px; padding-bottom: 96px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start;
}
.service-intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 24px; }
.service-intro .page-sub { font-size: 17px; line-height: 1.6; }

.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  background: var(--navy-900); color: var(--amber-500); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-body { display: flex; flex-direction: column; gap: 2px; }
.step-title { font-weight: 700; font-size: 16px; }
.step-text { font-size: 14px; color: var(--slate-600); }

.call-box {
  padding: 20px; border-radius: var(--radius-md);
  background: var(--navy-900); color: var(--nav-muted);
  display: flex; flex-direction: column; gap: 4px; font-size: 15px;
}
.call-box strong { color: var(--white); }
.call-box a { color: var(--amber-300); font-weight: 700; font-size: 18px; text-decoration: none; }

.form-panel {
  flex: 1 1 520px; padding: 32px;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-xl);
}
.booking-form { display: flex; flex-direction: column; gap: 20px; }
.booking-form h2 { font-size: 22px; font-weight: 700; }
.booking-form fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.booking-form legend { padding: 0; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.type-option { position: relative; }
.type-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.type-option span {
  display: flex; align-items: center; min-height: 48px; padding: 0 14px;
  border: 2px solid var(--slate-200); border-radius: var(--radius);
  background: var(--white); font-size: 15px; font-weight: 600;
}
.type-option input:checked + span { border-color: var(--amber-600); background: var(--amber-100); }
.type-option input:focus-visible + span { outline: 3px solid var(--amber-500); outline-offset: 2px; }

.form-status { font-size: 14px; color: var(--danger); }
.btn[disabled] { opacity: .6; cursor: progress; }

.form-success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px 0; }
.form-success h2 { font-size: 28px; font-weight: 800; }
.form-success p { font-size: 16px; color: var(--slate-600); }
.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--amber-100); color: var(--amber-800);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--nav-muted); }
.footer-grid {
  padding-top: 56px; padding-bottom: 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px;
  font-size: 15px; line-height: 1.7;
}
.footer-col { display: flex; flex-direction: column; gap: 4px; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--white); margin-bottom: 4px; }
.footer-heading { color: var(--white); font-weight: 600; }
.site-footer a { color: var(--nav-muted); }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--navy-600); padding: 20px 24px;
  text-align: center; font-size: 13px; color: var(--slate-400);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: var(--radius);
  background: var(--navy-900); color: var(--white); font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .header-inner { gap: 12px; }
  .main-nav { order: 3; width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .cam-grid { min-height: 0; }
  .cam-tile { min-height: 100px; }
  .cta-band { padding: 36px 24px; }
  .shop-sidebar { max-width: none; }
  .filter-list { flex-direction: row; flex-wrap: wrap; }
  .filter-btn { flex: 0 0 auto; }
  .search-field { min-width: 0; width: 100%; }
  .form-panel { padding: 20px; }
  .form-grid, .type-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
