/* ==========================================================
   SPORTY – Base, layout & shared components
   ========================================================== */
:root {
  --primary: #1a7cf0;
  --primary-dark: #0e5fd1;
  --primary-soft: #e8f2fe;
  --dark: #101b29;
  --dark-2: #1b2636;
  --text: #1b2330;
  --muted: #6b7482;
  --line: #e6e9ef;
  --bg-alt: #f5f7fa;
  --sale: #e5262d;
  --star: #f5a524;
  --white: #fff;

  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-script: 'Dancing Script', cursive;

  --container: 1200px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 6px 24px rgba(16, 27, 41, .07);
  --shadow-hover: 0 14px 34px rgba(16, 27, 41, .12);
  --ease: .3s cubic-bezier(.25, .8, .25, 1);
  --header-h: 72px;
}

*, *::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(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
main { overflow-x: clip; } /* AOS fade-left/right không làm tràn ngang trên mobile */
a { color: inherit; text-decoration: none; transition: color var(--ease); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: calc(var(--container) + 40px); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn i { font-style: normal; font-size: 16px; transition: transform var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--primary); box-shadow: 0 8px 20px rgba(26, 124, 240, .3); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(26, 124, 240, .3); }
.btn-light { background: var(--white); color: var(--dark); }
.btn-light:hover { background: var(--primary); color: var(--white); }
.btn-outline { border-color: var(--line); background: var(--white); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { min-height: 40px; padding: 0 22px; font-size: 12px; }
.btn-block { width: 100%; }

.link-more { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--primary); }
.link-more i { font-style: normal; transition: transform var(--ease); }
.link-more:hover i, a:hover .link-more i { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(16, 27, 41, .06); }
.header-inner { display: flex; align-items: center; gap: 40px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-size: 25px; font-weight: 900; font-style: italic; letter-spacing: .01em; color: var(--dark); line-height: 1; }
.brand-light .brand-name { color: var(--white); }

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 34px; }
.main-nav a {
  position: relative; display: block; padding: 24px 0;
  font-size: 14px; font-weight: 500; color: var(--text);
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--primary); transform: scaleX(0); transition: transform var(--ease);
}
.main-nav a:hover, .main-nav a.is-active { color: var(--primary); }
.main-nav a.is-active::after, .main-nav a:hover::after { transform: scaleX(1); }
.nav-search { display: none; }

.header-search { position: relative; width: 210px; }
.header-search input, .nav-search input {
  width: 100%; height: 40px; padding: 0 42px 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); font-size: 12px;
  transition: border-color var(--ease), background var(--ease);
}
.header-search input:focus, .nav-search input:focus { outline: none; border-color: var(--primary); background: var(--white); }
.header-search button, .nav-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; background: none; color: var(--text);
}
.header-search svg, .nav-search svg { width: 18px; height: 18px; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; color: var(--text); transition: background var(--ease), color var(--ease);
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-badge {
  position: absolute; top: 1px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--primary); color: var(--white);
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}

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

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-title { font-size: 24px; font-weight: 800; text-transform: uppercase; color: var(--dark); letter-spacing: .01em; }
.section-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* image hover zoom */
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform .6s cubic-bezier(.25, .8, .25, 1); }
.img-zoom:hover img, a:hover .img-zoom img, .product-card:hover .img-zoom img { transform: scale(1.06); }

