:root {
  --ink: #211D1A;
  --paper: #F3EEE3;
  --surface: #E9E0CB;
  --surface-2: #DED2B4;
  --accent: #5C6B45;
  --accent-deep: #40492F;
  --rust: #A6472E;
  --muted: #756B5C;
  --line: #DACBAA;
  --radius: 3px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EDE6D6;
    --paper: #1C1916;
    --surface: #262019;
    --surface-2: #302A20;
    --accent: #8FA070;
    --accent-deep: #B9C79C;
    --rust: #D97656;
    --muted: #A89A85;
    --line: #3A3226;
  }
}

:root[data-theme="dark"] {
  --ink: #EDE6D6;
  --paper: #1C1916;
  --surface: #262019;
  --surface-2: #302A20;
  --accent: #8FA070;
  --accent-deep: #B9C79C;
  --rust: #D97656;
  --muted: #A89A85;
  --line: #3A3226;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  font-family: 'Noto Sans Thai', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: 'Chakra Petch', 'Noto Sans Thai', sans-serif;
  font-weight: 600;
}

.note-text { font-size: 13px; color: var(--muted); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  z-index: 100;
}

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

.logo {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

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

.nav { display: flex; gap: 32px; }

.nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-small { padding: 9px 18px; font-size: 12px; }

/* Hero */
.hero {
  padding: 72px 0;
  border-bottom: 2px solid var(--ink);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-text { text-align: left; }

.hero-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--ink);
}

.eyebrow {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent-deep);
  padding: 5px 12px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 32px;
  font-size: 16px;
  font-weight: 400;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-text { text-align: center; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-image { max-width: 420px; margin: 0 auto; }
}

/* Trust bar */
.trust-bar {
  background: var(--accent-deep);
  color: var(--paper);
  padding: 12px 0;
}

.trust-bar-inner {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: 'Oswald', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.trust-bar .dot { opacity: 0.5; }

/* Section titles */
.section-title {
  font-size: 26px;
  text-align: center;
  margin-bottom: 10px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
  font-weight: 400;
}

/* Products */
.products { padding: 80px 0; }

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.filter-tab {
  font-family: 'Oswald', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover { background: var(--surface); }

.filter-tab.active {
  background: var(--ink);
  color: var(--paper);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.product-card { text-align: left; }

.product-image {
  display: block;
  aspect-ratio: 4/5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}

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

.product-cat {
  font-family: 'Oswald', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 4px;
}

.product-name {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

.product-price {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 14px;
  font-family: 'Chakra Petch', sans-serif;
}

/* Product detail page */
.product-detail { padding: 56px 0 96px; }

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 40px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.detail-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--ink);
}

.detail-cat {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.detail-info h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.detail-price {
  font-size: 22px;
  font-weight: 600;
  font-family: 'Chakra Petch', sans-serif;
  margin-bottom: 8px;
}

.detail-color {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.detail-description {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
  font-weight: 400;
}

.detail-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}

.size-list { display: flex; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }

.size-pill {
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  font-family: 'Chakra Petch', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.size-pill:hover { border-color: var(--ink); }

.size-pill.selected {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.detail-qty { margin-bottom: 32px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.qty-btn {
  border: none;
  background: none;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}

.qty-btn:hover { color: var(--accent-deep); }

.qty-stepper span, #qty-value { min-width: 32px; text-align: center; font-size: 14px; }

.detail-cta { display: inline-block; border: none; cursor: pointer; font-family: 'Oswald', sans-serif; }

.added-msg { margin-top: 14px; font-size: 14px; color: var(--muted); }
.added-msg a { text-decoration: underline; color: var(--accent-deep); }

.cart-link { white-space: nowrap; }

.not-found { text-align: center; padding: 64px 0; }
.not-found h2 { font-size: 24px; margin-bottom: 8px; }

@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* About */
.about {
  background: var(--surface);
  padding: 88px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.about-inner { max-width: 640px; text-align: center; }
.about p { color: var(--muted); font-size: 16px; font-weight: 400; }

/* Contact */
.contact { padding: 88px 0; text-align: center; }

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Footer */
.site-footer { border-top: 2px solid var(--ink); padding: 32px 0; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-social { display: flex; gap: 20px; }
.footer-social a:hover { color: var(--ink); }

/* Cart page */
.cart-page { padding: 56px 0 96px; }
.cart-title { text-align: left; margin-bottom: 40px; }

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cart-item-image {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.cart-item-name { font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.cart-item-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.cart-item-side { text-align: right; }
.cart-item-line-total { font-size: 15px; margin-bottom: 12px; font-weight: 600; font-family: 'Chakra Petch', sans-serif; }

.cart-remove-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.cart-remove-btn:hover { color: var(--rust); }

.cart-summary {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Chakra Petch', sans-serif;
}

.cart-summary-note { color: var(--muted); font-size: 13px; margin-bottom: 24px; font-family: 'Noto Sans Thai', sans-serif; font-weight: 400; }
.cart-checkout-btn { display: block; text-align: center; margin-bottom: 16px; }
.cart-continue-link { display: inline-block; color: var(--muted); font-size: 14px; }
.cart-continue-link:hover { color: var(--ink); }

/* Checkout page */
.checkout-page { padding: 56px 0 96px; }
.checkout-title { text-align: left; margin-bottom: 32px; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}

.checkout-form { display: flex; flex-direction: column; gap: 20px; }

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.checkout-form input, .checkout-form textarea {
  font-family: 'Noto Sans Thai', inherit;
  font-size: 15px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  resize: vertical;
  background: var(--paper);
}

.checkout-form input:focus, .checkout-form textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
}

.payment-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.payment-line { font-size: 14px; margin-bottom: 4px; }
.payment-note { font-size: 12px; color: var(--muted); margin-top: 12px; }

.checkout-submit-btn { border: none; cursor: pointer; font-family: 'Oswald', sans-serif; margin-top: 8px; }

.checkout-summary-col {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
}

.checkout-summary-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.checkout-summary-item img {
  width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line);
}

.checkout-total-row { border-top: 2px solid var(--ink); padding-top: 16px; margin-top: 8px; }

/* Order confirmation */
.order-confirmation { max-width: 560px; margin: 0 auto; text-align: center; padding: 40px 0; }
.order-confirmation h2 { font-size: 26px; margin-bottom: 12px; }
.order-instruction { color: var(--muted); font-size: 14px; margin: 16px 0 24px; font-weight: 400; }

.order-summary-box {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  font-family: 'Noto Sans Thai', inherit;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 24px;
}

.order-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

/* Responsive */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .hero { padding: 56px 0; }
  .checkout-grid { grid-template-columns: 1fr; gap: 32px; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}

@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
  .contact-buttons { flex-direction: column; align-items: stretch; }
}
