/* Checkout Pages Styles */

.checkout-progress {
  background: var(--color-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  /* Removed margin-top since there's no header above */
}

/* Added checkout header with logo */
.checkout-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.checkout-logo {
  display: block;
}

.checkout-logo img {
  height: 60px;
  width: auto;
}

.checkout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.progress-step.active {
  opacity: 1;
}

.progress-step.completed {
  opacity: 1;
}

/* Improved icon centering with flexbox */
.step-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-surface-elevated);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
}

.step-icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.progress-step.active .step-icon {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-background);
}

.progress-step.completed .step-icon {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-background);
}

/* Improved progress line with fill animation */
.progress-line {
  width: 80px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.progress-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--color-accent);
  transition: width 0.5s ease;
}

.progress-step.completed + .progress-line::after {
  width: 100%;
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.progress-step.active .step-label {
  color: var(--color-primary);
}

/* Cart Content */

.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  padding: 3rem 0;
}

.cart-section {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 2rem;
}

.cart-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cart-subtitle {
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.cart-vendor {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-surface-elevated);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-background);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-category {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 600;
}

.cart-item-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.cart-item-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--color-primary);
  color: var(--color-background);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: var(--color-accent);
  transform: scale(1.05);
}

.quantity-display {
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.remove-item-btn:hover {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

.cart-continue-shopping {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.free-shipping-promo {
  background: #f0f7ff;
  border: 1px dashed #007bff;
  padding: 10px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 0.9rem;
  text-align: center;
  color: #0056b3;
}

.free-shipping-active {
  color: #28a745;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.free-shipping-active::before {
  content: "🎉";
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-background);
}

/* Cart Summary */

.cart-summary {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.summary-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-coupon {
  margin-bottom: 1.5rem;
}

.summary-coupon h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.coupon-input-group {
  display: flex;
  gap: 0.5rem;
}

.coupon-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
}

.coupon-apply-btn {
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-background);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.coupon-apply-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.summary-notification {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-surface-elevated);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.summary-notification svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.summary-notification a {
  color: var(--color-primary);
  text-decoration: underline;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}

.summary-row .discount {
  color: #4caf50;
}

.summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

.summary-total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.summary-total strong {
  color: var(--color-primary);
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-accent)
  );
  color: var(--color-background);
  border: none;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.cart-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.cart-empty-state svg {
  width: 80px;
  height: 80px;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.cart-empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cart-empty-state p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* Responsive */

@media (max-width: 1024px) {
  .checkout-content {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-progress {
    padding: 1.5rem 0;
  }

  /* Responsive logo sizing */
  .checkout-logo img {
    height: 50px;
  }

  .checkout-header {
    margin-bottom: 1.5rem;
  }

  .progress-steps {
    gap: 0.5rem;
  }

  /* Smaller icons for mobile with proper centering */
  .step-icon {
    width: 40px;
    height: 40px;
  }

  .step-icon svg {
    width: 18px;
    height: 18px;
  }

  .progress-line {
    width: 40px;
  }

  .step-label {
    font-size: 0.75rem;
  }

  .cart-section {
    padding: 1.5rem;
  }

  .cart-title {
    font-size: 1.5rem;
  }

  .cart-item-card {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .summary-card {
    padding: 1.5rem;
  }
}

/* Added checkout footer styles */
.checkout-progress ~ .checkout-container ~ .footer {
  margin-top: 4rem;
  background: var(--color-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer {
  padding: 3rem 0 2rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  height: 150px;
  width: auto;
}

.footer-logo-img {
  /* Aumentando más el tamaño del logo del footer */
  height: 120px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--spacing-md);
}

/* Resaltado de error en la tarjeta */
.stock-warning-border {
  border: 1px solid #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.05);
}

/* Mensaje de texto debajo del precio */
.stock-error-msg {
  color: #dc3545;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 5px;
}

/* Número en rojo en los controles */
.text-danger {
  color: #dc3545;
}

/* Estado deshabilitado del botón */
.btn-disabled {
  background-color: #6c757d !important;
  cursor: not-allowed;
  opacity: 0.7;
}

.footer-description {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links li {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
