/* ==========================================================================
   ROUNDY V3 - CARRITO MULTI-PRODUCTO STYLES
   ========================================================================== */

:root {
  --bg-color: #141416;
  --card-bg: #1C1C1E;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --accent-yellow: #f4d03f;
  --accent-yellow-hover: #ffdb4d;
  --accent-orange: #FF5A00;
  --input-bg: #242427;
  --input-border: rgba(255, 255, 255, 0.12);
  --transition-bezier: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.checkout-header {
  width: 100%;
  padding: 20px 48px;
  background-color: rgba(20, 20, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.checkout-header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.back-to-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.back-to-store-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateX(-3px);
}

.back-arrow {
  width: 16px;
  height: 16px;
}

/* Main Container */
.checkout-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.checkout-page-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #ffffff;
}

.checkout-page-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 36px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Cards Base */
.checkout-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-yellow);
  color: #000000;
  font-size: 13px;
  font-weight: 900;
}

/* Lista de Artículos del Carrito */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: background-color 0.2s ease;
}

.cart-item-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.cart-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background-color: #ffffff;
  padding: 4px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.cart-item-unit-price {
  font-size: 13px;
  color: var(--text-secondary);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-qty-btn-group {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background-color: var(--accent-yellow);
  color: #000000;
}

.qty-val {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
}

.cart-item-subtotal {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-yellow);
  min-width: 50px;
  text-align: right;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.remove-item-btn svg {
  width: 16px;
  height: 16px;
}

/* Estado Carrito Vacío */
.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  border-radius: 16px;
  margin-bottom: 24px;
}

.empty-cart-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-cart-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-cart-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 300px;
}

/* Sección de Adición Rápida de Productos */
.quick-add-section {
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  margin-bottom: 28px;
}

.quick-add-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 16px;
}

.quick-add-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-add-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.quick-add-card:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.quick-add-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background-color: #ffffff;
  padding: 2px;
  flex-shrink: 0;
}

.quick-add-info {
  flex: 1;
}

.quick-add-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.quick-add-price {
  font-size: 12px;
  color: var(--accent-orange);
  font-weight: 800;
}

.quick-add-btn {
  padding: 8px 14px;
  border-radius: 20px;
  background-color: rgba(244, 208, 63, 0.12);
  color: var(--accent-yellow);
  border: 1px solid rgba(244, 208, 63, 0.3);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-add-btn:hover {
  background-color: var(--accent-yellow);
  color: #000000;
  transform: scale(1.04);
}

/* Totales */
.summary-breakdown {
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.summary-row.total-row {
  border-top: 1px dashed var(--card-border);
  padding-top: 16px;
  margin-top: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.summary-row.total-row .total-amount {
  color: var(--accent-yellow);
}

/* Form Styles */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-label span.req {
  color: var(--accent-orange);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select option {
  background-color: #1C1C1E;
  color: #ffffff;
}

/* Security Alert Box (Anti-Bot / Flood Protection) */
.security-alert-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 14px;
  margin-bottom: 8px;
  color: #fca5a5;
  font-size: 13.5px;
  line-height: 1.5;
  animation: fadeInAlert 0.3s ease;
}

@keyframes fadeInAlert {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.security-alert-box .alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14.5px;
  color: #ef4444;
  margin-bottom: 8px;
}

.security-alert-box .alert-shield-icon {
  width: 20px;
  height: 20px;
  stroke: #ef4444;
  flex-shrink: 0;
}

.security-alert-box p {
  margin: 0 0 10px 0;
  color: #e5e7eb;
}

.lockout-timer-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: #fca5a5;
}

.lockout-timer-pill strong {
  color: #ffffff;
  font-family: monospace;
  font-size: 14px;
  margin-left: 4px;
}

/* Submit Button */
.submit-whatsapp-btn {
  width: 100%;
  padding: 18px 24px;
  background-color: var(--accent-yellow);
  color: #000000;
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(244, 208, 63, 0.3);
  transition: transform 0.3s var(--transition-bezier), background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  margin-top: 12px;
}

.submit-whatsapp-btn:hover:not(:disabled) {
  background-color: var(--accent-yellow-hover);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 15px 35px rgba(244, 208, 63, 0.45);
}

.submit-whatsapp-btn:disabled {
  background-color: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.75;
}

.whatsapp-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
}

.shield-icon {
  width: 14px;
  height: 14px;
}

/* Footer */
.checkout-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .checkout-header {
    padding: 16px 20px;
  }
  
  .checkout-main {
    padding: 20px 14px 60px 14px;
  }
  
  .checkout-card {
    padding: 20px;
    border-radius: 20px;
  }
  
  .cart-item-card {
    flex-wrap: wrap;
    gap: 12px;
  }

  .cart-item-controls {
    width: 100%;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .submit-whatsapp-btn {
    padding: 16px 20px;
    font-size: 14px;
  }
}
