/* ============================================================
   MANAII — WOOCOMMERCE PRESENTATION
   Shop / category / product / cart / checkout / order result.
   No stock WooCommerce visuals survive. All values from tokens.css.
   ============================================================ */

/* Neutralise stock WooCommerce chrome we fully replace. */
.woocommerce-breadcrumb { display: none; } /* we render our own .breadcrumb */
/* WooCommerce's general stylesheet is dequeued (inc/performance.php), so its
   `.button` has no stock look to neutralise — every WooCommerce button that
   reaches the page is given the design's button below instead. (A former
   `.woocommerce .button { all: unset }` here also wiped the add-to-cart and
   place-order buttons into bare text.) */
.woocommerce .button, .woocommerce a.button, .woocommerce button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1;
  border-radius: var(--radius-pill); border: 1.5px solid var(--color-ink); background: transparent; color: var(--color-ink);
  cursor: pointer; text-decoration: none;
}
.woocommerce .button.alt, .woocommerce button.button.alt,
.woocommerce .single_add_to_cart_button, .woocommerce #place_order {
  background: var(--color-teal-deep); border-color: var(--color-teal-deep); color: var(--color-cream);
}
.woocommerce .button.alt:hover, .woocommerce .single_add_to_cart_button:hover, .woocommerce #place_order:hover { background: #0c8a78; border-color: #0c8a78; color: var(--color-cream); }
.woocommerce .button:disabled, .woocommerce .button.disabled, .woocommerce .single_add_to_cart_button.disabled {
  background: #F0EAD6; border-color: #F0EAD6; color: var(--color-muted-faint); cursor: not-allowed;
}

/* ============================================================
   Shop header (dark green storytelling band)
   ============================================================ */
.shop-header { background: var(--color-green-dark); color: var(--color-cream); }
.shop-header__inner { max-width: var(--container); margin: 0 auto; padding: 40px var(--gutter) 0; }
.shop-header .breadcrumb, .shop-header .breadcrumb a { color: rgba(255,246,220,.7); }
.shop-header .kicker { color: var(--color-gold); margin-top: 16px; }
.shop-header h1 { font-size: clamp(34px, 3.6vw, 46px); font-weight: 900; margin-top: 14px; }
.shop-header p { font-size: 17px; line-height: var(--lh-prose); max-width: 640px; margin-top: 16px; color: rgba(255,246,220,.9); }

/* Category pills */
.cat-pills { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 28px; }
.cat-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: rgba(255,246,220,.12); color: var(--color-cream); font-size: 15px; font-weight: 600; }
.cat-pill[aria-current="page"], .cat-pill.is-active { background: var(--color-gold); color: var(--color-ink); }

/* ============================================================
   Shop body — filter rail + results
   ============================================================ */
.shop-body { display: grid; grid-template-columns: 250px 1fr; gap: 40px; }
.shop-body--events { grid-template-columns: 1fr; }
.filter-rail { position: sticky; top: 24px; align-self: start; background: var(--color-white); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card); }
.filter-group { margin-bottom: 24px; }
.filter-group h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.filter-group label { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; cursor: pointer; }
.filter-group label .count { margin-inline-start: auto; color: var(--color-muted-light); font-size: 13px; }
.price-range { display: flex; align-items: center; gap: 10px; }
.price-range input { width: 100%; height: 44px; border: 1px solid var(--border-input); border-radius: 999px; padding-inline: 14px; font-family: inherit; }
.filter-clear { background: none; border: 0; color: var(--color-teal-deep); font-family: inherit; font-size: 14px; cursor: pointer; padding: 8px 0; min-height: 44px; }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.results-count { font-size: 15px; color: var(--color-muted); }
.sort-select { display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border-input); }
.sort-select select { border: 0; background: none; font-family: inherit; font-size: 15px; padding: 6px 4px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }

/* Shop product card */
.product-card { background: var(--color-white); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow-card); display: block; color: var(--color-ink); }
.product-card .card__media { aspect-ratio: 4/3; }
.product-card.is-soldout .card__media img { opacity: .62; }
.product-card h3 { font-size: 18px; font-weight: 800; margin-top: 16px; }
.product-card .sub { font-size: 14px; line-height: 1.8; color: var(--color-muted); margin-top: 6px; }
.card__pricerow .manaii-price { font-size: 18px; font-weight: 800; color: var(--color-teal-deep); }
.load-more { display: block; margin: 40px auto 0; }

