@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

:root {
  --bg: #FDF2F0;
  --card: #FFF8F6;
  --purple: #EFE7F6;
  --purple-light: #F4ECF7;
  --text: #4B3F3F;
  --muted: #7A6767;
  --rose: #C98B91;
  --line: rgba(75, 63, 63, 0.12);
  --shadow: 0 18px 45px rgba(75, 63, 63, 0.08);
  --font-en: "Cormorant Garamond";
  --font-zh: "Noto Serif TC";
  --font-main: "Cormorant Garamond", "Noto Serif TC", serif;
  --content-max: 1120px;
  --page-gutter: 32px;
  --card-padding: clamp(28px, 4vw, 48px);
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-main);
  line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 118px;
  background: rgba(253, 242, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  position: relative;
  width: min(var(--content-max), calc(100% - var(--page-gutter)));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  letter-spacing: .08em;
  font-size: 14px;
}

.hamburger {
  width: 28px;
  display: grid;
  gap: 6px;
}
.hamburger span { height: 1.5px; background: var(--text); border-radius: 999px; }

.logo-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-link img {
  height: 96px;
  width: auto;
  object-fit: contain;
}

.header-actions {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cart-link {
  position: relative;
  font-size: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .45);
  border: 1px solid var(--line);
}
.cart-count {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(360px, 86vw);
  padding: 30px 28px;
  background: #fff8f6;
  z-index: 80;
  box-shadow: var(--shadow);
  transform: translateX(-110%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.side-menu.open { transform: translateX(0); }
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(75, 63, 63, .18);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.close-menu { border: 0; background: transparent; font-size: 24px; cursor: pointer; color: var(--text); }
.menu-nav { display: grid; gap: 10px; padding: 24px 0; }
.menu-nav a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(75, 63, 63, .08);
  letter-spacing: .04em;
}

.menu-shop-group {
  border-bottom: 1px solid rgba(75, 63, 63, .08);
}
.menu-shop-group summary {
  list-style: none;
  padding: 12px 0;
  letter-spacing: .04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-shop-group summary::-webkit-details-marker { display: none; }
.menu-shop-group summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}
.menu-shop-group[open] summary::after {
  content: "−";
}
.menu-shop-group:hover summary,
.menu-shop-group summary:focus-visible,
.menu-nav a:hover,
.menu-subnav a:hover {
  color: var(--rose);
}
.menu-subnav {
  display: grid;
  gap: 0;
  padding: 0 0 10px 18px;
}
.menu-subnav a {
  border-bottom: 0;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .03em;
}
.menu-note { color: var(--muted); font-size: 14px; }

main { min-height: 60vh; }
.container { width: min(var(--content-max), calc(100% - var(--page-gutter))); margin: 0 auto; }
.section { padding: 72px 0; }
.section.tight { padding: 46px 0; }
.eyebrow { color: var(--rose); letter-spacing: .16em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 18px; font-family: var(--font-main); font-weight: 500; }
h1 { font-size: clamp(36px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0 0 16px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.btn:hover { background: var(--text); color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--text); color: #fff; }
.btn.primary:hover { background: #2f2727; }
.btn.soft { border-color: transparent; background: var(--purple); }
.btn.soft:hover { background: var(--purple-light); color: var(--text); }

.hero {
  width: min(var(--content-max), calc(100% - var(--page-gutter)));
  margin: 28px auto 0;
  position: relative;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.hero-track { display: flex; transition: transform .45s ease; }
.hero-slide { min-width: 100%; position: relative; }
.hero-slide img { width: 100%; height: min(68vh, 620px); object-fit: cover; }
.hero-copy {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(24px, 6vw, 70px);
  max-width: 520px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 248, 246, 0.72);
  backdrop-filter: blur(8px);
}
.hero-copy p { color: var(--text); }
.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(75, 63, 63, .32);
  cursor: pointer;
}
.hero-dots button.active { background: var(--text); }

.intro-card {
  background: rgba(255, 248, 246, .58);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: var(--card-padding);
  box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }

/* Layout alignment: keep all large frames and titles on the same left/right boundary. */
.section > .container > .eyebrow,
.section > .container > h2,
.section > .container > p {
  margin-left: 0;
}
.intro-card {
  height: 100%;
}
.intro-card .eyebrow,
.intro-card h2,
.intro-card p,
.content-card .eyebrow,
.content-card h1,
.content-card h2,
.content-card h3,
.content-card p {
  margin-left: 0;
}

.category-pills, .filter-row { display: flex; flex-wrap: wrap; gap: 12px; }
.category-pill, .filter-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .4);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.filter-btn.active, .category-pill:hover { background: var(--text); color: #fff; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: rgba(255, 248, 246, .75);
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(75, 63, 63, .05);
}
.product-card-image { background: #fff; aspect-ratio: 1 / .9; overflow: hidden; position: relative; display: block; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover img { transform: scale(1.03); }
.product-card-category {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 248, 246, .86);
  color: var(--text);
  border: 1px solid rgba(75, 63, 63, .12);
  backdrop-filter: blur(8px);
  font-size: 13px;
  letter-spacing: .04em;
}
.product-card-body { padding: 18px 20px 22px; }
.product-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.product-card-heading h3 { margin: 0; }
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: var(--purple); color: var(--text); padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.product-category-text { color: var(--muted); font-size: 13px; white-space: nowrap; }
.price { color: var(--text); font-weight: 600; white-space: nowrap; }
.product-card h3 { font-size: 22px; line-height: 1.25; }

.page-title {
  padding: 58px 0 18px;
  text-align: left;
}
.page-title .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.page-title p { max-width: 720px; margin: 0; }

.product-detail {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 44px;
  align-items: start;
}
.gallery-main {
  border-radius: 34px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.gallery-main img { width: 100%; aspect-ratio: 1 / .92; object-fit: cover; }
.thumbnails { display: flex; gap: 12px; margin-top: 14px; }
.thumbnails button {
  width: 88px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #fff;
}
.thumbnails button.active { outline: 2px solid var(--rose); }
.thumbnails img { width: 100%; height: 100%; object-fit: cover; }
.product-info-panel {
  background: rgba(255, 248, 246, .65);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow);
}
.product-info-panel .price { font-size: 28px; margin-bottom: 22px; display: block; }
.form-row { margin: 18px 0; display: grid; gap: 8px; }
label { color: var(--text); font-weight: 500; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--text);
  border-radius: 18px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
.info-list { display: grid; gap: 14px; margin: 28px 0; }
.info-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(239, 231, 246, .45);
}
.info-item strong { display: block; margin-bottom: 4px; }
.note-box {
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  background: var(--purple-light);
  border: 1px solid var(--line);
}

.content-card {
  background: rgba(255, 248, 246, .7);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--shadow);
}
.content-card ul { padding-left: 1.2em; color: var(--muted); }
.content-card li { margin-bottom: 12px; }
.policy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 24px; }
.policy-box { background: var(--purple-light); padding: 22px; border-radius: 24px; }

