/* ==========================================
   Ory Mart Orders
========================================== */

:root{

    --primary:#0C831F;

    --primary-dark:#087319;

    --primary-light:#EAF8ED;

    --bg:#F6F7F9;

    --white:#FFFFFF;

    --text:#1F2937;

    --text-light:#6B7280;

    --border:#E5E7EB;

    --orange:#FF9800;

    --blue:#2563EB;

    --purple:#7C3AED;

    --green:#16A34A;

    --red:#DC2626;

    --shadow:0 8px 24px rgba(0,0,0,.08);

    --radius:18px;

}

/* ============================= */

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    font-family:"Poppins",sans-serif;

    background:var(--bg);

    color:var(--text);

    min-height:100vh;

}

/* ============================= */
/* Header */
/* ============================= */

.orders-header{

    position:sticky;

    top:0;

    z-index:100;

    display:flex;

    align-items:center;

    gap:15px;

    background:var(--white);

    padding:18px;

    box-shadow:0 2px 10px rgba(0,0,0,.05);

}

.back-btn{

    width:45px;

    height:45px;

    border:none;

    border-radius:50%;

    background:var(--primary-light);

    color:var(--primary);

    cursor:pointer;

    font-size:18px;

    transition:.25s;

}

.back-btn:hover{

    background:var(--primary);

    color:#fff;

}

.header-title{

    display:flex;

    flex-direction:column;

}

.header-title h2{

    font-size:22px;

    font-weight:700;

}

.header-title p{

    color:var(--text-light);

    font-size:13px;

}

/* ============================= */
/* Container */
/* ============================= */

.orders-container{

    padding:18px;

    display:flex;

    flex-direction:column;

    gap:22px;

}

/* ============================= */
/* Loading */
/* ============================= */

.loading-screen{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    height:65vh;

}

.loader{

    width:55px;

    height:55px;

    border:6px solid #ddd;

    border-top:6px solid var(--primary);

    border-radius:50%;

    animation:spin .8s linear infinite;

}

.loading-screen h3{

    margin-top:18px;

    color:var(--primary);

    font-size:18px;

}

@keyframes spin{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}

/* ============================= */

.hidden{

    display:none;

}
/* ==========================================
   Order Card
========================================== */

.order-card{

    background:var(--white);

    border-radius:22px;

    padding:18px;

    box-shadow:var(--shadow);

    border:1px solid var(--border);

    transition:.25s;

}

.order-card:hover{

    transform:translateY(-2px);

}

.order-top{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:16px;

}

.order-id{

    font-size:16px;

    font-weight:700;

    color:var(--primary);

}

.order-date{

    font-size:13px;

    color:var(--text-light);

}

/* ==========================================
   Status Badge
========================================== */

.status-badge{

    display:inline-flex;

    align-items:center;

    gap:8px;

    padding:8px 14px;

    border-radius:999px;

    font-size:13px;

    font-weight:600;

    margin-bottom:18px;

}

.status-pending{

    background:#FFF4E5;

    color:var(--orange);

}

.status-packed{

    background:#EAF2FF;

    color:var(--blue);

}

.status-out{

    background:#F2EBFF;

    color:var(--purple);

}

.status-delivered{

    background:#EAF8ED;

    color:var(--green);

}

.status-cancelled{

    background:#FFECEC;

    color:var(--red);

}

/* ==========================================
   Products
========================================== */

.order-product{

    display:flex;

    align-items:center;

    gap:14px;

    padding:12px 0;

    border-bottom:1px solid var(--border);

}

.order-product:last-child{

    border-bottom:none;

}

.order-product img{

    width:72px;

    height:72px;

    object-fit:contain;

    background:#fff;

    border:1px solid var(--border);

    border-radius:14px;

    padding:8px;

}

.order-info{

    flex:1;

}

.order-info h4{

    font-size:15px;

    font-weight:600;

    margin-bottom:4px;

    color:var(--text);

}

.order-info p{

    font-size:13px;

    color:var(--text-light);

}

.order-product strong{

    color:var(--primary);

    font-size:15px;

}
/* ==========================================
   Tracking Timeline
========================================== */

.tracking{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    margin:22px 0 26px;

    position:relative;

}

.tracking-step{

    flex:1;

    position:relative;

    text-align:center;

}

.circle{

    width:38px;

    height:38px;

    border-radius:50%;

    background:#E5E7EB;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    margin:auto;

    font-weight:700;

    font-size:15px;

    position:relative;

    z-index:2;

    transition:.35s;

}

.line{

    position:absolute;

    top:18px;

    left:50%;

    width:100%;

    height:4px;

    background:#E5E7EB;

    z-index:1;

}

.tracking-step:last-child .line{

    display:none;

}

.tracking-step.active .circle{

    background:var(--primary);

    box-shadow:0 0 0 6px rgba(12,131,31,.15);

}

.tracking-step.active .line{

    background:var(--primary);

}

.tracking-step p{

    margin-top:10px;

    font-size:12px;

    font-weight:600;

    color:var(--text-light);

    line-height:1.4;

}

.tracking-step.active p{

    color:var(--primary);

}

/* ==========================================
   Total
========================================== */

.order-total{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-top:18px;

    padding-top:18px;

    border-top:1px dashed var(--border);

    font-size:17px;

    font-weight:700;

}

.order-total span:last-child{

    color:var(--primary);

}

/* ==========================================
   Buttons
========================================== */

.order-actions{

    margin-top:18px;

}

.track-btn{

    width:100%;

    height:50px;

    border:none;

    border-radius:14px;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    color:#fff;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

.track-btn:hover{

    transform:translateY(-2px);

    box-shadow:0 10px 24px rgba(12,131,31,.25);

}

/* ==========================================
   Empty & Error
========================================== */

.empty-orders,
.error-box{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    text-align:center;

    padding:60px 25px;

}

.empty-orders img{

    width:180px;

    margin-bottom:20px;

}

.empty-orders h2,
.error-box h2{

    font-size:24px;

    margin-bottom:12px;

}

.empty-orders p,
.error-box p{

    color:var(--text-light);

    margin-bottom:25px;

    line-height:1.7;

}

.shop-btn,
.error-box button{

    background:var(--primary);

    color:#fff;

    text-decoration:none;

    border:none;

    padding:14px 28px;

    border-radius:14px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

.shop-btn:hover,
.error-box button:hover{

    background:var(--primary-dark);

}

/* ==========================================
   Responsive
========================================== */

@media(max-width:480px){

    .orders-header{

        padding:15px;

    }

    .order-card{

        padding:15px;

    }

    .order-product img{

        width:60px;

        height:60px;

    }

    .circle{

        width:32px;

        height:32px;

        font-size:13px;

    }

    .tracking-step p{

        font-size:11px;

    }

    .track-btn{

        height:46px;

    }

}
