/* Product pages (batch B2). Loaded only on single product pages, after main.css.
   Selectors start with "html body.joymax-theme.jx-product #content" so they win over the old shop CSS and legacy.css.
   Duplicates are hidden here (never removed from hooks), so other plugins' output on the page stays. */

/* ---------- All product pages ---------- */
html body.joymax-theme.jx-product #content .summary { font-family: var(--body); color: var(--paper); }
html body.joymax-theme.jx-product #content .summary .product_title {
  font: 700 var(--t-25)/1.25 var(--head); color: var(--paper); overflow-wrap: anywhere; text-wrap: balance; margin: 0 0 12px;
}
html body.joymax-theme.jx-product #content .woocommerce-breadcrumb { color: var(--ash); font-size: var(--t-14); }
html body.joymax-theme.jx-product #content .woocommerce-breadcrumb a { color: var(--ash); }
html body.joymax-theme.jx-product #content .woocommerce-breadcrumb a:hover { color: var(--paper); }
html body.joymax-theme.jx-product #content .summary .price,
html body.joymax-theme.jx-product #content .summary .price .amount { color: var(--gold-text); font-family: var(--head); font-weight: 700; }
html body.joymax-theme.jx-product #content .summary > .price { font-size: var(--t-31); line-height: 1.1; }
html body.joymax-theme.jx-product #content .summary .stock { color: var(--live); font-weight: 600; }
html body.joymax-theme.jx-product #content .summary .stock.out-of-stock { color: var(--ash); }
html body.joymax-theme.jx-product #content .summary .ast-stock-avail { color: var(--ash); }

/* Add to cart = gold button; quantity box in our colours */
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button {
  min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--r-btn); background: var(--gold); color: var(--on-gold);
  font: 700 var(--t-16) var(--body); text-transform: none; letter-spacing: 0; cursor: pointer;
}
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button:hover { filter: brightness(1.06); }
/* (0.6.16a) Motion, CSS only. Press: the button shrinks to 97 % (160 ms); not while WooCommerce has it disabled.
   Price: when WooCommerce puts in a new variation price, it fades in rising 6 px (200 ms); its text is not touched.
   (The gallery keeps sliding: see the note in inc/product.php.) */
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button { transition: transform 160ms var(--ease-out); }
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button:active:not(.disabled) { transform: scale(.97); }
html body.joymax-theme.jx-product #content .woocommerce-variation-price .price { animation: jx-price-in 200ms var(--ease-out); }
@keyframes jx-price-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
@media (prefers-reduced-motion: reduce) {
  html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button { transition: none; }
  html body.joymax-theme.jx-product #content .woocommerce-variation-price .price { animation: none; }
}
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
html body.joymax-theme.jx-product #content .summary .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; }
/* (0.6.14) Variable product before an option is picked: still disabled (WooCommerce's own state and classes), but it looks
   intentional: dark button, gold outline, "Choose a duration". Turns solid gold as soon as a duration is chosen
   (WooCommerce removes wc-variation-selection-needed). Display only. */
html body.joymax-theme.jx-product #content .summary button.single_add_to_cart_button.button.disabled.wc-variation-selection-needed {
  position: relative; opacity: 1 !important; background: transparent !important; border: 1px solid var(--gold) !important;
  color: transparent !important; filter: none !important; box-shadow: none !important;
}
html body.joymax-theme.jx-product #content .summary button.single_add_to_cart_button.button.disabled.wc-variation-selection-needed::after {
  content: "Choose a duration"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gold-text); font: 700 var(--t-16) var(--body); pointer-events: none;
}
html body.joymax-theme.jx-product #content .summary .quantity .qty {
  min-height: 52px; border: 1px solid var(--edge); border-radius: var(--r-btn); background: var(--field-bg); color: var(--paper);
  font: 600 var(--t-16) var(--body);
}

/* Description: readable in light and dark (it was nearly invisible in light mode) */
html body.joymax-theme.jx-product #content .woocommerce-Tabs-panel,
html body.joymax-theme.jx-product #content .woocommerce-Tabs-panel :is(p, li, span:not([style])) { color: var(--paper); }

/* ---------- Variable products: the price range under the title is hidden; the chosen option's price shows once ---------- */
html body.joymax-theme.jx-product.jx-var-range #content .summary > .price { display: none; }
html body.joymax-theme.jx-product #content .summary table.variations { width: 100%; margin: 8px 0 0; border: 0; border-collapse: collapse; }
html body.joymax-theme.jx-product #content .summary table.variations :is(tr, th, td) { display: block; padding: 0; border: 0; background: none; text-align: start; }
html body.joymax-theme.jx-product #content .summary table.variations th.label label { font: 600 var(--t-16) var(--body); color: var(--paper); margin: 0; }
html body.joymax-theme.jx-product #content .summary table.variations tr + tr { margin-top: 16px; }

/* The real select stays in the page (WooCommerce reads it) but is hidden when pills replace it */
html body.joymax-theme.jx-product #content .summary select.jx-select-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important;
  margin: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none;
}
html body.joymax-theme.jx-product #content .summary td.jx-has-pills { position: relative; }
/* Astra Pro's own option buttons are hidden where our pills are (CSS only; Astra's code still runs).
   (0.6.16i) Also before pills.js runs: the server prints the pills, so :has() hides Astra's buttons from the first paint. */
html body.joymax-theme.jx-product #content .summary td.jx-has-pills .ast-variation-button-group,
html body.joymax-theme.jx-product #content .summary td:has(> .jx-pills) .ast-variation-button-group { display: none; }
html body.joymax-theme.jx-product #content .summary td:has(> .jx-pills) { position: relative; }

/* Pills: compact, sized to their text, wrap like live (36 px look; 44 px tap area on phones) */
html body.joymax-theme.jx-product #content .jx-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
html body.joymax-theme.jx-product #content .jx-pill-opt {
  position: relative; display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0 18px;
  border: 1px solid var(--edge); border-radius: var(--r-btn); background: var(--field-bg); color: var(--paper);
  font: 600 var(--t-14)/1.2 var(--body); text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
  transition: border-color var(--out) var(--ease-out);
}
html body.joymax-theme.jx-product #content .jx-pill-opt:hover { border-color: var(--ash); background: var(--field-bg); color: var(--paper); }
html body.joymax-theme.jx-product #content .jx-pill-opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
html body.joymax-theme.jx-product #content .jx-pill-opt[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-text); }
html body.joymax-theme.jx-product #content .jx-pill-opt[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
html body.joymax-theme.jx-product #content .jx-pill-opt[aria-disabled="true"]:hover { border-color: var(--edge); }
html body.joymax-theme.jx-product #content .jx-pill-opt.is-out .jx-pill-n { text-decoration: line-through; }
html body.joymax-theme.jx-product #content .jx-pill-note { margin: 8px 0 0; font-size: var(--t-12); color: var(--ash); }
html body.joymax-theme.jx-product #content .jx-pill-note[hidden] { display: none; }
/* (0.6.16-pre, owner) Sold-out pills are clearly out: red border + red text on a dimmed red background, name still
   crossed out, a small red "Sold out / نفذت الكمية" tag under the name; not selectable (pills.js). Clicking one shows a
   red notice with a warning icon. In-stock pills unchanged. Display only: stock comes from WooCommerce's own data. */
html body.joymax-theme.jx-product #content .jx-pill-opt.is-out {
  flex-direction: column; justify-content: center; gap: 2px; padding: 6px 14px; opacity: 1;
  border-color: color-mix(in srgb, var(--warn) 65%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--field-bg));
  color: var(--warn); cursor: not-allowed; }
