:root {
  --ink: #151515;
  --muted: #6d6a65;
  --line: #e4dfd7;
  --paper: #f8f3ea;
  --white: #ffffff;
  --cream: #eee6d8;
  --accent: #8d6b3d;
  --deep: #243746;
  --sale: #9b2e2e;
  --shadow: 0 24px 80px rgba(20, 20, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Fahkwang, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.top-strip {
  min-height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(248, 243, 234, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.nav a,
.nav button {
  border: 0;
  background: transparent;
  color: inherit;
  text-transform: inherit;
}

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

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

select,
input,
.icon-btn,
.cart-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 3px;
}

select,
input {
  padding: 0 12px;
}

.icon-btn {
  width: 42px;
  display: inline-grid;
  place-items: center;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.cart-btn strong {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sale);
  color: var(--white);
  font-size: 12px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 34px));
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.72), rgba(21, 21, 21, 0.2) 55%, transparent),
    linear-gradient(0deg, rgba(21, 21, 21, 0.34), transparent 45%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  color: var(--white);
  width: min(720px, calc(100% - 40px));
  margin: 0 auto 78px max(24px, 8vw);
}

.hero-copy p,
.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(58px, 11vw, 138px);
  line-height: 0.88;
  letter-spacing: 0.08em;
}

.hero-copy span {
  display: block;
  max-width: 560px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.hero-copy a,
.checkout,
.modal-add {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}

.controls,
.grid-wrap {
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
}

.controls {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 28px;
  align-items: end;
  padding: 54px 0 24px;
}

.controls h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.control-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.search-box input,
.control-grid select {
  width: 100%;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}

.product-card {
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 7px;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5.35;
  display: block;
  object-fit: cover;
  background: var(--cream);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 10px;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-row strong {
  font-size: 15px;
}

.price-row s {
  color: var(--muted);
  font-size: 13px;
}

.product-card button {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 3px;
  background: var(--ink);
  color: var(--white);
}

.empty {
  min-height: 260px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.cart-drawer,
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(21, 21, 21, 0.5);
}

.cart-drawer.is-open,
.search-overlay.is-open {
  display: block;
}

.cart-panel {
  width: min(480px, 100%);
  height: 100%;
  margin-left: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.cart-panel header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.cart-panel h2 {
  margin: 0;
}

.cart-lines {
  overflow: auto;
  padding: 10px 22px;
}

.cart-line {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 82px;
  height: 105px;
  object-fit: cover;
}

.cart-line h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.cart-line p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.line-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--white);
}

.qty button {
  width: 31px;
  height: 31px;
  border: 0;
  background: transparent;
}

.qty span {
  min-width: 34px;
  text-align: center;
}

.remove {
  border: 0;
  background: transparent;
  color: var(--sale);
}

.cart-panel footer {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary .total {
  font-weight: 800;
  font-size: 18px;
}

.checkout {
  width: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--white);
}

.ghost {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
}

.cart-panel footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.product-modal {
  width: min(1040px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.product-modal::backdrop {
  background: rgba(21, 21, 21, 0.55);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.gallery {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 18px;
  background: var(--cream);
}

.thumbs {
  display: grid;
  gap: 9px;
  align-content: start;
  max-height: 640px;
  overflow: auto;
}

.thumbs button {
  border: 1px solid transparent;
  padding: 0;
  background: transparent;
}

.thumbs button.is-active {
  border-color: var(--ink);
}

.thumbs img {
  width: 74px;
  height: 92px;
  object-fit: cover;
  display: block;
}

.main-image {
  width: 100%;
  min-height: 640px;
  object-fit: cover;
  background: var(--cream);
}

.modal-info {
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.modal-info h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
}

.description {
  color: var(--muted);
  line-height: 1.7;
  max-height: 180px;
  overflow: auto;
}

.option-group {
  display: grid;
  gap: 8px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choices button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 3px;
  padding: 0 12px;
}

.choices button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.modal-add {
  width: 100%;
  margin-top: 0;
  background: var(--ink);
  color: var(--white);
}

.search-card {
  width: min(620px, calc(100% - 32px));
  margin: 88px auto 0;
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 7px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-card .icon-btn {
  justify-self: end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
}

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

.site-footer {
  width: min(1260px, calc(100% - 40px));
  margin: 60px auto 0;
  padding: 36px 0 42px;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.site-footer p {
  max-width: 320px;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  text-transform: uppercase;
  font-size: 13px;
}

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

.footer-contact {
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: right;
}

.info-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.info-hero {
  padding: 74px 0 46px;
  border-bottom: 1px solid var(--line);
}

.info-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.info-hero p:last-child {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 42px;
  padding-top: 42px;
}

.info-menu,
.info-card,
.info-section {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.info-menu {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
}

.info-menu a {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 13px;
}

.info-menu a:last-child {
  border-bottom: 0;
}

.info-menu a.is-active,
.info-menu a:hover {
  color: var(--ink);
  background: var(--white);
}

.info-content {
  display: grid;
  gap: 18px;
}

.info-card,
.info-section {
  padding: 26px;
}

.info-card h2,
.info-section h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card div {
  display: grid;
  gap: 4px;
}

.info-card dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.info-card dd {
  margin: 0;
  color: var(--ink);
}

.info-section p,
.info-section li {
  color: var(--muted);
  line-height: 1.8;
}

.info-section p {
  margin: 0;
}

.info-section ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 1020px) {
  .header {
    grid-template-columns: auto 1fr;
  }

  .nav {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .controls,
  .modal-body,
  .site-footer,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .footer-contact {
    text-align: left;
  }

  .info-menu {
    position: static;
  }

  .main-image {
    min-height: 450px;
  }
}

@media (max-width: 720px) {
  .header {
    padding: 0 14px;
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .actions select {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .hero-media {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-copy {
    margin: 0 auto 54px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .control-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .thumbs {
    grid-template-columns: repeat(5, 74px);
    overflow-x: auto;
  }

  .main-image {
    min-height: 360px;
  }

  .modal-info {
    padding: 28px 20px;
  }
}
