﻿:root {
  --bg: #f8f2e9;
  --card: #fffdf8;
  --ink: #26180f;
  --ink-soft: #7a5e49;
  --line: #e7d6c1;
  --gold: #b67a2f;
  --gold-deep: #8c5420;
  --green: #4f7a52;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans TC", sans-serif;
  background:
    radial-gradient(circle at 6% -10%, #ffe7be 0, transparent 35%),
    radial-gradient(circle at 95% 10%, #f4d2a7 0, transparent 28%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 245, 0.9);
  backdrop-filter: blur(10px);
}

.brand {
  font-family: "Cinzel", serif;
  font-size: 1.16rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 1rem;
}

.topbar nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.topbar-icons {
  display: inline-flex;
  align-items: center;
  gap: 0px;
}

.icon-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: transparent;
  text-decoration: none;
  transition: color 0.2s ease;
}

.icon-button {
  border: 0;
  padding: 0;
  background: transparent;
}

.icon-link svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link:hover {
  color: #e16868;
}

.welcome-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

main {
  width: min(1100px, 92vw);
  margin: 0 auto 3rem;
}

.hero {
  margin-top: 1.2rem;
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  background: linear-gradient(140deg, #fff7ea 0%, #fff 100%);
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.8rem, 5.5vw, 3rem);
  line-height: 1.2;
}

.hero-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero-cta {
  margin-top: 1rem;
  display: inline-block;
  text-decoration: none;
  color: #fff;
  padding: 0.62rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
}

.hero-card {
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid #eddac1;
  background: #fff;
}

.hero-card h3 { margin-top: 0; }

.block {
  margin-top: 1.2rem;
  padding: 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}

.block-head h2 { margin: 0; }
.block-head p { margin: 0.35rem 0 0.85rem; color: var(--ink-soft); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

.product {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.product img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product .content { padding: 0.78rem; }
.product h4 { margin: 0; }
.product p { line-height: 1.6; }
.price { font-size: 1.1rem; font-weight: 800; }

button {
  border: none;
  border-radius: 10px;
  padding: 0.56rem 0.8rem;
  cursor: pointer;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
}

button:hover { background: var(--gold-deep); }

.ghost-btn {
  background: transparent;
  border: 1px solid #ceb08a;
  color: var(--ink);
}

.cart-item, .order-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
}

.qty-input {
  width: 70px;
  border: 1px solid #d9be9f;
  border-radius: 8px;
  padding: 0.35rem;
}

.orders-list > article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 0.7rem;
}

.auth-wrap {
  min-height: calc(100vh - 110px);
  display: grid;
  place-items: center;
  padding: 2.8rem 0 3.6rem;
}

.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  padding: 1.8rem 1.5rem 1.5rem;
  box-shadow: none;
}

.auth-tabs {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #d5d5d5;
}

.tab-btn {
  background: transparent;
  border-radius: 0;
  padding: 0.62rem 0.1rem;
  color: #777;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.tab-btn.active {
  background: transparent;
  color: #111;
  border-bottom-color: #111;
}

.tab-btn:hover {
  background: transparent;
  color: #111;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.87rem;
  margin-bottom: 0.8rem;
  color: #333;
}

input {
  border: 1px solid #cfcfcf;
  border-radius: 0;
  padding: 0.62rem 0.58rem;
  font-size: 0.95rem;
}

.shopline-auth {
  border: 0;
}

.auth-brand {
  margin: 0 0 1rem;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: #5c5c5c;
}

.auth-form {
  display: block;
}

.auth-submit {
  width: 100%;
  margin-top: 0.2rem;
  border-radius: 0;
  padding: 0.66rem 0.8rem;
  background: #111;
  color: #fff;
}

.auth-submit:hover {
  background: #000;
}

.shopline-card {
  width: min(560px, 100%);
  border: 0;
  background: transparent;
  padding: 0;
}

.auth-pane {
  display: none;
}

.auth-pane.active {
  display: block;
}

.auth-title {
  margin: 0 0 2.2rem;
  font-size: 52px;
  font-weight: 700;
  color: #666;
}

.shopline-form {
  margin-bottom: 2.2rem;
}

.line-field {
  margin-bottom: 1.35rem;
}

.line-field span {
  display: block;
  margin-bottom: 0.5rem;
  color: #8a8a8a;
  font-size: 16px;
  line-height: 1.15;
}

.line-field input {
  border: none;
  border-bottom: 1px solid #d1d1d1;
  background: transparent;
  border-radius: 0;
  padding: 0 0 0.45rem;
  height: 28px;
}

.line-field input:focus {
  outline: none;
  border-bottom-color: #aaa;
}

.auth-link {
  width: auto;
  background: transparent;
  color: #555;
  padding: 0;
  margin: 0.35rem 0 1.4rem;
  font-size: 16px;
  border: 0;
}

.auth-link:hover {
  background: transparent;
  color: #333;
}

.shopline-primary {
  border-radius: 8px;
  background: #e16868;
  color: #fff;
  height: 66px;
  font-size: 20px;
  font-weight: 700;
}

.shopline-primary:hover {
  background: #d95c5c;
}

.shopline-outline {
  border-radius: 8px;
  border: 1px solid #e16868;
  color: #e16868;
  background: transparent;
  height: 66px;
  font-size: 20px;
  font-weight: 700;
}

.shopline-outline:hover {
  background: transparent;
  color: #d95c5c;
  border-color: #d95c5c;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #281b13;
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 35;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 40;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

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

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.55rem;
}

.cart-drawer-head h3 {
  margin: 0;
}

.cart-drawer-close {
  border: 0;
  background: transparent;
  color: #777;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.cart-drawer-summary {
  margin: 0;
  padding: 0 1rem 0.8rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.cart-drawer-list {
  padding: 0 1rem;
  overflow: auto;
}

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

.cart-footer button {
  width: 100%;
  border-radius: 0;
  background: #e16868;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .shopline-card {
    width: min(560px, 94vw);
  }

  .auth-title {
    font-size: 44px;
  }
}
