/* =====================================================
   Woo Menu + Qty Controls Overrides (Tetra Pizza)
   - Keeps file small so you can replace easily
===================================================== */

/* Product card controls must be clickable (avoid overlays) */
.product-card .choose-btn,
.product-card .choose-area,
.product-card .qty-stepper,
.product-card .qty-stepper button{
  pointer-events: auto;
}

/* ===== Category pills navbar ===== */
.menu-category-nav.home-menu-cats{
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:6px 6px;
  scroll-snap-type:x proximity;
}
.menu-category-nav.home-menu-cats::-webkit-scrollbar{ height:0; }

.menu-category-btn{
  flex:0 0 auto;
  scroll-snap-align:start;
}

/* Smaller pills for better mobile */
.menu-category-btn{
  border:0;
  background: transparent;
  padding:0;
}
.menu-category-btn .cat-pill-name,
.menu-category-btn{
  font-weight:800;
}

.menu-category-btn{
  background: rgba(255,255,255,0.92);
  border-radius:999px;
  padding:9px 16px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.06);
  border:1px solid rgba(0,0,0,0.06);
  transition: .15s ease;
}
.menu-category-btn.active{
  background: linear-gradient(90deg,#ff3b30,#ff8a00);
  color:#fff;
  border-color: transparent;
}

@media (max-width: 520px){
  .menu-category-nav.home-menu-cats{ gap:8px; padding:6px 4px; }
  .menu-category-btn{ padding:8px 14px; font-size:13px; }
}

/* Scroll hint (fade) to show there are more categories */
.home-menu-cats{ position:relative; }
.home-menu-cats::before,
.home-menu-cats::after{
  content:"";
  position:absolute;
  top:0;
  width:34px;
  height:100%;
  pointer-events:none;
  z-index:3;
}
.home-menu-cats::before{
  right:0;
  background: linear-gradient(270deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
.home-menu-cats::after{
  left:0;
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
html[dir="rtl"] .home-menu-cats::before{ right:auto; left:0; }
html[dir="rtl"] .home-menu-cats::after{ left:auto; right:0; }
html[dir="rtl"] .home-menu-cats::before{
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
html[dir="rtl"] .home-menu-cats::after{
  background: linear-gradient(270deg, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* ===== Choose stepper (migrated from v23) ===== */
/* (styles live in style.css to avoid duplication) */


/* Ensure choose button still looks good */
.choose-btn{
  width:100%;
  margin-top:10px;
}


/* =====================================================
   Quick View Modal (Stay in Menu)
===================================================== */
.tetra-qv-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
  padding:16px;
}
.tetra-qv-overlay.is-open{ display:flex; }

.tetra-qv-modal{
  width:min(980px, 100%);
  max-height: min(86vh, 760px);
  overflow:auto;
  background:#fff;
  border-radius:18px;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
}
.tetra-qv{ padding:18px; }
.tetra-qv-close{
  position:sticky;
  top:0;
  margin-inline-start:auto;
  display:block;
  background:transparent;
  border:0;
  font-size:34px;
  line-height:1;
  cursor:pointer;
}
.tetra-qv-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
  align-items:start;
}
@media (max-width: 860px){
  .tetra-qv-grid{ grid-template-columns: 1fr; }
}

.tetra-qv-media img{ width:100%; height:auto; border-radius:14px; }
.tetra-qv-title{ margin:0 0 8px; }
.tetra-qv-price{ margin:0 0 10px; }
.tetra-qv-subtitle{ margin: 14px 0 8px; font-size: 16px; }
.tetra-qv-desc-text{ color:#333; }

/* Keep add-to-cart form tidy inside modal */
.tetra-qv .single_variation_wrap,
.tetra-qv form.cart{
  margin-top: 10px;
}
.tetra-qv form.cart .quantity{ margin-inline-end: 10px; }

/* =====================================================
   Category nav: mobile "واضح فيه سحب" + scroll hint
===================================================== */
.menu-category-nav{
  position:relative;
}
@media (max-width: 768px){
  .menu-category-nav{
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
  }
  .menu-category-nav::-webkit-scrollbar{ height: 6px; }
  .menu-category-nav::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.22); border-radius: 999px; }

  /* fade edges as hint */
  .menu-category-nav::before,
  .menu-category-nav::after{
    content:"";
    position:sticky;
    top:0;
    width:22px;
    height:100%;
    pointer-events:none;
    z-index:2;
  }
  .menu-category-nav::before{
    left:0;
    background: linear-gradient(to right, rgba(250,250,250,1), rgba(250,250,250,0));
  }
  .menu-category-nav::after{
    right:0;
    background: linear-gradient(to left, rgba(250,250,250,1), rgba(250,250,250,0));
  }
}



/* =========================
   Footer Delverina logo sizing fix (Woo pages too)
   Prevent global img rules from forcing big sizes
========================= */
footer .footer-apps-logo{
  height: 30px !important;
  width: auto !important;
  max-width: 180px !important;
  display: inline-block !important;
  object-fit: contain !important;
}
footer .footer-app-link img{
  height: 36px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
}

/* Center Delverina logo + store badges on one row */
footer .footer-apps{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  text-align:center;
}
footer .footer-app-link{
  display:inline-flex;
  align-items:center;
}
footer .footer-apps-logo{
  margin:0 6px;
}


/* Offer note under product title (Home menu grid) */
.product-note.offer-note{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #e11d30;
  font-weight: 700;
}

/* =========================================================
   Fix: Double size selector (Offers only)
   ========================================================= */
.tetra-offer-product form.cart table.variations,
.tetra-offer-product form.cart .variations,
.tetra-offer-product form.cart .reset_variations{
  display:none !important;
}



/* Stronger hide for Woo default size select on OFFERS products only (some themes output table outside form.cart) */
body.single-product.product_cat-offers .variations_form .variations,
body.single-product.product_cat-العروض .variations_form .variations,
body.single-product.product_cat-offers .variations_form .reset_variations,
body.single-product.product_cat-العروض .variations_form .reset_variations{
  display:none !important;
}
