/* =====================================================================
   Tienda: cursos y eventos
   ===================================================================== */

/* ---------- Imagen con respaldo ---------- */
.media-fallback {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #0d3a7a 0%, transparent 55%), linear-gradient(140deg, #0f2a5a 0%, #060a14 100%);
  display: grid; place-items: center; text-align: center;
}
.media-fallback span { font-family: var(--font-title); font-size: 1.8rem; text-transform: uppercase; color: rgba(255,255,255,.85); padding: 1.5rem; line-height: 1.05; }
.media-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contadores ---------- */
.countdown { display: flex; gap: .6rem; }
.countdown div { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .4rem; min-width: 64px; text-align: center; }
.countdown strong { display: block; font-family: var(--font-title); font-size: 2.3rem; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .66rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.inline-timer { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inline-timer b { font-weight: 600; }

.pay-methods { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 1rem; }
.pay-methods span { font-size: .7rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); }

/* Botón de compra con borde (estilo referencia) */
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 11px 26px; border-radius: 50px; border: 1.5px solid #fff;
  background: transparent; color: #fff; font-family: var(--font-body); font-size: .95rem; font-weight: 500;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-buy:hover { background: var(--copper); border-color: var(--copper); color: #fff; }
.btn-buy.solid { background: var(--copper); border-color: var(--copper); }
.btn-buy.solid:hover { background: var(--copper-2); border-color: var(--copper-2); }

/* =====================================================================
   PÁGINA DE CURSOS
   ===================================================================== */
body.shop { background: #050913; }
.shop .header { background: #050913; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.shop .header .nav a { font-size: .9rem; }

.shop-main { padding: 110px 0 90px; min-height: 100vh; }
.shop-title { margin-bottom: 2.5rem; }
.shop-title h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.shop-title h1 em { font-style: normal; color: var(--copper); }
.shop-title p { max-width: 600px; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.filters button { padding: 8px 18px; border-radius: 50px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--text); font-family: var(--font-body); font-size: .88rem; cursor: pointer; }
.filters button.active, .filters button:hover { background: #fff; color: #000; border-color: #fff; }

/* Listado */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem 1.6rem; }
.course { cursor: pointer; }
.course .thumb { aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; position: relative; margin-bottom: 1.1rem; transition: transform .3s; }
.course:hover .thumb { transform: translateY(-4px); }
.course .thumb .media-fallback { position: absolute; inset: 0; }
.course .badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--copper); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 4px 11px; border-radius: 50px; }
.course h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.35; }
.course .desc { font-size: .88rem; color: #c9ccd4; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course .foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.course .was { color: #fff; text-decoration: line-through; font-size: .85rem; font-weight: 600; }
.course .timer { font-size: .78rem; color: var(--copper-2); margin-top: .7rem; }

/* Vista del curso (imagen izquierda / pago derecha) */
.back-link { display: inline-flex; gap: .4rem; color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; background: none; border: 0; cursor: pointer; font-family: var(--font-body); }
.back-link:hover { color: #fff; }
.course-view { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); grid-template-areas: "img side" "body side"; gap: 1.6rem 1.6rem; align-items: start; }
.cv-image { grid-area: img; }
.cv-body { grid-area: body; }
.side { grid-area: side; }
.cv-image { aspect-ratio: 16/10; border-radius: 18px; overflow: hidden; box-shadow: 0 25px 60px rgba(255,255,255,.05); }
.cv-image .media-fallback { width: 100%; height: 100%; }
.cv-image .media-fallback span { font-size: clamp(2rem, 4vw, 3.2rem); }
.cv-body { margin-top: 2.5rem; }
.cv-body h2 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1.5rem; font-weight: 700; margin: 2rem 0 .8rem; }
.cv-body h2:first-child { margin-top: 0; }
.cv-body p { color: #c9ccd4; margin-bottom: .8rem; }
.modules { list-style: none; display: grid; gap: .6rem; counter-reset: m; }
.modules li { counter-increment: m; background: #0c1628; border: 1px solid rgba(50,153,254,.15); border-radius: 12px; padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; color: var(--text); }
.modules li::before { content: counter(m, decimal-leading-zero); font-family: var(--font-title); font-size: 1.6rem; color: var(--copper); line-height: 1; }

.pay-card { background: #0f1a2e; border-radius: 18px; padding: 1.8rem 1.8rem 2rem; position: sticky; top: 90px; }
.pay-card .rec { color: #4fd8ff; font-size: .88rem; display: flex; align-items: center; gap: .4rem; margin-bottom: .9rem; }
.pay-card h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.4; margin-bottom: 1rem; }
.pay-card .price { font-family: var(--font-body); font-size: 2.3rem; font-weight: 700; color: #fff; line-height: 1.1; }
.pay-card .was { color: var(--muted); text-decoration: line-through; font-size: 1.2rem; font-weight: 600; }
.pay-card .save { display: inline-block; margin-left: .6rem; background: rgba(39,174,96,.15); color: #4cd685; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; vertical-align: middle; text-decoration: none; }
.pay-card .tier-box { background: rgba(50,153,254,.12); border: 1px solid rgba(50,153,254,.35); border-radius: 12px; padding: .9rem; margin: 1.2rem 0 .4rem; }
.pay-card .tier-box p { font-size: .82rem; color: #9fd4ff; margin-bottom: .6rem; text-align: center; }
.pay-card .tier-box .countdown div { min-width: 0; padding: .45rem .2rem; }
.pay-card .tier-box .countdown strong { font-size: 1.6rem; }
.pay-card dl { margin: 1.3rem 0; display: grid; gap: 1.1rem; }
.pay-card dt { color: #fff; font-weight: 600; font-size: .92rem; margin-bottom: .2rem; }
.pay-card dd { color: #c9ccd4; font-size: .9rem; padding-left: 1rem; }
.pay-card dd ul { list-style: none; display: grid; gap: .2rem; }
.pay-card dd li::before { content: "✓ "; color: #fff; }
.pay-card .btn-buy { width: 100%; padding: 13px; }
.pay-card .secure { text-align: center; font-size: .78rem; color: var(--muted); margin-top: .8rem; }
.help-card { background: #0f1a2e; border-radius: 18px; padding: 1.4rem 1.8rem; margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.help-card p { font-size: .88rem; color: #c9ccd4; }
.help-card a { background: #25d366; color: #fff; padding: 8px 16px; border-radius: 50px; font-size: .85rem; white-space: nowrap; }
.side, .side .pay-card { position: static; }
@media (min-height: 1000px) and (min-width: 1001px) { .side { position: sticky; top: 90px; } }

/* Lecciones del curso: lista de botones; el video se despliega debajo del botón */
.lesson-list { list-style: none; background: #0c1628; border: 1px solid rgba(50,153,254,.15); border-radius: 16px; overflow: hidden; }
.lesson { border-bottom: 1px solid var(--line); }
.lesson:last-child { border-bottom: 0; }
.lesson-btn {
  width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left;
  padding: 1.05rem 1.4rem; background: transparent; border: 0;
  color: var(--text); font-family: var(--font-body); font-size: .95rem; cursor: pointer; transition: background .2s;
}
.lesson-btn:hover { background: rgba(50,153,254,.08); }
.lesson.open .lesson-btn { background: rgba(50,153,254,.16); box-shadow: inset 3px 0 0 var(--copper); }
.lesson-btn .n { font-family: var(--font-title); font-size: 1.6rem; color: var(--copper); line-height: 1; min-width: 2ch; }
.lesson-btn .t { flex: 1; font-weight: 500; }
.lesson-btn .ic {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; color: #fff; background: rgba(50,153,254,.2); transition: transform .3s, background .2s;
}
.lesson.open .lesson-btn .ic { background: var(--copper); transform: rotate(90deg); }
.lesson-panel { padding: 0 1.4rem 1.4rem; animation: lessonIn .35s ease; }
.lesson-panel .video { border-radius: 12px; }
.lesson-panel .video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.lesson-link { margin-top: 1rem; padding: 11px 22px; font-size: .9rem; }
@keyframes lessonIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .lesson-btn { padding: .9rem 1rem; gap: .7rem; font-size: .9rem; }
  .lesson-panel { padding: 0 .8rem 1rem; }
}

.video .locked { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; font-size: 2rem; background: linear-gradient(150deg, #13284d 0%, #0a1324 100%); }
.video .locked strong { font-size: 1.1rem; color: #fff; }
.video .locked span { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.video .empty { font-size: .95rem; line-height: 1.8; }

/* =====================================================================
   PÁGINA DE EVENTOS
   ===================================================================== */
.ev-hero { padding: 150px 0 90px; background: radial-gradient(circle at 85% 20%, #0d3a7a 0%, transparent 45%), radial-gradient(circle at 10% 90%, #1f2a44 0%, transparent 50%), var(--bg); }
.ev-hero .grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.ev-live { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; color: #fff; background: rgba(235,87,87,.15); border: 1px solid rgba(235,87,87,.4); padding: 5px 14px; border-radius: 50px; margin-bottom: 1.2rem; }
.ev-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #eb5757; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ev-hero h1 { font-size: clamp(3rem, 7.5vw, 5.6rem); margin-bottom: .6rem; }
.ev-hero .sub { font-size: 1.2rem; color: #c9ccd4; margin-bottom: 1.6rem; }
.ev-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.2rem; }
.ev-facts span { background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; font-size: .9rem; color: var(--text); }
.ev-start-label { font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.ev-hero .countdown { max-width: 480px; }
.ev-hero .countdown div { padding: 1rem .5rem; }
.ev-hero .countdown strong { font-size: 3.2rem; }
.ev-hero .lead { margin-top: 2rem; }

.ticket { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem; box-shadow: var(--shadow); }
.ticket .poster { aspect-ratio: 16/9; border-radius: 12px; margin-bottom: 1.4rem; }
.ticket h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.tiers { list-style: none; display: grid; gap: .55rem; margin-bottom: 1.3rem; }
.tiers li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.tiers li .tn strong { display: block; color: #fff; font-weight: 500; }
.tiers li .tn small { font-size: .78rem; color: var(--muted); }
.tiers li .tp { font-family: var(--font-title); font-size: 1.9rem; color: #fff; line-height: 1; }
.tiers li.past { opacity: .4; }
.tiers li.past .tp { text-decoration: line-through; }
.tiers li.current { border: 2px solid var(--copper); background: rgba(50,153,254,.1); }
.tiers li.current .tn small { color: var(--copper-2); font-weight: 500; }
.tiers .tag { font-size: .62rem; text-transform: uppercase; letter-spacing: 1.5px; background: var(--copper); color: #fff; padding: 2px 8px; border-radius: 50px; margin-left: .4rem; vertical-align: middle; }
.price-up { text-align: center; background: rgba(235,87,87,.1); border: 1px solid rgba(235,87,87,.3); border-radius: 12px; padding: .9rem; margin-bottom: 1.2rem; }
.price-up p { color: #f3b1b1; font-size: .86rem; margin-bottom: .6rem; }
.price-up .countdown { gap: .4rem; }
.price-up .countdown div { min-width: 0; padding: .45rem .2rem; }
.price-up .countdown strong { font-size: 1.6rem; }
.ticket .btn { width: 100%; justify-content: center; }
.ticket .small { text-align: center; font-size: .8rem; margin-top: .8rem; }

.ev-section { padding: 90px 0; }
.ev-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.ev-highlights .card { padding: 1.8rem 1.5rem; }
.ev-highlights .icon { font-size: 2rem; margin-bottom: 1rem; }
.ev-highlights h4 { font-size: 1.35rem; margin-bottom: .4rem; }
.ev-highlights p { font-size: .9rem; }

.agenda { list-style: none; max-width: 760px; margin: 2.5rem auto 0; position: relative; }
.agenda::before { content: ""; position: absolute; left: 112px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.agenda li { display: grid; grid-template-columns: 100px 1fr; gap: 2.2rem; padding: .9rem 0; position: relative; }
.agenda li::before { content: ""; position: absolute; left: 106px; top: 1.3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px var(--bg-2); }
.agenda time { text-align: right; color: var(--gold); font-weight: 600; font-size: .95rem; padding-top: .1rem; }
.agenda span { color: var(--text); font-size: 1.02rem; }

.ev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; margin-top: 2.5rem; }
.ev-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ev-card .media-fallback { aspect-ratio: 16/9; }
.ev-card .b { padding: 1.4rem; }
.ev-card .d { font-size: .8rem; color: var(--gold); }
.ev-card h3 { font-size: 1.5rem; margin: .3rem 0 1rem; }
.ev-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ev-card .foot strong { font-family: var(--font-title); font-size: 1.8rem; color: #fff; }

.ev-empty { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; }

.sticky-buy {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: rgba(6,10,20,.97); border-top: 1px solid var(--line); padding: 12px 16px;
  align-items: center; justify-content: space-between; gap: 1rem;
}
.sticky-buy strong { font-family: var(--font-title); font-size: 1.8rem; color: #fff; line-height: 1; display: block; }
.sticky-buy small { font-size: .75rem; color: var(--muted); }
.sticky-buy .btn { padding: 12px 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .course-view { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "side" "body"; }
  .side, .pay-card { position: static; }
  .ev-hero .grid { grid-template-columns: minmax(0, 1fr); }
  .ticket { position: static; }
  .ev-highlights { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sticky-buy { display: flex; }
  body.has-sticky .whatsapp-float { bottom: 100px; }
  .sticky-buy .btn { white-space: nowrap; }
  body.has-sticky .footer { padding-bottom: 100px; }
}
@media (max-width: 600px) {
  .course-grid, .ev-highlights { grid-template-columns: 1fr; }
  .countdown { gap: .35rem; }
  .countdown div { min-width: 0; }
  .ev-hero .countdown strong { font-size: 2.3rem; }
  .agenda::before { left: 7px; }
  .agenda li { grid-template-columns: 1fr; gap: .1rem; padding-left: 2rem; }
  .agenda li::before { left: 0; }
  .agenda time { text-align: left; }
  .help-card { flex-direction: column; text-align: center; }
}
