
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-modal__content {
  position: relative;
  background: var(--pc-surface);
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal.active .product-modal__content {
  transform: translateY(0);
}

.product-modal__close {
  position: absolute;
  top: 14px;
  left: 14px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666;
  display: flex;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.product-modal__close:hover {
  background: #f5f5f5;
  color: var(--pc-primary);
}

.product-modal__close svg {
  width: 22px;
  height: 22px;
}

.product-modal__title {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pc-text);
  text-align: center;
  line-height: 1.5;
  padding: 0 30px;
}

.product-modal__options {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.modal-option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-option-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.modal-option-hint {
  margin: 0;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.modal-select-wrapper {
  position: relative;
}

.modal-select {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: #333;
  background: var(--pc-surface);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.modal-select:focus {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px rgba(246, 175, 47, 0.15);
}

.modal-text-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: all 0.3s ease;
}

.modal-text-input:focus {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px rgba(246, 175, 47, 0.15);
}

.char-counter {
  font-size: 12px;
  color: #999;
  text-align: left;
  direction: ltr;
}

.product-modal__add-btn {
  width: 100%;
  height: 48px;
  background: var(--pc-primary);
  color: var(--pc-surface);
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.product-modal__add-btn:hover {
  background: var(--pc-primary-dark);
}

.product-modal__add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .product-modal__content {
    padding: 24px 18px 20px;
    border-radius: 16px;
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-tab-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-tab-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--pc-primary);
  cursor: pointer;
}

.modal-tab-option .modal-option-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-tab-price-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--pc-primary);
  background: var(--pc-primary-soft);
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.product-modal__price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.product-modal__price .price-value bdi {
  font-size: 17px;
}

.modal-select.pc-invalid, .modal-text-input.pc-invalid {
  border-color: #ff4d6d !important;
}