/* ---------- Category card ---------- */
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.category-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(16, 27, 41, .04);
  transition: transform var(--ease), box-shadow var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-thumb { display: block; aspect-ratio: 126 / 122; background: #eef0f3; }
.category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 18px; }
.category-name { font-size: 14px; font-weight: 600; color: var(--dark); }
.category-card:hover .category-name { color: var(--primary); }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.product-card { position: relative; }
.product-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 125 / 127; border-radius: var(--radius);
  background: #f2f3f6;
}
.product-thumb > a { display: block; height: 100%; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-sale {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 2px 7px; border-radius: 4px;
  background: var(--sale); color: var(--white);
  font-size: 11px; font-weight: 700; line-height: 1.5;
}
.wish-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--text);
  transition: color var(--ease), background var(--ease), transform var(--ease);
}
.wish-btn svg { width: 17px; height: 17px; }
.wish-btn:hover { color: var(--sale); transform: scale(1.08); }
.wish-btn.is-active { color: var(--sale); }
.wish-btn.is-active svg { fill: currentColor; }
.quick-add {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
  height: 38px; border: 0; border-radius: var(--radius);
  background: var(--dark); color: var(--white);
  font-size: 12px; font-weight: 700;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
}
.quick-add:hover { background: var(--primary); }
.product-card:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: translateY(0); }
.product-name { margin-top: 14px; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--text); }
.product-name a:hover { color: var(--primary); }
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.product-price strong { font-size: 16px; font-weight: 700; color: var(--sale); }
.product-price del { font-size: 11px; color: #9aa1ac; }
.product-rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; font-size: 12px; color: #d5d9e0; letter-spacing: 0; }
.stars .on { color: var(--star); }

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(90deg, #2195f3 0%, #167deb 100%); color: var(--white); }
.newsletter-inner { display: flex; align-items: center; gap: 40px; padding-top: 26px; padding-bottom: 26px; }
.newsletter-text { display: flex; align-items: center; gap: 22px; flex: 1.1; }
.newsletter-icon svg { width: 38px; height: 38px; }
.newsletter-text h2 { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.newsletter-text p { margin-top: 3px; font-size: 12px; opacity: .9; }
.newsletter-form { display: flex; flex: 1.1; }
.newsletter-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  border: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--white); font-size: 13px; color: var(--text);
}
.newsletter-form input:focus { outline: 2px solid var(--dark); outline-offset: -2px; }
.newsletter-form .btn { border-radius: 0 var(--radius) var(--radius) 0; padding: 0 30px; }
.newsletter-social { flex: .8; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.newsletter-social > span { font-size: 13px; font-weight: 600; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--white); transition: background var(--ease), transform var(--ease); }
.social a:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #c9d0da; padding-top: 44px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 32px; }
.footer-col { padding-left: 32px; border-left: 1px solid rgba(255, 255, 255, .08); }
.footer-col:nth-child(2) { border-left: 0; padding-left: 0; }
.footer-tagline { margin: 12px 0 0 38px; font-size: 13px; font-style: italic; color: var(--white); }
.footer-col h3 { margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--white); }
.footer-col li + li { margin-top: 8px; }
.footer-col a:hover { color: var(--white); }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; }
.footer-contact svg { width: 15px; height: 15px; margin-top: 3px; color: var(--white); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px;
}
.payments { display: flex; gap: 8px; }
.pay {
  display: inline-grid; place-items: center; width: 40px; height: 24px; border-radius: 4px;
  background: var(--white); font-size: 10px; font-weight: 900; font-style: italic; color: #1a1f71;
}
.pay-jcb { color: #0b6b3a; font-style: normal; }
.pay-momo { color: #a50064; font-style: normal; font-size: 9px; }
.pay-mc { grid-auto-flow: column; gap: 0; }
.pay-mc i { width: 13px; height: 13px; border-radius: 50%; background: #eb001b; }
.pay-mc i + i { margin-left: -5px; background: #f79e1b; opacity: .9; }

/* ---------- Scroll top ---------- */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 50%;
  background: var(--dark); color: var(--white);
  box-shadow: 0 8px 20px rgba(16, 27, 41, .25);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease), background var(--ease);
}
.scroll-top svg { width: 20px; height: 20px; }
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary); transform: translateY(-3px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  max-width: calc(100% - 32px); padding: 12px 22px; border-radius: var(--radius);
  background: var(--dark); color: var(--white); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transform: translate(-50%, 16px);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Page banner & breadcrumb (inner pages) ---------- */
.page-banner {
  position: relative; overflow: hidden;
  padding: 56px 0 52px;
  background: linear-gradient(180deg, #b3d5f3 0%, #dcebf9 60%, #eef4fa 100%);
}
/* --banner-img: url() được resolve theo file CSS này (assets/css/) */
.page-banner::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 46%;
  background: var(--banner-img, none) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%);
          mask-image: linear-gradient(90deg, transparent 0, #000 40%);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-size: 40px; font-weight: 900; text-transform: uppercase; color: var(--dark); }
.page-banner h1 em { font-style: italic; color: var(--primary); }
.page-banner p { max-width: 460px; margin-top: 8px; color: #3b4556; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; color: #4a5566; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: '/'; margin-right: 8px; color: #8c96a5; }
.breadcrumb [aria-current] { color: var(--primary); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: 14px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
textarea.input { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 124, 240, .12); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1199px) {
  .header-inner { gap: 24px; }
  .main-nav ul { gap: 22px; }
  .header-search { display: none; }
  .main-nav a { white-space: nowrap; }
  .category-grid, .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .header-search { display: none; }
  .header-inner { justify-content: space-between; gap: 12px; }
  .brand { margin-right: auto; }
  .main-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
    width: min(320px, 84vw); padding: 24px 20px;
    background: var(--white); overflow-y: auto;
    transform: translateX(-100%); transition: transform var(--ease);
  }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .main-nav a::after { display: none; }
  .nav-search { display: block; position: relative; margin-bottom: 12px; }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(16, 27, 41, .45); opacity: 0; visibility: hidden; transition: opacity var(--ease), visibility var(--ease);
  }
  .nav-open { overflow: hidden; }
  .nav-open .site-header { z-index: 130; }
  .nav-open .main-nav { transform: none; }
  .nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  .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); }

  .section { padding: 52px 0; }
  .newsletter-inner { flex-wrap: wrap; gap: 20px; }
  .newsletter-text { flex: 1 1 100%; }
  .newsletter-form { flex: 1 1 60%; }
  .newsletter-social { flex: 0 0 auto; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col { padding-left: 0; border-left: 0; }
  .page-banner h1 { font-size: 32px; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 22px; }
  .section-title { font-size: 19px; }
  .section-sub { font-size: 13px; }
  .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .category-body { padding: 12px 12px 14px; gap: 6px; }
  .quick-add { opacity: 1; transform: none; height: 34px; font-size: 11px; left: 6px; right: 6px; bottom: 6px; }
  .product-price strong { font-size: 15px; }
  .brand-name { font-size: 22px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-actions { gap: 0; }
  .newsletter-form { flex-basis: 100%; }
  .newsletter-form .btn { padding: 0 20px; }
  .newsletter-social { flex-direction: row; align-items: center; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .scroll-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .page-banner { padding: 36px 0; }
  .page-banner::after { width: 60%; opacity: .45; }
  .page-banner h1 { font-size: 26px; }
}