html body.joymax-theme.jx-product #content .jx-pill-opt.is-out:hover { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--field-bg)); color: var(--warn); }
html body.joymax-theme.jx-product #content .jx-pill-opt.is-out .jx-pill-n { color: var(--warn); opacity: .85; }
html body.joymax-theme.jx-product #content .jx-pill-tag { font: 600 10.5px/1.2 var(--body); color: var(--warn); white-space: nowrap; letter-spacing: 0; }
html body.joymax-theme.jx-product #content .jx-pill-tag [lang="ar"] { font: 700 11px/1.2 var(--ar); }
html body.joymax-theme.jx-product #content .jx-pill-note.is-warn {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-btn);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent);
  font: 600 var(--t-14)/1.4 var(--body); color: var(--warn); }
html body.joymax-theme.jx-product #content .jx-pill-note.is-warn[hidden] { display: none; }
html body.joymax-theme.jx-product #content .jx-pill-note.is-warn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) {
  html body.joymax-theme.jx-product #content .jx-pill-opt::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
}

/* WooCommerce's own "Clear" link: small, underlined, under the pills */
html body.joymax-theme.jx-product #content .summary .reset_variations {
  display: inline-flex; align-items: center; min-height: 44px; margin: 4px 0 0; color: var(--ash); font: 500 var(--t-14) var(--body);
  text-decoration: underline; text-underline-offset: 4px;
}
html body.joymax-theme.jx-product #content .summary .reset_variations:hover { color: var(--paper); }

/* Chosen option: its WooCommerce description small ("WY – 1 Month"), price once (big, gold), stock */
html body.joymax-theme.jx-product #content .single_variation_wrap .woocommerce-variation.single_variation:not(:empty) { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--edge); }
html body.joymax-theme.jx-product #content .woocommerce-variation-description,
html body.joymax-theme.jx-product #content .woocommerce-variation-description p { margin: 0; font-size: var(--t-14); color: var(--ash); }
/* Astra's quantity − / + buttons */
html body.joymax-theme.jx-product #content .summary .quantity { display: inline-flex; align-items: stretch; margin: 0; border: 1px solid var(--edge); border-radius: var(--r-btn); overflow: hidden; background: var(--field-bg); }
html body.joymax-theme.jx-product #content .summary .quantity :is(.minus, .plus) {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; min-height: 52px; margin: 0; padding: 0; border: 0;
  background: none; color: var(--paper); font: 500 20px var(--body); text-decoration: none;
}
html body.joymax-theme.jx-product #content .summary .quantity :is(.minus, .plus):hover { background: var(--plate); color: var(--gold-text); }
html body.joymax-theme.jx-product #content .summary .quantity .qty { width: 48px; min-height: 52px; margin: 0; padding: 0; border: 0; border-inline: 1px solid var(--edge); border-radius: 0; text-align: center; -moz-appearance: textfield; }
html body.joymax-theme.jx-product #content .summary .quantity:not(:has(.minus)) .qty { border-inline: 0; }
/* (0.6.16i) Before Astra's script adds − / + (48 px each), their room is kept, so Add to cart doesn't move (CLS). */
html body.joymax-theme.jx-product #content .summary .quantity:not(.buttons_added):not(:has(.minus)):has(input.qty:not([type="hidden"])) { padding-inline: 48px; }
/* One-per-order items: WooCommerce prints an empty quantity box (hidden field only); don't draw it */
html body.joymax-theme.jx-product #content .summary .quantity:not(:has(input:not([type="hidden"]))) { display: none; }
html body.joymax-theme.jx-product #content .summary .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
html body.joymax-theme.jx-product #content .woocommerce-variation-price .price { display: block; margin: 4px 0 0; font-size: var(--t-49); line-height: 1; }
html body.joymax-theme.jx-product #content .woocommerce-variation-availability { margin-top: 10px; font-size: var(--t-14); }
html body.joymax-theme.jx-product #content .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
html body.joymax-theme.jx-product #content .woocommerce-variation-add-to-cart .single_add_to_cart_button { flex: 1; }

/* ---------- Account pages: picture left, buying box right (stacked on phones) ---------- */
/* "All accounts": its 44 px tap row starts 12 px higher, so the words line up with the 40 px gap under the header (0.6.1) */
html body.joymax-theme.jx-account #content .jx-crumbs { padding-top: 0; margin-top: -12px; font-size: var(--t-14); }
html body.joymax-theme.jx-account #content .jx-crumbs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ash); text-decoration: none; }
html body.joymax-theme.jx-account #content .jx-crumbs a:hover,
html body.joymax-theme.jx-account #content .jx-crumbs a:focus-visible { color: var(--paper); }
html body.joymax-theme.jx-account #content .jx-crumbs svg { width: 16px; height: 16px; }
html body.joymax-theme.jx-account #content .summary > .woocommerce-breadcrumb { display: none; }   /* "All accounts" replaces it */

html body.joymax-theme.jx-account #content div.product {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 40px; align-items: start;
}
html body.joymax-theme.jx-account #content div.product::before,
html body.joymax-theme.jx-account #content div.product::after { display: none; }
html body.joymax-theme.jx-account #content div.product > * { grid-column: 1 / -1; float: none; width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery {
  grid-column: 1; grid-row: 1; width: 100% !important; margin: 0; border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; background: var(--plate);
}
html body.joymax-theme.jx-account #content div.product > .jx-photos { grid-column: 1; grid-row: 2; justify-self: start; }
html body.joymax-theme.jx-account #content div.product > .summary { grid-column: 2; grid-row: 1 / span 2; width: auto !important; padding: 0; }

html body.joymax-theme.jx-account #content .jx-photos {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; color: var(--gold-text); font-weight: 600; text-decoration: none;
}
html body.joymax-theme.jx-account #content .jx-photos:hover,
html body.joymax-theme.jx-account #content .jx-photos:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
html body.joymax-theme.jx-account #content .jx-photos svg { width: 16px; height: 16px; flex: none; }
html body.joymax-theme.jx-account #content .jx-photos [lang="ar"] { font-family: var(--ar); }

/* Buying box: our price + stock row, WooCommerce's form, the product's own rules (short description) */
html body.joymax-theme.jx-account #content .summary:has(.jx-buybox) > :is(.price, .stock, .ast-stock-detail, .woocommerce-product-details__short-description) { display: none; }
html body.joymax-theme.jx-account #content .jx-buybox { margin-top: 24px; padding: 24px; border: 1px solid var(--edge); border-radius: var(--r-card); background: var(--plate); }
html body.joymax-theme.jx-account #content .jx-buy-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
html body.joymax-theme.jx-account #content .jx-buybox .jx-buy-price { margin: 0; font-size: var(--t-49); line-height: 1; }
html body.joymax-theme.jx-account #content .jx-buy-stock { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-14); color: var(--ash); white-space: nowrap; }
html body.joymax-theme.jx-account #content .jx-buybox .jx-card-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
html body.joymax-theme.jx-account #content .jx-buybox form.cart { display: flex; gap: 12px; margin: 20px 0 0; }
html body.joymax-theme.jx-account #content .jx-buybox form.cart .single_add_to_cart_button { flex: 1; width: 100%; margin: 0 !important; }
html body.joymax-theme.jx-account #content .jx-rules {
  margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--edge); font: 500 var(--t-16)/1.5 var(--ar); color: var(--paper); text-align: right;
}
html body.joymax-theme.jx-account #content .jx-rules :is(p, ul, ol) { margin: 0 0 8px; padding: 0; color: var(--paper); }
html body.joymax-theme.jx-account #content .jx-rules :is(ul, ol) { list-style: none; display: grid; gap: 10px; }
html body.joymax-theme.jx-account #content .jx-rules li { display: flex; gap: 10px; align-items: baseline; }
html body.joymax-theme.jx-account #content .jx-rules li::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); transform: translateY(-2px);
}

