/* --- Base & Responsive Grid --- */
.livewire-tracking-wrapper {
    max-width: 100%;
    margin: 15px auto;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    padding: 0 10px;
}

.tracking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: start;
}

@media (min-width: 992px) {
    .livewire-tracking-wrapper {
        max-width: 1100px;
        padding: 0 20px;
        margin: 30px auto;
    }

    .tracking-grid {
        grid-template-columns: 1.8fr 1.2fr;
        gap: 20px;
    }

    .tracking-right-col {
        position: sticky;
        top: 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .tracking-left-col {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* --- Global Card Styles --- */
.card-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 15px;
    border: 1px solid #f3f4f6;
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .card-container {
        padding: 24px;
        margin-bottom: 0;
    }
}

/* --- Section Titles --- */
.styled-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}

.styled-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    position: relative;
    padding-bottom: 6px;
}

.styled-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background-color: #eab308;
    border-radius: 2px;
}

.styled-title-right {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
}

@media (min-width: 992px) {
    .styled-title {
        font-size: 20px;
        padding-bottom: 8px;
    }

    .styled-title::after {
        width: 45px;
    }

    .styled-title-right {
        font-size: 14px;
    }
}

/* --- COD TO PREPAID TOP BANNER --- */
.cod-promo-banner {
    background: #fffbf0;
    border: 2px dashed #eab308;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.1);
}

.cod-promo-content h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.cod-promo-content p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 0;
    line-height: 1.5;
}

.express-badge {
    background-color: #ef4444;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 5px;
    white-space: nowrap;
    display: inline-block;
}

.cod-promo-action {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
}

.cod-promo-action .payable-text {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.cod-promo-action .payable-amount {
    color: #eab308;
    font-size: 24px;
    font-weight: 800;
    margin-left: 8px;
}

@media (min-width: 992px) {
    .cod-promo-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 25px 30px;
    }

    .cod-promo-content h3 {
        justify-content: flex-start;
        font-size: 22px;
    }

    .cod-promo-content p {
        font-size: 15px;
    }

    .cod-promo-action {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        border-left: 1px dashed #eab308;
        padding-left: 30px;
        min-width: 300px;
        text-align: center;
    }
}

/* --- NEW: DELIVERED SUCCESS BANNER --- */
.success-delivery-banner {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.success-delivery-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.success-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #065f46;
}

.success-text p {
    margin: 0;
    font-size: 13px;
    color: #047857;
}

.btn-view-journey {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.btn-view-journey:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

@media (min-width: 768px) {
    .success-delivery-banner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .success-text h2 {
        font-size: 20px;
    }

    .success-text p {
        font-size: 14px;
    }
}

/* --- NEW: PREMIUM COUPON CARD --- */
.premium-coupon-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    position: relative;
    text-align: center;
}

.coupon-gold-strip {
    height: 6px;
    background: linear-gradient(90deg, #eab308 0%, #fef08a 50%, #eab308 100%);
    width: 100%;
}

.premium-coupon-content {
    padding: 30px 20px;
}

.coupon-gift-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: inline-block;
}

.premium-offer-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-offer-title span {
    color: #eab308;
}

.premium-offer-desc {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.5;
}

.premium-offer-desc strong {
    color: #1f2937;
    font-weight: 700;
}

/* Code Box */
.code-display-wrapper {
    background: #fffdf5;
    border: 2px dashed #eab308;
    border-radius: 8px;
    padding: 10px 10px 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
    max-width: 100%;
    width: fit-content;
}

.the-actual-code {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: 1px;
    margin: 0;
}

.btn-copy-code {
    background: #eab308;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-copy-code:hover {
    background: #ca9a07;
}

.btn-copy-code.copied {
    background: #10b981;
}

.coupon-footer-msg {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 25px;
}

.dashed-divider-light {
    border-top: 1px dashed #e5e7eb;
    margin: 0 0 20px 0;
}

/* Terms */
.premium-terms {
    text-align: left;
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
}

