:root {
  --ink: #27332f;
  --muted: #66706b;
  --paper: #fffdf8;
  --line: #e8dfd3;
  --sun: #f6c653;
  --coral: #ef7c67;
  --leaf: #5f9d78;
  --sky: #6ca9cc;
  --mint: #e8f4eb;
  --rose: #fff0eb;
  --shadow: 0 18px 44px rgba(52, 64, 58, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.cart-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid rgba(232, 223, 211, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 144px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--leaf);
  border-radius: 50%;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--muted);
  font-size: 15px;
}

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

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-button {
  min-width: 52px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.language-button.active {
  color: #fff;
  background: var(--leaf);
}

.cart-button,
.primary-link,
.secondary-link,
.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.cart-button {
  gap: 8px;
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
}

.cart-button b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: var(--ink);
  background: var(--sun);
  border-radius: 999px;
  font-size: 13px;
}

.cart-icon {
  font-size: 16px;
  transform: rotate(-8deg);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(720px, calc(100vh - 68px));
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.96) 0%, rgba(255, 253, 248, 0.82) 38%, rgba(255, 253, 248, 0.12) 72%);
}

.hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  align-self: center;
  width: min(620px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: 68px 0 92px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 520px;
  color: #4d5a54;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-link {
  padding: 0 24px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 14px 28px rgba(239, 124, 103, 0.28);
}

.secondary-link {
  padding: 0 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.trust-strip div {
  padding: 22px clamp(16px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child {
  border-right: 0;
}

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

.trust-strip strong {
  margin-bottom: 5px;
  color: var(--coral);
  font-size: 28px;
}

.trust-strip span {
  color: var(--muted);
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading h2,
.contact-band h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.feature-grid,
.care-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-grid article,
.care-grid article,
.fit-card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(52, 64, 58, 0.07);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  background: var(--mint);
  border-radius: 50%;
  color: var(--leaf);
  font-weight: 900;
}

.feature-grid h3,
.care-grid h3,
.fit-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.feature-grid p,
.care-grid p,
.fit-card p {
  color: var(--muted);
  line-height: 1.7;
}

.product-section {
  background: #f7fbf8;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 28px;
}

.category-button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.category-button.active {
  color: #fff;
  background: var(--leaf);
  border-color: var(--leaf);
}

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

.product-card {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(52, 64, 58, 0.08);
}

.product-art {
  position: relative;
  display: grid;
  min-height: 280px;
  aspect-ratio: 1;
  padding: 24px;
  background: var(--tone);
  place-items: center;
}

.product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hat-illustration {
  position: relative;
  width: min(190px, 80%);
  aspect-ratio: 1.25;
}

.image-pending {
  position: absolute;
  left: 50%;
  bottom: -26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hat-crown {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 14%;
  height: 58%;
  background: var(--accent);
  border: 4px solid rgba(39, 51, 47, 0.08);
  border-radius: 50% 50% 38% 38%;
  box-shadow: inset 0 -16px 0 rgba(255, 255, 255, 0.18);
}

.hat-brim {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 18%;
  height: 22%;
  background: color-mix(in srgb, var(--accent), #fff 16%);
  border-radius: 50%;
  box-shadow: 0 16px 26px rgba(39, 51, 47, 0.12);
}

.hat-band {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 53%;
  height: 10%;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

.product-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.product-meta h3 {
  margin-bottom: 5px;
  font-size: 20px;
}

.product-meta span {
  color: var(--muted);
  font-size: 14px;
}

.price {
  color: var(--coral);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-tags span {
  padding: 6px 9px;
  color: var(--leaf);
  background: var(--mint);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.product-body p {
  min-height: 54px;
  color: var(--muted);
  line-height: 1.65;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-card select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.add-button {
  min-height: 44px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.fit-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

.size-table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(52, 64, 58, 0.07);
}

.size-table th,
.size-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.size-table th {
  color: var(--muted);
  background: var(--rose);
  font-size: 14px;
}

.size-table tr:last-child td {
  border-bottom: 0;
}

.care-section {
  background: #fff;
}

.contact-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 64px clamp(18px, 5vw, 72px);
  color: #fff;
  background: var(--leaf);
}

.contact-band .eyebrow,
.contact-band p {
  color: rgba(255, 255, 255, 0.84);
}

.contact-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  line-height: 1.75;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-weight: 800;
}

.contact-band .primary-link {
  background: var(--sun);
  color: var(--ink);
  box-shadow: none;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  justify-items: end;
  background: rgba(39, 51, 47, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  width: min(440px, 100%);
  height: 100%;
  padding: 26px;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

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

.cart-top,
.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cart-top h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 26px;
  place-items: center;
}

.cart-items {
  display: grid;
  gap: 12px;
  min-height: 86px;
  margin: 28px 0;
}

.empty-cart {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item strong {
  display: block;
  margin-bottom: 5px;
}

.cart-item span {
  color: var(--muted);
  font-size: 13px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-row button {
  display: grid;
  width: 28px;
  height: 28px;
  background: var(--mint);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  place-items: center;
}

.remove-button {
  color: var(--coral);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

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

.cart-summary strong {
  color: var(--coral);
  font-size: 24px;
}

.order-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.order-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.order-form input,
.order-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.checkout-button {
  width: 100%;
  margin-top: 4px;
  color: #fff;
  background: var(--coral);
}

.order-output {
  margin-top: 18px;
  padding: 16px;
  color: var(--ink);
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.65;
}

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

  .nav-links {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.92) 0%, rgba(255, 253, 248, 0.72) 52%, rgba(255, 253, 248, 0.16) 100%);
  }

  .hero-copy {
    align-self: start;
    margin: 0 auto;
    padding-top: 54px;
  }

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

  .feature-grid,
  .care-grid,
  .fit-layout,
  .contact-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .cart-button span:not(.cart-icon) {
    display: none;
  }

  .language-switch {
    min-height: 36px;
  }

  .language-button {
    min-width: 42px;
    min-height: 30px;
    padding: 0 9px;
    font-size: 13px;
  }

  .hero {
    min-height: 720px;
  }

  .hero img {
    object-position: 63% center;
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .trust-strip,
  .product-grid,
  .option-row {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 62px 16px;
  }

  .size-table th,
  .size-table td {
    padding: 14px;
  }

  .contact-band {
    padding: 52px 16px;
  }
}
