:root {
  --blue-950: #05245f;
  --blue-800: #0d3c90;
  --blue-600: #1d5ccc;
  --orange: #f97316;
  --orange-700: #d95309;
  --ink: #12223d;
  --muted: #61708a;
  --line: #dfe6f0;
  --surface: #fff;
  --canvas: #f3f6fa;
  --danger: #d92d20;
  --success: #09844a;
  --shadow: 0 8px 24px rgb(13 36 74 / 9%);
}

* { box-sizing: border-box; }
html { background: var(--canvas); color: var(--ink); font-family: 'Be Vietnam Pro', Arial, sans-serif; }
body { min-width: 320px; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { min-height: 100vh; }
.wrap { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.page { padding: 22px 0 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topline { background: var(--blue-950); color: #dce9ff; font-size: 12px; }
.topline .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.hotline { color: #fff; font-weight: 700; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-main { display: grid; grid-template-columns: 270px 1fr auto; align-items: center; gap: 28px; padding: 14px 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 11px; background: var(--blue-800); color: #fff; font-size: 24px; box-shadow: 0 6px 14px rgb(10 45 110 / 20%); }
.brand-name { color: var(--blue-950); font-size: 22px; font-weight: 800; line-height: 1.05; white-space: nowrap; }
.brand-name span { color: var(--orange); }
.brand-tag { color: var(--muted); font-size: 10px; line-height: 1.3; }
.search { display: flex; max-width: 610px; width: 100%; height: 45px; overflow: hidden; border: 2px solid var(--blue-600); border-radius: 8px; background: #fff; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 0 14px; color: var(--ink); }
.search button { width: 58px; border: 0; background: var(--orange); color: #fff; font-size: 20px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-link, .cart-link { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 600; }
.header-link { color: var(--blue-950); border: 1px solid var(--line); }
.cart-link { background: var(--orange); color: #fff; }
.cart-count { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #d92d20; color: #fff; font-size: 10px; }
.address { color: var(--muted); font-size: 12px; padding-bottom: 9px; }

.nav { background: var(--blue-800); color: #fff; }
.nav .wrap { display: flex; align-items: stretch; }
.category-toggle { border: 0; background: var(--orange); color: #fff; padding: 0 22px; font-weight: 800; }
.main-links { display: flex; margin: 0; padding: 0; list-style: none; }
.main-links a { display: flex; align-items: center; height: 48px; padding: 0 18px; font-size: 13px; font-weight: 700; }
.main-links a[aria-current="page"], .main-links a:hover { background: rgb(255 255 255 / 13%); }

.home-grid { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.category-panel, .section-card, .product-card, .summary-card, .content-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.category-panel { align-self: start; overflow: hidden; }
.panel-title { margin: 0; padding: 13px 15px; background: var(--blue-600); color: #fff; font-size: 14px; }
.category-list { margin: 0; padding: 0; list-style: none; }
.category-list a { display: flex; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.category-list a:hover { background: #eff5ff; color: var(--blue-800); }
.hero { position: relative; min-height: 355px; overflow: hidden; border-radius: 13px; background: linear-gradient(120deg, #072b76, #2458b4); color: #fff; }
.hero::after { position: absolute; content: ''; inset: 0; background: linear-gradient(90deg, rgb(4 29 80 / 92%) 0%, rgb(7 44 118 / 70%) 44%, transparent 78%); }
.hero-image { position: absolute; inset: 0 0 0 42%; width: 58%; height: 100%; object-fit: cover; opacity: .78; }
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; min-height: 355px; width: min(62%, 630px); padding: 40px 46px; }
.eyebrow { margin: 0 0 8px; color: #b9d3ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 520px; margin: 0; font-size: clamp(30px, 3.2vw, 49px); line-height: 1.08; }
.hero h1 strong { color: #ffad28; }
.hero p { max-width: 480px; color: #dce9ff; font-size: 15px; line-height: 1.6; }
.hero-meta { display: grid; gap: 5px; margin-top: 10px; color: #fff; font-size: 12px; font-weight: 600; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid transparent; border-radius: 7px; padding: 0 17px; font-weight: 800; }
.button-primary { background: var(--orange); color: #fff; }
.button-secondary { border-color: rgb(255 255 255 / 55%); background: rgb(255 255 255 / 10%); color: #fff; }
.button-outline { border-color: var(--blue-600); background: #fff; color: var(--blue-800); }
.button:disabled { cursor: not-allowed; opacity: .55; }

.benefits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 15px 0 24px; }
.benefit { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.benefit-icon { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e5efff; color: var(--blue-600); font-size: 18px; }
.benefit strong, .benefit span { display: block; }
.benefit strong { font-size: 12px; }
.benefit span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.section { margin-top: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--orange); color: var(--blue-950); font-size: 20px; }
.section-heading a { color: var(--blue-600); font-size: 12px; }
.featured-categories { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.featured-category { min-height: 128px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.featured-category .category-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 11px; border-radius: 12px; background: #f1f6ff; color: var(--blue-600); font-size: 26px; }
.featured-category strong { font-size: 12px; }

.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 11px 25px rgb(13 36 74 / 14%); }
.product-picture { aspect-ratio: 1 / .9; display: grid; place-items: center; overflow: hidden; background: #f3f6fa; }
.product-picture img { width: 100%; height: 100%; object-fit: contain; }
.no-image { display: grid; place-items: center; width: 100%; height: 100%; min-height: 140px; color: var(--muted); font-size: 13px; text-align: center; }
.product-body { display: grid; flex: 1; gap: 7px; padding: 12px; }
.product-category { color: var(--blue-600); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.product-name { display: -webkit-box; overflow: hidden; min-height: 38px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-price { color: var(--danger); font-size: 16px; font-weight: 800; }
.product-meta { color: var(--muted); font-size: 10px; }
.product-actions { display: flex; gap: 7px; }
.product-actions .button { flex: 1; min-height: 32px; padding: 0 8px; font-size: 11px; }
.button-buy { background: var(--blue-800); color: #fff; }
.button-cart { background: var(--orange); color: #fff; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.crumb { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.page-head h1 { margin: 0; color: var(--blue-950); font-size: 26px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; padding: 13px; }
.filter-bar select, .filter-bar input { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff; color: var(--ink); }
.filter-bar input { flex: 1 1 220px; }
.empty, .notice { padding: 28px; border: 1px dashed #9bb0d1; border-radius: 11px; background: #fff; color: var(--muted); text-align: center; }
.notice { text-align: left; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .96fr); gap: 24px; padding: 24px; }
.gallery { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 13px; }
.thumbs { display: grid; align-content: start; gap: 9px; }
.thumb { width: 74px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.thumb.active { outline: 2px solid var(--orange); outline-offset: 1px; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.main-picture { display: grid; min-height: 490px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; }
.main-picture img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; }
.detail-info h1 { margin: 0; font-size: 25px; line-height: 1.35; }
.rating-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.rating-row .rating { color: #e58900; font-weight: 700; }
.price-box { margin: 16px 0; padding: 16px; border-left: 4px solid var(--danger); border-radius: 8px; background: #fff7f5; color: var(--danger); font-size: 30px; font-weight: 800; }
.variant-block { margin: 16px 0; }
.variant-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variant { border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; background: #fff; color: var(--ink); font-size: 13px; }
.variant.selected { border-color: var(--orange); background: #fff7ed; color: var(--orange-700); }
.buy-box { display: grid; gap: 12px; margin-top: 21px; }
.quantity { display: inline-grid; grid-template-columns: 38px 45px 38px; align-items: center; overflow: hidden; width: max-content; border: 1px solid var(--line); border-radius: 7px; }
.quantity button { height: 38px; border: 0; background: #f5f7fb; color: var(--blue-950); }
.quantity output { text-align: center; }
.buy-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buy-buttons .button { min-height: 50px; }
.detail-tabs { margin-top: 22px; }
.tab-list { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab-list button { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; padding: 15px 20px; background: transparent; color: var(--blue-950); font-weight: 800; }
.tab-list button.active { border-color: var(--orange); color: var(--orange-700); }
.tab-panel { padding: 22px; white-space: pre-line; line-height: 1.7; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #eef2f7; }

.footer { margin-top: 34px; background: var(--blue-950); color: #dbeafe; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding: 32px 0; }
.footer strong { display: block; margin-bottom: 9px; color: #fff; }
.footer p, .footer a { color: #bbcae4; font-size: 12px; line-height: 1.7; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 30; max-width: 340px; padding: 12px 15px; border-radius: 9px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; }
.loading { padding: 64px 20px; color: var(--muted); text-align: center; }
