@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root {
  --bg-color: #F9F7F1;
  --card-bg: #FFFEFA;
  --primary-color: #8A9A5B;
  --primary-hover: #768a4a;
  --text-color: #3D3A35;
  --shadow: 0 4px 12px rgba(140, 130, 110, 0.1);

  /* Secondary: warm terracotta for prices & emphasis */
  --accent-warm: #9E5F38;
  --accent-warm-hover: #8C502C;
  --accent-warm-subtle: #F5EDE6;

  /* Accent: gold for promos & highlights */
  --accent-gold: #D4960A;
  --accent-gold-bg: #FFF8E6;

  --bg: var(--bg-color);
  --card: var(--card-bg);
  --text: var(--text-color);
  --muted: #7A756D;
  --muted-brand: #828A6F;
  --line: #E5E0D6;
  --brand: var(--primary-color);

  /* Derived: button/card/shadow colors that follow primary */
  --btn-secondary: #6B7A5A;
  --btn-secondary-hover: #5A6A4A;
  --btn-added: #3b8f5a;
  --card-border: rgba(138, 154, 91, 0.1);
  --brand-shadow-sm: rgba(138, 154, 91, 0.2);
  --brand-shadow-md: rgba(138, 154, 91, 0.25);
  --brand-shadow-lg: rgba(138, 154, 91, 0.3);
  --focus-ring: rgba(138, 154, 91, 0.1);

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 150ms var(--ease-out-quart);
  --transition-normal: 250ms var(--ease-out-quart);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Zen Maru Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Animations */
@keyframes shimmer-loading {
  0% { background-position: -220px 0; }
  100% { background-position: 220px 0; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility Classes */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  padding: 16px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 8px var(--brand-shadow-md);
  text-decoration: none;
}

.btn-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--brand-shadow-lg);
}

.btn-pill:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px var(--brand-shadow-sm);
}

.btn-pill.secondary {
  background: var(--bg-color);
  color: var(--btn-secondary);
  box-shadow: none;
  border: 1px solid var(--line);
}

.btn-pill.secondary:hover {
  background: var(--line);
  color: var(--btn-secondary-hover);
}

.btn-pill.secondary:active {
  background: var(--line);
}

