/*
 * Mini cart drawer (site plan §8.2).
 *
 * The root sits in the header's action row, where the cart control already was,
 * so the drawer belongs to the cart it describes. Two controls are declared and
 * exactly one is ever visible: the plain cart link is what a visitor without
 * JavaScript uses, and the moment the installed runtime claims the root it marks
 * it data-enhanced="true", which swaps the link for the drawer trigger. A cart is
 * therefore always reachable, and never twice.
 *
 * The dialog is a native one: the runtime opens it with showModal(), so the
 * backdrop, focus handling and Escape key come from the browser rather than from
 * script here. Everything below styles the drawer's own surface.
 */
.aq-mini-cart-root {
  display: inline-flex;
  align-items: center;
}
.aq-mini-cart-trigger { display: none; }
.aq-mini-cart-root[data-enhanced="true"] .aq-mini-cart-trigger { display: inline-flex; }
.aq-mini-cart-root[data-enhanced="true"] .aq-cart-fallback { display: none; }

.aq-mini-cart {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(400px, 92vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #17212B;
  font-family: inherit;
  box-shadow: -20px 0 48px rgba(9, 22, 33, 0.22);
  overflow: hidden;
}
.aq-mini-cart::backdrop { background: rgba(9, 22, 33, 0.44); }

.aq-mini-cart-inner {
  box-sizing: border-box;
  height: 100%;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aq-mini-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aq-mini-cart-head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #687684;
}
.aq-mini-cart-close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #b9c8d6;
  background: #fff;
  color: #40505E;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.aq-mini-cart-close:hover { border-color: #0F5FB8; color: #0F5FB8; }

.aq-mini-cart-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.aq-mini-cart-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #EDF1F5;
}
.aq-mini-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EDF1F5;
}
.aq-mini-cart-media { flex: 0 0 auto; }
.aq-mini-cart-thumb {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid #EDF1F5;
  border-radius: 6px;
  background: #F8FAFC;
}
.aq-mini-cart-detail {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aq-mini-cart-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #17212B;
  text-decoration: none;
}
a.aq-mini-cart-name:hover { color: #0F5FB8; }
.aq-mini-cart-qty { font-size: 12px; color: #687684; }
.aq-mini-cart-price {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.aq-mini-cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #DBE3EA;
  font-size: 15px;
}
.aq-mini-cart-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #687684;
}
.aq-mini-cart-empty { padding: 8px 0 4px; }
.aq-mini-cart-empty-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #40505E;
}
.aq-mini-cart-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #EDF1F5;
  padding-top: 14px;
}
.aq-mini-cart-foot .aq-btn { width: 100%; }
