/* =========================
   MY ORDERS PAGE
========================= */

.my-orders-container {
    width: min(1100px, 92%);
    margin: 40px auto;
    min-height: 65vh;
}

.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 4%;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.orders-logo {
    color: #111111;
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
}

.orders-logo i {
    margin-right: 8px;
    font-size: 16px;
}

.orders-header h1 {
    font-size: 24px;
    margin: 0;
}

.continue-shopping {
    text-decoration: none;
    color: #ffffff;
    background: #111111;
    padding: 11px 18px;
    border-radius: 6px;
    font-size: 14px;
}

.orders-heading {
    margin-bottom: 25px;
}

.orders-heading h2 {
    font-size: 28px;
    margin: 0 0 8px;
}

.orders-heading p {
    color: #777777;
    margin: 0;
    line-height: 1.6;
}

.orders-message {
    padding: 25px;
    text-align: center;
    color: #666666;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
}

.my-orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eeeeee;
}

.order-card-header h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.order-meta {
    color: #777777;
    font-size: 13px;
    line-height: 1.7;
}

.order-status {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 20px;
    background: #fff3d6;
    color: #885900;
    font-size: 12px;
    font-weight: 700;
}

.order-status.delivered {
    background: #e2f7e8;
    color: #18783b;
}

.order-status.cancelled {
    background: #fde8e8;
    color: #b42318;
}

.order-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

.order-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.order-product img {
    width: 75px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
}

.order-product-info {
    flex: 1;
    min-width: 0;
}

.order-product-info h4 {
    margin: 0 0 7px;
    font-size: 15px;
}

.order-product-info p {
    margin: 4px 0;
    color: #777777;
    font-size: 13px;
}

.order-product-price {
    font-weight: 700;
    white-space: nowrap;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 16px;
    border-top: 1px solid #eeeeee;
}

.order-total {
    font-size: 15px;
    font-weight: 700;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.order-btn {
    display: inline-block;
    border: 1px solid #111111;
    background: #111111;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.order-btn.secondary {
    background: #ffffff;
    color: #111111;
}

.order-empty {
    padding: 50px 20px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
}

.order-empty i {
    font-size: 42px;
    color: #aaaaaa;
    margin-bottom: 15px;
}

.order-empty h3 {
    margin: 0 0 10px;
}

.order-empty p {
    color: #777777;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .orders-header {
        flex-wrap: wrap;
        padding: 16px 4%;
    }

    .orders-header h1 {
        font-size: 20px;
    }

    .orders-logo {
        font-size: 18px;
    }

    .continue-shopping {
        padding: 9px 11px;
        font-size: 12px;
    }

    .my-orders-container {
        margin: 25px auto;
    }

    .orders-heading h2 {
        font-size: 23px;
    }

    .order-card {
        padding: 15px;
    }

    .order-card-header {
        flex-direction: column;
    }

    .order-product {
        flex-wrap: wrap;
    }

    .order-product img {
        width: 65px;
        height: 75px;
    }

    .order-product-price {
        width: 100%;
        padding-left: 80px;
    }

    .order-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-btn {
        text-align: center;
    }
}

/* =========================
   PROFESSIONAL ORDER TRACKING
========================= */

.tracking-panel {
    margin-top: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.tracking-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
}

.tracking-heading h3 {
    margin: 0 0 7px;
    font-size: 20px;
    color: #171717;
}

.tracking-heading p {
    margin: 0;
    color: #777777;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.tracking-current-status {
    flex-shrink: 0;
    padding: 8px 13px;
    border-radius: 20px;
    background: #e7f7ed;
    color: #16803c;
    font-size: 12px;
    font-weight: 700;
}

.tracking-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    gap: 8px;
    padding: 30px 0 20px;
}

.tracking-step {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tracking-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 22px;
    left: calc(50% + 25px);
    width: calc(100% - 42px);
    height: 3px;
    background: #dedede;
    border-radius: 4px;
}

.tracking-step.completed:not(:last-child)::after {
    background: #16803c;
}

.tracking-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eeeeee;
    color: #777777;
    font-size: 17px;
    border: 2px solid #eeeeee;
    position: relative;
    z-index: 1;
}

.tracking-step.completed .tracking-icon {
    background: #16803c;
    border-color: #16803c;
    color: #ffffff;
}

.tracking-step.active .tracking-icon {
    background: #ffffff;
    border: 3px solid #16803c;
    color: #16803c;
    box-shadow: 0 0 0 5px #e3f5e9;
}

.tracking-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 13px;
}

.tracking-label strong {
    font-size: 13px;
    color: #333333;
}

.tracking-step.completed .tracking-label strong,
.tracking-step.active .tracking-label strong {
    color: #16803c;
}

.tracking-label span {
    color: #888888;
    font-size: 11px;
}

.tracking-step.active .tracking-label span {
    color: #16803c;
    font-weight: 700;
}

.tracking-note {
    margin: 10px 0 0;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
    color: #777777;
    font-size: 12px;
    line-height: 1.6;
}

.tracking-cancelled {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 8px;
    background: #fff0f0;
    color: #b42318;
}

.tracking-cancelled > i {
    font-size: 28px;
}

.tracking-cancelled p {
    margin: 5px 0 0;
    font-size: 13px;
}

/* Mobile responsive tracking */

@media (max-width: 600px) {
    .tracking-panel {
        padding: 16px;
    }

    .tracking-heading {
        flex-direction: column;
    }

    .tracking-timeline {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }

    .tracking-step {
        width: 100%;
        min-height: 75px;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 14px;
    }

    .tracking-step:not(:last-child)::after {
        top: 48px;
        left: 22px;
        width: 3px;
        height: 28px;
    }

    .tracking-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .tracking-label {
        margin-top: 0;
        gap: 4px;
    }

    .tracking-label strong {
        font-size: 14px;
    }

    .tracking-label span {
        font-size: 12px;
    }
}
