/* =========================================================
   Võ Hoàng Hải — Voucher / Mã Giảm Giá
   Shared stylesheet for all pages
   ========================================================= */

:root {
  --color-primary: #c0392b;
  --color-primary-dark: #962a1f;
  --color-gold: #e0a458;
  --color-gold-dark: #c98a34;
  --color-accent: #ff6b35;
  --color-accent-dark: #e2531f;
  --color-green: #4c8c4a;
  --color-dark: #232323;
  --color-text: #3a3a3a;
  --color-muted: #767676;
  --color-bg: #f4f5f7;
  --color-bg-alt: #fbf7f0;
  --color-white: #ffffff;
  --color-border: #e8e6e2;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(20, 10, 5, 0.06);
  --shadow: 0 6px 20px rgba(20, 10, 5, 0.10);
  --shadow-lg: 0 12px 32px rgba(20, 10, 5, 0.14);
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top announcement bar ---------- */
.topbar {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 8px 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.logo-text .name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.logo-text .tagline {
  display: block;
  font-size: 11.5px;
  color: rgba(255,255,255,.85);
  letter-spacing: .2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,.18);
}

.nav-item.has-dropdown { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .15s ease;
}

.nav-item.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  color: var(--color-text);
  font-weight: 500;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  gap: 8px;
}

.dropdown a:hover { background: var(--color-bg-alt); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background .15s ease;
}

.icon-btn:hover { background: rgba(255,255,255,.32); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
}

.search-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  overflow: hidden;
  max-height: 0;
  transition: max-height .2s ease;
}

.search-bar.open { max-height: 70px; }

.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  margin-bottom: 14px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-gold-dark);
    padding: 10px;
    gap: 2px;
  }
  .main-nav.open .nav-item.has-dropdown:hover .dropdown,
  .main-nav.open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    margin-top: 4px;
  }
  .main-nav.open .nav-item.dropdown-open .dropdown { display: block; }
}

/* ---------- Hero slider (home) ---------- */
.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px auto 0;
  max-width: var(--container);
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 32px;
  padding: 48px;
  min-height: 260px;
  background: linear-gradient(120deg, var(--slide-color-1, #c0392b), var(--slide-color-2, #e0a458));
  color: #fff;
}

.hero-slide.active { display: flex; }

.hero-slide-text { flex: 1; }
.hero-slide-text .eyebrow {
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: 12.5px;
  background: rgba(255,255,255,.2);
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero-slide-text h2 { font-size: 30px; margin: 0 0 10px; line-height: 1.2; }
.hero-slide-text p { margin: 0 0 18px; opacity: .92; max-width: 480px; }

.hero-slide-emoji {
  font-size: 90px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.2));
}

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  padding: 0;
}
.hero-dots button.active { background: #fff; width: 22px; border-radius: 5px; }

@media (max-width: 640px) {
  .hero-slide { padding: 28px; flex-direction: column; text-align: center; min-height: auto; }
  .hero-slide-text p { max-width: none; }
  .hero-slide-emoji { font-size: 60px; }
}

/* ---------- Section heading ---------- */
.section {
  padding: 44px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}

.section-head h2 {
  font-size: 24px;
  color: var(--color-primary);
  margin: 0;
  font-weight: 800;
}

.section-head .see-all {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-accent);
  white-space: nowrap;
}

/* ---------- Supplier grid ---------- */
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.supplier-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  font-weight: 800;
  font-size: 17px;
  min-height: 100px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.supplier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.supplier-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

@media (max-width: 900px) { .supplier-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .supplier-grid { grid-template-columns: repeat(2, 1fr); font-size: 14px; } }