.sibling-cats { background: var(--color-tint-sand); border-radius: var(--radius-card); padding: 32px; margin-top: 40px; }

/* ============================================================
   Product single
   ============================================================ */
.product-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.product-copy .kicker { margin-bottom: 20px; }
.product-copy h1 { font-size: var(--fs-h1); font-weight: 900; }
.product-copy .prose { margin-top: 24px; max-width: 560px; }
.product-copy .prose p { margin-top: 16px; }
.product-copy .bullets { margin-top: 20px; padding-inline-start: 20px; }
.product-copy .bullets li { line-height: var(--lh-prose); }
.product-copy hr { border: 0; border-top: 1px solid var(--border-hairline); margin: 28px 0; }
.product-price-row { display: flex; align-items: baseline; gap: 12px; margin: 24px 0; }
.product-price-row .manaii-price__amount { font-size: 26px; font-weight: 800; color: var(--color-teal-deep); }

/* Gallery — 2px gold offset outline, stock pill inside the frame */
.gallery { position: relative; }
.gallery__frame { position: relative; }
.gallery__frame::before { content: ""; position: absolute; inset: -22px -22px auto auto; width: 100%; height: 100%; border: 2px solid var(--color-gold); border-radius: var(--radius-media); z-index: 0; }
.gallery__main { position: relative; z-index: 1; height: 520px; border-radius: var(--radius-media); overflow: hidden; background: var(--color-media-bg); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__stock { position: absolute; z-index: 2; inset-inline-start: 16px; bottom: 16px; }
.gallery__thumbs { display: flex; gap: 12px; margin-top: 16px; }
.gallery__thumb { width: 100px; height: 80px; border-radius: var(--radius-chip); overflow: hidden; border: 2px solid transparent; background: var(--color-media-bg); cursor: pointer; padding: 0; flex: none; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"], .gallery__thumb.is-active { border-color: var(--color-teal-deep); }

/* ============================================================
   ONE price block + ONE buy row on every product type
   (inc/woocommerce-product.php renders both).
   ============================================================ */
.price-block { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin: 24px 0 20px; }
.price-block__amounts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.price-now, .price-was { white-space: nowrap; text-decoration: none; }
ins.price-now { text-decoration: none; background: none; }
.price-now .manaii-price__amount { font-size: 30px; font-weight: 900; color: var(--color-teal-deep); }
.price-now .manaii-price__unit { font-size: 15px; font-weight: 700; color: var(--color-teal-deep); }
.price-now .manaii-price--free { font-size: 26px; font-weight: 900; color: var(--color-pink, #FE28A2); }
.price-from { font-size: 15px; font-weight: 700; color: var(--color-muted); }
del.price-was { color: var(--color-muted-light); text-decoration: line-through; text-decoration-thickness: 1.5px; }
del.price-was .manaii-price__amount, del.price-was .manaii-price__unit { font-size: 16px; font-weight: 600; color: inherit; }
.price-block__sale { display: inline-flex; align-items: center; white-space: nowrap; background: var(--color-danger); color: var(--color-cream); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
/* Smaller surfaces (cards, cart, search) keep the same shapes at card size. */
.card__pricerow .price-now .manaii-price__amount, .variant-card .price-now .manaii-price__amount { font-size: 20px; font-weight: 800; }
.card__pricerow .price-now .manaii-price__unit, .variant-card .price-now .manaii-price__unit { font-size: 14px; }
.card__pricerow del.price-was .manaii-price__amount, .card__pricerow del.price-was .manaii-price__unit { font-size: 14px; }

/* Buy row: pill stepper (− ۱ +) + primary button, side by side; stacks when narrow. */
form.cart { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; }
form.cart .single_add_to_cart_button { flex: 1 1 220px; min-height: 56px; font-size: 17px; }
form.cart.variations_form { display: block; }
form.cart .woocommerce-variation-add-to-cart { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.qty-stepper--lg { height: 56px; padding: 0 6px; border: 1px solid var(--border-input); background: var(--color-white); flex: none; }
.qty-stepper--lg button { width: 44px; height: 44px; font-size: 22px; font-weight: 700; color: var(--color-teal-deep); }
.qty-stepper--lg button:hover { background: var(--color-tint-sand); }
.qty-stepper--lg button:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.qty-stepper--lg input { width: 48px; height: 44px; font-size: 18px; -moz-appearance: textfield; appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-hint { font-size: 14px; color: var(--color-muted); margin-top: 12px; }

/* Digital cover — deliberately not double-framed */
.digital-cover { border-radius: var(--radius-media); overflow: hidden; background: transparent; }
.digital-cover img { width: 100%; display: block; }

/* Variant cards — the purchase mechanism */
.variant-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 96px; }
.variant-card { display: block; background: var(--color-white); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card-2); color: var(--color-ink); }
.variant-card .card__media { height: 300px; position: relative; }
.variant-card .ctx-chip { position: absolute; inset-inline-end: 12px; bottom: 12px; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; }
.variant-card .ctx-chip--gold { background: var(--color-gold); color: var(--color-ink); }
.variant-card .ctx-chip--teal { background: var(--color-teal); color: var(--color-cream); }
.variant-card h3 { font-size: 26px; font-weight: 700; margin-top: 20px; }
.variant-card .sub { color: var(--color-muted); margin-top: 6px; }
.variant-card .deltas { margin: 16px 0; padding-inline-start: 18px; }
.variant-card .deltas li { line-height: var(--lh-prose); }
.variant-card .price { font-size: 20px; font-weight: 800; color: var(--color-teal-deep); }
.variant-card .stockline { font-size: 14px; color: var(--color-muted); margin-top: 6px; }
.variant-card .dotted { border: 0; border-top: var(--rule-dashed); margin: 16px 0; }
.variant-card .contents-title { font-weight: 700; margin-bottom: 8px; }
.variant-card { border: 2px solid transparent; transition: border-color var(--dur-color) var(--ease), box-shadow var(--dur-color) var(--ease); }
.variant-card.is-selected, .variant-card:focus-within { border-color: var(--color-teal-deep); }
.variant-card.is-soldout .card__media img { opacity: .62; }
.variant-card .variant-buy { margin-top: 20px; }
.variant-card .variant-buy__soldout { margin-top: 20px; }
.variant-cards:focus { outline: none; }

/* Product tabs */
.product-tabs { margin-top: 56px; }
.tab-strip { display: flex; gap: 12px; }
.tab-chip { position: relative; height: 52px; padding: 0 30px; border-radius: 999px; background: var(--color-tint-sand); border: 0; font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.tab-chip[aria-selected="true"] { background: var(--color-white); font-weight: 800; box-shadow: var(--shadow-card); }
.tab-chip[aria-selected="true"]::after { content: ""; position: absolute; inset-inline-start: 50%; bottom: -25px; width: 11px; height: 11px; background: var(--color-gold); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tab-panel { background: var(--color-white); border-radius: var(--radius-card); padding: 40px; margin-top: 28px; box-shadow: var(--shadow-card); }
.tab-panel[hidden] { display: none; }

/* Spec table */
.spec-table { display: grid; }
.spec-row { display: grid; grid-template-columns: 1fr 3fr; min-height: 50px; align-items: center; border-bottom: 1px solid var(--border-row); }
.spec-row dt { font-weight: 700; }
.spec-row dd { margin: 0; }

/* Review block — WooCommerce's own review template, restyled (no override). */
.reviews-empty { color: var(--color-muted); margin-bottom: 24px; }
.review-legal { font-size: 13px; color: var(--color-muted); margin-top: 12px; }
#reviews .woocommerce-Reviews-title, #reviews #reply-title { display: block; font-size: 22px; font-weight: 800; margin: 0 0 12px; }
#reviews .woocommerce-noreviews { color: var(--color-muted); margin-bottom: 24px; }
#reviews .commentlist { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; }
#reviews .commentlist .comment_container { background: var(--color-tint-sand); border-radius: 18px; padding: 18px 20px; }
#review_form #commentform { display: grid; gap: 18px; max-width: 640px; }
#review_form #commentform p { margin: 0; }
#review_form .comment-notes, #review_form .comment-form-cookies-consent label { font-size: 14px; color: var(--color-muted); }
#review_form label { display: block; font-size: var(--fs-small); font-weight: 700; margin-bottom: 10px; }
#review_form .required { color: var(--color-danger); text-decoration: none; }
#review_form input[type="text"], #review_form input[type="email"], #review_form textarea {
  width: 100%; min-height: 50px; padding: 0 20px; font-family: inherit; font-size: var(--fs-body); color: var(--color-ink);
  background: var(--color-white); border: 1px solid var(--border-input); border-radius: var(--radius-input);
}
#review_form textarea { min-height: 140px; padding: 16px 20px; border-radius: 20px; line-height: var(--lh-prose); resize: vertical; }
#review_form input:focus, #review_form textarea:focus { outline: none; border-color: var(--color-teal-deep); }
#review_form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
#review_form .comment-form-cookies-consent label { display: inline; font-weight: 500; margin: 0; }
#review_form .comment-form-cookies-consent input { width: 20px; height: 20px; flex: none; accent-color: var(--color-teal-deep); margin-top: 3px; }
#review_form .form-submit input[type="submit"], #review_form #submit {
  display: inline-flex; align-items: center; justify-content: center; min-width: 200px; height: 56px; padding: 0 36px;
  font-family: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
  background: var(--color-teal-deep); color: var(--color-cream); border: 0; border-radius: var(--radius-pill);
}
#review_form #submit:hover { background: #0c8a78; }
/* Rating: WooCommerce turns <select id="rating"> into five links («۱ از ۵ ستاره» …).
   They become real star controls: text hidden (still their accessible name),
   hover fills up to the pointer, the choice stays filled; RTL — ۱ on the right. */
#review_form .comment-form-rating select#rating { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
#review_form p.stars { margin: 0; line-height: 1; }
#review_form p.stars > span { display: inline-flex; gap: 6px; }
#review_form p.stars a {
  display: inline-block; width: 38px; height: 38px; border-radius: 8px;
  font-size: 0; color: transparent; overflow: hidden; text-decoration: none;
  background-color: #E6DCC0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / 32px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / 32px no-repeat;
  transition: background-color var(--dur-color) var(--ease);
}
#review_form p.stars:hover a, #review_form p.stars.selected a { background-color: var(--color-gold); }
#review_form p.stars > span a:hover ~ a, #review_form p.stars.selected:not(:hover) a.active ~ a { background-color: #E6DCC0; }
#review_form p.stars a:focus-visible { outline: var(--focus-ring); outline-offset: 2px; -webkit-mask: none; mask: none; background-color: transparent; box-shadow: inset 0 0 0 2px var(--color-teal-deep); }
/* star glyph stays visible while focused (mask removed for the ring) */
#review_form p.stars a:focus-visible::before { content: "★"; display: block; font-size: 30px; line-height: 38px; text-align: center; color: var(--color-gold); }
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; line-height: 1; font-size: 16px; overflow: hidden; }
.star-rating::before { content: "★★★★★"; color: #E6DCC0; position: absolute; inset: 0; }
.star-rating span { position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; padding-top: 1.2em; }
.star-rating span::before { content: "★★★★★"; color: var(--color-gold); position: absolute; top: 0; inset-inline-start: 0; }

/* Audio purchase card + free-sample player */
.audio-buy { background: var(--color-white); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-panel); margin-top: 24px; }
.audio-buy .price { font-size: 26px; font-weight: 900; color: var(--color-teal-deep); }
.audio-buy .assurances { margin-top: 20px; display: grid; gap: 10px; }
.audio-buy .assurances li { display: flex; gap: 10px; font-size: 14px; color: var(--color-ink-muted); }
.sample-player { display: flex; align-items: center; gap: 16px; background: var(--color-tint-sand); border-radius: var(--radius-card); padding: 16px 20px; margin: 24px 0; }
.sample-player__play { width: 56px; height: 56px; border-radius: 999px; background: var(--color-teal-deep); color: var(--color-cream); border: 0; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }
.sample-player__bar { flex: 1; }
.sample-player__times { display: flex; justify-content: space-between; direction: ltr; font-size: 13px; color: var(--color-muted); margin-top: 8px; }
.tracklist { margin-top: 24px; }
.track-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-row); }
.track-row .num { width: 32px; height: 32px; border-radius: 999px; background: var(--color-tint-sand); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.track-row .free { margin-inline-start: 8px; }
.track-row .dur { margin-inline-start: auto; color: var(--color-muted); font-size: 14px; }
.tracklist-note { font-size: 14px; color: var(--color-muted); margin-top: 8px; }
.tracklist-note--owned { color: var(--pill-avail-fg); }
.tracklist-note a { color: var(--color-teal-deep); font-weight: 700; }
a.track-row--locked { color: var(--color-ink); text-decoration: none; border-radius: 12px; }
a.track-row--locked .num { background: #EFE7D2; color: var(--color-muted); }
a.track-row--locked:hover { background: var(--color-tint-sand); }
a.track-row--locked:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.track-row__why { display: block; font-size: 13px; color: var(--color-muted); margin-top: 2px; }
.track-row__lock { display: inline-flex; color: var(--color-muted); flex: none; }
.audio-buy:focus { outline: none; box-shadow: 0 0 0 3px var(--color-gold), var(--shadow-panel); }
.audio-buy__owned { font-weight: 700; color: var(--pill-avail-fg); margin-bottom: 14px; }
/* Round audio cover art is shown whole — never cropped by its frame. */
.gallery__main--round { height: auto; aspect-ratio: 1 / 1; background: transparent; }
.gallery__main--round img { object-fit: contain; }

/* ============================================================
   Cart — card list at every width
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 386px; gap: 28px; }
.cart-items { background: var(--color-white); border-radius: var(--radius-card); padding: 12px 28px; box-shadow: var(--shadow-card); }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 20px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--border-row); }
.cart-line__qtycol { display: flex; align-items: center; gap: 16px; }
.cart-line:last-child { border-bottom: 0; }
.cart-line__thumb { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; }
.cart-line__title { font-size: 17px; font-weight: 700; }
.cart-line__variant { font-size: 14px; color: var(--color-muted); margin-top: 4px; }
.qty-stepper { display: inline-flex; align-items: center; background: var(--color-tint-sand); border-radius: 999px; }
.qty-stepper button { width: 34px; height: 34px; border: 0; background: none; font-size: 18px; cursor: pointer; border-radius: 999px; }
.qty-stepper input { width: 40px; text-align: center; border: 0; background: none; font-family: inherit; font-size: 16px; font-weight: 700; }
.cart-line__note { font-size: 14px; color: var(--color-muted); }
.cart-line__total { font-size: 17px; font-weight: 800; color: var(--color-teal-deep); text-align: end; white-space: nowrap; min-width: 110px; }
.cart-line__remove { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-card); background: var(--color-white); color: var(--color-danger); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
.cart-line__remove:hover { background: var(--pill-unavail-bg); border-color: #F0C9C9; }
.cart-line__remove:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.coupon-row { display: flex; align-items: center; gap: 12px; padding: 20px 0; }
.coupon-row input { width: 220px; height: 50px; border: 1px solid var(--border-input); border-radius: var(--radius-input); padding-inline: 16px; font-family: inherit; font-size: var(--fs-small); }
.coupon-row .apply { border-radius: var(--radius-input); }
.continue-shopping { margin-inline-start: auto; }

.cart-totals { position: sticky; top: 24px; align-self: start; background: var(--color-white); border-radius: var(--radius-card); padding: 30px; box-shadow: var(--shadow-card); }
.cart-totals h2 { font-size: 21px; font-weight: 800; margin-bottom: 20px; }
.totals-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 15px; }
.totals-row.discount { color: var(--color-danger); }
.totals-row.grand { font-size: 21px; font-weight: 800; color: var(--color-teal-deep); }
.cart-totals hr { border: 0; border-top: var(--rule-dashed); margin: 12px 0; }
.cart-totals .note { font-size: 13px; color: var(--color-muted); line-height: 1.8; margin: 12px 0; }

/* ============================================================
   Checkout
   ============================================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr 430px; gap: 32px; }
.login-prompt { background: var(--color-white); border-radius: 18px; padding: 18px 24px; display: flex; align-items: center; gap: 14px; margin-bottom: 24px; box-shadow: var(--shadow-card); }
.login-prompt .avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--color-tint-sand); flex: none; }
.checkout-form { background: var(--color-white); border-radius: var(--radius-card); padding: 36px; box-shadow: var(--shadow-card); }
.checkout-form fieldset { border: 0; padding: 0; margin: 0 0 32px; }
.checkout-form legend { font-size: 18px; font-weight: 800; margin-bottom: 16px; padding: 0; }
.checkout-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ship-note { font-size: 14px; color: var(--color-muted); margin-bottom: 16px; }
.ship-method { display: block; border: 2px solid var(--border-card); border-radius: 16px; padding: 16px 20px; margin-bottom: 12px; cursor: pointer; }
.ship-method:has(input:checked) { border-color: var(--color-teal-deep); background: #F3FAF8; }
.ship-method .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.checkout-summary { position: sticky; top: 24px; align-self: start; display: grid; gap: 16px; }
.summary-card { background: var(--color-grey-panel); border-radius: var(--radius-card); padding: 28px; }
.summary-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.summary-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.summary-line img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.summary-total { font-size: 20px; font-weight: 800; color: var(--color-teal-deep); }

/* Payment methods — Iran-neutral */
.pay-method { display: block; border: 2px solid var(--border-card); border-radius: 16px; padding: 16px 20px; margin-bottom: 12px; cursor: pointer; }
.pay-method:has(input:checked) { border-color: var(--color-teal-deep); }
.pay-method .row { display: flex; align-items: center; gap: 12px; }
.pay-mark { width: 60px; height: 28px; border: 1px dashed var(--border-input); border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pay-mark img { max-width: 100%; max-height: 100%; }
.pay-desc { background: var(--color-tint-sand); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-top: 10px; color: var(--color-ink-muted); }
.pay-method:not(:has(input:checked)) .pay-desc { display: none; }

.submit-order { position: relative; }
.submit-order.is-loading { background: #0c8a78; pointer-events: none; }
.submit-order .spinner { width: 20px; height: 20px; border: 2px solid rgba(255,246,220,.4); border-top-color: var(--color-cream); border-radius: 999px; animation: manaii-spin 700ms linear infinite; }
@keyframes manaii-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Order result (success / failed / pending)
   ============================================================ */
.order-result { text-align: center; max-width: 640px; margin: 0 auto; padding-block: 56px; }
.order-result__icon { width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.order-result--success .order-result__icon { background: var(--pill-avail-bg); color: var(--pill-avail-fg); }
.order-result--failed { }
.order-result--failed .order-result__icon { background: var(--pill-unavail-bg); color: var(--pill-unavail-fg); }
.order-result--pending .order-result__icon { background: var(--pill-pending-bg); color: var(--pill-pending-fg); }
.entitlement-chips { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.entitlement-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--pill-avail-bg); color: var(--pill-avail-fg); padding: 10px 18px; border-radius: 999px; font-weight: 700; }

/* ============================================================
   WooCommerce checkout field markup → Manaii form system
   (WooCommerce renders its own .form-row/.input-text; we restyle, not rebuild.)
   ============================================================ */
.checkout-form h3, .checkout-form #ship-to-different-address, .woocommerce-billing-fields h3, .woocommerce-shipping-fields h3, .woocommerce-additional-fields h3 {
  font-size: 18px; font-weight: 800; margin: 0 0 16px;
}
.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-additional-fields { margin-bottom: 32px; }
.checkout .form-row { margin-bottom: 18px; }
.checkout .form-row label { display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: 10px; }
.checkout .form-row .required { color: var(--color-danger); text-decoration: none; }
.checkout .input-text, .checkout select, .checkout textarea, .select2-container .select2-selection {
  width: 100%; min-height: 50px; padding: 0 20px;
  font-family: inherit; font-size: var(--fs-body); color: var(--color-ink);
  background: var(--color-white); border: 1px solid var(--border-input); border-radius: var(--radius-input);
}
.checkout textarea { padding: 16px 20px; border-radius: 20px; min-height: 100px; line-height: var(--lh-prose); }
.checkout .input-text:focus, .checkout select:focus, .checkout textarea:focus { outline: none; border-color: var(--color-teal-deep); }
.checkout .form-row.woocommerce-invalid .input-text { border-color: var(--color-danger); }
.checkout .form-row-first, .checkout .form-row-last { display: inline-block; width: calc(50% - 8px); }
.checkout .form-row-first { margin-inline-end: 16px; }
.woocommerce-error, .woocommerce-NoticeGroup .woocommerce-error {
  list-style: none; margin: 0 0 24px; padding: 18px 20px;
  background: var(--pill-unavail-bg); border: 1px solid #F0C9C9; border-radius: 16px; color: var(--color-danger);
}
.woocommerce-message, .woocommerce-info {
  list-style: none; margin: 0 0 24px; padding: 18px 20px;
  background: var(--pill-avail-bg); border-radius: 16px; color: var(--pill-avail-fg);
}

/* Review order table + payment area */
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { text-align: start; padding: 10px 0; border-bottom: 1px solid var(--border-row); }
.woocommerce-checkout-review-order-table .order-total .amount { font-size: 20px; font-weight: 800; color: var(--color-teal-deep); }
.woocommerce-checkout-review-order-table td.product-total, .woocommerce-checkout-review-order-table tfoot td { white-space: nowrap; text-align: end; }
/* select2 (Persian WooCommerce state/city): arrow vertically centred at the end edge, text centred. */
.select2-container .select2-selection--single { height: 50px; display: flex; align-items: center; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 48px; padding-inline: 0 28px; padding-left: 0; padding-right: 0; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 48px; top: 0; inset-inline-end: 14px; inset-inline-start: auto; left: auto; right: auto; }
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 14px; right: auto; }
.checkout select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23252525' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 18px center; padding-inline-end: 44px; }
#payment { background: transparent; }
#payment ul.payment_methods { list-style: none; margin: 0 0 16px; padding: 0; border: 0; }
#payment ul.payment_methods li { border: 2px solid var(--border-card); border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; }
#payment ul.payment_methods li input[type="radio"]:checked ~ label { font-weight: 700; }
#payment ul.payment_methods li:has(input:checked) { border-color: var(--color-teal-deep); }
#payment .payment_box { background: var(--color-tint-sand); border-radius: 12px; padding: 12px 16px; margin-top: 10px; font-size: 14px; color: var(--color-ink-muted); }
#payment .payment_box::before { display: none; }
#payment label { display: inline-flex; align-items: center; gap: 10px; }
.woocommerce-terms-and-conditions-wrapper { margin: 16px 0; }
.woocommerce-terms-and-conditions-wrapper .woocommerce-form__label { min-height: 44px; display: flex; align-items: center; gap: 10px; }

/* ============================================================
   Auth (login / register / forgot / reset)
   ============================================================ */
.auth-grid { display: grid; grid-template-columns: 1fr 460px; gap: 72px; align-items: center; }
.auth-card { background: var(--color-white); border-radius: 28px; padding: 40px; box-shadow: var(--shadow-panel); }
.auth-switch { display: inline-flex; background: var(--color-tint-sand); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.auth-switch__btn { border: 0; background: none; font-family: inherit; font-size: 15px; font-weight: 700; padding: 10px 24px; border-radius: 999px; cursor: pointer; min-height: 44px; color: var(--color-ink-muted); }
.auth-switch__btn[aria-selected="true"] { background: var(--color-white); color: var(--color-teal-deep); box-shadow: var(--shadow-card); }
.auth-panel[hidden] { display: none; }
.auth-notice { background: var(--color-tint-sand); border-radius: 14px; padding: 14px 18px; font-size: 14px; color: var(--color-ink-muted); margin-bottom: 20px; }
.auth-story .card ul { padding: 0; }
.auth-story img { display: block; }

/* ============================================================
   Mobile commerce recomposition (mirrors data-m; explicit for stock markup)
   ============================================================ */
@media (max-width: 900px) {
  .shop-body, .cart-layout, .checkout-layout, .product-summary { grid-template-columns: 1fr; }
  .filter-rail { position: static; }
  .checkout-summary { order: -1; } /* summary above the form */
  .variant-cards { grid-template-columns: 1fr; }
}
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) {
  /* The gold offset outline keeps a VERTICAL offset only on mobile — a
     horizontal one overhangs the gutter and widens the document. */
  .gallery__frame::before { inset: -12px 0 auto 0 !important; width: 100% !important; }
  .gallery__main { height: auto !important; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .gallery__main { height: auto; aspect-ratio: 4/5; }
  .cart-line { grid-template-columns: 84px 1fr; }
  .cart-line__remove { grid-column: 1 / -1; justify-self: start; }
  .cart-line__qtycol { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .checkout-form .row-2 { grid-template-columns: 1fr; }
  /* Coupon row wraps; the input goes full-width so the «اعمال کد» button never
     gets squeezed into vertical text. */
  .coupon-row { flex-wrap: wrap; row-gap: 12px; }
  .coupon-row input { width: 100%; }
  .coupon-row .apply, .coupon-row .btn { flex: 1 1 auto; }
  .continue-shopping { margin-inline-start: 0; width: 100%; }
}
@media (max-width: 430px) { .gallery__main { aspect-ratio: 1/1; } }
.otp-input { font-size: 24px; letter-spacing: .5em; text-align: center; font-weight: 800; }