/* Arabic description: right-aligned block, 18 px, the owner's sections, dividers and emojis kept */
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description {
  direction: rtl; text-align: right; font: 400 18px/1.9 var(--ar);
}
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description :is(h1, h2, h3) {
  font: 700 var(--t-20)/1.5 var(--ar); margin: 28px 0 8px; text-align: right;
}
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description :is(h1, h2, h3):first-child { margin-top: 0; }
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description p { margin: 0 0 6px; }
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description hr { border: 0; border-top: 1px solid var(--edge); margin: 24px 0; }

/* ---------- Wins over the "catalog layout" plugin (its :has() rules are very specific), values from the demo ---------- */
/* Page width = header width (1200 px, 16 px gutters on phones) */
html body.joymax-theme.jx-product #content > .ast-container {
  width: min(var(--wrap), 100% - 32px) !important; max-width: none !important; margin-inline: auto !important; padding-inline: 0 !important;
}
html body.joymax-theme.jx-product #content #primary,
html body.joymax-theme.jx-product #content div.product { width: 100% !important; max-width: none !important; margin-inline: 0 !important; padding-inline: 0 !important; }
html body.joymax-theme.jx-product #content div.product { align-items: start !important; }
html body.joymax-theme.jx-product #content div.product > * { margin-top: 0 !important; }
html body.joymax-theme.jx-product #content .woocommerce-breadcrumb { font-size: var(--t-14) !important; color: var(--paper) !important; }
html body.joymax-theme.jx-product #content .summary .product_title { font-size: var(--t-39) !important; line-height: 1.1 !important; margin: 8px 0 0 !important; }

/* Non-account products: picture + buying panel as solid cards (WY demo) */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product .woocommerce-product-gallery__image {
  border: 1px solid var(--edge) !important; border-radius: var(--r-card) !important; overflow: hidden; background: var(--plate) !important;
}
/* (0.6.15 round 4) Soft sides: the same picture, blurred and darkened, fills the frame behind the real one (whole and
   centred), so tall pictures show no dark empty bars. --jx-bg comes from inc/product.php (joymax_gallery_blur_bg). */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product .woocommerce-product-gallery__image[style*="--jx-bg"] {
  position: relative; isolation: isolate; background: #0A0A0B !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product .woocommerce-product-gallery__image[style*="--jx-bg"]::before {
  content: ""; position: absolute; inset: -32px; z-index: -1; pointer-events: none;
  background: var(--jx-bg) center / cover no-repeat; filter: blur(22px) brightness(.45) saturate(1.1);
}
/* (0.6.15 round 4) Galleries with several pictures (Astra Pro's slider): the slider window is the rounded card and clips
   the sliding pictures to its corners; the slides inside lose their own border and corners (the doubled edge at the
   left corner was the previous slide's border). Thumbnails get the same soft corners as buttons. */
html body.joymax-theme.jx-product:not(.jx-account) #content .woocommerce-product-gallery > .flex-viewport {
  border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; isolation: isolate; background: #0A0A0B;
}
/* (two gallery classes + .type-product: must outrank the Features-page slide border rule further down) */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  border: 0 !important; border-radius: 0 !important;
}
/* (0.6.15 round 5) One fixed frame for every slide of a slider gallery: square, at most 560 px high, so switching
   pictures (thumbnails, arrow) never changes the height and the page doesn't jump. Each picture is shown whole and
   centred (contain); the blurred copy above fills the rest. The slider's own height (set per slide as an inline
   style) is overridden. Same selector strength as the rule above, which must outrank the Features-page rules. */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport {
  height: auto !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  aspect-ratio: 1 / 1 !important; max-height: 560px; display: block !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image > a {
  display: block !important; width: 100%; height: 100%;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img:not(.zoomImg) {
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; object-fit: contain !important;
}
html body.joymax-theme.jx-product #content .ast-single-product-thumbnails .ast-woocommerce-product-gallery__image {
  border-radius: var(--r-btn); overflow: hidden;
}
html body.joymax-theme.jx-product #content .ast-single-product-thumbnails .ast-woocommerce-product-gallery__image img { border-radius: 0; }
html body.joymax-theme.jx-product:not(.jx-account) #content div.product div.summary.entry-summary {
  border: 1px solid var(--edge) !important; border-radius: var(--r-card) !important; background: var(--plate) !important;
}
/* "Clear" small and grey at the right of the option name (WooCommerce's own link, moved by CSS only) */
html body.joymax-theme.jx-product #content .summary table.variations { margin-top: 24px !important; }
html body.joymax-theme.jx-product #content .summary table.variations tr { position: relative; }
html body.joymax-theme.jx-product #content .summary table.variations td.value { position: static; }
html body.joymax-theme.jx-product #content .summary table.variations .reset_variations {
  position: absolute; top: -12px; right: 0; margin: 0; color: var(--ash) !important; text-transform: none !important; letter-spacing: 0 !important;
}
html body.joymax-theme.jx-product #content .summary table.variations th.label { padding-right: 64px; }
/* Stock line: green dot first */
html body.joymax-theme.jx-product #content .summary .ast-stock-detail { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-14); }
html body.joymax-theme.jx-product #content .summary .ast-stock-detail::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none;
}
html body.joymax-theme.jx-product #content .summary .ast-stock-detail:has(.out-of-stock)::before { background: var(--ash); }
/* Requirements + features (the Joymax product details plugin's box; its output unchanged, only sizes and colours) */
html body.joymax-theme.jx-product #content .jm-product-details h2 { font-size: var(--t-25) !important; font-weight: 700 !important; margin: 0 0 16px !important; }
html body.joymax-theme.jx-product #content .jm-product-details h3 { font-size: var(--t-16) !important; font-weight: 700 !important; margin: 24px 0 12px !important; }
html body.joymax-theme.jx-product #content .jm-product-details__specs :is(dt, dd) { font-size: var(--t-16) !important; }
html body.joymax-theme.jx-product #content .jm-product-details__specs dt { font-weight: 700 !important; }
html body.joymax-theme.jx-product #content .jm-product-details__specs dd { color: var(--ash) !important; }
/* TPM "Must be off" in red: only the row whose label is "TPM" (marked .jx-warn by product.php's small script; 0.6.0 fix,
   the old "last row" rule turned HWID's CPU row red) */
html body.joymax-theme.jx-product #content .jm-product-details__specs dd.jx-warn { color: var(--warn) !important; font-weight: 700 !important; }
html body.joymax-theme.jx-product #content .jm-product-details__tags { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
html body.joymax-theme.jx-product #content .jm-product-details__tags li {
  margin: 0 !important; min-height: 40px; display: flex !important; align-items: center; font-size: var(--t-14) !important; line-height: 1.3 !important; padding: 8px 12px !important;
  background: var(--plate) !important; border: 1px solid var(--edge) !important; border-radius: var(--r-btn) !important; color: var(--paper) !important;
}
@media (max-width: 600px) { html body.joymax-theme.jx-product #content .jm-product-details__tags { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ---------- (0.6.14) Products with a Features block (owner-approved mockup docs/mockups/product-features.html) ----------
   Big picture with the buy box beside it (7:5), features full width below. The Joymax Product Details plugin's
   catalog-layout.css puts features in a narrow third column; these rules win over it (!important: REMOVE AFTER LAUNCH
   once that plugin is off). Account pages keep their own layout above.
   (0.6.16d) Also products with no Product Details box at all (e.g. Call of Duty): they got the plugin's narrow layout
   (picture 360 px on the right), and the equal-height script only works with the picture on the left. */
@media (min-width: 768px) {
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) {
    display: grid !important; grid-template: "gallery buy" auto "details details" auto / minmax(0, 7fr) minmax(0, 5fr) !important;
    gap: 0 40px !important; align-items: start !important;
  }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details)))::before,
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details)))::after { content: none !important; display: none !important; }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > * { grid-column: 1 / -1 !important; }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .woocommerce-product-gallery { grid-area: gallery !important; }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .summary {
    grid-area: buy !important; margin: 0 !important; padding: 24px !important;
    background: var(--plate) !important; border: 1px solid var(--edge) !important; border-radius: var(--r-card) !important;
  }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .jm-product-details { grid-area: details !important; }
  /* (0.6.14 fix) Tall pictures (e.g. Wardogs) left a big empty band beside them: the picture is capped at 560 px high
     (whole, centred in its card). The buy box is NOT sticky: in this grid it would slide over the Features below. */
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) .woocommerce-product-gallery__image {
    display: flex !important; justify-content: center; background: #0A0A0B;
  }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) .woocommerce-product-gallery__image > a { display: block; }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) .woocommerce-product-gallery__image img:not(.zoomImg) {
    width: auto !important; max-width: 100% !important; max-height: 560px !important; margin: 0 auto;
  }
}
/* The picture: as wide as its column (phones: the full width), its own shape, never cropped */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .woocommerce-product-gallery {
  --jm-product-image-size: 100%; width: 100% !important; max-width: none !important; margin: 0 0 16px !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  aspect-ratio: auto !important; max-inline-size: none !important; border: 1px solid var(--edge) !important; border-radius: var(--r-card) !important; overflow: hidden;
}
html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) .woocommerce-product-gallery__image img:not(.zoomImg) { height: auto !important; object-fit: contain !important; }
html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .jm-product-details {
  width: 100% !important; max-width: none !important; margin: 40px 0 32px !important; padding: 0 !important; border: 0 !important;
}

