/*
 * custom-order.css
 * Lightning子テーマ カスタムオーダーページ専用スタイル
 */

/* ============================================================
   ヒーローセクション
   ============================================================ */
.co-hero {
  width: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.co-hero-img {
  max-width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 600px) {
  .co-hero { padding: 28px 16px; }
  .co-hero-img { width: 100%; }
}

/* ── CSS変数 ── */
#custom-order-root {
  --co-cream:      #f7f4eb;
  --co-warm:       #f0ece4;
  --co-blush:      #e0d8cc;
  --co-border:     #111111;
  --co-rose:       #c9967a;
  --co-deep-rose:  #9e6b52;
  --co-sage:       #8a9e8c;
  --co-dark:       #111111;
  --co-mid:        #111111;
  --co-light:      #888888;
  --co-shadow:     0 4px 24px rgba(0,0,0,0.08);

  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  background: #ffffff;
  color: var(--co-dark);
  user-select: none;
  -webkit-user-select: none;
}

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Zen+Kaku+Gothic+New:wght@300;400&display=swap');

/* ── ステップバー ── */
/* PCではサマリーバー非表示 */
.co-summary-bar { display: none; }
.co-steps-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.co-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--co-light);
  letter-spacing: 0.06em;
  padding: 4px 0;
}
.co-step.active { color: var(--co-deep-rose); }
.co-step.done   { color: var(--co-sage); }
.co-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.co-step.active .co-step-num { background: var(--co-deep-rose); color: #fff; border-color: var(--co-deep-rose); }
.co-step.done   .co-step-num { background: var(--co-sage); color: #fff; border-color: var(--co-sage); }
.co-step-arrow {
  margin: 0 12px;
  color: var(--co-blush);
  font-size: 1rem;
}

/* ── 2カラムレイアウト ── */
.co-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: start;
  min-height: 80vh;
}

/* ── 左パネル ── */
.co-left {
  padding: 36px 36px 60px;
}

/* ── カテゴリタブ ── */
.co-cat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.co-cat-tab {
  padding: 6px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--co-border);
  background: transparent;
  color: var(--co-mid);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  text-transform: uppercase;
}
.co-cat-tab:hover {
  border-color: #aaaaaa;
  color: #555;
}
.co-cat-tab.active {
  background: #999999;
  border-color: #999999;
  color: #fff;
}

/* ── セクション ── */
.co-section {
  margin-bottom: 52px;
}
.co-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--co-border);
  flex-wrap: wrap;
}
.co-section-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: #111111;
  line-height: 1;
}
.co-section-title {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--co-dark);
  padding-left: 10px;
  border-left: 2px solid var(--co-border);
  line-height: 1.4;
}
.co-section-note {
  font-size: 0.72rem;
  color: #d9604a;
  margin-left: auto;
  letter-spacing: 0.04em;
}

/* ── 画像グリッド ── */
.co-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ── カード ── */
.co-card {
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid transparent;
  overflow: hidden;
  background: transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
}
.co-card:hover {
  transform: translateY(-2px);
}
.co-card.selected {
  border-color: #999999;
  box-shadow: 0 0 0 3px rgba(153,153,153,0.2);
}
/* 土台カード：✓ マーク */
.co-card.base-card.selected::after {
  content: '✓';
  position: absolute;
  top: 5px; right: 6px;
  width: 18px; height: 18px;
  background: #999999;
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}
/* 花びらカード：数字バッジ */
.co-badge {
  display: none;
  position: absolute;
  top: 5px; right: 6px;
  width: 18px; height: 18px;
  background: #999999;
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  align-items: center; justify-content: center;
  font-weight: bold;
  z-index: 1;
}
.co-card.petal-card.selected .co-badge { display: flex; }