.btn-pill:disabled,
.btn-pill[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.input-cute {
  width: 100%;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  color: var(--text-color);
  box-shadow: inset 0 2px 4px rgba(160, 150, 140, 0.05);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-cute:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px;
}

.page-header {
  background: #fff;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-warm) 60%, var(--accent-gold) 100%) 1;
}

.page-header .container {
  position: relative;
}

.page-header h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

/* Store description */
.store-desc { font-size: 12px; color: var(--muted); margin: 0 0 4px; line-height: 1.4; }

/* Header layout */
.header-top { display: flex; justify-content: space-between; align-items: flex-start; }
.header-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.header-right { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 12px; }

/* Store Logo (header) */
.store-logo-header {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

/* Sub-page header (product, request) */
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sub-header__back {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color) !important;
  background: var(--bg-color);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: background 150ms ease;
}
.sub-header__back:hover { background: var(--line); }
.sub-header__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

/* Hamburger button */
.hamburger-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.hamburger-btn:hover { border-color: var(--primary-color); }

/* Drawer */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 85vw;
  z-index: 999;
  background: var(--card-bg);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25,1,0.5,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.drawer-header h2 { font-size: 16px; font-weight: 700; margin: 0; display: flex; align-items: center; }
.drawer-logo { width: 35px; height: 35px; object-fit: contain; border-radius: 8px; }

.drawer-close {
  width: 32px; height: 32px; border: none; background: none;
  color: var(--muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center; border-radius: 8px;
}
.drawer-close:hover { background: var(--bg-color); }

.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; }

.drawer-section { margin-bottom: 20px; }
.drawer-section-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.drawer-filter-list {
  display: flex; flex-direction: column; gap: 4px;
}
.drawer-filter-list .btn-pill {
  justify-content: flex-start;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
}
.drawer-filter-list .btn-pill.is-active {
  background: var(--brand);
  color: #fff;
}

.button {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.secondary {
  background: var(--btn-secondary);
}

.button.secondary:hover {
  background: var(--btn-secondary-hover);
}

.button.is-added {
  background: var(--btn-added);
  transform: scale(1.04);
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:disabled,
.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  margin: 12px 0;
  background: #FEF1EE;
  color: #8B2E1C;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #F5C4B8;
  font-size: 14px;
}

.notice--info {
  background: #EEF3E6;
  color: #3F4F2A;
  border-color: #C8D8A8;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  animation: fade-in 0.3s var(--ease-out-quart) both;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--brand-shadow-sm);
}

.product-card__media {
  position: relative;
  overflow: hidden;
}

.product-card__media.image-loading {
  background: linear-gradient(90deg, #eae8e4 0%, #f6f5f2 50%, #eae8e4 100%);
  background-size: 440px 100%;
  animation: shimmer-loading 1.05s linear infinite;
}

.product-card__media.image-loading img[data-image-loading="1"] {
  opacity: 0;
}

.product-card__media img[data-image-loading="1"] {
  transition: opacity 0.25s var(--ease-out-quart);
}

/* Product badges container: stack vertically at top-left */
.product-card__media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 0;
}
.promo-badge,
.product-tag {
  position: absolute;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.promo-badge {
  top: 8px;
  color: #6B4A00;
  background: linear-gradient(135deg, #FFE066, #FFCC33);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 2px 6px rgba(212, 150, 10, 0.25);
}

/* Product tags: stacked below promo badge */
.product-tag { color: #fff; font-size: 10px; letter-spacing: 0.3px; }
.product-tag:nth-of-type(1) { top: 8px; }
.product-tag:nth-of-type(2) { top: 32px; }
.product-tag:nth-of-type(3) { top: 56px; }
/* If promo badge exists, push tags down */
.promo-badge ~ .product-tag:nth-of-type(1) { top: 34px; }
.promo-badge ~ .product-tag:nth-of-type(2) { top: 58px; }
.promo-badge ~ .product-tag:nth-of-type(3) { top: 82px; }
.product-tag--hot { background: #e53e3e; }
.product-tag--limited { background: #d97706; }
.product-tag--popular { background: var(--primary-color); }

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

/* Gallery Nav — visible on hover (desktop) and always on mobile for multi-image cards */
.product-card__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(30, 30, 25, 0.5);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.product-card.has-gallery .product-card__nav {
  display: inline-flex;
}

.product-card.has-gallery:hover .product-card__nav {
  opacity: 1;
}

.product-card__nav:hover {
  background: rgba(30, 30, 25, 0.7);
}

.product-card__nav--prev {
  left: 8px;
}

.product-card__nav--next {
  right: 8px;
}

.product-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  height: calc(2 * 1.4em);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__title a {
  color: inherit;
  text-decoration: none;
}

.product-card__body .meta {
  margin: 2px 0;
  font-size: 13px;
}

.product-card__price {
  margin: 4px 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-warm);
}

.product-card__category {
  margin: 2px 0;
  font-size: 12px;
  color: var(--muted-brand);
}

.product-card__body .button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  line-height: 1;
}

.meta {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Request & Form Styles */
.request-items {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.request-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.request-item__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.request-item__body {
  flex: 1;
  min-width: 0;
}

.request-item__name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-color);
}

.request-item__price {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.request-item__fields {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.request-item__field-label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-color);
}

.request-item__field-input {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-color);
  background: var(--card-bg);
  margin: 0;
  width: auto;
}

.request-item__field-input--qty {
  width: 48px;
}

.request-item__field-input--size {
  width: 60px;
}

.request-item__field-input--note {
  flex: 1;
}

.request-item__note-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
}

.request-item__remove {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card-bg);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  color: #e53e3e;
  min-height: 32px;
  transition: background var(--transition-fast);
}

.request-item__remove:hover {
  background: #fef2f2;
}

.request-item__controls {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-form {
  display: grid;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.request-form label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.request-total-box {
  border: 1px solid var(--accent-warm);
  border-radius: 10px;
  background: var(--accent-warm-subtle);
  padding: 12px;
}

.request-total-highlight {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-warm);
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--card-bg);
}

.empty-state p {
  margin: 0 0 16px;
  font-size: 15px;
}

.shipping-options {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg-color);
  margin: 0;
}

.shipping-options legend {
  font-weight: 500;
  font-size: 14px;
  padding: 0 4px;
}

.shipping-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.shipping-option:last-of-type {
  border-bottom: none;
}

.shipping-option input[type="radio"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.shipping-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shipping-option strong {
  font-size: 14px;
}

.shipping-option .meta {
  margin: 0;
  font-size: 12px;
}

.captcha-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.captcha-svg {
  width: 160px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin-top: 6px;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

input:disabled,
select:disabled {
  background: var(--bg-color);
  color: var(--muted);
  cursor: not-allowed;
}

/* Success / Order Confirmation Page */
.success-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.success-header {
  text-align: center;
  padding: 32px 0 20px;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.success-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-color);
}

.success-header .order-code {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}

.success-msg {
  background: var(--accent-warm-subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.7;
}

.success-msg strong {
  display: block;
  margin-bottom: 4px;
}

.order-summary {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.order-summary-title {
  padding: 12px 14px;
  background: var(--bg-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.order-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.order-item:last-child {
  border-bottom: none;
}

.order-item .name {
  flex: 1;
  min-width: 0;
}

.order-item .spec {
  color: var(--muted);
  font-size: 12px;
}

.order-item .price {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-color);
}

.order-totals {
  padding: 12px 14px;
  background: var(--bg-color);
  border-top: 1px solid var(--line);
}

.order-totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}

.order-totals .row.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-warm);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-actions .btn-pill {
  text-align: center;
  text-decoration: none;
}

.success-page {
  min-height: 80vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.success-page__mascot {
  max-width: 280px;
  width: 100%;
  display: block;
}

.success-page__detail {
  text-align: left;
  width: 100%;
  max-width: 600px;
}

.success-page .btn-pill {
  min-width: 200px;
}

/* Product Detail */
/* --- Product Detail: Entrance --- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: 28px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.product-detail.is-loaded .detail-image-col {
  animation: detail-slide-in 500ms var(--ease-out-quart) both;
}

.product-detail.is-loaded .detail-meta {
  animation: detail-slide-in 500ms var(--ease-out-quart) 120ms both;
}

@keyframes detail-slide-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Main Image: zoom on hover --- */
.detail-main-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  position: relative;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border: 0;
  border-radius: 0;
  transition: transform 400ms var(--ease-out-quart);
}

.detail-main-wrap:hover .detail-main-image {
  transform: scale(1.08);
}

/* Crossfade on image switch */
.detail-main-image.is-switching {
  animation: img-crossfade 300ms var(--ease-out-quart);
}

@keyframes img-crossfade {
  0% { opacity: 0.4; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Gallery Thumbs --- */
.detail-gallery {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-thumb-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  transition: transform var(--transition-fast);
}

.detail-thumb-btn:hover {
  transform: scale(1.06);
}

.detail-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 8px;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.detail-thumb-btn.is-active .detail-thumb {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-shadow-sm);
}

/* --- Meta Info --- */
.detail-meta {
  display: grid;
  align-content: start;
  gap: 6px;
}

.detail-title {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text-color);
}

.detail-brand {
  font-size: 14px;
  color: var(--muted-brand);
  font-weight: 500;
  margin: 0;
}

/* Price block — prominent TWD with warm accent */
.detail-price-block {
  margin: 6px 0 2px;
  padding: 10px 14px;
  background: var(--accent-warm-subtle);
  border-radius: 10px;
  border-left: 3px solid var(--accent-warm);
}

.detail-price-twd {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-warm);
  line-height: 1.3;
}

.detail-price-jpy {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Attributes group */
.detail-attributes {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 4px 0;
}

/* --- Spec Box --- */
.detail-spec-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafbf8;
}

.detail-spec-box h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-brand);
}

