.zg-header-action{ position: relative; display: inline-flex; align-items: center; }
.zg-header-icon-link{ position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid #eceef1; border-radius: 50%; background: #fff; color: var(--zg-gray-50); transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease; }
.zg-header-icon-link:hover{ color: var(--zg-primary); border-color: rgba(226,21,20,.22); background: rgba(226,21,20,.04); transform: translateY(-2px); }
.zg-header-icon-link svg{ width: 23px; height: 23px; }
.zg-wishlist-count{ position: absolute; top: -4px; left: -4px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #fff; border-radius: 20px; background: var(--zg-primary); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
.zg-wishlist-count.is-empty, .zg-cart-count.is-empty{ display: none; }

.zg-header-popover{ position: absolute; z-index: 1300; top: calc(100% + 13px); left: 0; width: min(340px, 88vw); padding: 14px; direction: rtl; background: #fff; border: 1px solid #eceef1; border-radius: 18px; box-shadow: 0 18px 45px rgba(16,43,79,.18); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(9px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
.zg-header-popover::before{ content: ""; position: absolute; right: 0; left: 0; bottom: 100%; height: 16px; }
.zg-header-action.is-open > .zg-header-popover{ opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.zg-header-popover-title{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 11px; margin-bottom: 10px; border-bottom: 1px solid #f0f1f3; }
.zg-header-popover-title strong{ color: var(--zg-navy); font-size: 14px; }
.zg-header-popover-title span{ color: var(--zg-gray-100); font-size: 11px; }
.zg-header-popover-empty{ padding: 22px 12px; color: var(--zg-gray-100); text-align: center; font-size: 12px; line-height: 1.8; }
.zg-header-popover-primary{ display: flex; align-items: center; justify-content: center; min-height: 43px; padding: 8px 12px; border-radius: 11px; background: var(--zg-primary); color: #fff !important; font-size: 12px; font-weight: 700; box-shadow: var(--zg-red-shadow); }

.zg-cart-popover{ width: min(370px, 90vw); }
.zg-header-mini-cart-content .woocommerce-mini-cart{ max-height: 310px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.zg-header-mini-cart-content .woocommerce-mini-cart-item{ position: relative; display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px; min-height: 78px; padding: 8px 24px 8px 0; border-bottom: 1px solid #f1f2f4; }
.zg-header-mini-cart-content .woocommerce-mini-cart-item > a:not(.remove){ display: contents; color: var(--zg-dark-700); font-size: 12px; font-weight: 600; line-height: 1.65; }
.zg-header-mini-cart-content .woocommerce-mini-cart-item img{ grid-row: 1 / span 2; width: 64px; height: 64px; margin: 0; object-fit: contain; border: 1px solid #f0f1f3; border-radius: 10px; background: #fff; }
.zg-header-mini-cart-content .woocommerce-mini-cart-item .quantity{ grid-column: 2; color: var(--zg-gray-100); font-size: 11px; }
.zg-header-mini-cart-content .remove_from_cart_button{ position: absolute; top: 8px; right: 0; display: grid; place-items: center; width: 20px; height: 20px; color: var(--zg-primary) !important; background: rgba(226,21,20,.07); border-radius: 50%; font-size: 16px; line-height: 1; }
.zg-header-mini-cart-content .woocommerce-mini-cart__total{ display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 12px 2px; color: var(--zg-navy); border-bottom: 0; font-size: 12px; }
.zg-header-mini-cart-content .woocommerce-mini-cart__buttons{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.zg-header-mini-cart-content .woocommerce-mini-cart__buttons .button{ display: flex; align-items: center; justify-content: center; min-height: 42px; margin: 0; padding: 8px; border-radius: 10px; background: var(--zg-navy); color: #fff; font-size: 11px; }
.zg-header-mini-cart-content .woocommerce-mini-cart__buttons .checkout{ background: var(--zg-primary); }

.zg-mini-wishlist-list{ max-height: 310px; margin: 0 0 11px; padding: 0; overflow: auto; list-style: none; }
.zg-mini-wishlist-list li{ position: relative; min-height: 72px; padding: 7px 0 7px 26px; border-bottom: 1px solid #f1f2f4; }
.zg-mini-wishlist-product{ display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 10px; }
.zg-mini-wishlist-product img{ width: 58px; height: 58px; object-fit: contain; border: 1px solid #f0f1f3; border-radius: 9px; background: #fff; }
.zg-mini-wishlist-product span{ min-width: 0; }
.zg-mini-wishlist-product strong{ display: -webkit-box; overflow: hidden; color: var(--zg-dark-700); font-size: 12px; font-weight: 600; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.zg-mini-wishlist-product small{ display: block; margin-top: 3px; color: var(--zg-primary); font-size: 11px; }
.zg-mini-wishlist-list li > button{ position: absolute; top: 8px; left: 0; display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: var(--zg-primary); font-size: 17px; line-height: 1; }
.zg-account-popover{ width: 240px; }
.zg-account-popover-menu{ display: grid; gap: 3px; }
.zg-account-popover-menu a{ display: flex; align-items: center; min-height: 40px; padding: 7px 10px; color: var(--zg-dark-600); border-radius: 9px; font-size: 12px; transition: .2s ease; }
.zg-account-popover-menu a:hover{ color: var(--zg-primary); background: rgba(226,21,20,.055); }
.zg-account-popover-menu .is-logout{ color: var(--zg-primary); border-top: 1px solid #f0f1f3; border-radius: 0; margin-top: 5px; }

@media (hover:hover) and (pointer:fine) and (min-width:961px) {
  .zg-header-action:hover > .zg-header-popover, .zg-header-action:focus-within > .zg-header-popover{ opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
}

/* Reusable product cards */
.zg-product-card{ position: relative; display: flex; min-width: 0; height: 100%; flex-direction: column; padding: 14px 14px 16px; overflow: hidden; background: #fff; border: 1px solid #e7e8ea; border-radius: 24px; box-shadow: 0 8px 16px -2px rgba(110,110,110,.14); transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.zg-product-card:hover{ border-color: rgba(226,21,20,.22); box-shadow: var(--zg-gray-shadow); transform: translateY(-3px); }
.zg-product-card-top{ position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.zg-product-rating{ display: inline-flex; direction: ltr; align-items: center; gap: 4px; color: #ffc400; font-size: 12px; line-height: 1; }
.zg-product-rating strong{ color: var(--zg-dark-700); font-size: 11px; font-weight: 600; }
.zg-product-rating.is-empty{ color: #c8cbd0; }
.zg-wishlist-button{ display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #777d83; transition: color .2s ease, background .2s ease, transform .2s ease; }
.zg-wishlist-button:hover{ color: var(--zg-primary); background: rgba(226,21,20,.06); transform: scale(1.05); }
.zg-wishlist-button.is-active{ color: var(--zg-primary); background: rgba(226,21,20,.08); }
.zg-wishlist-button.is-active svg path{ fill: currentColor; }
.zg-wishlist-button svg{ width: 25px; height: 25px; }
.zg-product-card-image{ display: grid; width: 100%; height: clamp(150px, 15vw, 210px); place-items: center; padding: 5px; }
.zg-product-card-image img{ display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.zg-product-card-title{ display: block; margin-top: 3px; }
.zg-product-card-title h3{ display: -webkit-box; min-height: 57px; margin: 0; overflow: hidden; color: var(--zg-dark-700); font-size: 14px; font-weight: 600; line-height: 1.9; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.zg-product-card-bottom{ display: grid; grid-template-columns: minmax(0,1fr) 48px; align-items: end; gap: 10px; min-height: 62px; margin-top: auto; padding-top: 8px; }
.zg-product-card-price{ position: relative; display: flex; min-width: 0; min-height: 52px; flex-direction: column; justify-content: flex-end; align-items: flex-start; line-height: 1.45; }
.zg-product-card-price small{ color: var(--zg-gray-100); font-size: 10px; }
.zg-product-card-price del{ color: #a2a5aa; font-size: 10px; font-weight: 400; }
.zg-product-card-price > strong{ color: var(--zg-dark-700); font-size: 14px; font-weight: 700; white-space: nowrap; }
.zg-product-card-price > strong .woocommerce-Price-currencySymbol{ margin-right: 3px; font-size: .75em; font-weight: 400; }
.zg-product-card-stock{ color: var(--zg-gray-100) !important; font-size: 12px !important; }
.zg-product-card-discount{ position: absolute; right: -14px; bottom: 30px; display: grid; place-items: center; min-width: 55px; height: 28px; padding: 0 11px; color: #fff; background: var(--zg-primary); border-radius: 0 9px 9px 0; font-size: 11px; font-weight: 700; }
.zg-product-card-cart{ display: grid; place-items: center; width: 48px; height: 48px; align-self: end; border-radius: 14px; background: var(--zg-primary-light); color: #fff; box-shadow: var(--zg-red-shadow); transition: transform .2s ease, background .2s ease; }
.zg-product-card-cart:hover{ color: #fff; background: var(--zg-primary); transform: translateY(-2px); }
.zg-product-card-cart.is-disabled{ background: #383838; box-shadow: 0 8px 16px -2px rgba(49,49,49,.25); }
.zg-product-card-cart svg{ width: 25px; height: 25px; }



















/* Standard WooCommerce cards: functional wishlist button and two-line title. */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product{ position: relative; display: flex; height: 100%; flex-direction: column; }
.zg-loop-wishlist-button{ position: absolute; z-index: 5; top: 14px; left: 14px; background: rgba(255,255,255,.92); }
.woocommerce ul.products li.product .woocommerce-LoopProduct-link{ display: flex; min-width: 0; flex: 1; flex-direction: column; }
.woocommerce ul.products li.product .woocommerce-loop-product__title{ display: -webkit-box; min-height: 54px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.woocommerce ul.products li.product .button{ margin-top: auto; }

/* Wishlist page */
.zg-wishlist-page{ padding: 55px 0 85px; }
.zg-wishlist-page-header{ display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--zg-light); }
.zg-wishlist-page-header span{ color: var(--zg-primary); font-size: 12px; font-weight: 700; }
.zg-wishlist-page-header h1{ margin: 3px 0 0; color: var(--zg-navy); font-size: clamp(28px,4vw,44px); }
.zg-wishlist-page-header p{ max-width: 480px; margin: 0; color: var(--zg-gray-100); font-size: 13px; }
.zg-wishlist-grid{ display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; gap: 18px; }
.zg-wishlist-empty{ display: none; max-width: 600px; margin: 30px auto 0; padding: 55px 25px; text-align: center; border: 1px dashed #d9dce0; border-radius: 22px; background: #fff; }
.zg-wishlist-empty.is-visible{ display: block; }
.zg-wishlist-empty > span{ display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; color: var(--zg-primary); background: rgba(226,21,20,.07); border-radius: 50%; }
.zg-wishlist-empty > span svg{ width: 34px; height: 34px; }
.zg-wishlist-empty h2{ margin-bottom: 7px; color: var(--zg-navy); font-size: 22px; }
.zg-wishlist-empty p{ color: var(--zg-gray-100); font-size: 13px; }
.zg-wishlist-empty a{ display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 8px 18px; color: #fff; background: var(--zg-primary); border-radius: 11px; font-size: 12px; font-weight: 700; }
.zg-wishlist-toast{ position: fixed; z-index: 100000; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; max-width: min(360px, calc(100vw - 30px)); min-height: 48px; padding: 10px 15px; color: #fff; background: var(--zg-navy); border-radius: 13px; box-shadow: 0 16px 40px rgba(16,43,79,.25); opacity: 0; transform: translateY(18px); transition: .24s ease; }
.zg-wishlist-toast.is-visible{ opacity: 1; transform: translateY(0); }
.zg-wishlist-toast svg{ width: 20px; height: 20px; color: #fff; }
.zg-wishlist-toast span{ font-size: 12px; font-weight: 600; }

@media (max-width: 1180px) {
  
  
  
  .zg-product-card-image{ height: 175px; }
  .zg-wishlist-grid{ grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 960px) {
  .zg-header-popover{ position: fixed; top: 78px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 105px); overflow: auto; transform: translateY(-8px); }
  .admin-bar .zg-header-popover{ top: 124px; }
  .zg-header-action.is-open > .zg-header-popover{ transform: translateY(0); }
  .zg-header-icon-link{ width: 43px; height: 43px; flex-basis: 43px; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  .zg-product-card{ padding: 11px 11px 14px; border-radius: 20px; }
  .zg-product-card-image{ height: clamp(135px, 34vw, 190px); }
  .zg-product-card-title h3{ min-height: 54px; font-size: 13px; }
  .zg-product-card-bottom{ grid-template-columns: minmax(0,1fr) 46px; }
  .zg-product-card-cart{ width: 46px; height: 46px; }
  .zg-wishlist-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
}

@media (max-width: 560px) {
  .zg-header-actions{ gap: 4px; }
  .zg-header-icon-link, .zg-account-link, .zg-header-cart-icon{ width: 39px; height: 39px; flex-basis: 39px; }
  .zg-header-icon-link svg, .zg-account-link svg, .zg-header-cart-icon svg{ width: 21px; height: 21px; }
  .zg-header-popover{ top: 70px; right: 8px; left: 8px; border-radius: 16px; }
  .admin-bar .zg-header-popover{ top: 116px; }
  
  
  
  
  
  .zg-product-card{ padding: 9px 9px 12px; border-radius: 18px; }
  .zg-product-card-top{ min-height: 27px; }
  .zg-wishlist-button{ width: 29px; height: 29px; }
  .zg-wishlist-button svg{ width: 23px; height: 23px; }
  .zg-product-rating strong{ font-size: 10px; }
  .zg-product-rating svg{ width: 17px; height: 17px; }
  .zg-product-card-image{ height: 125px; }
  .zg-product-card-title h3{ min-height: 51px; font-size: 12px; line-height: 1.85; }
  .zg-product-card-bottom{ grid-template-columns: minmax(0,1fr) 43px; gap: 7px; min-height: 57px; }
  .zg-product-card-cart{ width: 43px; height: 43px; border-radius: 12px; }
  .zg-product-card-price > strong{ font-size: 12px; }
  .zg-product-card-price del, .zg-product-card-price small{ font-size: 9px; }
  .zg-product-card-discount{ right: -9px; bottom: 28px; min-width: 46px; height: 25px; padding-inline: 8px; font-size: 10px; }
  .zg-wishlist-page{ padding: 35px 0 65px; }
  .zg-wishlist-page-header{ display: block; margin-bottom: 22px; }
  .zg-wishlist-page-header p{ margin-top: 10px; }
  .zg-wishlist-grid{ gap: 9px; }
  .zg-wishlist-toast{ right: 10px; bottom: 12px; }
}

@media (max-width: 380px) {
  .zg-header-icon-link, .zg-account-link, .zg-header-cart-icon{ width: 36px; height: 36px; flex-basis: 36px; }
  .zg-product-card-image{ height: 110px; }
  .zg-product-card-title h3{ font-size: 11px; }
}


@media (max-width: 380px) { .zg-logo img{ width: 62px; } }












.zg-product-card-image{ flex: 0 0 auto; }
.zg-product-card-title{ position: relative; z-index: 2; display: block; width: 100%; margin-top: 7px; background: #fff; }
.zg-product-card-discount{ right: auto; left: -14px; border-radius: 0 9px 9px 0; }


























@media (max-width: 960px) {
  
  
  
  
  
  .zg-product-card-image{ position: relative; z-index: 1; }
  .zg-product-card-title{ margin-top: 8px; }
  .zg-product-card-discount{ left: -11px; }

  
  
  
  
  
  
  
  
  
  
  
}

@media (max-width: 560px) {
  
  
  .zg-product-card-image{ height: 122px; }
  .zg-product-card-title h3{ min-height: 50px; }
  .zg-product-card-discount{ right: auto; left: -9px; bottom: 28px; }

  
  
  
  
  
  
  
  
}









/* Version 0.11.0 interaction and card refinements. */
.zg-product-card-discount{
  right: auto !important;
  left: 0 !important;
  bottom: 73px !important;
  border-radius: 0 9px 9px 0 !important;
  z-index: 4;
}
.zg-product-card--wishlist .zg-product-card-discount{ bottom: 108px !important; }
.zg-wishlist-card-remove{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  margin-top: 9px;
  padding: 5px 9px;
  border: 1px solid rgba(226,21,20,.16);
  border-radius: 10px;
  background: rgba(226,21,20,.055);
  color: var(--zg-primary);
  font-size: 11px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.zg-wishlist-card-remove:hover{ background: var(--zg-primary); color: #fff; }
.zg-wishlist-card-remove span{ font-size: 18px; line-height: 1; }
.zg-product-card.is-removing{ opacity: .22; transform: scale(.98); pointer-events: none; }
.zg-wishlist-button.is-loading, .zg-wishlist-card-remove.is-loading{ opacity: .55; pointer-events: none; }
.zg-wishlist-toast.is-error{ background: #b42318; }

.zg-blog-view-all{ direction: rtl; flex-direction: row; }
.zg-blog-view-all span{ order: 1 !important; }
.zg-blog-view-all i{ order: 2 !important; }

@media (max-width: 960px) {
  .zg-header-cart-icon .zg-cart-count{
    display: grid !important;
    top: -5px;
    left: -5px;
    z-index: 3;
  }
}
@media (max-width: 560px) {
  .zg-product-card-discount{ bottom: 65px !important; }
  .zg-product-card--wishlist .zg-product-card-discount{ bottom: 101px !important; }
}
@media (max-width: 960px) {
  .zg-header-cart-icon .zg-cart-count.is-empty{ display: none !important; }
}

/* Version 0.15.0 — strict product-card media/content flow across the entire site. */
.zg-product-card{
  display: flex !important;
  flex-direction: column !important;
  isolation: isolate;
}
.zg-product-card .zg-product-card-top{ order: 1; flex: 0 0 auto; }
.zg-product-card .zg-product-card-image{
  position: relative !important;
  inset: auto !important;
  order: 2;
  display: grid !important;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  margin: 0;
  background: #fff;
  transform: none !important;
}
.zg-product-card .zg-product-card-image img{
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 96% !important;
  max-height: 96% !important;
  object-fit: contain !important;
  object-position: center !important;
  mix-blend-mode: normal !important;
}
.zg-product-card .zg-product-card-title{
  position: relative !important;
  inset: auto !important;
  order: 3;
  display: block !important;
  flex: 0 0 auto;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  background: #fff;
  transform: none !important;
}
.zg-product-card .zg-product-card-title h3{ position: static !important; inset: auto !important; margin: 0; }
.zg-product-card .zg-product-card-bottom{ order: 4; }
.zg-product-card .zg-wishlist-card-remove{ order: 5; }

/* v0.22 variable product card prices: compact two-line range */
.zg-product-card-price.is-variable{
  gap: 2px;
  min-width: 0;
  padding-left: 4px;
}
.zg-variable-card-price-row{
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  line-height: 1.25;
  white-space: nowrap;
}
.zg-variable-card-price-row small{
  flex: 0 0 auto;
  color: var(--zg-gray-100);
  font-size: 8px;
}
.zg-variable-card-price-row strong{
  min-width: 0;
  overflow: hidden;
  color: var(--zg-dark-700);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zg-variable-card-price-row.is-max strong{ color: var(--zg-gray-200); font-size: 10px; }
.zg-product-card-bottom{ align-items: flex-end; }
@media (max-width: 640px) {
  .zg-variable-card-price-row strong{ font-size: 9px; }
  .zg-variable-card-price-row.is-max strong{ font-size: 8px; }
}
/* Bachehaye Shargh v1.0.10 wishlist visibility fix */
.zg-product-card--wishlist .zg-wishlist-card-remove,
.zg-wishlist-card .zg-wishlist-card-remove{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative;
    z-index:5;
}
.zg-product-card--wishlist{overflow:visible !important;height:auto !important;}
