/*
=======================================================================================
SUNHO K-BEAUTY
=======================================================================================
*/

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600&family=Manrope:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --primary:         #9B6FDF;
  --primary-light:   #C4A1F0;
  --primary-dark:    #7B4FBF;
  --primary-bg:      #EADEFF; /* The exact soft lavender color from the user's image */
  --input-bg:        #F4EEFF; /* Even lighter for contrast inside inputs */
  
  --mint-bg:         #E8FFF3;
  --mint-dark:       #2D8B4E;
  
  --white:           #FFFFFF;
  --gray-100:        #F2EEF8;
  --gray-200:        #E5E0EE;
  --gray-400:        #9A93A8;
  --gray-500:        #706A7E;
  --gray-800:        #252030;
  --gray-900:        #150F22;

  --font-primary:    'Be Vietnam Pro', sans-serif;
  --font-display:    'Plus Jakarta Sans', sans-serif;
  --font-ui:         'Manrope', sans-serif;
  
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  24px;
  --radius-full: 9999px;
  
  --shadow-sm:  0 4px 14px rgba(21,15,34,0.04);
  --shadow-md:  0 10px 30px rgba(155,111,223,0.1);
  --shadow-xl:   0 20px 50px rgba(21,15,34,0.1);

  --transition-base:   300ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow:   500ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast:   150ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-primary);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

/* ---------- Minimal Header ---------- */
.checkout-header {
  padding: 10px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-logo img {
  height: 88px;
  width: auto;
  object-fit: contain;
}

.back-to-shop {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.2s;
}

.back-to-shop:hover {
  color: var(--primary);
}

/* ---------- Layout ---------- */
.checkout-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 5% 10px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 50px;
}

/* ---------- Left Column ---------- */
.checkout-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.checkout-title {
  margin-bottom: 10px;
}

.checkout-title h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  margin-bottom: 5px;
}

.checkout-title p {
  color: var(--gray-700); /* Darker than gray-500 */
  font-size: 1.05rem;
  font-weight: 500;
}

/* Panels */
.checkout-panel {
  background: var(--primary-bg);
  border: 1px solid rgba(155, 111, 223, 0.1);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.icon-green {
  background: var(--mint-bg);
  color: var(--mint-dark);
}

.icon-purple {
  background: var(--primary-light);
  color: var(--white);
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900); /* Darkest gray for labels */
}

.form-input {
  background: var(--input-bg);
  border: 1px solid var(--gray-200);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: all 0.2s;
  outline: none;
}

.form-input::placeholder {
  color: var(--gray-400); /* Darker placeholder */
}

.form-input:focus {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(155,111,223,0.1);
}

/* ---------- Right Column (Summary) ---------- */
.checkout-summary {
  background: var(--primary-bg);
  border: 1px solid rgba(155, 111, 223, 0.1);
  border-radius: var(--radius-xl);
  padding: 30px;
  position: sticky;
  top: 30px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.summary-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
}

.summary-badge {
  background: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 10px;
}

.summary-items::-webkit-scrollbar { width: 4px; }
.summary-items::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

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

.summary-item-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.summary-item-info {
  flex: 1;
}


.summary-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.summary-item-subtitle {
  font-size: 0.75rem;
  color: var(--gray-700); /* Darker for summary subtitle */
  margin-bottom: 4px;
}

.summary-item-price {
  color: var(--mint);
  margin-bottom: var(--sp-2);
}

.summary-calc {
  border-top: 1px solid rgba(155,111,223,0.15);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--gray-800); /* Darker for calculation rows */
  font-weight: 600;
}

.calc-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 5px;
}

.calc-row .free {
  color: var(--mint-dark);
  font-weight: 700;
}

.legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 16px;
  color: var(--gray-700);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.legal-consent input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 18px;
  border: 2px solid rgba(155,111,223,0.45);
  border-radius: 5px;
  background: var(--white);
  cursor: pointer;
  position: relative;
}

.legal-consent input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.legal-consent input:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.legal-consent input:focus-visible {
  outline: 3px solid rgba(155,111,223,0.22);
  outline-offset: 2px;
}

.btn-confirm {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 16px;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}

.btn-confirm:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(155,111,223,0.25);
}

.secure-text {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--mint-dark);
  margin-top: 16px;
  text-transform: uppercase;
}

.free-shipping-note {
  text-align: center;
  font-size: 0.85rem;
  color: #f97316;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
}

.free-shipping-progress {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-700);
  margin-top: 8px;
  font-weight: 600;
  line-height: 1.35;
}

:root {
  --off-white: #FCFAFF; 
}

/* ---------- Form Select ---------- */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239A93A8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

.form-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-select option {
  background: #fff;
  color: var(--gray-900);
}

/* ---------- Shipping Cost Card ---------- */
.shipping-cost-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #edfaf3 0%, #d9f5e6 100%);
  border: 1.5px solid #b6e9cc;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  animation: slideInCard 0.35s cubic-bezier(0.22,1,0.36,1);
}

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

.shipping-cost-card.paid-shipping {
  background: linear-gradient(135deg, #f0ebff 0%, #e4d8ff 100%);
  border-color: rgba(155,111,223,0.35);
}

.shipping-cost-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint-dark);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(45,139,78,0.12);
}

.shipping-cost-card.paid-shipping .shipping-cost-icon {
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(155,111,223,0.15);
}

.shipping-cost-info {
  flex: 1;
}

.shipping-cost-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 3px;
}

.shipping-cost-label span {
  color: var(--gray-900);
  font-weight: 700;
}

.shipping-cost-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--mint-dark);
}

.shipping-cost-card.paid-shipping .shipping-cost-value {
  color: var(--primary-dark);
}

/* Shipping row "pending" state */
.shipping-pending {
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 500;
  font-style: italic;
}

/* ---------- Footer Progress ---------- */
.checkout-footer {
  background: var(--white);
  padding: 10px 5%;
  margin-top: 5px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}

.progress-track {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.progress-line {
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(45,139,78,0.2);
  z-index: 1;
}

.progress-line-fill {
  position: absolute;
  top: 16px;
  left: 10%;
  width: 40%;
  height: 2px;
  background: var(--mint-dark);
  z-index: 1;
}

.progress-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mint-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.step-icon.pending {
  background: rgba(45,139,78,0.1);
  color: var(--mint-dark);
  border: 2px solid var(--mint-dark);
}

.step-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mint-dark);
}

.footer-logo img {
  height: 180px;
  width: auto;
  margin: -20px 0 -40px -12px; /* Move logo up and bring text closer */
  /* Filtro removido para mantener colores originales */
}

.footer-brand p {
  margin-top: 0;
  margin-bottom: 15px; /* Bring socials closer */
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mint-dark);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 1; }

.footer-copy {
  font-size: 0.78rem;
  color: var(--mint-dark);
  opacity: 0.6;
}

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

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .checkout-panel { padding: 20px; }
  .checkout-title h1 { font-size: 2rem; }
  .checkout-header { 
    padding: 20px 5%; 
    flex-direction: column; 
    gap: 12px; 
    text-align: center; 
  }
  .checkout-logo img {
    height: 64px;
  }
}
