.confirm-buy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-backdrop-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
  animation: fadeIn 0.2s ease-out;
}

.confirm-buy-modal {
  background: var(--modal-bg);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-xl);
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease-out;
}

.confirm-buy-header {
  text-align: center;
  margin-bottom: 0.5em;
}

.confirm-buy-zone {
  font-size: 0.85em;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: 0.2em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confirm-buy-item-name {
  margin: 0;
  font-size: 1.2em;
  color: var(--color-primary);
  font-weight: 600;
}

.confirm-buy-image-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  margin: 0.8em 0;
}

.confirm-buy-nav-btn {
  width: 35px;
  height: 35px;
  border: var(--border-width-medium) solid var(--color-primary);
  border-radius: var(--border-radius-full);
  background: var(--color-bg-surface);
  color: var(--color-primary);
  font-size: 1.8em;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.confirm-buy-nav-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.confirm-buy-nav-btn:disabled {
  border-color: var(--color-border-medium);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.confirm-buy-image-container {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width-medium) solid var(--color-border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--color-gray-100);
}

.confirm-buy-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.confirm-buy-image-placeholder {
  font-size: 4em;
  color: var(--color-border-medium);
}

.confirm-buy-quantity-section {
  margin: 0.8em 0;
}

.confirm-buy-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
}

.confirm-buy-counter-btn {
  width: 45px;
  height: 45px;
  border: var(--border-width-medium) solid var(--color-primary);
  border-radius: var(--border-radius-lg);
  background: var(--color-bg-surface);
  color: var(--color-primary);
  font-size: 1.6em;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.confirm-buy-counter-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.confirm-buy-counter-btn:disabled {
  border-color: var(--color-border-medium);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.confirm-buy-counter-display {
  width: 70px;
  height: 45px;
  border: var(--border-width-medium) solid var(--color-border-light);
  border-radius: var(--border-radius-lg);
  text-align: center;
  font-size: 1.4em;
  font-weight: bold;
  color: var(--color-text-primary);
  background: var(--color-gray-100);
}

.confirm-buy-counter-display:focus {
  outline: none;
  border-color: var(--color-primary);
}

.confirm-buy-actions {
  display: flex;
  gap: 0.6em;
  margin-top: 1em;
}

.confirm-buy-cancel,
.confirm-buy-confirm {
  flex: 1;
  padding: 0.75em 0.5em;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
}

.confirm-buy-cancel {
  background: var(--color-gray-200);
  color: var(--color-text-primary);
}

.confirm-buy-cancel:hover {
  background: var(--color-gray-300);
}

.confirm-buy-confirm {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.confirm-buy-confirm:hover {
  background: var(--color-success-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .confirm-buy-modal {
    padding: 0.8em;
  }

  .confirm-buy-header {
    margin-bottom: 0.4em;
  }

  .confirm-buy-zone {
    font-size: 0.8em;
  }

  .confirm-buy-item-name {
    font-size: 1.1em;
  }

  .confirm-buy-image-section {
    gap: 0.5em;
    margin: 0.6em 0;
  }

  .confirm-buy-actions {
    gap: 0.5em;
    margin-top: 0.8em;
  }

  .confirm-buy-cancel,
  .confirm-buy-confirm {
    padding: 0.7em 0.4em;
    font-size: 0.9em;
  }

  .confirm-buy-image-container {
    width: 220px;
    height: 220px;
  }

  .confirm-buy-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 1.6em;
  }

  .confirm-buy-counter-btn {
    width: 40px;
    height: 40px;
    font-size: 1.4em;
  }

  .confirm-buy-counter-display {
    width: 60px;
    height: 40px;
    font-size: 1.2em;
  }

  .confirm-buy-quantity-section {
    margin: 0.6em 0;
  }
}

@media (max-width: 360px) {
  .confirm-buy-modal {
    padding: 0.7em;
  }

  .confirm-buy-cancel,
  .confirm-buy-confirm {
    padding: 0.65em 0.3em;
    font-size: 0.85em;
  }

  .confirm-buy-image-container {
    width: 180px;
    height: 180px;
  }

  .confirm-buy-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 1.4em;
  }
}
