/* CalWebStudio - Pizzaria UI (PUBLIC) */

/* =========================
   THEME TOKENS
========================= */
:root{
  --topbar-bg:#0f172a;
  --menu-text:#aab2bf;
  --logo-text:#e5e7eb;

  --btn-bg:#E31837;
  --btn-text:#ffffff;

  --brand: var(--btn-bg);
  --brand-rgb: 227,24,55;

  --accent:#006491;
  --accent-rgb: 0,100,145;

  --bg:#0b1220;
  --surface:#0f172a;
  --text:#e5e7eb;
  --muted:#aab2bf;
  --border: rgba(255,255,255,.12);
  --shadow: 0 14px 36px rgba(0,0,0,.35);
  --radius: 18px;

  --focus: rgba(var(--brand-rgb), .35);

  /* ✅ label de preço (o header sobrescreve via settings) */
  --price-label-bg: var(--btn-bg);
  --price-label-text: #fff;
}

/* =========================
   MENU • CATEGORIAS (custom)
   - Não altera .badge global
   - Só afeta .badge.cat-badge
========================= */

.badge.cat-badge{
  /* Fallbacks por enquanto (depois você substitui por vars do header/admin) */
  --cat-bg: rgba(255,255,255,.06);
  --cat-border: rgba(255,255,255,.12);
  --cat-text: var(--muted);

  --cat-hover-bg: rgba(255,255,255,.10);
  --cat-hover-border: rgba(255,255,255,.18);
  --cat-hover-text: var(--text);

  --cat-active-bg: rgba(var(--brand-rgb), .28);
  --cat-active-border: rgba(var(--brand-rgb), .40);
  --cat-active-text: var(--text);

  background: var(--cat-bg);
  border-color: var(--cat-border);
  color: var(--cat-text);

  /* mantém o “feel” do resto do tema */
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.badge.cat-badge:hover{
  background: var(--cat-hover-bg);
  border-color: var(--cat-hover-border);
  color: var(--cat-hover-text);
}

.badge.cat-badge.active{
  background: var(--cat-active-bg);
  border-color: var(--cat-active-border);
  color: var(--cat-active-text);
}

/* Mobile: evita hover “grudar” e mantém UX consistente */
@media (hover: none), (pointer: coarse){
  .badge.cat-badge:hover{
    background: var(--cat-bg);
    border-color: var(--cat-border);
    color: var(--cat-text);
    transform: none;
  }
  .badge.cat-badge:active{
    background: var(--cat-active-bg);
    border-color: var(--cat-active-border);
    color: var(--cat-active-text);
  }
}


/* =========================
   BASE
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  min-height:100%;
  display:flex;
  flex-direction:column;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color:var(--text);
  position: relative;
  z-index: 0;
  overflow-x: hidden;
}

/* glows fixos e SEMPRE atrás */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 50% -220px, rgba(var(--brand-rgb), .10), transparent 62%),
    radial-gradient(900px 520px at 0% 0%, rgba(var(--accent-rgb), .14), transparent 58%),
    radial-gradient(1200px 900px at 50% 120%, rgba(0,0,0,.35), transparent 60%);
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
.container{ width:min(1120px, calc(100% - 32px)); margin-inline:auto; }

.page{
  flex: 1 0 auto;
  padding: 22px 0 56px;
}

.muted{ color: var(--muted); }
hr{ border:0; border-top:1px solid var(--border); margin:18px 0; }

:focus{ outline:none; }
:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 12px;
}

/* =========================
   FLASH (dentro do conteúdo)
========================= */
.flash-stack{
  position: static;
  width: 100%;
  max-width: 720px;
  margin: 0 0 14px 0;
  display: grid;
  gap: 10px;
}

.flash{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  margin: 0;
}

.flash__msg{ font-weight: 900; line-height: 1.25; }

.flash__close{
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  padding: 0 2px;
}
.flash__close:hover{ opacity: 1; }

.flash-success{ border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.14); }
.flash-error{ border-color: rgba(239,68,68,.50); background: rgba(239,68,68,.14); }
.flash-warn{ border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.14); }
.flash-info{ border-color: rgba(59,130,246,.45); background: rgba(59,130,246,.14); }

/* títulos */
.section-title{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  margin: 26px 0 14px;
}
.section-title h2{ margin:0; font-size: 22px; letter-spacing:-.2px; }
.section-title .muted{ color: var(--muted); font-size: 13px; }

