/* Product variant picker */

.product-variant-picker {
  direction: rtl;
  width: 100%;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
}

.product-variant-label {
  margin-bottom: 12px;
  color: #222;
  font-size: 14px;
  font-weight: 700;
}

.product-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-variant-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-variant-option:hover:not(:disabled) {
  border-color: #999;
  background: #f9fafb;
}

.product-variant-option.selected {
  border: 2px solid #16a34a;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.08);
}

.product-variant-color {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
}

.product-variant-name {
  white-space: nowrap;
}

.product-variant-stock {
  color: #dc2626;
  font-size: 11px;
}

.product-variant-option.out-of-stock {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.product-variant-selected-name {
  margin-top: 20px;
  color: #555;
  font-size: 12px;
}

/* Add-to-cart button when selected variant is unavailable */

form[action*="/cart/add/"] button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Mobile */

@media (max-width: 600px) {
  .product-variant-picker {
    margin: 14px 0;
    padding: 12px;
    border-radius: 10px;
  }

  .product-variant-options {
    gap: 8px;
  }

  .product-variant-option {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 12px;
  }
}