/* ---------- (0.6.14) Features: "Try the menu" window first, then K's full list (approved mockup 2026-11-30) ----------
   js/features.js (printed in the page) reads the plugin's own groups (h3 = section, list = one feature per line), moves them
   into K's boxes (.jxk) and reserves the window (.jx-mp). If the groups are unclear or the script does not run, nothing here
   matches and the plugin's plain list (rules above) stays. Account pages are never touched. */
html body.joymax-theme.jx-product #content .jm-product-details__section[data-jx-k] > h2 { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 16px !important; }
html body.joymax-theme.jx-product #content .jxk-ar { font: 700 var(--t-20) var(--ar); color: var(--ash); }
html body.joymax-theme.jx-product #content .jxk-total { font: 500 var(--t-14) var(--body); color: var(--dim); letter-spacing: 0; }

/* K: gold coverage meter on the left ("N of total seen"), section boxes with switch rows on the right */
html body.joymax-theme.jx-product #content .jxk { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 28px; align-items: start; }
html body.joymax-theme.jx-product #content .jxk-side { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 84px); display: grid; gap: 16px; padding: 18px;
  background: var(--plate); border: 1px solid var(--edge); border-radius: 10px; }
html body.joymax-theme.jx-product #content .jxk-seg h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font: 700 14px/1.2 var(--head); color: var(--paper); }
html body.joymax-theme.jx-product #content .jxk-seg h4 span { margin-left: auto; font: 600 13px var(--body); color: var(--ash); font-variant-numeric: tabular-nums; }
html body.joymax-theme.jx-product #content .jxk-cells { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
html body.joymax-theme.jx-product #content .jxk-cells i { height: 14px; border-radius: 2px; background: var(--gold); opacity: .88;
  transition: background-color .25s ease, box-shadow .25s ease; }
html body.joymax-theme.jx-product #content .jxk-sum { margin: 0; padding-top: 12px; border-top: 1px solid var(--edge); font: 600 13px var(--body); color: var(--ash); }
html body.joymax-theme.jx-product #content .jxk-sum b { font: 700 18px var(--head); color: var(--gold-text); font-variant-numeric: tabular-nums; }
html body.joymax-theme.jx-product #content .jxk-list { display: grid; gap: 14px; min-width: 0; }
html body.joymax-theme.jx-product #content .jxk-box { min-width: 0; background: var(--plate); border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; }
/* (0.6.15 speed) The browser skips drawing feature boxes and "related products" while they are far from the screen (their
   last height is remembered). Feature boxes only once every switch is ON (.wait gone), so the switch timing is untouched. */
html body.joymax-theme.jx-product #content .jxk:not(.wait) .jxk-box { content-visibility: auto; contain-intrinsic-block-size: auto 260px; }
html body.joymax-theme.jx-product #content .related.products { content-visibility: auto; contain-intrinsic-block-size: auto 520px; }
html body.joymax-theme.jx-product #content .jxk-box > h3 {
  display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 16px 16px 14px !important; border-bottom: 1px solid var(--edge);
  background: linear-gradient(var(--gold), var(--gold)) 16px 100% / 28px 2px no-repeat; font: 700 16px/1.25 var(--head) !important; color: var(--paper);
}
html body.joymax-theme.jx-product #content .jxk-box > h3 svg { width: 20px; height: 20px; flex: none; color: var(--gold-text); }
html body.joymax-theme.jx-product #content .jxk-box > h3 .jxk-n { margin-left: auto; font: 600 14px var(--head); color: var(--ash); font-variant-numeric: tabular-nums; }
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags { display: block !important; columns: 2; column-gap: 0; margin: 0 !important; padding: 4px 0 8px !important; border: 0 !important; }
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li {
  break-inside: avoid; display: flex !important; align-items: center; justify-content: space-between; gap: 14px; min-height: 0; margin: 0 !important;
  padding: 9px 16px !important; background: none !important; border: 0 !important; border-top: 1px solid color-mix(in srgb, var(--edge) 55%, transparent) !important;
  border-radius: 0 !important; font-size: 13.5px !important; line-height: 1.35 !important; color: var(--paper) !important;
}
/* The switch after each feature (decoration only; the list stays plain text): ::after = track, ::before = knob.
   Rows start OFF and slide ON (0.25 s) once inside the screen, so visitors see it happen (js/features.js, 0.6.14). */
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li { position: relative; }
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li::after {
  content: ""; flex: none; width: 26px; height: 14px; border-radius: 999px; background: var(--gold); transition: background-color .25s ease;
}
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li::before {
  content: "" !important; display: block !important; position: absolute; right: 18px; top: 50%; width: 10px !important; height: 10px !important;
  margin: -5px 0 0 !important; padding: 0; border-radius: 50%; background: var(--on-gold) !important; z-index: 1;
  transition: transform .25s cubic-bezier(.3, 1.35, .5, 1), background-color .25s ease;
}
html body.joymax-theme.jx-product #content .jxk.sw-wait .jxk-box > .jm-product-details__tags > li:not(.on)::after { background: var(--edge); }
html body.joymax-theme.jx-product #content .jxk.sw-wait .jxk-box > .jm-product-details__tags > li:not(.on)::before { transform: translateX(-12px); background: var(--ash) !important; }
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li.now::before,
html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li.now::after { transition: none; }
@media (prefers-reduced-motion: reduce) {
  html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li::before,
  html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags > li::after { transition: none; }
}
/* Meter: blocks not reached yet are dim gold outlines ("coming", never a grey "inactive" look); each fills solid gold
   together with its row's switch (owner, 0.6.14). */
html body.joymax-theme.jx-product #content .jxk.wait .jxk-cells i:not(.lit) { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
@media (prefers-reduced-motion: reduce) { html body.joymax-theme.jx-product #content .jxk-cells i { transition: none; } }

/* The "Try the menu" window's frame: fixed height from the start, so the page never jumps when it fills in.
   Its inside is styled by css/features-menu.css, loaded only when the window comes near the screen. */
html body.joymax-theme.jx-product #content .jx-mp-wrap { margin: 0 0 28px; }
html body.joymax-theme.jx-product #content .jx-mp-intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 12px; }
html body.joymax-theme.jx-product #content .jx-mp-title { margin: 0; font: 700 20px var(--head); color: var(--paper); }
html body.joymax-theme.jx-product #content .jx-mp-intro { align-items: center; }
html body.joymax-theme.jx-product #content .jx-mp-demo {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--gold); border-radius: 999px;
  font: 600 12px/1.3 var(--body); color: var(--gold-text) !important; }
