/* =========================================================
   Panier (cart) — bouton d'en-tête + tiroir latéral
   ========================================================= */

/* bouton panier dans l'en-tête */
.cart-btn {
  position: relative; flex: none;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--ice); padding: 0; cursor: pointer;
}
.cart-btn svg { width: 24px; height: 24px; }
.cart-btn:hover { color: #fff; }
.cart-btn:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; }
.cart-btn__count {
  position: absolute; top: 3px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff;
  font: 700 11px/19px var(--f-body); text-align: center;
}
.cart-btn__count[data-zero] { display: none; }
.cart-btn.is-bump .cart-btn__count { animation: cartbump .45s var(--ease); }
@keyframes cartbump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

@media (max-width: 419px) {
  .hdr__logo svg { width: 112px; }
  .hdr__cta { padding: 0 .8em; letter-spacing: .04em; }
}

/* bouton « カートに追加 » */
button.order__cta, button.buybar__cta { cursor: pointer; }

/* tiroir */
.cart { position: fixed; inset: 0; z-index: 500; }
.cart[hidden] { display: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .25s; }
.cart__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: var(--ink); color: #fff;
  border-left: 3px solid var(--red);
  transform: translateX(100%); transition: transform .3s var(--ease);
  outline: none;
}
.cart.is-open .cart__backdrop { opacity: 1; }
.cart.is-open .cart__panel { transform: none; }

.cart__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 12px 16px 20px;
  background: #000; border-bottom: 1px solid var(--line);
}
.cart__head-txt { margin-right: auto; display: grid; gap: 4px; }
.cart__en { font: 700 11px/1 var(--f-num); letter-spacing: .32em; color: var(--red); }
.cart__title { font: 900 26px/1.15 var(--f-jp); color: #fff; margin: 0; }
.cart__x {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--ice);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.cart__x:hover { color: #fff; }

.cart__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 20px; }
.cart__msg {
  font-size: 13px; font-weight: 700; line-height: 1.6;
  padding: 10px 12px; margin: 0 0 14px;
  background: rgba(212, 226, 237, .08); border-left: 3px solid var(--ice);
}
.cart__msg:empty { display: none; }
.cart__msg.is-warn { border-color: var(--red); background: rgba(223, 6, 23, .16); }

.cart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-item {
  position: relative;
  display: grid; grid-template-columns: 62px 1fr; gap: 14px;
  padding: 14px; background: var(--ink-2); border: 1px solid var(--line);
}
.cart-item__date {
  align-self: start; display: grid; place-content: center; text-align: center;
  padding: 10px 4px 8px; background: var(--red); color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.cart-item__date b { font: 800 22px/1 var(--f-num); }
.cart-item__date small { font: 900 13px/1.5 var(--f-jp); }
.cart-item__show { font: 900 15px/1.45 var(--f-jp); color: #fff; padding-right: 52px; margin: 0; }
.cart-item__time { font-size: 12px; color: var(--mute); margin: 2px 0 8px; }
.cart-item__seat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--ice); margin: 0 0 12px; }
.cart-tag { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; letter-spacing: .04em; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stepper--sm { grid-template-columns: 40px 70px 40px; max-width: none; }
.stepper--sm .stepper__btn { min-height: 40px; font-size: 20px; }
.stepper--sm .stepper__val { padding-top: 3px; font-size: 12px; }
.stepper--sm .stepper__val b { font-size: 22px; }
.cart-item__price { font: 800 22px/1 var(--f-num); color: #fff; margin: 0; white-space: nowrap; }
.cart-item__price small { font: 700 11px/1 var(--f-body); color: var(--ice); margin-left: 3px; }
.cart-item__rm {
  position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 4px 6px;
  border: 0; background: transparent; color: var(--mute);
  font-size: 12px; text-decoration: underline; cursor: pointer;
}
.cart-item__rm:hover { color: var(--red); }

.cart__empty { display: grid; justify-items: center; gap: 18px; padding: 48px 10px; text-align: center; color: var(--ice); }
.cart__empty[hidden] { display: none; }
.cart__empty p { font: 900 18px/1.5 var(--f-jp); margin: 0; }

.cart__foot {
  display: grid; gap: 10px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  background: #000; border-top: 1px solid var(--line-2);
}
.cart__foot[hidden] { display: none; }
.cart__sum { display: grid; gap: 4px; margin: 0; }
.cart__sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cart__sum dt { font-size: 13px; font-weight: 700; color: var(--mute); }
.cart__sum dd { margin: 0; font-weight: 700; color: #fff; }
.cart__total dd b { font: 800 36px/1 var(--f-num); }
.cart__total dd small { font-size: 12px; margin-left: 4px; }
.cart__note { font-size: 11.5px; line-height: 1.6; color: var(--mute); margin: 0; }
.cart__clear {
  justify-self: center; min-height: 32px; border: 0; background: transparent;
  color: var(--mute); font-size: 12px; text-decoration: underline; cursor: pointer;
}
.cart__clear:hover { color: #fff; }

html.cart-lock, html.cart-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .cart__panel, .cart__backdrop { transition: none; }
  .cart-btn.is-bump .cart-btn__count { animation: none; }
}
