/* ===== Tokens ===== */
:root {
  --navy-900: #0c1826;
  --navy-800: #132339;
  --navy-700: #1c3454;
  --navy-600: #274a6e;
  --orange-500: #ff6a1a;
  --orange-600: #e35c0f;
  --gray-50: #f7f8fa;
  --gray-100: #eef1f4;
  --gray-200: #e2e6ea;
  --gray-400: #9aa5b1;
  --gray-500: #6b7684;
  --gray-700: #3a4552;
  --white: #ffffff;
  --success: #1a8f4c;
  --sale-red: #d9392c;
  --star: #ffb400;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 3px rgba(12, 24, 38, 0.08), 0 1px 2px rgba(12, 24, 38, 0.06);
  --shadow-md: 0 4px 16px rgba(12, 24, 38, 0.12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 800; color: var(--navy-800); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--orange-500); color: var(--navy-900);
  padding: 10px 16px; z-index: 1000; font-weight: 700;
}
.skip-link:focus { left: 10px; top: 10px; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 44px; height: 44px; }
.icon-xl { width: 120px; height: 120px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--orange-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--orange-600); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-outline { background: transparent; border-color: var(--navy-700); color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-add-cart.added { background: var(--success); border-color: var(--success); color: var(--white); }

/* ===== Topbar ===== */
.topbar { background: var(--navy-900); color: var(--gray-200); font-size: 0.8rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; gap: 12px; flex-wrap: wrap; }
.topbar-inner span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-phone a { color: var(--orange-500); font-weight: 700; }

/* ===== Header ===== */
.site-header { background: var(--navy-800); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 20px; }
.menu-toggle { display: none; background: none; border: none; color: var(--white); padding: 6px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.logo-mark { display: inline-flex; align-items: center; }
.logo-mark svg { height: 36px; width: auto; }
.logo-text em { font-style: normal; color: var(--orange-500); }

.search-form { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.search-form input {
  flex: 1; border: none; border-radius: var(--radius) 0 0 var(--radius); padding: 10px 14px;
  font-size: 0.9rem; background: var(--white);
}
.search-form input:focus { outline: 2px solid var(--orange-500); outline-offset: -2px; }
.search-form button {
  background: var(--orange-500); border: none; color: var(--navy-900); padding: 0 16px;
  border-radius: 0 var(--radius) var(--radius) 0; display: flex; align-items: center;
}
.search-form button:hover { background: var(--orange-600); }

.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.cart-link { position: relative; color: var(--white); display: inline-flex; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--orange-500); color: var(--navy-900);
  font-size: 0.7rem; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.main-nav { background: var(--navy-700); position: relative; }
.main-nav-inner { overflow-x: auto; scrollbar-width: none; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav-inner ul { display: flex; flex-wrap: nowrap; gap: 4px; }
.main-nav::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 32px; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--navy-700));
}
.main-nav-inner a {
  display: block; padding: 11px 14px; color: var(--gray-200); font-size: 0.88rem; font-weight: 600;
  white-space: nowrap;
}
.main-nav-inner a:hover { color: var(--white); background: rgba(255,255,255,0.06); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: var(--white); }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 40px; padding: 64px 20px; }
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.hero-copy h1 { color: var(--white); font-size: 2.6rem; line-height: 1.1; margin-bottom: 0.4em; }
.hero-copy p { color: var(--gray-200); font-size: 1.05rem; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: absolute; top: 0; right: 0; height: 100%; width: clamp(280px, 42vw, 640px); }
.hero-visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: 45% 12%; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 35%, black 60%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 35%, black 60%, black 88%, transparent 100%);
}

/* ===== Value props ===== */
.value-props { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.value-props-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 24px 20px; }
.value-item { display: flex; align-items: center; gap: 10px; color: var(--navy-800); }
.value-item .icon { color: var(--orange-500); }
.value-item strong { display: block; font-size: 0.9rem; }
.value-item span { font-size: 0.8rem; color: var(--gray-500); }

