/* Toast notifications */
.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}

.custom-toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid #28a745;
}

.toast-error {
  border-left: 4px solid #dc3545;
}

/* Button states */
.btn-dynamic {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  display: block;
  font-size: calc(13.6px + 0.125vw);
  padding: 11px;
  width: 35%;
  background-size: 200% auto;
  background-position: left center;
}

.btn-dynamic:hover {
  filter: brightness(1.05);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
  background-position: right center;
}

/* Loading state */
.btn-dynamic.loading {
  color: transparent !important;
  opacity: 0.8;
  pointer-events: none;
}

.btn-dynamic.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Success state */
.btn-dynamic.success {
  animation: pulseSuccess 0.5s;
  background-color: #4bb543 !important;
  background-image: none !important;
}

/* Color-specific states */
.btn-dynamic[style*="#ff4d4d"] {
  box-shadow: 0 4px 8px rgba(255, 77, 77, 0.3);
}

.btn-dynamic[style*="#ff8a00"] {
  box-shadow: 0 4px 8px rgba(255, 138, 0, 0.3);
}

/* Quantity controls */
.quantity-control button {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.2rem;
  padding: 0 0.5rem;
}

.quantity-control button:hover {
  color: #007bff;
}

/* Text colors */
.text-success {
  color: #28a745;
}

.text-danger {
  color: #dc3545;
}

/* Animations */
@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulseSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

.fade-in {
  animation: fadeIn 0.4s ease-in-out forwards;
  opacity: 0;
}

/* Variant details */
.variant-details {
  margin-bottom: 1rem;
}

.variant-price {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #555;
}

#variant-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

#variant-price .offer-btn {
  background-color: #28a745;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

#variant-color,
#variant-size,
#variant-stock-status,
#variant-sku {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #555;
}

/* Variant selection */
.variant-images input.btn-check + label.btn {
  border: 2px solid transparent;
  padding: 2px;
}

.variant-images input.btn-check:checked + label.btn,
.variant-images input.btn-check.active + label.btn {
  border-color: #007bff;
}

.color-variant li.active {
  border: 2px solid #007bff;
  padding: 2px;
}

/* Quantity select */
.quantity select.form-select {
  width: 150px;
  padding: 0.5rem;
  border-radius: 4px;
}

/* Cart animations */
.updated {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.product-cart,
.cart-item {
  transition: all 0.3s ease;
}

/* Password field with toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  z-index: 5;
}

.password-toggle:hover {
  color: #495057;
}

/* Adjust input padding to make room for the eye icon */
.password-field .form-control {
  padding-right: 40px;
}

/* Form validation styles */
.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.is-invalid {
  border-color: #dc3545;
}

.is-invalid ~ .invalid-feedback,
.is-invalid + .invalid-feedback {
  display: block;
}

/* Terms checkbox styling */
#termsError {
  margin-top: 5px;
  display: none;
}

.form-check-input.is-invalid {
  border-color: #dc3545;
}

/* Alert styling */
.alert {
  margin-bottom: 1rem;
}

/* Form text */
.form-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Login/Signup box styling */
.log-in-box {
  background: #fff;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.log-in-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.log-in-title h4 {
  font-weight: 700;
  color: #212529;
}

.log-in-title p {
  color: #6c757d;
  margin-bottom: 0;
}

.other-log-in {
  position: relative;
  margin: 1.5rem 0;
  text-align: center;
}

.other-log-in h6 {
  display: inline-block;
  background: #fff;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  color: #6c757d;
  font-weight: 500;
}

.other-log-in::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dee2e6;
  z-index: 0;
}

.sign-up-box {
  text-align: center;
  margin-top: 1.5rem;
}

.sign-up-box p {
  margin-bottom: 0.5rem;
  color: #6c757d;
}

.sign-up-box a {
  font-weight: 500;
  color: #0d6efd;
  text-decoration: none;
}

.sign-up-box a:hover {
  text-decoration: underline;
}
