/* ═══════════════════════════════════════════════════════════════════
   Componentes
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────── Botões ─────────────── */
.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s, color 0.18s, transform 0.08s, box-shadow 0.18s;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--brand) 70%, transparent);
}

.btn--primary:hover:not(:disabled) {
  background: var(--brand-hover);
}

.btn--secondary {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--surface-3);
}

.btn--ghost {
  color: var(--text-muted);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
}

.btn--whatsapp {
  background: var(--success);
  color: var(--on-success);
}

.btn--whatsapp:hover:not(:disabled) {
  background: var(--success-hover);
}

.btn--sm {
  --btn-h: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn--lg {
  --btn-h: 52px;
  padding: 0 22px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-hover);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.15s, gap 0.15s;
}

.link:hover {
  gap: 9px;
}

.link--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.link--muted:hover {
  color: var(--text);
  gap: 6px;
}

/* ─────────────── Tags, chips e badges ─────────────── */
.pbadge {
  --c: var(--text-muted);
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}

.tag--soon {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.tag--brand {
  color: var(--brand-hover);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
}

.chip {
  --c: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

a.chip:hover,
button.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip--success,
.chip--brand,
.chip--accent {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border-color: color-mix(in srgb, var(--c) 26%, transparent);
}

.chip--success {
  --c: var(--success);
}

.chip--brand {
  --c: var(--brand-hover);
}

.chip--accent {
  --c: var(--accent);
}

.chip.is-active {
  color: var(--text);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-tile {
  --c: var(--brand);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}

.icon-tile--success {
  --c: var(--success);
}

.icon-tile--accent {
  --c: var(--accent);
}

/* ─────────────── Card genérico ─────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ─────────────── Preço ─────────────── */
.price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.price__now {
  font-weight: 700;
}

.price__old {
  color: var(--text-subtle);
  font-size: 0.8em;
}

/* ─────────────── Capa gerada (proporção 3:4) ─────────────── */
.cover {
  --hue: 220;
  --plat: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  container-type: inline-size;
  background:
    radial-gradient(120% 70% at 85% 100%, hsl(var(--hue) 80% 45% / 0.55), transparent 60%),
    radial-gradient(90% 60% at 10% 20%, hsl(calc(var(--hue) + 40) 70% 55% / 0.35), transparent 65%),
    linear-gradient(160deg, hsl(var(--hue) 35% 16%), hsl(calc(var(--hue) + 20) 40% 8%));
  color: #fff;
  isolation: isolate;
}

.cover--img {
  object-fit: cover;
  background: var(--surface-2);
}

.cover::after {
  /* scanlines sutis */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.cover__band {
  display: flex;
  align-items: center;
  height: 12cqi;
  min-height: 14px;
  padding: 0 7cqi;
  background: linear-gradient(90deg, color-mix(in srgb, var(--plat) 85%, #000), color-mix(in srgb, var(--plat) 50%, #000));
  font-family: var(--font-display);
  font-size: max(7px, 5.6cqi);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.cover__art {
  position: absolute;
  right: -18cqi;
  top: 26cqi;
  width: 80cqi;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.4cqi solid hsl(var(--hue) 90% 70% / 0.18);
  box-shadow:
    inset 0 0 0 9cqi hsl(var(--hue) 90% 70% / 0.05),
    inset 0 0 0 20cqi hsl(var(--hue) 90% 70% / 0.04);
  z-index: -1;
}

.cover__title {
  padding: 0 7cqi 8cqi;
  font-family: var(--font-display);
  font-size: max(10px, 11cqi);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover__genre {
  margin-top: auto;
  padding: 0 7cqi 2cqi;
  font-size: max(7px, 5cqi);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ─────────────── Card de produto ─────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 20px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .product-grid--wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: rise 0.35s var(--ease) both;
}

.pcard__visual {
  position: relative;
  z-index: 2; /* acima do link "card inteiro clicável" */
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

.pcard__media {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  /* recorte tipo cartucho no canto superior direito */
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}

.pcard__media .cover {
  transition: transform 0.35s var(--ease);
}

/* abre espaço para o selo de plataforma sobre a capa gerada */
.pcard__media .cover__title {
  padding-bottom: 42px;
}

.pcard__platform {
  position: absolute;
  left: 10px;
  bottom: 10px;
  backdrop-filter: blur(6px);
}

.pcard__seal {
  position: absolute;
  left: 10px;
  top: calc(9% + 8px);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  color: #1a1300;
  background: var(--accent);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6);
}

.pcard__soldout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 18, 0.65);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
}

.pcard__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 2px 0;
}

.pcard__name {
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.pcard__name a::after {
  /* card inteiro clicável */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pcard__price {
  margin-top: 4px;
  font-size: 19px;
}

.pcard__hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pcard__add {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.7);
  transition: background 0.18s, transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.pcard__add span {
  display: none;
}

.pcard__add:hover {
  background: var(--brand-hover);
}

.pcard__add.is-added {
  background: var(--success);
  color: var(--on-success);
}

/* desktop: botão "Adicionar" desliza de baixo no hover */
@media (hover: hover) and (pointer: fine) {
  .pcard__add {
    left: 10px;
    width: auto;
    height: 42px;
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateY(10px);
  }

  .pcard__add span {
    display: inline;
  }

  .pcard:hover .pcard__add,
  .pcard:focus-within .pcard__add,
  .pcard__add.is-added {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .pcard:hover .pcard__visual {
    transform: translateY(-4px);
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
  }

  .pcard:hover .pcard__media {
    border-color: var(--border-strong);
  }

  .pcard:hover .pcard__media .cover {
    transform: scale(1.03);
  }
}

.pcard.is-soldout .pcard__media {
  filter: grayscale(0.7);
}

/* skeleton */
.pcard--skeleton {
  gap: 10px;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton--cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
}

.skeleton--line {
  height: 14px;
}

.skeleton--line.short {
  width: 50%;
}

/* ─────────────── Trilho horizontal ─────────────── */
.rail {
  position: relative;
}

.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 14px) / 2.2);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 6px var(--gutter) 10px;
  margin: -6px calc(var(--gutter) * -1) -10px;
  scroll-padding: 0 var(--gutter);
}

.rail__track::-webkit-scrollbar {
  display: none;
}

.rail__item {
  scroll-snap-align: start;
  min-width: 0;
}

@media (min-width: 768px) {
  .rail__track {
    grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px;
    margin: -6px 0 -10px;
    padding: 6px 0 10px;
    scroll-padding: 0;
  }
}

@media (min-width: 1024px) {
  .rail__track {
    grid-auto-columns: calc((100% - 60px) / 4);
  }
}

@media (min-width: 1440px) {
  .rail__track {
    grid-auto-columns: calc((100% - 80px) / 5);
  }
}

.rail__btn {
  position: absolute;
  top: 38%;
  z-index: 3;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  transition: opacity 0.2s, background 0.15s;
}

.rail__btn:hover {
  background: var(--surface-3);
}

.rail__btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.rail__btn--prev {
  left: -22px;
}

.rail__btn--next {
  right: -22px;
}

@media (min-width: 1024px) and (hover: hover) {
  .rail__btn {
    display: grid;
  }
}

/* ─────────────── Seções ─────────────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
}

.section-sub {
  margin-top: 6px;
  color: var(--text-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-hover);
}

/* ─────────────── Formulários ─────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 2;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.field__error {
  font-size: 12.5px;
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  height: auto;
  min-height: 130px;
  padding: 12px 14px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA3B2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.select option {
  background: var(--surface-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-subtle);
}

.input.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
}

.check:hover {
  color: var(--text);
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.check__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-subtle);
}

/* ─────────────── Seletor de quantidade ─────────────── */
.stepper {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}

.stepper__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 100%;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.stepper__btn:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper__input {
  width: 40px;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.stepper--sm {
  height: 36px;
  padding: 2px;
}

.stepper--sm .stepper__btn {
  width: 30px;
}

.stepper--sm .stepper__input {
  width: 30px;
  font-size: 14px;
}

/* ─────────────── Progresso ─────────────── */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-hover));
  transition: width 0.5s var(--ease);
}

/* ─────────────── Estado vazio ─────────────── */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  text-align: center;
}

.state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.state__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.state__text {
  max-width: 420px;
  color: var(--text-muted);
}

.state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

/* ─────────────── FAQ ─────────────── */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq__item {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.faq__item[open] {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__chev {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: transform 0.25s var(--ease), background 0.2s;
  flex-shrink: 0;
}

.faq__item[open] .faq__chev {
  transform: rotate(180deg);
  background: var(--brand-soft);
  color: var(--brand-hover);
}

.faq__answer {
  padding: 0 20px 18px;
  color: var(--text-muted);
  animation: fade-in 0.25s;
}

/* ─────────────── Toast ─────────────── */
/* fica acima (celular) ou ao lado (desktop) do botão flutuante do WhatsApp */
.toast-viewport {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  translate: -50% 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .toast-viewport {
    left: auto;
    right: 96px;
    bottom: 24px;
    translate: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: pop-in 0.22s var(--ease);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.toast__thumb {
  width: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.toast__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--success);
  background: var(--success-soft);
  flex-shrink: 0;
}

.toast__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.toast__body strong {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast--success .toast__body strong::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.toast__body span {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast__close {
  color: var(--text-subtle);
}

/* ─────────────── Gavetas (sheets) ─────────────── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.66);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.sheet__panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: transform 0.28s var(--ease);
}

.sheet--right .sheet__panel {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
}

.sheet--left .sheet__panel {
  top: 0;
  left: 0;
  bottom: 0;
  width: min(340px, 88%);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}

.sheet--top .sheet__panel {
  top: 0;
  left: 0;
  right: 0;
  max-height: 100%;
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
}

.sheet--bottom .sheet__panel {
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
}

.sheet.is-open .sheet__backdrop {
  opacity: 1;
}

.sheet.is-open .sheet__panel {
  transform: none;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--border);
}

.sheet__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.sheet__count {
  color: var(--text-muted);
  font-weight: 500;
}

.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.sheet__foot {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.sheet--bottom .sheet__head::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  translate: -50% 0;
}

/* ─────────────── Modal ─────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 5, 9, 0.7);
  backdrop-filter: blur(4px);
  animation: fade-in 0.15s;
}

.modal {
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow);
  animation: pop-in 0.2s var(--ease);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 16px;
  }

  .modal {
    max-width: 460px;
    border-radius: 20px;
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px 0 24px;
}

.modal__title {
  font-size: 20px;
}

.modal__desc {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

.modal__body {
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}

.pickup-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}

.pickup-note svg {
  color: var(--success);
}
