/* Iceberry featured category, timed specials, fixed media frames, badges and weekly chart */

/* Keep top notification/cart badges visually identical. */
.topbar .icon-btn .badge,
.bottom-nav .bag i{
  width:24px!important;
  min-width:24px!important;
  height:24px!important;
  line-height:24px!important;
  padding:0!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  font-family:Vazirmatn,Tahoma,sans-serif!important;
  font-size:12px!important;
  font-weight:900!important;
  font-variant-numeric:tabular-nums!important;
  text-align:center!important;
}

/* Uploaded media never changes the size of its containing design frame. */
.hero.ice-has-managed-banner{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:1200/650!important;
  overflow:hidden!important;
}
.club.ice-has-managed-banner{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:1200/500!important;
  overflow:hidden!important;
}
.hero.ice-has-managed-banner .ice-managed-banner,
.club.ice-has-managed-banner .ice-managed-banner{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:inherit!important;
}
.product-card>img,
.ice-search-product-card>img{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  object-fit:contain!important;
  object-position:center!important;
  background:linear-gradient(145deg,#f8fbff,#f4f1ff)!important;
  overflow:hidden!important;
}
.ice-product-page-card>img,
.ice-product-large-img{
  width:100%!important;
  aspect-ratio:1/1!important;
  object-fit:contain!important;
  object-position:center!important;
  background:linear-gradient(145deg,#f8fbff,#f4f1ff)!important;
}

/* Featured products: centered rows, three cards per row, centered remainder. */
.products.ice-featured-products{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:stretch!important;
  gap:12px!important;
  direction:rtl!important;
}
.products.ice-featured-products>.product-card{
  flex:0 0 calc((100% - 24px)/3)!important;
  width:calc((100% - 24px)/3)!important;
  max-width:220px!important;
  min-width:0!important;
  margin:0!important;
}
.ice-featured-card{
  position:relative!important;
  overflow:hidden!important;
}
.ice-sale-ribbon{
  position:absolute;
  top:9px;
  right:9px;
  z-index:5;
  display:grid;
  place-items:center;
  min-width:38px;
  height:27px;
  padding:0 8px;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,#ff5c69,#d82746);
  box-shadow:0 7px 18px rgba(216,39,70,.28);
  font-size:11px;
  font-weight:950;
}
.ice-card-price{
  min-height:43px;
  margin:0 2px 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.ice-price-normal{
  display:inline-block;
  color:#2ca8df;
  font-weight:950;
}
.ice-price-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
}
.ice-price-stack del,
.ice-offer-old-price{
  color:#9aa2b6;
  font-size:12px;
  font-weight:800;
  text-decoration-thickness:2px;
}
.ice-price-stack strong,
.ice-offer-new-price{
  color:#df2d48!important;
  font-size:18px;
  font-weight:950;
}
.ice-price-stack.is-compact del{font-size:10px}
.ice-price-stack.is-compact strong{font-size:13px}
.ice-detail-price{
  margin:12px 0 16px;
  display:flex;
  justify-content:center;
}
.ice-detail-price .ice-price-stack del{font-size:15px}
.ice-detail-price .ice-price-stack strong{font-size:25px}
.ice-detail-sale-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  margin:0 auto 12px;
  padding:8px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#ff6370,#d92746);
  color:white;
  font-size:12px;
  font-weight:950;
  box-shadow:0 8px 20px rgba(216,39,70,.22);
}
.ice-sale-add{background:linear-gradient(135deg,#ff6370,#d92746)!important;color:white!important}

/* Timed special modal shown after the initial loader and instant notification. */
.ice-special-modal{
  position:fixed;
  inset:0;
  z-index:2147482500;
  display:grid;
  place-items:center;
  padding:20px;
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease,visibility .25s ease;
}
.ice-special-modal.show{opacity:1;visibility:visible}
.ice-special-backdrop{
  position:absolute;
  inset:0;
  background:rgba(23,27,49,.48);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}
.ice-special-dialog{
  position:relative;
  width:min(94vw,430px);
  max-height:min(86vh,720px);
  overflow:auto;
  border-radius:30px;
  padding:25px 18px 20px;
  text-align:center;
  background:
    radial-gradient(circle at top right,rgba(255,93,107,.18),transparent 34%),
    linear-gradient(160deg,#fff,#fff8f9);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 25px 70px rgba(62,35,70,.28);
  transform:translateY(18px) scale(.96);
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
}
.ice-special-modal.show .ice-special-dialog{transform:translateY(0) scale(1)}
.ice-special-close{
  position:absolute;
  top:12px;
  left:12px;
  width:38px;
  height:38px;
  border:0;
  border-radius:14px;
  background:#fff;
  color:#d72a45;
  font-size:25px;
  font-weight:900;
  box-shadow:0 7px 18px rgba(61,54,85,.12);
}
.ice-special-flame{font-size:38px;filter:drop-shadow(0 7px 14px rgba(229,50,71,.23));animation:iceFlamePulse 1.2s ease-in-out infinite}
.ice-special-kicker{display:block;margin-top:4px;color:#e03650;font-size:12px;font-weight:950}
.ice-special-dialog h2{margin:7px 0 14px;color:#26345e;font-size:24px;font-weight:950}
.ice-special-countdown{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  margin-bottom:14px;
  border-radius:18px;
  color:#9a2438;
  background:linear-gradient(135deg,#fff1f3,#ffe4e8);
  border:1px solid rgba(224,54,80,.12);
}
.ice-special-countdown span{font-size:11px;font-weight:850}
.ice-special-countdown strong{font-size:14px;font-weight:950;color:#d72945;direction:ltr}
.ice-special-products{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  justify-content:center;
  gap:9px;
  direction:rtl;
}
.ice-offer-product{
  flex:0 0 calc((100% - 18px)/3);
  width:calc((100% - 18px)/3);
  min-width:0;
  border:1px solid rgba(116,133,176,.13);
  border-radius:19px;
  padding:8px;
  background:rgba(255,255,255,.94);
  color:#26345e;
  font-family:inherit;
  box-shadow:0 8px 20px rgba(61,85,141,.07);
  cursor:pointer;
}
.ice-offer-product img{width:100%;aspect-ratio:1/1;object-fit:contain;border-radius:14px;background:#f6f8ff;display:block}
.ice-offer-product strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:34px;margin:7px 0 4px;font-size:11px;line-height:1.55;font-weight:950}
.ice-offer-product span{display:block}
.ice-offer-product .ice-offer-old-price{font-size:9px}
.ice-offer-product .ice-offer-new-price{font-size:12px}
.ice-offer-product small{display:block;margin-top:5px;color:#7a849f;font-size:9px;font-weight:800}
@keyframes iceFlamePulse{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.06)}}

/* Admin special-offer editor. */
.ice-special-admin-intro{margin-bottom:16px}
.ice-special-product-picker{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
  max-height:440px;
  overflow:auto;
  padding:3px;
}
.ice-special-picker-item{
  display:grid;
  grid-template-columns:auto 54px minmax(0,1fr);
  grid-template-areas:"check image info" "price price price";
  align-items:center;
  gap:10px;
  padding:11px;
  border-radius:19px;
  background:linear-gradient(145deg,#fff,#f7f8ff);
  border:1px solid rgba(111,130,180,.14);
  cursor:pointer;
}
.ice-special-picker-item>input[type="checkbox"]{grid-area:check;width:22px;height:22px;accent-color:#e23b53}
.ice-special-picker-item>img{grid-area:image;width:54px;height:54px;object-fit:contain;border-radius:14px;background:#f3f7ff}
.ice-special-picker-item>span{grid-area:info;min-width:0}
.ice-special-picker-item>span strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#28365f;font-size:13px}
.ice-special-picker-item>span small{display:block;margin-top:4px;color:#7c86a0;font-size:10px;font-weight:750}
.ice-special-picker-item>[data-special-price]{grid-area:price;width:100%;height:44px;border:1px solid rgba(116,134,181,.2);border-radius:14px;padding:0 12px;font:inherit;background:#fff}
.ice-special-picker-item>[data-special-price]:disabled{opacity:.45;background:#eef1f7}
.ice-special-admin-row .ice-special-admin-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:17px;background:#fff0f2;font-size:27px}
.ice-special-admin-row small{line-height:1.9}

/* Real weekly line chart, fixed from 500,000 to 10,000,000 tomans. */
#salesChart{padding:0!important;overflow:hidden!important;background:transparent!important}
.ice-real-chart-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 16px 8px}
.ice-real-chart-head strong{display:block;color:#26345e;font-size:16px;font-weight:950}
.ice-real-chart-head small{display:block;margin-top:5px;color:#7a849f;font-size:11px;font-weight:750;line-height:1.8}
.ice-real-chart-head>b{white-space:nowrap;color:#df2d48;font-size:17px}
.ice-real-chart-scroll{overflow-x:auto;padding:0 4px}
.ice-real-line-chart{display:block;width:100%;min-width:650px;height:auto;background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(248,249,255,.88));border-radius:22px}
.ice-chart-grid{stroke:rgba(102,119,164,.16);stroke-width:1;stroke-dasharray:5 6}
.ice-chart-y,.ice-chart-x{fill:#727d9a;font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px;font-weight:800}
.ice-chart-line{fill:none;stroke:#df2d48;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 5px 8px rgba(223,45,72,.18))}
.ice-chart-point{fill:#fff;stroke:#df2d48;stroke-width:4;cursor:pointer}
.ice-real-chart-note{margin:10px 14px 15px;padding:10px 12px;border-radius:14px;background:rgba(139,97,239,.08);color:#6e6593;font-size:10px;font-weight:800;line-height:1.9}

@media(max-width:520px){
  .topbar .icon-btn .badge,.bottom-nav .bag i{width:22px!important;min-width:22px!important;height:22px!important;line-height:22px!important;font-size:11px!important}
  .products.ice-featured-products{gap:9px!important}
  .products.ice-featured-products>.product-card{flex-basis:calc((100% - 18px)/3)!important;width:calc((100% - 18px)/3)!important}
  .ice-card-price{min-height:39px}
  .ice-price-stack.is-compact strong{font-size:11px}
  .ice-price-stack.is-compact del{font-size:8px}
  .ice-sale-ribbon{top:7px;right:7px;min-width:31px;height:23px;font-size:9px}
  .ice-special-dialog{padding:22px 13px 17px;border-radius:25px}
  .ice-offer-product{padding:6px;border-radius:16px}
  .ice-offer-product strong{font-size:9px;min-height:30px}
  .ice-special-product-picker{grid-template-columns:1fr}
  .ice-real-chart-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:350px){
  .products.ice-featured-products>.product-card{flex-basis:calc((100% - 9px)/2)!important;width:calc((100% - 9px)/2)!important}
  .ice-offer-product{flex-basis:calc((100% - 9px)/2);width:calc((100% - 9px)/2)}
}
@media(prefers-reduced-motion:reduce){.ice-special-dialog,.ice-special-modal,.ice-special-flame{animation:none!important;transition:none!important}}
