/* 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;
}

.om-variation-swatch-image {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  left: 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;
}

.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: 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;
}

.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-left: 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 > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-image > a.permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-button > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-button > a.permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-color > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-color > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-image > a.disabled,
.om-variations-wrapper .om-variation-type-image > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-button > a.disabled,
.om-variations-wrapper .om-variation-type-button > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-color > a.disabled,
.om-variations-wrapper .om-variation-type-color > a.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: rgba(180, 50, 50, 0.85);
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: 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: rgba(180, 50, 50, 0.85);
  transform: translate(-50%, -50%) rotate(-45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: 1px;
}

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

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

/* Button swatches - add strikethrough text effect too */
.om-variations-wrapper .om-variation-type-button > a.disabled,
.om-variations-wrapper .om-variation-type-button > a.permanent-disabled {
  text-decoration: line-through;
  text-decoration-color: rgba(180, 50, 50, 0.85);
}

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

/* 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;
  left: auto !important;
  right: 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: 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; }

/* Selected-variation caption appended under the product title (set by the
 * found_variation handler in aieo-swatches.js). Block so it sits on its own
 * line beneath the title rather than inline after it. */
.om-ptitle-variation-name {
  display: block;
  margin-top: 4px;
  font-size: 0.6em;
  font-weight: 500;
  line-height: 1.3;
  color: #6b7280;
}

/* 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 > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-image > a.permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > a.permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > a.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-right: 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: #4CAF50;
  color: white;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
}

.om-success-message {
  font-size: 16px;
  color: #2e7d32;
  font-weight: 500;
  line-height: 1.4;
}

/* Success state container styling */
.om-multi-select-container.om-success-state {
  background-color: #f0f7f0;
  border-color: #c8e6c9;
  border-radius: 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;
}

/* "Already in cart" indicator in summary */
.om-multi-select-in-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #46b450;
  font-weight: 500;
  margin-top: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f0fdf0 0%, #e8f8e8 100%);
  border-radius: 4px;
  border-left: 3px solid #46b450;
}

.om-multi-select-in-cart .om-cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #46b450;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

/* 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: 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;
  right: 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;
}

/* Reset link styling when moved beside Add to Cart button */
.om-multi-select-reset {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.om-multi-select-reset:hover {
  color: #333;
  text-decoration: underline;
}

/* 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;
  right: -6px;
  width: 18px;
  height: 18px;
  background-color: #4CAF50;
  color: white;
  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;
  right: -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;
  right: -4px;
}

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

/* Multi-select notice styling */
.om-multi-select-notice {
  margin-bottom: 15px;
  padding: 12px 16px;
  border-radius: 4px;
}

/* 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;
  padding: 12px 16px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.om-multi-select-dropdown-header:hover {
  border-color: #999;
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-header {
  border-color: #333;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

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

.om-multi-select-dropdown-toggle {
  font-size: 10px;
  color: #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%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #333;
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 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;
}

/* Dropdown Item */
.om-multi-select-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.om-multi-select-dropdown-item:last-child {
  border-bottom: none;
}

.om-multi-select-dropdown-item:hover {
  background-color: #f8f8f8;
}

.om-multi-select-dropdown-item.selected {
  background-color: #f0f7f0;
}

/* Checkbox */
.om-multi-select-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4CAF50;
}