html body.joymax-theme.jx-product #content .jx-mp-demo [lang="ar"] { font: 600 12.5px/1.3 var(--ar); color: var(--gold-text) !important; }
html body.joymax-theme.jx-product #content .jx-mp { height: 460px; background: var(--plate); border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; box-shadow: inset 0 2px 0 var(--gold); }

@media (max-width: 999px) {
  html body.joymax-theme.jx-product #content .jxk { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* meter on top: full section names in 3 columns; pinned only while short (6 sections or fewer) */
  html body.joymax-theme.jx-product #content .jxk-side { top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px); z-index: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 10px 12px; border-radius: 8px; }
  html body.joymax-theme.jx-product #content .jxk.many .jxk-side { position: static; }
  html body.joymax-theme.jx-product #content .jxk-seg h4 { font-size: 11px; margin-bottom: 4px; overflow-wrap: anywhere; }
  html body.joymax-theme.jx-product #content .jxk-seg h4 span { font-size: 11px; }
  html body.joymax-theme.jx-product #content .jxk-cells { display: flex; gap: 2px; }
  html body.joymax-theme.jx-product #content .jxk-cells i { flex: 1; min-width: 2px; height: 12px; }
  html body.joymax-theme.jx-product #content .jxk-sum { display: none; }
  html body.joymax-theme.jx-product #content .jx-mp { height: 540px; }
}
@media (max-width: 699px) {
  html body.joymax-theme.jx-product #content .jxk-box > .jm-product-details__tags { columns: 1; }
}
/* Add to cart stays bright gold with dark text in light mode too (another stylesheet darkens it) */
/* (0.6.11) The old Additional CSS (legacy.css) turns its text white in light mode with a longer selector; the :not() list
   below only makes this rule stronger than that one (REMOVE AFTER LAUNCH with the other old-CSS overrides). */
html body.joymax-theme.jx-product #content .summary button.single_add_to_cart_button.button,
html[data-jm-theme] body.joymax-theme.jx-product #content .summary button.single_add_to_cart_button.button:not(:disabled):not(.disabled):not(:hover):not(:focus-visible):not(:active) {
  background: var(--gold) !important; color: var(--on-gold) !important; border-color: var(--gold) !important;
}

/* Account pages: 7:5 grid, picture not capped, plain summary (the box is .jx-buybox), title 25 px, description without a box */
html body.joymax-theme.jx-account #content div.product {
  display: grid !important; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) !important; column-gap: 40px !important;
}
html body.joymax-theme.jx-account #content div.product > * { grid-column: 1 / -1 !important; }
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery {
  grid-column: 1 !important; grid-row: 1 !important; max-width: none !important; --jm-product-image-size: 100%;
}
html body.joymax-theme.jx-account #content .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  max-inline-size: none !important; aspect-ratio: auto !important; border: 0 !important; border-radius: 0 !important;
}
html body.joymax-theme.jx-account #content .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img:not(.zoomImg) {
  height: auto !important; aspect-ratio: 758 / 489; object-fit: cover !important;
}
html body.joymax-theme.jx-account #content div.product > .jx-photos { grid-column: 1 !important; grid-row: 2 !important; }
html body.joymax-theme.jx-account #content div.product > .summary {
  grid-column: 2 !important; grid-row: 1 / span 2 !important; padding: 0 !important; border: 0 !important; background: none !important; margin: 0 !important;
}
html body.joymax-theme.jx-account #content .summary .product_title { font-size: var(--t-25) !important; line-height: 1.25 !important; margin: 0 !important; }
html body.joymax-theme.jx-account #content div.product > .woocommerce-tabs { width: 100% !important; margin: 64px 0 0 !important; }
html body.joymax-theme.jx-account #content .woocommerce-tabs .ast-single-tab { padding: 0 !important; border: 0 !important; }
html body.joymax-theme.jx-account #content .woocommerce-tabs .ast-single-tab > .ast-distributed-header { font: 700 var(--t-25) var(--head) !important; margin: 0 0 20px !important; }
html body.joymax-theme.jx-account #content .woocommerce-Tabs-panel--description { max-width: 68ch; margin-left: auto !important; }

/* ---------- 0.6.3: Joymax Auctions ---------- */
/* When the auction winner already has the item in the cart, the plugin hides the price + Add to cart (its rule expects
   "p.price + form.cart" side by side). On account pages our buying box wraps them, so hide the box in that state too. */
html body.joymax-theme.jx-account.jm-auc-winner-in-cart #content .jx-buybox { display: none !important; }

/* ---------- 0.6.0 ---------- */
/* "Clear": WooCommerce shows it once an option is picked, but another stylesheet drew it at 60% strength (faint) */
html body.joymax-theme.jx-product #content .summary .reset_variations { opacity: 1 !important; }
/* Variable products: stock line before an option is picked; hidden once the chosen option's own stock line shows */
html body.joymax-theme.jx-product #content .summary .jx-var-stock { margin: 16px 0 0; }
html body.joymax-theme.jx-product #content .single_variation_wrap:has(.woocommerce-variation-availability) .jx-var-stock { display: none; }

/* ---------- 0.5.1 ---------- */
/* Astra Pro's sticky add-to-cart bar (top of the screen while scrolling) is hidden while this theme shows */
html body.joymax-theme.jx-product .ast-sticky-add-to-cart { display: none !important; }

/* Prices look like the shop cards: "220 AED" (number big, currency code small after it) */
html body.joymax-theme.jx-product #content .summary .price .jx-cur,
html body.joymax-theme.jx-product #content .jx-buybox .jx-cur {
  margin-inline-start: 6px; font: 500 var(--t-16) var(--body) !important; color: var(--ash) !important;
}
html body.joymax-theme.jx-product #content .summary .price del { color: var(--dim); opacity: 1; }
html body.joymax-theme.jx-product #content .summary .price del .jx-num { color: var(--dim) !important; }
html body.joymax-theme.jx-product #content .summary .price ins { text-decoration: none; }

/* "You may also like قد يعجبك أيضاً" (account pages): shop cards, 5 per row, 3 below 1100 px, 2 on phones */
html body.joymax-theme.jx-account #content div.product > .related { margin: 64px 0 0 !important; padding: 0 0 32px; }
html body.joymax-theme.jx-account #content .related > h2 { margin: 0 0 20px; font: 700 var(--t-25) var(--head); color: var(--paper) !important; }
/* (0.6.16-pre: 4 per row, the related list now always holds up to 4) */
html body.joymax-theme.jx-account #content .related ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; padding-bottom: 64px; }
html body.joymax-theme.jx-account #content .related ul.products > li.product { width: auto !important; margin: 0 !important; }
@media (max-width: 1100px) {
  html body.joymax-theme.jx-account #content .related ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
  html body.joymax-theme.jx-account #content .related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body.joymax-theme.jx-account #content .related > h2 { font-size: var(--t-20); }
  html body.joymax-theme.jx-account #content div.product > .related { margin-top: 48px !important; }
}

/* (0.6.15 round 6) "System requirements" card (js/req-card.js moves the plugin's section here): right under the buy box,
   same card look; one row per requirement: gold icon, label, value on the right. Computers: right column (the gallery
   spans the buy box + this card); phones: under the buy box. The TPM "Must be off" red (.jx-warn) still applies. */
@media (min-width: 768px) {
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product:has(> .jx-req):is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) {
    grid-template: "gallery buy" auto "gallery req" 1fr "details details" auto / minmax(0, 7fr) minmax(0, 5fr) !important;
  }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product > .jx-req.jx-req { grid-area: req !important; align-self: start; }
}
/* (0.6.15 round 7) 16 px between the buy box and this card (computer and phone): "div.product > *" sets every margin to
   0 with !important, so this needs !important too (two classes to outrank it). */
