/* 1 Purple Nation — Quick Order sheet (pairs with /js/pn-quick-order.js) */

.pnq { position: fixed; inset: 0; z-index: 2000; pointer-events: none; font-family: 'Manrope', -apple-system, sans-serif; }
.pnq.is-open { pointer-events: auto; }
.pnq-lock, .pnq-lock body { overflow: hidden; }

.pnq-backdrop {
  position: absolute; inset: 0; background: rgba(6,4,12,.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease;
}
.pnq.is-open .pnq-backdrop { opacity: 1; }

.pnq-sheet {
  position: absolute; left: 50%; top: 50%;
  width: min(880px, calc(100vw - 48px)); max-height: calc(100vh - 48px);
  transform: translate(-50%, -46%) scale(.97); opacity: 0;
  background: #100B1C; color: #fff;
  border: 1px solid rgba(139,92,246,.25); border-radius: 26px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  overflow: auto; overscroll-behavior: contain;
  transition: transform .38s cubic-bezier(.22,.9,.3,1), opacity .3s ease;
}
.pnq.is-open .pnq-sheet { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.pnq-grab { display: none; }

.pnq-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,11,28,.7); border: 1px solid rgba(255,255,255,.12); color: #fff; cursor: pointer;
  backdrop-filter: blur(8px); transition: transform .3s cubic-bezier(.22,.9,.3,1), background .2s;
}
.pnq-close:hover { transform: rotate(90deg); background: rgba(255,255,255,.12); }

