/* PageSpeed mitigation — defer offscreen swatch render + image decode.
 *
 * Products with 50-100+ image swatches contributed ~328ms of unattributed
 * forced reflow on PDP load (per Lighthouse desktop trace, 2026-05-12):
 * the browser was decoding every 40×40 webp + invalidating layout for
 * each one, even though only the top 2-3 rows of the swatch grid sat in
 * the initial viewport.
 *
 * `content-visibility: auto` flips offscreen wrappers to a deferred-
 * rendering mode — the browser skips both layout AND image decode for
 * them until they scroll near the viewport. Wrappers that ARE in the
 * initial viewport degrade to `visible` automatically (no-op), so the
 * top swatches paint normally and don't regress LCP/CLS.
 *
 * `contain-intrinsic-size: auto 500px` reserves placeholder height so
 * the page doesn't collapse + reshuffle when offscreen wrappers swap
 * between rendered/skipped during scroll. 500px is a soft upper-bound
 * for a 60-swatch grid in the ~400px-wide PDP info column (~10 rows ×
 * ~50px). On grids shorter than 500px the browser shrinks; longer grids
 * get the right size once first paint measures them (the `auto` keyword
 * tells it to remember the actual size after each render).
 */
.om-variations-wrapper {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}
/* Not in the product page's own form, nor on a card. `content-visibility: auto`
 * keeps paint containment even on screen (it does not degrade to `visible`), so
 * the wrapper clipped everything past its box: the hover label above a swatch,
 * the in-cart ring and the corner badges. That form is one wrapper per
 * attribute near the top of the page, where deferring gains nothing; a card
 * shows a few swatches, and off screen its placeholder (the one value of
 * contain-intrinsic-size sizes both axes) made the lean card's row 500px wide:
 * on a phone the category page scrolled sideways (11.3.3). */
form.variations_form .om-variations-wrapper,
.om-product-swatches--archive .om-variations-wrapper {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.om-variation-swatch-image {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 100%;
  height: 100%;
  inset-inline-start: 0;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: 300ms;
  transition: 300ms;
}
.om-variation-swatch-image.active {
  opacity: 1;
  visibility: visible;
}
.om-variation-swatch-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Base flex layout for all swatch type containers */
.om-variation-type-color,
.om-variation-type-button,
.om-variation-type-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* A colour swatch's shade is on its inner span (the server sets it inline): the span fills the ring, so the
   swatch is never drawn as an empty circle. */
.om-variations-wrapper .om-variation-type-color > :is(a, label) {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  box-sizing: border-box;
}
.om-variations-wrapper .om-variation-type-color > :is(a, label) > .om-variation-text {
  display: block;
  flex: 1 1 auto;
  border-radius: inherit;
}

/* Thumbs on the product page: each colour swatch a 44 px target (the cards keep their own size). */
@media (pointer: coarse) {
  .om-variations-wrapper:not(.om-product-swatches--archive *) .om-variation-type-color > :is(a, label) {
    width: 44px;
    height: 44px;
  }
}

.om-variations-wrapper[data-type="image"] .om-variation-type-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  /* Without an explicit max-width the flex container uses `width: max-content`
   * (= sum of all swatches in one row), which makes its bounding box exceed
   * the parent column. `flex-wrap: wrap` only kicks in when the container's
   * width is actually constrained — without this max-width, the container
   * grows to fit content and never wraps. The wrapper sits inside WC's
   * variations form which itself doesn't always constrain children, so we
   * pin it to 100% of whatever parent we end up in. */
  max-width: 100%;
}

/* Same constraint on the wrapper level — defends against any ancestor that
 * doesn't constrain it. WC's `<table class="variations">` plus the form
 * rendered by `single-product` block layout don't always cap inner widths. */
.om-variations-wrapper {
  max-width: 100%;
}

.om-product-swatches--archive {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.om-product-swatches--archive form.variations_form {
  width: auto;
  margin: 0;
}

.om-product-swatches--archive .variations,
.om-product-swatches--archive .variations tbody,
.om-product-swatches--archive .variations tr {
  width: auto;
  border: 0;
  margin: 0;
  padding: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.om-product-swatches--archive .variations tr {
  flex-direction: column;
  gap: 8px;
}

.om-product-swatches--archive .variations .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.om-product-swatches--archive .variations .value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.om-product-swatches--archive .om-variation-type-image {
  gap: 6px;
  justify-content: center;
}

.om-product-swatches--archive .om-more-variations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  background-color: #f5f5f5;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--wp--custom--rooster--shape--button, 4px);
  border: 1px solid #ddd;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.om-product-swatches--archive .om-more-variations:hover {
  background-color: #e8e8e8;
  border-color: #ccc;
  text-decoration: none;
  color: #333;
}

.om-product-swatches--archive .om-add-to-cart-button {
  align-self: center;
}

/* A swatch tapped before the card's form arrived (aieo-card-swatches.js, FB12). */
.om-product-swatches--archive[aria-busy="true"] {
  cursor: progress;
}

.om-product-swatches--archive[aria-busy="true"] .om-variation-item {
  opacity: 0.6;
}

.om-product-swatches--archive .single_variation_wrap,
.om-product-swatches--archive .reset_variations_alert {
  display: none !important;
}

/* Archive page cart summary - compact version */
.om-product-swatches--archive .om-cart-summary {
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.om-product-swatches--archive .om-cart-summary-icon {
  width: 16px;
  height: 16px;
  font-size: 10px;
}

.om-product-swatches--archive .om-cart-summary-content {
  gap: 6px;
}

.om-product-swatches--archive .om-cart-summary-text {
  font-size: 12px;
}

.om-product-swatches--archive .om-cart-summary-toggle {
  font-size: 11px;
}

.om-product-swatches--archive .om-cart-summary-details {
  margin-top: 6px;
  padding-top: 6px;
}

.om-product-swatches--archive .om-cart-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.om-product-swatches--archive .om-cart-summary-list li,
.om-product-swatches--archive .om-cart-summary-list li.om-cart-summary-item,
.products .om-product-swatches--archive .om-cart-summary-list li,
.products.columns-3 .om-product-swatches--archive .om-cart-summary-list li {
  padding: 2px 0 !important;
  padding-inline-start: 0 !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  font-size: 11px;
  border-bottom: none;
  display: block;
}

/* Hide subtotal on archive pages - not needed */
.om-product-swatches--archive .om-cart-summary-subtotal {
  display: none;
}

.om-variation-select--archive {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ========================================
   VARIATION DESCRIPTION AND PRICE LAYOUT
   ======================================== */

/* Hide single_variation container until variation is selected */
.woocommerce-variation.single_variation:empty {
  display: none !important;
}

/* HIDE variation description - it is already shown under product title */
.woocommerce-variation.single_variation .woocommerce-variation-description,
.single_variation .woocommerce-variation-description {
  display: none !important;
}

/* Container: clean layout with no extra spacing */
.woocommerce-variation.single_variation {
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Price: display as block at 16px font size */
.woocommerce-variation.single_variation .woocommerce-variation-price,
.single_variation .woocommerce-variation-price {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

/* Price amount: 16px font size */
.woocommerce-variation.single_variation .woocommerce-variation-price .woocommerce-Price-amount,
.single_variation .woocommerce-variation-price .woocommerce-Price-amount {
  font-size: 16px !important;
  font-weight: normal !important;
}

/* Availability: display below price */
.woocommerce-variation.single_variation .woocommerce-variation-availability,
.single_variation .woocommerce-variation-availability {
  display: block !important;
  margin-top: 8px !important;
}

/* ========================================
   OUT-OF-STOCK VARIATION STYLES
   ======================================== */

/* CRITICAL OVERRIDE: Enable hover on disabled variations for tooltips
   Must use high specificity to override existing pointer-events:none */
.single-product .om-variations-wrapper .om-variation-type-image > :is(a, label).disabled,
.single-product .om-variations-wrapper .om-variation-type-image > :is(a, label).permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-button > :is(a, label).disabled,
.single-product .om-variations-wrapper .om-variation-type-button > :is(a, label).permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-color > :is(a, label).disabled,
.single-product .om-variations-wrapper .om-variation-type-color > :is(a, label).permanent-disabled,
.om-variations-wrapper .om-variation-type-image > :is(a, label).disabled,
.om-variations-wrapper .om-variation-type-image > :is(a, label).permanent-disabled,
.om-variations-wrapper .om-variation-type-button > :is(a, label).disabled,
.om-variations-wrapper .om-variation-type-button > :is(a, label).permanent-disabled,
.om-variations-wrapper .om-variation-type-color > :is(a, label).disabled,
.om-variations-wrapper .om-variation-type-color > :is(a, label).permanent-disabled {
  pointer-events: auto !important; /* MUST allow hover for tooltips */
  cursor: not-allowed !important; /* Show disabled state */
}

/* ========================================
   OUT-OF-STOCK X OVERLAY - Always Visible
   ======================================== */

/* Base styling for disabled/out-of-stock swatches */
.om-variations-wrapper .om-variation-item.disabled,
.om-variations-wrapper .om-variation-item.permanent-disabled {
  position: relative;
  opacity: 0.6;
}

/* X overlay using ::before pseudo-element - diagonal line 1 */
.om-variations-wrapper .om-variation-item.disabled::before,
.om-variations-wrapper .om-variation-item.permanent-disabled::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 2px;
  background-color: var(--wp--preset--color--muted, currentColor);
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: var(--wp--custom--rooster--shape--control, 1px);
}

/* X overlay using ::after pseudo-element - diagonal line 2 */
.om-variations-wrapper .om-variation-item.disabled::after,
.om-variations-wrapper .om-variation-item.permanent-disabled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 2px;
  background-color: var(--wp--preset--color--muted, currentColor);
  transform: translate(-50%, -50%) rotate(-45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: var(--wp--custom--rooster--shape--control, 1px);
}

/* A shade sold as a back-order: a dashed ring from the first paint, tickable; its name says so (title,
   aria-label). A sold-out shade is the X above (owner, 28 Oct 2026, R3; FB8). */
.om-variations-wrapper .om-variation-item.is-backorder {
  border-style: dashed;
  border-width: 2px;
}
.om-variations-wrapper .om-variation-item.is-backorder:not(.active):not(.om-multi-selected):not(:hover) {
  border-color: var(--wp--preset--color--muted, #6b6b6b);
}

/* For image swatches - make sure X appears over the image */
.om-variations-wrapper .om-variation-type-image > :is(a, label).disabled,
.om-variations-wrapper .om-variation-type-image > :is(a, label).permanent-disabled {
  overflow: visible;
}

/* For color swatches - make sure X appears over the color */
.om-variations-wrapper .om-variation-type-color > :is(a, label).disabled .om-variation-text,
.om-variations-wrapper .om-variation-type-color > :is(a, label).permanent-disabled .om-variation-text {
  position: relative;
}

/* Button swatches - add strikethrough text effect too */
.om-variations-wrapper .om-variation-type-button > :is(a, label).disabled,
.om-variations-wrapper .om-variation-type-button > :is(a, label).permanent-disabled {
  text-decoration: line-through;
  text-decoration-color: var(--wp--preset--color--muted, currentColor);
}

/* Position context for tooltips */
.om-variation-item {
  position: relative;
}

/* The product page's shades as tick boxes or choices (Swatches > Shades on the product page, `inputs`, the default;
 * the owner, 10 Nov 2026): the input fills its shade, invisible, so a tap is the input's and ticks it before the swatch
 * script has loaded; the chosen ring is the ticked box's as well as the script's class (the printed settings' rules);
 * the keyboard reaches the input, and its ring is drawn on the shade. */
.om-variations-wrapper[data-controls="inputs"] label.om-variation-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.om-variations-wrapper[data-controls="inputs"] .om-variation-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  opacity: 0;
  cursor: inherit;
}
.om-variations-wrapper[data-controls="inputs"] .om-variation-input:disabled {
  cursor: not-allowed;
}
.om-variations-wrapper[data-controls="inputs"] label.om-variation-item:has(> .om-variation-input:focus-visible) {
  outline: 2px solid var(--wp--preset--color--fg, CanvasText);
  outline-offset: 2px;
}
html[data-rooster-design="theme"] .om-variations-wrapper[data-controls="inputs"] label.om-variation-item:has(> .om-variation-input:focus-visible) {
  outline: none;
  box-shadow: var(--wp--custom--rooster--focus-ring);
}

/* Ensure wrappers allow tooltip overflow */
.om-variations-wrapper,
.om-variation-type-image,
.om-variation-type-color,
.om-variation-type-button {
  overflow: visible !important;
}

/* Override old tooltip positioning - NEW tooltip system uses ::after pseudo-element */
.om-variations-wrapper .om-variation-tooltip {
  display: inline-block !important;
  position: static !important; /* Changed from relative - let parent handle positioning */
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  transform: none !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  top: auto !important;
  bottom: auto !important;
}

/* Visually hide empty tooltip spans (color/image swatches) without affecting button text */
.om-variation-type-color .om-variation-tooltip:empty,
.om-variation-type-image .om-variation-tooltip:empty {
  display: block !important;
  height: 0;
  overflow: visible !important; /* MUST be visible so ::after pseudo-element can show above */
}

/* ========================================
   TOOLTIP POSITIONING - FIXED TO TOP
   Position tooltip relative to the .om-variation-item parent (the <a> tag)
   Uses data-tooltip attribute which is only added when tooltip setting is enabled
   ======================================== */

/* The parent link must be the positioning context for tooltips */
.om-variation-item:not(.disabled):not(.permanent-disabled) {
  position: relative;
}

/* Tooltip content - creates tooltip above the swatch element */
/* Uses data-tooltip attribute which is only present when tooltips are enabled */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--wp--custom--rooster--shape--control, 4px);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
  min-width: max-content;
}

/* Tooltip arrow pointing down */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 999999;
}

/* Show tooltip on hover - trigger from parent link element */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]:hover::after,
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