html body.joymax-theme.jx-product #content div.product > .jx-req.jx-req { margin: 16px 0 0 !important; }
html body.joymax-theme.jx-product #content div.product > .jx-req {
  margin: 16px 0 0; padding: 20px 24px; background: var(--plate); border: 1px solid var(--edge); border-radius: var(--r-card); }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__section { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html body.joymax-theme.jx-product #content .jx-req h2 { margin: 0 0 8px !important; font: 700 var(--t-20)/1.3 var(--head) !important; color: var(--paper) !important; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs { display: block !important; margin: 0 !important; padding: 0 !important; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs > div {
  display: flex !important; align-items: center; justify-content: space-between; gap: 16px; margin: 0 !important;
  padding: 12px 0 !important; border: 0 !important; border-top: 1px solid var(--edge) !important; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs > div:first-child { border-top: 0 !important; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs dt {
  display: flex !important; align-items: center; gap: 10px; margin: 0 !important; font: 500 var(--t-14)/1.3 var(--body) !important; color: var(--ash) !important; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs dt svg {
  flex: none; width: 32px !important; height: 32px !important; padding: 7px; border-radius: var(--r-btn); background: var(--chip-bg); color: var(--gold-text); }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs dd {
  margin: 0 !important; font: 600 var(--t-14)/1.3 var(--body) !important; color: var(--paper) !important; text-align: end; }
html body.joymax-theme.jx-product #content .jx-req .jm-product-details__specs dd.jx-warn { color: var(--warn) !important; font-weight: 700 !important; }
@media (max-width: 767px) {
  html body.joymax-theme.jx-product #content div.product > .jx-req { padding: 16px 20px; }
}

/* (0.6.15 round 7) Description before Related products: the old catalog-layout plugin puts the description tabs in a
   grid row named "description" that ends up after everything (computers ≥ 1024 px). Here the tabs simply follow the
   page order (description, then related), like on phones. REMOVE AFTER LAUNCH together with that plugin's overrides. */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product:is(:has(> .jm-product-details .jm-product-details__section[aria-label="Features"]), :not(:has(> .jm-product-details))) > .woocommerce-tabs {
  grid-row: auto !important; grid-column: 1 / -1 !important;
}

/* (0.6.16-pre, owner 2026-11-30: the Description card of docs/mockups/product-page.html; js/features.js, games products
   such as HWID Spoofer only) The Description panel becomes one card: install-video button, "About" (big Arabic: lead
   line, then each question bold with its answer), then Supported games: header + Working/Note counts, one row card per
   game, A–Z, 2 columns on computers (each row only as tall as itself), 1 on phones; 128 x 96 picture (logo half of the
   tile banner, store art, or gold initials), name, "Working" (green dot) or "Note" badge, the note under the name.
   .jxd-hide = the product's own description blocks the card replaces (display only; the text is never changed). */
html body.joymax-theme.jx-product #content .jxd-hide { display: none !important; }
/* (#page: the old catalog-layout plugin sets this panel transparent with "#page #content … !important"; REMOVE AFTER LAUNCH
   note: once that plugin is off, the plain selector is enough) */
html body.joymax-theme.jx-product #page #content .woocommerce-tabs.jxd-on .woocommerce-Tabs-panel--description {
  margin: 0 !important; padding: 32px !important; border: 1px solid var(--edge); border-radius: var(--r-card); background: var(--plate) !important; }
/* (Astra's tab wrapper draws its own frame around the panel: the card replaces it, so no double frame) */
html body.joymax-theme.jx-product #page #content .woocommerce-tabs.jxd-on .ast-single-tab { border: 0 !important; padding: 0 !important; background: none !important; }
html body.joymax-theme.jx-product #page #content .woocommerce-tabs.jxd-on .ast-single-tab > .ast-distributed-header { margin: 0 0 16px !important; padding: 0 !important; }
html body.joymax-theme.jx-product #content .jxd { --jxd-row: color-mix(in srgb, var(--plate) 95%, var(--paper)); --jxd-gold-line: color-mix(in srgb, var(--gold) 40%, transparent); }
/* 1. Video button */
html body.joymax-theme.jx-product #content .jxd-tut { display: flex; justify-content: center; margin: 0 0 28px; }
html body.joymax-theme.jx-product #content .jxd-tut a {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 999px; text-decoration: none !important;
  border: 1px solid var(--jxd-gold-line); background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold-text) !important;
  font: 700 18px var(--head); transition: border-color var(--out), background var(--out); }
html body.joymax-theme.jx-product #content .jxd-tut a span { color: var(--gold-text) !important; }
html body.joymax-theme.jx-product #content .jxd-tut a [lang="ar"] { font: 700 19px var(--ar); color: var(--gold-text) !important; }
html body.joymax-theme.jx-product #content .jxd-tut + .jxd-tut { margin-top: -16px; }
/* (0.6.16-pre) The plugin's own "Watch product video" link is hidden on every product: the gold button above opens the
   Description section instead (inc/product.php). Its box is hidden too when nothing else in it is left to show. */
html body.joymax-theme.jx-product #content .jm-product-details__video { display: none !important; }
html body.joymax-theme.jx-product #content div.product > .jm-product-details:not(:has(> :not(.jxd-hide, .jm-product-details__video, script, style))) { display: none !important; }
html body.joymax-theme.jx-product #content .jxd-tut a:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 20%, transparent); }
html body.joymax-theme.jx-product #content .jxd-tut svg { width: 22px; height: 22px; flex: none; }
/* 2. About */
html body.joymax-theme.jx-product #content .jxd :is(.jxd-sub, .jxg-h) {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 !important; font: 700 var(--t-25)/1.2 var(--head) !important; color: var(--paper) !important; text-align: start; }
html body.joymax-theme.jx-product #content .jxd :is(.jxd-sub, .jxg-h) .jxk-ar { font: 500 18px var(--ar); color: var(--ash); }
html body.joymax-theme.jx-product #content .jxd-about { margin: 0 0 40px; }
html body.joymax-theme.jx-product #content .jxd-sub { margin: 0 0 16px !important; }
html body.joymax-theme.jx-product #content .jxd .jxd-lead { margin: 0 0 20px !important; font: 700 24px/1.7 var(--ar); color: var(--paper); text-align: right; }
html body.joymax-theme.jx-product #content .jxd-faq { display: grid; gap: 12px; }
html body.joymax-theme.jx-product #content .jxd-qa { padding: 18px 20px; border: 1px solid var(--edge); border-radius: 10px; background: var(--jxd-row); direction: rtl; }
html body.joymax-theme.jx-product #content .jxd .jxd-q { display: flex; align-items: center; gap: 12px; margin: 0 !important; font: 700 20px/1.6 var(--ar); color: var(--paper); text-align: right; }
html body.joymax-theme.jx-product #content .jxd .jxd-q::before {
  content: "؟"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-btn);
  background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold-text); font: 700 18px var(--ar); }
html body.joymax-theme.jx-product #content .jxd .jxd-a { margin: 8px 0 0 !important; padding-inline-start: 44px; font: 400 18px/1.9 var(--ar); color: var(--ash) !important; text-align: right; }
/* 3. Supported games */
html body.joymax-theme.jx-product #content .jxg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin: 0 0 18px; }
html body.joymax-theme.jx-product #content .jxg-tally { margin-inline-start: auto; display: flex; gap: 8px; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-tally > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--edge);
  background: var(--jxd-row, var(--plate)); font: 500 13px var(--body); color: var(--ash) !important; }
/* (the description panel's "span: paper colour" rule outranks these, so the colours below carry !important) */
html body.joymax-theme.jx-product #content .jxg-games .jxg-tally b { color: var(--paper); font-weight: 600; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-t-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
html body.joymax-theme.jx-product #content .jxg-list { columns: 2; column-gap: 16px; margin: 0 !important; padding: 0 !important; list-style: none; }
html body.joymax-theme.jx-product #content .jxg-row {
  break-inside: avoid; display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  margin: 0 0 12px !important; padding: 10px 14px 10px 10px !important; border: 1px solid var(--edge); border-radius: 10px;
  background: var(--jxd-row, var(--plate)); transition: border-color var(--out), background var(--out); }