.detail-spec-box ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

/* --- Quantity Stepper & Add Button Bar --- */
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto 0;
  max-width: 900px;
  padding: 0 14px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty-stepper__btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-family: inherit;
  line-height: 1;
}

.qty-stepper__btn:hover {
  background: var(--accent-warm-subtle);
  color: var(--accent-warm);
}

.qty-stepper__btn:active {
  transform: scale(0.92);
}

.qty-stepper__input {
  width: 44px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 0;
  -moz-appearance: textfield;
  color: var(--text-color);
  background: #fff;
}

.qty-stepper__input::-webkit-inner-spin-button,
.qty-stepper__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- Add to Cart Button with Delight --- */
.detail-add-btn {
  flex: 1;
  min-height: 44px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.detail-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--brand-shadow-lg);
}

.detail-add-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px var(--brand-shadow-sm);
}

.detail-add-btn__check {
  display: none;
}

.detail-add-btn.is-added {
  background: var(--btn-added);
  transform: scale(1);
  box-shadow: 0 4px 16px var(--brand-shadow-lg);
}

.detail-add-btn.is-added .detail-add-btn__text {
  display: none;
}

.detail-add-btn.is-added .detail-add-btn__check {
  display: block;
  animation: check-draw 400ms var(--ease-out-quart) both;
}

