/* =============================================================
   KIM PHÁT CALENDAR · Shared stylesheet
   Design system: warm ivory, cinnabar red, antique gold
   ============================================================= */

:root {
  /* Surfaces */
  --bg-page: #F7F1E3;
  --bg-surface: #FFFDF7;
  --bg-muted: #F2EAD6;
  --bg-deep: #1D1A15;

  /* Ink */
  --ink-primary: #1D1A15;
  --ink-secondary: #5F584D;
  --ink-tertiary: #93897C;
  --ink-inverse: #F7F1E3;
  --ink-inverse-dim: rgba(247,241,227,0.72);

  /* Borders */
  --border: rgba(29,26,21,0.09);
  --border-strong: rgba(29,26,21,0.18);
  --border-inverse: rgba(247,241,227,0.15);

  /* Accents */
  --red: #A8201E;
  --red-deep: #6B1411;
  --red-soft: #F2E0DE;
  --gold: #8C6B28;
  --gold-soft: #E8DAB3;
  --gold-bright: #C9A960;

  /* Type */
  --font-serif: 'Noto Serif', 'Noto Serif TC', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --font-cn: 'Noto Serif TC', 'Noto Serif', serif;

  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

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

/* =============================================================
   TOP UTILITY BAR (announcement + language)
   ============================================================= */
.topbar {
  background: var(--bg-deep);
  color: var(--ink-inverse);
  font-size: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(247,241,227,0.08);
}
.topbar .container {
  display: flex;
  align-items: center;
  gap: 28px;
}
.announce-wrap {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}
.announce {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: scroll-left 50s linear infinite;
  color: var(--ink-inverse-dim);
  font-weight: 400;
}
.announce span { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.announce .sep { color: var(--gold-bright); font-weight: 600; }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Language dropdown */
.lang-dropdown {
  position: relative;
  flex-shrink: 0;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-inverse);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 4px 2px;
}
.lang-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
  opacity: 0.8;
}
.lang-dropdown.open .lang-trigger svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 160px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(29,26,21,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}
.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-secondary);
  border-radius: 4px;
  transition: background 0.15s;
}
.lang-menu a:hover { background: var(--bg-muted); color: var(--ink-primary); }
.lang-menu a.active { color: var(--ink-primary); font-weight: 500; background: var(--bg-muted); }
.lang-menu a.active::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}
.lang-menu a .flag-tag {
  font-size: 10px;
  color: var(--ink-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

/* =============================================================
   HEADER
   ============================================================= */
.header {
  background: var(--bg-surface);
  border-bottom: 0.5px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header .container {
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.seal {
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.88;
  font-family: var(--font-cn);
  color: #FFFDF7;
  transform: rotate(-2deg);
  box-shadow: inset 0 0 0 1.5px rgba(255,253,247,0.22);
  font-weight: 700;
  padding: 3px;
  flex-shrink: 0;
}
.seal .c { font-size: 16px; letter-spacing: -0.5px; }
.brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-text .primary {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.brand-text .secondary {
  font-size: 11px;
  color: var(--ink-tertiary);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  font-size: 14px;
  color: var(--ink-secondary);
}
.nav a { position: relative; padding: 4px 0; transition: color 0.2s; }
.nav a:hover { color: var(--ink-primary); }
.nav a.active { color: var(--ink-primary); font-weight: 500; }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-secondary);
  transition: background 0.2s;
  position: relative;
}
.icon-btn:hover { background: var(--bg-muted); }
.icon-btn svg { width: 18px; height: 18px; }
.cart-count {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--red);
  color: #FFFDF7;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.mobile-menu-btn { display: none; }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  transition: all 0.2s;
  border: 0.5px solid var(--border-strong);
  background: transparent;
  text-align: center;
}
.btn:hover { background: var(--bg-muted); }
.btn.primary {
  background: var(--red);
  color: #FFFDF7;
  border-color: var(--red);
}
.btn.primary:hover { background: var(--red-deep); }
.btn.gold {
  background: var(--gold);
  color: #FFFDF7;
  border-color: var(--gold);
}
.btn.gold:hover { background: #6B5220; }
.btn.ghost { background: transparent; color: var(--ink-primary); }
.btn.large { padding: 16px 28px; font-size: 15px; }
.btn.small { padding: 8px 14px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; }

/* =============================================================
   SECTION HEAD
   ============================================================= */
.section-head {
  margin-bottom: 48px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--border-strong);
}
.section-head .left {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.8px;
}
.section-head .num {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.section-head .right {
  font-size: 13px;
  color: var(--ink-tertiary);
}

/* =============================================================
   PRODUCT CARD
   ============================================================= */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 0.5px solid var(--border);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(29,26,21,0.15);
}
.product-card a { color: inherit; }
.product-media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

/* Placeholder blocks (replace with <img> when photos arrive) */
.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFDF7;
  font-family: var(--font-serif);
  text-align: center;
  padding: 20px;
}
.media-placeholder::before {
  content: '';
  position: absolute;
  inset: 22px;
  border: 0.5px solid rgba(255,253,247,0.25);
  pointer-events: none;
}
.media-placeholder::after {
  content: attr(data-label);
  position: absolute;
  bottom: 28px;
  left: 32px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,253,247,0.72);
}
.media-placeholder .big-num {
  font-size: 92px;
  font-weight: 700;
  letter-spacing: -4px;
  line-height: 1;
  margin-bottom: 6px;
}
.media-placeholder .big-text {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
}
.media-placeholder .sub-text {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 8px;
  color: rgba(255,253,247,0.85);
}
.pm-red { background: linear-gradient(145deg, var(--red-deep) 0%, var(--red) 100%); }
.pm-gold { background: linear-gradient(145deg, #5C4517 0%, var(--gold) 100%); }
.pm-ink { background: linear-gradient(145deg, #0E0D0A 0%, #3A3631 100%); }
.pm-cream {
  background: linear-gradient(145deg, var(--gold-bright) 0%, var(--gold-soft) 100%);
  color: var(--red-deep);
}
.pm-cream::after { color: var(--red-deep); opacity: 0.75; }
.pm-cream::before { border-color: rgba(107,20,17,0.25); }
.pm-plum { background: linear-gradient(145deg, #3D1620 0%, #6E2E3F 100%); }
.pm-indigo { background: linear-gradient(145deg, #18243D 0%, #2C4566 100%); }

.product-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-cat {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.product-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  line-height: 1.2;
}
.product-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
}
.product-price {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-primary);
}
.product-price .from {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-tertiary);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 5px;
}
.product-variants {
  font-size: 11px;
  color: var(--ink-tertiary);
}
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.product-actions .btn {
  padding: 10px 12px;
  font-size: 12px;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--bg-deep);
  color: var(--ink-inverse);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand-block .seal {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}
.footer-brand-block .seal .c { font-size: 20px; }
.footer-brand-block .tagline {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(247,241,227,0.88);
  margin-bottom: 14px;
  max-width: 300px;
}
.footer-brand-block .tagline em {
  color: var(--gold-bright);
  font-style: normal;
}
.footer-brand-block .tagline-sub {
  font-size: 12px;
  color: rgba(247,241,227,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}
.footer-col h5 {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 600;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li {
  padding: 7px 0;
  font-size: 13px;
  color: rgba(247,241,227,0.82);
}
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--ink-inverse); }
.footer-contact .info-line {
  font-size: 13px;
  color: rgba(247,241,227,0.82);
  line-height: 1.65;
  margin-bottom: 14px;
}
.footer-contact .info-line .label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(247,241,227,0.5);
  margin-bottom: 3px;
  font-weight: 600;
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(247,241,227,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: var(--ink-inverse);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.footer-socials a:hover { background: rgba(247,241,227,0.18); }
.footer-socials svg { width: 15px; height: 15px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 0.5px solid var(--border-inverse);
  font-size: 11px;
  color: rgba(247,241,227,0.55);
  flex-wrap: wrap;
  gap: 20px;
}
.footer-bottom .lang-trigger { color: rgba(247,241,227,0.78); font-size: 11px; }

/* =============================================================
   FORMS
   ============================================================= */
.form-group { margin-bottom: 18px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}
.form-label .req { color: var(--red); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168,32,30,0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}
.form-help {
  font-size: 12px;
  color: var(--ink-tertiary);
  margin-top: 6px;
  line-height: 1.5;
}
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
}
.form-checkbox input {
  margin-top: 3px;
  accent-color: var(--red);
}

/* =============================================================
   STATUS / PILLS
   ============================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-gold { background: var(--gold-soft); color: var(--gold); }
.pill-muted { background: var(--bg-muted); color: var(--ink-secondary); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .nav { display: none; }
  .header { padding: 14px 0; }
  .header .container { justify-content: space-between; gap: 12px; }
  .mobile-menu-btn { display: flex; }
  .section-head h2 { font-size: 28px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .announce { animation-duration: 35s; }
  .topbar .container { gap: 16px; }
  .brand-text .secondary { display: none; }
}

/* =============================================================
   UTILITY
   ============================================================= */
.hidden-mobile { display: block; }
.hidden-desktop { display: none; }
@media (max-width: 760px) {
  .hidden-mobile { display: none; }
  .hidden-desktop { display: block; }
}

.text-center { text-align: center; }
.text-muted { color: var(--ink-secondary); }
.text-tertiary { color: var(--ink-tertiary); }
.text-accent { color: var(--red); }
.text-gold { color: var(--gold); }

/* =============================================================
   TOAST NOTIFICATION
   ============================================================= */
.kp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-deep);
  color: var(--ink-inverse);
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
}
.kp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =============================================================
   OVERLAY / MODAL
   ============================================================= */
.kp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29,26,21,0.6);
  backdrop-filter: blur(4px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}
.kp-overlay.show { opacity: 1; }
.kp-overlay-box {
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  transform: scale(0.95);
  transition: transform 0.3s;
}
.kp-overlay.show .kp-overlay-box { transform: scale(1); }

/* =============================================================
   MOBILE DRAWER
   ============================================================= */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: var(--bg-surface);
  z-index: 60;
  transition: right 0.3s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
  overflow-y: auto;
}
.mobile-drawer.open { right: 0; }
.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 0.5px solid var(--border);
}
.mobile-drawer-head .seal { width: 36px; height: 36px; }
.mobile-drawer-head .seal .c { font-size: 13px; }
.mobile-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--ink-secondary);
  transition: background 0.2s;
}
.mobile-close:hover { background: var(--bg-muted); }
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}
.mobile-nav a {
  padding: 14px 24px;
  font-size: 15px;
  color: var(--ink-secondary);
  border-bottom: 0.5px solid var(--border);
  transition: all 0.15s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--ink-primary);
  background: var(--bg-muted);
}
.mobile-nav a.active { font-weight: 600; border-left: 3px solid var(--red); }
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29,26,21,0.4);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-backdrop.open { opacity: 1; visibility: visible; }

.mobile-menu-btn svg { width: 20px; height: 20px; }

/* =============================================================
   CART EMPTY STATE
   ============================================================= */
.cart-empty {
  padding: 60px 24px;
  text-align: center;
}
.cart-empty-icon { font-size: 48px; margin-bottom: 16px; }
.cart-empty h3 { font-size: 24px; margin-bottom: 8px; }
.cart-empty p { color: var(--ink-secondary); margin-bottom: 24px; font-size: 14px; }

/* =============================================================
   BODY NO-SCROLL
   ============================================================= */
body.no-scroll { overflow: hidden; }
