:root {
  --color-black: #111111;
  --color-ink: #242424;
  --color-muted: #6f6f6f;
  --color-soft: #f5f4f1;
  --color-line: #e3dfd7;
  --color-white: #ffffff;
  --color-gold: #c9a24a;
  --color-gold-dark: #9f7c28;
  --shadow-soft: 0 18px 45px rgba(17, 17, 17, 0.12);
  --radius: 8px;
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-ink);
  line-height: 1.7;
}

body.modal-open {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  display: flex;
  gap: 28px;
  height: 76px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 4vw, 64px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  font-weight: 700;
  min-width: max-content;
}

.brand-mark {
  align-items: center;
  background: var(--color-black);
  color: var(--color-gold);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand-text {
  font-size: 1.04rem;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.95rem;
  font-weight: 600;
}

.main-nav a {
  color: #393939;
  padding: 10px 0;
}

.main-nav a:hover {
  color: var(--color-gold-dark);
}

.store-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.store-actions button {
  background: var(--color-black);
  border: 1px solid var(--color-black);
  color: var(--color-gold);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.store-actions button:first-child {
  background: var(--color-white);
  color: var(--color-black);
}

.store-actions span {
  background: var(--color-gold);
  color: var(--color-black);
  display: inline-flex;
  font-size: 0.78rem;
  justify-content: center;
  margin-left: 4px;
  min-width: 22px;
  padding: 1px 6px;
}

.menu-toggle {
  background: transparent;
  border: 0;
  display: none;
  height: 42px;
  padding: 8px;
  width: 42px;
}

.menu-toggle span {
  background: var(--color-black);
  display: block;
  height: 2px;
  margin: 6px 0;
  width: 100%;
}

.hero {
  align-items: center;
  background-image: url("https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  color: var(--color-white);
  display: flex;
  min-height: min(720px, calc(100vh - 76px));
  padding: clamp(88px, 14vw, 150px) clamp(18px, 6vw, 80px);
  position: relative;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.16));
  inset: 0;
  position: absolute;
}

.hero-content {
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--color-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.45rem, 7vw, 5.2rem);
  line-height: 1.12;
  margin: 0 0 18px;
  max-width: 820px;
}

.hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  margin: 0 0 28px;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-black);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--color-white);
}

.section {
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.intro-band {
  background: var(--color-black);
  color: var(--color-white);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 28px;
  padding-top: 28px;
}

.intro-item {
  border-left: 1px solid rgba(201, 162, 74, 0.6);
  padding-left: 20px;
}

.intro-item strong,
.intro-item span {
  display: block;
}

.intro-item span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto 28px;
  max-width: 1180px;
}

.section-heading h2,
.split-section h2,
.warranty-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0;
}

.refresh-button {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  color: var(--color-black);
  cursor: pointer;
  min-height: 42px;
  padding: 8px 14px;
}

.refresh-button:hover {
  border-color: var(--color-gold);
}

.filters {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px);
  margin: 0 auto 20px;
  max-width: 1180px;
}

.filters label {
  display: grid;
  gap: 6px;
}

.filters span {
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.filters input,
.filters select {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 0;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 26px;
  max-width: 1180px;
}

.category-tabs button {
  background: var(--color-soft);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 40px;
  padding: 8px 14px;
}

.category-tabs button.active {
  background: var(--color-black);
  color: var(--color-gold);
}

.state-box,
.empty-state {
  background: var(--color-soft);
  border: 1px solid var(--color-line);
  margin: 0 auto 18px;
  max-width: 1180px;
  padding: 18px;
}

.state-box.error {
  border-color: #c77b7b;
  color: #8a2d2d;
}

.product-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.product-card figure {
  aspect-ratio: 4 / 3;
  background: var(--color-soft);
  margin: 0;
  overflow: hidden;
}

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

.product-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.product-meta {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 8px;
}

.product-status {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 9px;
  width: fit-content;
}

.product-status.soldout {
  background: #8d8d8d;
}

.product-status.reserved {
  background: var(--color-gold-dark);
}

.product-card h3 {
  font-size: 1.08rem;
  line-height: 1.42;
  margin: 0;
}

.price {
  color: var(--color-black);
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0;
}

.product-short {
  color: var(--color-muted);
  font-size: 0.94rem;
  margin: 0;
}

.product-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
}