/* =========================
   HEADER / NAV
========================= */
.topbar{
  position:sticky; top:0; z-index:50;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.topbar-inner{
  position:relative;
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
  gap:16px;
}

.brand{ display:flex; align-items:center; gap:10px; min-width: 160px; }
.brand-text{ font-weight:900; letter-spacing:.2px; font-size:18px; color: var(--logo-text); }
.brand-logo{ height:34px; width:auto; border-radius:10px; object-fit:contain; }

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  z-index: 60;
}

.cart-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 900;
  transition: transform .15s ease, filter .15s ease;
}
.cart-link:hover{ transform: translateY(-1px); filter: brightness(.95); }
.cart-text{ line-height:1; }

.cart-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background:#fff;
  color:#000;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

/* checkbox invisível */
.nav-toggle-input{
  position:absolute;
  opacity:0;
  pointer-events:none;
  width:1px;
  height:1px;
}

.nav-toggle{
  display:flex;
  width:44px;
  height:44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  padding:0;
  user-select:none;
  transition: transform .15s ease, background .15s ease;
}
.nav-toggle:hover{
  background: rgba(255,255,255,.09);
  transform: translateY(-1px);
}

.nav-toggle .burger{ position:relative; width:20px; height:14px; }
.nav-toggle .burger span{
  position:absolute;
  left:0;
  width:20px;
  height:2px;
  background:#fff;
  border-radius: 999px;
  transition: transform .18s ease, top .18s ease, opacity .18s ease;
}
.nav-toggle .burger span:nth-child(1){ top:0; }
.nav-toggle .burger span:nth-child(2){ top:6px; }
.nav-toggle .burger span:nth-child(3){ top:12px; }

.nav-toggle-input:checked ~ .top-actions .nav-toggle .burger span:nth-child(1){ top:6px; transform: rotate(45deg); }
.nav-toggle-input:checked ~ .top-actions .nav-toggle .burger span:nth-child(2){ opacity:0; }
.nav-toggle-input:checked ~ .top-actions .nav-toggle .burger span:nth-child(3){ top:6px; transform: rotate(-45deg); }

.nav{
  position:absolute;
  right:0;
  top: 56px;
  width: min(360px, calc(100vw - 32px));
  background: var(--topbar-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  padding: 10px;
  display:none;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  z-index: 999;
}
.nav-toggle-input:checked ~ .nav{ display:flex; }

.nav a,
.nav-dd-btn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--menu-text);
  border: 1px solid transparent;
  background: transparent;
  font-weight: 900;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover:hover) and (pointer:fine){
  .nav a:hover,
  .nav-dd-btn:hover{
    background:#fff;
    color: var(--topbar-bg);
    border-color: transparent;
    transform: translateY(-1px);
  }
}

.nav a:active,
.nav a:focus,
.nav a:focus-visible,
.nav-dd-btn:active,
.nav-dd-btn:focus,
.nav-dd-btn:focus-visible{
  background:#fff;
  color: var(--topbar-bg);
  border-color: transparent;
  transform: translateY(-1px);
}

/* dropdown */
.nav-dd{ display:block; }
.nav-dd summary{ list-style:none; }
.nav-dd summary::-webkit-details-marker{ display:none; }

.nav-dd-menu{
  display:none;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}
.nav-dd[open] .nav-dd-menu{ display:block; }

.nav-dd-menu a{
  display:flex;
  width:100%;
  border-radius: 12px;
  padding: 10px 10px;
  color:#fff;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover:hover) and (pointer:fine){
  .nav-dd-menu a:hover{
    background:#fff;
    color: var(--topbar-bg);
    border-color: transparent;
  }
}

.nav-dd-menu a:active,
.nav-dd-menu a:focus,
.nav-dd-menu a:focus-visible{
  background:#fff;
  color: var(--topbar-bg);
  border-color: transparent;
}