html body.joymax-theme.jx-product #content .jxg-row:hover { border-color: var(--jxd-gold-line, var(--gold)); background: color-mix(in srgb, var(--jxd-row, var(--plate)) 92%, var(--gold)); }
html body.joymax-theme.jx-product #content .jxg-ic {
  width: 128px; height: 96px; border-radius: var(--r-btn); overflow: hidden; display: grid; place-items: center; background: #0A0A0B; }
html body.joymax-theme.jx-product #content .jxg-ic img { width: 100%; height: 100%; margin: 0; object-fit: cover; object-position: 100% 50%; border-radius: 0; }
@supports (object-view-box: inset(0 0 0 44%)) {
  html body.joymax-theme.jx-product #content .jxg-ic img { object-fit: contain; object-view-box: inset(4% 0 4% 44%); }
}
/* (0.6.16-pre) Store-art icons from the Media Library (assets-src/game-icons/, already 4:3): shown whole, no logo-half crop. */
html body.joymax-theme.jx-product #content .jxg-own img { object-fit: cover; object-position: 50% 50%; object-view-box: none; }
html body.joymax-theme.jx-product #content .jxg-tint img { filter: hue-rotate(190deg) saturate(1.3) brightness(1.12); }   /* = home.css --tint */
html body.joymax-theme.jx-product #content .jxg-ini { background: var(--chip-bg); font: 700 22px var(--head); color: var(--gold-text) !important; letter-spacing: .04em; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-nm { font: 600 18px/1.25 var(--head); color: var(--paper); overflow-wrap: anywhere; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-note { color: var(--warn) !important; font: 500 14px/1.5 var(--body); }
html body.joymax-theme.jx-product #content .jxg-games .jxg-note[lang="ar"] { font-family: var(--ar); text-align: right; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-st {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 13px var(--body); white-space: nowrap; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-st-ok { color: var(--live) !important; padding-inline: 0; }
html body.joymax-theme.jx-product #content .jxg-games .jxg-st-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
html body.joymax-theme.jx-product #content .jxg-games .jxg-st-note {
  color: var(--warn) !important; background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
@media (max-width: 767px) {
  html body.joymax-theme.jx-product #page #content .woocommerce-tabs.jxd-on .woocommerce-Tabs-panel--description { padding: 18px !important; }
  html body.joymax-theme.jx-product #content .jxd .jxd-lead { font-size: 20px; }
  html body.joymax-theme.jx-product #content .jxd .jxd-q { font-size: 18px; }
  html body.joymax-theme.jx-product #content .jxd .jxd-a { font-size: 17px; padding-inline-start: 0; }
  html body.joymax-theme.jx-product #content .jxd-qa { padding: 14px 16px; }
  html body.joymax-theme.jx-product #content .jxd-tut a { font-size: 16px; padding: 0 18px; }
  html body.joymax-theme.jx-product #content .jxg-tally { margin-inline-start: 0; width: 100%; }
  html body.joymax-theme.jx-product #content .jxg-list { columns: 1; }
  html body.joymax-theme.jx-product #content .jxg-row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; padding: 8px 10px 8px 8px !important; }
  html body.joymax-theme.jx-product #content .jxg-ic { width: 96px; height: 72px; }
  html body.joymax-theme.jx-product #content .jxg-games .jxg-nm { font-size: 16px; }
}

/* (0.6.15 round 6) "Related products" on the other products: the same shop cards (picture, name, gold "N AED"), up to 4
   per row on computers, 3 below 1100 px, 2 on phones. In place of Astra's letter-spaced "SELECT OPTIONS" button, the
   card's bottom row ends in a small "View" pill (same as the /shop/ category boxes; gold when the card is hovered); the
   plain "In stock" text makes room for it. Sold-out cards keep their sold-out pill. The whole card stays one link. */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product > .related { margin: 56px 0 0 !important; padding: 0 0 32px; }
html body.joymax-theme.jx-product:not(.jx-account) #content .related > h2 { margin: 0 0 20px; font: 700 var(--t-25) var(--head); color: var(--paper) !important; letter-spacing: 0; text-transform: none; }
html body.joymax-theme.jx-product:not(.jx-account) #content .related ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; padding-bottom: 64px; }
html body.joymax-theme.jx-product:not(.jx-account) #content .related ul.products > li.product { width: auto !important; margin: 0 !important; }
html body.joymax-theme.jx-product:not(.jx-account) #content .related a.jx-card-link .jx-card-stock { display: none; }
html body.joymax-theme.jx-product:not(.jx-account) #content .related a.jx-card-link .jx-card-price { color: var(--gold-text); }   /* gold price (owner) */
html body.joymax-theme.jx-product:not(.jx-account) #content .related a.jx-card-link .jx-card-row::after {
  content: "View"; flex: none; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--edge);
  background: var(--chip-bg); color: var(--paper); font: 600 var(--t-12)/1.4 var(--body);
  transition: background-color var(--out) ease, color var(--out) ease, border-color var(--out) ease; }
@media (hover: hover) and (pointer: fine) {
  html body.joymax-theme.jx-product:not(.jx-account) #content .related a.jx-card-link:hover .jx-card-row::after { background: var(--gold); border-color: var(--gold); color: var(--on-gold); transition-duration: var(--in); }
}
@media (max-width: 1100px) {
  html body.joymax-theme.jx-product:not(.jx-account) #content .related ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
  html body.joymax-theme.jx-product:not(.jx-account) #content .related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body.joymax-theme.jx-product:not(.jx-account) #content .related > h2 { font-size: var(--t-20); }
  html body.joymax-theme.jx-product:not(.jx-account) #content div.product > .related { margin-top: 40px !important; }
}

/* (0.6.16e) 5–8 related products: one looping row (js/related.js + js/loop-row.js), all product pages incl. accounts.
   Cards keep today's width (4 / 3 / 2 in view); ‹ › and Pause sit on the heading's line. Computers with a mouse: the
   row slides (faded ends, hidden copies); phones, touch and reduced motion: swipe with snapping, no copies. */
/* (0.6.16f) Until js/related.js has built the row, only the first 4 cards show (no 2-row flash; no script = these 4). */
html body.joymax-theme.jx-product #content .related:not(.jx-rel-loop) ul.products > li.product:nth-child(n+5) { display: none !important; }
html body.joymax-theme.jx-product #content .related.jx-rel-loop { position: relative; }
html body.joymax-theme.jx-product #content .related.jx-rel-loop > h2 { padding-right: 190px; }
html body.joymax-theme.jx-product #content .related .jx-loop-ctrls { position: absolute; top: -6px; right: 0; display: flex; gap: 8px; }
html body.joymax-theme.jx-product #content .related .jx-loop-btn {
  display: grid; place-items: center; min-width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: var(--r-btn);
  background: var(--plate); color: var(--ash); font: 600 var(--t-14)/1 var(--body); text-transform: none; letter-spacing: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--edge); transition: color var(--out) ease, box-shadow var(--out) ease; }
html body.joymax-theme.jx-product #content .related .jx-loop-btn[hidden] { display: none; }
html body.joymax-theme.jx-product #content .related .jx-loop-pause { padding: 0 16px; }
html body.joymax-theme.jx-product #content .related .jx-loop-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
html body.joymax-theme.jx-product #content .related .jx-loop-btn svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  html body.joymax-theme.jx-product #content .related .jx-loop-btn:hover { color: var(--paper); box-shadow: inset 0 0 0 1px var(--ash); }
}
html body.joymax-theme.jx-product #content .related .jx-loop-vp {
  container-type: inline-size; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 56px; }
