/* ═══════════════════════════════════════════════════════
   REDIRECT PAGE — TemuFinds
   Premium redirect / loading experience
   ═══════════════════════════════════════════════════════ */

.redir-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-xl) var(--sp-md);
}

/* ─── Wrapper ─────────────────────────────────────────── */

.redir-wrap {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-lg);
    animation: fadeInUp 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

/* ─── Top Brand Bar ───────────────────────────────────── */

.redir-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-sm);
}

.redir-topbar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color var(--t-fast);
}

.redir-topbar__brand:hover { color: var(--text-primary); }

.redir-topbar__logo {
    width: 28px; height: 28px;
    background: var(--grad-brand);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}

.redir-topbar__logo svg {
    width: 15px; height: 15px;
    color: white;
}

/* ─── Main Card ───────────────────────────────────────── */

.redir-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(17,24,39,0.97) 0%, rgba(13,17,32,0.99) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--r-2xl);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.08);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    position: relative;
}

.redir-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.6), rgba(139,92,246,0.4), transparent);
}

/* ─── Product Image ───────────────────────────────────── */

.redir-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-muted);
    overflow: hidden;
}

.redir-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--sp-lg);
    animation: redir-img-in 0.6s ease-out 0.2s both;
}

@keyframes redir-img-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.redir-img-fallback {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-muted) 0%, var(--bg-card) 100%);
}

.redir-img-fallback svg {
    width: 64px; height: 64px;
    color: var(--text-dim);
    opacity: 0.3;
}

.redir-img-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(8,11,20,0.82);
    backdrop-filter: blur(10px);
    color: var(--primary-light);
    padding: 5px 12px;
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(99,102,241,0.3);
    letter-spacing: 0.04em;
}

/* Overlay gradient on image bottom */
.redir-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(13,17,32,0.85) 0%, transparent 100%);
    pointer-events: none;
}

/* ─── Product Info ────────────────────────────────────── */

.redir-info {
    padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
}

.redir-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-lg);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Status Row ──────────────────────────────────────── */

.redir-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--sp-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.redir-status__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 0 0 rgba(99,102,241,0.5);
    animation: redir-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes redir-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(99,102,241,0); }
    100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}

/* ─── Progress Bar ────────────────────────────────────── */

.redir-progress {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--r-full);
    overflow: hidden;
    margin-bottom: var(--sp-sm);
}

.redir-progress__bar {
    height: 100%;
    width: 0%;
    background: var(--grad-brand);
    border-radius: var(--r-full);
    animation: redir-fill linear forwards;
    box-shadow: 0 0 10px rgba(99,102,241,0.6);
}

@keyframes redir-fill {
    from { width: 0%; }
    to   { width: 100%; }
}

.redir-countdown {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.redir-countdown span {
    color: var(--primary-light);
    font-weight: 700;
}

/* ─── Manual Button ───────────────────────────────────── */

.redir-manual-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 var(--sp-xl) var(--sp-xl);
    padding: 0.85rem 1.5rem;
    background: var(--grad-brand);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--r-lg);
    text-decoration: none;
    transition: all var(--t-base);
    letter-spacing: 0.01em;
    box-shadow: 0 6px 24px rgba(99,102,241,0.4);
    position: relative;
    overflow: hidden;
}

.redir-manual-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 55%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.redir-manual-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(99,102,241,0.55);
}

.redir-manual-btn:hover::before { opacity: 1; }

.redir-manual-btn svg {
    width: 17px; height: 17px;
    flex-shrink: 0;
}

/* ─── Footer Note ─────────────────────────────────────── */

.redir-footer-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
    opacity: 0.7;
}

/* ─── Error Card ──────────────────────────────────────── */

.redir-card--error {
    padding: var(--sp-2xl) var(--sp-xl);
    text-align: center;
}

.redir-error-icon {
    width: 68px; height: 68px;
    margin: 0 auto var(--sp-lg);
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F87171;
}

.redir-error-icon svg { width: 32px; height: 32px; }

.redir-error-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--sp-sm);
    letter-spacing: -0.02em;
}

.redir-error-msg {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--sp-xl);
}

.redir-error-actions {
    display: flex;
    gap: var(--sp-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.redir-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.7rem 1.3rem;
    border-radius: var(--r-lg);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--t-base);
}

.redir-btn svg { width: 16px; height: 16px; }

.redir-btn--primary {
    background: var(--grad-brand);
    color: white;
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

.redir-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.5);
}

.redir-btn--ghost {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

.redir-btn--ghost:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
}

/* ─── Mobile ──────────────────────────────────────────── */

@media (max-width: 480px) {
    .redir-body { padding: var(--sp-md); justify-content: flex-start; padding-top: 12vh; }
    .redir-title { font-size: 1.1rem; }
    .redir-info { padding: var(--sp-lg) var(--sp-lg) var(--sp-md); }
    .redir-manual-btn { margin: 0 var(--sp-lg) var(--sp-lg); }
    .redir-card--error { padding: var(--sp-xl) var(--sp-lg); }
}
