:root{
  --bg:#08090a;
  --panel:#0f1113;
  --panel2:#151719;
  --line:#2a2d31;
  --text:#f4f4f5;
  --muted:#a7a7ac;
  --yellow:#ffbf00;
  --green:#18b84e;
}
*{box-sizing:border-box}
body{
  margin:0;
  background:radial-gradient(circle at 45% -15%,rgba(255,191,0,.08),transparent 32%),var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button,input,select,textarea{font:inherit}
.container{width:min(1500px,calc(100% - 36px));margin:auto}
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(4,5,6,.96);
  border-bottom:1px solid #181a1d;
  backdrop-filter:blur(12px)
}
.topbar-inner{min-height:92px;display:flex;align-items:center;gap:26px}
.brand{display:flex;align-items:center;gap:12px;min-width:260px}
.brand-icon{font-size:44px}
.brand h1{margin:0;color:var(--yellow);font-size:29px}
.brand h1 span{color:#fff}
.brand small{display:block;font-size:10px;letter-spacing:3px;font-weight:800;color:#ddd;margin-top:4px}
.store-copy{display:flex;flex-direction:column;gap:3px;color:#f2f2f3;font-size:13px;min-width:220px}
.store-copy span{color:var(--muted)}
.top-nav{display:flex;justify-content:center;gap:6px;flex:1}
.nav-btn{
  color:#eee;background:transparent;border:0;cursor:pointer;padding:31px 12px 26px;
  font-weight:800;position:relative
}
.nav-btn.active{color:var(--yellow)}
.nav-btn.active:after{
  content:"";position:absolute;left:8px;right:8px;bottom:13px;height:3px;border-radius:999px;background:var(--yellow)
}
.manage-btn{
  text-decoration:none;color:#111;background:var(--yellow);font-weight:900;border-radius:999px;padding:12px 18px
}
.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:26px;padding:28px 0}
.section-heading h2{margin:0 0 4px;font-size:26px}
.section-heading p{margin:0 0 14px;color:var(--muted)}
.subcategories{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:18px}
.subcat-btn{
  background:#17191c;border:1px solid var(--line);color:#e8e8ea;border-radius:999px;
  padding:8px 14px;cursor:pointer
}
.subcat-btn.active{background:var(--yellow);color:#111;border-color:var(--yellow);font-weight:900}
.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.product-card{
  border:1px solid var(--line);background:linear-gradient(#111315,#0e1011);border-radius:13px;overflow:hidden;
  display:flex;flex-direction:column;min-height:380px
}
.product-image{height:190px;background:#0a0b0c center/cover no-repeat}
.product-info{padding:14px;display:flex;flex-direction:column;flex:1}
.product-info h3{margin:0 0 7px;color:var(--yellow);font-size:18px}
.product-info p{margin:0 0 14px;color:#c5c5c8;line-height:1.42;font-size:13px;flex:1}
.product-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px}
.price{font-size:18px;font-weight:900}
.primary,.secondary,.danger{
  border:0;border-radius:9px;padding:10px 13px;cursor:pointer;font-weight:900
}
.primary{background:var(--yellow);color:#0a0a0a}
.secondary{background:#292c30;color:#fff}
.danger{background:#412021;color:#ffadad}
.cart{
  position:fixed;top:104px;right:max(18px,calc((100vw - 1500px)/2 + 18px));width:285px;
  max-height:calc(100vh - 122px);overflow:auto;align-self:start;background:linear-gradient(#0e1011,#0a0b0c);
  border:1px solid #31343a;border-radius:14px;overflow:hidden
}
.cart-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:2px solid var(--yellow)}
.cart-head h2{margin:0;font-size:16px}
.cart-head button{border:0;background:transparent;color:white;cursor:pointer}
.cart-items{padding:6px 14px}
.cart-item{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}
.cart-item small{color:var(--muted)}
.qty-controls{display:flex;align-items:center;gap:7px}
.qty-controls button{width:27px;height:27px;border:1px solid var(--line);background:#1a1c1f;color:white;border-radius:7px}
.cart-total{display:flex;justify-content:space-between;margin:0 14px;padding:12px 0;border-bottom:1px solid var(--line);font-weight:900}
.cart-total strong{color:var(--yellow);font-size:18px}
.order-data-title{font-weight:900;padding:12px 14px 2px}
.cart label{display:grid;gap:6px;padding:0 14px;margin:8px 0;font-size:13px;font-weight:800}
input,select,textarea{
  width:100%;border:1px solid #35383c;background:#151719;color:white;border-radius:8px;padding:9px 10px;outline:none
}
input:focus,select:focus,textarea:focus{border-color:var(--yellow)}
.optional{font-weight:400;color:var(--muted)}
.whatsapp-btn{
  width:calc(100% - 28px);margin:7px 14px 4px;background:var(--green);color:white;border:0;border-radius:8px;
  padding:10px;font-size:12px;font-weight:900;cursor:pointer
}
.checkout-note{display:block;text-align:center;color:#d2d2d4;padding:0 8px 9px;font-size:10px}
.cart-info{margin:4px 14px 12px;border:1px solid var(--line);border-radius:9px;padding:8px;background:#131517}
.cart-info>div{display:flex;gap:8px;align-items:flex-start;padding:4px 0}
.cart-info strong{display:block;font-size:12px}
.cart-info small{color:#c9c9cb}
.info-icon{font-size:16px}
.footer-strip{
  border:1px solid var(--line);background:#0e1011;border-radius:10px;margin-bottom:22px;padding:15px 18px;
  display:flex;justify-content:space-between;color:#ddd
}
.admin-layout{padding:28px 0 45px;display:grid;gap:18px}
.panel{border:1px solid var(--line);background:#101214;border-radius:13px;padding:20px}
.panel h2{margin-top:0}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.panel label{display:grid;gap:6px;margin:12px 0;font-weight:800;font-size:13px}
.check{display:flex!important;align-items:center;gap:9px!important}
.check input{width:auto}
.field-help{color:var(--muted);font-weight:400}
.actions{display:flex;gap:9px;margin-top:14px}
.admin-row{
  display:grid;grid-template-columns:85px 1.4fr .7fr .7fr auto;gap:12px;align-items:center;
  padding:11px 0;border-bottom:1px solid var(--line)
}
.admin-thumb{width:85px;height:64px;border-radius:9px;object-fit:cover;background:#090a0b}
.status.on{color:#65de89;font-weight:900}
.status.off{color:#ff8a8a;font-weight:900}
.hidden{display:none!important}
.muted{color:var(--muted)}
@media(max-width:1250px){.products{grid-template-columns:repeat(3,1fr)}.store-copy{display:none}}
@media(max-width:980px){.products{grid-template-columns:repeat(2,1fr)}.top-nav{display:none}.page-grid{grid-template-columns:1fr 340px}}
@media(max-width:780px){.page-grid{grid-template-columns:1fr}.cart{position:static}.footer-strip{flex-direction:column;gap:8px}.brand{min-width:0;flex:1}}
@media(max-width:560px){.products{grid-template-columns:1fr}.product-card{min-height:auto}.product-image{height:220px}.grid-2{grid-template-columns:1fr}.admin-row{grid-template-columns:72px 1fr}.admin-row>*:nth-child(n+3){grid-column:2}}

.address-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}
.address-fields label:nth-child(1),
.address-fields label:nth-child(2),
.address-fields label:nth-child(3){grid-column:1/-1}
.address-fields label:nth-child(4){grid-column:1/-1}
.image-preview-wrap{display:flex;align-items:center;gap:12px;margin:10px 0}
.image-preview{width:180px;height:120px;object-fit:cover;border-radius:10px;border:1px solid var(--line);background:#090a0b}
@media(max-width:980px){.page-grid{grid-template-columns:1fr 310px}}
@media(max-width:780px){.page-grid{grid-template-columns:1fr}.cart{position:static}}

.pix-box{
  margin:8px 14px 10px;
  padding:11px;
  border:1px solid #3a3e43;
  background:#121416;
  border-radius:9px;
  display:grid;
  gap:9px;
}
.pix-box strong{display:block;color:var(--yellow);font-size:12px;margin-bottom:4px}
.pix-box small{display:block;color:var(--muted);margin-bottom:4px}
.pix-box code{
  display:block;
  background:#0b0d0e;
  border:1px dashed #3a3e43;
  border-radius:7px;
  padding:8px;
  color:#fff;
  word-break:break-all
}

.cart textarea{min-height:52px;max-height:70px;resize:vertical}
.cart input,.cart select,.cart textarea{font-size:12px;padding:7px 8px}
.cart label{font-size:11px;margin:6px 0}
.order-data-title{font-size:12px}
.totals-box{margin:0 14px;border-bottom:1px solid var(--line)}
.fee-line{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-size:11px;color:var(--muted)}
.totals-box .cart-total{margin:0;border-bottom:0;padding:9px 0}
.delivery-admin{margin:18px 0}
.delivery-add-row{display:grid;grid-template-columns:1fr 140px auto;gap:8px}
.zone-row{display:grid;grid-template-columns:1fr 120px auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}

@media(min-width:781px){
  .menu-area{padding-right:0}
}
@media(max-width:980px) and (min-width:781px){
  .page-grid{grid-template-columns:minmax(0,1fr) 285px}
  .cart{right:18px}
}
@media(max-width:780px){
  .page-grid{grid-template-columns:1fr}
  .cart{position:static;width:auto;max-height:none;overflow:visible}
}
@media(max-width:700px){
  .delivery-add-row{grid-template-columns:1fr}
  .zone-row{grid-template-columns:1fr auto}
}


/* ===== V7: painel Meu Pedido compacto e totalmente visível ===== */
@media (min-width: 781px){
  .page-grid{
    grid-template-columns:minmax(0,1fr) 300px !important;
    gap:18px !important;
  }

  .cart{
    position:fixed !important;
    top:94px !important;
    right:max(12px,calc((100vw - 1500px)/2 + 18px)) !important;
    width:300px !important;
    height:calc(100vh - 106px) !important;
    max-height:none !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
  }

  .cart-head{
    padding:8px 11px !important;
    flex:0 0 auto;
  }
  .cart-head h2{font-size:14px !important}

  /* Só a lista de itens rola quando o pedido tiver muitos produtos.
     Os campos Nome/Endereço/Pagamento ficam sempre visíveis. */
  .cart-items{
    padding:3px 10px !important;
    max-height:82px !important;
    min-height:34px !important;
    overflow-y:auto !important;
    flex:0 1 auto;
  }
  .cart-item{
    padding:5px 0 !important;
    font-size:10px !important;
  }
  .cart-item small{font-size:9px !important}
  .qty-controls{gap:4px !important}
  .qty-controls button{width:22px !important;height:22px !important;font-size:11px !important}

  .totals-box{margin:0 10px !important;flex:0 0 auto}
  .fee-line{padding:5px 0 !important;font-size:10px !important}
  .totals-box .cart-total{padding:6px 0 !important}
  .cart-total{font-size:11px !important}
  .cart-total strong{font-size:15px !important}

  .order-data-title{
    padding:7px 10px 0 !important;
    font-size:10px !important;
    flex:0 0 auto;
  }

  .cart label{
    padding:0 10px !important;
    margin:3px 0 !important;
    gap:3px !important;
    font-size:9px !important;
    flex:0 0 auto;
  }
  .cart input,.cart select,.cart textarea{
    padding:5px 7px !important;
    min-height:28px !important;
    font-size:10px !important;
    border-radius:6px !important;
  }
  .cart textarea{
    min-height:34px !important;
    max-height:34px !important;
    height:34px !important;
    resize:none !important;
  }

  .address-fields{
    display:grid !important;
    grid-template-columns:1fr 74px !important;
    gap:0 5px !important;
    flex:0 0 auto;
  }
  .address-fields label:nth-child(1){
    grid-column:1/-1 !important;
  }
  .address-fields label:nth-child(2){
    grid-column:1 !important;
  }
  .address-fields label:nth-child(3){
    grid-column:2 !important;
  }

  .pix-box{
    margin:4px 10px !important;
    padding:6px !important;
    gap:5px !important;
    flex:0 0 auto;
  }
  .pix-box strong{font-size:9px !important}
  .pix-box small{font-size:8px !important}
  .pix-box code{padding:5px !important;font-size:9px !important}
  .pix-box button{padding:6px !important;font-size:9px !important}

  .whatsapp-btn{
    width:calc(100% - 20px) !important;
    margin:4px 10px 2px !important;
    padding:8px !important;
    font-size:10px !important;
    flex:0 0 auto;
  }
  .checkout-note{
    padding:0 6px 4px !important;
    font-size:8px !important;
    flex:0 0 auto;
  }

  .cart-info{
    margin:2px 10px 8px !important;
    padding:4px 6px !important;
    flex:0 0 auto;
  }
  .cart-info>div{padding:2px 0 !important;gap:5px !important}
  .cart-info strong{font-size:8px !important}
  .cart-info small{font-size:8px !important}
  .info-icon{font-size:12px !important}
}

/* ===== V7: edição clara das taxas no admin ===== */
.delivery-panel{border-color:#4a3b08 !important}
.panel-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.panel-title-row h2{margin-bottom:3px}
.panel-title-row p{margin:0 0 12px}
.delivery-zones-list{margin:12px 0}
.zone-row{
  display:grid !important;
  grid-template-columns:minmax(180px,1fr) 150px auto !important;
  gap:10px !important;
  align-items:center !important;
  padding:9px 0 !important;
}
.zone-price-wrap{
  display:grid;
  grid-template-columns:28px 1fr;
  align-items:center;
  border:1px solid #35383c;
  border-radius:8px;
  overflow:hidden;
  background:#151719;
}
.zone-price-wrap span{text-align:center;color:var(--muted);font-weight:800}
.zone-price-wrap input{border:0 !important;border-radius:0 !important}
.save-fees-btn{margin-top:4px}
.empty-zones{padding:12px 0}

@media(max-width:780px){
  .cart{
    position:static !important;
    width:auto !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    display:block !important;
  }
  .cart-items{max-height:160px !important;overflow-y:auto !important}
  .zone-row{grid-template-columns:1fr !important}
}

.admin-top-actions{display:flex;align-items:center;gap:8px}


/* ===== V10: modo demonstração ===== */
.demo-banner{
  position:relative;
  z-index:1000;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  padding:10px 18px;
  text-align:center;
  background:#fff3cd;
  color:#2b2100;
  border-bottom:2px solid #f2c94c;
  font-size:13px;
}
.demo-banner strong{
  font-weight:900;
  white-space:nowrap;
}
.demo-banner span{
  font-weight:700;
}
@media(max-width:780px){
  .demo-banner{
    flex-direction:column;
    gap:2px;
    padding:8px 12px;
    font-size:11px;
  }
}
