/* Shahram B-04 — fully scoped, RTL-first reconstruction of the supplied section. */
.shb04,
.shb04 *,
.shb04 *::before,
.shb04 *::after { box-sizing: border-box; }

.shb04 {
  --shb04-primary: #01193f;
  --shb04-accent: #16865a;
  --shb04-muted: #777e89;
  --shb04-card-bg: #fff;
  --shb04-overlay: #fff;
  --shb04-hover-duration: 450ms;
  direction: rtl;
  text-align: right;
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 32px 32px 112px;
  font-family: 'YekanBakh', 'Yekan Bakh', Tahoma, sans-serif;
  color: var(--shb04-primary);
}
.shb04 :is(h2,h3,p) { margin: 0; padding: 0; }
.shb04 :is(a,button) { -webkit-tap-highlight-color: transparent; }
.shb04 a { text-decoration: none; }
.shb04 button { font: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
.shb04 :is(a,button):focus-visible { outline: 2px solid var(--shb04-primary); outline-offset: 3px; }

/* 2 equal columns. In dir=rtl the first (hero) is on the RIGHT. */
.shb04__grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 40px;
  align-items: stretch;
}
.shb04__hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: #f7f7f6;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
}
.shb04__hero-image { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center; display: block; }
.shb04__hero-gradient,
.shb04__hero-gradient-hover {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 33.333%;
  z-index: 1;
}
.shb04__hero-gradient {
  background: linear-gradient(to top,
    color-mix(in srgb, var(--shb04-overlay) 95%, transparent) 0%,
    color-mix(in srgb, var(--shb04-overlay) 55%, transparent) 49%, transparent 100%);
}
.shb04__hero-gradient-hover {
  background: linear-gradient(to top,
    color-mix(in srgb, var(--shb04-overlay) 70%, transparent) 0%,
    color-mix(in srgb, var(--shb04-overlay) 25%, transparent) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 500ms ease;
}
.shb04__hero:hover .shb04__hero-gradient-hover,
.shb04__hero:focus-within .shb04__hero-gradient-hover { opacity: 1; }
.shb04__hero-caption {
  position: absolute;
  z-index: 2;
  bottom: 40px;
  inset-inline-start: 40px;
  max-width: calc(100% - 80px);
  pointer-events: none;
}
.shb04__hero-kicker {
  margin-bottom: 8px !important;
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--shb04-primary);
  line-height: 1.8;
}
.shb04__hero-title {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 300;
  color: var(--shb04-primary);
}
.shb04__hero-title strong { font-weight: 700; }
.shb04__hero-overlay-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }

/* Column: editorial text at top, two cards anchored to the bottom. */
.shb04__content { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 24px; }
.shb04__intro { min-width: 0; }
.shb04__kicker { font-size: 12px; line-height: 1.7; letter-spacing: .20em; color: var(--shb04-accent); margin-bottom: 12px !important; }
.shb04__heading { color: var(--shb04-primary); font-size: 36px; font-weight: 300; line-height: 1.24; }
.shb04__heading strong { font-weight: 700; }
.shb04__description { max-width: 28rem; color: var(--shb04-muted); font-size: 14px; line-height: 1.95; margin-top: 16px !important; }
.shb04__cta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 24px;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.8;
  color: var(--shb04-primary);
  transition: opacity .25s, color .25s;
}
.shb04__cta:hover { opacity: .7; color: var(--shb04-muted); }
.shb04__cta-icon { display: inline-flex; align-items: center; justify-content: center; transform: scaleX(-1); }
.shb04__cta-icon svg { width: 16px; height: 16px; transition: transform .25s ease; }
.shb04__cta:hover .shb04__cta-icon svg,
.shb04__cta:focus-visible .shb04__cta-icon svg { transform: translate(-2px, -2px); }

