:root {
  /* 主色：麥橘 / 冷藍 */
  --bg-gradient-start: #f3e1d6;   /* 淺麥橘 */
  --bg-gradient-end:   #465e65;   /* 冷藍 */
  --card-bg:           #fdf9f6;

  --accent-main:       #465e65;   /* 冷藍 */
  --accent-main-dark:  #303d43;
  --accent-secondary:  #c99e8c;   /* 麥橘 */
  --accent-secondary-soft: #f3e2d6;

  --text-main:         #262f33;
  --text-sub:          #727b81;
  --border-soft:       #e1d2c7;
  --radius-lg:         18px;
  --radius-pill:       999px;
  --shadow-soft:       0 14px 36px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang TC", "Noto Sans TC", sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-main);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Top Bar -------------------------------------------------- */
.top-bar {
  width: 100%;
  background: rgba(253, 249, 246, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.98rem;
  color: var(--accent-main-dark);
}

.top-bar-logo-badge {
  width: 28px;
  height: 28px;
  border-radius: 40% 60% 55% 45%;
  background: radial-gradient(circle at 20% 15%, #ffffff, var(--accent-secondary));
  box-shadow: 0 5px 14px rgba(70, 94, 101, 0.45);
}

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.top-link {
  padding: 0.25rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  color: #4f585e;
  white-space: nowrap;
}

.top-link:hover {
  background: #f4e4d5;
  border-color: #dfc4af;
  color: var(--accent-main-dark);
}

.top-link-primary {
  background: linear-gradient(120deg, var(--accent-main), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(70, 94, 101, 0.55);
}

.top-link-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 22px rgba(70, 94, 101, 0.7);
}

/* Main Layout ---------------------------------------------- */
.page-wrap {
  max-width: 90%;
  margin: 1.4rem auto 1.8rem;
  padding: 0 1.2rem 1.6rem;
}

.page-title {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-main-dark);
}

.page-subtitle {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.checkout-shell {
  background: var(--card-bg);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.2rem 1.4rem;
}

@media (min-width: 992px) {
  .checkout-shell {
    padding: 1.5rem 1.7rem 1.7rem;
  }
}

/* Tab Nav -------------------------------------------------- */
.cart-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px dashed #decfc3;
  padding-bottom: 0.6rem;
}

.cart-tab-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #4a5a62;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.cart-tab-btn span.label {
  font-weight: 600;
}

.cart-tab-badges {
  display: inline-flex;
  gap: 0.25rem;
  font-size: 0.7rem;
}

.badge-chip {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-secondary-soft);
  color: #7c5c41;
}

.badge-chip.blue {
  background: rgba(70, 94, 101, 0.12);
  color: var(--accent-main-dark);
}

.badge-chip.pill {
  border-radius: 999px;
}

.cart-tab-btn:hover {
  background: #f6e8dd;
  border-color: #d9c0ad;
}

.cart-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-main), var(--accent-secondary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(70, 94, 101, 0.65);
}

.cart-tab-btn.active .badge-chip {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Tab Content Layout --------------------------------------- */
.cart-tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.cart-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.checkout-layout {
  display: block;
  gap: 1.2rem;
}

@media (min-width: 960px) {
  .checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr);
    align-items: flex-start;
  }
}

.checkout-left {
  padding-right: 0.3rem;
}

.checkout-right {
  background: linear-gradient(145deg, #fdf7f3, #f1e3d8);
  border-radius: 20px;
  border: 1px solid #ddc6b6;
  padding: 1rem;
  position: sticky;
  top: 72px;
}

@media (max-width: 959.98px) {
  .checkout-right {
    margin-top: 1rem;
    position: static;
  }
}

/* Cart items table ----------------------------------------- */
.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.2rem 0 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent-main-dark);
}

.section-title .small {
  font-size: 0.8rem;
  color: var(--text-sub);
  font-weight: 400;
}

.cart-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dfd2c8;
  margin-bottom: 1rem;
}

.cart-items-table thead {
  background: #f4e3d6;
  font-size: 0.8rem;
  color: #4f5a60;
}

.cart-items-table th,
.cart-items-table td {
  padding: 0.65rem 0.75rem;
}

.cart-items-table th {
  text-align: left;
  font-weight: 600;
  border-bottom: 1px dashed #dfd2c8;
}

.cart-items-table td {
  font-size: 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid #efe2d8;
}

.cart-items-table tr:last-child td {
  border-bottom: none;
}

.cart-item-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #d7dde0;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-info-title {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.cart-item-info-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.cart-item-tag {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(70, 94, 101, 0.08);
  color: var(--accent-main-dark);
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-sub);
}

