/* ==========================================================
   MOVEON – Base, header, footer & component dùng chung
   ========================================================== */
:root {
  --dark: #16181c;
  --dark-2: #22252a;
  --accent: #e9f25a;
  --accent-hover: #f3fa7c;
  --accent-soft: #fbf9e0;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --thumb: #efefee;
  --beige: #ebe7df;
  --text: #1b1d21;
  --muted: #6d7075;
  --line: #e4e4e0;
  --red: #e0313a;
  --star: #f5b400;

  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --container: 1240px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 10px 30px rgba(20, 22, 26, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent:hover { background: var(--accent-hover); box-shadow: 0 8px 20px rgba(233, 242, 90, .35); transform: translateY(-2px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-outline:hover { background: var(--dark); color: #fff; box-shadow: inset 0 0 0 1.5px var(--dark); }
.btn-sm { min-height: 36px; padding: 0 18px; font-size: 11px; text-transform: none; letter-spacing: 0; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.link-arrow svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark); color: #fff;
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand-mark { width: 34px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { margin-top: 4px; font-size: 7.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }

.main-nav { flex: 1; }
.main-nav ul { display: flex; justify-content: center; gap: 32px; }
.main-nav a {
  position: relative; display: block; padding: 21px 0;
  font-size: 13px; font-weight: 500; white-space: nowrap; color: rgba(255, 255, 255, .85);
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease);
}
.main-nav a:hover, .main-nav a.is-active { color: #fff; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { font-weight: 700; }
.nav-search { display: none; }

.header-search, .nav-search {
  position: relative; width: 220px;
}
.header-search input, .nav-search input {
  width: 100%; height: 36px; padding: 0 40px 0 16px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #fff; font-size: 12px;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.header-search input::placeholder, .nav-search input::placeholder { color: rgba(255, 255, 255, .55); }
.header-search input:focus, .nav-search input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.header-search button, .nav-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; padding: 6px; border: 0; background: none; color: #fff;
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; color: #fff;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--accent); }
.icon-search { display: none; }
.icon-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--dark);
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

.nav-toggle { display: none; flex-shrink: 0; width: 40px; height: 40px; padding: 10px 8px; border: 0; background: none; }
.nav-toggle span { display: block; height: 2px; margin: 4px 0; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.nav-backdrop { display: none; }

.promo-kicker { font-size: 12px; font-weight: 700; font-style: italic; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }

/* ---------- Section heading ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-title {
  position: relative; padding-left: 38px;
  font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 24px; height: 3px;
  background: var(--accent); border-radius: 2px;
}
.section-sub { margin-top: 6px; padding-left: 38px; font-size: 13px; color: var(--muted); }
.section-head .link-arrow { flex-shrink: 0; margin-bottom: 4px; }
.section-head .link-arrow:hover { color: #7a8200; }

/* ---------- Product card ---------- */
.product-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-thumb { position: relative; aspect-ratio: 150 / 122; background: var(--thumb); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .product-thumb img { transform: scale(1.07); }
.badge-sale {
  position: absolute; top: 10px; left: 10px;
  padding: 2px 8px; border-radius: 3px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
}
.wish-btn {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--text);
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.wish-btn svg { width: 17px; height: 17px; }
.wish-btn:hover { transform: scale(1.1); background: #fff; }
.wish-btn.is-active { color: var(--red); }
.wish-btn.is-active svg { fill: currentColor; }
.quick-add {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  min-height: 36px; border: 0; border-radius: 999px;
  background: var(--dark); color: #fff; font-size: 12px; font-weight: 600;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background-color .25s;
}
.quick-add:hover { background: #000; color: var(--accent); }
.product-card:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: none; }
.product-info { padding: 14px 4px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-size: 12.5px; font-weight: 500; line-height: 1.45; color: #3a3d42; }
.product-name a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin-top: auto; }
.product-price strong { font-size: 15px; font-weight: 700; color: var(--red); }
.product-price del { font-size: 12px; color: #9a9ca0; }
.product-rating { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; }
.stars i { position: relative; width: 12px; height: 12px; color: #d7d7d4; }
.stars svg { width: 100%; height: 100%; fill: currentColor; }
.stars i.on { color: var(--star); }
/* Nửa sao: phủ nửa trái bằng một ngôi sao màu vàng */
.stars i.half::after {
  --star-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.3L12 17.1l-5.7 3.1 1.2-6.3-4.7-4.4 6.4-.8z'/%3E%3C/svg%3E");
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 50%;
  background: var(--star);
  -webkit-mask: var(--star-shape) left top / 12px 12px no-repeat;
          mask: var(--star-shape) left top / 12px 12px no-repeat;
}

.product-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }

/* ---------- News card ---------- */
.news-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.news-thumb { aspect-ratio: 219 / 74; overflow: hidden; background: var(--thumb); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-card:hover .news-thumb img { transform: scale(1.07); }
.news-body { padding: 14px 16px 18px; }
.news-date { font-size: 11px; color: #8d9094; }
.news-title { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.news-card:hover .news-title { color: #545800; }
.news-excerpt { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- Perks strip ---------- */
.perks { background: var(--accent-soft); margin-top: 56px; }
.perks-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.perk { display: flex; align-items: center; justify-content: center; gap: 18px; }
.perk svg { width: 40px; height: 40px; flex-shrink: 0; color: var(--dark); }
.perk h3 { font-size: 13px; font-weight: 700; }
.perk p { font-size: 11px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, .78); font-size: 12px; }
.footer-grid {
  display: grid; grid-template-columns: 1.1fr 1.1fr 1fr 1fr 1.5fr; gap: 32px;
  padding-top: 26px; padding-bottom: 26px;
}
.footer-grid > * + * { position: relative; }
.footer-col, .footer-news { padding-left: 32px; border-left: 1px solid rgba(255, 255, 255, .12); }
.footer-brand .brand-text strong { font-size: 24px; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff;
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { background: var(--accent); color: var(--dark); transform: translateY(-2px); }
.footer-about { padding-top: 12px; font-size: 11.5px; line-height: 1.7; color: rgba(255, 255, 255, .65); }
.site-footer h3 { margin-bottom: 10px; font-size: 12px; font-weight: 700; color: #fff; }
.footer-col li + li { margin-top: 4px; }
.footer-col a { color: rgba(255, 255, 255, .65); font-size: 11.5px; }
.footer-col a:hover { color: var(--accent); }
.footer-news p { font-size: 11.5px; color: rgba(255, 255, 255, .65); }
.newsletter { display: flex; margin-top: 12px; }
.newsletter input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px;
  border: 0; border-radius: 4px 0 0 4px; background: #fff; color: var(--text); font-size: 12px;
}
.newsletter input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.newsletter button {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 40px; border: 0; border-radius: 0 4px 4px 0; padding: 0;
  background: var(--accent); color: var(--dark); transition: background-color .25s;
}
.newsletter button svg { width: 18px; height: 18px; }
.newsletter button:hover { background: var(--accent-hover); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 14px; padding-bottom: 16px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 11px; color: rgba(255, 255, 255, .55);
}
.footer-slogan { font-style: italic; font-weight: 600; color: #fff; }
.footer-slogan span { position: relative; margin-left: 10px; padding-right: 30px; }
.footer-slogan span::after {
  content: ''; position: absolute; right: 0; top: 50%; width: 22px; height: 2px;
  background: var(--accent); transform: rotate(-35deg);
}

/* ---------- Scroll top & toast ---------- */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: grid; place-items: center; width: 46px; height: 46px; padding: 12px;
  border: 0; border-radius: 50%; background: var(--dark); color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s var(--ease), visibility .3s, transform .3s var(--ease), background-color .25s, color .25s;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: var(--accent); color: var(--dark); transform: translateY(-3px); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  max-width: calc(100% - 40px); padding: 12px 22px; border-radius: 999px;
  background: var(--dark); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transform: translate(-50%, 16px);
  transition: opacity .3s var(--ease), visibility .3s, transform .3s var(--ease);
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Page banner (trang con) ---------- */
.page-banner { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.page-banner-media { position: absolute; inset: 0 0 0 38%; }
.page-banner-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.page-banner-media::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--dark) 0%, rgba(22, 24, 28, .6) 40%, rgba(22, 24, 28, .1) 100%);
}
.page-banner .container { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 56px; }
.page-banner h1 { font-size: 40px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
.page-banner p { margin-top: 10px; max-width: 460px; color: rgba(255, 255, 255, .8); font-size: 14px; }
.breadcrumb { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li + li::before { content: '/'; margin-right: 8px; opacity: .5; }
.breadcrumb [aria-current] { color: var(--accent); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; min-height: 46px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 14px;
  transition: border-color .25s, box-shadow .25s;
}
.input:focus { outline: none; border-color: var(--dark); box-shadow: 0 0 0 3px rgba(233, 242, 90, .55); }
textarea.input { min-height: 130px; resize: vertical; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1200px) {
  .main-nav ul { gap: 22px; }
  .header-search { width: 180px; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 1024–1199px: không đủ chỗ cho ô tìm kiếm → thay bằng icon */
@media (min-width: 1024px) and (max-width: 1199px) {
  .header-inner { gap: 20px; }
  .main-nav ul { gap: 20px; }
  .header-search { display: none; }
  .icon-search { display: grid; }
}

@media (max-width: 1023px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: block; }
  .header-inner { gap: 12px; }
  .brand { margin-right: auto; }
  .header-search { display: none; }
  .main-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
    width: min(320px, 85vw); padding: 24px 22px;
    background: var(--dark); overflow-y: auto;
    transform: translateX(-100%); transition: transform .35s var(--ease);
  }
  .nav-open .main-nav { transform: none; }
  .nav-search { display: block; width: 100%; margin-bottom: 18px; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 14px 0; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .main-nav a::after { bottom: -1px; }
  .main-nav a.is-active::after { transform: scaleX(.25); transform-origin: left; }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-open .nav-toggle { position: relative; z-index: 130; }

  .section { padding: 44px 0; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perk { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 2 / 4; }
  .footer-col { padding-left: 0; border-left: 0; }
  .footer-news { grid-column: 3; grid-row: 2; }
  .page-banner h1 { font-size: 32px; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .brand-text strong { font-size: 19px; }
  .brand-mark { width: 28px; }
  .header-actions { gap: 0; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 20px; height: 20px; }
  .brand-text small { font-size: 6.5px; letter-spacing: .08em; }
  .brand { gap: 8px; }

  .section { padding: 36px 0; }
  .section-head { flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
  .section-title { padding-left: 30px; font-size: 18px; }
  .section-title::before { width: 18px; }
  .section-sub { padding-left: 30px; font-size: 12px; }
  .section-head .link-arrow { margin-left: 30px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-info { padding: 12px 10px; }
  .quick-add { opacity: 1; transform: none; min-height: 32px; font-size: 11px; }

  .perks { margin-top: 40px; }
  .perks-inner { gap: 18px 12px; padding-top: 22px; padding-bottom: 22px; }
  .perk { gap: 10px; }
  .perk svg { width: 32px; height: 32px; }
  .perk h3 { font-size: 12px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-brand, .footer-about, .footer-news { grid-column: 1 / -1; }
  .footer-news { grid-row: auto; }
  .footer-about { padding-top: 0; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

  .scroll-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .page-banner-media { left: 0; }
  .page-banner-media::before { background: linear-gradient(90deg, rgba(22, 24, 28, .92), rgba(22, 24, 28, .55)); }
  .page-banner .container { padding-top: 40px; padding-bottom: 40px; }
  .page-banner h1 { font-size: 26px; }
  .page-banner p { font-size: 13px; }
}

@media (max-width: 400px) {
  .header-inner { gap: 6px; }
  .nav-toggle { width: 36px; padding: 10px 6px; }
  .brand-mark { display: none; }
}