.shb04__cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.shb04__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: var(--shb04-card-bg);
}
.shb04__product-link { position: absolute; z-index: 1; inset: 0; display: block; border-radius: inherit; }
.shb04__product-image-frame {
  display: block;
  position: absolute;
  inset-block-start: 12px;
  inset-inline: 12px;
  bottom: 96px;
  border-radius: 17.6px;
  overflow: hidden;
}
.shb04__product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shb04__quick-actions {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-start: 20px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shb04 .shb04__wish {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--shb04-primary);
  box-shadow: none;
  line-height: 1;
  transition: background-color .23s ease, color .23s ease, transform .28s ease;
}
.shb04 .shb04__wish:hover,
.shb04 .shb04__wish:focus-visible { background: var(--shb04-primary); color: #fff; }
.shb04__wish:active { transform: scale(.88); }
.shb04__wish > svg { width: 18px; height: 18px; flex: 0 0 18px; }
.shb04__wish-filled {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--shb04-primary);
  clip-path: inset(100% 0 0 0);
  transition: clip-path .38s cubic-bezier(.2,.75,.2,1), color .23s ease;
}
.shb04__wish-filled svg { width: 18px; height: 18px; }
.shb04__wish.is-liked .shb04__wish-filled { clip-path: inset(0 0 0 0); }
.shb04__wish:hover .shb04__wish-filled,
.shb04__wish:focus-visible .shb04__wish-filled { color: #fff; }
.shb04__wish[aria-busy="true"] { pointer-events: none; opacity: .55; }

.shb04__product-meta {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  inset-inline-start: 16px;
  inset-inline-end: 64px;
  min-width: 0;
  pointer-events: none;
}
.shb04__product-name {
  color: var(--shb04-muted);
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.35;
}
.shb04__prices { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 6px; min-width: 0; margin-top: 2px; }
.shb04__price-now {
  display: inline-block;
  color: var(--shb04-accent);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 700;
  white-space: nowrap;
}
.shb04__price-now :is(del,ins) { color: inherit; text-decoration: none; background: none; }
.shb04__price-now del { font-size: 12px; color: var(--shb04-muted); text-decoration: line-through; margin-inline-end: 5px; }
.shb04__price-old { color: var(--shb04-muted); font-size: 12px; line-height: 1.5; text-decoration: line-through; white-space: nowrap; }
.shb04__prices .woocommerce-Price-currencySymbol { font-size: .76em; }

/* The source carries an initially scale(0) 96x96 wedge, top-start curved,
   anchored to bottom/end.  Scaling + icon recolor mimic the interactive behavior. */
.shb04__wedge {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  inset-inline-end: 0;
  bottom: 0;
  width: 96px;
  height: 96px;
  background: var(--shb04-primary);
  border-start-start-radius: 100%;
  transform: scale(0);
  transform-origin: left bottom;
  will-change: transform;
  transition: transform var(--shb04-hover-duration) cubic-bezier(.16, 1, .3, 1);
}
.shb04__card:is(:hover,:focus-within,.is-hovered) .shb04__wedge { transform: scale(1); }
.shb04 .shb04__cart {
  position: absolute;
  z-index: 7;
  inset-inline-end: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--shb04-primary);
  background: transparent;
  box-shadow: none;
  transition: color .28s ease, transform var(--shb04-hover-duration) cubic-bezier(.16, 1, .3, 1);
}
.shb04__cart svg { width: 22px; height: 22px; overflow: visible; }
.shb04__card:is(:hover,:focus-within,.is-hovered) .shb04__cart { color: #fff; transform: translateY(-1px) scale(1.06); }
.shb04 .shb04__cart:active { transform: scale(.91); }
.shb04 .shb04__cart.is-loading { opacity: .65; cursor: progress; }
.shb04 .shb04__cart.is-loading svg { animation: shb04-pulse .8s ease infinite alternate; }
@keyframes shb04-pulse { from { opacity: 1; } to { opacity: .35; } }
.shb04__empty { padding: 28px; background: #fff; border-radius: 16px; font-size: 13px; color: var(--shb04-muted); }
.shb04__notice {
  position: fixed;
  z-index: 99999;
  bottom: 26px;
  inset-inline-start: 26px;
  max-width: min(380px, calc(100vw - 40px));
  background: var(--shb04-primary);
  color: #fff;
  font-size: 13px;
  padding: 12px 18px;
  line-height: 1.8;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(1,25,63,.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.shb04__notice.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.shb04__notice.is-error { background: #a72533; }

@media (min-width: 1024px) {
  .shb04__hero { aspect-ratio: auto; }
}
@media (max-width: 1023px) {
  .shb04__grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .shb04__hero { aspect-ratio: 4 / 5; }
  .shb04__heading { font-size: 36px; }
}
@media (min-width: 640px) and (max-width: 767px) {
  .shb04__hero-caption { bottom: 24px; inset-inline-start: 24px; }
}
@media (max-width: 767px) {
  .shb04 { padding: 24px 16px 80px; }
  .shb04__heading { font-size: 30px; }
  .shb04__hero-title { font-size: 24px; }
}
@media (max-width: 639px) {
  .shb04 { padding-top: 8px; padding-bottom: 40px; }
  .shb04__hero { aspect-ratio: 5 / 4; }
  .shb04__hero-caption { bottom: 20px; inset-inline-start: 20px; max-width: calc(100% - 40px); }
  .shb04__hero-title { font-size: 20px; }
  .shb04__hero-kicker { font-size: 10px; margin-bottom: 8px !important; }
  .shb04__heading { font-size: 28px; }
  .shb04__cards { gap: 12px; }
  .shb04__card { aspect-ratio: 4 / 5; }
  .shb04__product-image-frame { inset-block-start: 8px; inset-inline: 8px; bottom: 68px; }
  .shb04__quick-actions { inset-block-start: 12px; inset-inline-start: 12px; }
  .shb04 .shb04__wish { width: 28px; height: 28px; }
  .shb04__wish > svg,
  .shb04__wish-filled svg { width: 15px; height: 15px; flex-basis: 15px; }
  .shb04__product-meta { bottom: 12px; inset-inline-start: 12px; inset-inline-end: 56px; }
  .shb04__price-now { font-size: 14px; }
  .shb04__price-old { font-size: 10px; }
  .shb04 .shb04__cart { bottom: 8px; inset-inline-end: 8px; width: 32px; height: 32px; }
  .shb04__cart svg { width: 19px; height: 19px; }
}
@media (min-width: 768px) and (max-width: 1023px) { .shb04 { padding-top: 32px; padding-bottom: 112px; } .shb04__grid { gap: 40px; } }
@media (hover: none) {
  .shb04__card:active .shb04__wedge { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .shb04 *, .shb04 *::before, .shb04 *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* v1.1.0 — show the WC currency symbol AFTER the numeral, including sale/range prices.
   Isolate bidirectional content so a right-to-left theme cannot visually reverse it. */
.shb04__prices .woocommerce-Price-amount bdi {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.shb04__price-separator { display: inline-block; padding-inline: 3px; }

/* AJAX cart: icon morph (bag -> tick -> bag) without moving the original button. */
.shb04 .shb04__cart { isolation: isolate; }
.shb04__cart-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1) rotate(0);
  transition: opacity 190ms ease, transform 240ms cubic-bezier(.2,.8,.2,1);
}
.shb04__cart-icon--check {
  opacity: 0;
  transform: scale(.35) rotate(-35deg);
}
.shb04__cart.is-added .shb04__cart-icon--bag {
  opacity: 0;
  transform: scale(.45) rotate(25deg);
}
.shb04__cart.is-added .shb04__cart-icon--check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.shb04__cart-icon--check svg { width: 25px; height: 25px; stroke-width: 2.6; }
.shb04__cart.is-added { color: #fff; }
/* When the pointer is no longer hovering, keep the confirmation visible on the navy corner. */
.shb04__card:has(.shb04__cart.is-added) .shb04__wedge { transform: scale(1); }
.shb04__notice { right: 26px; left: auto; inset-inline-start: 26px; inset-inline-end: auto; }
@media (max-width: 639px) {
  .shb04__cart-icon--check svg { width: 21px; height: 21px; }
  .shb04__notice { right: 16px; inset-inline-start: 16px; bottom: 16px; }
}