/* =========================
   BADGES / CATEGORIES
========================= */
.badge{
  display:inline-flex; align-items:center;
  padding: 7px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight:900;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.badge:hover{
  background: rgba(var(--brand-rgb), .18);
  border-color: rgba(var(--brand-rgb), .30);
  color: var(--text);
  transform: translateY(-1px);
}
.badge.active{
  background: rgba(var(--brand-rgb), .28);
  border-color: rgba(var(--brand-rgb), .40);
  color: var(--text);
}

.cat-strip{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
@media (max-width: 720px){
  .cat-strip{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .cat-strip .badge{ white-space:nowrap; flex: 0 0 auto; }
}

/* =========================
   ✅ PRICE LABEL (exclusivo)
========================= */
.price-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--price-label-bg);
  color: var(--price-label-text);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

/* =========================
   FORMS
========================= */
label{ display:block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
.input, select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
textarea{ min-height: 120px; resize: vertical; }

/* ✅ outline controlado pelo admin */
.input-outline{
  border: 2px solid var(--input-outline, #000) !important;
  outline: none;
}

.input-outline:focus{
  border-color: var(--input-outline, #000) !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,.12);
}


.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions{ margin-top: 14px; display:flex; gap: 10px; flex-wrap:wrap; }
@media (max-width: 520px){ .form-row{ grid-template-columns: 1fr; } }

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight:900;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
.btn:hover{ transform: translateY(-1px); }

.btn-primary{
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover{ filter: brightness(.95); }

.btn-outline{
  background: transparent;
  border-color: rgba(255,255,255,.18);
  color: var(--muted);
}
.btn-outline:hover{
  background: rgba(var(--brand-rgb), .14);
  border-color: rgba(var(--brand-rgb), .30);
  color: var(--text);
}

/* =========================
   GRID / CARDS
========================= */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card{
  position: relative;
  grid-column: span 4;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
  transition: transform .18s ease, border-color .18s ease;
}
.card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: rgba(255,255,255,.03);
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(var(--brand-rgb), .25);
}
.card:hover::before{ background: rgba(255,255,255,.05); }

.card .img{
  height: 170px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.20), rgba(var(--brand-rgb),.18));
}
.card img{ width:100%; height:100%; object-fit:cover; opacity:.92; }

.card .body{ position:relative; padding: 16px; }
.card .body h3{
  margin:0 0 10px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.2px;
}
.card .body .muted{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}
.card .body .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 14px;
}

/* mantém compatibilidade caso ainda exista badge no card */
.card .row .badge{
  font-size: 16px;
  padding: 10px 15px;
  background: rgba(var(--brand-rgb), .16);
  border: 1px solid rgba(var(--brand-rgb), .28);
  color: var(--text);
}

.card form{ display:flex; align-items:center; gap:10px; }
.card form .input{
  width:84px;
  padding: 10px 10px;
  border-radius: 12px;
}

@media (max-width: 880px){ .card{ grid-column: span 6; } }
@media (max-width: 520px){ .card{ grid-column: span 12; } }

/* =========================
   HERO SLIDER
========================= */
.hero-slider{
  position:relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow:hidden;
  background: var(--surface);
}

.hero-slides{ position:relative; }
.hero-slide{
  position:relative;
  display:none;
  min-height: 380px;
  background-size: cover;
  background-position: center;
}
.hero-slide.is-active{ display:block; }

.hero-slide::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.10) 100%);
}

.hero-slide-inner{
  position:absolute;
  left:0;
  bottom:0;
  z-index:2;
  padding: 30px 36px;
  width:min(680px, calc(100% - 72px));
}
.hero-slide-inner h1,
.hero-slide-inner p{ color:#fff !important; }

.hero-slide-inner h1{
  margin:0;
  font-size: 56px;
  line-height:1.02;
  letter-spacing:-1px;
  text-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.hero-slide-inner p{
  margin:12px 0 18px;
  font-size: 18px;
  line-height: 1.35;
  max-width: 58ch;
  opacity: .92;
}
.hero-cta{ display:flex; gap:12px; flex-wrap:wrap; }

.hero-cta .btn-outline{
  background:#fff !important;
  color:#000 !important;
  border:none !important;
}
.hero-cta .btn-outline:hover{ filter: brightness(.95); transform: translateY(-1px); }

.hero-nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:44px; height:44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 28px;
  line-height: 1;
}
.hero-nav.prev{ left: 12px; }
.hero-nav.next{ right: 12px; }
.hero-nav:hover{ background: rgba(0,0,0,.48); }

.hero-dots{
  position:absolute;
  left: 18px;
  bottom: 16px;
  z-index:3;
  display:flex;
  gap:8px;
}
.hero-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(255,255,255,.35);
  cursor:pointer;
}
.hero-dot.is-active{
  background: rgba(var(--brand-rgb), .95);
  border-color: rgba(var(--brand-rgb), .95);
}

