/* MEGANET Checkout UI — Classic WooCommerce + Cart/Checkout Blocks */
body.meganet-commerce-ui .site-main,
body.meganet-commerce-ui main,
body.meganet-commerce-ui .ct-container-full,
body.meganet-commerce-ui .ct-container {
    --mg-blue:#0b2a4a;
    --mg-blue-2:#123d67;
    --mg-accent:#1668e8;
    --mg-text:#122033;
    --mg-muted:#64748b;
    --mg-line:#e2e8f0;
    --mg-bg:#f7f9fc;
    --mg-white:#fff;
}

body.meganet-commerce-ui {background:#f7f9fc;}
body.meganet-commerce-ui .entry-title,
body.meganet-commerce-ui .page-title {
    color:var(--mg-text);
    font-size:clamp(28px,3vw,40px);
    font-weight:800;
    letter-spacing:-.02em;
    margin-bottom:28px;
}

/* Classic checkout */
body.meganet-commerce-ui form.checkout.woocommerce-checkout {
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(340px,.8fr);
    gap:28px;
    align-items:start;
}
body.meganet-commerce-ui form.checkout.woocommerce-checkout > #customer_details,
body.meganet-commerce-ui form.checkout.woocommerce-checkout > #order_review_heading,
body.meganet-commerce-ui form.checkout.woocommerce-checkout > #order_review {
    width:auto!important;
    float:none!important;
}
body.meganet-commerce-ui #customer_details {
    background:#fff;
    border:1px solid var(--mg-line);
    border-radius:18px;
    padding:24px;
    box-shadow:0 10px 34px rgba(15,23,42,.06);
}
body.meganet-commerce-ui #order_review_heading {
    grid-column:2;
    margin:0 0 -12px;
    padding:0 6px;
    color:var(--mg-text);
    font-size:20px;
    font-weight:800;
}
body.meganet-commerce-ui #order_review {
    grid-column:2;
    background:#fff;
    border:1px solid var(--mg-line);
    border-radius:18px;
    padding:22px;
    box-shadow:0 10px 34px rgba(15,23,42,.06);
}
body.meganet-commerce-ui .woocommerce-billing-fields > h3,
body.meganet-commerce-ui .woocommerce-additional-fields > h3 {
    color:var(--mg-text);
    font-size:20px;
    font-weight:800;
    margin:0 0 18px;
}
body.meganet-commerce-ui .form-row {margin-bottom:14px!important;}
body.meganet-commerce-ui .form-row label {
    color:var(--mg-text);
    font-weight:700;
    font-size:13px;
    margin-bottom:7px;
}
body.meganet-commerce-ui .input-text,
body.meganet-commerce-ui select,
body.meganet-commerce-ui .select2-selection,
body.meganet-commerce-ui textarea {
    min-height:48px!important;
    border:1px solid #cbd5e1!important;
    border-radius:11px!important;
    background:#fff!important;
    box-shadow:none!important;
    padding:10px 12px!important;
}
body.meganet-commerce-ui textarea {min-height:100px!important;}
body.meganet-commerce-ui .input-text:focus,
body.meganet-commerce-ui select:focus,
body.meganet-commerce-ui textarea:focus {
    border-color:var(--mg-accent)!important;
    outline:3px solid rgba(22,104,232,.1)!important;
}
body.meganet-commerce-ui .woocommerce-checkout-review-order-table {
    border:0!important;
    margin:0 0 18px!important;
}
body.meganet-commerce-ui .woocommerce-checkout-review-order-table th,
body.meganet-commerce-ui .woocommerce-checkout-review-order-table td {
    border-color:var(--mg-line)!important;
    padding:13px 4px!important;
}
body.meganet-commerce-ui .woocommerce-checkout-review-order-table .order-total th,
body.meganet-commerce-ui .woocommerce-checkout-review-order-table .order-total td {
    font-size:18px;
    color:var(--mg-text);
}
body.meganet-commerce-ui #payment {
    background:#f8fafc!important;
    border-radius:14px!important;
    border:1px solid var(--mg-line);
}
body.meganet-commerce-ui #payment ul.payment_methods {border-bottom:1px solid var(--mg-line)!important;}
body.meganet-commerce-ui #place_order,
body.meganet-commerce-ui .wc-block-components-checkout-place-order-button {
    width:100%!important;
    min-height:54px!important;
    border:0!important;
    border-radius:12px!important;
    background:var(--mg-accent)!important;
    color:#fff!important;
    font-weight:800!important;
    font-size:16px!important;
    box-shadow:0 10px 24px rgba(22,104,232,.2)!important;
}
body.meganet-commerce-ui #place_order:hover,
body.meganet-commerce-ui .wc-block-components-checkout-place-order-button:hover {
    filter:brightness(.94);
    transform:translateY(-1px);
}

