/*
Theme Name: MegaSport
Theme URI: https://megasport.vn
Author: MegaSport Team
Description: Hệ thống thiết bị thể thao chính hãng hàng đầu Việt Nam
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: megasport
*/

/* ──────────────────────────────────────────
   RESET & VARIABLES
────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Bebas Neue Vietnamese";
  src: url("fonts/Bebas/UTMBebas.ttf") format('truetype');
}

:root {
  --bg:        #0a0c10;
  --surface:   #12151c;
  --surface2:  #1a1e28;
  --border:    rgba(255,255,255,.07);
  --accent:    #e8ff47;
  --accent2:   #ff5c35;
  --accent3:   #29d6b5;
  --text:      #e8eaf0;
  --muted:     #7a8099;
  --ff-head:   'Bebas Neue Vietnamese', sans-serif;
  --ff-body:   'Nunito', sans-serif;
  --radius:    14px;
  --shadow:    0 8px 40px rgba(0,0,0,.55);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ──────────────────────────────────────────
   SCROLLBAR
────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ──────────────────────────────────────────
   UTILITY CLASSES
────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--accent);
  color: #000;
  padding: 3px 10px;
  border-radius: 99px;
}

.section-title {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 40px;
}

/* ──────────────────────────────────────────
   BUTTONS
────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
	justify-content: center;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s;
  max-width: 50%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,.25);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 11px;
}

/* ──────────────────────────────────────────
   HEADER / NAV
────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,16,.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}

.logo {
  font-family: var(--ff-head);
  font-size: 1.9rem;
  letter-spacing: .08em;
  color: var(--accent);
  flex-shrink: 0;
}

.logo span {
  color: var(--text);
}

nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin-left: auto;
}

nav ul a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}

nav ul a:hover,
nav ul a.active {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 24px;
}

.nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s;
  position: relative;
}

.nav-icon:hover {
  background: var(--surface);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.8;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent2);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ──────────────────────────────────────────
   SECTION HEADER (SHARED)
────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

/* ──────────────────────────────────────────
   PRODUCT CARDS (SHARED)
────────────────────────────────────────── */
.product-card {
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(232,255,71,.25);
}

.product-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #1d2133 0%, #111520 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb svg {
  width: 64px;
  height: 64px;
  opacity: .25;
}

.product-thumb .tag {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.price-sale {
  font-family: var(--ff-head);
  font-size: 1.45rem;
  color: var(--accent);
  letter-spacing: .03em;
}

.price-old {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,92,53,.15);
  color: var(--accent2);
  padding: 2px 8px;
  border-radius: 99px;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.product-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ──────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}