/* 画像ラッパー */
.co-card-img-wrap {
  position: relative;
  width: 100%;
}
.co-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
/* 画像未設定時のプレースホルダー */
.co-card-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--co-warm), var(--co-blush));
  gap: 4px;
  border-radius: 8px;
}
.co-card-placeholder .ph-icon { font-size: 1.6rem; opacity: 0.65; }
.co-card-placeholder .ph-text { font-size: 0.58rem; color: var(--co-mid); letter-spacing: 0.04em; }

.co-card-label {
  padding: 6px 8px 2px;
  font-size: 0.68rem;
  color: #222;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-card.selected .co-card-label {
  color: #222;
}

/* ── 価格表示 ── */
.co-card-price {
  padding: 0 8px 6px;
  font-size: 0.72rem;
  color: #222;
  text-align: center;
  letter-spacing: 0.04em;
  font-family: 'Cormorant Garamond', serif;
}
.co-card.soldout .co-card-price {
  color: var(--co-light);
}

/* ── 在庫切れオーバーレイ ── */
.co-card.soldout {
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.co-soldout-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.55);
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px;
}
.co-card.soldout .co-soldout-overlay {
  display: flex;
}
.co-soldout-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.co-soldout-badge {
  background: rgba(120, 120, 120, 0.75);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.co-restock-btn {
  pointer-events: all;
  cursor: pointer;
  background: #fff;
  color: #888;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.42rem;
  padding: 3px 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.2s;
  font-family: inherit;
}
.co-restock-btn:hover {
  background: #f5f5f5;
}
.co-card.soldout .co-card-label {
  color: var(--co-light);
}

/* ── 再入荷通知モーダル ── */
.co-restock-modal {
  position: fixed;
  inset: 0;
  background: rgba(58, 46, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.co-restock-modal-inner {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 28px;
  width: 320px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(58,46,40,0.18);
  user-select: text;
  -webkit-user-select: text;
}
.co-restock-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--co-light);
  cursor: pointer;
  line-height: 1;
}
.co-restock-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--co-dark);
  margin: 0 0 8px;
}
.co-restock-item {
  font-size: 0.78rem;
  color: var(--co-mid);
  margin: 0 0 16px;
}
.co-restock-modal-inner .co-submit-btn {
  width: 100%;
  margin-top: 4px;
  display: block;
}
.co-restock-submit-btn {
  width: 100%;
  padding: 14px;
  background: #888;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}
.co-restock-submit-btn:hover:not(:disabled) { background: #666; }
.co-restock-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── 花びら選択数インジケーター ── */
.co-petal-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: var(--co-mid);
}
.co-count-dots { display: flex; gap: 5px; }
.co-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--co-border);
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}
.co-dot.filled { background: #999999; border-color: #999999; }

/* ── フォーム ── */
.co-form-box {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--co-border);
}
.co-form-row { margin-bottom: 18px; }
.co-label {
  display: block;
  font-size: 0.78rem;
  color: var(--co-mid);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.co-label .req { color: var(--co-rose); font-size: 0.7rem; margin-left: 2px; }
.co-input:not(select),
.co-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--co-border);
  border-radius: 8px;
  background: var(--co-cream);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--co-dark);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
  user-select: text;
  -webkit-user-select: text;
}
.co-input[type="select"],
select.co-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--co-border);
  border-radius: 8px;
  background: var(--co-cream);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--co-dark);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: auto;
  appearance: auto;
  cursor: pointer;
}
.co-input:focus,
.co-textarea:focus { border-color: var(--co-rose); }
.co-textarea { resize: vertical; min-height: 90px; }

/* ── 刻印ステップ ── */
.co-engrave-options {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.co-engrave-btn {
  padding: 6px 28px;
  border-radius: 20px;
  border: 1.5px solid var(--co-border);
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--co-mid);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  letter-spacing: 0.06em;
}
.co-engrave-btn:hover {
  border-color: #aaaaaa;
  color: #555;
}
.co-engrave-btn.selected {
  background: #999999;
  border-color: #999999;
  color: #fff;
}
.co-engrave-input-wrap {
  transition: opacity 0.2s;
}
.co-engrave-input-wrap.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.co-engrave-char-limit {
  font-size: 0.78rem;
  color: #cc0000;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.co-engrave-price-note {
  font-size: 0.72rem;
  color: #111;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.co-engrave-notice {
  font-size: 0.7rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f9f7f4;
  border-left: 2px solid var(--co-border);
  border-radius: 0 6px 6px 0;
  letter-spacing: 0.03em;
}
.co-engrave-char-note {
  font-size: 0.68rem;
  color: #888;
  margin-top: 4px;
}

