/*
 * 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. */
.zg-mobile-bottom-nav{ display: none; }

@media (max-width: 767px) {html{ scroll-padding-bottom: 92px; }
  body{ padding-bottom: 84px; }
  .zg-mobile-bottom-nav{
    position: fixed;
    z-index: 1500;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    align-items: end;
    min-height: 76px;
    padding: 7px max(6px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid rgba(16,43,79,.09);
    border-radius: 19px 19px 0 0;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -10px 30px rgba(16,43,79,.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .zg-mobile-bottom-item{
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    padding: 4px 2px 2px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--zg-gray-100);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
  }
  .zg-mobile-bottom-icon{ position: relative; display: grid; width: 36px; height: 34px; place-items: center; border-radius: 11px; transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease; }
  .zg-mobile-bottom-icon img{ display: block; width: 25px; height: 25px; object-fit: contain; filter: brightness(0) saturate(100%) invert(16%) sepia(31%) saturate(1693%) hue-rotate(176deg) brightness(88%) contrast(96%); transition: filter .2s ease, transform .2s ease; }
  .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,.07); }
  .zg-mobile-bottom-item.is-active .zg-mobile-bottom-icon, body.zg-mobile-menu-open [data-zg-mobile-menu-trigger] .zg-mobile-bottom-icon{ background: rgba(226,21,20,.09); }
  .zg-mobile-bottom-item.is-active .zg-mobile-bottom-icon img, body.zg-mobile-menu-open [data-zg-mobile-menu-trigger] .zg-mobile-bottom-icon img{ filter: brightness(0) saturate(100%) invert(14%) sepia(92%) saturate(3840%) hue-rotate(353deg) brightness(92%) contrast(94%); }

  .zg-mobile-bottom-cart{ z-index: 2; transform: translateY(-10px); }
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon{ width: 56px; height: 56px; margin-bottom: 0; border: 5px solid #fff; border-radius: 20px; background: var(--zg-primary-light); box-shadow: 0 10px 22px rgba(226,21,20,.27); }
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon img{ width: 29px; height: 29px; filter: brightness(0) invert(1); }
  .zg-mobile-bottom-cart > span:last-child{ margin-top: -1px; color: var(--zg-navy); }
  body.zg-cart-popup-open .zg-mobile-bottom-cart .zg-mobile-bottom-icon{ background: var(--zg-navy); box-shadow: 0 10px 22px rgba(16,43,79,.28); }
  body.zg-cart-popup-open .zg-mobile-bottom-cart > span:last-child{ color: var(--zg-primary); }
  .zg-mobile-bottom-cart-count{ position: absolute; top: -7px; left: -7px; display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--zg-navy); color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
  .zg-mobile-bottom-cart-count.is-empty{ display: none; }

  body.zg-ui-open .zg-mobile-bottom-nav{ box-shadow: none; }
  body.admin-bar .zg-mobile-bottom-nav{ bottom: 0; }}

@media (max-width: 370px) {.zg-mobile-bottom-item{ font-size: 8px; }
  .zg-mobile-bottom-icon{ width: 32px; }
  .zg-mobile-bottom-icon img{ width: 23px; height: 23px; }
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon{ width: 52px; height: 52px; }}


/* v0.42.0 — keep mobile-nav labels visible and lift only the cart icon. */
@media (max-width: 960px) {/* The drawer and all of its child menus must render above the fixed footer nav. */
  .zg-mobile-drawer{
    z-index: 1700;
    padding-bottom: calc(28px + 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(74px + env(safe-area-inset-bottom)); }
  body{ padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

  .zg-mobile-bottom-nav{
    height: calc(68px + env(safe-area-inset-bottom));
    min-height: 0;
    align-items: stretch;
    padding-top: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .zg-mobile-bottom-item{
    z-index: 1;
    height: 58px;
    min-height: 58px;
    justify-content: flex-end;
    gap: 2px;
    padding: 4px 2px 3px;
    overflow: visible;
    color: var(--zg-navy);
  }

  .zg-mobile-bottom-item > span:last-child{
    position: relative;
    z-index: 4;
    display: block;
    min-height: 13px;
    margin: 0;
    color: inherit;
    font-size: 9px;
    font-weight: 750;
    line-height: 13px;
    text-align: center;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .zg-mobile-bottom-icon{
    flex: 0 0 34px;
  }

  /* Do not move the whole cart item: only its round icon protrudes upward. */
  .zg-mobile-bottom-cart{
    z-index: 3;
    transform: none;
  }

  .zg-mobile-bottom-cart .zg-mobile-bottom-icon{
    position: absolute;
    top: -24px;
    right: 50%;
    left: auto;
    width: 56px;
    height: 56px;
    margin: 0;
    transform: translateX(50%);
  }

  .zg-mobile-bottom-cart > span:last-child{
    margin: 0;
    color: var(--zg-navy);
  }

  body.zg-cart-popup-open .zg-mobile-bottom-cart > span:last-child{
    color: var(--zg-primary);
  }}

@media (max-width: 370px) {.zg-mobile-bottom-item > span:last-child{ font-size: 8px; }
  .zg-mobile-bottom-cart .zg-mobile-bottom-icon{
    top: -22px;
    width: 52px;
    height: 52px;
  }}
