:root {
  --ink: #26382f;
  --green: #2d5143;
  --green-soft: #dfe9e2;
  --paper: #f7f3eb;
  --white: #fffdf9;
  --line: #d9d4ca;
  --muted: #6e746f;
  --shadow: 0 16px 45px rgba(38, 56, 47, .10);
  --body-font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --heading-font: Georgia, "Times New Roman", serif;
  --hero-text-color: #26382f;
  --hero-panel-rgb: 255,255,255;
  --hero-panel-opacity: .58;
  --hero-overlay-opacity: .72;
  --hero-title-size: 88px;
  --hero-title-mobile-size: 42px;
  --hero-text-size: 20px;
  --hero-eyebrow-size: 13px;
  --hero-min-height: 72vh;
  --hero-content-width: 900px;
  --hero-panel-padding: 36px;
  --hero-panel-radius: 24px;
  --hero-panel-blur: 4px;
  --section-spacing: 86px;
  --section-title-size: 48px;
  --home-product-columns: 4;
  --home-category-columns: 3;
  --quote-background: #2d5143;
  --quote-text-color: #ffffff;
  --quote-text-size: 48px;
  --header-nav-size: 14px;
  --header-brand-size: 22px;
  --page-background: #f7f3eb;
  --page-text-color: #26382f;
  --page-hero-background: #ece5da;
  --page-hero-text-color: #26382f;
  --page-title-size: 64px;
  --page-eyebrow-size: 13px;
  --page-body-size: 16px;
  --page-content-width: 1180px;
  --page-section-spacing: 70px;
  --page-card-rgb: 255,255,255;
  --page-card-opacity: 1;
  --page-card-radius: 18px;
  --footer-background: #20382e;
  --footer-text-color: #ffffff;
  --footer-title-size: 20px;
  --footer-body-size: 14px;
  --footer-link-size: 14px;
  --footer-padding: 54px;
  --footer-card-rgb: 255,255,255;
  --footer-card-opacity: 0;
  --footer-card-radius: 16px;
  --footer-logo-size: 110px;
  --body-line-height: 1.7;
  --heading-line-height: 1.2;
  --page-line-height: 1.8;
  --footer-line-height: 1.7;
  --button-primary-background: #2d5143;
  --button-primary-text: #ffffff;
  --button-buy-background: #f2e6da;
  --button-buy-text: #2d5143;
  --button-secondary-background: #ffffff;
  --button-secondary-text: #2d5143;
  --button-filter-background: #fffdf9;
  --button-filter-text: #26382f;
  --button-filter-active-background: #2d5143;
  --button-filter-active-text: #ffffff;
  --button-detail-background: #ece5da;
  --button-detail-text: #2d5143;
  --button-radius: 999px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  line-height: var(--body-line-height);
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body-font);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 235, .94);
  border-bottom: 1px solid rgba(45, 81, 67, .12);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-family: var(--heading-font);
  font-size: var(--header-brand-size);
  font-weight: 500;
  letter-spacing: .04em;
}

.brand small {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: .12em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: var(--header-nav-size);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  color: white;
  background: var(--green);
  border-radius: 999px;
  font-size: 12px;
}

.menu-button {
  display: none;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  min-height: var(--hero-min-height);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 90px 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), transparent 34%),
    linear-gradient(135deg, #e7ddd0 0%, #dce8df 52%, #f4eee6 100%);
}

.hero-content {
  width: min(var(--hero-content-width), 100%);
  color: var(--hero-text-color);
  text-align: center;
}

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

h1, h2, h3 {
  line-height: 1.25;
}

.hero h1 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(var(--hero-title-mobile-size), 8vw, var(--hero-title-size));
  font-weight: 400;
  letter-spacing: .025em;
}

.hero p {
  max-width: 650px;
  margin: 24px auto 34px;
  font-size: var(--hero-text-size);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 24px;
  color: white;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  transition: .2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 25px rgba(45, 81, 67, .18);
}

.button.secondary {
  color: var(--green);
  background: transparent;
}

.button.small {
  min-height: 40px;
  padding: 8px 17px;
  font-size: 14px;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin: auto;
}

.section {
  padding: var(--section-spacing) 0;
}

.section-heading {
  margin-bottom: 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(28px, 4vw, var(--section-title-size));
  font-weight: 400;
}

.section-heading p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.product-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(45, 81, 67, .10);
  border-radius: 18px;
  box-shadow: 0 6px 25px rgba(38, 56, 47, .05);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  display: block;
  object-fit: cover;
  background: #ebe5da;
}

.product-info {
  padding: 18px;
}