.co-form-message {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  line-height: 1.6;
}
.co-form-message.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
}
.co-form-message.error {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fda4af;
}

.co-submit-btn {
  width: 100%;
  padding: 14px;
  background: #999999;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
.co-submit-btn:hover:not(:disabled) { background: #777777; transform: translateY(-1px); }
.co-submit-btn:active:not(:disabled) { transform: translateY(0); }
.co-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── 右パネル（fixed）── */
.co-right {
  background: #fff;
  border-left: 1px solid var(--co-border);
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 22px;
  padding-top: 36px;
  z-index: 100;
  box-sizing: border-box;
}
/* ヒーローを過ぎた後は不要（stickyで自動対応） */
.co-right.hero-passed {
  padding-top: 28px;
}

.co-preview-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: var(--co-dark);
  margin: 0 0 2px;
}
.co-preview-subtitle {
  font-size: 0.7rem;
  color: var(--co-light);
  letter-spacing: 0.06em;
  margin: 0 0 18px;
}

/* ── プレビューブロック（土台・花びら 2枠） ── */
.co-preview-block {
  width: 100%;
  margin-bottom: 8px;
}
.co-preview-wrap {
  width: 100%;
  background: transparent;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.co-preview-wrap-petal {
  margin-top: 8px;
}
#preview-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}
#petal-preview-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}
.co-preview-zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.6rem;
  color: var(--co-light);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.co-preview-wrap:hover .co-preview-zoom-hint { opacity: 1; }

/* ── プレビューモーダル ── */
.co-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

/* モーダル表示中は固定要素を全て非表示 */
body.co-modal-open .co-summary-bar,
body.co-modal-open .l-footer__fixedBottom,
body.co-modal-open .c-fixedFooter,
body.co-modal-open [class*="fixedFooter"],
body.co-modal-open [class*="fixed-footer"],
body.co-modal-open [class*="sticky-footer"] {
  display: none !important;
}
/* モーダル以外の固定要素をモーダルの下に */
body.co-modal-open *[style*="position: fixed"]:not(.co-modal-overlay):not(#wpadminbar),
body.co-modal-open *[style*="position:fixed"]:not(.co-modal-overlay):not(#wpadminbar) {
  z-index: 1 !important;
}
.co-modal-overlay.open {
  display: flex;
}
.co-modal-inner {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.2);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}
#modal-preview-canvas {
  display: block;
  width: min(560px, 80vw);
  height: auto;
}
#modal-petal-canvas {
  display: block;
  width: min(560px, 80vw);
  height: auto;
}
.co-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--co-mid);
  line-height: 1;
  padding: 4px 8px;
}
.co-modal-close:hover { color: var(--co-deep-rose); }
.co-preview-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--co-light);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  line-height: 2;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  white-space: nowrap;
}
.co-preview-icon { display: none; }

/* ── プレビュー価格表示 ── */
.co-preview-price {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #222;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  min-height: 1.6em;
}

.co-summary { margin-top: 8px; }
.co-summary-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.78rem;
}
.co-summary-label {
  color: var(--co-light);
  min-width: 54px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}
.co-summary-value {
  color: var(--co-dark);
  word-break: break-all;
  flex: 1;
}
.co-tag {
  display: inline-block;
  background: var(--co-blush);
  color: var(--co-deep-rose);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.68rem;
  margin: 1px 2px 1px 0;
  letter-spacing: 0.03em;
}