/* On touch / no-hover devices the tooltip pseudo-elements never get shown
 * (there's no `:hover` state) but they still take layout space — their
 * `position: absolute; min-width: max-content; white-space: nowrap` boxes
 * extend past the swatch on every side, and on swatches near the viewport
 * edge that pushes `document.scrollWidth` past the visible viewport. The
 * net effect was a ~73px right-side overflow on every product page with
 * image swatches on mobile. Strip the pseudo-elements entirely when hover
 * isn't available — tooltips are pointless without hover anyway. */
@media (hover: none) {
  .om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::after,
  .om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::before {
    display: none;
  }
}

/* On-selection variation caption: the "<description> - <attribute>" label
 * (e.g. "No100 Fair - Ανοιχτόχρωμο") written by aieo-swatches.js
 * (applyVariationToProduct) into .om-variation-description when a variation is
 * chosen. Kept compact so it sits cleanly under the swatch row / title. */
.om-variation-description {
  margin: 4px 0 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #4b5563;
}
.om-variation-description p { margin: 0; }

/* Tooltip for disabled swatches - use title attribute instead (browser native) */
/* The X overlay uses ::before/::after so we can't use pseudo-elements for tooltips */

/* Slight hover effect for disabled items to show they're interactive for viewing */
.single-product .om-variations-wrapper .om-variation-type-image > :is(a, label).disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-image > :is(a, label).permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > :is(a, label).disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > :is(a, label).permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > :is(a, label).disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > :is(a, label).permanent-disabled:hover {
  opacity: 0.6; /* Slightly brighten on hover to show it's responsive */
}

/* Stop making the left column a flex container - allows description to be block element underneath */
.product-equal-height ul.products li.product .loop-button-wrap {
  display: block !important;   /* was flex/-ms-flexbox */
  -ms-flex: none !important;   /* undo flex:1 in old IE rules */
  flex: none !important;       /* in case it's set elsewhere */
  align-items: unset !important;
}

.product-equal-height ul.wc-block-grid__products li.wc-block-grid__product .loop-button-wrap {
  display: block !important;
  -ms-flex: none !important;
  flex: none !important;
  align-items: unset !important;
}

/* Override Botiga theme margin on variations_form in product archives */
.product-equal-height ul.wc-block-grid__products li.wc-block-grid__product .variations_form,
.product-equal-height ul.wc-block-grid__products li.product .variations_form,
.product-equal-height ul.products li.wc-block-grid__product .variations_form,
.product-equal-height ul.products li.product .variations_form {
  margin-bottom: 0;
}

/* ========================================
   MULTI-SELECT MODE STYLES
   ======================================== */

/* Multi-select container - positioned ABOVE dropdown/swatches for visibility */
.om-multi-select-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
  min-height: 90px; /* Reserved space to prevent UI shifting when selections change */
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

/* Summary section - always visible with reserved space */
.om-multi-select-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 50px; /* Reserve space for summary content */
}

/* Selected count display */
.om-multi-select-count {
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

/* Selected names list */
.om-multi-select-names {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  max-height: 80px;
  min-height: 20px; /* Reserve minimum space */
  overflow-y: auto;
  padding-inline-end: 10px;
}

/* Empty placeholder state - visible but subtle */
.om-multi-select-names.om-empty-placeholder {
  color: #999;
  font-style: italic;
}

/* Prompt message - shown when no selections made */
.om-multi-select-prompt {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  padding: 10px 0;
}

/* Success state styling */
.om-multi-select-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
}

.om-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--wp--preset--color--success, #4CAF50);
  color: var(--wp--preset--color--bg, #fff);
  font-size: 18px;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
}