@keyframes check-draw {
  from { stroke-dasharray: 30; stroke-dashoffset: 30; opacity: 0; }
  to { stroke-dasharray: 30; stroke-dashoffset: 0; opacity: 1; }
}

/* Floating button bump when item added */
.floating-request-btn.is-bumped {
  animation: float-bump 400ms var(--ease-out-quart);
}

@keyframes float-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Pagination */
.pagination {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.pagination .meta {
  font-weight: 500;
  color: var(--text-color);
}

/* Admin */
.admin-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-forms {
  display: grid;
  gap: 12px;
}

.admin-form-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  border-left: 4px solid var(--line);
}

.admin-form-card[data-status="pending"] {
  border-left-color: var(--accent-gold);
}

.admin-form-card[data-status="ordered"] {
  border-left-color: var(--primary-color);
}

.admin-form-card[data-status="shipped"] {
  border-left-color: #3B8F5A;
}

.admin-form-card[data-status="paid"] {
  border-left-color: #2563EB;
}

.admin-form-card[data-status="preparing"] {
  border-left-color: #D97706;
}

.admin-form-card[data-status="completed"] {
  border-left-color: #059669;
}

.admin-form-card[data-status="cancelled"] {
  border-left-color: #A0978E;
  opacity: 0.7;
}

/* Order filter tabs */
.order-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.order-filter-tabs::-webkit-scrollbar { display: none; }

