@font-face {
  font-family: "Hatton";
  src: url("/fonts/Hatton-Ultralight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hatton";
  src: url("/fonts/Hatton-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: Inter, system-ui, sans-serif;
  background: #fcfaf6;
  color: #111;
  user-select: none;
}

input::placeholder,
textarea::placeholder {
  font-family: Inter, system-ui, sans-serif;
  opacity: 0.8;
}

/* ===== CHECKOUT HEADER ===== */
.header-filler {
  width: 100%;
  background: linear-gradient(to bottom, #ffa4db 15%, #fcfaf6 70%);
}

.checkout-header {
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #ffa4db 15%, #fcfaf6 70%);
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-brand {
  width: 100%;
  max-width: 120px;
  background: linear-gradient(to bottom, #ffa4db 15%, #fcfaf6 70%);
  padding: 10px;
}

/* 100 */
.checkout-brand .logo-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Puntadas */
.checkout-brand span:not(.logo-img) {
  font-weight: 600;
}

/* ===== STEPS ===== */
.checkout-steps {
  font-family: Hatton, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  gap: 2rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #161616;
}

.step-index {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding-top: 2px;
  margin-top: -4px;
  border: 2px solid #d8d9da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.step-index2 {
  width: 22px;
  height: 22px;
  padding-top: 2px;
  margin-top: -4px;
  border-radius: 50%;
  display: flex;
  background: #fff;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ACTIVO */
.step.active {
  color: #161616;
  font-weight: 600;
}

.step.active .step-index {
  background: #fff;
  color: #161616;
  border-color: #161616;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .checkout-steps {
    gap: 1rem;
  }

  .step-label {
    display: none;
  }
}

/* ===== LAYOUT ===== */
.checkout-wrapper {
  max-width: 1200px;
  margin: 2rem auto 1.5rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

/* ===== CARDS ===== */
.card,
.summary-card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid #d8d9da;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}

.summary-card .payment-div {
  margin-top: 1.2rem;
  padding: 1.4rem 0;
  border-radius: 12px;
}

.summary-card .card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

/* Opciones de pago más compactas */
.summary-card .radio-option {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
}

.summary-card .radio-option span {
  font-size: 0.9rem;
  font-weight: 600;
}

.m-bottom {
  margin-bottom: 1.5rem;
}

h2,
h3 {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.checkout-label {
  font-size: 15px;
  font-weight: 600;
}

.checkout-span {
  color: #d11a2a;
}

/* ===== INPUTS ===== */
.input {
  width: 100%;
  height: 43px;
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 0 12px;
  font-size: 0.9rem;
}

.input:focus {
  outline: none;
  border-color: #161616;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20fill='%23161616'%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M7%2010l5%205%205-5z'/%3E%3Cpath%20d='M0%200h24v24H0z' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 22px;
  padding-right: 30px;
  padding-left: 14px;
  color: #161616;
  border-radius: 5px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  cursor: pointer;
}

select.input:focus {
  outline: none;
  border-color: #161616;
}

.row {
  display: flex;
  gap: 1rem;
}

.field {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 10px;
  gap: 4px;
}

.error-msg {
  width: auto;
  height: 10px;
  font-size: 0.75rem;
  color: #d11a2a;
  opacity: 0;
  margin-left: 5px;
  transform: translateY(-4px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.rb-msg {
  width: 100%;
  height: 15px;
  display: block;
  color: #d11a2a;
  margin-left: 8px;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.rb-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.field.error .error-msg {
  opacity: 1;
  transform: translateY(0);
}

.field.error .input {
  border-color: #d11a2a;
  box-shadow: 0 0 0 2px rgba(209, 26, 42, 0.15);
  animation: shake 0.25s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

.checkout-right {
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: 1.5rem;
}

/* ===== TRUST SVG ===== */
.trust-div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trust-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  gap: 3px;
}

.trust-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
}

.trust-item span {
  width: auto;
  text-align: center;
  margin-top: -5px;
}

/* ===== RADIO FIELD (BASE) ===== */
.radio-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 10px;
  gap: 4px;
}

.rb-div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radio-option-div {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  background: #fff;
}

.radio-option span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.radio-option small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
}

/* Ocultar radio nativo */
.radio-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #aaa;
  display: grid;
  place-content: center;
  cursor: pointer;
}

/* Círculo interno */
.radio-option input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s ease;
  background: #161616;
}

/* CHECKED */
.radio-option input[type="radio"]:checked {
  border-color: #161616;
}

.radio-option input[type="radio"]:checked::before {
  transform: scale(1);
}

/* CARD ACTIVA */
.radio-option:has(input:checked) {
  border-color: #161616;
  box-shadow: 0 0 0 2px rgba(22, 22, 22, 0.08);
}

/* ===== TEXTAREA ===== */
.textarea {
  font-family: Inter, system-ui, sans-serif;
  height: 90px;
  padding-top: 12px;
  resize: none;
}

/* ===== SUMMARY ===== */
.line {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #eee;
}

.total {
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: none;
}

/* ===== CTA ===== */
.checkout-cta {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  border: none;
  text-transform: uppercase;
  background: #161616;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: opacity 150ms ease;
}

.checkout-cta:hover {
  opacity: 0.9;
}

/* ===== PRODUCTS LIST ===== */
.order-product {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.order-product-info {
  display: flex;
  gap: 10px;
}

.order-product-info img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.order-product-info small {
  display: block;
  color: #666;
  margin-top: 4px;
}

.order-product-price {
  display: flex;
  text-align: right;
  white-space: nowrap;
  gap: 10px;
}

.product-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.product-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.product-meta {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.4;
}

.product-price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ===== TOTALS ===== */
.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}

.totals-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  border-top: 2px solid #161616;
  margin-top: 1rem;
  padding-top: 1rem;
}

/* ===== DISCOUNT ===== */
.discount-row {
  background: #fafafa;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.6rem 0;
}

.red-discount {
  color: #c0392b;
  font-weight: 800;
}

#shippingRow {
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

#shippingRow.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

select[data-locked="true"] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

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

@media (max-width: 550px) {
  .row {
    flex-direction: column;
    gap: 3px;
  }
  .checkout-header {
    padding: 0 1.5rem;
  }

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

  .trust-item span {
    font-size: 12px;
  }

  .trust-div {
    display: none;
  }

  .trust-img {
    width: 35px;
    height: 35px;
  }
}
