/* ============================================================
   99STORE.MA — RESPONSIVE STYLESHEET
   ------------------------------------------------------------
   All breakpoints for the core layout defined in style.css.
   Loaded after style.css so these rules correctly override
   the desktop-first defaults. Kept in the exact same order
   and with the exact same values as the original stylesheet —
   no breakpoint values or rules were changed.
   ============================================================ */

/* ---------- container gutter (mobile) ---------- */
@media(max-width:720px){
  .container{padding:0 20px;}
}

/* ---------- header nav (tablet/mobile) ---------- */
@media(max-width:980px){
  .main-nav{display:none;}
  .burger{display:flex;}
}

/* ---------- hero (tablet/mobile) ---------- */
@media(max-width:980px){
  .hero .container{grid-template-columns:1fr;}
}

/* ---------- section padding (mobile) ---------- */
@media(max-width:720px){
  section{padding:60px 0;}
}

/* ---------- categories grid (tablet/mobile) ---------- */
@media(max-width:980px){
  .cat-grid{grid-template-columns:repeat(2,1fr);}
}

/* ---------- deals / bestsellers grid (tablet/mobile) ---------- */
@media(max-width:980px){
  .deals-grid,.bs-grid{grid-template-columns:repeat(2,1fr);}
}

/* ---------- promo split (tablet/mobile) ---------- */
@media(max-width:820px){
  .promo-split{grid-template-columns:1fr;}
}

/* ---------- value band (tablet/mobile) ---------- */
@media(max-width:820px){
  .value-grid{grid-template-columns:1fr;gap:32px;}
}
@media(max-width:820px){
  .value-item{border-right:none;border-bottom:1px solid var(--line);padding-bottom:32px;}
  .value-item:last-child{border-bottom:none;padding-bottom:0;}
}

/* ---------- footer grid (tablet/mobile) ---------- */
@media(max-width:980px){
  .foot-grid{grid-template-columns:repeat(2,1fr);}
}

/* ---------- WhatsApp "remember cart" phone field (mobile) ---------- */
/* This input is styled inline in index.html (font-size:13px) — an
   external stylesheet can only override an inline style with
   !important, so that's used here deliberately, only under 640px.
   Same iOS Safari auto-zoom fix as the other form fields above. */
@media(max-width:640px){
}
/* ============================================================
   MOBILE FIX — 99STORE
   ============================================================ */

@media (max-width: 640px){

  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  .container{
    width:100%;
    max-width:100%;
    padding-left:16px;
    padding-right:16px;
    box-sizing:border-box;
  }

  /* HEADER */
  header,
  .site-header,
  .main-header{
    max-width:100%;
    overflow:hidden;
  }

  .header-inner{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }

  .logo{
    min-width:0;
    flex-shrink:1;
  }

  .logo span{
    white-space:nowrap;
  }

  .header-actions{
    flex-shrink:0;
  }

  .icon-btn{
    width:36px;
    height:36px;
  }

  /* HERO */
  .hero{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }

  .hero .container{
    width:100%;
    box-sizing:border-box;
  }

  .hero h1{
    font-size:clamp(34px,10vw,48px);
    max-width:100%;
    overflow-wrap:anywhere;
  }

  .hero p.lead{
    max-width:100%;
  }

  /* العناصر المزخرفة ديال HERO */
  .hero-visual,
  .hero-media{
    max-width:100%;
    overflow:hidden;
  }

  /* PRODUCT GRIDS */
  .deals-grid,
  .bs-grid,
  .cat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }

  .product-card{
    min-width:0;
    max-width:100%;
  }

  .pc-title{
    overflow-wrap:anywhere;
  }

  /* DEALS */
  .deals-section{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }

  .deals-section .container{
    max-width:100%;
    box-sizing:border-box;
  }

  /* BUTTONS */
  .btn{
    max-width:100%;
    box-sizing:border-box;
  }

  /* IMAGES */
  img{
    max-width:100%;
  }

  /* FOOTER */
  .foot-grid{
    grid-template-columns:1fr 1fr;
    width:100%;
  }
}

/* VERY SMALL PHONES */
@media (max-width:380px){

  .container{
    padding-left:12px;
    padding-right:12px;
  }

  .logo .mark{
    width:32px;
    height:32px;
  }

  .logo{
    font-size:14px;
  }

  .icon-btn{
    width:34px;
    height:34px;
  }

  .deals-grid,
  .bs-grid,
  .cat-grid{
    gap:8px;
  }
}
@media (max-width:640px){
  .pc-badges{
    top:7px !important;
    left:7px !important;
    gap:3px !important;
    transform:scale(.78);
    transform-origin:top left;
  }

  .pc-badges .pc-badge{
    font-size:10.5px !important;
    padding:5px 9px !important;
    border-radius:5px !important;
    gap:3px !important;
  }
}