.price {
  font-weight: 600;
}

.cart-qty-input {
  width: 54px;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  border: 1px solid #d2c4b9;
  font-size: 0.8rem;
  text-align: center;
  outline: none;
}

.cart-qty-input:focus {
  border-color: var(--accent-main);
  box-shadow: 0 0 0 2px rgba(70, 94, 101, 0.22);
}

/* Form blocks ---------------------------------------------- */
.form-grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

@media (min-width: 768px) {
  .form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-group {
  margin-bottom: 0.7rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
  color: #4c5b61;
  font-weight: 500;
}

.form-label span.required {
  color: #b5523d;
  margin-left: 0.2rem;
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #d2c4b9;
  font-size: 0.82rem;
  outline: none;
  background-color: #ffffff;
  transition: all 0.16s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-main);
  box-shadow: 0 0 0 2px rgba(70, 94, 101, 0.22);
}

.form-textarea {
  border-radius: 14px;
  min-height: 84px;
  resize: vertical;
}

/* Payment methods row -------------------------------------- */
.payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.pill-option {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #d2c4b9;
  font-size: 0.8rem;
  cursor: pointer;
  background: #ffffff;
  color: #4c5b61;
  transition: all 0.16s ease;
}

.pill-option.active {
  background: linear-gradient(135deg, var(--accent-main), var(--accent-secondary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(70, 94, 101, 0.6);
}

.pill-option:hover {
  border-color: var(--accent-main);
}

/* Summary panel -------------------------------------------- */
.summary-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--accent-main-dark);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.15rem;
  font-size: 0.83rem;
}

.summary-row.muted {
  color: var(--text-sub);
}

.summary-row.total {
  margin-top: 0.3rem;
  padding-top: 0.35rem;
  border-top: 1px dashed #d9c2af;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-main-dark);
}

.summary-points {
  margin-top: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: #f3e2d6;
  font-size: 0.78rem;
  color: #7c5c41;
}

.summary-points span.value {
  font-weight: 600;
}

.btn-checkout {
  margin-top: 0.8rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-main-dark), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(70, 94, 101, 0.7);
  transition: all 0.16s ease;
}

.btn-checkout:hover {
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(70, 94, 101, 0.8);
  transform: translateY(-1px);
}

.btn-checkout:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(70, 94, 101, 0.6);
}

.summary-hint {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-sub);
  line-height: 1.4;
}

/* 舊 header 組件（若有用到） ------------------------------- */
.site-header {
  width: 100%;
  background: linear-gradient(90deg, #465e65 0%, #c99e8c 60%, #f1dfd3 100%);
  box-shadow: 0 6px 20px rgba(37, 49, 55, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-ball {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #f2dfd2 40%, #9aa6ac 80%);
  box-shadow:
    0 6px 18px rgba(33, 45, 51, 0.4),
    0 0 0 8px rgba(255, 255, 255, 0.5);
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #27353b;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  font-size: 14px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(253, 249, 246, 0.9);
  color: #435058;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(32, 46, 53, 0.25);
  transition: all 0.18s ease-out;
  backdrop-filter: blur(10px);
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(32, 46, 53, 0.35);
}

/* 目前所在頁：會員中心 */
.nav-link-primary {
  background: linear-gradient(135deg, var(--accent-main), var(--accent-secondary));
  color: #ffffff;
  font-weight: 600;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 10px 12px;
  }

  .logo-text {
    font-size: 16px;
  }

  .header-nav {
    gap: 6px;
  }

  .nav-link {
    padding: 5px 12px;
    font-size: 13px;
  }
}

/* 新版 lc-header ------------------------------------------ */
.lc-header {
  width: 100%;
  background: linear-gradient(90deg, #465e65 0%, #c99e8c 55%, #f1dfd3 100%);
  box-shadow: 0 4px 16px rgba(34, 46, 53, 0.2);
}

.lc-header-inner {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
}

.lc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-logo-bubble {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #f1dfd3 45%, #8a9aa1 100%);
  box-shadow: 0 6px 18px rgba(34, 46, 53, 0.45);
}

.lc-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #26343a;
}

.lc-nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.lc-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  border: none;
  background: #fdf9f6;
  color: #435058;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(34, 46, 53, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lc-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 46, 53, 0.35);
}

/* 會員中心高亮 */
.lc-nav-btn-primary {
  background: linear-gradient(135deg, var(--accent-main-dark), var(--accent-secondary));
  color: #ffffff;
}
