/* Product Launch Timeline */
.product-timeline {
    padding: 115px 0 80px;
}

.product-timeline h2 {
    font-size: 38px;
    line-height: 43px;
    font-weight: 650;
    position: relative;
    padding-top: 57px;
    margin-bottom: 25px;
    color: #2e008b;
}

.product-timeline h2::before {
    position: absolute;
    content: '';
    width: 100%;
    max-width: 480px;
    height: 10px;
    background: linear-gradient(90deg, #fd683c 0%, #bc17a2 100%);
    top: 0;
    left: 0;
    z-index: 1;
}

.product-timeline p {
    font-size: 22px;
    line-height: 28px;
    font-weight: 360;
    color: #2e008b;
}

.timeline-legend {
    display: flex;
    gap: 28px;
    margin-bottom: 30px;
}

.timeline-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #2e008b;
}

.timeline-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.timeline-legend-dot.launched {
    background: #00B341;
}

.timeline-legend-dot.scheduled {
    background: #B8B8C0;
}

.timeline-wrap {
    position: relative;
    padding: 30px 0 40px;
}

.timeline-track {
    position: relative;
    height: 6px;
    background: #2e008b;
    border-radius: 3px;
    overflow: visible;
}

.timeline-track-arrow {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #2e008b;
}

/* Extend the track line to meet the arrow */
.timeline-track::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    width: 20px;
    height: 100%;
    background: #2e008b;
}

/* Dots */
.timeline-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    z-index: 2;
}

.timeline-dot.launched {
    background: #00B341;
    box-shadow: 0 0 0 4px rgba(0, 179, 65, 0.15);
}

.timeline-dot.scheduled {
    background: #B8B8C0;
    box-shadow: 0 0 0 4px rgba(184, 184, 192, 0.15);
}

.timeline-dot.active {
    transform: translate(-50%, -50%) scale(1.35);
}

.timeline-dot.launched.active {
    box-shadow: 0 0 0 8px rgba(0, 179, 65, 0.2), 0 4px 16px rgba(0, 179, 65, 0.3);
}

.timeline-dot.scheduled.active {
    box-shadow: 0 0 0 8px rgba(184, 184, 192, 0.25), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.timeline-dot .badge-count {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: #2e008b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Tooltip */
.timeline-tooltip {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(var(--tt-offset, -50%)) translateY(6px);
    background: #2e008b;
    color: #fff;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(46, 0, 139, 0.35);
    width: 320px;
    white-space: normal;
}

/* Invisible bridge between dot and tooltip */
.timeline-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: transparent;
}

/* Arrow */
.timeline-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--tt-arrow, 50%);
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #2e008b;
}

.timeline-dot.active .timeline-tooltip {
    opacity: 1;
    transform: translateX(var(--tt-offset, -50%)) translateY(0);
    pointer-events: auto;
}

/* Bottom-positioned tooltip */
.timeline-dot.tooltip-below .timeline-tooltip {
    bottom: auto;
    top: calc(100% + 14px);
}

.timeline-dot.tooltip-below .timeline-tooltip::before {
    top: auto;
    bottom: 100%;
}

.timeline-dot.tooltip-below .timeline-tooltip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #2e008b;
}

.timeline-tooltip-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.timeline-tooltip-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.timeline-tooltip-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-tooltip-placeholder svg {
    width: 22px;
    height: 22px;
    opacity: 0.3;
}

.timeline-tooltip-text {
    flex: 1;
    min-width: 0;
}

.timeline-tooltip-text .sku {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

.timeline-tooltip-text .name {
    font-weight: 360;
    opacity: 0.85;
    font-size: 14px;
}

.timeline-tooltip-text .description {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.65;
    line-height: 1.4;
    white-space: normal;
    max-width: 220px;
}

.timeline-tooltip-text .date {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.6;
}

.timeline-tooltip-footer .status-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-tooltip-footer .status-label.launched {
    color: #44EE88;
}

.timeline-tooltip-footer .status-label.scheduled {
    color: #999;
}

.timeline-tooltip-footer .btn-resources {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
    margin-left: auto;
}

.timeline-tooltip-footer .btn-resources:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Pagination nav */
.timeline-tooltip-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

.timeline-tooltip-nav-btn {
    background: #fff;
    border: none;
    color: #2e008b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    font-family: "Source Sans 3", sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timeline-tooltip-nav-btn:hover {
    background: #f0ecf7;
    transform: scale(1.1);
}

.timeline-tooltip-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
}

.timeline-tooltip-nav-btn:disabled:hover {
    background: #fff;
    transform: none;
}

.timeline-tooltip-nav-count {
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* Slides */
.timeline-tooltip-slides {
    position: relative;
    overflow: hidden;
}

.timeline-tooltip-slide {
    display: none;
    padding: 12px 16px 0;
}

.timeline-tooltip-slide.active {
    display: block;
}

/* Single product — hide nav */
.timeline-tooltip.single .timeline-tooltip-nav {
    display: none;
}

.timeline-tooltip.single .timeline-tooltip-slide {
    padding: 12px 16px 0;
}

/* Footer with status + resources */
.timeline-tooltip-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 12px;
}

/* Month labels */
.timeline-month-label {
    position: absolute;
    bottom: -8px;
    font-size: 12px;
    font-weight: 700;
    color: #2e008b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 6px;
}

.timeline-month-label.start {
    left: 0;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #fd683c, #bc17a2) 1;
    padding-right: 20px;
}

.timeline-month-label.end {
    right: -4px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #bc17a2, #fd683c) 1;
    padding-left: 20px;
    text-align: right;
}

/* Stats */
.timeline-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    font-size: 16px;
    color: #457ABE;
    font-weight: 360;
}

.timeline-stats strong {
    font-weight: 700;
    color: #2e008b;
}

/* Loading state */
.timeline-loading {
    text-align: center;
    padding: 40px 0;
    color: #457ABE;
    font-size: 16px;
}

.timeline-error {
    text-align: center;
    padding: 40px 0;
    color: #bc17a2;
    font-size: 16px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .product-timeline h2::before {
        max-width: 80%;
    }
}

@media screen and (max-width: 785px) {
    .product-timeline {
        padding: 60px 0;
    }

    .timeline-wrap {
        padding: 140px 0 30px;
    }

    .timeline-dot {
        width: 18px;
        height: 18px;
    }

    .timeline-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
}
