/* ============================================
   MY ORDERS PAGE - LABEES BY AL AMEEN
   ============================================ */

/* ============================================
   PAGE CONTAINER
   ============================================ */
.my-orders-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 60vh;
}

/* ============================================
   PHONE INPUT SECTION
   ============================================ */
.phone-section {
    padding: 50px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-input-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 45px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #d4af37;
}

.phone-icon {
    font-size: 60px;
    margin-bottom: 20px;
    line-height: 1;
}

.phone-input-card h2 {
    font-size: 24px;
    color: #0f2219;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
    font-weight: 700;
}

.phone-input-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.phone-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phone-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    letter-spacing: 2px;
    text-align: center;
    background: #fafafa;
    color: #0f2219;
    transition: all 0.3s ease;
}

.phone-form input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.phone-form input::placeholder {
    letter-spacing: 1px;
    color: #aaa;
}

.phone-form button {
    padding: 16px 30px;
    background: #0f2219;
    color: #d4af37;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.phone-form button:hover {
    background: #d4af37;
    color: #0f2219;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.phone-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   ORDERS SECTION
   ============================================ */
.orders-section {
    padding: 30px 0 60px 0;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: #faf8f5;
    border-radius: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
    border-left: 4px solid #d4af37;
}

.orders-phone-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
}

.orders-phone-info .phone-label {
    font-size: 18px;
}

.orders-phone-info strong {
    color: #0f2219;
    font-family: monospace;
    letter-spacing: 1.5px;
    font-size: 15px;
}

.change-phone-btn {
    background: transparent;
    color: #d4af37;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.change-phone-btn:hover {
    color: #0f2219;
}