@media (max-width: 880px){
  .hero-slide{ min-height: 340px; }
  .hero-slide-inner{ padding: 22px 22px; width: calc(100% - 44px); }
  .hero-slide-inner h1{ font-size: 44px; }
  .hero-slide-inner p{ font-size: 16px; }
}
@media (max-width: 560px){
  .hero-dots{ display:none !important; }
}
@media (max-width: 520px){
  .hero-slide{ min-height: 320px; }
  .hero-slide-inner h1{ font-size: 38px; }
  .hero-slide-inner p{ font-size: 15px; }
}

/* =========================
   MODAL
========================= */
.modal{
  position:fixed; inset:0;
  display:none;
  align-items:center; justify-content:center;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(6px);
  padding: 18px;
  z-index: 2000;
}
.modal.open{ display:flex; }

.modal-card{
  width:min(720px, 100%);
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  overflow:hidden;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-body{ padding: 16px; }

.modal-close{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor:pointer;
  font-weight: 900;
  transition: transform .15s ease, filter .15s ease;
}
.modal-close:hover{
  transform: translateY(-1px);
  background: rgba(var(--brand-rgb), .18);
  border-color: rgba(var(--brand-rgb), .35);
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top: 1px solid var(--border);
  background: var(--topbar-bg);
  color: var(--menu-text);
  padding: 18px 0;
  margin-top: auto;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.footer a{ color: var(--logo-text); }
.footer a:hover{ opacity: .95; }
.footer .muted{ color: var(--menu-text); }

/* =========================
   CART
========================= */
.table{ width:100%; border-collapse: collapse; }

.cart-wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.cart-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin: 6px 0 16px;
  flex-wrap:wrap;
}

.cart-title{
  margin:0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cart-top-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.cart-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items:start;
}

@media (min-width: 980px){
  .cart-layout{
    grid-template-columns: 1.6fr .9fr;
    gap: 16px;
  }
  .cart-right{
    position: sticky;
    top: 14px;
    align-self:start;
  }
}

.cart-table.card .body{ padding:0 !important; }

.table-cart{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-cart thead th{
  text-align:left;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #aab2bf);
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}

.table-cart tbody td{
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-cart tbody tr:last-child td{ border-bottom: none; }

.cart-item-row{
  display:flex;
  gap:12px;
  align-items:center;
  min-width: 220px;
}

.cart-thumb{
  width:64px;
  height:64px;
  border-radius: 14px;
  overflow:hidden;
  flex: 0 0 64px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  display:flex;
  align-items:center;
  justify-content:center;
}

.cart-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
}

.cart-thumb-ph{
  width:100%;
  height:100%;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.12));
}

.cart-item-info{ min-width: 0; }

.cart-item-name{
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 4px;
  word-break: break-word;
}

.cart-item-sub{ font-size: 12px; }

.cart-qty{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
}

.cart-qty .input{
  width: 92px;
  height: 40px;
  padding: 8px 10px;
}

.cart-actions{
  display:flex;
  justify-content:flex-start;
  gap:10px;
  margin-top: 12px;
  flex-wrap:wrap;
}

/* Summary */
.cart-summary-title{
  font-size: 16px;
  font-weight: 1000;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.cart-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 8px 0;
}

.cart-divider{ height:1px; background: var(--border); margin: 8px 0; }
.cart-total{ font-size: 16px; }

.cart-summary-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 12px;
}

.cart-coupon-box{
  margin: 8px 0 2px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}

/* Cupom: alinhado à esquerda, input curto */
.cart-coupon-form{
  display:flex;
  flex-direction: column;
  gap: 8px;
  align-items:flex-start;
  text-align:left;
}

.cart-coupon-form label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.coupon-inline{
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  gap:10px;
  width: auto;
  max-width:100%;
}

.coupon-input{
  width: 133px;
  max-width: 133px;
  flex: 0 0 133px;
}

