/*
 * Responsive shell and fixed mobile navigation — Bachehaye Shargh 0.41.0
 * Layout changes follow the configured content width, not only the viewport.
 */

.zg-container{
  container-type: inline-size;
  container-name: zg-shell;
}

.zg-container > *, .zg-footer-main-grid > *, .zg-footer-lower > *{
  min-width: 0;
  max-width: 100%;
}

/* Fluid spacing keeps narrow custom desktop widths usable. */
.zg-header-inner, .zg-footer-main-grid, .zg-footer-lower{
  column-gap: clamp(10px, 2cqi, 28px);
}

@container zg-shell (max-width: 1180px) {.zg-header-inner{ gap: clamp(9px, 1.5cqi, 17px); }
  .zg-logo img{ width: clamp(72px, 7.5cqi, 84px); }
  .zg-primary-menu{ gap: clamp(12px, 1.7cqi, 20px); }
  .zg-primary-menu > li > a{ font-size: 11px; }
  .zg-header-search{ width: auto; flex: 1 1 250px; max-width: 290px; }
  .zg-header-cart{ min-width: 48px; }
  .zg-header-cart-copy{ display: none; }
  
  
  

  
  
  
  
  
  
  
  
  .zg-blog-track{ grid-auto-columns: calc((100% - 36px) / 3); }
  
  
  
  
  
  
  
  
  .zg-wishlist-grid, .zg-shop-product-grid, .zg-search-product-grid, .zg-blog-archive .zg-post-grid, .zg-related-grid{ grid-template-columns: repeat(3,minmax(0,1fr)); }
  .woocommerce ul.products{ --wc-grid-columns: 3; }
  .zg-features-grid{ grid-template-columns: repeat(3,minmax(0,1fr)); }}

@container zg-shell (max-width: 980px) {.zg-primary-nav{ display: none; }
  .zg-mobile-toggle{ display: grid; }
  .zg-header-search{ max-width: none; flex-basis: 220px; }
  
  
  

  
  
  
  
  
  

  
  
  
  

  
  
  
  .zg-blog-track{ grid-auto-columns: calc((100% - 18px) / 2); }

  
  
  
  
  
  
  
  
  .zg-footer-main-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  .zg-footer-lower{ grid-template-columns: minmax(0,1fr) 180px; }}

@container zg-shell (max-width: 820px) {.zg-footer-lower{ display: flex; flex-direction: column; }
  .zg-wishlist-grid, .zg-shop-product-grid, .zg-search-product-grid, .zg-blog-archive .zg-post-grid, .zg-related-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  .woocommerce ul.products{ --wc-grid-columns: 2; }
  .zg-features-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); }}




@media (max-width: 960px) {.zg-mobile-drawer{ padding-bottom: 104px; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .zg-mobile-general-nav{ margin-top: 16px; padding-top: 4px; border-top: 1px solid #eef0f3; }}

/* Fixed five-item mobile bottom navigation — minimal v1.0.5. */
.zg-mobile-bottom-nav{display:none}

@media (max-width:960px){
  .zg-mobile-drawer{z-index:1700;padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .zg-overlay{z-index:1600}
  .zg-mobile-general-nav,.zg-mobile-general-nav .menu,.zg-mobile-general-nav .sub-menu{max-width:100%}
  .zg-mobile-general-nav .sub-menu{position:static!important;display:block!important;width:auto!important;max-height:none!important;margin:0!important;padding:0 14px 4px 0!important;overflow:visible!important;visibility:visible!important;opacity:1!important;transform:none!important;box-shadow:none!important}
}

@media (max-width:767px){
  html{scroll-padding-bottom:calc(82px + env(safe-area-inset-bottom))}
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .zg-mobile-bottom-nav{
    position:fixed;
    z-index:1500;
    right:10px;
    bottom:calc(8px + env(safe-area-inset-bottom));
    left:10px;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    height:60px;
    padding:5px 6px;
    border:1px solid rgba(33,37,41,.08);
    border-radius:19px;
    background:rgba(255,255,255,.96);
    box-shadow:0 10px 34px rgba(33,37,41,.14);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
  }
  .zg-mobile-bottom-item{
    position:relative;
    display:flex;
    min-width:0;
    height:50px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    padding:3px 1px;
    border:0;
    border-radius:13px;
    background:transparent;
    color:#6f7278;
    font:inherit;
    text-decoration:none;
    transition:color .2s ease,background-color .2s ease,transform .2s ease;
  }
  .zg-mobile-bottom-item:active{transform:scale(.96)}
  .zg-mobile-bottom-icon{position:relative;display:grid;width:27px;height:27px;place-items:center;color:inherit}
  .zg-mobile-bottom-icon svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
  .zg-mobile-bottom-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:8.5px;font-weight:700;line-height:11px;white-space:nowrap;text-overflow:ellipsis}
  .zg-mobile-bottom-item.is-active,
  body.zg-mobile-menu-open [data-zg-mobile-menu-trigger],
  body.zg-cart-popup-open [data-zg-mobile-cart-trigger]{color:var(--zg-primary);background:rgba(226,21,20,.055)}
  .zg-mobile-bottom-item.is-active::after,
  body.zg-mobile-menu-open [data-zg-mobile-menu-trigger]::after,
  body.zg-cart-popup-open [data-zg-mobile-cart-trigger]::after{content:"";position:absolute;right:50%;bottom:2px;width:14px;height:2px;border-radius:999px;background:currentColor;transform:translateX(50%)}
  .zg-mobile-bottom-cart{transform:none}
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon{width:29px;height:29px;border:0;border-radius:0;background:transparent;box-shadow:none;transform:none}
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon svg{width:23px;height:23px}
  .zg-mobile-bottom-cart-count{position:absolute;top:-3px;left:-4px;display:grid;min-width:16px;height:16px;padding:0 4px;place-items:center;border:1.5px solid #fff;border-radius:999px;background:var(--zg-primary);color:#fff;font-size:8px;font-weight:800;line-height:1;box-shadow:0 2px 5px rgba(226,21,20,.2)}
  .zg-mobile-bottom-cart-count.is-empty{display:none}
  body.zg-ui-open .zg-mobile-bottom-nav{box-shadow:0 6px 20px rgba(33,37,41,.08)}
  body.admin-bar .zg-mobile-bottom-nav{bottom:calc(8px + env(safe-area-inset-bottom))}
}

@media (max-width:370px){
  .zg-mobile-bottom-nav{right:6px;left:6px;padding-inline:3px}
  .zg-mobile-bottom-label{font-size:8px}
  .zg-mobile-bottom-icon svg{width:21px;height:21px}
}