/* ---------- Coupon card ---------- */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.coupon-card {
  background: #fff;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.coupon-top { display: flex; align-items: center; gap: 12px; }

.coupon-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.coupon-store { font-size: 12.5px; color: var(--color-muted); font-weight: 600; }
.coupon-title { font-size: 15px; font-weight: 700; color: var(--color-dark); margin: 0; }

.coupon-badge {
  align-self: flex-start;
  background: rgba(192,57,43,.1);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

.coupon-divider {
  border-top: 1px dashed var(--color-border);
  position: relative;
}

.coupon-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coupon-expiry { font-size: 12px; color: var(--color-muted); }

.coupon-code-btn {
  display: flex;
  align-items: center;
  border: 1.5px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.coupon-code-btn .code {
  font-family: "SF Mono", Consolas, monospace;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 10px;
  color: var(--color-accent-dark);
  letter-spacing: .5px;
}

.coupon-code-btn button {
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}

.coupon-code-btn button:hover { background: var(--color-accent-dark); }
.coupon-code-btn.copied button { background: var(--color-green); }

@media (max-width: 900px) { .coupon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .coupon-grid { grid-template-columns: 1fr; }
  .coupon-bottom { flex-direction: column; align-items: stretch; }
  .coupon-code-btn { justify-content: space-between; }
}

.btn-view-product {
  display: block;
  text-align: center;
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-text);
}
.btn-view-product:hover { border-color: var(--color-accent); color: var(--color-accent); }

.load-more-wrap { text-align: center; margin-top: 26px; }

/* ---------- Voucher CTA buttons ---------- */
.voucher-btn-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.voucher-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 150px;
  padding: 16px 14px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.voucher-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: #fff; }
.voucher-btn-icon { font-size: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-gold { background: var(--color-gold); color: #fff; }

/* ---------- News / article cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.news-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
}

.news-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.news-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; color: var(--color-dark); flex: 1; }
.news-meta { font-size: 12.5px; color: var(--color-muted); display: flex; gap: 6px; align-items: center; }

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* ---------- Category pills (shop page) ---------- */
.category-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.pill {
  flex-shrink: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 13.5px;
  background: #fff;
  white-space: nowrap;
}

.pill.active { border-color: var(--color-green); color: var(--color-green); background: rgba(76,140,74,.08); }
.pill:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Shop hero ---------- */
.shop-hero {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 26px;
  align-items: center;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}

.shop-hero-logo {
  width: 92px;
  height: 92px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  flex-shrink: 0;
}

.shop-hero h1 { font-size: 26px; margin: 0 0 8px; color: var(--color-accent-dark); }
.shop-hero p { margin: 0; color: var(--color-muted); }

@media (max-width: 640px) {
  .shop-hero { flex-direction: column; text-align: center; }
}

.quick-links {
  background: #fff;
  border-radius: var(--radius);
  margin-top: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.quick-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14.5px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-dark);
}
.quick-links a:last-child { border-bottom: none; }
.quick-links a:hover { color: var(--color-accent); background: var(--color-bg-alt); }
.quick-links a .arrow { color: var(--color-accent); }

/* ---------- FAQ accordion ---------- */
.faq {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-dark);
}
.faq-q .chev { transition: transform .2s ease; color: var(--color-accent); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease;
  padding: 0 20px;
  color: var(--color-muted);
  font-size: 14.5px;
}
.faq-item.open .faq-a { padding-bottom: 18px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--color-muted);
  margin: 18px 0;
}
.breadcrumb a { color: var(--color-accent-dark); font-weight: 600; }
.breadcrumb span { margin: 0 6px; }

/* ---------- Article page ---------- */
.article-hero {
  border-radius: var(--radius-lg);
  margin-top: 20px;
  padding: 70px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.article-hero .cat {
  display: inline-block;
  background: rgba(255,255,255,.22);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
.article-hero h1 { font-size: 32px; margin: 0; max-width: 760px; margin: 0 auto; line-height: 1.25; }

.article-body {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px;
  margin-top: -30px;
  position: relative;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.article-body h2 { color: var(--color-primary); font-size: 20px; margin-top: 30px; }
.article-body p { margin: 14px 0; }
.article-body ul { margin: 14px 0; padding-left: 20px; list-style: disc; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--color-accent-dark); font-weight: 600; text-decoration: underline; }

.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--color-muted);
  font-size: 13px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Page hero banner (news listing) ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--color-primary), var(--color-gold));
  border-radius: var(--radius-lg);
  margin-top: 24px;
  padding: 54px 20px;
  text-align: center;
  color: #fff;
}
.page-banner h1 { font-size: 34px; margin: 0 0 8px; }
.page-banner p { margin: 0; opacity: .9; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}
.pagination button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-weight: 700;
}
.pagination button.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ---------- Newsletter CTA ---------- */
.newsletter {
  background: var(--color-dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  flex-wrap: wrap;
}
.newsletter h3 { margin: 0 0 6px; font-size: 20px; }
.newsletter p { margin: 0; color: rgba(255,255,255,.7); font-size: 14px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  min-width: 240px;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,.75);
  margin-top: 60px;
  padding-top: 44px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding-bottom: 30px;
}
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-col ul li { margin-bottom: 9px; font-size: 13.5px; }
.footer-col ul a:hover { color: #fff; }
.footer-col p { font-size: 13.5px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-social a:hover { background: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  text-align: center;
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: flex-start; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--color-muted); }
