:root{
  --green:#0b6b35;
  --green-dark:#064520;
  --red:#d92027;
  --cream:#fff8ef;
  --border:#e6e6e6;
  --text:#202124;
  --muted:#667085;
}

/* Não quebrar o layout original */
body .container{
  width:min(1160px,92vw) !important;
  max-width:1160px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.brand img{
  width:54px !important;
  height:54px !important;
  object-fit:contain !important;
}

.brand-title{
  white-space:nowrap;
}

/* Correção dos produtos largos */
.grid-products{
  width:100% !important;
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:stretch !important;
}

.grid-products .product-card{
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
}

.grid-products .product-card .photo{
  height:170px !important;
  min-height:170px !important;
  overflow:hidden !important;
}

.grid-products .product-card .photo img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}

.product-body{
  min-width:0 !important;
}

.desc{
  min-height:38px;
}

/* Barra da localização na home */
.pizza-local-bar{
  max-width:1160px;
  width:92vw;
  margin:14px auto 0;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:#fff;
  border:1px solid #d7ecd8;
  border-radius:18px;
  box-shadow:0 12px 35px rgba(0,0,0,.08);
  color:#173b24;
  position:relative;
  z-index:5;
}

.pizza-local-bar b{
  color:var(--green);
}

.pizza-local-bar small{
  color:#516057;
  line-height:1.35;
}

.pizza-local-bar button{
  border:0;
  background:var(--green);
  color:#fff;
  border-radius:999px;
  padding:11px 15px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

/* Modal de estado/cidade */
.pizza-location-overlay{
  position:fixed;
  inset:0;
  z-index:999999;
  background:rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.pizza-location-modal{
  width:min(640px,100%);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:26px;
  padding:22px;
  box-shadow:0 25px 80px rgba(0,0,0,.35);
}

.pizza-location-modal h2{
  margin:0 0 8px;
  color:var(--green);
  font-size:28px;
  line-height:1.1;
}

.pizza-location-modal p{
  margin:0 0 18px;
  color:#555;
  line-height:1.45;
}

.pizza-location-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:14px;
}

.pizza-location-modal label{
  display:block;
  font-weight:900;
  margin-bottom:6px;
  color:#222;
}

.pizza-location-modal select{
  width:100%;
  padding:14px;
  border:2px solid #ddd;
  border-radius:16px;
  font-size:16px;
  background:#fff;
}

.pizza-location-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}

.pizza-location-actions button{
  border:0;
  border-radius:999px;
  padding:13px 16px;
  font-weight:900;
  cursor:pointer;
}

.pizza-location-actions .confirm-city,
.pizza-location-actions .use-location{
  background:var(--green);
  color:#fff;
}

.pizza-location-actions .close-location{
  background:#f1f1f1;
  color:#333;
}

.pizza-store-preview{
  padding:14px;
  border:1px solid #e3e8e5;
  border-radius:18px;
  background:#f7fff9;
  color:#173b24;
}

.pizza-store-preview strong{
  display:block;
  margin-bottom:5px;
}

.pizza-store-preview small{
  color:#516057;
  line-height:1.35;
}

/* Card unidade no checkout */
.pizza-unidade-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
  padding:14px 16px;
  border:1px solid #d6eadc;
  background:#f0fff4;
  border-radius:18px;
  color:#143820;
}

.pizza-unidade-card strong{
  display:block;
  margin-bottom:4px;
}

.pizza-unidade-card small{
  display:block;
  color:#45634d;
  line-height:1.35;
}

.pizza-unidade-card button{
  border:0;
  background:#fff;
  color:var(--green);
  border:2px solid var(--green);
  font-weight:900;
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  white-space:nowrap;
}

/* Topbar apenas nas páginas checkout/pix/meus-pedidos */
.topbar.pizza-topbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:14px 0 !important;
  flex-wrap:wrap !important;
  background:transparent !important;
  box-shadow:none !important;
  position:relative !important;
}

.topbar.pizza-topbar a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:46px !important;
  min-width:145px !important;
  padding:12px 18px !important;
  border-radius:999px !important;
  background:var(--green) !important;
  color:#fff !important;
  font-weight:900 !important;
  font-size:14px !important;
  line-height:1 !important;
  text-transform:uppercase !important;
  border:0 !important;
  text-decoration:none !important;
  opacity:1 !important;
  visibility:visible !important;
}

.topbar.pizza-topbar a.secondary{
  background:#fff !important;
  color:var(--green) !important;
  border:2px solid var(--green) !important;
}

.back:empty::before{
  content:"← VOLTAR";
}

/* Checkout mobile */
#formCheckout .row,
#formCheckout .row-3{
  gap:14px;
}

#formCheckout input,
#formCheckout select,
#formCheckout textarea{
  max-width:100%;
}

.codebox{
  word-break:break-all !important;
  overflow:auto !important;
}

/* Responsivo */
@media(max-width:1050px){
  .grid-products{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media(max-width:820px){
  .grid-products{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .pizza-location-grid{
    grid-template-columns:1fr;
  }

  .pizza-local-bar{
    flex-direction:column;
    align-items:flex-start;
  }

  .pizza-local-bar button{
    width:100%;
  }

  .pizza-unidade-card{
    flex-direction:column;
  }

  .pizza-unidade-card button{
    width:100%;
  }

  #formCheckout .row,
  #formCheckout .row-3,
  .row,
  .row-3{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:560px){
  body .container{
    width:92vw !important;
  }

  .brand img{
    width:44px !important;
    height:44px !important;
  }

  .grid-products{
    grid-template-columns:1fr !important;
  }

  .grid-products .product-card .photo{
    height:210px !important;
  }

  .pizza-location-modal{
    padding:18px;
    border-radius:22px;
  }

  .pizza-location-modal h2{
    font-size:24px;
  }

  .topbar.pizza-topbar a{
    width:100% !important;
  }
}

.checkout-carrinho-detalhado{
  margin-top:18px !important;
}

.checkout-carrinho-detalhado h3{
  margin-top:0;
  color:#0b6b35;
}

.checkout-carrinho-lista{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.checkout-carrinho-item{
  display:grid;
  grid-template-columns:64px 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:10px;
}

.checkout-carrinho-item img{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:14px;
  background:#f1f5f9;
}

.checkout-carrinho-item strong{
  display:block;
}

.checkout-carrinho-item small{
  display:block;
  color:#667085;
  line-height:1.35;
}

.checkout-carrinho-item b{
  color:#0b6b35;
  white-space:nowrap;
}

.checkout-carrinho-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #e5e7eb;
  font-size:18px;
}

.checkout-carrinho-total strong{
  font-size:24px;
  color:#0b6b35;
}

@media(max-width:620px){
  .checkout-carrinho-item{
    grid-template-columns:56px 1fr;
  }

  .checkout-carrinho-item b{
    grid-column:1 / -1;
    text-align:right;
  }
}