/* Item Left (name and price) */
.om-multi-select-item-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.om-multi-select-item-label {
  font-weight: 500;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.om-multi-select-item-price {
  font-size: 14px;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.om-multi-select-item-price del {
  color: #999;
  font-size: 13px;
}

.om-multi-select-item-price ins {
  text-decoration: none;
  color: #e74c3c;
  font-weight: 600;
}

/* Price elements from WooCommerce */
.om-multi-select-item-price .woocommerce-Price-amount {
  font-weight: 500;
}

.om-multi-select-item-price del .woocommerce-Price-amount {
  font-weight: 400;
}

.om-multi-select-item-price ins .woocommerce-Price-amount {
  font-weight: 600;
}

/* Item Right (swatch preview) */
.om-multi-select-item-right {
  flex-shrink: 0;
}

/* Mini swatch preview in dropdown */
.om-multi-select-swatch-preview {
  display: flex;
  gap: 4px;
}

.om-multi-select-swatch-mini {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid #ddd;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.om-multi-select-swatch-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

  .om-multi-select-dropdown-item {
    padding: 14px 16px;
  }

  .om-multi-select-checkbox {
    width: 22px;
    height: 22px;
  }

  .om-multi-select-item-label {
    font-size: 15px;
  }

  /* 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 dropdown item */
.om-multi-select-dropdown-item.om-out-of-stock {
  background-color: #f9f9f9;
  opacity: 0.7;
  cursor: default !important; /* No hand pointer - item is not clickable */
  pointer-events: auto; /* Allow hover for tooltip but not clickable behavior */
}

.om-multi-select-dropdown-item.om-out-of-stock:hover {
  background-color: #f5f5f5;
  cursor: default !important;
}

/* Strikethrough on the label */
.om-multi-select-dropdown-item.om-out-of-stock .om-multi-select-item-label {
  text-decoration: line-through;
  text-decoration-color: rgba(180, 50, 50, 0.6);
  color: #888;
  cursor: default !important;
}

/* Disabled checkbox with X overlay */
.om-multi-select-dropdown-item.om-out-of-stock .om-multi-select-checkbox {
  position: relative;
  cursor: default !important;
  opacity: 0.5;
  pointer-events: none; /* Completely disable checkbox interaction */
}

/* X overlay on the checkbox using wrapper */
.om-multi-select-dropdown-item.om-out-of-stock::before {
  content: "\2715"; /* X symbol */
  position: absolute;
  left: 19px; /* Positioned over checkbox */
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: bold;
  color: #b43232;
  pointer-events: none;
  z-index: 5;
}

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

/* Dim the swatch preview for out-of-stock items */
.om-multi-select-dropdown-item.om-out-of-stock .om-multi-select-swatch-preview {
  opacity: 0.4;
  filter: grayscale(50%);
}

/* Position context for the X overlay */
.om-multi-select-dropdown-item.om-out-of-stock {
  position: relative;
}

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

/* Quantity section in dropdown item */
.om-multi-select-item-quantity {
  flex-shrink: 0;
}

/* Items with quantity - horizontal layout with vertical center alignment */
.om-multi-select-dropdown-item.om-has-quantity {
  flex-wrap: nowrap;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
}

/* Checkbox alignment in quantity mode - centered */
.om-multi-select-dropdown-item.om-has-quantity .om-multi-select-checkbox {
  margin-top: 0;
  align-self: center;
}

/* Left side with label/price/indicator - centered */
.om-multi-select-dropdown-item.om-has-quantity .om-multi-select-item-left {
  flex: 1;
  min-width: 0;
  align-self: center;
}

/* Quantity controls - centered */
.om-multi-select-dropdown-item.om-has-quantity .om-multi-select-item-quantity {
  order: 3;
  align-self: center;
}

/* Swatch preview on the right - centered */
.om-multi-select-dropdown-item.om-has-quantity .om-multi-select-item-right {
  order: 4;
  margin-left: 8px;
  align-self: center;
}

/* Quantity wrapper with +/- buttons */
.om-qty-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  height: 32px;
}

/* Quantity +/- buttons */
.om-qty-btn {
  width: 28px;
  height: 32px;
  border: none;
  background: #f8f8f8;
  color: #666;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.om-qty-btn:hover {
  background: #eee;
  color: #333;
}

.om-qty-btn:active {
  background: #e0e0e0;
}

/* Quantity input - base styles */
.om-qty-input {
  width: 40px;
  border: none;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  box-sizing: border-box;
}

/* Quantity input - multi-select dropdown height override */
.om-multi-select-dropdown .om-qty-input,
.om-multi-select-dropdown-item .om-qty-wrapper input[type="number"] {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  line-height: 32px !important;
}

.om-qty-input::-webkit-outer-spin-button,
.om-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.om-qty-input:focus {
  outline: none;
  background: #fafafa;
}

/* Selected state - highlight quantity controls */
.om-multi-select-dropdown-item.selected .om-qty-wrapper {
  border-color: #4CAF50;
  box-shadow: 0 1px 3px rgba(76, 175, 80, 0.2);
}

.om-multi-select-dropdown-item.selected .om-qty-btn {
  background: #e8f5e9;
  color: #2e7d32;
}

.om-multi-select-dropdown-item.selected .om-qty-btn:hover {
  background: #c8e6c9;
}

.om-multi-select-dropdown-item.selected .om-qty-input {
  color: #2e7d32;
}

/* 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: 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: 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: 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: 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;
}

/* Mobile optimizations for quantity selector */
@media (max-width: 768px) {
  .om-qty-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .om-qty-input {
    width: 40px;
    height: 32px;
    font-size: 16px;
  }

  .om-multi-select-dropdown-item.om-has-quantity {
    padding: 12px 14px;
  }
}

/* Compact mode for smaller screens */
@media (max-width: 480px) {
  .om-multi-select-dropdown-item.om-has-quantity .om-multi-select-item-right {
    display: none;
  }

  .om-multi-select-item-quantity {
    margin-left: 8px;
  }
}

/* Loading and error states for dropdown */
.om-multi-select-loading,
.om-multi-select-error {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.om-multi-select-error {
  color: #b43232;
}

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

/* Variation name displayed below product title - uses CSS variables for admin customization */
.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;
}

/* ========================================
   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: 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;
  left: 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;
  left: 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: 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: 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: 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: 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: 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-left: auto;
  margin-right: 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-right: 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: 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: #46b450 !important;
  background-color: #46b450 !important;
  background-image: none !important;
  color: #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: 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 #46b450 !important;
  border-color: #46b450 !important;
}

.om-variation-item.om-in-cart::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: #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;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #46b450;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

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

/* Multi-select dropdown mode - item in cart */
.om-multi-select-dropdown-item.om-in-cart {
  background-color: #f0fdf0 !important;
  border-left: 3px solid #46b450;
}

.om-multi-select-dropdown-item.om-in-cart .om-multi-select-item-label {
  font-weight: 600;
}

/* Visual hint that item was previously in cart */
.om-multi-select-dropdown-item.om-was-in-cart {
  position: relative;
}

.om-multi-select-dropdown-item.om-was-in-cart::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #46b450;
}

/* Multi-select grid mode - in cart */
.om-multi-select-grid .om-variation-grid-item.om-in-cart {
  border-color: #46b450;
  background-color: #f0fdf0;
}

.om-multi-select-grid .om-variation-grid-item.om-in-cart .om-grid-item-image {
  box-shadow: 0 0 0 2px #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-right: 6px;
  background: #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;
    right: -4px;
  }

  .om-variation-item.om-in-cart::after {
    width: 12px;
    height: 12px;
    top: -3px;
    right: -3px;
    background-size: 8px;
  }
}

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

.om-cart-summary {
  background: linear-gradient(135deg, #f0fdf0 0%, #e8f8e8 100%);
  border: 1px solid #46b450;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.om-cart-summary-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.om-cart-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #46b450;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

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

.om-cart-summary-toggle {
  color: #46b450;
  text-decoration: underline;
  font-size: 13px;
  margin-left: auto;
  cursor: pointer;
}

.om-cart-summary-toggle:hover {
  color: #2e7d32;
}

.om-cart-summary-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(70, 180, 80, 0.3);
}

.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: 6px 0;
  margin: 0;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid rgba(70, 180, 80, 0.15);
  display: block;
}

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

.om-cart-summary-subtotal {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(70, 180, 80, 0.5);
  font-size: 14px;
  color: #1e4620;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* Responsive */
@media screen and (max-width: 480px) {
  .om-cart-summary {
    padding: 10px 12px;
  }

  .om-cart-summary-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .om-cart-summary-toggle {
    margin-left: 0;
    margin-top: 4px;
  }
}
