/* ================================================================
   MY ORDERS PAGE STYLES (Desktop & Mobile Responsive)
   Premium Gold & Ivory Luxury Aesthetic for Jewelers
   ================================================================ */

.mg-orders-wrap {
    background: #faf8f5;
    min-height: 80vh;
}

/* Header Banner */
.customer-portal-header {
    background: linear-gradient(135deg, #1b2430 0%, #0f1722 100%) !important;
    padding: 24px 0 !important;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4) !important;
}

.customer-portal-header h1 {
    color: #ffffff !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 6px !important;
}

.customer-portal-header .page-breadcrumb-links {
    font-size: 0.85rem;
    color: #c9b185;
}

.customer-portal-header .page-breadcrumb-links a {
    color: #f1dfb8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.customer-portal-header .page-breadcrumb-links a:hover {
    color: #ffffff;
}

.customer-portal-header .page-breadcrumb-links .sep {
    margin: 0 8px;
    opacity: 0.6;
}

.customer-portal-header .page-breadcrumb-links .current-page {
    color: #e5c378;
    font-weight: 600;
}

/* Order Card */
.mg-order-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    margin-bottom: 22px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mg-order-card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.07);
}

/* Order Card Top Bar */
.mg-order-header {
    background: #fdfbf7;
    border-bottom: 1px solid #f0ede6;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.mg-order-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-order-index-badge {
    background: linear-gradient(135deg, #2b2118 0%, #17110c 100%);
    color: #e5c378;
    border: 1px solid rgba(212, 175, 55, 0.4);
    font-size: 0.8rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mg-order-id-block {
    display: flex;
    flex-direction: column;
}

.mg-order-id-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mg-order-id-code {
    font-family: monospace;
    font-size: 0.82rem;
    color: #8c671a;
    background: #faf2dc;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.mg-order-date {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.mg-order-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Status Badges */
.mg-status-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
}

.mg-status-badge.paid {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mg-status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Order Card Body / Items Preview */
.mg-order-body {
    padding: 18px 22px;
}

.mg-order-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mg-order-p-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f3eee6;
}

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

.mg-order-p-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.mg-order-p-thumb {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    border: 1px solid #eee8dc;
    object-fit: contain;
    background: #faf8f5;
    padding: 3px;
    flex-shrink: 0;
}

.mg-order-p-info {
    min-width: 0;
}

.mg-order-p-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #241c14;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mg-order-p-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mg-order-p-right {
    text-align: right;
    flex-shrink: 0;
}

.mg-order-p-price {
    font-size: 1rem;
    font-weight: 700;
    color: #241c14;
    margin: 0;
}

.mg-order-p-sub {
    font-size: 0.75rem;
    color: #8c671a;
    font-weight: 600;
    margin: 0;
}

/* Order Card Footer */
.mg-order-footer {
    background: #faf8f5;
    border-top: 1px solid #f0ede6;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.mg-order-total-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mg-order-total-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.mg-order-total-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: #8c671a;
    letter-spacing: -0.3px;
}

.mg-order-actions-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mg-btn-toggle-details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.mg-btn-toggle-details:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.mg-btn-checkout-now {
    background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    padding: 9px 20px !important;
    border-radius: 25px !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 14px rgba(168, 128, 42, 0.35) !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.mg-btn-checkout-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 128, 42, 0.45) !important;
    color: #ffffff !important;
}

/* Itemized Details Dropdown Block */
.mg-order-details-drawer {
    background: #fdfbf7;
    border-top: 1px dashed #e2e8f0;
    padding: 18px 22px;
}

.mg-breakdown-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.86rem;
}

.mg-breakdown-table th {
    background: #f5f1e8;
    color: #475569;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 10px 12px;
    border: none;
}

.mg-breakdown-table td {
    padding: 12px;
    vertical-align: middle;
    border-color: #f0ede6;
    color: #2b2118;
}

/* Empty State */
.mg-orders-empty-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    padding: 50px 30px;
    text-align: center;
    max-width: 620px;
    margin: 20px auto;
}

.mg-orders-empty-icon {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: linear-gradient(135deg, #faf0da 0%, #f6e2b8 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #8c671a;
    margin-bottom: 20px;
}

.mg-orders-empty-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #241c14;
    margin-bottom: 10px;
}

.mg-orders-empty-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 24px auto;
}

.mg-btn-shop-orders {
    background: linear-gradient(135deg, #d4af37 0%, #a8802a 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(168, 128, 42, 0.35);
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.mg-btn-shop-orders:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(168, 128, 42, 0.45);
    color: #ffffff !important;
}

/* ================================================================
   📱 PHONE VIEW (< 768px) SPECIFIC OPTIMIZATIONS
   ================================================================ */
@media (max-width: 767.98px) {
    .mg-orders-wrap {
        padding-top: 10px !important;
        padding-bottom: 95px !important; /* Space above #mg_bottom_nav_bar */
        padding-left: 8px !important;
        padding-right: 8px !important;
        overflow-x: hidden !important;
    }

    .mg-orders-wrap .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mg-orders-wrap .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .customer-portal-header {
        padding: 16px 0 !important;
    }

    .customer-portal-header h1 {
        font-size: 1.25rem !important;
    }

    .customer-portal-header .page-breadcrumb-links {
        font-size: 0.76rem !important;
    }

    /* Order Card on Phone */
    .mg-order-card {
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .mg-order-header {
        padding: 12px 14px;
        flex-direction: row;
        align-items: center;
    }

    .mg-order-index-badge {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .mg-order-id-title {
        font-size: 0.85rem;
    }

    .mg-order-id-code {
        font-size: 0.74rem;
    }

    .mg-order-date {
        font-size: 0.72rem;
    }

    .mg-status-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .mg-order-body {
        padding: 12px 14px;
    }

    .mg-order-p-thumb {
        width: 48px;
        height: 48px;
        border-radius: 8px;
    }

    .mg-order-p-name {
        font-size: 0.88rem;
    }

    .mg-order-p-meta {
        font-size: 0.75rem;
        gap: 6px;
    }

    .mg-order-p-price {
        font-size: 0.92rem;
    }

    /* Order Footer on Phone */
    .mg-order-footer {
        padding: 12px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mg-order-total-wrap {
        justify-content: space-between;
        width: 100%;
    }

    .mg-order-total-val {
        font-size: 1.2rem;
    }

    .mg-order-actions-wrap {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mg-btn-checkout-now {
        width: 100% !important;
        justify-content: center !important;
        padding: 11px 16px !important;
        font-size: 0.92rem !important;
    }

    .mg-btn-toggle-details {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 14px !important;
        font-size: 0.82rem !important;
    }

    .mg-order-details-drawer {
        padding: 12px 14px;
    }

    /* Empty Card on Phone */
    .mg-orders-empty-card {
        padding: 35px 16px;
        border-radius: 16px;
    }

    .mg-orders-empty-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .mg-orders-empty-title {
        font-size: 1.25rem;
    }

    .mg-orders-empty-desc {
        font-size: 0.85rem;
    }

    .mg-btn-shop-orders {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}