.co-divider {
  height: 1px;
  background: var(--co-blush);
  margin: 16px 0;
}
.co-preview-note {
  font-size: 0.68rem;
  color: var(--co-light);
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ── スクロールバー ── */
#custom-order-root ::-webkit-scrollbar { width: 4px; }
#custom-order-root ::-webkit-scrollbar-track { background: transparent; }
#custom-order-root ::-webkit-scrollbar-thumb { background: var(--co-blush); border-radius: 4px; }

/* ── スマホ用ミニプレビュー（PC時は非表示）── */
.co-mini-preview { display: none; }

/* ── レスポンシブ ── */
@media (max-width: 480px) {
  .co-layout { grid-template-columns: 1fr; }
  .co-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .co-left { padding: 20px 16px 40px; }

  /* ステップバー：JSでtop値を動的制御 */
  /* スマホ：選択サマリーバー */
  .co-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 6px 12px;
    background: #fff;
    border-bottom: 1px solid var(--co-border);
    box-shadow: 0 2px 8px rgba(58,46,40,0.08);
    box-sizing: border-box;
    gap: 10px;
  }
  .co-summary-bar-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .co-summary-bar-text {
    font-size: 0.66rem;
    color: #444;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .co-summary-bar-bottom {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
    width: 100%;
  }
  .co-summary-bar-ringsize {
    font-size: 0.66rem;
    color: #666;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  .co-summary-bar-price {
    font-size: 0.74rem;
    color: var(--co-deep-rose);
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
  }
  .co-summary-bar-preview {
    position: relative;
    width: 60px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
  }
  #mini-preview-canvas {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 0.5px solid #ccc;
    background: #ffffff;
    display: block;
    flex-shrink: 0;
  }
  #mini-petal-canvas {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 0.5px solid #ccc;
    background: #ffffff;
    display: block;
    flex-shrink: 0;
  }
  .co-mini-preview-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.18rem;
    opacity: 0.6;
    pointer-events: none;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    letter-spacing: 0.04em;
    color: #999;
    white-space: nowrap;
    text-align: center;
  }
  .co-mini-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 68px;
    height: 76px;
    flex-shrink: 0;
    position: relative;
  }
  .co-mini-price {
    font-size: 0.56rem;
    color: var(--co-deep-rose);
    letter-spacing: 0.03em;
    margin-top: 2px;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    height: 14px;
    line-height: 14px;
  }

  /* PC用右パネルは非表示 */
  .co-right { display: none; }

  /* スマホ：サマリーバーの横並びプレビュー */
  .co-summary-bar-previews {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
  }
}

/* ── カートに追加ボタン ── */
.co-add-to-cart-wrap {
  margin: 0 0 40px;
  text-align: center;
}
.co-add-to-cart-btn {
  padding: 12px 40px;
  background: transparent;
  border: 1.5px solid var(--co-border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--co-dark);
  transition: background 0.18s, color 0.18s;
}
.co-add-to-cart-btn:hover {
  background: #111;
  color: #fff;
}
.co-add-to-cart-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── カートエリア ── */
.co-cart-empty {
  font-size: 0.8rem;
  color: #aaa;
  text-align: center;
  padding: 20px 0;
  letter-spacing: 0.04em;
}
.co-cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.co-cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--co-border);
  border-radius: 10px;
  background: #fff;
}
.co-cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: #f5f5f5;
}
.co-cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.co-cart-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--co-dark);
}
.co-cart-item-detail {
  font-size: 0.68rem;
  color: #888;
  letter-spacing: 0.03em;
}
.co-cart-item-price {
  font-size: 0.78rem;
  color: var(--co-dark);
  letter-spacing: 0.03em;
}
.co-cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.co-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.co-cart-qty-btn {
  width: 22px; height: 22px;
  border: 1px solid var(--co-border);
  border-radius: 50%;
  background: transparent;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.co-cart-qty-btn:hover { background: #111; color: #fff; }
.co-cart-qty-num {
  font-size: 0.82rem;
  min-width: 18px;
  text-align: center;
}
.co-cart-delete-btn {
  font-size: 0.65rem;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
  padding: 0;
  text-decoration: underline;
}
.co-cart-delete-btn:hover { color: #cc0000; }
.co-cart-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--co-border);
}
.co-cart-total-label {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #888;
}
.co-cart-total-price {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--co-dark);
}