/* ===== Sections ===== */
.section { padding: 56px 0; }
.section.alt-bg { background: var(--gray-50); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { color: var(--gray-500); }

/* ===== Category grid ===== */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.category-tile {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 26px 14px; text-align: center; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.category-tile:hover { border-color: var(--orange-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-tile-icon { display: flex; justify-content: center; margin-bottom: 12px; color: var(--navy-700); }
.category-tile-name { font-weight: 700; font-size: 0.88rem; color: var(--navy-800); }

/* ===== Product grid / card ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-media {
  position: relative; background: var(--gray-50); display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; border-bottom: 1px solid var(--gray-200);
}
.product-visual { color: var(--navy-700); }
.badge {
  position: absolute; top: 10px; left: 10px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px; letter-spacing: 0.03em;
}
.badge-sale { background: var(--sale-red); color: var(--white); }
.badge-featured { background: var(--orange-500); color: var(--navy-900); }

.product-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.product-card-name { font-weight: 700; font-size: 0.92rem; color: var(--navy-800); line-height: 1.3; }
.product-card-name:hover { color: var(--orange-600); }

.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .icon { width: 13px; height: 13px; }
.star-full { color: var(--star); fill: var(--star); }
.star-empty { color: var(--gray-200); }
.rating-count { font-size: 0.76rem; color: var(--gray-500); }

.product-card-price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--navy-800); font-size: 1.05rem; }
.price-lg { font-size: 1.7rem; }
.price-unit { font-size: 0.76rem; color: var(--gray-500); }
.price-compare { font-size: 0.82rem; color: var(--gray-400); text-decoration: line-through; }

.product-card-body .btn-add-cart { margin-top: 8px; width: 100%; }

/* ===== Why section ===== */
.why-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.why-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 26px; }
.why-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy-800); }
.why-list .icon { color: var(--success); flex-shrink: 0; }
.why-visual { color: var(--gray-200); flex-shrink: 0; }
.why-visual .icon { width: 160px; height: 160px; }

/* ===== Testimonials ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.testimonial { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 22px; margin: 0; }
.testimonial p { color: var(--gray-700); margin: 10px 0; }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--navy-800); font-size: 0.85rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 16px 20px; font-size: 0.82rem; color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--orange-600); }
.breadcrumbs span[aria-current] { color: var(--navy-800); font-weight: 600; }

/* ===== Category header ===== */
.category-header { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: 32px 0; }
.category-header-inner { display: flex; align-items: center; gap: 18px; }
.category-header-icon { color: var(--orange-500); flex-shrink: 0; }
.category-header h1 { margin-bottom: 4px; }
.category-header p { color: var(--gray-500); margin: 0; }

/* ===== Subcategory filters (facet pills + grouped tiles) ===== */
.subcategory-filters { padding: 18px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.subcategory-filters-label { font-weight: 700; color: var(--navy-800); font-size: 0.88rem; }
.subcategory-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.subcategory-pill {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--gray-200); border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--navy-800); background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.subcategory-pill:hover { border-color: var(--orange-500); }
.subcategory-pill.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }

.subcategory-groups { padding-top: 24px; padding-bottom: 0; }
.subcategory-group { margin-bottom: 32px; }
.subcategory-group h2 { font-size: 1.1rem; margin-bottom: 14px; color: var(--navy-800); }

/* ===== Toolbar / sort ===== */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.result-count { color: var(--gray-500); font-size: 0.88rem; }
.sort-form { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.sort-form select { padding: 7px 10px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); }

.empty-state { text-align: center; color: var(--gray-500); padding: 40px 0; }

/* ===== Product detail ===== */
.product-detail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-gallery-main {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--navy-700);
}
.product-info h1 { font-size: 1.7rem; margin-bottom: 10px; }
.product-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.85rem; color: var(--gray-500); }
.product-short-desc { color: var(--gray-700); }
.product-price-row { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; flex-wrap: wrap; }
.stock-status { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88rem; margin-bottom: 20px; }
.stock-in_stock { color: var(--success); }
.stock-out_of_stock, .stock-backorder { color: var(--sale-red); }