.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 20px; background: #fff; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button, .remove-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  cursor: pointer;
}
.remove-btn { padding: 4px 12px; color: var(--muted); }
.summary-box {
  position: sticky;
  top: 140px;
  background: rgba(255, 248, 246, .7);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; color: var(--text); font-weight: 700; font-size: 18px; }
.empty-state { text-align: center; padding: 48px 12px; color: var(--muted); }

.site-footer {
  margin-top: 72px;
  padding: 54px 0 32px;
  background: rgba(255, 248, 246, .62);
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.footer-title { letter-spacing: .14em; color: var(--rose); font-size: 12px; font-weight: 700; margin-bottom: 14px; }
.footer-links { display: grid; gap: 8px; color: var(--muted); }
.copyright { margin-top: 34px; color: var(--muted); font-size: 13px; text-align: center; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .site-header { height: 104px; }
  .logo-link img { height: 82px; }
  .menu-toggle .menu-text { display: none; }
  .header-actions { right: 2px; }
  .grid-2, .product-detail, .cart-layout, .checkout-layout, .footer-grid, .policy-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { border-radius: 26px; }
  .hero-slide img { height: 520px; }
  .hero-copy { left: 16px; right: 16px; bottom: 16px; padding: 20px; }
  .summary-box { position: static; }
}
@media (max-width: 560px) {
  :root { --page-gutter: 24px; }
  .site-header { height: 92px; }
  .logo-link img { height: 72px; }
  .cart-link { width: 38px; height: 38px; font-size: 18px; }
  .product-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cart-item { grid-template-columns: 74px 1fr; }
  .cart-item > div:last-child { grid-column: 2; }
  .cart-item img { width: 74px; height: 74px; }
  .thumbnails button { width: 68px; }
}

/* v7 admin and dynamic pages */
.empty-state {
  border: 1px dashed var(--line);
  background: rgba(255,255,255,.35);
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
}
.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 118px);
}
.admin-sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  background: rgba(255, 248, 246, .68);
}
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a,
.admin-sidebar button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 10px;
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
}
.admin-sidebar a:hover,
.admin-sidebar button:hover,
.admin-sidebar a.active { background: var(--purple-light); }
.admin-main { padding: 38px clamp(22px, 4vw, 56px); }
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 12px 30px rgba(75,63,63,.06);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}
.admin-table th,
.admin-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th { color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-table td img { width: 58px; height: 58px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.65);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.checkbox-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.checkbox-row label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.login-card { max-width: 480px; margin: 58px auto; }
.admin-message { margin-top: 14px; color: var(--muted); }
.admin-message.error { color: #a8535d; }
.image-list { display: grid; gap: 10px; }
.image-row {
  display: grid;
  grid-template-columns: 72px 1fr 80px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: rgba(255,255,255,.45);
}
.image-row img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.small-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text);
}
.admin-upload-box {
  border: 1px dashed rgba(75,63,63,.24);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.38);
}
.admin-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--purple-light);
  color: var(--muted);
  margin: 12px 0 20px;
}
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
}


