
:root {
  --bg: #FFFDF8;
  --text: #4F463E;
  --heading: #2F2923;
  --accent: #6B3F2A;
  --accent-light: #A9805F;
  --card-bg: #FFFFFF;
  --border: #EFE7DC;
  --muted: #6E6355;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Kanit', sans-serif;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 700; font-size: 20px; color: var(--heading); letter-spacing: 0.3px; }
.brand span { color: var(--accent); }
nav.crumb { font-size: 13.5px; color: var(--muted); }
nav.crumb a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb-sep { color: var(--muted); }

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }

.sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 0;
  position: sticky;
  top: 76px;
}
.sidebar-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.sidebar .sidebar-label {
  margin: 0 18px 10px; font-size: 13px; color: var(--muted);
  font-weight: 500; letter-spacing: .5px; text-transform: uppercase;
}
.sidebar .sidebar-arrow { display: none; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; padding: 11px 18px; font-size: 15px; color: var(--text); border-left: 3px solid transparent; }
.sidebar li a:hover { background: #FBF6EC; color: var(--accent); }
.sidebar li.active a { border-left-color: var(--accent); background: #FBF6EC; color: var(--accent); font-weight: 500; }
.sidebar li .soon { float: right; font-size: 11px; color: var(--muted); background: var(--border); padding: 1px 7px; border-radius: 10px; }

@media (max-width: 760px) {
  .sidebar {
    position: static;
    padding: 12px 0;
    overflow: hidden;
  }
  .sidebar .sidebar-label {
    margin: 0; padding: 0 14px 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
  }
  .sidebar .sidebar-arrow { display: inline-block; transition: transform .2s ease; font-size: 11px; }
  .sidebar-toggle-input:checked ~ .sidebar-label .sidebar-arrow { transform: rotate(180deg); }
  .sidebar ul {
    display: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 0 14px 4px;
  }
  .sidebar-toggle-input:checked ~ ul { display: flex; }
  .sidebar li { flex: 0 0 auto; }
  .sidebar li a {
    display: inline-block;
    padding: 8px 14px;
    border-left: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    white-space: nowrap;
  }
  .sidebar li.active a { border-color: var(--accent); }
  .sidebar li .soon { float: none; margin-left: 6px; }
}

main { min-width: 0; }

.page-intro h1 { font-size: clamp(22px, 4vw, 32px); color: var(--heading); margin: 0 0 12px; font-weight: 600; }
.page-intro p { max-width: 760px; color: var(--text); font-size: 15.5px; margin: 0 0 8px; }
.disclosure {
  display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted);
  background: #F6EFE4; border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px;
}

.toolbar {
  margin-top: 22px; display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; font-size: 14px; color: var(--text);
}
.toolbar select {
  font-family: 'Kanit', sans-serif; font-size: 14px; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; background: #fff;
}
.pc-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.pc-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease;
}
.pc-card:hover { box-shadow: 0 8px 20px rgba(107,63,42,0.12); transform: translateY(-2px); }
.pc-imgwrap { display: block; aspect-ratio: 1 / 1; background: #F6F1E9; overflow: hidden; }
.pc-imgwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.pc-title { font-size: 14px; font-weight: 400; color: var(--text); margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.pc-title a:hover { color: var(--accent); }
.pc-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pc-price { color: var(--accent); font-weight: 600; font-size: 17px; }
.pc-sold { font-size: 12px; color: var(--muted); }
.pc-shop { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.pc-actions { margin-top: auto; display: flex; gap: 8px; }
.pc-btn {
  flex: 1; display: block; text-align: center; background: var(--accent); color: #fff;
  padding: 9px 8px; border-radius: 3px; font-size: 13.5px; font-weight: 500;
}
.pc-btn:hover { background: #55301F; }
.pc-btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.pc-btn.secondary:hover { background: #FBF6EC; }

.soon-box {
  background: #fff; border: 1px dashed var(--border); border-radius: 10px; padding: 60px 24px;
  text-align: center; color: var(--muted); margin-top: 24px;
}
.soon-box h2 { color: var(--heading); font-weight: 600; margin-bottom: 8px; }

.category-grid {
  margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
.category-card {
  position: relative; display: block; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 22px; transition: box-shadow .2s ease, transform .2s ease;
}
.category-card:hover { box-shadow: 0 8px 20px rgba(107,63,42,0.12); transform: translateY(-2px); }
.category-card h2 { font-size: 18px; color: var(--heading); margin: 8px 0 8px; }
.category-card p { font-size: 14px; color: var(--text); margin: 0 0 12px; }
.category-card.cc-soon { opacity: .75; }
.cc-badge {
  display: inline-block; font-size: 11px; color: var(--muted); background: var(--border);
  padding: 2px 9px; border-radius: 10px;
}
.cc-badge-new { color: #fff; background: var(--accent); }
.cc-cta { color: var(--accent); font-weight: 500; font-size: 14px; }

footer.site-footer { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

/* pagination */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 36px; flex-wrap: wrap; font-size: 14px;
}
.pagination a, .pagination span.current, .pagination span.ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--text); background: #fff;
}
.pagination a:hover { background: #FBF6EC; color: var(--accent); border-color: var(--accent); }
.pagination span.current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pagination span.ellipsis { border: none; background: none; }
.pagination a.nav-btn { font-weight: 500; }
.pagination a.disabled { opacity: .4; pointer-events: none; }

/* related products */
.related-products { margin-top: 26px; }
.related-products h2 { font-size: 17px; color: var(--heading); margin: 0 0 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.related-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: block; }
.related-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #F6F1E9; }
.related-card .rc-body { padding: 10px; }
.related-card .rc-title {
  font-size: 12.5px; color: var(--text); margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.related-card .rc-price { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.related-card:hover .rc-title { color: var(--accent); }

/* product detail page */
.product-detail { max-width: 900px; }
.pd-top {
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px;
}
@media (max-width: 700px) { .pd-top { grid-template-columns: 1fr; } }
.pd-img { aspect-ratio: 1/1; background: #F6F1E9; border-radius: 8px; overflow: hidden; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-info h1 { font-size: 20px; color: var(--heading); margin: 0 0 10px; font-weight: 600; line-height: 1.4; }
.pd-btn { max-width: 260px; margin-top: 10px; margin-bottom: 10px; display: block; }
.pd-article { margin-top: 26px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.pd-article h2 { font-size: 17px; color: var(--heading); margin: 22px 0 8px; }
.pd-article h2:first-child { margin-top: 0; }
.pd-article p { font-size: 14.5px; margin: 0 0 10px; }
.pd-article ul { margin: 0 0 10px; padding-left: 20px; font-size: 14.5px; }
.pd-article li { margin-bottom: 6px; }
.back-link { display: inline-block; margin-top: 20px; color: var(--accent); font-size: 14px; }
