/* ===============================
   VARIABLES SHILOH
================================ */
:root {
  --bg-dark: #0e0e0e;
  --bg-card: #151515;
  --gold: #c7a16b;
  --gold-soft: #e2c089;
  --text: #f5f5f5;
  --text-muted: #bdbdbd;
  --border: rgba(199,161,107,.2);
}

/* ===============================
   RESET BÁSICO
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(10,10,10,.88), rgba(10,10,10,.95)),
    url("img/fondo1.png") center / cover no-repeat fixed;
}

/* ===============================
   UTILIDADES
================================ */
.wrap {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.hidden {
  display: none;
}

/* ===============================
   HEADER
================================ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand .sub {
  display: block;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 3px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
}

.nav a:hover {
  color: var(--gold);
}

/* ===============================
   CHECKOUT LAYOUT
================================ */
.checkout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  padding: 80px 0;
}

/* ===============================
   TARJETA CHECKOUT
================================ */
.checkout-left {
  background: var(--bg-card);
  padding: 50px;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.checkout-header h1 {
  margin-top: 0;
  color: var(--gold);
}

/* ===============================
   FORMULARIO
================================ */
form fieldset {
  border: none;
  padding: 0;
  margin-bottom: 40px;
}

form legend {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--gold);
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 18px;
}

input,
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  color: var(--text);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* ===============================
   CARRITO
================================ */
.cart {
  border-top: 1px solid var(--border);
  padding-top: 25px;
}

.product {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 20px;
  align-items: center;
}

.product img {
  width: 90px;
  border-radius: 10px;
}

.product-info h3 {
  margin: 0;
  font-size: 16px;
}

.meta {
  font-size: 13px;
  color: var(--text-muted);
}

.price {
  font-weight: 600;
  color: var(--gold);
}

/* ===============================
   TOTALES
================================ */
.totals {
  margin-top: 25px;
  border-top: 1px dashed var(--border);
  padding-top: 20px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.total {
  font-size: 18px;
  color: var(--gold);
}

#total.animar {
    animation: pop 0.4s ease;
}

@keyframes pop {
    0% {
        transform: scale(1);
        color: #c7a16b;
    }
    50% {
        transform: scale(1.15);
        color: #e7c896;
    }
    100% {
        transform: scale(1);
    }
}

#mensaje-descuento,
#mensaje-incentivo {
    margin-top: 10px;
    font-size: 15px;
    color: #c7a16b;
}

/* ===============================
   PAGOS
================================ */
.payment-methods {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
}

.pm {
  font-size: 14px;
  cursor: pointer;
}

.pay-section {
  margin-top: 20px;
}

/* ===============================
   BOTONES
================================ */
.primary {
  padding: 14px 34px;
  background: linear-gradient(135deg, var(--gold), #b08950);
  color: #111;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}

.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(199,161,107,.4);
}

.ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

/* ===============================
   ASIDE
================================ */
.checkout-right section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 25px;
}
/* ================= MODALES (BASE) ================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 9999;
  padding: 20px;
}

/* Contenedor del modal */
.modal-content {
  background: #f7f3ef; /* crema café */
  color: #3b2a1a;
  max-width: 820px;
  margin: auto;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalFade 0.35s ease;
}

/* Animación */
@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Botón cerrar */
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #7a5a3a;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: #2a1b10;
  transform: scale(1.1);
}

/* Tipografía */
.modal-content h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  font-family: "Georgia", serif;
  color: #2a1b10;
}

.modal-content h3 {
  font-size: 1.2rem;
  margin-top: 22px;
  margin-bottom: 8px;
  color: #5a3b1e;
}

.modal-content p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 10px;
  color: #3b2a1a;
}

/* Scrollbar */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c2a37c;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: #eee;
}

/* ===== MODAL CONTACTO ===== */

.modal-content.contacto {
  max-width: 420px;
  text-align: center;
}

.contacto-texto {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.btn-whatsapp {
  display: block;
  background: #25d366;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: scale(1.03);
}

.correo-link {
  display: block;
  color: #5a3b1e;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 18px;
}

.correo-link:hover {
  text-decoration: underline;
}

.horario {
  font-size: 0.85rem;
  color: #555;
}

/* ===============================
   FOOTER
================================ */
.site-footer {
  text-align: center;
  padding: 25px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  .checkout {
    grid-template-columns: 1fr;
  }

  .checkout-left {
    padding: 35px 25px;
  }
}