/* v12: product card information overlay */
.product-card-image {
  aspect-ratio: 4 / 5;
  background: #fff;
}
.product-card-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(75, 63, 63, .58), rgba(75, 63, 63, 0));
  pointer-events: none;
}
.product-card-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(75, 63, 63, .28);
}
.product-card-overlay .product-card-category {
  position: static;
  margin-bottom: 8px;
  background: rgba(255, 248, 246, .88);
  color: var(--text);
  text-shadow: none;
}
.product-card-overlay h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.18;
}
.product-card-overlay-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  letter-spacing: .03em;
}
.product-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.product-card-body .btn {
  min-height: 38px;
  padding: 7px 16px;
}


/* v13: simple product card info below image, inspired by marketplace cards */
.product-grid {
  align-items: start;
}
.product-card {
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(75, 63, 63, .14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(75, 63, 63, .045);
}
.product-card-image {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  background: #fff;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-image::after,
.product-card-overlay {
  display: none !important;
}
.product-card-body {
  display: block;
  padding: 13px 16px 16px;
  background: rgba(255, 255, 255, .74);
}
.product-card-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 7px;
  color: #b88484;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .02em;
}
.dot-separator {
  color: #c9a1a1;
  padding: 0 2px;
}
.product-card-heading.simple {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
}
.product-card-heading.simple h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(19px, 1.55vw, 24px);
  line-height: 1.25;
  letter-spacing: .02em;
}
.product-card-heading.simple .price {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  margin-top: 2px;
}
.product-card-link {
  display: inline-flex;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid rgba(75, 63, 63, .22);
  padding-bottom: 2px;
}
.product-card:hover .product-card-link {
  color: var(--text);
  border-bottom-color: var(--text);
}
@media (max-width: 640px) {
  .product-card-body { padding: 12px 14px 15px; }
  .product-card-meta-line { font-size: 13px; }
}
