/* ==========================================
   全ページ共通・ベーススタイル
   ========================================== */
body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  margin: 0;
  background: #f7f8fa;
  color: #333;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  background: #0f172a;
  color: #fff;
  padding: 16px 20px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 {
  margin: 0;
  font-size: 1.3rem;
}
header h1 a {
  color: #fff;
}
.cart-btn {
  background: #f59e0b;
  color: #111;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cart-btn:hover {
  background: #d97706;
  color: #fff;
}

/* フッター共通 */
footer {
  background: #2563eb;
  color: #FFF;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================
   index.php 専用レイアウト (2カラム)
   ========================================== */
.wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 12px;
  display: flex;
  gap: 20px;
}
aside {
  width: 240px;
  flex-shrink: 0;
}
.side-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.side-box h3 {
  font-size: 0.9rem;
  background: #1e293b;
  color: #fff;
  margin: -14px -14px 10px -14px;
  padding: 10px 12px;
  border-radius: 6px 6px 0 0;
}
.side-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-menu li {
  border-bottom: 1px solid #f1f5f9;
}
.side-menu li a {
  display: block;
  padding: 9px 8px;
  color: #334155;
  text-decoration: none;
  font-size: 0.88rem;
}
.side-menu li a:hover, .side-menu li a.active {
  background: #f1f5f9;
  color: #2563eb;
  font-weight: bold;
  padding-left: 12px;
  transition: 0.2s;
}
main {
  flex: 1;
  min-width: 0;
}
.main-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: #1e40af;
  line-height: 1.5;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.img-container {
  position: relative;
  width: 100%;
  height: 160px;
  background: #f1f5f9;
}
.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
}
.soldout-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.soldout-badge {
  border: 2px solid #ef4444;
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
  padding: 5px 14px;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 0.1em;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.prod-cat {
  font-size: 0.72rem;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 4px;
}
.prod-name {
  font-size: 0.95rem;
  font-weight: bold;
  margin: 2px 0 6px;
  color: #0f172a;
  line-height: 1.3;
}
.prod-price {
  font-size: 1.1rem;
  color: #dc2626;
  font-weight: bold;
  margin-bottom: 4px;
}
.prod-stock {
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 10px;
}
.buy-form {
  display: flex;
  gap: 4px;
  align-items: center;
}
select {
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.85rem;
}
button {
  flex: 1;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 7px 10px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.85rem;
}
button:hover {
  background: #1d4ed8;
}
.soldout-text {
  background: #94a3b8;
  color: #fff;
  text-align: center;
  padding: 7px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.8rem;
}

/* ==========================================
   カート・注文・確認・完了ページ共通コンテナ
   ========================================== */
.container {
  max-width: 860px;
  margin: 28px auto;
  background: #fff;
  padding: 28px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  box-sizing: border-box;
}
.alert {
  background: #dcfce7;
  color: #166534;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 18px;
  border: 1px solid #86efac;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
th, td {
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
}
th {
  background: #f8fafc;
  font-size: 0.9rem;
}
.num {
  text-align: right;
}
.btn-del {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
}
.summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 18px;
  border-radius: 6px;
  max-width: 360px;
  margin-left: auto;
  margin-bottom: 24px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.summary-total {
  border-top: 1px solid #cbd5e1;
  padding-top: 10px;
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.2rem;
}
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-back {
  background: #64748b;
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  text-align: center;
}
.btn-next, .btn-submit {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}
.btn-next:hover, .btn-submit:hover {
  background: #1d4ed8;
}
.btn-submit {
  background: #16a34a;
}
.btn-submit:hover {
  background: #15803d;
}

/* フォーム関連 (order.php) */
.form-group {
  margin-bottom: 16px;
}
label {
  display: block;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 0.95rem;
}
.row {
  display: flex;
  gap: 16px;
}
.row .form-group {
  flex: 1;
}
.shipping-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 16px;
  border-radius: 6px;
  margin-top: 12px;
  display: none;
}
.info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.success-icon {
  font-size: 3rem;
  color: #16a34a;
  margin-bottom: 12px;
  text-align: center;
}
.order-num {
  background: #f1f5f9;
  padding: 14px;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 20px 0;
  text-align: center;
}
.btn-home {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 20px;
}
.btn-home:hover {
  background: #1d4ed8;
}

/* PC / SP 表示切り替え用クラス */
.sp { display: none !important; }
.pc { display: block !important; }

/* ==========================================
   レスポンシブ (スマホ表示)
   ========================================== */
@media(max-width: 768px) {
  body { padding: 0; }
  .wrapper { flex-direction: column; padding: 0 8px; }
  
  .top-nav-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-nav-inner a { min-height: 44px; }
  .wrapper { flex-direction: column; }

  
  
  
  aside { width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .img-container { height: 120px; }
  .card-body { padding: 8px; }
  .prod-name { font-size: 0.85rem; }
  .prod-price { font-size: 0.95rem; }
  select { padding: 4px; font-size: 0.78rem; }
  button { padding: 6px 4px; font-size: 0.78rem; }
  aside { order: 1; }
  main { order: 2; }

  .container { padding: 16px; margin: 12px 8px; }
  .row { display: block; gap: 0; }
  .row .form-group { margin-bottom: 16px; }
  .actions { flex-direction: column-reverse; width: 100%; }
  .btn-back, .btn-next, .btn-submit { width: 100%; text-align: center; box-sizing: border-box; font-size: 1rem; }

  .sp { display: block !important; }
  .pc { display: none !important; }
}

/* ==========================================
   トップナビゲーション
   ========================================== */
.top-nav { width: 100%; background: #2563eb; color: #fff; }
.top-nav-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.top-nav-inner a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 8px; color: #fff; text-align: center; font-weight: bold; box-sizing: border-box; border: 1px solid #fff; transition: background .2s; }
.top-nav-inner a:hover { background: #1d4ed8; }

/* ==========================================
   フッター
   ========================================== */
footer { width: 100%; background: #2563eb; color: #fff; text-align: left; padding: 32px 16px 18px; box-sizing: border-box; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-main { display: flex; align-items: stretch; gap: 32px; padding-bottom: 26px; }
.footer-brand { width: 230px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-right: 1px solid #fff; padding-right: 24px; box-sizing: border-box; }
.footer-brand img { display: block; width: 160px; max-width: 100%; height: auto; }
.footer-links { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-link-column { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #fff; text-decoration: none; font-size: .9rem; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { text-align: center; border-top: 1px solid #333; padding-top: 16px; color: #fff; font-size: .82rem; }

@media (max-width: 768px) {
  .top-nav-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-nav-inner a { min-height: 44px; }
  .wrapper { flex-direction: column; }
  main { order: 2; }
  aside { order: 1; }
  footer { padding: 26px 16px 16px; }
  .footer-main { flex-direction: column; gap: 22px; }
  .footer-brand { width: 100%; border-right: 0; border-bottom: 1px solid #fff; padding: 0 0 20px; }
  .footer-links { gap: 18px; }
  .footer-link-column { gap: 10px; }
}
@media (max-width: 420px) {
  .footer-links { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-links a { font-size: .82rem; }
}

/* ==========================================
   FAQページ
   ========================================== */
.faq-wrapper { align-items: flex-start; }
.faq-main { flex: 1; min-width: 0; }
.faq-heading {
  display: flex; align-items: center; gap: 14px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 18px 20px; margin-bottom: 24px;
}
.faq-heading-icon {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #2563eb; color: #fff; font-size: 1.35rem;
}
.faq-heading h2 { margin: 0 0 5px; color: #1e3a8a; font-size: 1.3rem; }
.faq-heading p { margin: 0; color: #475569; font-size: .88rem; line-height: 1.6; }
.faq-section { margin-bottom: 24px; }
.faq-section > h3 {
  margin: 0 0 12px; padding: 0 0 8px; font-size: 1.05rem;
  color: #1e293b; border-bottom: 2px solid #2563eb;
}
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: #fff; border: 1px solid #dbe3ee; border-radius: 8px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.faq-question {
  display: flex; align-items: center; gap: 11px; padding: 15px 16px;
  color: #334155; font-weight: 600; background: #fff;
}
.faq-question-icon { color: #2563eb; font-size: 1.1rem; flex-shrink: 0; }
.faq-question-text { flex: 1; line-height: 1.55; }
.faq-answer {
  display: flex; align-items: flex-start; gap: 11px; padding: 15px 16px;
  background: #eff6ff; border-top: 1px solid #dbeafe; color: #334155;
}
.faq-answer-icon { color: #2563eb; font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.faq-answer p { margin: 0; font-size: .9rem; line-height: 1.8; }
.faq-contact {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 30px; padding: 18px; background: #fff;
  border: 1px solid #bfdbfe; border-radius: 10px;
}
.faq-contact-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: #dbeafe;
  color: #2563eb; font-size: 1.15rem; flex-shrink: 0;
}
.faq-contact > div:nth-child(2) { flex: 1; min-width: 180px; }
.faq-contact h3 { margin: 0 0 4px; font-size: .95rem; color: #1e293b; }
.faq-contact p { margin: 0; font-size: .82rem; color: #64748b; }
.faq-contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #2563eb; color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: bold; font-size: .85rem; white-space: nowrap;
}
.faq-contact-btn:hover { background: #1d4ed8; }
@media (max-width: 768px) {
  .faq-heading { padding: 14px; gap: 10px; }
  .faq-heading-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.15rem; }
  .faq-heading h2 { font-size: 1.1rem; }
  .faq-heading p { font-size: .8rem; }
  .faq-question { padding: 13px 12px; gap: 9px; }
  .faq-answer { padding: 13px 12px; gap: 9px; }
  .faq-answer p { font-size: .84rem; }
  .faq-contact { gap: 10px; padding: 14px; }
  .faq-contact-btn { width: 100%; box-sizing: border-box; }
}

/* ==========================================
   会社概要・特定商取引法・個人情報保護方針ページ
   ========================================== */
.legal-main {
  flex: 1;
  min-width: 0;
}
.legal-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #1e3a8a;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.legal-heading-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e3a8a;
  color: #fff;
  font-size: 1.25rem;
}
.legal-heading h2 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.25rem;
}
.legal-heading p {
  margin: 0;
  color: #475569;
  font-size: .86rem;
  line-height: 1.5;
}
.legal-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.legal-table th,
.legal-table td {
  border: 1px solid #cbd5e1;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  font-size: .9rem;
  line-height: 1.7;
}
.legal-table th {
  width: 28%;
  background: #f1f5f9;
  color: #1e293b;
  font-weight: bold;
}
.legal-table td {
  background: #fff;
  color: #334155;
}
.legal-document .legal-lead {
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: .9rem;
  line-height: 1.8;
  color: #334155;
}
.legal-section {
  margin-bottom: 22px;
}
.legal-section h3 {
  margin: 0 0 8px;
  padding: 6px 12px;
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  font-size: .98rem;
  color: #0f172a;
}
.legal-section p {
  margin: 0 0 8px;
  font-size: .88rem;
  line-height: 1.8;
  color: #334155;
}
.legal-section ul {
  margin: 6px 0 0;
  padding-left: 22px;
  font-size: .88rem;
  line-height: 1.8;
  color: #334155;
}
.legal-contact-box {
  margin-top: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: .88rem;
  line-height: 1.7;
  color: #1e293b;
}
.legal-date {
  margin: 24px 0 0;
  text-align: right;
  font-size: .85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .legal-heading {
    padding: 14px;
    gap: 10px;
  }
  .legal-heading-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 1.1rem;
  }
  .legal-heading h2 {
    font-size: 1.1rem;
  }
  .legal-card {
    padding: 14px;
  }
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: .85rem;
  }
  .legal-table th {
    border-bottom: none;
  }
  .legal-table td {
    border-top: none;
    margin-bottom: 10px;
  }
}


/* ==========================================
   商品を売りたい方ページ (縦型フロー)
   ========================================== */
.sell-flow-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}
.sell-step-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.sell-step-badge {
  background: #2563eb;
  color: #fff;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  text-align: center;
}
.sell-step-content {
  flex: 1;
}
.sell-step-content h3 {
  margin: 0 0 6px;
  color: #1e293b;
  font-size: 1.05rem;
}
.sell-step-content p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.7;
}
.sell-flow-arrow {
  text-align: center;
  color: #2563eb;
  font-size: 1.2rem;
  margin: -4px 0;
}

@media (max-width: 768px) {
  .sell-step-card {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  .sell-step-badge {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==========================================
   サイドバーバナー画像
   ========================================== */
.side-banner {
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}
.side-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}