/* ================================================================
   cart.css — カートドロワー
   ================================================================ */

/* ── Overlay ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(0, 0, 0, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer ── */
.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  box-shadow: -4px 0 32px rgba(0,0,0,.08);
}
.cart-overlay.is-open .cart-drawer {
  transform: translateX(0);
}

/* ── Header ── */
.cart-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-drawer-title {
  font-family: var(--ff-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cart-drawer-count {
  font-size: 12px;
  color: var(--text-muted);
}
.cart-drawer-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 6px;
  transition: color .15s;
}
.cart-drawer-close:hover { color: var(--text); }

/* ── Body (scrollable) ── */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px;
}

/* ── Empty State ── */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
}
.cart-empty-icon {
  font-size: 36px;
  margin-bottom: 14px;
  opacity: .2;
}
.cart-empty-title {
  font-family: var(--ff-en);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.cart-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Cart Item ── */
.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 76px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface);
  display: block;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cart-item-category {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cart-item-name {
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-variant {
  font-size: 11px;
  color: var(--text-mid);
}
.cart-item-price {
  font-family: var(--ff-sub);
  font-size: 15px;
  color: var(--text);
  margin-top: 2px;
}
.cart-item-price.is-sale { color: var(--sale); }

/* qty + remove row */
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
}
.cart-qty-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.cart-qty-btn:hover { color: var(--text); background: var(--surface); }
.cart-qty-num {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
  line-height: 26px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  user-select: none;
}
.cart-remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color .15s, text-decoration-color .15s;
  font-family: var(--ff-ui);
  padding: 0;
}
.cart-remove-btn:hover {
  color: var(--sale);
  text-decoration-color: var(--sale);
}

/* ── Footer ── */
.cart-drawer-foot {
  padding: 18px 24px 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--white);
}
.cart-free-ship {
  font-size: 11px;
  text-align: center;
  margin-bottom: 14px;
  padding: 7px 10px;
  background: var(--off-white);
}
.cart-free-ship.is-free { color: #3a7a3a; }
.cart-free-ship.is-progress { color: var(--text-mid); }

.cart-summary { margin-bottom: 18px; }
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-mid);
}
.cart-summary-ship { font-size: 12px; }
.cart-summary-divider {
  border-top: 1px solid var(--border);
  margin: 10px 0;
}
.cart-summary-total {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding-top: 4px;
}
.cart-summary-total .cart-total-amount {
  font-family: var(--ff-sub);
  font-size: 20px;
  font-weight: 300;
}

.cart-checkout-btn {
  width: 100%;
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 16px;
  font-family: var(--ff-en);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s;
}
.cart-checkout-btn:hover:not(:disabled) { background: #333; }
.cart-checkout-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}
.cart-checkout-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  flex-shrink: 0;
}
.cart-secure-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* ── Points bar ── */
.cart-pts-bar {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.cart-pts-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
}
.cart-pts-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.cart-pts-avail {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}
.cart-pts-discount-row { font-size: 12px; }
.cart-pts-discount-amount {
  color: var(--sale, #c0392b);
  font-family: var(--ff-sub);
}