/* Aplicar / Remover (link style) - compartilhado */
.coupon-apply-link,
.coupon-remove-link,
.coupon-remove,
.cart-coupon-form button[name="remove_coupon"],
.cart-coupon-form button[data-action="remove-coupon"]{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
  border-radius: 0 !important;

  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: underline !important;
  cursor: pointer;

  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}
.coupon-apply-link:hover,
.coupon-remove-link:hover,
.coupon-remove:hover,
.cart-coupon-form button[name="remove_coupon"]:hover,
.cart-coupon-form button[data-action="remove-coupon"]:hover{ opacity: .75; }

@media (max-width: 720px){
  .table-cart thead{ display:none; }
  .table-cart, .table-cart tbody, .table-cart tr, .table-cart td{
    display:block;
    width:100%;
  }

  .table-cart tbody tr{
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);

    width: min(520px, calc(100% - 16px));
    margin: 0 auto;
    border-radius: 16px;
    background: rgba(255,255,255,.02);
  }
  .table-cart tbody tr:last-child{ border-bottom:none; }

  .table-cart tbody td{
    border: none;
    padding: 8px 0;
  }

  .table-cart tbody td:nth-child(1){ padding-top: 0; }
  .table-cart tbody td:nth-child(5){ padding-bottom: 0; }

  .table-cart tbody td:nth-child(2),
  .table-cart tbody td:nth-child(3),
  .table-cart tbody td:nth-child(4),
  .table-cart tbody td:nth-child(5){
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .table-cart tbody td:nth-child(2)::before{ content:"Preço"; color: var(--muted); font-size:12px; }
  .table-cart tbody td:nth-child(3)::before{ content:"Qtd"; color: var(--muted); font-size:12px; }
  .table-cart tbody td:nth-child(4)::before{ content:"Total"; color: var(--muted); font-size:12px; }

  .btn-remove{
    width: min(520px, calc(100% - 16px)) !important;
    margin: 0 auto !important;
    display:flex !important;
  }

  .coupon-input{
    width: 126px;
    max-width: 126px;
    flex: 0 0 126px;
  }
}

/* botão Remover (compacto) */
.table-cart td:last-child{ text-align: right; }