/* ── 製作期間注記 ── */
.co-production-note {
  font-size: 0.72rem;
  color: #888;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  text-align: center;
}

/* ── 号数選択 ── */
.co-ring-size-wrap {
  padding: 4px 0 8px;
}
.co-ring-size-select {\n  max-width: 160px;\n  margin-top: 6px;\n  border-color: #ccc !important;\n  color: #999 !important;\n  background-color: #fafafa !important;\n  /* iOSでネイティブプルダウンを有効にする */\n  -webkit-appearance: auto;\n  appearance: auto;\n  cursor: pointer;\n  pointer-events: auto;\n  position: relative;\n  z-index: 1;\n}
.co-ring-size-note {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 8px;
  letter-spacing: 0.03em;
}

/* ── 号数調整不可表記 ── */
.co-ring-size-not-adjustable {
  font-size: 0.75rem;
  color: #d9604a;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

/* ── スマホサマリーバー Preview ラベル ── */
.co-summary-bar-preview-label {
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-size: 0.5rem;
  opacity: 0.35;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   送信中ポップアップオーバーレイ（ローディング画面スタイル）
   ============================================================ */
#co-submit-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#co-submit-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* フェードアウト */
#co-submit-overlay.fadeout {
  opacity: 0;
  transition: opacity 1s ease;
}

/* ロゴ */
#co-submit-overlay .co-overlay-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

#co-submit-overlay.visible .co-overlay-logo-wrap {
  opacity: 1;
  transform: translateY(0);
}

#co-submit-overlay .co-overlay-logo {
  width: 320px;
  height: 320px;
  object-fit: contain;
}

/* sending... ドットアニメーション */
#co-submit-overlay .co-overlay-sending {
  display: flex;
  align-items: baseline;
  opacity: 0;
  transition: opacity 0.9s ease 0.3s;
}
#co-submit-overlay.visible .co-overlay-sending {
  opacity: 1;
}
#co-submit-overlay .co-overlay-sending-text {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: #b5a89e;
  font-family: 'Cormorant Garamond', 'Zen Kaku Gothic New', serif;
  text-transform: uppercase;
}
#co-submit-overlay .co-overlay-dot {
  font-size: 0.72rem;
  color: #b5a89e;
  font-family: 'Cormorant Garamond', 'Zen Kaku Gothic New', serif;
  opacity: 0;
}
#co-submit-overlay .co-overlay-dot-1 {
  animation: co-dot-fade 1.2s ease-in-out infinite 0s;
}
#co-submit-overlay .co-overlay-dot-2 {
  animation: co-dot-fade 1.2s ease-in-out infinite 0.4s;
}
#co-submit-overlay .co-overlay-dot-3 {
  animation: co-dot-fade 1.2s ease-in-out infinite 0.8s;
}
@keyframes co-dot-fade {
  0%, 100% { opacity: 0; }
  30%, 70%  { opacity: 1; }
}

/* =====================================================
   Instagram フローティングボタン
   ===================================================== */
.co-insta-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.co-insta-fab:hover {
  transform: scale(1.10);
  box-shadow: 0 6px 22px rgba(0,0,0,0.24);
}
.co-insta-fab img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.co-insta-fab-text {
  font-family: serif;
  font-size: 11px;
  font-weight: bold;
  color: #b5845a;
  letter-spacing: 0.05em;
}

/* スマホ：サマリーバーと重ならないよう少し上に */
@media (max-width: 480px) {
  .co-insta-fab {
    bottom: 90px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .co-insta-fab img {
    width: 34px;
    height: 34px;
  }
}
