﻿/* ==========================================================================
   Caramen 1000 â€” giao diá»‡n tá»‘i giáº£n, áº¥m, khÃ´ng phá»¥ thuá»™c thÆ° viá»‡n ngoÃ i
   ========================================================================== */

:root {
  --cream: #fbf4e8;
  --cream-2: #f6ead7;
  --card: #fffdf8;
  --ink: #2a1a0f;
  --ink-2: #4a3524;
  --muted: #7d6853;
  --caramel: #a95e22;
  --caramel-2: #8a4715;
  --gold: #e3a24a;
  --gold-soft: #f7d9a4;
  --line: rgba(74, 53, 36, 0.14);
  --line-strong: rgba(74, 53, 36, 0.22);
  --shadow-card: 0 1px 2px rgba(74, 53, 36, 0.04), 0 24px 48px -32px rgba(74, 53, 36, 0.4);
  --radius-lg: 26px;
  --radius-md: 18px;
  --wrap: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--cream);
  background-image:
    radial-gradient(1100px 640px at 88% -12%, #fbe2ba 0%, rgba(251, 226, 186, 0) 62%),
    radial-gradient(900px 560px at -12% 4%, #fff7e9 0%, rgba(255, 247, 233, 0) 58%);
  background-repeat: no-repeat;
}

::selection {
  background: rgba(227, 162, 74, 0.35);
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --------------------------------- Header --------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 244, 232, 0.82);
  border-bottom: 1px solid rgba(74, 53, 36, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-name {
  font-size: 1em;
  font-weight: 650;
}

.brand-by {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 500;
}

.brand b {
  color: var(--caramel);
  font-weight: 750;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9a58d;
  box-shadow: 0 0 0 3px rgba(185, 165, 141, 0.18);
}

.live.is-live {
  color: #3d6b47;
  border-color: rgba(61, 107, 71, 0.22);
  background: rgba(238, 246, 237, 0.75);
}

.live.is-live .live-dot {
  background: #4e8a5c;
  box-shadow: 0 0 0 3px rgba(78, 138, 92, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}

.live.is-error {
  color: #8a4715;
  border-color: rgba(138, 71, 21, 0.24);
  background: rgba(250, 233, 208, 0.8);
}

.live.is-error .live-dot {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(227, 162, 74, 0.22);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.75);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover {
  background: #fff;
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 60px);
  padding-block: clamp(44px, 6vw, 84px) clamp(26px, 4vw, 44px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--caramel);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.55rem);
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 .mark {
  position: relative;
  z-index: 0;
  color: var(--caramel-2);
  white-space: nowrap;
}

.hero h1 .mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.05em;
  right: -0.05em;
  bottom: 0.03em;
  height: 0.26em;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(227, 162, 74, 0.55), rgba(247, 217, 164, 0.25));
}

.lede {
  max-width: 46ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  color: #fff8ee;
  background: linear-gradient(135deg, #b2682b 0%, #8f4a18 100%);
  box-shadow: 0 12px 26px -14px rgba(143, 74, 24, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -14px rgba(143, 74, 24, 0.95);
  filter: brightness(1.04);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.66);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.btn-light {
  background: #fff7e9;
  color: #6d3510;
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.65);
}

.btn-light:hover {
  transform: translateY(-1px);
  background: #fff;
}

.btn.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

.cta-hint {
  margin-top: 12px;
  color: var(--caramel-2);
  font-size: 13px;
}

/* ------------------------------ Progress card ----------------------------- */

.progress-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(74, 53, 36, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffdf9 0%, #fffaf1 100%);
  box-shadow: var(--shadow-card);
}

.progress-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 217, 164, 0.55), rgba(247, 217, 164, 0) 68%);
  pointer-events: none;
}

.progress-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.progress-updated {
  margin-top: 4px;
  color: #75604a;
  font-size: 12.5px;
}

.percent {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8e6c8;
  color: #8a4a12;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.big-number {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 18px;
  font-size: clamp(3rem, 6.6vw, 4.3rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.big-number #sold {
  display: inline-block;
}

.big-total {
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #f0e2cb;
  box-shadow: inset 0 1px 2px rgba(74, 53, 36, 0.12);
  overflow: hidden;
}

.bar-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9d5320 0%, #c47c31 52%, #e6ab55 100%);
  box-shadow: 0 6px 16px -8px rgba(178, 104, 43, 0.8);
  transition: width 1s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 65%);
}

.bar-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bar-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.8);
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #75604a;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.remaining {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.remaining.is-done {
  color: #3d6b47;
}

.data-note {
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(227, 162, 74, 0.35);
  border-radius: 10px;
  background: #fdf1da;
  color: #7a5410;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------------------------------- Stats --------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 8px;
}

.stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.68);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.stat-value {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------- Orders --------------------------------- */

.orders {
  padding-block: clamp(52px, 7vw, 88px) clamp(14px, 2vw, 20px);
}

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

.section-intro {
  max-width: 620px;
}

.section-head .eyebrow {
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
}

.chip {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.chip:hover {
  color: var(--ink);
}

.chip.is-active {
  color: #fff8ee;
  background: linear-gradient(135deg, #b2682b, #8f4a18);
  box-shadow: 0 8px 18px -12px rgba(143, 74, 24, 0.9);
}

.order-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.order {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(74, 53, 36, 0.075);
  transition: background 0.15s ease;
}

.order:last-child {
  border-bottom: 0;
}

.order:not(.skeleton-row):hover {
  background: #fdf7ec;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 750;
}

.tone-0 { background: #faecd4; color: #8a4a12; }
.tone-1 { background: #f3e3ee; color: #7a3a5e; }
.tone-2 { background: #e7efe6; color: #43603b; }
.tone-3 { background: #e9ecf6; color: #3f4c7a; }
.tone-4 { background: #f8e8dc; color: #8c4a2a; }

.order-main {
  min-width: 0;
}

.order-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.order-meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.tag {
  flex: none;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-online { background: #f8e6c8; color: #8a4a12; }
.tag-home { background: #e9efe2; color: #4d6535; }
.tag-other { background: #f0e7dc; color: #6a5440; }

.order-qty {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.order-qty b {
  display: block;
  color: var(--caramel-2);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.list-count {
  color: #75604a;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.list-state {
  padding: 42px 24px;
  text-align: center;
}

.list-state-title {
  font-size: 16px;
  font-weight: 700;
}

.list-state-desc {
  max-width: 46ch;
  margin: 6px auto 16px;
  color: var(--muted);
  font-size: 14px;
}

.skeleton-row {
  pointer-events: none;
}

.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2e8d8 25%, #faf3e7 37%, #f2e8d8 63%);
  background-size: 400px 100%;
  animation: shimmer 1.4s linear infinite;
}

.sk-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.sk-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sk-line {
  width: 42%;
  height: 12px;
}

.sk-line.short {
  width: 26%;
  height: 10px;
}

.sk-qty {
  width: 46px;
  height: 18px;
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* -------------------------------- CTA band -------------------------------- */

.cta-section {
  padding-block: clamp(40px, 5vw, 64px) clamp(48px, 6vw, 76px);
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 26px;
  padding: clamp(28px, 4.5vw, 46px);
  border-radius: 30px;
  color: #fff7ea;
  background-image:
    radial-gradient(620px 320px at 92% -30%, rgba(240, 191, 109, 0.4), rgba(240, 191, 109, 0) 62%),
    linear-gradient(118deg, #7d3f12 0%, #a95e22 58%, #8f4a18 100%);
  box-shadow: 0 34px 64px -44px rgba(125, 63, 18, 0.95);
}

.cta-copy {
  max-width: 540px;
}

.cta-card h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff8ec;
}

.cta-card p {
  margin-top: 8px;
  color: rgba(255, 245, 228, 0.78);
  font-size: 14.5px;
}

/* --------------------------------- Footer --------------------------------- */

.site-footer {
  border-top: 1px solid rgba(74, 53, 36, 0.1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 26px 40px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-meta {
  color: #75604a;
}

/* ---------------------------------- Toast --------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: min(90vw, 420px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13.5px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 70;
  padding-block: 14px;
  background: #fff3d9;
  color: #7a5410;
  font-size: 14px;
  text-align: center;
}

/* -------------------------------- Responsive ------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-block: clamp(34px, 6vw, 56px) 24px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .progress-card {
    max-width: 620px;
  }

  .orders {
    padding-top: 56px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand {
    gap: 8px;
  }

  .live-text {
    display: none;
  }

  .live {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .hero h1 {
    letter-spacing: -0.03em;
  }

  .lede {
    font-size: 15.5px;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  .big-number {
    margin-top: 10px;
  }

  .stat {
    padding: 14px 12px;
  }

  .stat-label {
    font-size: 11px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .filters {
    width: 100%;
    justify-content: space-between;
  }

  .chip {
    flex: 1;
    min-height: 36px;
    padding: 0 8px;
  }

  .order {
    gap: 11px;
    padding: 13px 15px;
  }

  .avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 15px;
  }

  .order-name {
    font-size: 14.5px;
  }

  .order-qty b {
    font-size: 16.5px;
  }

  .cta-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .cta-card .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 32px;
  }
}

@media (max-width: 360px) {
  .live {
    display: none;
  }
}

@media (max-width: 400px) {
  .order-meta {
    font-size: 11.5px;
  }

  .tag {
    display: none;
  }
}

/* ------------------------------- Accessibility ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