.om-success-message {
  font-size: 16px;
  color: var(--aieo-color-success, var(--wp--preset--color--success, #15803d));
  font-weight: 500;
  line-height: 1.4;
}

/* Success state container styling */
.om-multi-select-container.om-success-state {
  background-color: color-mix(in srgb, var(--wp--preset--color--success, #4CAF50) 8%, transparent);
  border-color: color-mix(in srgb, var(--wp--preset--color--success, #4CAF50) 30%, transparent);
  border-radius: var(--wp--custom--rooster--shape--control, 6px);
  padding: 15px;
  margin-bottom: 20px;
}

/* Button position "below" mode - separate containers */
.om-multi-select-container.om-multi-select-message-container {
  min-height: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: none;
}

.om-multi-select-container.om-multi-select-button-container {
  min-height: auto;
  padding-top: 15px;
  padding-bottom: 0;
  margin-top: 15px;
  margin-bottom: 10px;
  border-bottom: none;
  border-top: 1px solid #e5e5e5;
}

.om-multi-select-container.om-success-state .om-multi-select-add-to-cart {
  opacity: 0.5;
  pointer-events: none;
}

/* Subtotal display */
.om-multi-select-subtotal {
  font-size: 15px;
  color: #333;
  margin-top: 4px;
}

.om-multi-select-subtotal strong {
  font-size: 16px;
  color: #111;
}

/* Multi-select add to cart button */
.om-multi-select-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--wp--custom--rooster--shape--button, 4px);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.om-multi-select-add-to-cart.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.om-multi-select-add-to-cart.loading {
  position: relative;
  pointer-events: none;
}

.om-multi-select-add-to-cart.loading::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: om-spin 0.8s linear infinite;
}

@keyframes om-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Multi-selected swatch state - checkbox-like appearance */
.om-multi-select-mode .om-variation-item.om-multi-selected {
  position: relative;
}

/* MULTI-SELECT MODE: Hide default add-to-cart immediately via CSS (no CLS) */
/* Uses body class added by PHP for maximum browser compatibility */
/* MULTI-SELECT MODE: Hide default add to cart elements */
.variations_form.om-multi-select-enabled .single_add_to_cart_button,
.variations_form.om-multi-select-enabled .woocommerce-variation-add-to-cart,
.variations_form.om-multi-select-enabled > .quantity,
.variations_form.om-multi-select-enabled .woocommerce-variation-add-to-cart .quantity {
  display: none !important;
}

/* MULTI-SELECT MODE: Hide variation price below swatches - not needed */
.variations_form.om-multi-select-enabled .woocommerce-variation.single_variation,
.variations_form.om-multi-select-enabled .woocommerce-variation-price,
.variations_form.om-multi-select-enabled .single_variation_wrap .woocommerce-variation {
  display: none !important;
}

/* MULTI-SELECT MODE: Hide original reset link position - we move it to button area */
.variations_form.om-multi-select-enabled .reset_variations {
  display: none !important;
  visibility: hidden !important;
}

/* Until the multi-select's script has built its boxes (at the visitor's first sign of life: the owner keeps them
 * script-built, 28 Oct 2026), the form already looks as they will leave it: WooCommerce's Clear link hidden, and the
 * boxes' places kept by the form's ::before and ::after at the boxes' own heights, so building them moves nothing
 * (rooster-admin-ca, 30 Oct 2026: 0.0087 of layout shift on a computer's first mouse move). The grid only: the
 * drop-down puts its list in the grid's place, the owner's declared exception. */
.variations_form:has(.om-variations-wrapper[data-multi-select="1"]) .reset_variations {
  display: none !important;
}

.variations_form {
  --aieo-ms-message-h: 60px; /* the message box over the swatches (the Add box below them) */
  --aieo-ms-button-h: 60px;  /* the Add / Clear box under them */
  --aieo-ms-main-h: 122px;   /* the one box over them (the Add box above them) */
}

/* A phone's column: a prompt or an Add label that wraps (the Greek ones do) still fits its box. */
@media (max-width: 599px) {
  .variations_form {
    --aieo-ms-message-h: 75px;
    --aieo-ms-button-h: 84px;
    --aieo-ms-main-h: 161px;
  }
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container {
  box-sizing: border-box;
  min-height: var(--aieo-ms-main-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container.om-multi-select-message-container {
  min-height: var(--aieo-ms-message-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container.om-multi-select-button-container {
  min-height: var(--aieo-ms-button-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]:not([data-controls="inputs"])):not(.om-multi-select-enabled)::before {
  content: "";
  display: block;
  grid-column: 1 / -1; /* a theme's form that is a grid (Rooster Zero's): across it, as the boxes are */
  height: var(--aieo-ms-main-h);
  margin-bottom: 20px;
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]:not([data-controls="inputs"])[data-ms-place="below"]):not(.om-multi-select-enabled)::before {
  height: var(--aieo-ms-message-h);
  margin-bottom: 10px;
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]:not([data-controls="inputs"])[data-ms-place="below"]):not(.om-multi-select-enabled)::after {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: var(--aieo-ms-button-h);
  margin-top: 15px;
  margin-bottom: 10px;
}

/* "Clear selections" beside the Add to Cart button: its look is the product page's text link recipe
   (aieo-text-link.css; 11.3.16, F45b). */

/* Button row - Add to Cart and Reset side by side */
.om-multi-select-button-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* DROPDOWN MODE: Hide swatch grid immediately via CSS (no JS flicker) */
.om-multi-select-dropdown-mode .om-variation-type-image,
.om-multi-select-dropdown-mode .om-variation-type-color,
.om-multi-select-dropdown-mode .om-variation-type-button {
  display: none !important;
}

/* Checkmark badge element for selected swatches (uses real DOM element, not pseudo) */
.om-multi-select-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  width: 18px;
  height: 18px;
  background-color: var(--wp--preset--color--success, #4CAF50);
  color: var(--wp--preset--color--bg, #fff);
  font-size: 11px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* For image swatches - different positioning */
.om-multi-select-mode .om-variation-type-image .om-multi-select-checkmark {
  top: -8px;
  inset-inline-end: -8px;
}

/* For color swatches - smaller checkmark */
.om-multi-select-mode .om-variation-type-color .om-multi-select-checkmark {
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 14px;
  top: -4px;
  inset-inline-end: -4px;
}

/* For button swatches - position inside */
.om-multi-select-mode .om-variation-type-button .om-multi-select-checkmark {
  top: -5px;
  inset-inline-end: -5px;
}

/* Multi-select notices: below the Add button (FB7), its result and what a partial add left out, in WooCommerce's
 * notice markup (omNoticeBanner()): Rooster Zero's notice recipe draws them as every notice of the shop; this keeps
 * their place, and their shape under another theme. */
.om-multi-select-notice,
.om-multi-select-left-out {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 0;
  padding: 12px 16px;
  border: 1px solid currentColor;
  border-radius: var(--wp--custom--rooster--shape--control, 4px);
}
.om-multi-select-notice > svg,
.om-multi-select-left-out > svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Enhanced hover state for multi-select mode */
.om-multi-select-mode .om-variation-item:not(.disabled):not(.permanent-disabled) {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.om-multi-select-mode .om-variation-item:not(.disabled):not(.permanent-disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Make sure multi-select swatches have proper overflow for checkmark */
.om-multi-select-mode .om-variation-type-image,
.om-multi-select-mode .om-variation-type-color,
.om-multi-select-mode .om-variation-type-button {
  overflow: visible;
}

.om-multi-select-mode .om-variation-item {
  overflow: visible;
}

/* ========================================
   MULTI-SELECT DROPDOWN MODE
   Mobile-friendly dropdown list with checkboxes
   ======================================== */

.om-multi-select-dropdown {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Dropdown Header (toggle button) */
.om-multi-select-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px 16px;
  font: inherit;
  text-align: start;
  color: var(--rc-color-text, inherit);
  appearance: none;
  background-color: var(--rc-color-background, #fff);
  border: 1px solid var(--rc-color-control-line, #ddd);
  border-radius: var(--wp--custom--rooster--shape--control, 4px);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.om-multi-select-dropdown-header:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-header:focus-visible {
  outline: none;
  box-shadow: var(--wp--custom--rooster--focus-ring);
}

.om-multi-select-dropdown-header:hover {
  border-color: var(--rc-color-text, #999);
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-header {
  border-color: var(--rc-color-text, #333);
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

.om-multi-select-dropdown-title {
  font-weight: 500;
}

.om-multi-select-dropdown-toggle {
  display: inline-flex;
  font-size: 10px;
  color: var(--rc-color-text-muted, #666);
  transition: transform 0.2s ease;
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-toggle {
  transform: rotate(180deg);
}

/* Dropdown List */
.om-multi-select-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  inset-inline-end: 0;
  max-height: 300px;
  overflow-y: auto;
  color: var(--rc-color-text, inherit);
  background-color: var(--rc-color-background, #fff);
  border: 1px solid var(--rc-color-text, #333);
  border-top: none;
  border-end-start-radius: var(--wp--custom--rooster--shape--control, 4px);
  border-end-end-radius: var(--wp--custom--rooster--shape--control, 4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-list {
  display: block;
}

/* The rows are the card list's (aieo-card.css); the list's own edges are the panel's, so no second rule under the
 * header nor over the footer. */
.om-multi-select-dropdown-list .rc-vlist {
  border-block: 0;
}

/* The open list's own "Add to cart", pinned to its foot: the list lies over the row's Add button (rooster-admin-ca,
 * 29 Oct 2026). It scrolls with nothing; the items scroll under it. */
.om-multi-select-dropdown-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 12px 16px;
  background-color: var(--rc-color-background, #fff);
  border-top: 1px solid var(--rc-color-border, #eee);
}
.om-multi-select-dropdown-footer .om-multi-select-panel-add {
  display: block;
  width: 100%;
  margin: 0;
}
/* The selection over the Add, as the shop's options list says it (aieo-card.css, .rc-panel__sum). */
.om-multi-select-dropdown-footer .rc-panel__sum {
  margin-bottom: 8px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .om-multi-select-dropdown {
    max-width: 100%;
  }

  .om-multi-select-dropdown-list {
    max-height: 50vh;
  }

  /* Larger touch targets */
  .om-multi-select-dropdown-header {
    padding: 14px 16px;
    min-height: 48px;
  }
}

/* Scrollbar styling for dropdown list */
.om-multi-select-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ========================================
   DROPDOWN OUT-OF-STOCK STYLES
   ======================================== */

/* Out of stock text styling */
.om-out-of-stock-text {
  color: #b43232;
  font-weight: 500;
  font-size: 12px;
}

/* ========================================
   QUANTITY SELECTOR STYLES
   ======================================== */

/* Multi-select add-to-cart button - Pink style */
/* Base styles - exclude disabled buttons to allow disabled styles to take precedence */
.om-multi-select-container .om-add-to-cart-button:not(:disabled):not(.disabled),
.om-multi-select-container button.om-add-to-cart-button:not(:disabled):not(.disabled),
.om-multi-select-container .om-multi-select-add-to-cart:not(:disabled):not(.disabled) {
  background: rgba(255, 182, 193, 0.6) !important;
  background-color: rgba(255, 182, 193, 0.6) !important;
  border: 1px solid rgba(255, 105, 180, 0.5) !important;
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.4), rgba(255, 105, 180, 0.3)) !important;
  text-transform: none !important;
  padding: 10px 20px !important;
  font-size: 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: inline-block !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  transition: all 0.2s ease !important;
}

/* Non-background properties for ALL button states (including disabled) */
.om-multi-select-container .om-add-to-cart-button,
.om-multi-select-container button.om-add-to-cart-button,
.om-multi-select-container .om-multi-select-add-to-cart {
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
  text-transform: none !important;
  padding: 10px 20px !important;
  font-size: 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.2s ease !important;
}

.om-multi-select-container .om-add-to-cart-button:hover,
.om-multi-select-container button.om-add-to-cart-button:hover,
.om-multi-select-container .om-multi-select-add-to-cart:hover {
  background: rgba(255, 105, 180, 0.5) !important;
  background-color: rgba(255, 105, 180, 0.5) !important;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Disabled state - Pink style faded, override browser/theme defaults */
.om-multi-select-container .om-add-to-cart-button:disabled,
.om-multi-select-container .om-add-to-cart-button.disabled,
.om-multi-select-container button.om-add-to-cart-button:disabled,
.om-multi-select-container button.om-add-to-cart-button.disabled,
.om-multi-select-container .om-multi-select-add-to-cart:disabled,
.om-multi-select-container .om-multi-select-add-to-cart.disabled,
button.om-multi-select-add-to-cart:disabled,
button.om-multi-select-add-to-cart.disabled,
.om-multi-select-button-container button.om-multi-select-add-to-cart:disabled,
.om-multi-select-button-container button.om-multi-select-add-to-cart.disabled,
.om-multi-select-button-row button.om-multi-select-add-to-cart:disabled,
.om-multi-select-button-row button.om-multi-select-add-to-cart.disabled,
button[type="button"].om-multi-select-add-to-cart:disabled,
button[type="button"].om-multi-select-add-to-cart.disabled,
button.om-multi-select-add-to-cart.button.alt:disabled,
button.om-multi-select-add-to-cart.button.alt.disabled,
/* Override theme button styles with maximum specificity */
.single-product button.om-multi-select-add-to-cart.button.alt:disabled,
.single-product button.om-multi-select-add-to-cart.button.alt.disabled,
.single-product .om-multi-select-container button.om-multi-select-add-to-cart:disabled,
.single-product .om-multi-select-container button.om-multi-select-add-to-cart.disabled,
.woocommerce button.om-multi-select-add-to-cart.button.alt:disabled,
.woocommerce button.om-multi-select-add-to-cart.button.alt.disabled,
.woocommerce .om-multi-select-container button:disabled,
.woocommerce .om-multi-select-container button.disabled,
.woocommerce-page button.om-multi-select-add-to-cart:disabled,
.woocommerce-page button.om-multi-select-add-to-cart.disabled,
body button.om-multi-select-add-to-cart.button.alt:disabled,
body button.om-multi-select-add-to-cart.button.alt.disabled,
body .om-multi-select-container button.om-multi-select-add-to-cart:disabled,
body .om-multi-select-container button.om-multi-select-add-to-cart.disabled {
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  border: 1px solid rgba(255, 105, 180, 0.3) !important;
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* CRITICAL: Override theme's :not(.has-background) selectors for disabled button */
button.om-multi-select-add-to-cart:not(.has-background):disabled,
button.om-multi-select-add-to-cart:not(.has-background).disabled,
button.om-multi-select-add-to-cart.button:not(.has-background):disabled,
button.om-multi-select-add-to-cart.button:not(.has-background).disabled,
button.om-multi-select-add-to-cart.button.alt:not(.has-background):disabled,
button.om-multi-select-add-to-cart.button.alt:not(.has-background).disabled,
.om-multi-select-add-to-cart:not(.has-background):disabled,
.om-multi-select-add-to-cart:not(.has-background).disabled {
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  border: 1px solid rgba(255, 105, 180, 0.3) !important;
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Update mode - slightly different tint */
.om-multi-select-container .om-add-to-cart-button.om-update-mode,
.om-multi-select-container button.om-add-to-cart-button.om-update-mode,
.om-multi-select-container .om-multi-select-add-to-cart.om-update-mode {
  background: rgba(245, 40, 145, 0.1) !important;
  background-color: rgba(245, 40, 145, 0.1) !important;
  background-image: linear-gradient(to right, rgba(245, 40, 145, 0.05), rgba(245, 40, 145, 0.15)) !important;
}

.om-multi-select-container .om-add-to-cart-button.om-update-mode:hover,
.om-multi-select-container button.om-add-to-cart-button.om-update-mode:hover,
.om-multi-select-container .om-multi-select-add-to-cart.om-update-mode:hover {
  background: rgba(245, 40, 145, 0.2) !important;
  background-color: rgba(245, 40, 145, 0.2) !important;
}

/* ========================================
   VARIATION NAME IN PRODUCT TITLE
   ======================================== */

/* The chosen variation's name under the product title, on its own line (the one rule, there were
 * two). On the product's page the server prints it at its final height (--page,
 * AIEO_DMM_Swatches_Runtime::title_line_html(): the name, or a no-break space until a choice) and
 * aieo-swatches.js writes its text only: one line, a long name cut with an ellipsis, so choosing,
 * changing or clearing a shade moves nothing under the title (the owner, 11 Nov 2026). A card's
 * title gets it from the card's script; empty, it takes no space there. */
.om-ptitle-variation-name {
  display: block;
  margin-top: 8px;
  font-size: var(--om-variation-name-font-size, 16px);
  color: var(--om-variation-name-color, #666);
  font-weight: normal;
  line-height: 1.4;
}
.om-ptitle-variation-name--page {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.om-ptitle-variation-name:empty {
  display: none;
}
html[data-rooster-design="theme"] .om-ptitle-variation-name {
  color: var(--om-variation-name-color, var(--wp--preset--color--muted, #666));
}

/* ========================================
   RECOMMENDATION/RELATED PRODUCTS CONTEXT
   Apply archive-style swatch styling when swatches
   appear in related products, cross-sells, up-sells,
   or other recommendation sections on single product pages.
   ======================================== */

/* Target swatches inside common WooCommerce recommendation containers */
.related.products .om-product-swatches,
.cross-sells .om-product-swatches,
.up-sells .om-product-swatches,
section.related .om-product-swatches,
section.cross-sells .om-product-swatches,
section.up-sells .om-product-swatches,
.woocommerce-related-products .om-product-swatches,
.products.related .om-product-swatches,
.om-ppe-recently-viewed-section .om-product-swatches,
.merchant-recently-viewed-products .om-product-swatches {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.related.products .om-product-swatches form.variations_form,
.cross-sells .om-product-swatches form.variations_form,
.up-sells .om-product-swatches form.variations_form,
section.related .om-product-swatches form.variations_form,
section.cross-sells .om-product-swatches form.variations_form,
section.up-sells .om-product-swatches form.variations_form,
.woocommerce-related-products .om-product-swatches form.variations_form,
.products.related .om-product-swatches form.variations_form,
.om-ppe-recently-viewed-section .om-product-swatches form.variations_form,
.merchant-recently-viewed-products .om-product-swatches form.variations_form {
  width: auto;
  margin: 0;
}

.related.products .om-product-swatches .variations,
.related.products .om-product-swatches .variations tbody,
.related.products .om-product-swatches .variations tr,
.cross-sells .om-product-swatches .variations,
.cross-sells .om-product-swatches .variations tbody,
.cross-sells .om-product-swatches .variations tr,
.up-sells .om-product-swatches .variations,
.up-sells .om-product-swatches .variations tbody,
.up-sells .om-product-swatches .variations tr,
section.related .om-product-swatches .variations,
section.related .om-product-swatches .variations tbody,
section.related .om-product-swatches .variations tr,
section.cross-sells .om-product-swatches .variations,
section.cross-sells .om-product-swatches .variations tbody,
section.cross-sells .om-product-swatches .variations tr,
section.up-sells .om-product-swatches .variations,
section.up-sells .om-product-swatches .variations tbody,
section.up-sells .om-product-swatches .variations tr,
.woocommerce-related-products .om-product-swatches .variations,
.woocommerce-related-products .om-product-swatches .variations tbody,
.woocommerce-related-products .om-product-swatches .variations tr,
.products.related .om-product-swatches .variations,
.products.related .om-product-swatches .variations tbody,
.products.related .om-product-swatches .variations tr,
.om-ppe-recently-viewed-section .om-product-swatches .variations,
.om-ppe-recently-viewed-section .om-product-swatches .variations tbody,
.om-ppe-recently-viewed-section .om-product-swatches .variations tr,
.merchant-recently-viewed-products .om-product-swatches .variations,
.merchant-recently-viewed-products .om-product-swatches .variations tbody,
.merchant-recently-viewed-products .om-product-swatches .variations tr {
  width: auto;
  border: 0;
  margin: 0;
  padding: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.related.products .om-product-swatches .variations tr,
.cross-sells .om-product-swatches .variations tr,
.up-sells .om-product-swatches .variations tr,
section.related .om-product-swatches .variations tr,
section.cross-sells .om-product-swatches .variations tr,
section.up-sells .om-product-swatches .variations tr,
.woocommerce-related-products .om-product-swatches .variations tr,
.products.related .om-product-swatches .variations tr,
.om-ppe-recently-viewed-section .om-product-swatches .variations tr,
.merchant-recently-viewed-products .om-product-swatches .variations tr {
  flex-direction: column;
  gap: 8px;
}

.related.products .om-product-swatches .variations .label,
.cross-sells .om-product-swatches .variations .label,
.up-sells .om-product-swatches .variations .label,
section.related .om-product-swatches .variations .label,
section.cross-sells .om-product-swatches .variations .label,
section.up-sells .om-product-swatches .variations .label,
.woocommerce-related-products .om-product-swatches .variations .label,
.products.related .om-product-swatches .variations .label,
.om-ppe-recently-viewed-section .om-product-swatches .variations .label,
.merchant-recently-viewed-products .om-product-swatches .variations .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.related.products .om-product-swatches .variations .value,
.cross-sells .om-product-swatches .variations .value,
.up-sells .om-product-swatches .variations .value,
section.related .om-product-swatches .variations .value,
section.cross-sells .om-product-swatches .variations .value,
section.up-sells .om-product-swatches .variations .value,
.woocommerce-related-products .om-product-swatches .variations .value,
.products.related .om-product-swatches .variations .value,
.om-ppe-recently-viewed-section .om-product-swatches .variations .value,
.merchant-recently-viewed-products .om-product-swatches .variations .value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.related.products .om-product-swatches .om-variation-type-image,
.cross-sells .om-product-swatches .om-variation-type-image,
.up-sells .om-product-swatches .om-variation-type-image,
section.related .om-product-swatches .om-variation-type-image,
section.cross-sells .om-product-swatches .om-variation-type-image,
section.up-sells .om-product-swatches .om-variation-type-image,
.woocommerce-related-products .om-product-swatches .om-variation-type-image,
.products.related .om-product-swatches .om-variation-type-image,
.om-ppe-recently-viewed-section .om-product-swatches .om-variation-type-image,
.merchant-recently-viewed-products .om-product-swatches .om-variation-type-image {
  gap: 6px;
  justify-content: center;
}

.related.products .om-product-swatches .single_variation_wrap,
.related.products .om-product-swatches .reset_variations_alert,
.cross-sells .om-product-swatches .single_variation_wrap,
.cross-sells .om-product-swatches .reset_variations_alert,
.up-sells .om-product-swatches .single_variation_wrap,
.up-sells .om-product-swatches .reset_variations_alert,
section.related .om-product-swatches .single_variation_wrap,
section.related .om-product-swatches .reset_variations_alert,
section.cross-sells .om-product-swatches .single_variation_wrap,
section.cross-sells .om-product-swatches .reset_variations_alert,
section.up-sells .om-product-swatches .single_variation_wrap,
section.up-sells .om-product-swatches .reset_variations_alert,
.woocommerce-related-products .om-product-swatches .single_variation_wrap,
.woocommerce-related-products .om-product-swatches .reset_variations_alert,
.products.related .om-product-swatches .single_variation_wrap,
.products.related .om-product-swatches .reset_variations_alert,
.om-ppe-recently-viewed-section .om-product-swatches .single_variation_wrap,
.om-ppe-recently-viewed-section .om-product-swatches .reset_variations_alert,
.merchant-recently-viewed-products .om-product-swatches .single_variation_wrap,
.merchant-recently-viewed-products .om-product-swatches .reset_variations_alert {
  display: none !important;
}

/* Add to cart button styling in recommendations */
.related.products .om-product-swatches .om-add-to-cart-button,
.cross-sells .om-product-swatches .om-add-to-cart-button,
.up-sells .om-product-swatches .om-add-to-cart-button,
section.related .om-product-swatches .om-add-to-cart-button,
section.cross-sells .om-product-swatches .om-add-to-cart-button,
section.up-sells .om-product-swatches .om-add-to-cart-button,
.woocommerce-related-products .om-product-swatches .om-add-to-cart-button,
.products.related .om-product-swatches .om-add-to-cart-button,
.om-ppe-recently-viewed-section .om-product-swatches .om-add-to-cart-button,
.merchant-recently-viewed-products .om-product-swatches .om-add-to-cart-button {
  align-self: center;
}

/* More variations badge styling in recommendations */
.related.products .om-product-swatches .om-more-variations,
.cross-sells .om-product-swatches .om-more-variations,
.up-sells .om-product-swatches .om-more-variations,
section.related .om-product-swatches .om-more-variations,
section.cross-sells .om-product-swatches .om-more-variations,
section.up-sells .om-product-swatches .om-more-variations,
.woocommerce-related-products .om-product-swatches .om-more-variations,
.products.related .om-product-swatches .om-more-variations,
.om-ppe-recently-viewed-section .om-product-swatches .om-more-variations,
.merchant-recently-viewed-products .om-product-swatches .om-more-variations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  background-color: #f5f5f5;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--wp--custom--rooster--shape--button, 4px);
  border: 1px solid #ddd;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.related.products .om-product-swatches .om-more-variations:hover,
.cross-sells .om-product-swatches .om-more-variations:hover,
.up-sells .om-product-swatches .om-more-variations:hover,
section.related .om-product-swatches .om-more-variations:hover,
section.cross-sells .om-product-swatches .om-more-variations:hover,
section.up-sells .om-product-swatches .om-more-variations:hover,
.woocommerce-related-products .om-product-swatches .om-more-variations:hover,
.products.related .om-product-swatches .om-more-variations:hover,
.om-ppe-recently-viewed-section .om-product-swatches .om-more-variations:hover,
.merchant-recently-viewed-products .om-product-swatches .om-more-variations:hover {
  background-color: #e8e8e8;
  border-color: #ccc;
  text-decoration: none;
  color: #333;
}

/* ========================================================================
   SEE ALL VARIATIONS - Text Link
   ======================================================================== */

.om-see-all-variations-link {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: center;
}

.om-see-all-variations-link:hover {
  color: #333;
  text-decoration: underline;
}

/* Mobile styles for See All Variations link */
@media (max-width: 768px) {
  .om-see-all-variations-link {
    font-size: 12px;
  }
}

/* ========================================================================
   SEE ALL VARIATIONS - Modal
   ======================================================================== */

/* Body class when modal is open */
body.om-modal-open {
  overflow: hidden;
}

/* Modal container */
.om-modal {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal overlay */
.om-modal-overlay {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal container */
.om-modal-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background-color: #fff;
  border-radius: var(--wp--custom--rooster--shape--panel, 8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Modal header */
.om-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.om-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.om-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wp--custom--rooster--shape--button, 4px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.om-modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

/* Modal body */
.om-modal-body {
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0; /* Required for flex children to allow scrolling */
}

/* Product info in modal */
.om-modal-product-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

/* Image wrapper for skeleton loading */
.om-modal-image-wrapper {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--wp--custom--rooster--shape--media, 4px);
  overflow: hidden;
}

/* Loading skeleton animation for product info */
.om-modal-product-info.om-loading-skeleton .om-modal-product-title,
.om-modal-product-info.om-loading-skeleton .om-modal-view-product {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: om-skeleton-loading 1.5s infinite;
  color: transparent !important;
  border-radius: var(--wp--custom--rooster--shape--panel, 4px);
}

/* Hide the image completely during loading to prevent broken image icon */
.om-modal-product-info.om-loading-skeleton .om-modal-product-image {
  display: none;
}

/* Show skeleton on the image wrapper during loading */
.om-modal-product-info.om-loading-skeleton .om-modal-image-wrapper {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: om-skeleton-loading 1.5s infinite;
}

.om-modal-product-info.om-loading-skeleton .om-modal-product-title {
  min-width: 150px;
  min-height: 20px;
}

.om-modal-product-info.om-loading-skeleton .om-modal-view-product {
  min-width: 100px;
  min-height: 16px;
  display: inline-block;
}

@keyframes om-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.om-modal-product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--wp--custom--rooster--shape--media, 4px);
  border: 1px solid #eee;
  flex-shrink: 0;
  background-color: #f5f5f5;
}

/* Hide broken image icon when src is empty or not set */
.om-modal-product-image:not([src]),
.om-modal-product-image[src=""] {
  visibility: hidden;
  border: none;
}

.om-modal-product-details {
  flex: 1;
  min-width: 0;
}

.om-modal-product-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.om-modal-view-product {
  font-size: 13px;
  color: #666;
  text-decoration: underline;
}

.om-modal-view-product:hover {
  color: #333;
}

/* Loading state */
.om-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.om-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: om-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes om-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error state */
.om-modal-error {
  text-align: center;
  padding: 40px 20px;
  color: #d63638;
  font-size: 14px;
}

/* Form wrapper in modal */
.om-modal-form-wrapper {
  width: 100%;
}

/* Reset some form styles in modal context */
.om-modal-form-wrapper .variations_form {
  margin: 0;
  padding: 0;
}

/* Show quantity selector in modal with proper styling */
.om-modal-form-wrapper .quantity {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  border: 2px solid var(--bt-color-body-text, #212121);
  height: 50px;
  max-width: 200px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

/* Show quantity plus/minus buttons in modal */
.om-modal-form-wrapper .quantity .botiga-quantity-plus,
.om-modal-form-wrapper .quantity .botiga-quantity-minus {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 16px;
  color: var(--bt-color-body-text, #212121);
  border: none;
  background: transparent;
  text-align: center;
  text-decoration: none;
  outline: none;
  cursor: pointer;
  height: 100%;
  min-width: 40px;
  transition: color 0.2s ease;
}

.om-modal-form-wrapper .quantity .botiga-quantity-plus:hover,
.om-modal-form-wrapper .quantity .botiga-quantity-minus:hover {
  color: var(--bt-color-link-hover, #757575);
}

/* Style the quantity input in modal */
.om-modal-form-wrapper .quantity .qty {
  text-align: center;
  padding: 0;
  border: none;
  width: 60px;
  min-height: 0;
  background: transparent !important;
  font-size: 16px;
  font-weight: 500;
  -moz-appearance: textfield;
}

/* Hide spinner arrows on number input (use custom buttons instead) */
.om-modal-form-wrapper .quantity .qty::-webkit-outer-spin-button,
.om-modal-form-wrapper .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.om-modal-form-wrapper .quantity .qty:focus {
  box-shadow: none;
  outline: none;
}

.om-modal-form-wrapper .botiga-single-addtocart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.om-modal-form-wrapper .botiga-single-addtocart-wrapper .quantity {
  margin: 0;
}

/* Style the swatches container in modal */
.om-modal-form-wrapper .om-variations-wrapper {
  margin-bottom: 20px;
}

/* Make swatches wrap properly in modal */
.om-modal-form-wrapper .om-variation-type-image,
.om-modal-form-wrapper .om-variation-type-color,
.om-modal-form-wrapper .om-variation-type-button {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Style individual swatches in modal - use product page sizes */
.om-modal-form-wrapper .om-variation-item {
  cursor: pointer;
}

/* Hide the "See All Variations" link inside modal */
.om-modal-form-wrapper .om-see-all-variations-link,
.om-modal-form-wrapper .om-more-variations {
  display: none !important;
}

/* Style the price display in modal */
.om-modal-form-wrapper .woocommerce-variation-price {
  text-align: center;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 600;
}

.om-modal-form-wrapper .woocommerce-variation-price .price {
  color: #333;
}

.om-modal-form-wrapper .woocommerce-variation-price del {
  opacity: 0.6;
  margin-inline-end: 8px;
}

.om-modal-form-wrapper .woocommerce-variation-price ins {
  text-decoration: none;
  color: #d63638;
}

/* Style the add to cart button in modal - Pink theme */
.om-modal-form-wrapper .single_add_to_cart_button {
  width: 100%;
  padding: 14px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  background: rgba(255, 182, 193, 0.6) !important;
  background-color: rgba(255, 182, 193, 0.6) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.4), rgba(255, 105, 180, 0.3)) !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  border: 1px solid rgba(255, 105, 180, 0.5) !important;
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  margin-top: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  /* Disable any animations from animated-add-to-cart module */
  animation: none !important;
  transform: none !important;
}

.om-modal-form-wrapper .single_add_to_cart_button:hover:not(.disabled) {
  background: rgba(255, 105, 180, 0.5) !important;
  background-color: rgba(255, 105, 180, 0.5) !important;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15) !important;
  animation: none !important;
  transform: none !important;
}

.om-modal-form-wrapper .single_add_to_cart_button.disabled {
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed;
}

.om-modal-form-wrapper .single_add_to_cart_button.om-adding {
  opacity: 0.7;
  cursor: wait;
}

.om-modal-form-wrapper .single_add_to_cart_button.om-added,
.om-modal-form-wrapper .single_add_to_cart_button.added {
  background: var(--wp--preset--color--success, #46b450) !important;
  background-color: var(--wp--preset--color--success, #46b450) !important;
  background-image: none !important;
  color: var(--wp--preset--color--bg, #fff) !important;
}

/* View Product Page button in modal */
.om-modal-view-product-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: #666;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: var(--wp--custom--rooster--shape--button, 10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.om-modal-view-product-btn:hover {
  color: #333;
  border-color: #999;
  background: #f5f5f5;
  text-decoration: none;
}

/* Hide reset link in modal */
.om-modal-form-wrapper .reset_variations {
  display: none !important;
}

/* Style variation description/availability in modal */
.om-modal-form-wrapper .woocommerce-variation-description,
.om-modal-form-wrapper .woocommerce-variation-availability {
  text-align: center;
  margin: 8px 0;
  font-size: 13px;
  color: #666;
}

/* Style the attribute labels in modal */
.om-modal-form-wrapper .variations td.label {
  display: none;
}

.om-modal-form-wrapper .variations td.value {
  padding: 8px 0;
}

/* Center variations table in modal */
.om-modal-form-wrapper .variations {
  width: 100%;
  margin: 0 auto;
}

.om-modal-form-wrapper .variations tr {
  display: block;
  margin-bottom: 12px;
}

.om-modal-form-wrapper .variations td {
  display: block;
  width: 100%;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .om-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .om-modal-header {
    padding: 12px 16px;
  }

  .om-modal-title {
    font-size: 16px;
  }

  .om-modal-body {
    padding: 16px;
  }

  .om-modal-product-info {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .om-modal-product-image {
    width: 50px;
    height: 50px;
  }

  .om-modal-product-title {
    font-size: 14px;
  }

  .om-modal-variation-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .om-modal-variation-image img {
    width: 40px;
    height: 40px;
  }

  .om-modal-variation-info {
    flex: 1;
    min-width: calc(100% - 60px);
  }

  .om-modal-variation-name {
    font-size: 13px;
  }

  .om-modal-variation-add-btn {
    width: 100%;
    padding: 10px 16px;
    margin-top: 4px;
  }
}

/* ========================================
   CART SYNC - IN CART INDICATORS
   ======================================== */

/* Base in-cart indicator for swatches (image/color/button types) */
.om-variation-item.om-in-cart {
  position: relative;
  box-shadow: 0 0 0 3px var(--wp--preset--color--success, #46b450) !important;
  border-color: var(--wp--preset--color--success, #46b450) !important;
}

/* Only on a swatch without a hover label: the label is this same ::after, and the tick's place, size and
 * image leaked into it (a label stretched to the corner, a tick printed in it). The count says "in cart". */
.om-variation-item.om-in-cart:not([data-tooltip])::after {
  content: '';
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  width: 14px;
  height: 14px;
  background: var(--wp--preset--color--success, #46b450) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/10px no-repeat;
  border-radius: 50%;
  z-index: 2;
}

/* Cart badge showing quantity */
.om-cart-badge {
  position: absolute;
  bottom: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--wp--preset--color--success, #46b450);
  color: var(--wp--preset--color--bg, #fff);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: var(--wp--custom--rooster--shape--chip, 9px);
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Link-style swatches (image type) adjustment */
:is(a, label).om-variation-item.om-in-cart {
  outline: 3px solid var(--wp--preset--color--success, #46b450);
  outline-offset: 1px;
  box-shadow: none !important;
}

/* Multi-select grid mode - in cart */
.om-multi-select-grid .om-variation-grid-item.om-in-cart {
  border-color: var(--wp--preset--color--success, #46b450);
  background-color: color-mix(in srgb, var(--wp--preset--color--success, #46b450) 8%, transparent);
}

.om-multi-select-grid .om-variation-grid-item.om-in-cart .om-grid-item-image {
  box-shadow: 0 0 0 2px var(--wp--preset--color--success, #46b450);
}

/* Selected variation in sticky list that's also in cart */
.om-selected-variation-item.om-in-cart::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 6px;
  background: var(--wp--preset--color--success, #46b450);
  border-radius: 50%;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .om-cart-badge {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    bottom: -4px;
    inset-inline-end: -4px;
  }

  .om-variation-item.om-in-cart:not([data-tooltip])::after {
    width: 12px;
    height: 12px;
    top: -3px;
    inset-inline-end: -3px;
    background-size: 8px;
  }
}

/* ========================================
   CART SUMMARY - Shows items in cart
   ======================================== */

/* The lines of this product in the cart, over its swatches (aieo-swatches.js): the theme's own surface, the ground of
   the waiting list's box (F41b), the theme's rule for its border and its inner rules, the text colour for its words and
   its tick, the card's corners; no colour of its own (11.3.16, F47; the owner: "We do not want to have the green here
   ... Better use the same background as the background selected"). Its "View details" / "Hide details" is the product
   page's text link recipe (aieo-text-link.css, this sheet's dependency). Both designs: tokens with their fallbacks. */
.om-cart-summary {
  background: var(--wp--preset--color--neutral-50, var(--wp--preset--color--subtle, color-mix(in srgb, currentColor 6%, transparent)));
  border: 1px solid var(--wp--preset--color--line, color-mix(in srgb, currentColor 16%, transparent));
  border-radius: var(--wp--custom--rooster--shape--card, 6px);
  color: var(--wp--preset--color--fg, currentColor);
  /* Its block padding is the space under the subtotal's text too (F47c: the subtotal's own padding makes up the rest). */
  padding: var(--wp--preset--spacing--2, 8px) 12px;
  margin-bottom: 16px;
}

/* One row: the tick beside a line holding the text and its button. The button
   stays on the text's line when both fit and wraps under the text otherwise. */
.om-cart-summary-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 24px;
}

.om-cart-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-block: 4px;
  color: inherit; /* the tick in the text colour (its SVG draws in currentColor) */
  font-size: 11px;
  flex-shrink: 0;
}

.om-cart-summary-line {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  min-width: 0;
}

.om-cart-summary-text {
  font-weight: 600;
  color: inherit;
  font-size: 14px;
}

/* Its look is the text link recipe's (F47); here only its place: its 44 px target reaches past the 24 px line, the
   box keeps its height. */
.om-cart-summary-toggle {
  appearance: none;
  margin-block: -10px;
}

/* The rows (11.3.16, F47c; the owner: "Please fix the asymmetry in the rows"): each line and the subtotal hold the same
   space above and below their text, from the rule on either side, one padding token for every row (spacing 3) and one
   line height; the rules are drawn between the rows, and no block adds a gap of its own at the top or the bottom. The
   head's rule sits under the head at the box's own padding (spacing 2), as the head sits under the box's edge. */
.om-cart-summary-details {
  margin-top: var(--wp--preset--spacing--2, 8px);
  padding-top: 0;
  border-top: 1px solid var(--wp--preset--color--line, color-mix(in srgb, currentColor 16%, transparent));
}

.om-cart-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.om-cart-summary-list li,
.om-cart-summary-list li.om-cart-summary-item {
  padding: var(--wp--preset--spacing--3, 12px) 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: inherit;
  border-bottom: 1px solid var(--wp--preset--color--line, color-mix(in srgb, currentColor 16%, transparent));
  display: block;
}

.om-cart-summary-list li:last-child {
  border-bottom: none;
}

.om-cart-summary-subtotal {
  /* The row's space above its text, and below it with the box's own padding (spacing 3 in all). */
  margin-block: 0;
  padding-block: var(--wp--preset--spacing--3, 12px) calc(var(--wp--preset--spacing--3, 12px) - var(--wp--preset--spacing--2, 8px));
  line-height: 1.4;
  border-top: 2px solid var(--wp--preset--color--line, color-mix(in srgb, currentColor 16%, transparent));
  font-size: 14px;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.om-cart-summary-subtotal strong {
  font-size: 15px;
  color: inherit;
}

/* ------------------------------------------------------------------------
 * Lean archive cards (contract C7 rule 11). The first HTML carries the chips
 * and the CTA; WooCommerce's variation form waits in a <template> and is
 * swapped in on the card's first pointer, touch or focus. Once in, the form
 * must never run past the card (it measured 444 px on a 390 px phone), and
 * on a coarse pointer every chip is at least a 24 px target.
 * --------------------------------------------------------------------- */
.om-product-swatches--archive > template { display: none; }
.om-product-swatches--archive { max-width: 100%; min-width: 0; box-sizing: border-box; }
.om-product-swatches--archive form.variations_form,
.om-product-swatches--archive .om-variations-wrapper,
.om-product-swatches--archive .om-variation-type-select,
.om-product-swatches--archive .om-variation-type-select select {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.om-product-swatches--archive .om-variation-type-select select { width: 100%; }
@media (pointer: coarse) {
  .om-product-swatches--archive .om-variation-item {
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
/* RTL and Arabic-script locales (brief 11.3): mirrored slide-ins and arrows, no letter-spacing on connected scripts. Dual copy where the sheet is shared. */
[dir="rtl"] .om-modal-close { transform: scaleX(-1); }

/* Under the theme's design authority (contract C2@2) the multi-select's add
 * button is the theme's own button, in the light and the dark scheme; the pink
 * above stays the stand-alone default. The repeated class (0,6,3) beats the
 * disabled and update-mode overrides above (up to 0,5,1). */
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart,
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button {
  background: var(--wp--custom--rooster--button--background, var(--wp--preset--color--accent)) !important;
  background-image: none !important;
  color: var(--wp--custom--rooster--button--text, var(--wp--preset--color--on-accent, var(--wp--preset--color--bg))) !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: var(--wp--custom--rooster--shape--button, 10px) !important;
}
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart:not(:disabled):not(.disabled):hover,
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button:not(:disabled):not(.disabled):hover {
  background: color-mix(in srgb, var(--wp--custom--rooster--button--background, var(--wp--preset--color--accent)) 85%, var(--wp--custom--rooster--button--away)) !important;
}
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart:is(:disabled, .disabled),
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button:is(:disabled, .disabled) {
  /* The same button, dimmed: the accent with its own text (theme brief, 28 Oct 2026). */
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* A chosen choice pill (a size, any text option) under the theme's design is in the ink, the theme's text colour, as
 * the designer's: the accent is the button's alone (11.3.16, F41; the designer: "ink for the chosen pill leaves the
 * red to the button"). The shop's own pill colours (Swatches > Button) stay off the theme's design. */
html[data-rooster-design="theme"] .om-variation-type-button :is(a, label):is(.active, .om-multi-selected, [aria-checked="true"], :has(> .om-variation-input:checked)) {
  background-color: var(--wp--preset--color--fg, CanvasText);
  color: var(--wp--preset--color--bg, Canvas);
  border-color: var(--wp--preset--color--fg, CanvasText);
}
/* Under the theme's design authority the whole drop-down and its summary follow the scheme: the
 * panel on bg with the border, fg text and muted prices, the rows' hover and the ticked tint mixed
 * from the same bg (so the text stays readable in dark), the stepper in the theme's field look
 * (theme brief, 28 Oct 2026: in dark the panel stayed white and a ticked row's text vanished). */
html[data-rooster-design="theme"] .om-multi-select-dropdown-header,
html[data-rooster-design="theme"] .om-multi-select-dropdown-list {
  background-color: var(--wp--preset--color--bg);
  border-color: var(--wp--preset--color--line);
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-header:hover,
html[data-rooster-design="theme"] .om-multi-select-dropdown.open .om-multi-select-dropdown-header,
html[data-rooster-design="theme"] .om-multi-select-dropdown.open .om-multi-select-dropdown-list {
  border-color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-title {
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-toggle {
  color: var(--wp--preset--color--muted);
}

html[data-rooster-design="theme"] .om-multi-select-count,
html[data-rooster-design="theme"] .om-multi-select-subtotal strong {
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-names,
html[data-rooster-design="theme"] .om-multi-select-names.om-empty-placeholder,
html[data-rooster-design="theme"] .om-multi-select-prompt,
html[data-rooster-design="theme"] .om-multi-select-subtotal {
  color: var(--wp--preset--color--muted);
}
html[data-rooster-design="theme"] .om-multi-select-container.om-multi-select-button-container {
  border-top-color: var(--wp--preset--color--line);
}

/* Under the theme's design authority (contract C2@2), the multi-select's image swatches: one ring says "in the
 * cart" (the success colour, just outside the swatch, with no green frame under it); the count sits inside the
 * bottom corner in the colours of the floating cart's own count (aieo-side-cart.css), and the
 * pick's tick inside the top one in green (the owner's choice); nothing hangs over a neighbour or the row below. */
html[data-rooster-design="theme"] .om-variations-wrapper :is(a, label).om-variation-item.om-in-cart {
  border-color: transparent !important;
  outline: 2px solid var(--wp--preset--color--success, #46b450);
  outline-offset: 1px;
  box-shadow: none !important;
}
/* Its keyboard focus: the theme's focus ring against the swatch, the cart's ring moved out past it (inside the
 * row's 12 px gap), so both show (census 5, FE-F1: the ring's `none` above had hidden the focus). */
html[data-rooster-design="theme"] .om-variations-wrapper :is(a, label).om-variation-item.om-in-cart:is(:focus-visible, :has(> .om-variation-input:focus-visible)) {
  outline-offset: 4px;
  box-shadow: var(--wp--custom--rooster--focus-ring) !important;
}
html[data-rooster-design="theme"] .om-variations-wrapper .om-variation-type-image .om-cart-badge {
  bottom: 3px;
  inset-inline-start: 3px;
  inset-inline-end: auto;
  min-width: min(18px, 40%);
  height: min(18px, 40%);
  padding: 0 3px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  background: var(--wp--preset--color--bg, #fff);
  color: var(--wp--preset--color--contrast, #111);
  box-shadow: 0 0 0 2px var(--wp--preset--color--contrast, #111);
}
html[data-rooster-design="theme"] .om-multi-select-mode .om-variation-type-image .om-multi-select-checkmark {
  top: 3px;
  inset-inline-end: 3px;
  width: min(18px, 40%);
  height: min(18px, 40%);
  background-color: var(--wp--preset--color--success, #46b450);
  color: var(--wp--preset--color--bg, #fff);
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, #fff);
}

/* The product page under the theme's design authority (UI review, 28 Oct 2026): the swatches start at the
 * info column's edge and fill rows from the start (a short last row is not centred), and on the phone the
 * attribute's name sits above its swatches, the grid at the column's full width, in both modes. */
html[data-rooster-design="theme"] .rooster-product__info .om-variations-wrapper :is(.om-variation-type-image, .om-variation-type-color, .om-variation-type-button) {
  justify-content: flex-start;
}
@media (max-width: 720px) {
  html[data-rooster-design="theme"] .rooster-product__info table.variations,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr > :is(th, td) {
    display: block;
    width: 100%;
    padding-inline: 0;
  }
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr > .label {
    padding-block: 0 8px;
  }
  /* The multi-select's grid keeps its name too (the settings CSS hides it on every device). */
  html[data-rooster-design="theme"] body.om-multi-select-enabled .rooster-product__info .variations_form table.variations th.label {
    display: block;
  }
}

/* ========================================
   THE DESIGNER'S LOOK (Swatches > Look of the shades, `designer`, every shop's default: the owner's decision D1,
   10 Nov 2026; the designer's direction B, Aurenne). The product page's colour and picture shades as chips in the
   theme's swatch measures (custom.rooster.swatch: size, gap, shape, rows), every colour a theme token: the chosen
   chip's ink ring and check, a sold-out chip muted and struck through in the muted ink, the low-stock and in-the-cart
   dots at its top end, a 44 px target on a 40 px chip. The rows are the head's (designer_rows_css(): no script hides a
   chip after the load); the picked list, the total and the window are filled by the script (omProductSwatches.shades).
   The classic look's hooks (om-multi-select-mode, data-tooltip, om-in-cart) are not in this markup.
   ======================================== */

/* WooCommerce's table: the row of a designer's attribute spans the column, its name in the header line instead of the
   table's own cell (the cell's label points at the hidden select). */
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]),
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody,
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr,
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr > td {
  display: block;
  width: 100%;
  padding-inline: 0;
}
.variations_form table.variations > tbody > tr:has(> td > .om-variations-wrapper[data-look="designer"]) > th.label:not(#aieo-shades) {
  display: none;
}

/* One attribute's row and the next (11.3.16, F44; the owner: "Give it a bit of space between the drop down and the
   swatches"): the theme's gap between the info column's rows, whatever each row draws (the chips, a drop-down, pills).
   Every other row names its attribute above its control as the chips' header line does («Size» over its drop-down):
   the table's own label, in the header line's name's look (sm, 600, the text colour), the header line's gap under it.
   The multi-select's settings rule that hides every label (body.om-multi-select-enabled) does not reach it. */
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr + tr {
  margin-block-start: var(--wp--preset--spacing--4, 1rem);
}
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr:not(:has(> td > .om-variations-wrapper[data-look="designer"])) > th.label {
  display: block;
  width: auto;
  margin: 0 0 var(--wp--preset--spacing--3, 0.75rem);
  padding: 0;
  border: 0;
  color: var(--wp--preset--color--fg, currentColor);
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
}
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr:not(:has(> td > .om-variations-wrapper[data-look="designer"])) > th.label > label {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
}
.variations_form table.variations:has(.om-variations-wrapper[data-look="designer"]) > tbody > tr > td {
  padding-block: 0;
}

.om-variations-wrapper.aieo-shades[data-look="designer"] {
  --aieo-chip: var(--wp--custom--rooster--swatch--size, 40px);
  --aieo-chip-gap: var(--wp--custom--rooster--swatch--gap, 10px);
  --aieo-chip-shape: var(--wp--custom--rooster--swatch--shape, 50%);
  container: aieo-shades / inline-size;
  display: grid;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  width: 100%;
}

/* The header line: the attribute's name or the chosen shade, what to do or how many are chosen (several at once: beside
   the name, in the muted ink); the shades in stock. */
.om-variations-wrapper.aieo-shades[data-look="designer"] .aieo-shades__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px var(--wp--preset--spacing--3, 0.75rem);
  margin: 0;
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  line-height: 1.4;
  color: var(--wp--preset--color--fg, currentColor);
}
.om-variations-wrapper.aieo-shades[data-look="designer"] .aieo-shades__name {
  font-weight: 600;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] .aieo-shades__count,
.om-variations-wrapper.aieo-shades[data-look="designer"] .aieo-shades__stock {
  color: var(--wp--preset--color--muted, currentColor);
}

/* The chips. */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--aieo-chip));
  gap: var(--aieo-chip-gap);
  justify-content: start;
  max-width: none;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: var(--aieo-chip);
  height: var(--aieo-chip);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--aieo-chip-shape);
  outline: 0;
  overflow: visible; /* the badge and the dots sit over its edge (the settings' CSS clips an image swatch) */
  background: var(--wp--preset--color--subtle, transparent);
  box-shadow: none;
  opacity: 1;
  transform: none;
  cursor: pointer;
  transition: box-shadow 120ms ease;
}
/* The box fills the chip and 2 px around it: a 44 px target. */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item > .om-variation-input {
  inset: min(0px, calc((var(--aieo-chip) - 44px) / 2));
  width: auto;
  height: auto;
  border-radius: var(--aieo-chip-shape);
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item > .om-variation-text {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  outline: 1px solid color-mix(in srgb, var(--wp--preset--color--fg, currentColor) 12%, transparent);
  outline-offset: -1px;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item > .om-variation-text > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: inherit;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:not(.permanent-disabled):hover {
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, Canvas), 0 0 0 3px var(--wp--preset--color--muted, CanvasText);
}

/* Chosen: the ink ring, and the ink badge with its check (Lucide's check, drawn in the ground's colour) at the bottom end.
   The ticked box says it from the first paint, the script's class once it runs. */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item::after,
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item::before {
  content: none;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked)),
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked)):hover {
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, Canvas), 0 0 0 4px var(--wp--preset--color--fg, CanvasText);
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked))::after,
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked)) > .om-variation-text::after {
  content: "";
  position: absolute;
  inset-block-end: -3px;
  inset-inline-end: -3px;
  width: 16px;
  height: 16px;
  margin: 0;
  pointer-events: none;
  transform: none;
  opacity: 1;
  visibility: visible;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked))::after {
  z-index: 2;
  border-radius: 50%;
  background: var(--wp--preset--color--fg, CanvasText);
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, Canvas);
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked)) > .om-variation-text::after {
  z-index: 3;
  background: var(--wp--preset--color--bg, Canvas);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
}

/* The keyboard's focus: an ink outline past the ring, the ring kept. */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:has(> .om-variation-input:focus-visible) {
  outline: 2px solid var(--wp--preset--color--fg, CanvasText);
  outline-offset: 6px;
  box-shadow: none;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.active, .om-multi-selected, :has(> .om-variation-input:checked)):has(> .om-variation-input:focus-visible) {
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, Canvas), 0 0 0 4px var(--wp--preset--color--fg, CanvasText);
}

/* Sold out: muted and struck through in the muted ink, still named (its box's name and its title), not tickable. */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.permanent-disabled,
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.permanent-disabled:hover {
  opacity: 1;
  cursor: not-allowed;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.permanent-disabled > .om-variation-text {
  opacity: 0.45;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.permanent-disabled::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--wp--preset--color--muted, CanvasText) calc(50% - 1px), var(--wp--preset--color--muted, CanvasText) calc(50% + 1px), transparent calc(50% + 1px));
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}
/* Sold as a back-order: a dashed ring, tickable (R3). */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.is-backorder > .om-variation-text {
  outline: 1px dashed var(--wp--preset--color--muted, currentColor);
}

/* Low in stock (the warning dot) and already in the bag (the success dot), at the chip's top end; the chip's name says
   both in words ("Only 2 left", "In your bag: 2"). */
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item:is(.is-low, .is-in-bag) > .om-variation-text::before {
  content: "";
  position: absolute;
  inset-block-start: -2px;
  inset-inline-end: -2px;
  z-index: 3;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 2px solid var(--wp--preset--color--bg, Canvas);
  border-radius: 50%;
  background: var(--wp--preset--color--warning, currentColor);
  pointer-events: none;
}
.om-variations-wrapper.aieo-shades[data-look="designer"] > .aieo-shades__chips > .om-variation-item.is-in-bag > .om-variation-text::before {
  background: var(--wp--preset--color--success, currentColor);
}

/* "See all N": its look is the product page's text link recipe, one rule with WooCommerce's "View cart"
   (aieo-text-link.css, this sheet's dependency; 11.3.16, F45). */
.om-variations-wrapper.aieo-shades[data-look="designer"] .aieo-shades__more {
  margin: 0;
}

/* The chosen shades under the chips, each with its quantity; the count and the total; the button and "Clear selections". */
.aieo-shades__box {
  display: grid;
  gap: var(--wp--preset--spacing--4, 1rem);
  margin-block: var(--wp--preset--spacing--4, 1rem) 0;
}
.aieo-shades__box .aieo-shades__picked {
  display: grid;
  gap: var(--wp--preset--spacing--2, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.aieo-shades__box .aieo-shades__picked[hidden],
.aieo-shades__box .aieo-shades__sum[hidden] {
  display: none;
}
.aieo-shades__line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  align-items: center;
  min-height: 44px;
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  line-height: 1.3;
  color: var(--wp--preset--color--fg, currentColor);
}
/* Quote mode: a chosen shade's line says no price (the dot, the name, the stepper). */
.aieo-shades__line--ask {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.aieo-shades__dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: var(--wp--custom--rooster--swatch--shape, 50%);
  background: var(--wp--preset--color--subtle, transparent);
}
.aieo-shades-row__chip {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: var(--wp--custom--rooster--swatch--shape, 50%);
  background: var(--wp--preset--color--subtle, transparent);
}
:is(.aieo-shades__dot, .aieo-shades-row__chip) > .om-variation-text {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  outline: 1px solid color-mix(in srgb, var(--wp--preset--color--fg, currentColor) 12%, transparent);
  outline-offset: -1px;
}
:is(.aieo-shades__dot, .aieo-shades-row__chip) > .om-variation-text > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: inherit;
}
.aieo-shades__line > .aieo-shades__pname,
.aieo-shades-row > .aieo-shades-row__name {
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
:is(.aieo-shades__pname, .aieo-shades-row__name) small {
  display: block;
  font-size: var(--wp--preset--font-size--xs, 0.75rem);
  color: var(--wp--preset--color--muted, currentColor);
}
.aieo-shades__price,
.aieo-shades-row__price {
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-align: end;
  white-space: nowrap;
}
.aieo-shades-row__price s {
  display: block;
  font-size: var(--wp--preset--font-size--xs, 0.75rem);
  color: var(--wp--preset--color--muted, currentColor);
}

/* The quantity: one stepper with one border, its buttons 44 px. */
.aieo-shades-qty {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wp--preset--color--line, currentColor);
  border-radius: var(--wp--custom--rooster--shape--control, 0);
  background: var(--wp--preset--color--bg, Canvas);
}
.aieo-shades-qty > button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--wp--preset--color--fg, currentColor);
  cursor: pointer;
}
/* The steppers' one ground under the pointer (the owner, 12 Nov 2026: "this colour on hover of the - and +
 * buttons", "This is global, it is in pop ups, the product cards and the side cart"). */
.aieo-shades-qty > button:not(:disabled):hover {
  background: color-mix(in srgb, currentColor 7%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .aieo-shades-qty > button {
    transition: background-color 160ms;
  }
}
.aieo-shades-qty > button:disabled {
  color: var(--wp--preset--color--line, GrayText);
  cursor: default;
}
.aieo-shades-qty > button:focus-visible {
  outline: 2px solid var(--wp--preset--color--fg, CanvasText);
  outline-offset: -4px;
}
.aieo-shades-qty svg {
  width: 14px;
  height: 14px;
}
.aieo-shades-qty > output {
  min-width: 2.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
}

.aieo-shades__box .aieo-shades__sum,
.aieo-shades-win__tot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  margin: 0;
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  color: var(--wp--preset--color--muted, currentColor);
}
.aieo-shades__box .aieo-shades__sum {
  padding-block-start: var(--wp--preset--spacing--3, 0.75rem);
  border-block-start: 1px solid var(--wp--preset--color--line, currentColor);
}
:is(.aieo-shades__sum, .aieo-shades-win__tot) b {
  color: var(--wp--preset--color--fg, currentColor);
  font-size: var(--wp--preset--font-size--xl, 1.5rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* "before the offer" under the rows' total, on a product a quantity offer covers (11.3.16, F16, F16b): its own line
   from the first pick, at the total's end, so the sum keeps one height as shades and items are added and the button
   never moves under the thumb (the reviewer measured a 36 px jump in Greek at 390 with it on the total's line). */
.aieo-shades__before {
  display: block;
  color: var(--wp--preset--color--muted, currentColor);
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  font-weight: 400;
  text-align: end;
}
:is(.aieo-shades__sum, .aieo-shades-win__tot) b:has(> .aieo-shades__before) {
  text-align: end;
}
.aieo-shades__note,
.aieo-shades__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.aieo-shades__box .aieo-shades__buy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  align-items: center;
  width: 100%;
}
/* Quote mode's one shade: the request's button alone, across the column. */
.aieo-shades__box--one .aieo-shades__buy {
  grid-template-columns: minmax(0, 1fr);
}
.aieo-shades__box .aieo-shades__buy .aieo-shades__add {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
}
.aieo-shades__box .aieo-shades__buy .aieo-shades__add:is(:disabled, [aria-disabled="true"]) {
  opacity: 0.5;
  cursor: default;
}
/* "Clear selections" (.om-multi-select-reset): the product page's text link recipe (aieo-text-link.css, F45b). */
@media (max-width: 599px) {
  .aieo-shades__box .aieo-shades__buy {
    grid-template-columns: minmax(0, 1fr);
  }
  .aieo-shades__box .aieo-shades__buy .aieo-shades__clear {
    justify-self: center;
  }
}

/* The window of all the shades: a native dialog, centred on a computer and a sheet from the bottom on a phone. Built
   by the script when it opens (nothing of it is in the first paint). */
.aieo-shades-win {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(100% - 32px, 720px);
  max-width: none;
  height: fit-content;
  max-height: min(86dvh, 820px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--wp--preset--color--line, CanvasText);
  border-radius: var(--wp--custom--rooster--shape--panel, 0);
  background: var(--wp--preset--color--bg, Canvas);
  color: var(--wp--preset--color--fg, CanvasText);
  box-shadow: var(--wp--preset--shadow--lg, none);
  overflow: hidden;
}
.aieo-shades-win[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
/* The side cart's scrim (aieo-side-cart.css): the ground at 55 %. */
.aieo-shades-win::backdrop {
  background: color-mix(in srgb, var(--wp--preset--color--bg, Canvas) 55%, transparent);
}
.aieo-shades-win__handle {
  display: none;
}
.aieo-shades-win__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  padding: var(--wp--preset--spacing--3, 0.75rem) var(--wp--preset--spacing--3, 0.75rem) var(--wp--preset--spacing--3, 0.75rem) var(--wp--preset--spacing--5, 1.5rem);
  border-block-end: 1px solid var(--wp--preset--color--line, currentColor);
}
.aieo-shades-win__head h2 {
  margin: 0;
  font-size: var(--wp--preset--font-size--lg, 1.25rem);
  line-height: 1.25;
}
.aieo-shades-win__head h2 small {
  margin-inline-start: var(--wp--preset--spacing--2, 0.5rem);
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  font-weight: 400;
  color: var(--wp--preset--color--muted, currentColor);
}
.aieo-shades-win__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--wp--custom--rooster--shape--button, 0);
  background: none;
  color: var(--wp--preset--color--fg, currentColor);
  cursor: pointer;
}
.aieo-shades-win__close svg {
  width: 20px;
  height: 20px;
}
.aieo-shades-win__tools {
  padding: var(--wp--preset--spacing--3, 0.75rem) var(--wp--preset--spacing--5, 1.5rem);
  border-block-end: 1px solid var(--wp--preset--color--line, currentColor);
}
.aieo-shades-win__find {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  font-size: max(16px, var(--wp--preset--font-size--sm, 1rem));
}
.aieo-shades-win__rows {
  margin: 0;
  padding: 0 var(--wp--preset--spacing--5, 1.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.aieo-shades-win__empty {
  margin: 0;
  padding: var(--wp--preset--spacing--4, 1rem) var(--wp--preset--spacing--5, 1.5rem);
  color: var(--wp--preset--color--muted, currentColor);
}
.aieo-shades-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 40px minmax(0, 1fr) auto auto;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  align-items: center;
  min-height: 60px;
  padding-block: 6px;
  border-block-start: 1px solid var(--wp--preset--color--line, currentColor);
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
}
.aieo-shades-row:first-child {
  border-block-start: 0;
}
.aieo-shades-row[hidden] {
  display: none;
}
.aieo-shades-row--one,
.aieo-shades-row--ask {
  grid-template-columns: 24px 40px minmax(0, 1fr) auto;
}
.aieo-shades-row > input {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--wp--preset--color--fg, CanvasText);
  cursor: pointer;
}
.aieo-shades-row__name {
  cursor: pointer;
}
/* The whole row ticks its box. */
.aieo-shades-row__name::after {
  content: "";
  position: absolute;
  inset: 0;
}
.aieo-shades-row.is-out {
  color: var(--wp--preset--color--muted, currentColor);
}
.aieo-shades-row.is-out :is(input, .aieo-shades-row__name) {
  cursor: not-allowed;
}
.aieo-shades-row.is-out .aieo-shades-row__chip {
  opacity: 0.45;
}
.aieo-shades-win__foot {
  display: grid;
  gap: var(--wp--preset--spacing--3, 0.75rem);
  padding: var(--wp--preset--spacing--4, 1rem) var(--wp--preset--spacing--5, 1.5rem);
  border-block-start: 1px solid var(--wp--preset--color--line, currentColor);
}
.aieo-shades-win__foot .aieo-shades-win__done {
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
}
@media (max-width: 599px) {
  .aieo-shades-win {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 88dvh;
    margin: 0;
    border-inline: 0;
    border-block-end: 0;
    border-radius: var(--wp--custom--rooster--shape--panel, 0) var(--wp--custom--rooster--shape--panel, 0) 0 0;
  }
  .aieo-shades-win[open] {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }
  .aieo-shades-win__handle {
    display: block;
    width: 36px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: var(--wp--custom--rooster--shape--chip, 3px);
    background: var(--wp--preset--color--line, currentColor);
  }
  .aieo-shades-win__head,
  .aieo-shades-win__tools,
  .aieo-shades-win__foot {
    padding-inline: var(--wp--preset--spacing--4, 1rem);
  }
  .aieo-shades-win__rows {
    padding-inline: var(--wp--preset--spacing--4, 1rem);
  }
  /* A phone's row: the name over the price beside the chip, the stepper at the end. */
  .aieo-shades-row {
    grid-template-columns: 24px 40px minmax(0, 1fr) auto;
    row-gap: 2px;
  }
  .aieo-shades-row > input {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .aieo-shades-row .aieo-shades-row__chip {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .aieo-shades-row .aieo-shades-row__name {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
  }
  .aieo-shades-row .aieo-shades-row__price {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    text-align: start;
  }
  .aieo-shades-row .aieo-shades-row__price s {
    display: inline;
    margin-inline-start: 6px;
  }
  .aieo-shades-row .aieo-shades-qty {
    grid-column: 4;
    grid-row: 1 / span 2;
  }
  /* Quote mode's row has no price under its name. */
  .aieo-shades-row--ask .aieo-shades-row__name {
    grid-row: 1 / span 2;
    align-self: center;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .aieo-shades-win[open] {
    animation: aieo-shades-rise 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .aieo-shades-win[open]::backdrop {
    animation: aieo-shades-fade 220ms;
  }
}
@keyframes aieo-shades-rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
@keyframes aieo-shades-fade {
  from {
    opacity: 0;
  }
}
