/* ============================================
   SALE TRACKER STYLES
   ============================================ */

.tracker-page {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 32px) 0 64px;
    background: var(--color-bg);
}
.tracker-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Lookup --- */
.tracker-lookup {
    text-align: center;
    padding: 48px 0 56px;
}
.tracker-lookup h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 12px;
}
.tracker-lookup > .tracker-lookup__content > p {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 28px;
}
.tracker-lookup__form {
    display: flex;
    gap: 8px;
    max-width: 460px;
    margin: 0 auto 16px;
}
.tracker-lookup__form input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color 0.2s;
}
.tracker-lookup__form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
    outline: none;
}
.tracker-lookup__help {
    font-size: 13px;
    color: var(--color-light);
}
.tracker-lookup__help a {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Tracker Header --- */
.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.tracker-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}
.tracker-header__ref {
    font-size: 13px;
    color: var(--color-muted);
}
.tracker-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}
.tracker-status--active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.tracker-status--active::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Timeline --- */
.tracker-timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}
.tracker-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.tracker-step {
    position: relative;
    padding-bottom: 32px;
}
.tracker-step:last-child {
    padding-bottom: 0;
}

/* Marker */
.tracker-step__marker {
    position: absolute;
    left: -40px;
    top: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 13px;
    font-weight: 700;
}

/* Completed step */
.tracker-step.completed .tracker-step__marker {
    background: var(--color-primary);
    color: #fff;
}

/* Active step */
.tracker-step.active .tracker-step__marker {
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
}
.tracker-step__pulse {
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: stepPulse 2s ease-in-out infinite;
}
@keyframes stepPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
}

/* Upcoming step */
.tracker-step.upcoming .tracker-step__marker {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    color: var(--color-light);
}

/* Content */
.tracker-step__content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}
.tracker-step.active .tracker-step__content {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.08);
}
.tracker-step.upcoming .tracker-step__content {
    opacity: 0.6;
}
.tracker-step__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.tracker-step__header h3 {
    font-size: 16px;
    font-weight: 700;
}
.tracker-step__date {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-muted);
}
.tracker-step.active .tracker-step__date {
    color: var(--color-primary);
    font-weight: 600;
}
.tracker-step__content > p {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.6;
}
.tracker-step__detail {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text);
}
.tracker-step__detail strong {
    color: var(--color-dark);
}

/* Checklist */
.tracker-step__checklist {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tracker-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}
.tracker-check.done {
    color: var(--color-primary);
}
.tracker-check.done svg {
    color: var(--color-primary);
}
.tracker-check.pending {
    color: var(--color-light);
}
.tracker-check.pending svg {
    color: var(--color-border);
}

/* --- Info Cards --- */
.tracker-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}
.tracker-info__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
}
.tracker-info__card h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin-bottom: 16px;
}
.tracker-info__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}
.tracker-info__row + .tracker-info__row {
    border-top: 1px solid var(--color-border-light);
}
.tracker-info__row span {
    color: var(--color-muted);
}
.tracker-info__row strong {
    color: var(--color-dark);
}
.tracker-info__row a {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Explainer --- */
.tracker-explainer {
    padding: 48px 0;
    border-top: 1px solid var(--color-border);
}
.tracker-explainer > h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}
.tracker-explainer > p {
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 32px;
}
.tracker-explainer__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.tracker-explainer__item {
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.tracker-explainer__num {
    width: 32px;
    height: 32px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
}
.tracker-explainer__item h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.tracker-explainer__item p {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.6;
}
.tracker-explainer__demo {
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .tracker-container { padding: 0 16px; }
    .tracker-lookup__form { flex-direction: column; }
    .tracker-lookup__form input { text-align: center; }
    .tracker-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .tracker-info { grid-template-columns: 1fr; }
    .tracker-explainer__grid { grid-template-columns: 1fr; }
    .tracker-timeline { padding-left: 36px; }
    .tracker-step__marker { left: -36px; width: 28px; height: 28px; }
    .tracker-step__content { padding: 16px; }
}