.order-filter-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1.5px solid var(--line, #ddd);
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #888);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-family: inherit;
}
.order-filter-tab:active { transform: scale(0.95); }
.order-filter-tab.is-active {
  border-color: var(--brand, #6366f1);
  background: var(--brand, #6366f1);
  color: #fff;
}
.order-filter-count {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
}

.admin-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-form-status select {
  margin-top: 0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  width: auto;
  min-width: 120px;
}

.admin-form-items {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.admin-item-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-right: 8px;
  vertical-align: middle;
}

.admin-item-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: start;
  list-style: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.admin-item-row:last-child {
  border-bottom: none;
}

.admin-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-item-info p {
  margin: 2px 0;
}

.admin-form-items:has(.admin-item-row) {
  padding-left: 0;
}

/* Admin styles moved to admin.css — see /assets/admin.css */

/* Floating Buttons */
.floating-request-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent-warm);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px var(--brand-shadow-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.floating-request-btn:hover {
  background: var(--accent-warm-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--brand-shadow-lg);
}

.floating-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.floating-nav-buttons {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.floating-nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}

.floating-nav-btn:active {
  transform: translateY(0);
}

/* Category & View Filters */
.category-filters {
  margin-top: 10px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.category-filters .btn-pill {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
}

.brand-filters {
  margin-top: 12px;
}

.brand-filters:empty::before {
  content: "";
}

.btn-pill.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px var(--brand-shadow-md);
}


.view-switch {
  margin-top: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #eef2e6;
  border: 1px solid #d9e0cc;
}

.view-switch__btn {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #5f6a55;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.view-switch__btn:hover {
  background: #e3ead6;
  color: #3f4936;
}

.view-switch__btn.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px var(--brand-shadow-md);
}

/* Promo Modal */
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(30, 28, 24, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
}

.promo-modal.hidden {
  display: none;
}

.promo-modal__content {
  max-width: 780px;
  width: 100%;
}

.promo-modal__content img {
  width: 100%;
  border-radius: 14px;
  display: block;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

/* Loading Overlay */
/* ── Loading overlay (centered bar) ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg-color);
  transition: opacity 500ms var(--ease-out-quart);
}
.loading-overlay.is-hiding {
  opacity: 0;
  pointer-events: none;
}
.loading-overlay.hidden {
  display: none;
}

/* ── Shared loading bar ── */
.loading-bar-wrap {
  width: min(200px, 50vw);
  height: 3px;
  background: var(--line, #e5e0d6);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar {
  width: 40%;
  height: 100%;
  background: var(--primary-color, #8A9A5B);
  border-radius: 2px;
  animation: loading-slide 1.2s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(-100%); }
}

/* ── Image loading bar (product detail) ── */
.detail-main-wrap .loading-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 0;
}
.detail-main-wrap.is-loaded .loading-bar-wrap { display: none; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .product-grid.product-grid--card {
    grid-template-columns: 1fr;
  }

  .product-grid.product-grid--2card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid.product-grid--list {
    grid-template-columns: 1fr;
  }

  .product-grid.product-grid--list .product-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
  }

  .product-grid.product-grid--list .product-card img {
    height: 100%;
    aspect-ratio: auto;
  }

  .product-grid.product-grid--list .product-card__body {
    justify-content: center;
  }

  .product-grid.product-grid--list .product-card__body .button {
    margin-top: 8px;
  }

  /* On touch devices, always show gallery nav */
  .product-card.has-gallery .product-card__nav {
    opacity: 1;
  }

  .request-item {
    grid-template-columns: 1fr;
  }

  .request-item__controls {
    grid-template-columns: 1fr;
  }

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

  .detail-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(61, 58, 53, 0.08);
    margin: 0;
    max-width: none;
  }

  .detail-add-btn {
    flex: 1;
    min-height: 44px;
  }

  /* Reserve space so content isn't hidden behind the fixed bar */
  body:has(.detail-actions) main {
    padding-bottom: 72px;
  }

  /* Push floating request btn above the fixed action bar */
  body:has(.detail-actions) .floating-request-btn {
    bottom: 76px;
  }

  .detail-main-wrap:hover .detail-main-image {
    transform: none;
  }

  .category-filters {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    align-content: start;
    padding-bottom: 6px;
  }

  .category-filters .btn-pill {
    padding: 5px 10px;
    font-size: 12px;
    min-width: max-content;
  }

  .product-card__body .button {
    min-height: 44px;
  }

  .floating-request-btn {
    min-height: 44px;
  }

  .request-item__controls {
    grid-template-columns: 1fr;
  }

  .request-form .btn-pill,
  .request-form .button {
    min-height: 44px;
  }

  .shipping-option {
    padding: 10px 0;
  }

  /* Admin mobile styles moved to admin.css */
}

/* Photo/recognize styles moved to admin.css */
