:root {
  --bg: #f3f0ea;
  --surface: #ece8e0;
  --text: #111111;
  --muted: #76716a;
  --line: rgba(17,17,17,.14);
  --header-height: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { display: block; width: 100%; }

.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243,240,234,.94);
  backdrop-filter: blur(14px);
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.header-actions { display: flex; gap: 22px; align-items: center; font-size: 12px; letter-spacing: .08em; }
.header-actions a:hover { opacity: .55; }

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  border-bottom: 1px solid var(--line);
}
.hero-image {
  min-height: 620px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.1)),
    url('assets/hero.svg') center/cover no-repeat;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 42px;
}
.kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  margin: 10px 0 18px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(46px, 6.2vw, 96px);
  line-height: .92;
  font-weight: 400;
  letter-spacing: -.05em;
}
.hero p { max-width: 360px; margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.text-link { display: inline-flex; width: fit-content; border-bottom: 1px solid currentColor; padding-bottom: 4px; font-size: 12px; letter-spacing: .1em; }

.catalog { padding: 64px 28px 84px; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.catalog h2 { margin: 0; font-size: 16px; letter-spacing: .08em; font-weight: 700; }
.catalog-count { font-size: 11px; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 42px 18px; }
.product-card { cursor: pointer; }
.product-media { aspect-ratio: 4/5; background: var(--surface); overflow: hidden; position: relative; }
.product-media img { height: 100%; object-fit: cover; transition: transform .55s ease, opacity .35s ease; }
.product-card:hover .product-media img { transform: scale(1.018); }
.product-info { display: flex; justify-content: space-between; gap: 16px; padding-top: 11px; font-size: 12px; }
.product-title { text-transform: uppercase; letter-spacing: .05em; }
.product-price { white-space: nowrap; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 28px 28px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}
.footer-brand { font-weight: 800; font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px 26px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.footer-links a:hover { opacity: .5; }
.footer-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; padding-top: 38px; }

/* product page */
.product-page { padding: 24px 28px 80px; }
.back-link { display: inline-block; margin: 4px 0 24px; font-size: 11px; letter-spacing: .08em; }
.product-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; align-items: start; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery img { aspect-ratio: 4/5; object-fit: cover; background: var(--surface); }
.gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.product-panel { position: sticky; top: 96px; padding: 8px 18px 0; }
.product-panel h1 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; text-transform: uppercase; }
.product-panel .price { margin: 12px 0 36px; font-size: 14px; }
.label { display: block; margin-bottom: 12px; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.size-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }
.size-btn { border: 1px solid var(--line); background: transparent; padding: 14px 8px; cursor: pointer; }
.size-btn.active, .size-btn:hover { background: #111; color: #fff; }
.add-btn { width: 100%; border: 0; background: #111; color: #fff; padding: 17px; cursor: pointer; letter-spacing: .08em; font-size: 11px; margin: 4px 0 28px; }
.add-btn:hover { opacity: .85; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.accordion summary { cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .06em; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }

/* legal */
.legal-page { max-width: 860px; margin: 0 auto; padding: 70px 28px 100px; }
.legal-page h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(38px, 6vw, 72px); letter-spacing: -.04em; margin: 0 0 40px; }
.legal-page h2 { font-size: 15px; margin: 38px 0 10px; }
.legal-page p, .legal-page li { color: #4f4b46; line-height: 1.7; font-size: 14px; }

.cart-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #111;
  color: #fff;
  padding: 14px 18px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .25s ease;
  z-index: 100;
}
.cart-toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 70vh; }
  .hero-copy { padding: 28px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-layout { grid-template-columns: 1fr; }
  .product-panel { position: static; padding: 22px 0 0; }
  .gallery img:first-child { aspect-ratio: 4/5; }
}

@media (max-width: 560px) {
  :root { --header-height: 62px; }
  .site-header, .catalog, .product-page, .site-footer { padding-left: 16px; padding-right: 16px; }
  .header-actions { gap: 14px; font-size: 10px; }
  .hero-image { min-height: 64vh; }
  .hero-copy { padding: 24px 16px 34px; }
  .hero p { display: none; }
  .catalog { padding-top: 42px; }
  .product-grid { gap: 30px 10px; }
  .product-info { display: block; line-height: 1.55; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; flex-direction: column; gap: 14px; }
  .footer-bottom { grid-column: auto; display: block; line-height: 1.8; padding-top: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img:first-child { grid-column: auto; }
  .size-row { grid-template-columns: repeat(4,1fr); }
}

/* checkout */
.checkout-page { padding: 34px 28px 100px; }
.checkout-head { margin-bottom: 34px; }
.checkout-head h1 { margin: 20px 0 0; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(42px, 7vw, 86px); line-height: .95; letter-spacing: -.05em; }
.checkout-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 64px; align-items: start; }
.checkout-cart { min-width: 0; }
.checkout-item { display: grid; grid-template-columns: 110px 1fr auto; grid-template-areas: "thumb copy qty" "thumb copy remove"; gap: 8px 18px; padding: 18px 0; border-top: 1px solid var(--line); align-items: start; }
.checkout-thumb { grid-area: thumb; background: var(--surface); }
.checkout-thumb img { aspect-ratio: 4/5; object-fit: cover; }
.checkout-item-copy { grid-area: copy; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.checkout-item-name { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.checkout-item-meta { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.checkout-item-price { margin-top: 10px; font-size: 12px; }
.qty-control { grid-area: qty; display: grid; grid-template-columns: 34px 34px 34px; border: 1px solid var(--line); }
.qty-control button, .qty-control span { height: 34px; border: 0; background: transparent; display: grid; place-items: center; font-size: 12px; }
.qty-control button { cursor: pointer; }
.qty-control button:hover { background: rgba(17,17,17,.06); }
.remove-item { grid-area: remove; justify-self: end; border: 0; padding: 4px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; letter-spacing: .08em; }
.checkout-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; font-size: 12px; letter-spacing: .06em; }
.checkout-total strong { font-weight: 600; }
.cart-empty { border-top: 1px solid var(--line); padding: 30px 0 54px; }
.cart-empty p { color: var(--muted); margin: 0 0 20px; }
.order-form { position: sticky; top: 96px; border: 1px solid var(--line); padding: 26px; }
.order-form h2 { margin: 0 0 28px; font-size: 12px; letter-spacing: .08em; }
.order-form label:not(.consent-row) { display: block; margin-bottom: 18px; }
.order-form label > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.order-form input[type="text"], .order-form input[type="tel"], .order-form input[type="email"], .order-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; padding: 11px 0; outline: none; color: var(--text); resize: vertical; }
.order-form input:focus, .order-form textarea:focus { border-bottom-color: var(--text); }
.consent-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 8px 0 18px; cursor: pointer; }
.consent-row input { margin: 2px 0 0; }
.consent-row span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.place-order-btn, .status-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; border: 0; background: #111; color: #fff; min-height: 50px; padding: 14px 18px; cursor: pointer; letter-spacing: .08em; font-size: 10px; }
.place-order-btn:hover, .status-button:hover { opacity: .85; }
.checkout-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.catalog-error { color: var(--muted); font-size: 12px; }
.status-page { min-height: calc(100vh - var(--header-height)); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 760px; padding: 70px 28px; margin: 0 auto; }
.status-page h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(56px, 10vw, 120px); font-weight: 400; letter-spacing: -.06em; line-height: .9; margin: 12px 0 26px; }
.status-page p { max-width: 560px; color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 30px; }
.status-page .status-button { width: auto; min-width: 210px; }

@media (max-width: 900px) {
  .checkout-shell { grid-template-columns: 1fr; gap: 38px; }
  .order-form { position: static; }
}

@media (max-width: 560px) {
  .checkout-page { padding-left: 16px; padding-right: 16px; }
  .checkout-item { grid-template-columns: 82px 1fr; grid-template-areas: "thumb copy" "thumb qty" "thumb remove"; gap: 8px 14px; }
  .qty-control { justify-self: start; }
  .remove-item { justify-self: start; }
  .order-form { padding: 20px 16px; }
  .status-page { padding-left: 16px; padding-right: 16px; }
}
