/* ぽねりあショップ 店舗側スタイル */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #26282b;
  --ink-soft: #6b6f76;
  --line: #e7e4dd;
  --accent: #d96f4e;
  --accent-dark: #c25a3a;
  --accent-soft: #fbeee9;
  --ok: #3a7d5d;
  --err: #b3392f;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px 20px; align-items: center;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand-mark {
  width: 14px; height: 14px; border: 3.5px solid var(--accent); border-radius: 50%;
  display: inline-block; transition: transform .35s ease;
}
.brand:hover .brand-mark { transform: rotate(180deg) scale(1.12); }
.header-search { display: flex; min-width: 0; }
.header-search input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-right: none;
  border-radius: 999px 0 0 999px; padding: 7px 16px; background: var(--surface); outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-search button {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 0 999px 999px 0; padding: 7px 16px;
}
.header-nav { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.nav-link, .nav-cart { font-size: 14px; color: var(--ink-soft); position: relative; }
.nav-link:hover, .nav-cart:hover { color: var(--ink); }
.cart-badge {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px;
}
@media (max-width: 640px) {
  .header-inner { grid-template-columns: auto auto; }
  .header-search { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- layout ---------- */
.site-main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.page-title { font-size: 22px; margin: 8px 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* ---------- flash ---------- */
.flash {
  max-width: 1080px; margin: 12px auto 0; padding: 10px 16px; border-radius: var(--radius);
  font-size: 14px; border: 1px solid;
}
.flash-success { background: #eef6f1; border-color: #cfe5d8; color: var(--ok); }
.flash-info { background: #f0f3f7; border-color: #d8dfe8; color: #41566e; }
.flash-error { background: #fbeeec; border-color: #efd2cd; color: var(--err); }
@media (max-width: 1112px) { .flash { margin-left: 16px; margin-right: 16px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: none; border-radius: 999px; padding: 10px 26px;
  background: var(--accent); color: #fff; font-weight: 700; text-align: center;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { display: block; width: 100%; }
.btn-ghost {
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line); font-weight: 500;
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { background: #c9c6bf; cursor: not-allowed; transform: none; }
.link-button { background: none; border: none; color: var(--ink-soft); padding: 0; text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: 36px 8px 28px; }
.hero-tagline { font-size: clamp(22px, 4.2vw, 32px); font-weight: 700; margin: 0 0 10px; letter-spacing: .02em; }
.hero-tagline .dot { color: var(--accent); }
.hero-description { color: var(--ink-soft); margin: 0; max-width: 560px; }

/* ---------- category chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 5px 14px; font-size: 13px; color: var(--ink-soft);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- product grid ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 14px; }
.section-head h2 { font-size: 18px; margin: 0; }
.product-grid {
  display: grid; gap: 18px 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
@media (max-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
.product-card { display: flex; flex-direction: column; gap: 6px; transition: transform .18s ease; }
.product-card:hover { transform: translateY(-3px); }
.product-thumb {
  aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: #f0eee8; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
  width: 26px; height: 26px; border: 6px solid #d9d5cb; border-radius: 50%;
}
.product-name {
  font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { font-weight: 700; }
.product-price .tax { font-size: 11px; color: var(--ink-soft); font-weight: 400; }
.product-soldout { color: var(--err); font-size: 12px; font-weight: 700; }
.product-low-stock { color: var(--accent-dark); font-size: 12px; }

/* ---------- product detail ---------- */
.product-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 32px; margin-top: 8px; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.gallery-main {
  aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: #f0eee8; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden; padding: 0;
  border: 2px solid var(--line); background: #fff;
}
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-category { font-size: 13px; color: var(--ink-soft); }
.detail-name { font-size: 22px; margin: 4px 0 10px; line-height: 1.45; }
.detail-price { font-size: 26px; font-weight: 700; }
.detail-price .tax { font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.detail-stock { margin: 6px 0 16px; font-size: 13px; color: var(--ink-soft); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty-control button { width: 38px; height: 38px; border: none; background: none; font-size: 17px; color: var(--ink-soft); }
.qty-control input {
  width: 44px; text-align: center; border: none; outline: none; background: none;
  -moz-appearance: textfield; appearance: textfield;
}
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.detail-description { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; white-space: normal; }
.detail-description h2 { font-size: 16px; }
.shipping-note { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 13px; color: var(--ink-soft); }

/* ---------- cart / tables ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 500; padding: 0 8px 8px; }
.cart-table td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.cart-item { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cart-item-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #f0eee8; flex-shrink: 0; border: 1px solid var(--line); }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-summary {
  margin-top: 20px; margin-left: auto; max-width: 360px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.summary-row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.free-shipping-note { font-size: 12px; color: var(--ok); }
.empty-state { text-align: center; padding: 60px 0; color: var(--ink-soft); }
.empty-state .brand-mark { width: 22px; height: 22px; border-width: 5px; border-color: #d9d5cb; margin-bottom: 12px; }

/* ---------- forms ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; max-width: 560px;
}
.form-card.narrow { max-width: 420px; margin: 0 auto; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.form-group label .req { color: var(--err); font-size: 11px; margin-left: 4px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="search"], .form-group input[type="tel"], .form-group input[type="number"],
.form-group select, .form-group textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  background: #fff; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-error { color: var(--err); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 12px; color: var(--ink-soft); }
.auth-links { margin-top: 16px; font-size: 13px; text-align: center; }
.auth-links a { color: var(--accent-dark); text-decoration: underline; }

/* ---------- checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; position: sticky; top: 76px; }
.checkout-summary h2 { font-size: 15px; margin: 0 0 12px; }
.checkout-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.payment-options { display: grid; gap: 10px; }
.payment-option {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; background: #fff; cursor: pointer;
}
.payment-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.payment-option input { margin-top: 4px; }
.payment-option .pay-title { font-weight: 700; font-size: 14px; }
.payment-option .pay-desc { font-size: 12px; color: var(--ink-soft); }

/* ---------- order complete / detail ---------- */
.order-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 640px; }
.order-panel h2 { font-size: 16px; margin: 20px 0 8px; }
.order-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.status-pill { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 12px; font-weight: 700; }
.status-pending { background: #fdf3e4; color: #9a6b1f; }
.status-paid { background: #e8f3ed; color: var(--ok); }
.status-shipped { background: #e9eff8; color: #3c5f8f; }
.status-canceled { background: #f1f1f0; color: var(--ink-soft); }
.bank-info { background: var(--accent-soft); border: 1px solid #efd2c5; border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.order-items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.order-items-table td { padding: 8px 4px; border-top: 1px solid var(--line); }
.order-items-table td:last-child { text-align: right; white-space: nowrap; }

/* ---------- account ---------- */
.account-orders { width: 100%; border-collapse: collapse; font-size: 14px; }
.account-orders th { text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 500; padding: 0 8px 8px; }
.account-orders td { padding: 12px 8px; border-top: 1px solid var(--line); }
.account-nav { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; font-size: 14px; }

/* ---------- pages ---------- */
.page-body { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 28px 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.footer-nav a { color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }
.footer-note { font-size: 12px; color: var(--ink-soft); margin: 14px 0 0; }
