:root{
  --navy:#071a42;
  --blue:#0863c9;
  --orange:#ff6500;
  --muted:#5d6b80;
  --line:#e6eaf0;
  --shadow:0 10px 28px rgba(14,43,82,.11);
  --radius:22px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;overflow-x:hidden}
body{margin:0;overflow-x:hidden;background:#f4f5f7;color:var(--navy);font-family:"Poppins",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.modal-open{overflow:hidden}
button,input,textarea{font:inherit}
.shop-page{width:min(100%,900px);margin:0 auto;padding:18px 24px 110px;background:#fff;min-height:100vh}
.shop-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:82px;border-bottom:1px solid #eef1f5}
.back-link{justify-self:start;color:#173152;text-decoration:none;font-weight:600}
.psc-brand img{display:block;width:190px;max-width:40vw;height:auto}
.share-button{justify-self:end;width:44px;height:44px;border:0;background:transparent;padding:0;cursor:pointer}
.share-button svg{width:32px;height:32px;fill:none;stroke:#ff6500;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round}
.merchant-hero{display:flex;align-items:center;gap:20px;padding:28px 0 24px}
.merchant-logo-box{width:112px;height:112px;flex:none;display:grid;place-items:center;padding:12px;border:1px solid #e7ebf0;border-radius:22px;background:#fff;box-shadow:var(--shadow)}
.merchant-logo-box img{width:100%;height:100%;object-fit:contain}
.eyebrow{color:var(--orange);font-size:.78rem;font-weight:800;letter-spacing:.08em}
.merchant-hero h1{margin:5px 0 6px;font-size:clamp(2rem,5vw,3rem);line-height:1.04;letter-spacing:-.045em}
.merchant-hero p{margin:0;color:var(--muted);font-size:.95rem}
.menu-tabs{position:sticky;top:0;z-index:20;display:flex;gap:9px;overflow-x:auto;padding:12px 0;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);scrollbar-width:none}
.menu-tabs::-webkit-scrollbar{display:none}
.menu-tab{flex:none;min-height:46px;padding:9px 15px;border:1.5px solid #dfe4eb;border-radius:999px;background:#fff;color:#2a4262;font-weight:700;cursor:pointer}
.menu-tab.is-active{border-color:var(--orange);background:#fff5ed;color:#d35400}
.menu-section{scroll-margin-top:76px;padding:26px 0 6px}
.menu-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.menu-heading h2{margin:0;font-size:clamp(1.65rem,4vw,2.3rem);letter-spacing:-.035em}
.menu-heading p{margin:6px 0 0;color:var(--muted);font-size:.9rem}
.promo-stack{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.promo-badge{padding:7px 10px;border-radius:999px;background:#fff1e7;color:#c94c00;font-size:.72rem;font-weight:800}
.product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.product-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.product-image-wrap{width:100%;aspect-ratio:1.45/1;overflow:hidden;background:#f3f5f7}
.product-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.product-content{display:flex;flex-direction:column;flex:1;padding:15px}
.product-content h3{margin:0;font-size:1.18rem;line-height:1.18}
.product-ingredients{margin:8px 0 0;color:#5d6879;font-size:.78rem;line-height:1.43}
.product-note{margin:7px 0 0;color:#a34b00;font-size:.73rem;font-weight:600}
.product-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:15px}
.product-price{color:#0c386f;font-size:1.15rem}
.qty-control{display:grid;grid-template-columns:38px 32px 38px;align-items:center;border:1px solid #dfe4eb;border-radius:11px;overflow:hidden;background:#fff}
.qty-btn{height:40px;border:0;background:#f5f7fa;color:#0e3b72;font-size:1.4rem;font-weight:700;cursor:pointer}
.qty-value{text-align:center;font-weight:800}
.cart-bar{position:fixed;left:50%;bottom:max(14px,env(safe-area-inset-bottom));z-index:50;width:min(calc(100% - 28px),850px);transform:translateX(-50%)}
.cart-bar-button{width:100%;min-height:66px;display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border:0;border-radius:18px;background:var(--orange);color:#fff;box-shadow:0 12px 30px rgba(255,101,0,.32);font-weight:800;cursor:pointer}
.cart-bar-left{display:flex;align-items:center;gap:10px}
.cart-count{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#fff;color:var(--orange)}
.shop-modal{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;padding:14px}
.shop-modal.is-open{display:flex}
.shop-modal-backdrop{position:absolute;inset:0;background:rgba(4,17,45,.66);backdrop-filter:blur(4px)}
.shop-modal-dialog{position:relative;z-index:1;width:min(100%,600px);max-height:calc(100dvh - 28px);overflow-y:auto;overflow-x:hidden;padding:28px 22px 22px;border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(0,24,70,.28)}
.modal-close{position:absolute;top:11px;right:11px;width:42px;height:42px;border:0;border-radius:50%;background:#f2f4f7;color:#173152;font-size:1.9rem;line-height:1;cursor:pointer}
.shop-modal-dialog h2{margin:0 46px 18px 0;font-size:1.8rem}
.cart-items{display:grid;gap:10px}
.cart-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e6eaf0;border-radius:14px}
.cart-item-info{display:grid;gap:3px;min-width:0}
.cart-item-info strong{font-size:.95rem}
.cart-item-info small{color:#748096}
.cart-item-info span{color:#0d4f96;font-size:.85rem;font-weight:700}
.cart-item-actions{display:grid;grid-template-columns:34px 28px 34px;align-items:center;text-align:center;flex:none}
.cart-item-actions button{height:34px;border:0;border-radius:8px;background:#f1f4f8;font-size:1.2rem;font-weight:800;cursor:pointer}
.cart-total-row{display:flex;align-items:center;justify-content:space-between;margin-top:18px;padding-top:16px;border-top:1px solid #e7ebf0;font-size:1.08rem}
.cart-disclaimer{color:#6b7688;font-size:.76rem;line-height:1.4}
.checkout-button,.submit-order{width:100%;min-height:58px;border:0;border-radius:12px;background:var(--orange);color:#fff;font-weight:800;cursor:pointer}
.checkout-form{display:grid;gap:14px}
.field{display:grid;gap:6px;width:100%;min-width:0}
.field>span{font-weight:700;color:#173152}
.field small{color:#7b8798;font-weight:500}
.field input,.field textarea{display:block;width:100%;min-width:0;max-width:100%;padding:12px 13px;border:1.5px solid #d8dee7;border-radius:11px;background:#fff;color:#132542;font-size:16px;outline:none}
.field input:focus,.field textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,101,0,.11)}
.checkout-summary{display:grid;gap:6px;padding:14px;border-radius:13px;background:#f6f9fc}
.checkout-summary>div{display:flex;justify-content:space-between;gap:15px}
.checkout-summary small{color:#657389;line-height:1.4}
.whatsapp-info{padding:13px;border:2px solid #25d366;border-radius:13px;background:#f1fff6;color:#214734;text-align:center;font-size:.87rem;line-height:1.45}
.checkout-result{text-align:center;padding:20px 0 4px}
.result-check{width:72px;height:72px;display:grid;place-items:center;margin:0 auto 14px;border-radius:50%;background:#16a66a;color:#fff;font-size:2rem;font-weight:800}
.checkout-result h3{margin:0;font-size:1.55rem}
.checkout-result p{color:#55657a;line-height:1.55}
.result-close{min-width:170px;min-height:48px;border:2px solid var(--orange);border-radius:10px;background:#fff;color:#cf5200;font-weight:800;cursor:pointer}
.app-download{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:38px;padding:22px;border:1px solid #dfe8f4;border-radius:22px;background:linear-gradient(135deg,#fff,#eef7ff);box-shadow:var(--shadow)}
.app-download h2{margin:4px 0 6px;color:#0a53aa}
.app-download p{margin:0;color:#53637a;font-size:.88rem}
.store-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.store-link{min-width:160px;min-height:58px;display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 10px;border:2px solid var(--orange);border-radius:11px;background:#fff;color:#111;text-decoration:none}
.store-icon{font-size:1.6rem}
.store-link small,.store-link strong{display:block;line-height:1.05}
.store-link small{font-size:.55rem}.store-link strong{font-size:.9rem}
.footer{padding:24px 0 0;text-align:center;color:#506078;font-size:.75rem}.footer p{margin:2px 0}
.shop-error{padding:70px 20px;text-align:center}
@media(max-width:680px){
  .shop-page{padding:12px 12px 105px}
  .shop-header{min-height:68px}
  .back-link span{display:none}
  .psc-brand img{width:155px}
  .merchant-hero{gap:13px;padding:22px 0 18px}
  .merchant-logo-box{width:82px;height:82px;padding:8px;border-radius:17px}
  .merchant-hero h1{font-size:1.65rem}
  .merchant-hero p{font-size:.78rem}
  .menu-tabs{margin:0 -12px;padding:10px 12px}
  .product-grid{grid-template-columns:1fr;gap:13px}
  .product-card{display:grid;grid-template-columns:38% 62%;min-height:160px}
  .product-image-wrap{height:100%;aspect-ratio:auto}
  .product-content{padding:13px 12px}
  .product-content h3{font-size:1.15rem}
  .product-ingredients{font-size:.77rem}
  .product-bottom{padding-top:11px}
  .app-download{flex-direction:column;align-items:stretch}
  .store-link{min-width:0}
}
@media(max-width:430px){
  .menu-heading{flex-direction:column}
  .promo-stack{justify-content:flex-start}
  .product-card{grid-template-columns:36% 64%}
  .qty-control{grid-template-columns:34px 28px 34px}
  .qty-btn{height:38px}
  .shop-modal{padding:8px}
  .shop-modal-dialog{max-height:calc(100dvh - 16px);padding:24px 14px 16px;border-radius:20px}
  .store-row{grid-template-columns:1fr}
}

.checkout-summary .regular-total strong{
  color:#7a8596;
  text-decoration:line-through;
}
.checkout-summary .promo-saving{
  color:#168452;
}
.checkout-summary .promo-saving strong{
  color:#168452;
}
.checkout-summary .promo-total{
  padding-top:7px;
  margin-top:2px;
  border-top:1px solid #dde5ee;
  color:#0a3d78;
  font-size:1.05rem;
}
.checkout-summary .promo-total strong{
  color:#ff6500;
  font-size:1.12rem;
}


/* PROMO MENU - MASSIMA EVIDENZA */
.promo-stack{
  width:100%;
  justify-content:flex-start !important;
  margin-top:12px;
}

.promo-badge{
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:54px;
  padding:12px 18px !important;
  border:2px solid #ff6500;
  border-radius:14px !important;
  background:#fff3e9 !important;
  color:#c84f00 !important;
  box-shadow:0 6px 16px rgba(255,101,0,.13);
  font-size:1rem !important;
  line-height:1.25;
  font-weight:800 !important;
  text-align:center;
  letter-spacing:.01em;
}

.promo-badge::before{
  content:"PROMO";
  flex:none;
  margin-right:10px;
  padding:5px 8px;
  border-radius:7px;
  background:#ff6500;
  color:#fff;
  font-size:.72rem;
  line-height:1;
  font-weight:800;
  letter-spacing:.06em;
}

@media(max-width:680px){
  .promo-badge{
    min-height:50px;
    padding:10px 12px !important;
    font-size:.92rem !important;
  }

  .promo-badge::before{
    margin-right:8px;
    font-size:.66rem;
  }
}


/* CHECKOUT - FIX DEFINITIVO SCROLL ORIZZONTALE */
.checkout-dialog{
  width:min(calc(100vw - 20px),600px) !important;
  max-width:calc(100vw - 20px) !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}

.checkout-dialog *,
.checkout-dialog *::before,
.checkout-dialog *::after{
  box-sizing:border-box !important;
  max-width:100%;
}

.checkout-form{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:hidden !important;
}

.checkout-form .field{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
}

.checkout-form input,
.checkout-form textarea{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

/* Safari / Android WebView: impedisce ai controlli nativi date/time di imporre una larghezza minima */
#pickupDate,
#pickupTime{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  -webkit-appearance:none;
  appearance:none;
  overflow:hidden !important;
}

#pickupDate::-webkit-date-and-time-value,
#pickupTime::-webkit-date-and-time-value{
  min-width:0 !important;
  text-align:left;
}

#pickupDate::-webkit-datetime-edit,
#pickupTime::-webkit-datetime-edit{
  min-width:0 !important;
  padding:0 !important;
}

#pickupDate::-webkit-datetime-edit-fields-wrapper,
#pickupTime::-webkit-datetime-edit-fields-wrapper{
  min-width:0 !important;
}

#pickupDate::-webkit-calendar-picker-indicator,
#pickupTime::-webkit-calendar-picker-indicator{
  flex:none;
  margin-left:6px;
}

/* Protezione ulteriore per viewport molto strette */
@media(max-width:680px){
  .checkout-dialog{
    width:calc(100vw - 16px) !important;
    max-width:calc(100vw - 16px) !important;
    padding-left:14px !important;
    padding-right:14px !important;
  }

  #pickupDate,
  #pickupTime{
    font-size:16px !important;
  }
}

@media(max-width:380px){
  .checkout-dialog{
    width:calc(100vw - 10px) !important;
    max-width:calc(100vw - 10px) !important;
    padding-left:11px !important;
    padding-right:11px !important;
  }
}
