/* =====================================================================
   modals.css — 모달 시스템 스타일(list.php 전용)
   shop.css 에서 추출한 최소 CSS 모음. list.php 에서 shop.css 로드 생략 시 호출.
   2026-10-10 — 카드 layout 중복 방지용 CSS 격리
   ===================================================================== */

:root {
  --pt: #1a2a5e;        /* 포인트(가격/CTA) — ARVO 딥 네이비 */
  --pt-d: #12203f;
  --beige: #d8b98a;
  --star: #f0a93a;
  --ink: #1c1c22;
  --sub: #8a8a8a;
  --sale: #c0392b;
  --line: #f0eeea;
  --line-2: #e6e2db;
  --bg: #ffffff;
  --bg-soft: #faf9f6;
}

/* ============ 모달 공통 ============ */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  display: flex; align-items: flex-end; justify-content: center; z-index: 100;
}
@media (min-width: 640px) { .modal-back { align-items: center; } }
/* ★ HTML hidden 이 display:flex 를 못 이기므로 명시 override(모달이 열자마자 뜨는 버그 방지) */
.modal-back[hidden] { display: none; }
.modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 22px; position: relative;
  animation: slideup .22s ease;
}
@media (min-width: 640px) { .modal { border-radius: 18px; } }
@keyframes slideup { from { transform: translateY(24px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-x {
  position: absolute; top: 14px; right: 14px; border: 0; background: var(--bg-soft);
  width: 32px; height: 32px; border-radius: 16px; font-size: 14px; color: var(--sub);
}
.modal-title { margin: 2px 0 18px; font-size: 19px; font-weight: 800; }

/* ---- 장바구니 ---- */
.cart-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 66px; height: 66px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.cart-item-opt { font-size: 12px; color: var(--sub); }
.cart-item-price { font-weight: 800; margin-top: 5px; }
.cart-item-del { border: 0; background: transparent; color: #ccc; font-size: 17px; align-self: flex-start; }
.cart-empty { text-align: center; color: var(--sub); padding: 44px 0; }
.cart-sum { margin: 18px 0; font-size: 14px; line-height: 2.1; }
.cart-sum .row { display: flex; justify-content: space-between; }
.cart-sum .total { font-size: 17px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 5px; }
.cart-sum .total b { color: var(--pt); }

/* ---- 폼 필드(주문·주소) ---- */
.form-field { margin-bottom: 13px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field label .req { color: var(--pt); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; padding: 13px; font-size: 15px;
  font-family: inherit; outline: none;
}
.form-field select { background: #fff; appearance: auto; cursor: pointer; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--ink); }
.form-field textarea { resize: vertical; min-height: 62px; }
.form-row2 { display: flex; gap: 8px; }
.form-row2 > * { flex: 1; }
.bank-box {
  background: #fff6f2; border: 1px solid #ffdcce; border-radius: 12px;
  padding: 15px; font-size: 14px; line-height: 1.7; margin: 13px 0;
}
.err-msg { color: #d33; font-size: 13px; margin: 8px 0; }

/* ---- 버튼 ---- */
.btn-primary {
  width: 100%; border: 0; background: var(--pt); color: #fff;
  font-size: 16px; font-weight: 700; padding: 16px; border-radius: 13px;
  transition: background .12s;
}
.btn-primary:hover { background: var(--pt-d); }
.btn-primary:disabled { background: #d5d5d5; cursor: not-allowed; }
.btn-line {
  width: 100%; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 700; padding: 14px; border-radius: 13px; margin-bottom: 9px;
}
.btn-line:hover { background: var(--bg-soft); }
.btn-line:disabled { border-color: var(--line-2); color: #b5b5b5; background: #fff; cursor: not-allowed; }
.btn-line:disabled:hover { background: #fff; }
.btn-share {
  width: 100%; border: 1px solid var(--line, #e6e6ea); background: #fff; color: var(--sub, #6b6b70);
  font-size: 13.5px; font-weight: 600; padding: 11px; border-radius: 12px; margin-top: 4px; cursor: pointer;
}
.btn-share:hover { background: var(--bg-soft); color: var(--pt); border-color: var(--pt); }

/* ---- 복사 완료 토스트 ---- */
.mini-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(12px);
  background: rgba(20,20,26,.94); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; max-width: 88vw; text-align: center;
}
.mini-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 주문완료 모달 ---- */
.done-modal { text-align: center; }
.done-check { font-size: 50px; margin: 6px 0; }
.done-no { font-size: 14px; background: var(--bg-soft); border-radius: 9px; padding: 9px 13px; display: inline-block; margin: 8px 0; font-weight: 700; }
.addr { background: var(--bg-soft); border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.7; }
