:root {
  --bg: #f7f7f2;
  --panel: #ffffff;
  --text: #1d2520;
  --muted: #68746d;
  --line: #e1e5dc;
  --green: #23684b;
  --green-dark: #153f31;
  --gold: #c68a35;
  --rose: #b95c4b;
  --ink: #111815;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px 5%;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

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

.brand strong {
  font-size: 20px;
}

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

.main-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 800;
}

.main-nav a:hover {
  color: var(--green);
}

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

.search-box {
  position: relative;
  display: block;
  width: 250px;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--muted);
  font-size: 13px;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.search-box input:focus {
  border-color: var(--green);
}

.cart-button,
.checkout-button,
.tea-story a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.cart-button {
  gap: 10px;
}

.cart-button span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--gold);
  line-height: 24px;
  text-align: center;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}

.slides,
.slide {
  position: absolute;
  inset: 0;
}

.slide {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.slide.active {
  opacity: 1;
}

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

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 26, 20, 0.82), rgba(13, 26, 20, 0.32) 48%, rgba(13, 26, 20, 0.08));
}

.carousel-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 560px;
  width: min(1160px, 90%);
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.carousel-copy p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
}

.carousel-copy h1 {
  max-width: 640px;
  margin: 0;
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: 0;
}

.carousel-copy span {
  max-width: 560px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.7;
}

.carousel-copy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  margin-top: 28px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  font-size: 32px;
  transform: translateY(-50%);
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.44);
}

.carousel-arrow.prev {
  left: 28px;
}

.carousel-arrow.next {
  right: 28px;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.carousel-dots button {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
}

.carousel-dots button.active {
  background: #fff;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1160px, 92%);
  margin: 24px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.service-strip div {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

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

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

.service-strip strong {
  font-size: 17px;
}

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

.section-block,
.shop-layout,
.tea-story {
  width: min(1160px, 92%);
  margin: 54px auto 0;
}

.section-title p,
.product-head p,
.tea-story p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title h2,
.product-head h2,
.tea-story h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 8px;
  background: #101511;
  color: #fff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.category-card h3 {
  margin: 0;
  font-size: 22px;
}

.category-card span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.shop-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
}

.filters {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-group + .filter-group {
  margin-top: 24px;
}

.filter-group h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.filter-list {
  display: grid;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.filter-button.active {
  border-color: var(--green);
  background: rgba(35, 104, 75, 0.1);
  color: var(--green-dark);
  font-weight: 900;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

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

.product-head span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.product-head select {
  height: 42px;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

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

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe4d8;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(21, 63, 49, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.product-body {
  padding: 16px;
}

.product-body h3 {
  min-height: 46px;
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag {
  padding: 5px 8px;
  border-radius: 6px;
  background: #eef1e8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

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

.tea-story {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
  padding: 34px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
}

.tea-story span {
  display: block;
  max-width: 680px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.tea-story a {
  flex: 0 0 auto;
  background: var(--gold);
}

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(0, 0, 0, 0.36);
}

.drawer-mask.show {
  display: block;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(420px, 92%);
  height: 100vh;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

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

.drawer-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2,
.dialog-head h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f0f2eb;
  color: var(--text);
  font-size: 22px;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-thumb {
  width: 76px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.cart-name {
  margin: 0 0 6px;
  font-weight: 900;
}

.cart-price {
  color: var(--muted);
}

.remove-button {
  border: 0;
  background: transparent;
  color: var(--rose);
  font-weight: 900;
}

.empty {
  padding: 30px 0;
  color: var(--muted);
  text-align: center;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 18px;
}

.checkout-button {
  width: 100%;
}

.checkout-dialog {
  width: min(480px, 92%);
  border: 0;
  border-radius: 8px;
  padding: 0;
}

.checkout-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.checkout-dialog form {
  padding-bottom: 16px;
}

.checkout-dialog label {
  display: grid;
  gap: 8px;
  padding: 12px 16px 0;
  font-weight: 900;
}

.checkout-dialog input,
.checkout-dialog textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.order-summary {
  margin: 14px 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f6ef;
  color: var(--muted);
  line-height: 1.65;
}

.checkout-dialog .checkout-button {
  width: calc(100% - 32px);
  margin: 0 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 120;
  display: none;
  max-width: min(420px, 90%);
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateX(-50%);
}

.toast.show {
  display: block;
}

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

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .filter-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px 4%;
    gap: 12px;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-box {
    flex: 1;
    width: auto;
  }

  .main-nav {
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-carousel,
  .carousel-copy {
    min-height: 500px;
  }

  .carousel-copy h1 {
    font-size: 38px;
  }

  .carousel-copy span {
    font-size: 16px;
  }

  .carousel-arrow {
    top: auto;
    bottom: 58px;
    width: 38px;
    height: 38px;
  }

  .carousel-arrow.prev {
    left: 4%;
  }

  .carousel-arrow.next {
    right: 4%;
  }

  .service-strip,
  .category-grid,
  .filter-list,
  .product-grid {
    grid-template-columns: 1fr;
  }

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

  .service-strip div:last-child {
    border-bottom: 0;
  }

  .product-head,
  .tea-story {
    flex-direction: column;
    align-items: stretch;
  }
}
