/* Meawal Checkout */

.woocommerce-page .woocommerce,
.woocommerce-checkout .woocommerce {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.woocommerce-checkout #customer_details,
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-account-fields,
#ship-to-different-address,
.woocommerce-additional-fields {
    display: none !important;
}

#order_review .woocommerce-checkout-review-order-table,
#order_review .shop_table {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
    margin: 0 !important;
}

.mw-co {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(180deg, #f5f6fa 0%, #eef0f6 100%);
    padding: 32px 20px 80px;
    min-height: 70vh;
}

.mw-co-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.mw-co-head {
    text-align: center;
    margin-bottom: 28px;
}

.mw-co-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--main-color, #2b304d);
    box-shadow: 0 8px 28px rgba(43, 48, 77, 0.18);
    margin-bottom: 16px;
}

.mw-co-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mw-co-head h1 {
    margin: 0 0 8px;
    color: var(--main-color, #2b304d);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
}

.mw-co-head p {
    margin: 0;
    color: #5c6378;
    font-size: 15px;
}

.mw-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.mw-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(43, 48, 77, 0.06);
    box-shadow: 0 8px 32px rgba(43, 48, 77, 0.08);
}

.mw-pay-title,
.mw-sum-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--main-color, #2b304d);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mw-pay-title::before,
.mw-sum-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(135deg, var(--sub-color, #edaa74), #d89458);
    border-radius: 4px;
}

#payment,
.woocommerce-checkout #payment {
    display: block !important;
    background: transparent !important;
}

.woocommerce-checkout #payment .woocommerce-privacy-policy-text,
.woocommerce-privacy-policy-text {
    display: none !important;
}

#payment .wc_payment_methods {
    display: block !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

#payment .wc_payment_method {
    border: 1.5px solid rgba(43, 48, 77, 0.1);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#payment .wc_payment_method:has(input:checked) {
    border-color: var(--sub-color, #edaa74);
    box-shadow: 0 0 0 3px rgba(237, 170, 116, 0.15);
}

#payment .wc_payment_method label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--main-color, #2b304d);
    background: #fafbfd;
}

#payment .wc_payment_method label img {
    max-height: 28px;
    width: auto;
}

#payment .payment_box {
    padding: 18px 16px;
    background: #fff !important;
    border-top: 1px solid #f0f2f5;
    font-family: 'Tajawal', sans-serif;
    border-radius: 0 0 14px 14px;
}

#payment .payment_box::before {
    display: none !important;
}

#payment .payment_box p {
    color: #5c6378;
    font-size: 13px;
}

#payment .payment_box input[type="text"],
#payment .payment_box input[type="tel"],
#payment .payment_box input:not([type="radio"]):not([type="checkbox"]) {
    border-radius: 10px !important;
    border: 1.5px solid rgba(43, 48, 77, 0.12) !important;
    font-family: 'Tajawal', sans-serif !important;
}

#payment .payment_box label[for*="save"],
#payment .payment_box [class*="save-card"],
#payment .payment_box [class*="saveCard"],
#payment .payment_box [class*="save_card"] {
    display: none !important;
}

#payment .payment_box iframe,
.paymob-iframe-container,
iframe[id*="paymob"],
iframe[src*="paymob"] {
    width: 100% !important;
    border: none !important;
    border-radius: 12px;
    min-height: 400px;
}

#payment .place-order {
    padding: 0;
    margin-top: 20px;
}

#payment #place_order {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, var(--main-color, #2b304d), #3d4468);
    color: #fff !important;
    border: none;
    border-radius: 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 20px rgba(43, 48, 77, 0.25);
    display: block;
    text-align: center;
    line-height: 54px;
    padding: 0;
}

#payment #place_order:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(43, 48, 77, 0.32);
}

#payment #place_order:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.mw-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 14px;
}

.mw-secure svg {
    width: 14px;
    height: 14px;
    fill: #10b981;
}

.mw-secure strong {
    color: var(--main-color, #2b304d);
}

.mw-line {
    height: 1px;
    background: rgba(43, 48, 77, 0.08);
    margin: 14px 0;
}

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

.mw-total-row .l {
    color: #5c6378;
    font-weight: 500;
}

.mw-total-row .v {
    color: var(--main-color, #2b304d);
    font-weight: 600;
}

.mw-grand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(43, 48, 77, 0.06), rgba(237, 170, 116, 0.12));
    border-radius: 14px;
    margin-top: 6px;
}

.mw-grand .l {
    font-size: 15px;
    font-weight: 800;
    color: var(--main-color, #2b304d);
}

.mw-grand .v {
    font-size: 22px;
    font-weight: 900;
    color: var(--sub-color, #edaa74);
}

.mw-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(43, 48, 77, 0.1);
}

.mw-cart-item:last-child {
    border-bottom: none;
}

.mw-cart-item .n {
    font-size: 14px;
    font-weight: 600;
    color: var(--main-color, #2b304d);
    line-height: 1.5;
}

.mw-cart-item .p {
    font-size: 15px;
    font-weight: 700;
    color: var(--sub-color, #edaa74);
    white-space: nowrap;
}

.mw-cart-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(43, 48, 77, 0.08);
    color: #5c6378;
    font-size: 11px;
    font-weight: 600;
}

.mw-policy {
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.7;
}

.mw-policy a {
    color: var(--sub-color, #edaa74);
    font-weight: 600;
    text-decoration: none;
}

.mw-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: #5c6378;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.mw-back-link:hover {
    color: var(--main-color, #2b304d);
}

@media (max-width: 900px) {
    .mw-grid {
        grid-template-columns: 1fr;
    }

    .mw-card.mw-summary {
        order: -1;
    }
}
