/* assets/cart-panel.css — assets/cart-panel.js と対（2026-12-01 第1便 A5）
   トップのカート（index.html の .cart-panel）と同じ見た目の考え方：右から出る板・行＋1px 罫線・カードにしない。
   色は商品ページの変数（--paper --ink …）を使い、無いページでは tokens.css と同じ値に落ちる。 */
html.wcp-lock, html.wcp-lock body { overflow: hidden; }
.wcp-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(33, 30, 26, .45); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.wcp-overlay.open { opacity: 1; pointer-events: auto; }
.wcp-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: min(420px, 100vw); display: flex; flex-direction: column;
  background: var(--paper, #F8F7F2); color: var(--ink, #211E1A);
  font-family: var(--f-sans, 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif);
  transform: translateX(102%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  visibility: hidden;
}
.wcp-panel.open { transform: translateX(0); visibility: visible; }
.wcp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--rule, #D9D5CA);
}
.wcp-title { font-size: 17px; font-weight: 500; letter-spacing: 1px; margin: 0; }
.wcp-count { font-size: 13px; font-weight: 400; color: var(--ink-soft, #46433D); margin-left: 6px; letter-spacing: 0; }
.wcp-close {
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 18px; color: var(--ink-soft, #46433D);
}
.wcp-items { flex: 1; overflow-y: auto; padding: 4px 24px; overscroll-behavior: contain; }
.wcp-empty { padding: 64px 0; text-align: center; font-size: 14px; color: var(--ink-soft, #46433D); }
.wcp-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 16px 0; border-bottom: 1px solid var(--border-light, #E4E1D7);
}
.wcp-item img, .wcp-noimg { width: 64px; height: 64px; object-fit: cover; background: var(--paper-2, #EDEBE3); display: block; }
.wcp-name { font-size: 14px; font-weight: 500; line-height: 1.5; }
.wcp-size { font-size: 12px; color: var(--ink-soft, #46433D); }
.wcp-price { font-size: 14px; font-variant-numeric: tabular-nums; margin: 2px 0 8px; }
.wcp-qty { display: flex; align-items: center; gap: 4px; }
.wcp-qty button {
  width: 36px; height: 36px; background: none; border: 1px solid var(--rule, #D9D5CA);
  font-size: 15px; color: inherit; cursor: pointer; line-height: 1;
}
.wcp-qty span { min-width: 28px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.wcp-sel { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink-soft, #46433D); }
.wcp-sel select {
  font-family: inherit; font-size: 13px; color: var(--ink, #211E1A); background: transparent;
  border: 1px solid var(--rule, #D9D5CA); padding: 6px 8px; min-height: 36px;
}
.wcp-remove {
  width: 40px; height: 40px; margin: -8px -10px 0 0; background: none; border: 0; cursor: pointer;
  font-size: 14px; color: var(--ink-soft, #46433D);
}
.wcp-foot { border-top: 1px solid var(--rule, #D9D5CA); padding: 16px 24px calc(18px + env(safe-area-inset-bottom)); }
.wcp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--ink-soft, #46433D); margin-bottom: 4px; }
.wcp-row .v { font-size: 15px; color: var(--ink, #211E1A); font-variant-numeric: tabular-nums; }
.wcp-disc { color: var(--kohaku-text, #574021); }
.wcp-disc .v { color: var(--kohaku-text, #574021); }
.wcp-hint { font-size: 12px; color: var(--ink-soft, #46433D); margin: 0 0 4px; }
.wcp-grand { border-top: 1px solid var(--rule, #D9D5CA); padding-top: 10px; margin-top: 8px; color: var(--ink, #211E1A); font-weight: 500; }
.wcp-grand .v { font-size: 22px; font-weight: 400; }
.wcp-note { font-size: 11.5px; line-height: 1.8; color: var(--ink-soft, #46433D); margin: 10px 0 12px; }
.wcp-checkout {
  width: 100%; min-height: 50px; background: var(--ink, #211E1A); color: var(--paper, #F8F7F2);
  border: 1px solid var(--ink, #211E1A); font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: 2px; cursor: pointer;
}
.wcp-checkout:hover { background: var(--roast, #57351F); border-color: var(--roast, #57351F); }
.wcp-checkout:disabled { opacity: .6; cursor: wait; }
.wcp-continue {
  width: 100%; min-height: 44px; margin-top: 8px; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink, #211E1A); text-decoration: underline; text-underline-offset: 3px;
}
[hidden].wcp-row, .wcp-foot[hidden], .wcp-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .wcp-overlay, .wcp-panel { transition: none; } }