.premium-terms h5 {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-terms ul {
    padding-left: 20px;
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.premium-terms li {
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .premium-coupon-content {
        padding: 40px;
    }

    .premium-offer-title {
        font-size: 28px;
    }

    .the-actual-code {
        font-size: 26px;
    }
}

/* --- LEFT COLUMN: TRACKING PROGRESS --- */
.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.tracking-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.tracking-header h2 span {
    color: #6b7280;
    font-weight: 500;
    font-size: 13px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 11px;
}

.progress-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0 35px 0;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 15px;
    transform: translateY(-50%);
    left: 12.5%;
    width: 75%;
    height: 3px;
    background: #e5e7eb;
    z-index: 1;
}

.progress-bar-fill {
    position: absolute;
    top: 15px;
    transform: translateY(-50%);
    left: 12.5%;
    height: 3px;
    background: #10b981;
    z-index: 1;
    transition: width 0.4s ease-in-out;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 25%;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    color: #9ca3af;
    line-height: 26px;
    margin: 0 auto 6px;
    font-weight: bold;
    border: 2px solid #e5e7eb;
    font-size: 13px;
    transition: all 0.3s ease;
}

.step-text {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

.progress-step.completed .step-icon {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.progress-step.completed .step-text {
    color: #111827;
}

@media (min-width: 992px) {
    .tracking-header {
        padding-bottom: 15px;
    }

    .tracking-header h2 {
        font-size: 18px;
    }

    .tracking-header h2 span {
        font-size: 14px;
    }

    .status-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .progress-tracker {
        margin: 25px 0 40px 0;
    }

    .progress-tracker::before,
    .progress-bar-fill {
        top: 20px;
        height: 4px;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        line-height: 36px;
        font-size: 15px;
        border-width: 3px;
    }

    .step-text {
        font-size: 12px;
    }
}

/* --- NEW: ESTIMATED DELIVERY BOX --- */
.estimated-delivery-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #eab308;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: -10px;
    margin-bottom: 25px;
}

.estimated-icon-wrapper {
    background: #fef9c3;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ca8a04;
    font-size: 20px;
}

.estimated-text-wrapper {
    display: flex;
    flex-direction: column;
}

.estimated-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estimated-date {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .estimated-delivery-box {
        padding: 18px 25px;
    }

    .estimated-date {
        font-size: 18px;
    }
}

/* --- TIMELINE REDESIGN --- */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 25px;
    bottom: 30px;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    top: 24px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #d1d5db;
    z-index: 2;
}

.timeline-item.newest .timeline-icon {
    background: #10b981;
    border: none;
    width: 16px;
    height: 16px;
    left: -30px;
    top: 24px;
}

.timeline-content {
    background: #ffffff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.timeline-item.newest .timeline-content {
    border-color: #6ee7b7;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-status {
    font-weight: 700;
    color: #111827;
    margin: 0;
    font-size: 14px;
}

.timeline-date {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.timeline-remark {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px 0;
}

.timeline-location {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
}

.timeline-location span {
    color: #ef4444;
    margin-right: 6px;
    font-size: 14px;
}

/* --- RIGHT COLUMN: ORDER SUMMARY & DETAILS --- */
.order-item-box {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #f3f4f6;
}

.order-item-box:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.item-image {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #e5e7eb;
}

.item-details {
    flex-grow: 1;
    line-height: 1.2;
    overflow: hidden;
}

.item-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price-col {
    text-align: right;
    min-width: 50px;
    flex-shrink: 0;
}

.item-qty {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    display: block;
    margin-bottom: 4px;
}

.item-price {
    font-weight: 700;
    color: #eab308;
    font-size: 15px;
}

@media (min-width: 992px) {
    .order-item-box {
        padding: 15px;
        border: 1px solid #f3f4f6;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .item-image {
        width: 70px;
        height: 70px;
        margin-right: 15px;
    }

    .item-title {
        font-size: 14px;
    }

    .item-price-col {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    .item-qty {
        font-size: 14px;
        margin-bottom: 0;
    }

    .item-price {
        font-size: 18px;
    }
}

.details-wrapper {
    background: #ffffff;
    padding: 5px 0 0 0;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.details-label {
    color: #9ca3af;
    font-weight: 600;
}

.badge-cyan {
    background-color: #06b6d4;
    color: #ffffff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-warning {
    background-color: #eab308;
    color: #ffffff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.val-dark {
    color: #1f2937;
    font-weight: 700;
}

.val-green {
    color: #65a30d;
    font-weight: 700;
}

.val-yellow {
    color: #eab308;
    font-weight: 700;
}

.total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
}

.total-row .details-label {
    font-size: 14px;
    color: #1f2937;
}

.total-row .val-yellow {
    font-size: 16px;
}

@media (min-width: 992px) {
    .details-row {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .badge-cyan {
        font-size: 11px;
    }

    .total-row {
        border-top: none;
    }

    .total-row .val-yellow {
        font-size: 18px;
    }
}

/* --- RELATED PRODUCTS SECTION --- */
.related-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f3f4f6;
}

.related-item:first-of-type {
    padding-top: 5px;
}

.related-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.related-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.related-info {
    flex-grow: 1;
    padding: 0 12px;
    overflow: hidden;
}

.related-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 4px 0;
}

.price-transition {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-right: 5px;
}

.old-price {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
}

.related-add-btn {
    background-color: transparent;
    color: #eab308;
    border: 1px solid #eab308;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.related-add-btn:hover {
    background-color: #eab308;
    color: #ffffff;
}

.related-add-btn.btn-filled {
    background-color: #eab308;
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
    width: 100%;
    text-align: center;
    margin-top: 5px;
}

.related-add-btn.btn-filled:hover {
    background-color: #c99a07;
}