html body.joymax-theme.jx-product #content .related .jx-loop-vp::-webkit-scrollbar { display: none; }
html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track {
  display: flex !important; gap: 16px !important; width: max-content !important; max-width: none !important; margin: 0 !important;
  padding: 4px 0 8px !important; }
html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track::before,
html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track::after { content: none !important; display: none !important; }
html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track > li.product {
  flex: none; width: calc((100cqi - 48px) / 4) !important; margin: 0 !important; }
@media (max-width: 1100px) {
  html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track > li.product { width: calc((100cqi - 32px) / 3) !important; }
}
@media (min-width: 901px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html body.joymax-theme.jx-product #content .related .jx-loop-vp { mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
}
@media (max-width: 900px), (hover: none), (prefers-reduced-motion: reduce) {
  html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track > [aria-hidden="true"] { display: none !important; }
  html body.joymax-theme.jx-product #content .related .jx-loop-vp { scroll-snap-type: x mandatory; }
  html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track > li.product { scroll-snap-align: start; }
}
@media (max-width: 900px) {
  html body.joymax-theme.jx-product #content .related.jx-rel-loop ul.products.jx-loop-track > li.product { width: calc((100cqi - 16px) / 2.2) !important; }
}
@media (max-width: 600px) {
  html body.joymax-theme.jx-product #content .related .jx-loop-ctrls { display: none; }   /* phones: swipe */
  html body.joymax-theme.jx-product #content .related.jx-rel-loop > h2 { padding-right: 0; }
}

@media (max-width: 900px) {
  html body.joymax-theme.jx-product #content .summary .product_title { font-size: var(--t-31) !important; }
  html body.joymax-theme.jx-account #content .summary .product_title { font-size: var(--t-20) !important; }
  html body.joymax-theme.jx-account #content div.product { grid-template-columns: minmax(0, 1fr) !important; }
  html body.joymax-theme.jx-account #content div.product > :is(.woocommerce-product-gallery, .jx-photos, .summary) { grid-column: 1 !important; grid-row: auto !important; }
  html body.joymax-theme.jx-account #content div.product > .woocommerce-tabs { margin-top: 48px !important; }
}

@media (max-width: 900px) {
  html body.joymax-theme.jx-product #content .summary .product_title { font-size: var(--t-20); }
  html body.joymax-theme.jx-product #content .woocommerce-variation-price .price { font-size: var(--t-39); }
  html body.joymax-theme.jx-account #content div.product { grid-template-columns: minmax(0, 1fr); }
  html body.joymax-theme.jx-account #content div.product > :is(.woocommerce-product-gallery, .jx-photos, .summary) { grid-column: 1; grid-row: auto; }
  html body.joymax-theme.jx-account #content div.product > .summary { margin-top: 16px; }
  html body.joymax-theme.jx-account #content .jx-buybox { padding: 20px; }
  html body.joymax-theme.jx-account #content .jx-buybox .jx-buy-price { font-size: var(--t-39); }
}

/* (0.6.16-pre) Picture card as tall as the right column (js/equal-cols.js adds .jx-eq and --jx-h, computers only):
   the picture stays whole and centred, the blurred copy (--jx-bg, js/gallery-bg.js) fills above/below and the sides.
   Heights are the card's outer height; the slider window and the account gallery draw a 1 px border outside it. */
/* Single picture (non-account): the picture card itself */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product .woocommerce-product-gallery__image.jx-eq {
  height: var(--jx-h) !important; aspect-ratio: auto !important; max-height: none !important; display: flex !important; align-items: center; justify-content: center;
}
/* (its link fills the card, so the picture is centred inside the link) */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product .woocommerce-product-gallery__image.jx-eq > a {
  display: flex !important; align-items: center !important; justify-content: center !important; width: 100%; height: 100%;
}
/* Slider (several pictures): every slide gets the same new height, so switching pictures still never jumps */
html body.joymax-theme.jx-product:not(.jx-account) #content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images > .flex-viewport.jx-eq > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  height: calc(var(--jx-h) - 2px) !important; aspect-ratio: auto !important; max-height: none !important;
}
/* Accounts: the bordered gallery is the card; its picture switches from "fill and crop" to "whole and centred" only here */
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery.jx-eq .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  height: calc(var(--jx-h) - 2px) !important; position: relative; isolation: isolate; overflow: hidden; background: #0A0A0B !important;
}
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery.jx-eq .woocommerce-product-gallery__image[style*="--jx-bg"]::before {
  content: ""; position: absolute; inset: -32px; z-index: -1; pointer-events: none;
  background: var(--jx-bg) center / cover no-repeat; filter: blur(22px) brightness(.45) saturate(1.1);
}
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery.jx-eq .woocommerce-product-gallery__image > a { display: block; height: 100%; }
html body.joymax-theme.jx-account #content div.product > .woocommerce-product-gallery.jx-eq .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img:not(.zoomImg) {
  width: 100% !important; height: 100% !important; aspect-ratio: auto; object-fit: contain !important;
}

/* (0.6.16h) LCP: the main picture paints as soon as it arrives. WooCommerce prints the gallery with inline
   "opacity: 0" and only shows it when its script has run (seconds later, after Rocket Loader), so the picture was
   the late "largest paint". The gallery is now visible at once. */
html body.joymax-theme.jx-product #content .woocommerce-product-gallery { opacity: 1 !important; }
/* "Starting" layout, until the slider has sized its slides (it writes "width:" into each slide's style; a slide's
   own style only has --jx-bg before that). Without it, the visible gallery would stack all pictures and the
   thumbnails one under another, then jump. #content#content: must beat the ≥768 px gallery rules above.
   1) Only the first picture is shown (others wait for the slider). */
html body.joymax-theme.jx-product #content#content .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2):not([style*="width:"]) { display: none !important; }
/* 2) Galleries with several pictures (they become sliders): the first picture sits in the slider's square frame
   (≤ 560 px high, whole and centred), with the slider's 1em gap above the thumbnails. On computers the equal-height
   script (js/equal-cols.js, footer, before the slider) already gives it the final height: .jx-eq wins then. */
html body.joymax-theme.jx-product:not(.jx-account) #content#content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not([style*="width:"])):has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) .woocommerce-product-gallery__wrapper {
  margin-bottom: 1em; width: auto !important; transform: none !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not([style*="width:"])):has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) > .flex-viewport {
  margin-bottom: 0 !important; height: auto !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not([style*="width:"])):has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not(.jx-eq) {
  aspect-ratio: 1 / 1 !important; max-height: 560px; display: block !important; height: auto !important; width: auto !important; float: none !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not([style*="width:"])):has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child > a {
  display: block !important; width: 100%; height: 100%;
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content div.product.type-product .woocommerce-product-gallery.woocommerce-product-gallery--with-images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not([style*="width:"])):has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child img:not(.zoomImg) {
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; object-fit: contain !important;
}
/* 3) Astra Pro's thumbnails: already a row of 4 squares (15 px apart) before their own slider sizes them. */
html body.joymax-theme.jx-product:not(.jx-account) #content#content .ast-single-product-thumbnails:has(.ast-woocommerce-product-gallery__image:first-child:not([style*="width:"])) .woocommerce-product-gallery-thumbnails__wrapper {
  display: flex !important; gap: 15px; overflow: hidden; width: auto !important; transform: none !important;
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content .ast-single-product-thumbnails:has(.ast-woocommerce-product-gallery__image:first-child:not([style*="width:"])) .ast-woocommerce-product-gallery__image {
  flex: 0 0 max(80px, calc((100% - 45px) / 4)); aspect-ratio: 1 / 1; overflow: hidden; /* Astra: ¼ of the row, at least 80 px (phones) */
}
html body.joymax-theme.jx-product:not(.jx-account) #content#content .ast-single-product-thumbnails:has(.ast-woocommerce-product-gallery__image:first-child:not([style*="width:"])) .ast-woocommerce-product-gallery__image img {
  display: block; width: 100%; height: 100%;
}
