/* Safe Studio — carrinho lateral, páginas de checkout, login e opções. */

.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); visibility: hidden; transition: visibility 0s linear var(--dur-2); }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(5,5,6,.6); opacity: 0; transition: opacity var(--dur-2); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--graphite); box-shadow: -30px 0 60px rgba(0,0,0,.5); transform: translateX(100%); transition: transform var(--dur-2) var(--ease-out); }
.drawer.is-open .drawer__panel { transform: none; }
@media (max-width: 599px) {
  .drawer__panel { top: auto; left: 0; width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 16px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: var(--fs-25); }
.drawer__head h2 small { font-family: var(--font-body); font-size: var(--fs-14); font-weight: 400; color: var(--ash); margin-left: 6px; letter-spacing: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer__foot { display: grid; gap: 12px; padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.drawer.is-busy .drawer__body { opacity: .5; pointer-events: none; }

.citem { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); animation: ss-toast-in var(--dur-2) var(--ease-out); }
.citem__thumb { width: 76px; aspect-ratio: 16 / 11; border-radius: 8px; overflow: hidden; background: var(--graphite-3); }
.citem__thumb img { width: 100%; height: 100%; object-fit: cover; }
.citem__name { font-weight: 500; line-height: 1.3; }
.citem__meta { font-size: var(--fs-12); color: var(--ash); margin-top: 2px; }
.citem__side { display: grid; justify-items: end; gap: 4px; }
.citem__remove { font-size: var(--fs-12); color: var(--ash); padding: 6px 0; }
.citem__remove:hover { color: var(--accent-hi); }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border-radius: var(--r-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.qty button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--ash); }
.qty button:hover { color: var(--bone); }
.qty span { min-width: 24px; text-align: center; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }

.totals { display: grid; gap: 6px; font-size: var(--fs-14); }
.totals__row { display: flex; justify-content: space-between; color: var(--ash); }
.totals__row--total { color: var(--bone); font-size: var(--fs-20); font-family: var(--font-display); font-weight: 600; padding-top: 6px; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .field { min-height: 44px; font-family: var(--font-mono); text-transform: uppercase; }
.coupon-list { display: flex; flex-wrap: wrap; gap: 6px; }
.coupon-list .chip button { margin-left: 4px; color: var(--ash); }

.cart-empty { display: grid; justify-items: start; gap: 12px; padding: var(--s-7) 0; }
.cart-empty h3 { font-size: var(--fs-25); }
.cart-empty p { color: var(--ash); }

/* Página de checkout / login / opções */
.flow { display: grid; gap: var(--s-7); padding-top: var(--s-6); }
@media (min-width: 1000px) { .flow { grid-template-columns: 7fr 5fr; align-items: start; } }
.flow__title { font-size: var(--fs-display-s); letter-spacing: -.04em; line-height: 1; }
.panel { display: grid; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-3); background: var(--graphite); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 1000px) { .panel--sticky { position: sticky; top: calc(var(--nav-h) + 32px); } }
.form-grid { display: grid; gap: var(--s-4); }
.auth { max-width: 520px; margin: var(--s-8) auto 0; }
.steps { display: flex; gap: 10px; align-items: center; color: var(--ash); font-size: var(--fs-14); }
.steps b { color: var(--bone); font-weight: 500; }
.steps i { width: 24px; height: 1px; background: var(--line-2); }

/* Formulários nativos da Tebex (options/username) colados dentro de .native-form */
.native-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .native-form select, .native-form textarea { width: 100%; min-height: 48px; padding: 0 16px; border-radius: var(--r-1); background: var(--ink); color: var(--bone); border: 1px solid var(--line-2); }
.native-form textarea { padding: 12px 16px; min-height: 120px; }
.native-form input:focus, .native-form select:focus, .native-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.native-form label { display: block; font-size: var(--fs-14); color: var(--ash); margin: 16px 0 8px; }
.native-form button[type="submit"], .native-form input[type="submit"] { margin-top: 20px; width: 100%; min-height: 48px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 500; cursor: pointer; }
.native-form input[type="checkbox"], .native-form input[type="radio"] { accent-color: var(--accent); }