.orders-count {
    font-size: 13px;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================
   ORDER CARD
   ============================================ */
.order-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e4dc;
    transition: box-shadow 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Order Card Header */
.order-card-header {
    background: #faf8f5;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e8e4dc;
}

.order-id-section {
    min-width: 0;
    flex: 1;
}

.order-id {
    font-family: monospace;
    font-size: 16px;
    color: #0f2219;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.order-date {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.3px;
}

.order-status-badge {
    padding: 7px 16px;
    border-radius: 20px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ============================================
   DELIVERY TIMELINE
   ============================================ */
.order-timeline {
    padding: 25px;
    background: #faf8f5;
    border-bottom: 1px solid #e8e4dc;
}

.timeline-title {
    font-size: 12px;
    color: #0f2219;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e4dc;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
    min-width: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.timeline-step:first-child::before {
    display: none;
}

.timeline-step.completed::before {
    background: #4caf50;
}

.timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-step.completed .timeline-icon {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.timeline-step.active .timeline-icon {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
    animation: pulseTimeline 2s ease-in-out infinite;
}

@keyframes pulseTimeline {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

.timeline-label {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    line-height: 1.3;
    max-width: 100%;
}

.timeline-step.completed .timeline-label,
.timeline-step.active .timeline-label {
    color: #0f2219;
}

/* ============================================
   ORDER INFO SECTION (Delivery + Items)
   ============================================ */
.order-info-section {
    padding: 20px 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.order-info-col h4 {
    font-size: 11px;
    color: #0f2219;
    letter-spacing: 1.5px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e4dc;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
}

.order-info-row:last-child {
    padding-bottom: 0;
}

.order-info-row strong {
    color: #0f2219;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.order-info-row .info-label {
    color: #888;
    flex-shrink: 0;
}

/* ============================================
   ORDER ITEMS
   ============================================ */
.order-items-section {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.order-items-section h4 {
    font-size: 11px;
    color: #0f2219;
    letter-spacing: 1.5px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e4dc;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 10px;
    font-size: 13px;
}

.order-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-item-info {
    flex: 1;
    min-width: 0;
}

.order-item-info strong {
    display: block;
    color: #0f2219;
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 14px;
}

.order-item-info .item-meta {
    font-size: 11px;
    color: #888;
}

.order-item-price {
    text-align: right;
    color: #0f2219;
    font-weight: 600;
    white-space: nowrap;
}

.order-item-price .item-total {
    display: block;
    color: #b8860b;
    font-weight: 700;
    margin-top: 2px;
}

/* ============================================
   ORDER TOTAL
   ============================================ */
.order-total-section {
    padding: 18px 25px;
    background: #faf8f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e4dc;
}

.order-total-section span {
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

.order-total-section strong {
    font-size: 22px;
    color: #d4af37;
    font-weight: 800;
}

/* ============================================
   ORDER ACTIONS
   ============================================ */
.order-actions {
    padding: 18px 25px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.order-action-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.order-action-btn.whatsapp {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.order-action-btn.whatsapp:hover {
    background: #1ebe5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.order-action-btn.outline {
    background: transparent;
    color: #0f2219;
    border-color: #0f2219;
}

.order-action-btn.outline:hover {
    background: #0f2219;
    color: #d4af37;
    transform: translateY(-2px);
}

/* ============================================
   LOADING
   ============================================ */
.orders-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.orders-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.orders-empty {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.orders-empty-icon {
    font-size: 70px;
    margin-bottom: 20px;
    line-height: 1;
}

.orders-empty h3 {
    font-size: 22px;
    color: #0f2219;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.orders-empty p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.6;
}

.orders-empty .small {
    font-size: 12px;
    color: #999;
}

.orders-empty .orders-shop-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 30px;
    background: #0f2219;
    color: #d4af37;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.orders-empty .orders-shop-btn:hover {
    background: #d4af37;
    color: #0f2219;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 900px) {
    .order-info-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timeline-label {
        font-size: 9px;
    }
    
    .timeline-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 600px) {
    .my-orders-page {
        padding: 0 12px;
    }
    
    /* Phone Section */
    .phone-section {
        padding: 30px 12px;
    }
    
    .phone-input-card {
        padding: 30px 22px;
        border-radius: 12px;
    }
    
    .phone-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .phone-input-card h2 {
        font-size: 18px;
    }
    
    .phone-input-card p {
        font-size: 13px;
        margin-bottom: 22px;
    }
    
    .phone-form input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .phone-form button {
        padding: 14px 20px;
        font-size: 13px;
    }
    
    /* Orders Section */
    .orders-section {
        padding: 20px 0 40px 0;
    }
    
    .orders-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .orders-phone-info {
        font-size: 13px;
    }
    
    /* Order Card */
    .order-card-header {
        padding: 16px 18px;
    }
    
    .order-id {
        font-size: 14px;
    }
    
    .order-status-badge {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    /* Timeline */
    .order-timeline {
        padding: 18px;
        overflow-x: auto;
    }
    
    .timeline {
        min-width: 500px;
        padding: 0 5px;
    }
    
    .timeline-step::before {
        top: 15px;
    }
    
    .timeline-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-width: 2px;
    }
    
    .timeline-label {
        font-size: 9px;
        margin-top: 8px;
    }
    
    /* Order Info */
    .order-info-section {
        padding: 16px 18px;
        gap: 18px;
    }
    
    .order-info-row {
        font-size: 12px;
    }
    
    /* Items */
    .order-items-section {
        padding: 16px 18px;
    }
    
    .order-item-row {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .order-item-info strong {
        font-size: 13px;
    }
    
    .order-item-info .item-meta {
        font-size: 10px;
    }
    
    /* Total */
    .order-total-section {
        padding: 14px 18px;
    }
    
    .order-total-section span {
        font-size: 13px;
    }
    
    .order-total-section strong {
        font-size: 18px;
    }
    
    /* Actions */
    .order-actions {
        padding: 14px 18px;
        flex-direction: column;
        gap: 8px;
    }
    
    .order-action-btn {
        width: 100%;
        min-width: 0;
        padding: 12px 15px;
        font-size: 11px;
    }
    
    /* Empty */
    .orders-empty {
        padding: 40px 20px;
    }
    
    .orders-empty-icon {
        font-size: 55px;
    }
    
    .orders-empty h3 {
        font-size: 18px;
    }
    
    .orders-empty p {
        font-size: 13px;
    }
}