:root {
  --ink: #171717;
  --muted: #6d6a63;
  --line: #e7e0d3;
  --paper: #fffdf8;
  --soft: #f4efe6;
  --green: #1f7a5b;
  --green-dark: #11583f;
  --blue: #244c9a;
  --rose: #b44d61;
  --gold: #b9822b;
  --shadow: 0 18px 60px rgba(23, 23, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.topbar {
  padding: 9px 16px;
  color: white;
  background: var(--green-dark);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.top-nav,
.cart-button,
.hero-actions,
.catalog-tools,
.filter-tabs {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 74px;
  height: 46px;
  object-fit: contain;
  object-position: center;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.top-nav {
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

.cart-button,
.primary-link,
.secondary-link,
.checkout-button,
.product-card button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.cart-button {
  justify-self: end;
  gap: 10px;
  padding: 0 14px;
  color: white;
  background: var(--ink);
}

.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  color: var(--ink);
  background: white;
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(30px, 6vw, 72px) clamp(18px, 5vw, 64px) 40px;
  background: linear-gradient(135deg, #fffdf8 0%, #eef5ef 46%, #f7ece7 100%);
}

.hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 620px;
  margin: 0;
  color: #3f3b34;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-weight: 800;
}

.primary-link {
  color: white;
  background: var(--green);
}

.secondary-link {
  color: var(--green-dark);
  border: 1px solid rgba(31, 122, 91, 0.35);
}

.hero-panel {
  overflow: hidden;
  height: min(64vh, 620px);
  min-height: 360px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 64px);
  background: var(--line);
  border: 1px solid var(--line);
}

.trust-strip div {
  padding: 22px;
  background: white;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.section-head,
.catalog {
  padding: 64px clamp(18px, 5vw, 64px) 0;
}

.section-head h2,
.catalog h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 22px clamp(18px, 5vw, 64px) 0;
}

.category-card {
  min-height: 96px;
  padding: 16px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.category-card:nth-child(3n + 2) {
  background: var(--blue);
}

.category-card:nth-child(3n) {
  background: var(--rose);
}

.category-card strong,
.category-card span {
  display: block;
}

.category-card span {
  margin-top: 12px;
  opacity: 0.86;
}

.catalog {
  padding-bottom: 80px;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.catalog-tools {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.catalog-tools input,
.catalog-tools select {
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-tabs {
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.filter-tabs button {
  height: 38px;
  padding: 0 14px;
  color: #544f47;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

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

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

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

.image-button {
  display: block;
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0;
  border-radius: 0 !important;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.product-body {
  padding: 16px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.product-card h3 {
  min-height: 52px;
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.product-card p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.stock-line {
  margin-top: 12px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 750;
}

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

.price {
  font-size: 22px;
  font-weight: 850;
}

.compare-price {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.product-card button {
  min-width: 104px;
  padding: 0 14px;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.text-button {
  width: 100%;
  min-height: 38px !important;
  margin-top: 12px;
  color: var(--green-dark) !important;
  background: white !important;
  border: 1px solid rgba(31, 122, 91, 0.28) !important;
}

.content-band {
  padding: 70px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.section-title {
  margin-bottom: 24px;
}

.section-title h2,
.content-band h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
}

.info-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.info-grid article,
.review-grid article {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-grid h3,
.review-grid h3 {
  margin-top: 0;
}

.info-grid p,
.review-grid p,
.contact-band p,
.faq-list p {
  color: var(--muted);
  line-height: 1.7;
}

.review-grid strong {
  color: var(--gold);
}

.review-grid span {
  color: var(--green-dark);
  font-weight: 800;
}

.split-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.contact-band {
  display: grid;
  grid-template-columns: 0.8fr 1fr 0.8fr;
  gap: 24px;
  align-items: start;
  background: #f7f3eb;
}

.contact-form,
.newsletter {
  display: grid;
  gap: 10px;
}

.contact-form input,
.contact-form textarea,
.newsletter input,
.promo-row input,
.product-detail select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-form textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
}

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

.cart-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

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

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

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(430px, 100%);
  height: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

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

.cart-head,
.cart-summary {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-head h2 {
  margin: 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 12px 20px;
}

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

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

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

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

.qty button {
  width: 34px;
  height: 34px;
  background: white;
  border: 0;
  cursor: pointer;
}

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

.remove {
  color: var(--rose);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.promo-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 8px;
  padding: 14px 20px 0;
}

.promo-row button {
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.cart-summary {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 18px;
}

.cart-summary .total-row {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 22px;
}

.checkout-button {
  width: 100%;
  color: white;
  background: var(--ink);
  font-weight: 850;
}

.checkout-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  visibility: hidden;
}

.modal.open {
  pointer-events: auto;
  visibility: visible;
}

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

.modal.open .modal-backdrop {
  opacity: 1;
}

.product-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(760px, 94vh);
  overflow: auto;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal.open .product-modal-panel {
  transform: translateY(0);
}

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

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 28px;
}

.product-detail > img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}

.product-detail h2 {
  margin: 10px 0;
  font-size: clamp(28px, 4vw, 42px);
}

.rating {
  color: var(--gold);
  font-weight: 900;
}

.rating span {
  color: var(--muted);
  font-weight: 650;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  text-align: right;
  font-weight: 750;
}

.option-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
}

.modal-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 18px 0;
}

.modal-price strong {
  font-size: 30px;
}

.modal-price span {
  color: var(--muted);
  text-decoration: line-through;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 28px clamp(18px, 5vw, 64px);
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #080808 0%, #122220 52%, #f4efe6 52%, #fffdf8 100%);
}

.auth-shell {
  display: grid;
  width: min(520px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  align-content: center;
  gap: 18px;
  padding: 32px 0;
}

.auth-brand {
  justify-self: center;
  color: white;
}

.auth-panel {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.auth-tabs button {
  height: 42px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

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

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.active {
  display: grid;
}

.auth-form h1,
.account-panel h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 44px);
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-card {
  margin: 18px 0;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-actions button {
  min-height: 44px;
  cursor: pointer;
}

.state-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.state-box {
  width: min(520px, 100%);
  padding: 38px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.state-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 999px;
  font-size: 34px;
  font-weight: 900;
}

.state-icon.muted {
  background: var(--gold);
}

.state-box p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1020px) {
  .hero,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: auto;
  }

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

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

  .info-grid,
  .review-grid,
  .contact-band,
  .split-band,
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .top-nav {
    display: none;
  }

  .hero,
  .product-grid,
  .category-grid,
  .trust-strip,
  .info-grid,
  .review-grid,
  .contact-band,
  .split-band,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    height: 320px;
    min-height: 0;
  }

  .catalog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-tools,
  .catalog-tools input,
  .catalog-tools select {
    width: 100%;
  }

  .product-detail {
    padding: 18px;
  }

  .product-detail > img {
    min-height: 280px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-page {
    background: var(--paper);
  }

  .auth-brand {
    color: var(--ink);
  }
}