.btn-remove{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 20px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  background: #000 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  font-weight: 1000 !important;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn-remove:hover{ filter: brightness(.92); transform: translateY(-1px); }
.btn-remove:active{ transform: translateY(0); filter: brightness(.85); }

/* botão "Adicionar mais itens" */
.btn-add-more{ border-color: rgba(255,255,255,.18); font-size: 14px !important; }
.btn-add-more:hover{
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  filter: none !important;
}

/* =========================
   FIX MOBILE (iOS): mata hover preso no menu
========================= */
@media (hover: none), (pointer: coarse) {
  .topbar .nav a:hover,
  .topbar .nav-dd-btn:hover,
  .topbar .nav-dd-menu a:hover{
    background: transparent !important;
    color: var(--menu-text) !important;
    border-color: transparent !important;
    transform: none !important;
    filter: none !important;
  }

  .topbar .nav a:active,
  .topbar .nav a:focus,
  .topbar .nav a:focus-visible,
  .topbar .nav-dd-btn:active,
  .topbar .nav-dd-btn:focus,
  .topbar .nav-dd-btn:focus-visible,
  .topbar .nav-dd-menu a:active,
  .topbar .nav-dd-menu a:focus,
  .topbar .nav-dd-menu a:focus-visible{
    background: #fff !important;
    color: var(--topbar-bg) !important;
    border-color: transparent !important;
    transform: translateY(-1px) !important;
  }

  .topbar .nav a.active,
  .topbar .nav a[aria-current="page"],
  .topbar .nav-dd-menu a.active,
  .topbar .nav-dd-menu a[aria-current="page"]{
    background: #fff !important;
    color: var(--topbar-bg) !important;
    border-color: transparent !important;
  }
}

/* =========================
   AUTH (login/register)
========================= */
.auth-wrap{ width: 100%; }

.auth-card{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.auth-body{ padding: 22px !important; }

.auth-form{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.auth-fields,
.auth-row,
.auth-actions{
  width: min(450px, 100%) !important;
  margin: 0 auto !important;
}

.auth-card form .input{
  width: 100% !important;
  min-height: 50px;
  font-size: 15px;
}

.auth-fields{ display: grid !important; gap: 12px !important; }

.auth-pass{ position: relative !important; width: 100% !important; }
.auth-pass .input{ padding-right: 52px !important; }

.auth-eye{
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.auth-row{
  margin-top: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

.auth-check{
  display:flex !important;
  align-items:center !important;
  gap: 10px !important;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.auth-check input{
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--btn-bg);
}

.auth-link{ white-space: nowrap; }

.auth-actions{
  margin-top: 14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.auth-btn-enter{
  font-size: 16px !important;
  padding: 13px 18px !important;
}

.auth-or{
  font-size: 12px;
  font-weight: 1000;
  color: var(--muted);
  opacity: .9;
}

/* título/sub e espaçamentos */
.auth-head{ margin-top: -10px; margin-bottom: 10px; }
.auth-title{ margin: 0 0 4px 0; }
.auth-sub{ margin: 0 0 29px 0 !important; }

@media (max-width: 560px){
  .auth-card{ width: calc(100% - 24px); }

  .auth-fields,
  .auth-row,
  .auth-actions{ width: 100% !important; }

  .auth-row{
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }
  .auth-link{
    margin-left: auto !important;
    text-align: right !important;
    white-space: nowrap;
  }

  .auth-actions{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .auth-or{
    width: 100%;
    text-align: center;
    padding: 2px 0;
  }

  .auth-head{ margin-top: -6px; }
}

/* =========================
   TRACK (public)
========================= */
.track-page{
  display:grid;
  gap: 14px;
  width: 100%;
}
.track-card .body{ padding: 16px; }

.track-form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.track-form-center{ align-items:center; }

.track-field{ width:100%; }

.track-field-center{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.track-field-center label{ width: min(520px, 100%); }

/* input maior */
.track-page .track-form-card .track-code-input{
  width: min(540px, calc(100% - 24px)) !important;
  max-width: 540px !important;
  font-size: 16px;
  padding: 14px 14px;
}
.track-page .track-form-card .track-field-center label,
.track-page .track-form-card .track-field-center .track-code-input{
  margin-left:auto;
  margin-right:auto;
  display:block;
}

/* centraliza botão */
.track-actions{ display:flex; gap: 10px; flex-wrap:wrap; align-items:center; }
.track-actions-center{ justify-content:center; width: min(520px, 100%); }

/* resultado */
.track-result-mini{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding: 14px;
}

.track-result-header{
  display:flex;
  align-items:center;
  gap: 12px;
}

.track-result-icon{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: transparent !important;
  border: 2px solid #0b2a5b !important;
  box-shadow: none !important;
}

.track-status-text{
  margin-top: 2px;
  font-weight: 1000;
  font-size: 18px;
  letter-spacing: -.01em;
}

.track-result-meta{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.track-meta-value{ font-weight: 900; }

/* empty / error */
.track-empty{
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.02);
}
.track-empty-title{ font-weight: 1000; margin-bottom: 6px; }
.track-empty-error{
  border-style: solid;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

/* mobile */
@media (max-width: 560px){
  .track-actions-center{ width: 100%; }
  .track-actions-center .btn{ width: 100%; }
}

/* =========================
   CHECKOUT (public) - limpo
========================= */
.checkout-wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 14px 34px;
}

/* compatibilidade (se existir layout antigo) */
.checkout-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items:start;
}
@media (min-width: 980px){
  .checkout-layout{
    grid-template-columns: 1.6fr .9fr;
    gap: 16px;
  }
  .checkout-right{
    position: sticky;
    top: 14px;
    align-self:start;
  }
}

/* stack (novo) */
.checkout-stack{
  display:grid;
  gap: 14px;
}

.checkout-card .body{ padding: 18px; }

.checkout-section-title{
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.checkout-divider{
  height:1px;
  background: var(--border);
  margin: 14px 0;
}

.checkout-form{ width:100%; }

/* ✅ 3 colunas no desktop, 1 no mobile */
.checkout-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.checkout-field{ min-width:0; }
.checkout-field.full{ grid-column: 1 / -1; }

@media (max-width: 820px){
  .checkout-grid{ grid-template-columns: 1fr; }
  .checkout-field.full{ grid-column: auto; }
}

.checkout-form label{
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .9;
}

.checkout-form .input{
  min-height: 50px;
  font-size: 15px;
}
.checkout-form textarea.input{
  min-height: 110px;
  line-height: 1.35;
}

/* Itens/resumo */
.checkout-items{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.checkout-item{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: baseline;
}
.checkout-item-name{ font-weight: 900; }
.checkout-item-qty{ min-width: 46px; text-align: right; }
.checkout-item-total{ min-width: 90px; text-align: right; }

@media (max-width: 560px){
  .checkout-item{
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name total"
      "qty total";
    row-gap: 6px;
  }
  .checkout-item-name{ grid-area: name; }
  .checkout-item-qty{ grid-area: qty; text-align:left; min-width: 0; }
  .checkout-item-total{ grid-area: total; }
}

/* Cupom (checkout): input fixo + links ao lado */
.checkout-coupon-row{
  display:flex;
  align-items:flex-end;
  gap:10px;
  width: 100%;
  flex-wrap:wrap;
}

.checkout-coupon-input{
  width: 220px !important;
  max-width: 220px !important;
  flex: 0 0 220px !important;
}

.checkout-actions{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content: flex-end;
}

.checkout-coupon-row .coupon-apply-link,
.checkout-coupon-row .coupon-remove-link{
  margin-bottom: 8px !important;
}

@media (max-width: 560px){
  .checkout-coupon-row{
    flex-direction: column;
    align-items: stretch;
  }
  .checkout-coupon-input{
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
  .checkout-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .checkout-actions .btn{ width: 100%; }
}

/* espaço apenas no card de resumo (2º card), se você usa stack */
.checkout-stack > .checkout-card:nth-of-type(2) .checkout-section-title{
  margin-bottom: 26px;
}
.checkout-stack > .checkout-card:nth-of-type(2) .checkout-items{
  margin-top: 6px;
}

/* =========================
   ACCOUNT (public)
========================= */
.account-wrap{
  width: 100%;
  display: grid;
  gap: 14px;
}
.account-card .body{ padding: 16px; }

.account-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.account-hello{
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.account-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.account-title{
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: -.01em;
}

.account-section-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}

.account-empty{
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.02);
}
.account-empty-title{
  font-weight: 1000;
  margin-bottom: 6px;
}

.account-orders{
  display:grid;
  gap:10px;
}

.account-order{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

/* barra de destaque lateral */
.account-order::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:4px;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .95);
  opacity: .85;
}

/* zebra */
.account-order:nth-child(odd){ background: rgba(255,255,255,.035); }
.account-order:nth-child(even){
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.12);
}

@media (hover:hover) and (pointer:fine){
  .account-order:hover{
    transform: translateY(-1px);
    border-color: rgba(var(--brand-rgb), .28);
    background: rgba(var(--brand-rgb), .06);
  }
  .account-order:hover::before{ opacity: 1; }
}

.account-order-code{
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.account-order-meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 6px;
  flex-wrap:wrap;
}

.account-order-actions{
  display:flex;
  justify-content:flex-end;
}

.account-track-btn{ white-space: nowrap; }

/* espaço interno pro accent bar */
.account-order-main{ padding-left: 8px; }

@media (max-width: 560px){
  .account-order{
    flex-direction: column;
    align-items: stretch;
  }
  .account-order-actions{ width:100%; }
  .account-track-btn{
    width:100%;
    justify-content:center;
  }
}

/* =========================================
   MY-ORDERS (filtros) — fixa layout no mobile
   - garante botões ABAIXO do código (não à direita)
   - inputs voltam a ocupar largura total
========================================= */
.orders-filters{
  display: block !important; /* mata qualquer display:flex global */
}

.orders-filters-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.orders-filters .field{ min-width: 0; }
.orders-filters .input{ width: 100% !important; max-width: none !important; }

.orders-filters-actions{
  width: 100%;
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start; /* não empurra pra direita */
}

/* Tablet: 2 colunas e código ocupa a linha inteira */
@media (max-width: 900px){
  .orders-filters-grid{
    grid-template-columns: 1fr 1fr;
  }
  .orders-code-field{
    grid-column: 1 / -1;
  }
}

/* Mobile: tudo empilhado + botões em coluna abaixo do código */
@media (max-width: 720px){
  .orders-filters-grid{
    grid-template-columns: 1fr !important;
  }

  .orders-filters-actions{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .orders-filters-actions .btn,
  .orders-filters-actions a.btn{
    width: 100% !important;
    justify-content: center !important;
  }
}
