:root {
  --store-green: #123f32;
  --store-green-deep: #0b2f26;
  --store-gold: #b88a3b;
  --store-cream: #f8f5ee;
  --store-ink: #15201c;
  --store-muted: #66716c;
  --store-line: #e3e7e2;
}

body.store-page { background: #fff; color: var(--store-ink); }
body.cart-is-open { overflow: hidden; }
.store-page button, .store-page input, .store-page textarea { font: inherit; }

.store-header { background: rgba(255,255,255,.96); border-bottom-color: var(--store-line); }
.store-nav { width: min(1280px, calc(100% - 56px)); min-height: 84px; }
.store-nav .brand-logo { height: 62px; }
.store-nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 750; }
.store-nav__links > a { color: #42504a; }
.store-nav__links > a:hover, .store-nav__links > a[aria-current="page"] { color: var(--store-green); }
.cart-button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 15px;
  color: var(--store-green); border: 1px solid #d6dfdb; border-radius: 999px; background: #fff;
  font-weight: 850; cursor: pointer;
}
.cart-button svg { width: 19px; height: 19px; }
.cart-count {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--store-green);
  color: #fff; font-size: 12px; line-height: 21px; text-align: center;
}
.cart-count[hidden] { display: none; }

.store-hero { padding: 74px 0 62px; overflow: hidden; }
.store-shell { width: min(1280px, calc(100% - 56px)); margin: 0 auto; }
.store-hero__grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(520px, 1.12fr); align-items: center; gap: 80px; }
.store-kicker { margin: 0 0 20px; color: var(--store-gold); font-size: 13px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.store-hero h1, .shop-section h2, .checkout-title {
  margin: 0; color: var(--store-green-deep); font-family: "Noto Serif TC", serif; font-weight: 900; line-height: 1.16;
}
.store-hero h1 { max-width: 620px; font-size: clamp(44px, 5vw, 76px); letter-spacing: -.045em; }
.store-hero__lead { max-width: 590px; margin: 26px 0 32px; color: var(--store-muted); font-size: clamp(17px, 1.55vw, 21px); line-height: 1.8; }
.store-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border: 1px solid var(--store-green); border-radius: 4px; background: var(--store-green); color: #fff;
  font-weight: 850; box-shadow: 0 12px 26px rgba(18,63,50,.16); cursor: pointer;
}
.store-primary:hover { background: var(--store-green-deep); }
.store-hero__note { display: flex; align-items: center; gap: 9px; margin: 20px 0 0; color: #68746e; font-size: 14px; }
.store-hero__note svg { width: 17px; color: var(--store-gold); }
.store-hero__visual { position: relative; min-height: 535px; }
.store-hero__portrait {
  position: absolute; right: 0; top: 0; z-index: 1; width: 76%; height: 92%; object-fit: cover; object-position: center 24%;
  border-radius: 3px; filter: saturate(.88); box-shadow: 0 30px 70px rgba(19,48,39,.15);
}
.store-hero__product {
  position: absolute; left: 0; bottom: 0; z-index: 2; width: 48%; aspect-ratio: 1 / .86; object-fit: cover;
  border: 10px solid #fff; border-radius: 2px; box-shadow: 0 22px 54px rgba(18,63,50,.22);
}
.store-hero__stamp {
  position: absolute; right: 3%; bottom: 2%; z-index: 3; width: 108px; height: 108px; display: grid; place-items: center;
  border-radius: 50%; background: var(--store-green); color: #fff; text-align: center; font-size: 13px; font-weight: 900; line-height: 1.45;
  box-shadow: 0 14px 34px rgba(11,47,38,.24); transform: rotate(5deg);
}

.shop-section { padding: 84px 0 96px; background: #fafaf8; border-top: 1px solid #f0f1ed; }
.shop-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.shop-section h2 { font-size: clamp(32px, 3vw, 48px); }
.shop-heading p { max-width: 560px; margin: 14px 0 0; color: var(--store-muted); font-size: 17px; }
.shop-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.shop-filters button {
  min-height: 40px; padding: 0 17px; border: 1px solid #dce3df; border-radius: 999px;
  background: #fff; color: #53615b; font-weight: 750; cursor: pointer;
}
.shop-filters button.is-active { border-color: var(--store-green); background: var(--store-green); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shop-card { overflow: hidden; border: 1px solid var(--store-line); border-radius: 4px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 20px 48px rgba(18,63,50,.1); }
.shop-card__image { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9eee9; }
.shop-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.shop-card:hover .shop-card__image img { transform: scale(1.025); }
.shop-card__badge { position: absolute; top: 15px; left: 15px; padding: 6px 10px; border-radius: 3px; background: rgba(255,255,255,.94); color: #68736e; font-size: 12px; font-weight: 900; }
.shop-card__badge.is-open { background: var(--store-green); color: #fff; }
.shop-card__body { padding: 24px 24px 22px; }
.shop-card__meta, .cart-line__meta { margin: 0 0 7px; color: var(--store-gold); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.shop-card__meta span { margin: 0 5px; }
.shop-card h3 { margin: 0; color: var(--store-green-deep); font-family: "Noto Serif TC", serif; font-size: 22px; line-height: 1.45; }
.shop-card__body > p:not(.shop-card__meta) { min-height: 78px; margin: 12px 0 20px; color: var(--store-muted); font-size: 15px; }
.shop-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 17px; border-top: 1px solid #eef0ed; }
.shop-card__price { color: var(--store-green-deep); font-size: 17px; }
.shop-add { min-height: 40px; padding: 0 15px; border: 1px solid var(--store-green); border-radius: 3px; background: var(--store-green); color: #fff; font-weight: 850; cursor: pointer; }
.shop-details { color: var(--store-green); font-size: 14px; font-weight: 850; }

.store-trust { padding: 27px 0; background: var(--store-green); color: #fff; }
.store-trust__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.store-trust__item { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 0 28px; border-right: 1px solid rgba(255,255,255,.2); }
.store-trust__item:last-child { border-right: 0; }
.store-trust__item svg { flex: 0 0 auto; width: 22px; height: 22px; color: #ddbd78; }
.store-trust__item strong { display: block; font-size: 14px; }
.store-trust__item span { display: block; opacity: .72; font-size: 12px; }

.cart-overlay { position: fixed; inset: 0; z-index: 79; background: rgba(8,24,19,.42); opacity: 0; transition: opacity .24s ease; }
.cart-drawer {
  position: fixed; top: 0; right: 0; z-index: 80; display: grid; grid-template-rows: auto 1fr auto;
  width: min(440px, 100%); height: 100dvh; background: #fff; box-shadow: -24px 0 70px rgba(8,31,24,.2);
  transform: translateX(100%); transition: transform .24s ease;
}
.cart-overlay[hidden], .cart-drawer[hidden] { display: none; }
.cart-is-open .cart-overlay { opacity: 1; }
.cart-is-open .cart-drawer { transform: translateX(0); }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 23px 25px; border-bottom: 1px solid var(--store-line); }
.cart-drawer__header h2 { margin: 0; color: var(--store-green-deep); font-family: "Noto Serif TC", serif; font-size: 24px; }
.cart-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f4f6f3; color: var(--store-green); font-size: 25px; cursor: pointer; }
.cart-drawer__body { overflow-y: auto; padding: 8px 25px 25px; }
.cart-empty { padding: 80px 10px; text-align: center; color: var(--store-muted); }
.cart-empty svg { width: 43px; height: 43px; margin: 0 auto 14px; color: #aeb8b2; }
.cart-empty p { margin: 0 0 20px; }
.cart-line { display: grid; grid-template-columns: 92px 1fr; gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--store-line); }
.cart-line__image { width: 92px; height: 92px; overflow: hidden; border-radius: 3px; background: #edf1ed; }
.cart-line__image img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__top, .cart-line__bottom { display: flex; justify-content: space-between; gap: 12px; }
.cart-line__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.cart-line__body h3 { margin: 0; color: var(--store-green-deep); font-size: 15px; line-height: 1.45; }
.cart-remove { align-self: start; padding: 0; border: 0; background: transparent; color: #7b8580; font-size: 12px; text-decoration: underline; cursor: pointer; }
.cart-line__bottom { align-items: center; }
.quantity { display: grid; grid-template-columns: 30px 32px 30px; align-items: center; min-height: 32px; border: 1px solid #dbe2de; border-radius: 3px; }
.quantity button { height: 30px; padding: 0; border: 0; background: transparent; color: var(--store-green); cursor: pointer; }
.quantity span { text-align: center; font-size: 13px; font-weight: 850; }
.cart-drawer__footer { padding: 20px 25px 24px; border-top: 1px solid var(--store-line); background: #fff; }
.cart-drawer__footer[hidden] { display: none; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; color: var(--store-green-deep); font-size: 18px; }
.cart-checkout { width: 100%; }
.cart-continue { display: block; margin: 12px auto 0; padding: 4px; border: 0; background: transparent; color: var(--store-green); font-weight: 800; cursor: pointer; }
.cart-secure { margin: 15px 0 0; color: #7b8580; font-size: 12px; text-align: center; }

.checkout-main { padding: 64px 0 92px; background: #fafaf8; min-height: calc(100vh - 84px); }
.checkout-head { max-width: 700px; margin-bottom: 34px; }
.checkout-title { font-size: clamp(36px, 4vw, 56px); }
.checkout-head p { margin: 13px 0 0; color: var(--store-muted); font-size: 17px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, .7fr); gap: 34px; align-items: start; }
.checkout-panel { padding: 32px; border: 1px solid var(--store-line); border-radius: 4px; background: #fff; }
.checkout-panel h2 { margin: 0 0 24px; color: var(--store-green-deep); font-family: "Noto Serif TC", serif; font-size: 25px; }
.checkout-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.checkout-field { display: grid; gap: 7px; }
.checkout-field.full { grid-column: 1 / -1; }
.checkout-field label { color: #33443d; font-size: 14px; font-weight: 850; }
.checkout-field input, .checkout-field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #ced8d3; border-radius: 3px; background: #fff; color: var(--store-ink);
}
.checkout-field textarea { min-height: 100px; resize: vertical; }
.checkout-consent { display: flex; align-items: start; gap: 10px; margin: 22px 0; color: #58645f; font-size: 14px; }
.checkout-consent input { margin-top: 4px; }
.checkout-consent a { color: var(--store-green); text-decoration: underline; text-underline-offset: 3px; }
.checkout-submit { width: 100%; }
.checkout-submit:disabled { opacity: .65; cursor: wait; }
.checkout-message { margin: 13px 0 0; color: #a23628; font-size: 14px; }
.checkout-summary { position: sticky; top: 108px; }
.checkout-summary-list { display: grid; gap: 16px; }
.checkout-summary-item { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--store-line); }
.checkout-summary-item img { width: 68px; height: 68px; object-fit: cover; border-radius: 3px; }
.checkout-summary-item h3 { margin: 0; font-size: 14px; line-height: 1.4; }
.checkout-summary-item p { margin: 3px 0 0; color: var(--store-muted); font-size: 12px; }
.checkout-summary-total { display: flex; justify-content: space-between; margin-top: 22px; color: var(--store-green-deep); font-size: 20px; }
.checkout-empty { padding: 40px 0; text-align: center; }

@media (max-width: 980px) {
  .store-nav { width: min(100% - 32px, 1280px); }
  .store-nav__links > a { display: none; }
  .store-shell { width: min(100% - 36px, 720px); }
  .store-hero { padding-top: 46px; }
  .store-hero__grid { grid-template-columns: 1fr; gap: 42px; }
  .store-hero__visual { min-height: 510px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-heading { align-items: start; flex-direction: column; }
  .shop-filters { justify-content: flex-start; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
}

@media (max-width: 620px) {
  .store-nav { min-height: 70px; }
  .store-nav .brand-logo { height: 50px; }
  .cart-button { min-width: 44px; padding: 0 11px; }
  .cart-button > span:not(.cart-count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .store-hero { padding: 38px 0 48px; }
  .store-hero h1 { font-size: clamp(40px, 12vw, 55px); }
  .store-hero__lead { font-size: 17px; }
  .store-hero__visual { min-height: 390px; }
  .store-hero__portrait { width: 84%; height: 91%; }
  .store-hero__product { width: 53%; border-width: 6px; }
  .store-hero__stamp { width: 82px; height: 82px; font-size: 11px; }
  .shop-section { padding: 62px 0 70px; }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-card__body > p:not(.shop-card__meta) { min-height: 0; }
  .store-trust__grid { grid-template-columns: 1fr; }
  .store-trust__item { justify-content: flex-start; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .store-trust__item:last-child { border-bottom: 0; }
  .checkout-main { padding: 40px 0 70px; }
  .checkout-panel { padding: 23px 18px; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-field.full { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card, .shop-card__image img, .cart-overlay, .cart-drawer { transition: none; }
}