.product-actions button,
.product-actions a {
  align-items: center;
  border: 1px solid var(--color-line);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 8px;
  text-align: center;
}

.product-actions a {
  background: var(--color-black);
  color: var(--color-gold);
}

body[data-card-size="compact"] .product-grid {
  gap: 16px;
}

body[data-card-size="compact"] .product-body {
  padding: 14px;
}

body[data-card-size="large"] .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-card-size="large"] .product-body {
  padding: 24px;
}

body[data-image-ratio="1-1"] .product-card figure {
  aspect-ratio: 1 / 1;
}

body[data-image-ratio="4-5"] .product-card figure {
  aspect-ratio: 4 / 5;
}

body[data-image-ratio="3-4"] .product-card figure {
  aspect-ratio: 3 / 4;
}

body[data-radius-style="soft"] {
  --radius: 8px;
}

body[data-radius-style="rounded"] {
  --radius: 16px;
}

body[data-radius-style="soft"] .product-card,
body[data-radius-style="soft"] .promo-card,
body[data-radius-style="soft"] .contact-item,
body[data-radius-style="soft"] .customer-panel,
body[data-radius-style="rounded"] .product-card,
body[data-radius-style="rounded"] .promo-card,
body[data-radius-style="rounded"] .contact-item,
body[data-radius-style="rounded"] .customer-panel {
  border-radius: var(--radius);
  overflow: hidden;
}

body[data-button-style="outline"] .btn-primary,
body[data-button-style="outline"] .product-actions a,
body[data-button-style="outline"] .product-actions button {
  background: transparent;
  border-color: var(--color-black);
  color: var(--color-black);
}

body[data-button-style="soft"] .btn-primary,
body[data-button-style="soft"] .product-actions a {
  background: rgba(201, 162, 74, 0.18);
  color: var(--color-black);
}

body[data-font-scale="compact"] {
  font-size: 0.94rem;
}

body[data-font-scale="large"] {
  font-size: 1.06rem;
}

body[data-header-style="centered"] .site-header {
  justify-content: center;
}

body[data-header-style="dark"] .site-header {
  background: var(--color-black);
  color: var(--color-white);
}

body[data-header-style="dark"] .main-nav a,
body[data-header-style="dark"] .brand-text {
  color: var(--color-white);
}

.premium-band {
  background: var(--color-soft);
}

.promo-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.promo-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  padding: 24px;
}

.promo-label {
  color: var(--color-gold-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.promo-card h3 {
  font-size: 1.22rem;
  margin: 8px 0 10px;
}

.promo-card p {
  color: var(--color-muted);
  margin: 0;
}

.split-section {
  align-items: start;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin: 0 auto;
  max-width: 1280px;
}

.section-copy {
  color: var(--color-muted);
  margin: 14px 0 0;
  max-width: 520px;
}

.steps {
  counter-reset: item;
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  align-items: center;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  display: flex;
  gap: 18px;
  min-height: 64px;
}

.steps span {
  color: var(--color-gold-dark);
  font-weight: 800;
  width: 44px;
}

.warranty-section {
  background: var(--color-black);
  color: var(--color-white);
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.warranty-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
  max-width: 720px;
}

.warranty-points {
  display: grid;
  gap: 12px;
}

.warranty-points p {
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin: 0;
  padding: 16px;
}

.contact-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.contact-item {
  border: 1px solid var(--color-line);
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 20px;
}

.contact-item span {
  color: var(--color-muted);
  font-size: 0.88rem;
}

.contact-item strong {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto;
  padding: 34px clamp(18px, 5vw, 72px);
}

.site-footer p {
  color: rgba(255, 255, 255, 0.65);
  margin: 8px 0 0;
  max-width: 680px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.copyright {
  grid-column: 1 / -1;
}

.floating-line {
  align-items: center;
  background: #06c755;
  border-radius: 999px;
  bottom: 22px;
  box-shadow: var(--shadow-soft);
  color: var(--color-white);
  display: inline-flex;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  position: fixed;
  right: 22px;
  width: 58px;
  z-index: 25;
}

.modal {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 40;
}

.modal.active {
  display: block;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
  inset: 0;
  position: absolute;
}

.modal-panel {
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1fr);
  left: 50%;
  max-height: min(760px, calc(100vh - 36px));
  max-width: 980px;
  overflow: auto;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 36px);
}

.modal-close {
  background: var(--color-black);
  border: 0;
  color: var(--color-white);
  cursor: pointer;
  font-size: 1.8rem;
  height: 42px;
  line-height: 1;
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
  z-index: 1;
}

.modal-panel img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  width: 100%;
}

