/* ===== CHECKOUT STYLES ===== */

.checkout-page {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-primary);
  cursor: none; /* Ocultar cursor por defecto */
}

/* ===== CURSOR PERSONALIZADO ===== */
.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  background-image: url("https://www.rw-designer.com/cursor-view/121194.png");
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  top: 0;
  left: 0;
  will-change: transform, opacity;
  /* Fallback en caso de que no cargue la imagen */
  background-color: var(--primary-purple);
  border: 2px solid var(--light-cyan);
}

/* Si la imagen carga, ocultar el fallback */
.cursor:not(.error) {
  background-color: transparent;
  border: none;
}

@media (hover: none) {
  .checkout-page {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

.checkout-container {
  display: flex;
  min-height: 100vh;
}

/* ===== LEFT SIDE - FORM ===== */
.checkout-form-section {
  flex: 1;
  background: white;
  overflow-y: auto;
  max-height: 100vh;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 30px;
}

/* Header */
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.logo-small {
  display: flex;
  align-items: center;
}

.checkout-logo {
  max-height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.back-link {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: var(--secondary-purple);
  transform: translateX(-3px);
}

/* Form Sections */
.form-section {
  margin-bottom: 40px;
}

.form-section h2 {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--light-cyan);
}

/* Order Summary */
.order-summary {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}

.selected-plan h3 {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  color: var(--primary-purple);
  margin-bottom: 5px;
}

.selected-plan p {
  color: var(--text-gray);
  margin-bottom: 15px;
}

.price-display {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 20px;
}

.price-display .currency {
  font-size: 1.2rem;
  color: var(--primary-purple);
  font-weight: 600;
}

.price-display .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-purple);
}

.price-display .period {
  font-size: 1rem;
  color: var(--text-gray);
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.quantity-selector label {
  font-weight: 600;
  color: var(--text-dark);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-purple);
  background: white;
  color: var(--primary-purple);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.qty-btn:hover {
  background: var(--primary-purple);
  color: white;
  transform: scale(1.05);
}

#quantity {
  width: 60px;
  height: 40px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  background: white;
}

.total-price {
  text-align: right;
  font-size: 1.3rem;
  color: var(--primary-purple);
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.payment-option {
  position: relative;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.payment-option input[type="radio"]:checked + .payment-label {
  border-color: var(--primary-purple);
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.payment-icon {
  font-size: 1.5rem;
}

.payment-label span:last-child {
  font-weight: 600;
  color: var(--text-dark);
}

/* Credit Card Fields */
.credit-card-fields {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9ff;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.credit-card-fields.hidden {
  display: none;
}

/* Form Actions */
.form-actions {
  margin-top: 40px;
  text-align: center;
}

.btn-large {
  width: 100%;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.security-note {
  color: var(--text-gray);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== RIGHT SIDE - HERO ===== */
.checkout-hero-section {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.floating-donuts {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.floating-donut {
  position: absolute;
}

.floating-donut.donut-1 {
  top: 20%;
  left: 15%;
}

.floating-donut.donut-2 {
  top: 60%;
  right: 20%;
}

.floating-donut.donut-3 {
  bottom: 20%;
  left: 25%;
}

.donut-img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.3));
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  padding: 40px;
  max-width: 500px;
}

.checkout-hero-text h1 {
  font-family: var(--font-brand);
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.checkout-hero-text p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
}

.features-mini {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.feature-mini {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-mini .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-mini span:last-child {
  font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .checkout-container {
    flex-direction: column;
  }

  .checkout-hero-section {
    min-height: 40vh;
  }

  .checkout-hero-text h1 {
    font-size: 2.5rem;
  }

  .donut-img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .form-container {
    padding: 30px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: 1;
  }

  .checkout-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .checkout-hero-text h1 {
    font-size: 2rem;
  }

  .checkout-hero-text p {
    font-size: 1.1rem;
  }

  .features-mini {
    text-align: center;
  }

  .feature-mini {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 20px 15px;
  }

  .checkout-logo {
    max-height: 35px;
  }

  .checkout-hero-section {
    min-height: 35vh;
  }

  .hero-content {
    padding: 20px;
  }

  .donut-img {
    width: 50px;
    height: 50px;
  }
}