.pnq-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Media */
.pnq-media { position: relative; background: #fff; border-radius: 25px 0 0 25px; overflow: hidden; min-height: 100%; }
.pnq-media > img { display: block; width: 100%; height: 100%; min-height: 440px; max-height: 620px; object-fit: cover; }
.pnq-thumbs { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; }
.pnq-thumb { width: 52px; height: 52px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,.9); background: #fff; cursor: pointer; opacity: .75; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.pnq-thumb.is-active { opacity: 1; border-color: #8B5CF6; }
.pnq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Info */
.pnq-info { padding: 34px 30px 26px; display: flex; flex-direction: column; }
.pnq-cat { font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: #C4B5FD; margin-bottom: 8px; }
.pnq-title { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0 40px 10px 0; color: #fff; }
.pnq-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pnq-price strong { font-size: 24px; font-weight: 800; color: #F5C518; }
.pnq-price s { color: rgba(255,255,255,.4); font-size: 15px; }
.pnq-total { font-size: 13px; color: rgba(255,255,255,.55); }

.pnq-field { margin-bottom: 18px; }
.pnq-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); }
.pnq-picked { font-weight: 600; color: rgba(255,255,255,.5); }
.pnq-stock { color: #FBBF24; font-weight: 700; }

.pnq-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.pnq-size {
  position: relative; height: 50px; padding: 0 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 14px; border: 1.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03);
  color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.pnq-size:hover { border-color: rgba(139,92,246,.7); }
.pnq-size:active { transform: scale(.96); }
.pnq-size.is-active { border-color: #F5C518; background: rgba(245,197,24,.12); color: #F5C518; box-shadow: 0 0 0 3px rgba(245,197,24,.12); }
.pnq-size.is-out { color: rgba(255,255,255,.35); border-style: dashed; }
.pnq-size.is-out.is-active { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); box-shadow: none; }
.pnq-size small { font-size: 9.5px; font-weight: 600; letter-spacing: .3px; margin-top: 1px; }
.pnq-sizes.shake { animation: pnqShake .4s; }
@keyframes pnqShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.pnq-help { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: #86EFAC; text-decoration: none; }
.pnq-help:hover { text-decoration: underline; }

.pnq-qty { display: inline-flex; align-items: center; border: 1.5px solid rgba(255,255,255,.14); border-radius: 14px; overflow: hidden; }
.pnq-qty button { width: 46px; height: 46px; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pnq-qty button:hover:not(:disabled) { background: rgba(255,255,255,.06); }
.pnq-qty button:disabled { color: rgba(255,255,255,.25); cursor: default; }
.pnq-qty output { min-width: 44px; text-align: center; font-size: 16px; font-weight: 800; }

.pnq-msg { min-height: 18px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #FCA5A5; }

.pnq-actions { display: flex; flex-direction: column; gap: 10px; }
.pnq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 22px; width: 100%;
  border-radius: 16px; border: 0; cursor: pointer;
  font: inherit; font-size: 15.5px; font-weight: 800; letter-spacing: .1px; text-decoration: none;
  transition: transform .2s cubic-bezier(.22,.9,.3,1), box-shadow .2s, background .2s;
}
.pnq-btn-primary { background: linear-gradient(145deg, #FDE68A, #F5C518 45%, #D9A300); color: #0B0710; box-shadow: 0 12px 30px rgba(245,197,24,.25), inset 0 1px 0 rgba(255,255,255,.5); }
.pnq-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(245,197,24,.35), inset 0 1px 0 rgba(255,255,255,.5); }
.pnq-btn-primary:disabled { opacity: .7; cursor: wait; }
.pnq-btn-ghost { background: rgba(255,255,255,.06); color: #fff; border: 1.5px solid rgba(255,255,255,.14); font-weight: 700; font-size: 14.5px; height: 50px; }
.pnq-btn-ghost:hover { background: rgba(255,255,255,.1); }

.pnq-details { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.6); text-decoration: none; }
.pnq-details:hover { color: #fff; }

/* Waitlist */
.pnq-wait { display: flex; flex-direction: column; gap: 10px; }
.pnq-wait[hidden] { display: none; }
.pnq-wait-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.3); color: #C4B5FD; }
.pnq-wait-head strong { display: block; color: #fff; font-size: 14.5px; margin-bottom: 2px; }
.pnq-wait-head span { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.45; }
.pnq-wait input[name="contact"] { height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.16); background: #0A0712; color: #fff; font: inherit; font-size: 15px; }
.pnq-wait input[name="contact"]:focus { outline: none; border-color: #8B5CF6; box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.pnq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pnq-wait-done { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.35); color: #4ADE80; }
.pnq-wait-done strong { display: block; color: #fff; margin-bottom: 2px; }
.pnq-wait-done span { font-size: 13px; color: rgba(255,255,255,.7); }

/* Loading + error */
.pnq-skel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.pnq-skel-img, .pnq-skel-lines i { background: linear-gradient(90deg, #17102b 0%, #241640 50%, #17102b 100%); background-size: 200% 100%; animation: pnqShim 1.4s ease-in-out infinite; }
.pnq-skel-img { min-height: 440px; border-radius: 25px 0 0 25px; }
.pnq-skel-lines { padding: 40px 30px; display: flex; flex-direction: column; gap: 16px; }
.pnq-skel-lines i { display: block; height: 18px; border-radius: 8px; }
.pnq-skel-lines i:nth-child(2) { width: 70%; height: 28px; }
.pnq-skel-lines i:nth-child(3) { width: 40%; }
.pnq-skel-lines i:nth-child(4) { height: 56px; margin-top: 30px; }
@keyframes pnqShim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.pnq-error { grid-column: 1 / -1; padding: 60px 30px; text-align: center; }
.pnq-error h3 { font-size: 22px; margin: 0 0 8px; }
.pnq-error p { color: rgba(255,255,255,.6); margin: 0 0 22px; }
.pnq-error .pnq-btn { width: auto; }

/* Toast */
.pnq-toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 2100;
  transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 12px 12px 12px 14px; border-radius: 16px;
  background: #16102A; border: 1px solid rgba(139,92,246,.35); color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.5); font-family: 'Manrope', -apple-system, sans-serif; font-size: 14px; font-weight: 600;
  transition: transform .35s cubic-bezier(.22,.9,.3,1), opacity .3s;
}
.pnq-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.pnq-toast-ico { width: 26px; height: 26px; border-radius: 50%; background: #F5C518; color: #0B0710; display: flex; align-items: center; justify-content: center; flex: none; }
.pnq-toast a { margin-left: 6px; padding: 8px 12px; border-radius: 10px; background: #fff; color: #0B0710; font-weight: 800; font-size: 13px; text-decoration: none; white-space: nowrap; }
@media (min-width: 769px) { .pnq-toast { bottom: 32px; } }

/* Card trigger buttons (shared look) */
.pnq-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: #F5C518; color: #0B0710; font: inherit; font-size: 13.5px; font-weight: 800;
  transition: transform .2s, background .2s;
}
.pnq-trigger:hover { background: #FDE047; transform: translateY(-1px); }
.pnq-trigger svg { width: 16px; height: 16px; }

/* ── Mobile: bottom sheet ── */
@media (max-width: 768px) {
  .pnq-sheet {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%;
    max-height: 92vh; max-height: 92svh;
    border-radius: 26px 26px 0 0; border-bottom: 0;
    transform: translateY(100%); opacity: 1;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pnq.is-open .pnq-sheet { transform: translateY(0); }
  .pnq-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 10px auto 0; }
  .pnq-close { top: 16px; right: 14px; width: 38px; height: 38px; }
  .pnq-body { grid-template-columns: 1fr; }
  .pnq-media { border-radius: 0; margin: 12px 16px 0; border-radius: 20px; }
  .pnq-media > img { min-height: 0; height: 26vh; height: 26svh; max-height: 260px; object-fit: contain; }
  .pnq-thumbs { left: 10px; bottom: 10px; }
  .pnq-thumb { width: 44px; height: 44px; }
  .pnq-info { padding: 14px 18px 16px; }
  .pnq-field { margin-bottom: 14px; }
  .pnq-msg { min-height: 0; margin-bottom: 8px; }
  .pnq-msg:empty { display: none; }
  .pnq-details { margin-top: 12px; }
  .pnq-title { font-size: 21px; margin-right: 0; }
  .pnq-price { margin-bottom: 16px; }
  .pnq-price strong { font-size: 21px; }
  .pnq-sizes { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .pnq-size { height: 48px; font-size: 14px; border-radius: 12px; }
  .pnq-qty-row { display: flex; align-items: center; justify-content: space-between; }
  .pnq-qty-row .pnq-label { margin: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
  .pnq-skel { grid-template-columns: 1fr; }
  .pnq-skel-img { min-height: 26svh; margin: 12px 16px 0; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pnq-sheet, .pnq-backdrop, .pnq-toast { transition: none !important; }
}
