/* PanelShop — product variations (scoped to beat theme / Elementor button styles) */
.panelshop-product-variations.ps-product-variations {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.panelshop-product-variations .ps-variation-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.panelshop-product-variations .ps-variation-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-surface-800);
}

.panelshop-product-variations .ps-variation-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ps-surface-600);
}

.panelshop-product-variations .ps-variation-selected-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--ps-surface-200);
  flex-shrink: 0;
}

.panelshop-product-variations .ps-variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Reset theme button styles inside variation picker */
.panelshop-product-variations button.ps-color-swatch,
.panelshop-product-variations button.ps-box-option {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  line-height: normal;
  text-transform: none;
  box-shadow: none !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.panelshop-product-variations button.ps-color-swatch:focus,
.panelshop-product-variations button.ps-box-option:focus {
  outline: none;
  box-shadow: none !important;
}

.panelshop-product-variations button.ps-color-swatch:focus-visible,
.panelshop-product-variations button.ps-box-option:focus-visible {
  outline: 2px solid var(--ps-primary-400, #60a5fa);
  outline-offset: 2px;
}

.panelshop-product-variations button.ps-color-swatch.is-selected:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ps-primary-500, #3b82f6) !important;
}

/* Color swatches */
.panelshop-product-variations .ps-color-swatch {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  background-image: none !important;
  color: inherit !important;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  flex-shrink: 0;
}

.panelshop-product-variations .ps-color-swatch:not(.is-selected) {
  box-shadow: none !important;
}

.panelshop-product-variations .ps-color-swatch:not(.is-selected):hover:not(.is-unavailable) {
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
}

.panelshop-product-variations .ps-color-swatch-inner {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.panelshop-product-variations .ps-color-swatch:not(.is-selected):not(.is-unavailable):hover .ps-color-swatch-inner {
  border-color: rgba(0, 0, 0, 0.22);
  transform: scale(1.04);
}

.panelshop-product-variations .ps-color-swatch-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: #111;
  pointer-events: none;
}

.panelshop-product-variations .ps-color-swatch.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ps-primary-500, #3b82f6) !important;
  border-radius: 50%;
}

.panelshop-product-variations .ps-color-swatch.is-selected .ps-color-swatch-check {
  opacity: 1;
}

.panelshop-product-variations .ps-color-swatch.is-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}

.panelshop-product-variations .ps-box-option:not(.is-selected):not(.is-unavailable) {
  border-color: var(--ps-surface-200) !important;
  background-color: #fff !important;
  color: var(--ps-surface-800) !important;
  box-shadow: none !important;
}

.panelshop-product-variations .ps-box-option:not(.is-selected) .ps-box-option-check {
  display: none !important;
}

.panelshop-product-variations .ps-color-swatch:not(.is-selected) {
  box-shadow: none !important;
}

.panelshop-product-variations .ps-color-swatch:not(.is-selected) .ps-color-swatch-check {
  opacity: 0 !important;
}

/* Box options (size etc.) */
.panelshop-product-variations .ps-box-option {
  min-width: 48px;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ps-surface-200) !important;
  border-radius: 10px;
  background-color: #fff !important;
  background-image: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-surface-800) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.panelshop-product-variations .ps-box-option .ps-box-option-text {
  color: inherit;
}

.panelshop-product-variations .ps-box-option-check {
  display: none;
  color: var(--ps-primary-600, #2563eb);
}

.panelshop-product-variations .ps-box-option:not(.is-selected):not(.is-unavailable):hover {
  border-color: var(--ps-primary-400, #60a5fa) !important;
  background-color: var(--ps-primary-50, #eff6ff) !important;
  color: var(--ps-surface-900, #0f172a) !important;
}

.panelshop-product-variations .ps-box-option.is-selected {
  border-color: var(--ps-primary-500, #3b82f6) !important;
  background-color: var(--ps-primary-50, #eff6ff) !important;
  color: var(--ps-primary-700, #1d4ed8) !important;
}

.panelshop-product-variations .ps-box-option.is-selected:hover:not(.is-unavailable) {
  border-color: var(--ps-primary-600, #2563eb) !important;
  background-color: #dbeafe !important;
  color: var(--ps-primary-800, #1e40af) !important;
}

.panelshop-product-variations .ps-box-option.is-selected .ps-box-option-check {
  display: inline-flex;
}

.panelshop-product-variations .ps-box-option.is-unavailable {
  border-style: dashed !important;
  color: var(--ps-surface-400) !important;
  background-color: var(--ps-surface-50) !important;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .panelshop-product-variations .ps-box-option {
    min-width: 44px;
    height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .panelshop-product-variations .ps-color-swatch {
    width: 36px;
    height: 36px;
  }

  .panelshop-product-variations .ps-color-swatch-inner {
    width: 28px;
    height: 28px;
  }
}
