:root {
  --gold: #c9a962;
  --gold-dark: #a9873d;
  --cream: #f5f0eb;
  --cream-dark: #e8e0d8;
  --ink: #1a1a1a;
  --charcoal: #2d2d2d;
  --muted: #817970;
  --white: #ffffff;
  --shadow: 0 28px 70px rgba(26, 26, 26, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

body.cart-open,
body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
  padding: 0 clamp(20px, 5vw, 64px);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), height 0.4s var(--ease);
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(245, 240, 235, 0.92);
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  width: auto;
  height: 44px;
  object-fit: contain;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-family: "Forum", serif;
  font-size: 21px;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  color: var(--charcoal);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.cart-button,
.button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(201, 169, 98, 0.5);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border 0.3s var(--ease), color 0.3s var(--ease);
}

.cart-button:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.cart-button strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: 11px;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(245, 240, 235, 0.98) 0%, rgba(245, 240, 235, 0.78) 42%, rgba(245, 240, 235, 0.16) 100%),
    url("https://picture-1395223119.cos.ap-shanghai.myqcloud.com/images/%E7%B4%A0%E5%B1%A5%E5%AE%A3%E8%A8%80%E7%B3%BB%E5%88%97/%E9%A1%B9%E9%93%BE%E3%80%A1%E7%B4%A0%E8%A1%8C%E6%9C%89%E5%8A%9B%20%C2%B7%20%E6%BE%B3%E7%99%BD10mm%E6%BB%A1%E4%B8%B2%E7%8F%8D%E7%8F%A0%E9%A1%B9%E9%93%BE/%E9%A6%96%E5%9B%BE.jpg")
      center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 140px clamp(20px, 5vw, 64px) 80px;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Forum", serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

h1 {
  max-width: 760px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.96;
}

.hero-copy {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button-filled {
  background: var(--gold);
  color: var(--white);
}

.button-filled:hover {
  background: var(--gold-dark);
}

.button-outline:hover {
  background: var(--gold);
  color: var(--white);
}

.full-width {
  width: 100%;
}

.section {
  padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 64px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.site-footer h2,
.cart-head h2 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
}

.section-heading p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.story-section,
.craft-section {
  background: var(--cream);
}

.story-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 26px;
}

.story-card,
.craft-grid article,
.product-card,
.collection-card {
  border: 1px solid var(--cream-dark);
  background: rgba(255, 255, 255, 0.72);
}

.story-card {
  padding: clamp(28px, 4vw, 52px);
}

.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.story-card p + p {
  margin-top: 20px;
}

.story-quote {
  display: flex;
  align-items: center;
  background: var(--ink);
}

.story-quote p {
  color: var(--white);
  font-family: "Forum", serif;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.2;
}

.collection-grid {
  display: grid;
  max-width: 1240px;
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.collection-card {
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.collection-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.collection-card button {
  display: grid;
  width: 100%;
  min-height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.collection-image {
  aspect-ratio: 4 / 5;
  background: var(--cream-dark);
  overflow: hidden;
}

.collection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.collection-card:hover img {
  transform: scale(1.05);
}

.collection-body {
  padding: 20px;
}

.collection-body span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.collection-body h3 {
  margin-top: 10px;
  font-size: 28px;
}

.collection-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.craft-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.craft-grid article {
  padding: 30px;
}

.craft-grid span {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.craft-grid h3 {
  margin-top: 22px;
  font-size: 28px;
}

.craft-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.catalog-section {
  background: var(--white);
}

.catalog-toolbar {
  display: grid;
  max-width: 1000px;
  margin: 0 auto 34px;
  grid-template-columns: 1fr 260px;
  gap: 14px;
}

.search-box,
.filter-box {
  display: grid;
  gap: 8px;
}

.search-box span,
.filter-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  border: 1px solid var(--cream-dark);
  background: var(--cream);
  color: var(--ink);
  padding: 15px 16px;
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--gold);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.product-media {
  aspect-ratio: 1 / 1.08;
  background: var(--cream);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.product-type {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.product-body h3 {
  margin-top: 9px;
  font-size: 24px;
  line-height: 1.12;
}

.product-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.price {
  font-size: 18px;
  font-weight: 700;
}

.mini-actions {
  display: flex;
  gap: 8px;
}

.mini-button {
  border: 1px solid var(--cream-dark);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border 0.25s var(--ease), color 0.25s var(--ease);
}

.mini-button:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  background: var(--ink);
  color: var(--white);
  padding: clamp(70px, 8vw, 120px) clamp(20px, 5vw, 64px);
}

.footer-info {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.75;
}

.copyright {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.cart-panel,
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  visibility: hidden;
}

.cart-panel.is-open,
.modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.cart-panel::before {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.35);
  content: "";
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.cart-panel.is-open::before {
  opacity: 1;
}

.cart-panel-inner {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(460px, 100%);
  height: 100%;
  flex-direction: column;
  background: var(--cream);
  box-shadow: var(--shadow);
  padding: 28px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}

.cart-panel.is-open .cart-panel-inner {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 20px;
}

.cart-head h2 {
  font-size: 36px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--cream-dark);
  background: var(--white);
  color: var(--ink);
  font-size: 26px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 18px 0;
}

.cart-empty {
  color: var(--muted);
  line-height: 1.7;
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  border-bottom: 1px solid var(--cream-dark);
  padding: 14px 0;
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
}

.cart-item h3 {
  font-size: 20px;
}

.cart-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.qty-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-row button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--cream-dark);
  background: var(--white);
  cursor: pointer;
}

.remove-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--cream-dark);
  padding: 20px 0;
  font-size: 18px;
}

.cart-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.54);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal-card {
  position: relative;
  display: grid;
  width: min(960px, 100%);
  max-height: min(760px, 88vh);
  grid-template-columns: 0.92fr 1.08fr;
  overflow: auto;
  background: var(--cream);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.modal.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-media {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
  background: var(--cream-dark);
}

.modal-main-image {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.modal-gallery {
  display: grid;
  max-height: 260px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding: 10px;
  background: var(--cream);
}

.gallery-thumb {
  border: 2px solid transparent;
  background: var(--cream-dark);
  cursor: pointer;
  padding: 0;
  transition: border 0.2s var(--ease), opacity 0.2s var(--ease);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
  border-color: var(--gold);
}

.modal-content {
  padding: clamp(26px, 4vw, 46px);
}

.modal-content h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.modal-content p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 10px;
  color: var(--muted);
}

.detail-list strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  background: var(--ink);
  color: var(--white);
  padding: 13px 18px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .collection-grid,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .craft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
    background: rgba(245, 240, 235, 0.94);
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
  }

  .cart-button span {
    display: none;
  }

  .hero-content {
    padding-top: 170px;
  }

  .story-grid,
  .site-footer,
  .modal-card {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .collection-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-main-image {
    height: 360px;
  }

  .modal-gallery {
    max-height: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .collection-grid,
  .product-grid,
  .craft-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
