@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #101a2e;       /* navy - thuong hieu HAVEN'S */
  --ink-soft: #24324d;
  --paper: #f6f5f2;
  --card: #ffffff;
  --line: #e2e0d8;
  --muted: #6c7280;
  --gold: #a8792f;      /* diem nhan cao cap */
  --sale: #c22a2a;      /* mau ngu nghia rieng cho giam gia, khong dung lam accent chinh */
  --radius: 3px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, .display {
  font-family: 'Oswald', 'Inter', sans-serif;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
}

/* ---- Thanh khuyen mai tren cung ---- */
.announce-bar {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.announce-bar .wrap {
  max-width: 1240px; margin: 0 auto; padding: 8px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.announce-bar .items { display: flex; gap: 24px; flex-wrap: wrap; opacity: 0.92; }

/* ---- Header ---- */
header.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
header.site-header .wrap {
  max-width: 1240px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
header.site-header .brand {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 26px; letter-spacing: 0.1em;
}
header.site-header nav.main-nav { display: flex; gap: 28px; align-items: center; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
header.site-header nav.main-nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
header.site-header nav.main-nav a:hover, header.site-header nav.main-nav a.active { border-color: var(--gold); color: var(--gold); }
header.site-header nav.main-nav a.sale-link { color: var(--sale); }
.header-icons { display: flex; align-items: center; gap: 18px; }
.header-icons button, .header-icons a { background: none; border: none; cursor: pointer; color: var(--ink); display: flex; align-items: center; }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--sale); color: #fff; border-radius: 50%;
  font-size: 10px; font-weight: 700; position: relative; top: -8px; left: -8px;
}
.search-box { position: relative; }
.search-box input {
  width: 220px; border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px; font-size: 13px; background: #fff;
}

main { max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; }
main.full-bleed { max-width: none; padding: 0; }

.section { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: 32px; margin: 0; }
.section-head .view-all { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--gold); border-bottom: 1px solid var(--gold); padding-bottom: 2px; }

/* ---- Tabs (Ban chay/Hang moi...) ---- */
.tab-bar { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-bar button {
  background: none; border: none; cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; font-family: inherit;
}
.tab-bar button.active { color: var(--ink); border-color: var(--ink); }

/* ---- Luoi san pham + the san pham ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 20px; }
.product-card { cursor: pointer; position: relative; }
.product-card .thumb { aspect-ratio: 3/4; background: var(--line); overflow: hidden; position: relative; margin-bottom: 12px; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.product-card .badge-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 2px; color: #fff;
}
.badge-tag.new { background: var(--ink); }
.badge-tag.bestseller { background: var(--gold); }
.badge-tag.sale { background: var(--sale); }
.product-card .name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.product-card .price { font-size: 14px; font-weight: 700; }
.product-card .price .compare { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; font-size: 12px; }
.product-card .sold-out { color: var(--sale); font-size: 12px; font-weight: 700; text-transform: uppercase; }

.empty { color: var(--muted); font-size: 14px; }

button, .btn {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  cursor: pointer;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 13px 24px;
}
button.secondary, .btn.secondary { background: transparent; color: var(--ink); }
button.gold { background: var(--gold); border-color: var(--gold); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

input, textarea, select {
  font-family: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  background: #fff; width: 100%;
}
label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.field { margin-bottom: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--radius);
  font-size: 14px; z-index: 100;
}
.toast.error { background: var(--sale); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge.cho_xac_nhan { background: #fdf0d5; color: #9a6a00; }
.badge.da_xac_nhan { background: #dbe9ff; color: #1a4fa0; }
.badge.dang_giao { background: #e3d9ff; color: #5b2ea6; }
.badge.hoan_thanh { background: #dcf3df; color: #206b2c; }
.badge.da_huy { background: #fbdada; color: #a3271e; }

/* ---- Banner / hero ---- */
.hero-banner { position: relative; aspect-ratio: 21/8; background: var(--ink-soft); overflow: hidden; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; }
.hero-dots button.active { background: #fff; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(16,26,46,0.55); color: #fff; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: none; font-size: 16px;
}
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }

/* ---- Bo suu tap grid ---- */
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.collection-card { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--ink-soft); }
.collection-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.3s; }
.collection-card:hover img { transform: scale(1.05); }
.collection-card .label {
  position: absolute; inset: auto 0 0 0; padding: 20px 16px;
  background: linear-gradient(0deg, rgba(16,26,46,0.85), transparent);
  color: #fff; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.03em;
}

/* ---- Trang chi tiet SP ---- */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding-top: 32px; }
.pd-gallery-main { aspect-ratio: 3/4; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery-thumbs { display: flex; gap: 8px; }
.pd-gallery-thumbs img { width: 64px; height: 80px; object-fit: cover; cursor: pointer; border: 1px solid var(--line); opacity: 0.7; }
.pd-gallery-thumbs img.active { opacity: 1; border-color: var(--ink); }
.swatch-btn {
  border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 2px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.swatch-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pd-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 32px 0 20px; }
.pd-tabs button { background: none; border: none; padding: 12px 20px 12px 0; margin-right: 20px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.pd-tabs button.active { color: var(--ink); border-color: var(--gold); }
.trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; font-size: 12px; color: var(--muted); }
.trust-badges div { display: flex; gap: 8px; align-items: center; }

/* ---- Phan trang ---- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination button { min-width: 36px; padding: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.pagination button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- Footer ---- */
footer.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); margin-top: 80px; }
footer.site-footer .wrap { max-width: 1240px; margin: 0 auto; padding: 56px 24px 28px; }
footer.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
footer.site-footer h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; }
footer.site-footer a, footer.site-footer p { font-size: 13px; line-height: 2; opacity: 0.85; }
footer.site-footer a:hover { color: var(--gold); opacity: 1; }
footer.site-footer .bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; font-size: 12px; opacity: 0.6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  header.site-header nav.main-nav { display: none; }
  .pd-layout { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  footer.site-footer .cols { grid-template-columns: 1fr 1fr; }
}