/* City Shipping card integration */
body.meganet-commerce-ui .meganet-city-card {
    border-radius:16px;
    box-shadow:none;
    border-color:var(--mg-line);
    margin-bottom:20px;
}
body.meganet-commerce-ui .meganet-city-card__title {color:var(--mg-text);}

/* Classic cart */
body.meganet-commerce-ui .woocommerce-cart-form,
body.meganet-commerce-ui .cart-collaterals .cart_totals {
    background:#fff;
    border:1px solid var(--mg-line);
    border-radius:18px;
    padding:20px;
    box-shadow:0 10px 34px rgba(15,23,42,.05);
}
body.meganet-commerce-ui .cart-collaterals .cart_totals {padding:20px!important;}
body.meganet-commerce-ui .checkout-button,
body.meganet-commerce-ui button[name="apply_coupon"] {
    border-radius:10px!important;
}
body.meganet-commerce-ui .checkout-button {
    background:var(--mg-accent)!important;
    font-weight:800!important;
}

/* WooCommerce Blocks */
body.meganet-commerce-ui .wc-block-cart,
body.meganet-commerce-ui .wc-block-checkout {
    color:var(--mg-text);
}
body.meganet-commerce-ui .wc-block-components-sidebar-layout .wc-block-components-main,
body.meganet-commerce-ui .wc-block-components-sidebar {
    background:#fff;
    border:1px solid var(--mg-line);
    border-radius:18px;
    padding:22px!important;
    box-shadow:0 10px 34px rgba(15,23,42,.05);
}
body.meganet-commerce-ui .wc-block-components-text-input input,
body.meganet-commerce-ui .wc-block-components-combobox .wc-block-components-combobox-control input,
body.meganet-commerce-ui .wc-block-components-address-form__address_2-toggle {
    border-radius:11px!important;
}
body.meganet-commerce-ui .wc-block-components-checkout-step__heading h2,
body.meganet-commerce-ui .wc-block-components-title {
    color:var(--mg-text)!important;
    font-weight:800!important;
}

/* Notices */
body.meganet-commerce-ui .woocommerce-error,
body.meganet-commerce-ui .woocommerce-info,
body.meganet-commerce-ui .woocommerce-message {
    border:1px solid var(--mg-line)!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:none!important;
}

/* Arabic / RTL */
body.meganet-commerce-ar,
body.meganet-commerce-ar input,
body.meganet-commerce-ar textarea,
body.meganet-commerce-ar select {direction:rtl;text-align:right;}
body.meganet-commerce-ar .woocommerce-checkout-review-order-table,
body.meganet-commerce-ar .wc-block-components-order-summary {direction:rtl;}

@media (max-width: 900px) {
    body.meganet-commerce-ui form.checkout.woocommerce-checkout {
        grid-template-columns:1fr;
        gap:18px;
    }
    body.meganet-commerce-ui #order_review_heading,
    body.meganet-commerce-ui #order_review {grid-column:1;}
    body.meganet-commerce-ui #customer_details,
    body.meganet-commerce-ui #order_review {padding:18px;}
    body.meganet-commerce-ui .wc-block-components-sidebar-layout .wc-block-components-main,
    body.meganet-commerce-ui .wc-block-components-sidebar {padding:16px!important;}
}

@media (max-width: 480px) {
    body.meganet-commerce-ui .entry-title,
    body.meganet-commerce-ui .page-title {font-size:28px;margin-bottom:20px;}
    body.meganet-commerce-ui #customer_details,
    body.meganet-commerce-ui #order_review,
    body.meganet-commerce-ui .woocommerce-cart-form,
    body.meganet-commerce-ui .cart-collaterals .cart_totals {border-radius:14px;padding:14px!important;}
    body.meganet-commerce-ui #place_order,
    body.meganet-commerce-ui .wc-block-components-checkout-place-order-button {min-height:52px!important;}
}