.add-to-cart-form { display: flex; gap: 12px; align-items: stretch; margin-bottom: 20px; flex-wrap: wrap; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.qty-btn { background: var(--gray-50); border: none; width: 38px; font-size: 1.1rem; font-weight: 700; color: var(--navy-800); }
.qty-btn:hover { background: var(--gray-100); }
.qty-input { width: 52px; border: none; border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); text-align: center; padding: 8px 0; }
.add-to-cart-form .btn { flex: 1; min-width: 180px; }

.reassurance-list { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--gray-500); }
.reassurance-list li { display: flex; align-items: center; gap: 8px; }
.reassurance-list .icon { color: var(--success); }

/* ===== Tabs / specs ===== */
.product-tabs-section { border-top: 1px solid var(--gray-200); }
.product-tabs { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr; }
.tab-block h2 { font-size: 1.3rem; }
.specs-table th, .specs-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-200); font-size: 0.88rem; }
.specs-table th { color: var(--gray-500); font-weight: 600; width: 40%; }
.specs-table td { color: var(--navy-800); font-weight: 600; }

/* ===== Static / error pages ===== */
.static-section h1 { margin-bottom: 16px; }
.static-body { max-width: 700px; color: var(--gray-700); }
.error-section { text-align: center; padding: 90px 0; }
.error-section h1 { font-size: 5rem; color: var(--orange-500); margin-bottom: 0; }
.cart-note { color: var(--gray-500); font-size: 0.88rem; margin-top: 20px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 12px 16px; }
.cart-line-remove { color: var(--sale-red); font-size: 0.8rem; font-weight: 700; background: none; border: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--navy-800); color: var(--white);
  padding: 14px 20px; border-radius: var(--radius); box-shadow: var(--shadow-md); font-weight: 600;
  font-size: 0.9rem; display: flex; align-items: center; gap: 10px; z-index: 1000;
  opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .icon { color: var(--orange-500); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-900); color: var(--gray-400); margin-top: 40px; }
.footer-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 28px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; font-weight: 600; color: var(--gray-200); }
.trust-item .icon { color: var(--orange-500); }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; padding: 44px 20px; }
.footer-col h3 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.86rem; }
.footer-col a:hover { color: var(--white); }
.footer-brand p { font-size: 0.86rem; margin-top: 12px; }
.footer-phone a { color: var(--orange-500); font-weight: 700; }
.footer-brand .logo { margin-bottom: 4px; }

.newsletter-form { display: flex; gap: 8px; margin-top: 14px; }
.newsletter-form input { flex: 1; padding: 10px 12px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: var(--white); }
.newsletter-form input::placeholder { color: var(--gray-400); }
.newsletter-form button { background: var(--orange-500); color: var(--navy-900); border: none; padding: 0 16px; border-radius: var(--radius); font-weight: 700; }
.newsletter-form button:hover { background: var(--orange-600); }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.78rem; flex-wrap: wrap; gap: 8px; }
.footer-bottom ul { display: flex; gap: 18px; }
.footer-bottom a:hover { color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .product-detail-inner { grid-template-columns: 1fr; }
  .product-tabs { grid-template-columns: 1fr; }
  .why-inner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .value-props-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar-inner { justify-content: center; text-align: center; }
  .header-inner { flex-wrap: wrap; }
  .menu-toggle { display: flex; order: 1; }
  .logo { order: 2; }
  .header-actions { order: 3; margin-left: auto; }
  .search-form { order: 4; width: 100%; max-width: none; margin: 10px 0 0; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav::after { display: none; }
  .main-nav-inner ul { flex-direction: column; }
  .hero-inner { flex-direction: column; text-align: center; padding: 40px 20px; }
  .hero-copy h1 { font-size: 2rem; }
  .hero-visual {
    position: static; width: 100%; height: 220px; margin-top: 24px;
    border-radius: var(--radius-lg); overflow: hidden;
  }
  .hero-visual img {
    object-position: 50% 20%;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

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