.category-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.product-card h3 {
  min-height: 52px;
  margin: 7px 0 12px;
  font-size: 16px;
}

.price-row {
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.price {
  font-size: 18px;
  font-weight: 700;
}

.original-price {
  color: #999;
  font-size: 13px;
  text-decoration: line-through;
}

.card-actions {
  display: flex;
  gap: 9px;
}

.card-actions .button {
  width: 100%;
}

.quote-section {
  padding: 95px 24px;
  color: var(--quote-text-color);
  background: var(--quote-background);
  text-align: center;
}

.quote-section blockquote {
  max-width: 850px;
  margin: 0 auto;
  font-family: var(--heading-font);
  font-size: clamp(24px, 4vw, var(--quote-text-size));
  line-height: 1.5;
}

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

.category-card {
  min-height: 220px;
  display: flex;
  align-items: end;
  padding: 25px;
  border-radius: 20px;
  background: linear-gradient(145deg, #e8ded2, #dce8e0);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2) {
  background: linear-gradient(145deg, #d9e3dc, #efe3d7);
}

.category-card:nth-child(3) {
  background: linear-gradient(145deg, #e6dfd5, #d2ddd6);
}

.category-card h3 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 30px;
  font-weight: 400;
}

.site-footer {
  padding: var(--footer-padding) 0 22px;
  color: var(--footer-text-color);
  background: var(--footer-background);
  font-size: var(--footer-body-size);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 22px;
}

.footer-card {
  padding: 20px;
  background: rgba(var(--footer-card-rgb), var(--footer-card-opacity));
  border: 1px solid rgba(var(--footer-card-rgb), calc(var(--footer-card-opacity) + .08));
  border-radius: var(--footer-card-radius);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: inherit;
  font-family: var(--heading-font);
  font-size: var(--footer-title-size);
}

.footer-grid p {
  margin: 6px 0;
  line-height: 1.7;
}

.footer-logo {
  display: block;
  width: min(100%, var(--footer-logo-size));
  max-height: var(--footer-logo-size);
  margin-bottom: 16px;
  object-fit: contain;
  object-position: left center;
}

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

.footer-links a {
  padding: 4px 0;
  font-size: var(--footer-link-size);
}

.footer-bottom {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: max(11px, calc(var(--footer-body-size) - 2px));
  opacity: .78;
}

.content-page,
.shop-page {
  color: var(--page-text-color);
  background: var(--page-background);
  font-size: var(--page-body-size);
}

.content-page-main {
  min-height: 55vh;
}

.page-hero {
  width: min(var(--page-content-width), calc(100% - 36px));
  margin: 32px auto 0;
  padding: var(--page-section-spacing) 28px;
  color: var(--page-hero-text-color);
  background: var(--page-hero-background);
  border-radius: var(--page-card-radius);
  text-align: center;
}

body[data-page-heading-align="left"] .page-hero {
  text-align: left;
}

body[data-page-heading-align="right"] .page-hero {
  text-align: right;
}

.page-hero .eyebrow {
  color: inherit;
  font-size: var(--page-eyebrow-size);
  opacity: .72;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(32px, 6vw, var(--page-title-size));
  font-weight: 400;
}

.page-hero p {
  max-width: 760px;
  margin: 14px auto 0;
  color: inherit;
  line-height: 1.8;
  opacity: .78;
}

body[data-page-heading-align="left"] .page-hero p {
  margin-left: 0;
}

body[data-page-heading-align="right"] .page-hero p {
  margin-right: 0;
}

.content-page-section {
  padding: var(--page-section-spacing) 0;
}

.page-content-container {
  width: min(var(--page-content-width), calc(100% - 36px));
  margin: auto;
}

.content-page .content-card {
  color: var(--page-text-color);
  background: rgba(var(--page-card-rgb), var(--page-card-opacity));
  border-radius: var(--page-card-radius);
  font-size: var(--page-body-size);
}

body[data-page-card-shadow="yes"] .content-page .content-card {
  box-shadow: var(--shadow);
}

body[data-page-card-shadow="no"] .content-page .content-card {
  box-shadow: none;
}

.filter-bar {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-button {
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
}

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

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr);
  gap: 30px;
  align-items: start;
}

.panel {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(38, 56, 47, .06);
}

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

.cart-item:first-child {
  padding-top: 0;
}

.cart-item img {
  width: 90px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.cart-item h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.qty-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.remove-button {
  margin-top: 8px;
  padding: 0;
  color: #8a4d4d;
  background: none;
  border: 0;
  font-size: 13px;
}

.summary-row {
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.summary-row.total {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 700;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.field textarea {
  min-height: 105px;
  resize: vertical;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  color: #5c4a25;
  background: #fff5d9;
  border: 1px solid #ead59f;
  border-radius: 12px;
  font-size: 14px;
}

.about-copy {
  max-width: 760px;
  margin: auto;
  padding-bottom: 80px;
  font-size: 17px;
}

.about-copy h2 {
  margin-top: 42px;
  font-family: var(--heading-font);
  font-size: 34px;
  font-weight: 400;
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: 1fr; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .menu-button { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
}

@media (max-width: 580px) {
  .section { padding: 62px 0; }
  .product-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .cart-item {
    grid-template-columns: 72px 1fr;
  }
  .cart-item img { width: 72px; }
  .cart-item > :last-child {
    grid-column: 2;
    justify-self: start;
  }
}


.product-image-wrap {
  position: relative;
}

.product-image-wrap > img {
  display: block;
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-badge {
  padding: 5px 9px;
  color: #fff;
  background: rgba(35, 72, 58, .92);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(22, 45, 36, .16);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.product-badge.preorder {
  color: #5d481d;
  background: rgba(244, 224, 170, .96);
}

.product-description {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 13px;
  overflow: hidden;
  color: #66706a;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-inventory {
  min-height: 36px;
  margin: 0 0 12px;
  color: #6e746f;
  font-size: 12px;
  line-height: 1.5;
}

.product-inventory.preorder {
  color: #755b2b;
}

.card-actions {
  gap: 8px;
}

.product-detail-button {
  flex: 0 0 auto;
  padding: 8px 4px;
  color: #285342;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-detail-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: #19372d;
  background: transparent;
  border: 0;
}

.product-detail-dialog::backdrop {
  background: rgba(20, 31, 26, .58);
  backdrop-filter: blur(5px);
}

.product-detail-panel {
  position: relative;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 34px;
  background: #fffdf8;
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(11, 25, 18, .28);
}

.product-detail-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 42px;
  height: 42px;
  color: #254a3c;
  background: #f5f0e7;
  border: 1px solid #ddd4c6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: start;
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #ebe6dc;
  border-radius: 16px;
}

.detail-badges {
  position: static;
  margin-bottom: 12px;
}

.product-detail-grid h2 {
  margin: 8px 0 10px;
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.25;
}

.product-detail-price {
  margin: 0 0 22px;
  font-family: var(--heading-font);
  font-size: 25px;
  font-weight: 700;
}

.product-detail-description {
  margin: 0 0 20px;
  color: #4f5c55;
  line-height: 1.9;
  white-space: pre-wrap;
}

.product-detail-empty {
  color: #788078;
}

.preorder-notice {
  margin: 18px 0;
  padding: 15px 17px;
  color: #604b23;
  background: #f7edd2;
  border: 1px solid #ead7a7;
  border-radius: 13px;
}

.preorder-notice p {
  margin: 6px 0 0;
  line-height: 1.65;
}

.product-detail-add {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .product-detail-panel {
    padding: 24px 18px;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-detail-image {
    max-height: 360px;
  }
}


/* Dynamic homepage categories */
.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.category-loading {
  grid-column: 1 / -1;
  padding: 32px 20px;
  color: #6e746f;
  background: rgba(255, 253, 249, .72);
  border: 1px dashed #d8d0c3;
  border-radius: 16px;
  text-align: center;
}

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  top: -42px;
  right: -32px;
  background: rgba(255, 255, 255, .28);
  border-radius: 50%;
}

.category-card:nth-child(4n + 1) {
  background: linear-gradient(145deg, #e8ded2, #dce8e0);
}

.category-card:nth-child(4n + 2) {
  background: linear-gradient(145deg, #d9e3dc, #efe3d7);
}

.category-card:nth-child(4n + 3) {
  background: linear-gradient(145deg, #e6dfd5, #d2ddd6);
}

.category-card:nth-child(4n) {
  background: linear-gradient(145deg, #e2dde8, #e8e3d7);
}

.category-card-label {
  position: relative;
  z-index: 1;
  margin-bottom: 7px;
  color: #5f6f66;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.category-card h3 {
  position: relative;
  z-index: 1;
}

.category-card-arrow {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: #355848;
  font-size: 13px;
  font-weight: 800;
}

.product-option-field{display:block;margin:16px 0;font-weight:700}.product-option-field select,.product-option-field textarea{width:100%;margin-top:7px;padding:11px;border:1px solid #d7d2c7;border-radius:10px;font:inherit}.cart-variant,.cart-note,.checkout-item-note{display:block;color:#68706b;font-size:13px;margin:5px 0}.content-list{display:grid;gap:20px;margin-top:25px}.content-card{padding:25px;background:#fff;border:1px solid #ddd7ca;border-radius:18px}.content-card img{width:100%;max-height:420px;object-fit:cover;border-radius:12px;margin-bottom:16px}.rich-text{line-height:1.9;white-space:normal}.google-map iframe{width:100%;min-height:360px;border:0;border-radius:14px;margin-top:20px}


.hero.has-hero-image {
  background-size: cover;
  background-repeat: no-repeat;
}

.hero.has-hero-image .hero-content {
  padding: var(--hero-panel-padding);
  background: rgba(var(--hero-panel-rgb), var(--hero-panel-opacity));
  border: 1px solid rgba(var(--hero-panel-rgb), min(1, calc(var(--hero-panel-opacity) + .18)));
  border-radius: var(--hero-panel-radius);
  backdrop-filter: blur(var(--hero-panel-blur));
  -webkit-backdrop-filter: blur(var(--hero-panel-blur));
}

.hero[data-panel-mode="none"] .hero-content {
  padding: 0;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero[data-text-align="left"] {
  justify-items: start;
}

.hero[data-text-align="right"] {
  justify-items: end;
}

.hero[data-text-align="left"] .hero-content {
  text-align: left;
}

.hero[data-text-align="right"] .hero-content {
  text-align: right;
}

.hero[data-text-align="left"] .hero-content > p {
  margin-left: 0;
  margin-right: auto;
}

.hero[data-text-align="right"] .hero-content > p {
  margin-left: auto;
  margin-right: 0;
}

.hero[data-vertical-align="top"] {
  align-items: start;
}

.hero[data-vertical-align="bottom"] {
  align-items: end;
}

.hero[data-button-style="outline"] .hero-button {
  color: var(--green);
  background: rgba(var(--hero-panel-rgb), .35);
}

.home-page .hero .eyebrow {
  color: inherit;
  font-size: var(--hero-eyebrow-size);
}

.home-page .product-grid {
  grid-template-columns: repeat(var(--home-product-columns), minmax(0, 1fr));
}

.home-page .category-grid {
  grid-template-columns: repeat(var(--home-category-columns), minmax(0, 1fr));
}

[data-home-section][hidden],
.hero-button[hidden] {
  display: none !important;
}


/* 商品主圖可點擊 */
.product-image-button {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.product-image-button:focus-visible {
  outline: 3px solid rgba(45, 86, 70, .32);
  outline-offset: 3px;
}

.product-image-button img {
  transition: transform .25s ease;
}

.product-image-button:hover img {
  transform: scale(1.025);
}

/* 商品說明圖片藝廊 */
.product-gallery {
  min-width: 0;
}

.product-gallery-main {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #f4f1ea;
  border: 0;
  border-radius: 18px;
  cursor: zoom-in;
}

.product-gallery-main .product-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.product-gallery-thumbnail {
  padding: 2px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.product-gallery-thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 86, 70, .14);
}

.product-gallery-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
}

.product-quantity-control {
  display: grid;
  grid-template-columns: 44px minmax(70px, 100px) 44px;
  align-items: stretch;
  margin-top: 7px;
}

.product-quantity-control button,
.product-quantity-control input {
  min-height: 44px;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.product-quantity-control button {
  cursor: pointer;
}

.product-quantity-control button:first-child {
  border-radius: 10px 0 0 10px;
}

.product-quantity-control button:last-child {
  border-radius: 0 10px 10px 0;
}

.product-quantity-control input {
  width: 100%;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.quantity-field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .product-gallery-thumbnails {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


@media (max-width: 900px) {
  .home-page .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .category-grid {
    grid-template-columns: repeat(min(2, var(--home-category-columns)), minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .section {
    padding: max(48px, calc(var(--section-spacing) * .72)) 0;
  }

  .home-page .product-grid,
  .home-page .category-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 64px 18px;
  }

  .hero.has-hero-image .hero-content {
    padding: min(var(--hero-panel-padding), 26px);
  }
}


/* 商店排序與價格篩選 */
.shop-controls {
  width: min(var(--page-content-width), calc(100% - 36px));
  margin: 30px auto 0;
}

.shop-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 18px;
  background: rgba(var(--page-card-rgb), var(--page-card-opacity));
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
}

.price-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.price-filter > strong {
  align-self: center;
  margin-right: 4px;
}

.price-filter label,
.sort-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.price-filter input,
.sort-control select {
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}

.price-filter input {
  width: 120px;
}

.price-filter-divider {
  align-self: center;
  padding-bottom: 10px;
  color: var(--muted);
}

.filter-apply-button,
.filter-reset-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--green);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
}

.filter-apply-button {
  color: white;
  background: var(--green);
}

.filter-reset-button {
  color: var(--green);
  background: transparent;
}

.sort-control select {
  min-width: 190px;
}

.shop-result-count {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.shop-product-section {
  padding-top: 24px;
}

.card-actions {
  display: grid;
  gap: 10px;
}

.purchase-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.purchase-buttons .button {
  width: 100%;
  padding-right: 10px;
  padding-left: 10px;
}

.buy-now-button {
  background: transparent;
}

.product-detail-purchase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.product-detail-purchase-actions .button {
  width: 100%;
}

.product-gallery-main .product-detail-image,
.product-detail-image {
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.product-gallery-main {
  overflow: visible;
}

.content-card img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 800px) {
  .shop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control select {
    width: 100%;
  }

  .price-filter input {
    width: 100%;
  }

  .price-filter label {
    flex: 1 1 120px;
  }
}

@media (max-width: 580px) {
  .purchase-buttons,
  .product-detail-purchase-actions {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-card {
    padding: 16px;
  }

  .page-hero {
    margin-top: 18px;
    padding: 44px 20px;
  }
}


h1, h2, h3, h4, h5, h6 {
  line-height: var(--heading-line-height);
}

.content-page,
.content-page .rich-text,
.content-page .content-card,
.content-page .policy-copy {
  line-height: var(--page-line-height);
}

.site-footer,
.site-footer p,
.site-footer a {
  line-height: var(--footer-line-height);
}


/* 可調式按鈕色彩 */
.button,
.filter-apply-button,
.checkout-button,
.primary-action-button {
  color: var(--button-primary-text);
  background: var(--button-primary-background);
  border-color: var(--button-primary-background);
  border-radius: var(--button-radius);
}

.button.secondary,
.filter-reset-button,
.secondary-action-button {
  color: var(--button-secondary-text);
  background: var(--button-secondary-background);
  border-color: var(--button-secondary-text);
  border-radius: var(--button-radius);
}

.buy-now-button,
.product-detail-buy {
  color: var(--button-buy-text) !important;
  background: var(--button-buy-background) !important;
  border-color: var(--button-buy-background) !important;
}

.filter-button {
  color: var(--button-filter-text);
  background: var(--button-filter-background);
  border-color: color-mix(in srgb, var(--button-filter-text) 25%, transparent);
  border-radius: var(--button-radius);
}

.filter-button.active {
  color: var(--button-filter-active-text);
  background: var(--button-filter-active-background);
  border-color: var(--button-filter-active-background);
}

.product-detail-button {
  color: var(--button-detail-text);
  background: var(--button-detail-background);
  border-color: var(--button-detail-background);
  border-radius: var(--button-radius);
}

.button:hover,
.filter-apply-button:hover,
.filter-reset-button:hover,
.filter-button:hover,
.product-detail-button:hover {
  filter: brightness(.96);
}

.filter-button span {
  margin-left: 5px;
  opacity: .68;
  font-size: .82em;
}


.shop-search-filter {
  display: grid;
  gap: 10px;
}

.shop-search-filter > label:first-child {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-search-filter input[type="search"] {
  width: min(310px, 72vw);
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}

.stock-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.stock-filter-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--button-primary-background);
}

.price-filter select {
  width: 140px;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}

.shop-result-summary {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.active-filter-chip,
.active-filter-default {
  padding: 5px 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--white) 84%, var(--green-soft));
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.active-filter-default {
  opacity: .75;
}

.shop-result-count {
  margin: 0;
  white-space: nowrap;
}

.shop-empty-state .button {
  margin-top: 12px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--button-primary-text);
  background: var(--button-primary-background);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  cursor: pointer;
  font-size: 22px;
}

.back-to-top[hidden] {
  display: none;
}

@media (max-width: 800px) {
  .shop-result-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-search-filter input[type="search"],
  .price-filter select {
    width: 100%;
  }

  .shop-search-filter {
    width: 100%;
  }
}


/* 防止網站設計設定載入前閃出預設版 */
html.design-loading:not(.design-ready) body {
  visibility: hidden;
  opacity: 0;
}

html.design-ready body {
  visibility: visible;
  opacity: 1;
  transition: opacity .12s ease;
}

@media (prefers-reduced-motion: reduce) {
  html.design-ready body {
    transition: none;
  }
}


.footer-hours {
  white-space: normal;
}

.footer-card a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
}


/* 顧客端圖片基本保護：禁止拖曳、選取及 iOS 長按儲存選單 */
.protected-image,
.product-card img,
.product-gallery img,
.content-card img,
.footer-logo {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.product-gallery-main {
  cursor: default;
}