.modal-content {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 40px);
}

.modal-content h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.22;
  margin: 0;
}

.modal-price {
  color: var(--color-gold-dark);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.modal-content p {
  margin: 0;
}

.modal-warranty {
  background: var(--color-soft);
  border-left: 3px solid var(--color-gold);
  display: grid;
  gap: 4px;
  padding: 14px;
}

.customer-panel {
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
  left: 50%;
  max-height: min(760px, calc(100vh - 36px));
  max-width: 760px;
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 36px);
}

.customer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 48px;
}

.customer-tabs button,
.small-link {
  background: var(--color-soft);
  border: 1px solid var(--color-line);
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 12px;
}

.customer-tabs button.active {
  background: var(--color-black);
  color: var(--color-gold);
}

.customer-section {
  display: none;
}

.customer-section.active {
  display: grid;
  gap: 16px;
}

.customer-section h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
  margin: 0;
}

.customer-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.customer-form {
  display: grid;
  gap: 14px;
}

.customer-form label {
  color: var(--color-muted);
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.customer-form input,
.customer-form textarea {
  border: 1px solid var(--color-line);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.favorite-list,
.cart-list {
  display: grid;
  gap: 10px;
}

.favorite-list h3 {
  margin: 12px 0 0;
}

.mini-product,
.cart-item,
.cart-summary,
.checkout-result {
  border: 1px solid var(--color-line);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.mini-product {
  grid-template-columns: 1fr auto;
}

.cart-item {
  align-items: center;
  grid-template-columns: 72px 1fr 92px;
}

.cart-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 72px;
}

.cart-item span {
  color: var(--color-muted);
  display: block;
}

.cart-summary {
  align-items: center;
  background: var(--color-soft);
  grid-template-columns: 1fr auto;
}

.customer-message {
  color: var(--color-muted);
  margin: 0;
  min-height: 24px;
}

.customer-message.success {
  color: #16724b;
}

.customer-message.error {
  color: #9d2d2d;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    min-height: 76px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .main-nav {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-line);
    display: none;
    flex-direction: column;
    gap: 0;
    left: 0;
    padding: 12px 18px 18px;
    position: absolute;
    right: 0;
    top: 76px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .store-actions {
    order: 3;
    width: 100%;
  }

  .store-actions button {
    flex: 1;
  }

  .intro-band,
  .product-grid,
  .promo-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .warranty-section,
  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-panel img {
    max-height: 360px;
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
  }

  .main-nav {
    top: 66px;
  }

  .hero {
    min-height: calc(100vh - 66px);
    padding-bottom: 96px;
    padding-top: 92px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.5));
  }

  .hero-actions,
  .product-actions,
  .filters,
  .intro-band,
  .product-grid,
  .promo-grid,
  .contact-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  body[data-card-size="large"] .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 56px 1fr;
  }

  .cart-item input {
    grid-column: 1 / -1;
  }

  .hero-actions .btn,
  .product-actions button,
  .product-actions a {
    width: 100%;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .floating-line {
    bottom: 16px;
    right: 16px;
  }
}
