:root {
  color-scheme: light;
  --ink: #181818;
  --muted: #6d6d64;
  --line: #e3e0d8;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #1f6f68;
  --accent-strong: #124742;
  --sun: #f0b44c;
  --rose: #d96c5f;
  --shadow: 0 20px 55px rgba(24, 24, 24, 0.11);
}

* {
  box-sizing: border-box;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(227, 224, 216, 0.84);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 166px;
  height: auto;
  max-height: 46px;
  object-fit: contain;
}

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

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search span {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.search input {
  width: min(34vw, 390px);
  min-width: 220px;
  height: 42px;
  padding: 0 14px 0 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 111, 104, 0.12);
}

.cart-button,
.primary-link,
.ghost-button,
.checkout-button,
.product-footer button,
.category-card,
.icon-button {
  cursor: pointer;
}

.cart-button,
.primary-link,
.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
}

main {
  padding: 0 clamp(18px, 4vw, 54px) 64px;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
  padding-top: clamp(48px, 8vw, 90px);
}

.legal-page h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.legal-card {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legal-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.legal-card p,
.legal-card ul {
  margin: 0;
}

.legal-card ul {
  padding-left: 20px;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 8vw, 120px);
  padding: 44px clamp(18px, 4vw, 54px);
  background: #eeeeec;
  border-top: 1px solid var(--line);
}

.site-footer section {
  display: grid;
  align-content: start;
  gap: 16px;
}

.site-footer h2 {
  margin: 0 0 6px;
  font-size: 1.28rem;
}

.site-footer a,
.site-footer p {
  margin: 0;
  color: #5e5e58;
  font-size: 1rem;
  line-height: 1.45;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer p {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.site-footer span {
  color: var(--ink);
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  min-height: calc(100vh - 78px);
  margin: 0 calc(clamp(18px, 4vw, 54px) * -1);
  padding: clamp(54px, 8vw, 110px) clamp(18px, 4vw, 54px) 48px;
  background:
    linear-gradient(90deg, rgba(7, 28, 27, 0.94) 0%, rgba(7, 28, 27, 0.76) 42%, rgba(7, 28, 27, 0.22) 100%),
    url("https://images.pexels.com/photos/8396300/pexels-photo-8396300.jpeg?auto=compress&cs=tinysrgb&w=1800") right center / cover no-repeat,
    linear-gradient(135deg, #0f7069 0%, #112827 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 860px;
  color: #fff7df;
  font-size: clamp(2.25rem, 5.7vw, 5.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 247, 223, 0.84);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero .eyebrow {
  color: #ffd45f;
}

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

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.ghost-button.small {
  min-height: 38px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
}

.section-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.section-head.compact {
  margin-top: 42px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.category-card {
  display: grid;
  grid-template-rows: 142px auto auto;
  gap: 12px;
  min-height: 246px;
  padding: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(31, 111, 104, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.category-image {
  width: 100%;
  height: 142px;
  background: #f3f1eb;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.category-title {
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.18;
}

.category-meta {
  align-self: end;
  padding: 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-button {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 0;
  background: #f3f1eb;
}

.image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-info {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-ref {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stock-badge {
  color: #0f7a55;
  font-weight: 950;
}

.product-card h3 {
  min-height: 42px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  cursor: pointer;
}

.product-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.product-detail-panel {
  margin-top: 24px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.product-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.product-detail-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.product-detail-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #f3f1eb;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.detail-copy {
  display: grid;
  gap: 16px;
}

.detail-buy {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.detail-buy label,
.detail-static-option {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.detail-buy select {
  width: 100%;
  height: 42px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.detail-static-option {
  min-height: 42px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.detail-static-option small {
  color: var(--muted);
}

.detail-buy strong {
  white-space: nowrap;
  font-size: 1.25rem;
}

.detail-buy .checkout-button {
  width: auto;
  min-width: 160px;
}

.detail-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.detail-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.detail-copy div {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-copy dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-copy dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f1e9;
  color: #4f4b43;
  font-size: 0.76rem;
  font-weight: 800;
}

.variant-select {
  display: inline-grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.variant-select select {
  height: 32px;
  max-width: 128px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcf8;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.price {
  font-size: 1.15rem;
}

.product-footer button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.product-footer button:disabled,
.checkout-button:disabled {
  cursor: not-allowed;
  background: #b8b3a9;
  color: #f8f6ef;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
}

.cart-drawer.is-open {
  visibility: visible;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 24, 0.34);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cart-drawer.is-open .cart-backdrop {
  opacity: 1;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  width: min(100%, 480px);
  height: 100%;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.is-open .cart-panel {
  transform: translateX(0);
}

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

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

.cart-header h2 {
  margin: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.ghost-button.danger {
  color: #9d2d24;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 16px 22px;
}

.cart-empty {
  margin: 28px 0;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #f3f1eb;
  object-fit: contain;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

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

.quantity {
  display: inline-grid;
  grid-template-columns: 30px 36px 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quantity button {
  height: 30px;
  border: 0;
  background: #f7f5ef;
  cursor: pointer;
}

.quantity span {
  text-align: center;
  font-weight: 900;
}

.checkout {
  display: grid;
  gap: 12px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
}

.checkout label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.checkout input,
.checkout textarea,
.checkout select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.checkout input,
.checkout select {
  height: 40px;
  padding: 0 10px;
}

.checkout textarea {
  min-height: 70px;
  resize: vertical;
  padding: 10px;
}

.totals {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.totals span,
.checkout-note {
  color: var(--muted);
}

.grand-total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
}

.checkout-button {
  width: 100%;
}

.checkout-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .topbar,
  .topbar-actions,
  .section-head,
  .topbar,
  .topbar-actions,
  .section-head {
    flex-direction: column;
  }

  .search input {
    width: 100%;
    min-width: 0;
  }

  .brand-logo {
    width: 148px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .section-head > p {
    text-align: left;
  }

  .controls {
    flex-wrap: wrap;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .product-detail-body,
  .detail-copy dl,
  .detail-buy {
    grid-template-columns: 1fr;
  }
}
