/* ============================================================
   Tienda MusicFestPeru — estilos de la ticketera pública
   Mobile-first, marca morada consistente con el panel (#7625f2)
   ============================================================ */
:root {
    --tk-brand:   #7625f2;
    --tk-brand-2: #a855f7;
    --tk-dark:    #14111f;
    --tk-dark-2:  #1d1830;
    --tk-text:    #e5e1f0;
    --tk-muted:   #9b93b3;
    --tk-border:  rgba(255,255,255,0.09);
    --tk-ok:      #22c55e;
    --tk-warn:    #f59e0b;
}

.tk-body {
    margin: 0;
    background:
        radial-gradient(70% 50% at 15% 0%, rgba(118,37,242,0.22) 0%, transparent 55%),
        radial-gradient(70% 50% at 85% 0%, rgba(168,85,247,0.14) 0%, transparent 55%),
        linear-gradient(180deg, var(--tk-dark) 0%, #0d0a16 100%);
    color: var(--tk-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Navbar ===== */
.tk-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(20,17,31,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tk-border);
    padding: 0.65rem 1rem;
}
.tk-nav-inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; gap: 1rem;
}
.tk-brand {
    display: flex; align-items: center; gap: 0.55rem;
    color: #fff; font-weight: 800; font-size: 1.05rem;
    text-decoration: none; white-space: nowrap;
}
.tk-brand:hover { color: #fff; }
.tk-brand-ic {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--tk-brand), var(--tk-brand-2));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    box-shadow: 0 6px 18px -4px rgba(118,37,242,0.6);
}
.tk-search {
    flex: 1; display: flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--tk-border);
    border-radius: 999px; padding: 0.45rem 1rem;
    max-width: 480px;
}
.tk-search i { color: var(--tk-muted); }
.tk-search input {
    flex: 1; background: transparent; border: 0; outline: 0;
    color: var(--tk-text); font-size: 0.9rem;
}
.tk-search-mobile { margin: 0.6rem auto 0; max-width: none; }
.tk-nav-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.tk-icon-btn {
    position: relative;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--tk-border);
    color: #fff; font-size: 1.05rem;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; cursor: pointer;
    transition: all 0.15s;
}
.tk-icon-btn:hover { background: rgba(118,37,242,0.25); border-color: rgba(118,37,242,0.5); color: #fff; }
.tk-cart-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px; border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; font-size: 0.66rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* ===== Main ===== */
.tk-main { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ===== Hero home ===== */
.tk-hero { text-align: center; padding: 1.5rem 0 2rem; }
.tk-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; color: #fff;
    margin-bottom: 0.5rem;
}
.tk-hero h1 span {
    background: linear-gradient(90deg, var(--tk-brand-2), #6366f1);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tk-hero p { color: var(--tk-muted); font-size: 1rem; }

/* ===== Grid de eventos ===== */
.tk-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.tk-card {
    background: linear-gradient(180deg, rgba(29,24,48,0.9), rgba(20,17,31,0.9));
    border: 1px solid var(--tk-border);
    border-radius: 16px; overflow: hidden;
    text-decoration: none; color: var(--tk-text);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    display: flex; flex-direction: column;
}
.tk-card:hover {
    transform: translateY(-4px);
    border-color: rgba(118,37,242,0.5);
    box-shadow: 0 18px 40px -14px rgba(118,37,242,0.45);
    color: var(--tk-text);
}
.tk-card-img {
    aspect-ratio: 4 / 5; width: 100%; object-fit: cover;
    background: #241d3d; display: block;
}
.tk-card-img-empty {
    aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
    color: var(--tk-muted); font-size: 2.2rem; background: #241d3d;
}
.tk-card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.tk-card-date {
    font-size: 0.74rem; font-weight: 700; color: var(--tk-brand-2);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.tk-card-title { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.3; }
.tk-card-loc { font-size: 0.8rem; color: var(--tk-muted); display: flex; align-items: center; gap: 0.3rem; }
.tk-card-price { margin-top: auto; padding-top: 0.5rem; font-weight: 700; color: #fff; font-size: 0.92rem; }
.tk-card-price .tk-free { color: var(--tk-ok); }

/* ===== Detalle de evento ===== */
.tk-detail { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tk-detail { grid-template-columns: 380px 1fr; align-items: start; } }
.tk-detail-flyer {
    width: 100%; border-radius: 18px; border: 1px solid var(--tk-border);
    box-shadow: 0 20px 50px -18px rgba(0,0,0,0.7);
}
.tk-detail h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: #fff; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.75rem 0 1rem; }
.tk-meta-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(255,255,255,0.06); border: 1px solid var(--tk-border);
    border-radius: 999px; padding: 0.4rem 0.85rem;
    font-size: 0.82rem; color: var(--tk-text);
}
.tk-meta-chip i { color: var(--tk-brand-2); }
.tk-desc { color: var(--tk-muted); font-size: 0.92rem; line-height: 1.6; }

/* Zonas / tipos de entrada */
.tk-tipos { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1rem; }
.tk-tipo {
    display: flex; align-items: center; gap: 0.85rem;
    background: rgba(255,255,255,0.045);
    border: 1px solid var(--tk-border);
    border-left: 5px solid var(--tk-brand);
    border-radius: 14px; padding: 0.85rem 1rem;
}
.tk-tipo.tk-agotado { opacity: 0.55; }
.tk-tipo-info { flex: 1; min-width: 0; }
.tk-tipo-nombre { font-weight: 700; color: #fff; font-size: 0.95rem; }
.tk-tipo-fase {
    display: inline-block; margin-left: 0.4rem;
    font-size: 0.66rem; font-weight: 800; text-transform: uppercase;
    background: rgba(245,158,11,0.18); color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.4);
    padding: 0.1rem 0.5rem; border-radius: 999px;
}
.tk-tipo-sub { font-size: 0.75rem; color: var(--tk-muted); margin-top: 2px; }
.tk-tipo-precio { font-weight: 800; color: #fff; white-space: nowrap; }
.tk-stepper { display: inline-flex; align-items: center; gap: 0.15rem; }
.tk-stepper button {
    width: 30px; height: 30px; border-radius: 8px;
    background: rgba(255,255,255,0.08); border: 1px solid var(--tk-border);
    color: #fff; font-weight: 700; cursor: pointer;
}
.tk-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.tk-stepper input {
    width: 40px; text-align: center; background: transparent; border: 0;
    color: #fff; font-weight: 700; font-size: 0.95rem;
}
.tk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: linear-gradient(135deg, var(--tk-brand), #6366f1);
    color: #fff; font-weight: 700; font-size: 0.95rem;
    border: 0; border-radius: 12px; padding: 0.8rem 1.6rem;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 10px 26px -8px rgba(118,37,242,0.65);
    transition: filter 0.15s, transform 0.05s;
}
.tk-btn:hover { filter: brightness(1.12); color: #fff; }
.tk-btn:active { transform: scale(0.98); }
.tk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tk-btn-outline {
    background: transparent; border: 1px solid rgba(118,37,242,0.6);
    box-shadow: none; color: var(--tk-brand-2);
}
.tk-btn-outline:hover { background: rgba(118,37,242,0.12); color: var(--tk-brand-2); }
.tk-badge-agotado {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    background: rgba(239,68,68,0.15); color: #f87171;
    border: 1px solid rgba(239,68,68,0.4);
    padding: 0.25rem 0.7rem; border-radius: 999px;
}
.tk-badge-quedan {
    font-size: 0.68rem; font-weight: 700;
    background: rgba(245,158,11,0.15); color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.35);
    padding: 0.2rem 0.6rem; border-radius: 999px;
}

/* ===== Carrito / checkout ===== */
.tk-panel {
    background: linear-gradient(180deg, rgba(29,24,48,0.9), rgba(20,17,31,0.9));
    border: 1px solid var(--tk-border);
    border-radius: 16px; padding: 1.25rem;
}
.tk-panel h5 { color: #fff; font-weight: 700; }
.tk-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.92rem; }
.tk-line + .tk-line { border-top: 1px dashed var(--tk-border); }
.tk-line .tk-k { color: var(--tk-muted); }
.tk-line .tk-v { color: #fff; font-weight: 600; text-align: right; }
.tk-total { font-size: 1.15rem; font-weight: 800; color: #fff; }
.tk-countdown {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: rgba(245,158,11,0.13); border: 1px solid rgba(245,158,11,0.4);
    color: #fbbf24; font-weight: 700; font-size: 0.85rem;
    border-radius: 999px; padding: 0.4rem 0.9rem;
}
.tk-form label { font-size: 0.82rem; font-weight: 600; color: var(--tk-muted); margin-bottom: 0.25rem; }
.tk-form .form-control, .tk-form .form-select {
    background: rgba(255,255,255,0.05); border: 1px solid var(--tk-border);
    color: #fff; border-radius: 10px; padding: 0.6rem 0.85rem;
}
.tk-form .form-control:focus, .tk-form .form-select:focus {
    background: rgba(255,255,255,0.08); border-color: var(--tk-brand-2);
    box-shadow: 0 0 0 3px rgba(118,37,242,0.25); color: #fff;
}
.tk-form .form-control::placeholder { color: rgba(255,255,255,0.3); }
.tk-form .form-check-input { background: rgba(255,255,255,0.1); border-color: var(--tk-border); }
.tk-form .form-check-input:checked { background-color: var(--tk-brand); border-color: var(--tk-brand); }
.tk-form .form-check-label { font-size: 0.85rem; color: var(--tk-text); }
.tk-form .form-check-label a { color: var(--tk-brand-2); }

/* ===== Alertas tienda ===== */
.tk-alert {
    border-radius: 12px; padding: 0.85rem 1.1rem; font-size: 0.9rem;
    border: 1px solid transparent; margin-bottom: 1rem;
}
.tk-alert-ok   { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.4); color: #4ade80; }
.tk-alert-err  { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); color: #f87171; }
.tk-alert-info { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.4); color: #a5b4fc; }

/* ===== Páginas legales ===== */
.tk-legal { max-width: 820px; margin: 0 auto; }
.tk-legal h1 { color: #fff; font-size: 1.6rem; font-weight: 800; margin-bottom: 1rem; }
.tk-legal h2 { color: #fff; font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.tk-legal p, .tk-legal li { color: var(--tk-muted); font-size: 0.92rem; line-height: 1.7; }

/* ===== Footer ===== */
.tk-footer { border-top: 1px solid var(--tk-border); background: rgba(13,10,22,0.9); margin-top: 2rem; }
.tk-footer-inner {
    max-width: 1180px; margin: 0 auto; padding: 2rem 1rem;
    display: grid; gap: 1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .tk-footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.tk-footer-col h6 { color: #fff; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.7rem; }
.tk-footer-col a { display: block; color: var(--tk-muted); text-decoration: none; font-size: 0.86rem; padding: 0.22rem 0; }
.tk-footer-col a:hover { color: var(--tk-brand-2); }
.tk-brand-footer { margin-bottom: 0.6rem; }
.tk-footer-tag { color: var(--tk-muted); font-size: 0.85rem; max-width: 340px; }
.tk-libro-link { color: #fbbf24 !important; font-weight: 600; }
.tk-footer-bottom {
    text-align: center; color: var(--tk-muted); font-size: 0.78rem;
    padding: 1rem; border-top: 1px solid var(--tk-border);
}

/* ===== Tickets del cliente ===== */
.tk-ticket-qr { background: #fff; border-radius: 12px; padding: 8px; width: 150px; height: 150px; }

/* ===== Tabla responsive tienda ===== */
.tk-table-wrap { overflow-x: auto; }
.tk-table { width: 100%; color: var(--tk-text); font-size: 0.88rem; border-collapse: collapse; }
.tk-table th { color: var(--tk-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--tk-border); }
.tk-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* ===== Barra de pasos de compra (Vaope-style) ===== */
.tk-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin: 0.25rem auto 1.5rem; max-width: 720px;
    padding: 0.5rem 0;
}
.tk-step { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 70px; }
.tk-step-dot {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); border: 2px solid var(--tk-border);
    color: var(--tk-muted); font-size: 1rem;
    transition: all 0.25s;
}
.tk-step-label { font-size: 0.7rem; font-weight: 700; color: var(--tk-muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.tk-step-active .tk-step-dot {
    background: linear-gradient(135deg, var(--tk-brand), #6366f1);
    border-color: transparent; color: #fff;
    box-shadow: 0 0 0 5px rgba(118,37,242,0.22), 0 8px 22px -6px rgba(118,37,242,0.7);
    animation: tkStepPulse 2s ease-in-out infinite;
}
.tk-step-active .tk-step-label { color: #fff; }
.tk-step-done .tk-step-dot {
    background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.55); color: var(--tk-ok);
}
.tk-step-done .tk-step-label { color: var(--tk-ok); }
.tk-step-line {
    flex: 1; height: 2px; margin: 0 0.35rem;
    background: var(--tk-border); align-self: flex-start;
    margin-top: 19px; min-width: 24px; border-radius: 2px;
    transition: background 0.25s;
}
.tk-step-line-done { background: linear-gradient(90deg, rgba(34,197,94,0.7), rgba(34,197,94,0.35)); }
@keyframes tkStepPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(118,37,242,0.22), 0 8px 22px -6px rgba(118,37,242,0.7); }
    50%       { box-shadow: 0 0 0 9px rgba(118,37,242,0.10), 0 8px 22px -6px rgba(118,37,242,0.7); }
}
@media (max-width: 560px) {
    .tk-step { min-width: 54px; }
    .tk-step-label { font-size: 0.6rem; }
    .tk-step-dot { width: 34px; height: 34px; font-size: 0.85rem; }
    .tk-step-line { margin-top: 16px; }
}

/* ===== Carrusel de banners home ===== */
.tk-slider { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 1.75rem;
    border: 1px solid var(--tk-border); box-shadow: 0 18px 50px -18px rgba(0,0,0,0.7); }
.tk-slide { display: none; }
.tk-slide.tk-slide-on { display: block; animation: tkSlideIn 0.55s ease; }
.tk-slide img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; display: block; }
@media (max-width: 640px) { .tk-slide img { aspect-ratio: 16 / 9; } }
@keyframes tkSlideIn { from { opacity: 0.35; } to { opacity: 1; } }
.tk-slider-dots {
    position: absolute; bottom: 12px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px;
}
.tk-slider-dot {
    width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255,255,255,0.45); transition: all 0.2s;
}
.tk-slider-dot.tk-on { background: #fff; width: 24px; border-radius: 99px; }
.tk-slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(0,0,0,0.45); color: #fff; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); transition: background 0.15s;
}
.tk-slider-nav:hover { background: rgba(118,37,242,0.8); }
.tk-slider-prev { left: 12px; }
.tk-slider-next { right: 12px; }

/* ===== Ojito de contraseña ===== */
.tk-pass-wrap { position: relative; }
.tk-pass-wrap input { padding-right: 2.8rem !important; }
.tk-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: transparent; border: 0; color: var(--tk-muted);
    font-size: 1rem; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.tk-eye:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ===== Mapa de zonas interactivo ===== */
.tk-mapa-wrap {
    position: relative; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--tk-border);
    box-shadow: 0 16px 44px -16px rgba(0,0,0,0.65);
    margin: 1rem 0;
}
.tk-mapa-wrap img { width: 100%; display: block; }
.tk-mapa-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tk-zona {
    cursor: pointer;
    fill-opacity: 0.45; stroke-width: 2px; vector-effect: non-scaling-stroke;
    transition: fill-opacity 0.15s;
}
.tk-zona:hover { fill-opacity: 0.72; }
.tk-zona.tk-zona-sel { fill-opacity: 0.8; stroke-width: 3px; }
.tk-zona.tk-zona-off { cursor: not-allowed; fill: #555 !important; stroke: #777 !important; fill-opacity: 0.55; }
.tk-mapa-hint {
    font-size: 0.8rem; color: var(--tk-muted); text-align: center; margin-top: -0.5rem; margin-bottom: 1rem;
}
.tk-tipo-flash { animation: tkTipoFlash 1.2s ease 2; }
@keyframes tkTipoFlash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(118,37,242,0.8); }
}

/* FIX: opciones de los <select> del checkout se veían transparentes
   (el desplegable nativo usaba texto blanco sobre fondo claro) */
.tk-form .form-select { color-scheme: dark; }
.tk-form .form-select option { background: #1d1830; color: #fff; }
