/*
 * Green Dome Universal Cart 2.4.0
 * تصميم مستقل للجوال لصفحة السلة، وإصلاح عرض صفحة الدفع.
 */

.single_add_to_cart_button,
.add_to_cart_button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gd-cart-working {
    cursor: progress;
}

/* التصميم البديل مخفي في الكمبيوتر. */
.gd-mobile-cart-list {
    display: none;
}

@media (max-width: 768px) {

    /* ======================================================
       إلغاء أي عرض زائد عن شاشة الهاتف
       ====================================================== */

    html.gd-mobile-cart-active,
    body.woocommerce-cart,
    body.woocommerce-checkout {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body.woocommerce-cart #page,
    body.woocommerce-checkout #page,
    body.woocommerce-cart .site,
    body.woocommerce-checkout .site,
    body.woocommerce-cart .site-content,
    body.woocommerce-checkout .site-content,
    body.woocommerce-cart .ast-container,
    body.woocommerce-checkout .ast-container,
    body.woocommerce-cart .content-area,
    body.woocommerce-checkout .content-area,
    body.woocommerce-cart .site-main,
    body.woocommerce-checkout .site-main,
    body.woocommerce-cart article,
    body.woocommerce-checkout article,
    body.woocommerce-cart .entry-content,
    body.woocommerce-checkout .entry-content,
    body.woocommerce-cart .woocommerce,
    body.woocommerce-checkout .woocommerce {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    body.woocommerce-cart .site-content,
    body.woocommerce-checkout .site-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body.woocommerce-cart .woocommerce,
    body.woocommerce-checkout .woocommerce {
        direction: rtl;
    }

    /* منع عناصر القالب أو الفوتر من توسيع الصفحة. */
    body.woocommerce-cart .site-footer,
    body.woocommerce-checkout .site-footer,
    body.woocommerce-cart .site-footer .ast-container,
    body.woocommerce-checkout .site-footer .ast-container,
    body.woocommerce-cart .ast-builder-grid-row-container-inner,
    body.woocommerce-checkout .ast-builder-grid-row-container-inner {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-inline: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .site-footer .ast-builder-grid-row,
    body.woocommerce-checkout .site-footer .ast-builder-grid-row {
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* ======================================================
       تصميم السلة الجديد الخاص بالجوال
       ====================================================== */

    body.woocommerce-cart form.woocommerce-cart-form {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    body.woocommerce-cart .gd-mobile-cart-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0 0 14px;
        padding: 0;
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-cart-card {
        position: relative;
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 14px;
        border: 1px solid rgba(20, 48, 39, 0.12);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
        box-sizing: border-box;
        overflow: hidden;
    }

    body.woocommerce-cart .gd-mobile-cart-remove {
        position: absolute !important;
        top: 10px;
        left: 10px;
        z-index: 2;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(0, 0, 0, 0.25) !important;
        border-radius: 50% !important;
        color: #555 !important;
        background: #fff !important;
        font-size: 25px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        text-decoration: none !important;
    }

    body.woocommerce-cart .gd-mobile-cart-top {
        display: grid;
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        min-width: 0;
        padding-left: 32px;
        direction: rtl;
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-cart-image,
    body.woocommerce-cart .gd-mobile-cart-image .gd-mobile-cart-value,
    body.woocommerce-cart .gd-mobile-cart-image a {
        display: block;
        width: 78px;
        max-width: 78px;
        min-width: 0;
    }

    body.woocommerce-cart .gd-mobile-cart-image:empty {
        display: none;
    }

    body.woocommerce-cart .gd-mobile-cart-image img {
        display: block !important;
        width: 78px !important;
        height: 78px !important;
        max-width: 78px !important;
        margin: 0 !important;
        border-radius: 12px;
        object-fit: cover;
    }

    body.woocommerce-cart .gd-mobile-cart-info {
        min-width: 0;
        padding-top: 2px;
    }

    body.woocommerce-cart .gd-mobile-cart-name {
        display: block;
        min-width: 0;
        margin: 0 0 8px;
        padding-left: 4px;
        color: #17251f;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    body.woocommerce-cart .gd-mobile-cart-name a {
        color: inherit !important;
        font-weight: inherit !important;
        text-decoration: none !important;
    }

    body.woocommerce-cart .gd-mobile-cart-name dl.variation {
        margin: 7px 0 0;
        font-size: 12px;
        font-weight: 400;
    }

    body.woocommerce-cart .gd-mobile-cart-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-width: 0;
        padding: 11px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-cart-info .gd-mobile-cart-row {
        padding: 5px 0 0;
        border-top: 0;
    }

    body.woocommerce-cart .gd-mobile-cart-label {
        flex: 0 0 auto;
        color: #5b655f;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }

    body.woocommerce-cart .gd-mobile-cart-value {
        min-width: 0;
        max-width: 100%;
        color: #17251f;
        font-size: 14px;
        text-align: left;
        overflow-wrap: anywhere;
    }

    body.woocommerce-cart .gd-mobile-cart-value *,
    body.woocommerce-cart .gd-mobile-cart-value .amount,
    body.woocommerce-cart .gd-mobile-cart-value bdi {
        max-width: 100%;
        color: inherit !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.woocommerce-cart .gd-mobile-cart-quantity-row {
        margin-top: 12px;
    }

    body.woocommerce-cart .gd-mobile-cart-subtotal-row {
        padding-bottom: 0;
    }

    body.woocommerce-cart .gd-mobile-cart-subtotal {
        font-weight: 800;
    }

    body.woocommerce-cart .gd-mobile-quantity {
        display: inline-grid;
        grid-template-columns: 42px 56px 42px;
        align-items: center;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.14);
        border-radius: 10px;
        background: #fff;
        direction: ltr;
    }

    body.woocommerce-cart .gd-mobile-qty-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        color: #173c31 !important;
        background: #f4f7f5 !important;
        font-size: 20px !important;
        line-height: 1 !important;
    }

    body.woocommerce-cart .gd-mobile-qty-input {
        display: block !important;
        width: 56px !important;
        min-width: 56px !important;
        height: 42px !important;
        min-height: 42px !important;
        margin: 0 !important;
        padding: 0 4px !important;
        border: 0 !important;
        border-left: 1px solid rgba(0, 0, 0, 0.10) !important;
        border-right: 1px solid rgba(0, 0, 0, 0.10) !important;
        border-radius: 0 !important;
        color: #17251f !important;
        background: #fff !important;
        font-size: 16px !important;
        text-align: center !important;
        appearance: textfield;
    }

    /*
     * إبقاء الجدول الأصلي داخل النموذج لكي تعمل تحديثات WooCommerce،
     * مع إخفاء صفوف المنتجات فقط بعد إنشاء التصميم البديل.
     */
    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        table-layout: auto !important;
        overflow: visible !important;
    }

    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart thead,
    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart tr.cart_item {
        display: none !important;
    }

    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart tbody,
    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart tr:not(.cart_item),
    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart td.actions {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart form.gd-mobile-cart-ready table.shop_table.cart td.actions::before {
        display: none !important;
        content: none !important;
    }

    body.woocommerce-cart table.cart td.actions .coupon {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px !important;
        padding: 12px !important;
        border: 1px solid rgba(20, 48, 39, 0.12);
        border-radius: 14px;
        background: #fff;
        box-sizing: border-box;
    }

    body.woocommerce-cart table.cart td.actions .coupon label {
        display: block !important;
        width: 100%;
    }

    body.woocommerce-cart table.cart td.actions .coupon #coupon_code,
    body.woocommerce-cart table.cart td.actions .coupon .button,
    body.woocommerce-cart table.cart td.actions > .button,
    body.woocommerce-cart button[name="update_cart"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 46px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    /* ملخص السلة بعرض الهاتف كاملاً. */
    body.woocommerce-cart .cart-collaterals,
    body.woocommerce-cart .cart_totals {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 16px 0 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .cart_totals {
        padding: 14px !important;
        border: 1px solid rgba(20, 48, 39, 0.12);
        border-radius: 16px;
        background: #fff;
    }

    body.woocommerce-cart .cart_totals table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    body.woocommerce-cart .cart_totals th,
    body.woocommerce-cart .cart_totals td {
        width: auto !important;
        max-width: 65%;
        padding: 11px 5px !important;
        color: #17251f !important;
        overflow-wrap: anywhere;
    }

    /* تنظيم قسم الشحن والإجمالي في ملخص السلة */
    body.woocommerce-cart .cart_totals table tbody,
    body.woocommerce-cart .cart_totals table tfoot {
        display: block !important;
        width: 100% !important;
    }

    body.woocommerce-cart .cart_totals table tr {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    body.woocommerce-cart .cart_totals table tr:last-child {
        margin-bottom: 0 !important;
    }

    body.woocommerce-cart .cart_totals table tr th,
    body.woocommerce-cart .cart_totals table tr td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        text-align: right !important;
    }

    body.woocommerce-cart .cart_totals table tr th {
        padding: 0 2px 8px !important;
        color: #5b655f !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
    }

    body.woocommerce-cart .cart_totals table tr td {
        padding: 14px !important;
        border: 1px solid rgba(20, 48, 39, 0.10) !important;
        border-radius: 14px !important;
        background: #f8faf8 !important;
        font-size: 15px !important;
        line-height: 1.7 !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping td {
        background: #fbfcfb !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping td ul#shipping_method {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping td ul#shipping_method li {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping td .amount,
    body.woocommerce-cart .cart_totals tr.shipping td bdi,
    body.woocommerce-cart .cart_totals tr.shipping td strong {
        color: #85a13b !important;
        font-size: 18px !important;
        font-weight: 800 !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping td .woocommerce-shipping-destination,
    body.woocommerce-cart .cart_totals tr.shipping td .shipping-calculator-button,
    body.woocommerce-cart .cart_totals tr.shipping td small {
        display: block !important;
        margin-top: 8px !important;
        color: #5b655f !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    body.woocommerce-cart .cart_totals tr.order-total td {
        background: #f1f6f3 !important;
        border-color: rgba(20, 48, 39, 0.14) !important;
    }

    body.woocommerce-cart .cart_totals tr.order-total td .amount,
    body.woocommerce-cart .cart_totals tr.order-total td bdi,
    body.woocommerce-cart .cart_totals tr.order-total td strong {
        color: #173c31 !important;
        font-size: 18px !important;
        font-weight: 800 !important;
    }

    body.woocommerce-cart .cart_totals tr.cart-subtotal td .amount,
    body.woocommerce-cart .cart_totals tr.cart-subtotal td bdi {
        font-weight: 700 !important;
    }

    body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-height: 50px !important;
        margin: 8px 0 0 !important;
        box-sizing: border-box !important;
        text-align: center;
    }

    /* ======================================================
       صفحة إتمام الطلب على الجوال
       ====================================================== */

    body.woocommerce-checkout form.checkout,
    body.woocommerce-checkout .col2-set,
    body.woocommerce-checkout .col2-set .col-1,
    body.woocommerce-checkout .col2-set .col-2,
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review,
    body.woocommerce-checkout .woocommerce-checkout-review-order,
    body.woocommerce-checkout .wc-block-components-sidebar-layout,
    body.woocommerce-checkout .wc-block-components-main,
    body.woocommerce-checkout .wc-block-components-sidebar {
        display: block !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout .form-row,
    body.woocommerce-checkout .form-row-first,
    body.woocommerce-checkout .form-row-last,
    body.woocommerce-checkout .form-row-wide {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
    }

    body.woocommerce-checkout input:not([type="checkbox"]):not([type="radio"]),
    body.woocommerce-checkout select,
    body.woocommerce-checkout textarea,
    body.woocommerce-checkout .select2-container {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 46px;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    body.woocommerce-checkout #order_review_heading {
        float: none !important;
        width: 100% !important;
        margin-top: 20px;
    }

    body.woocommerce-checkout .woocommerce-checkout-review-order-table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
    body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
        padding: 10px 5px !important;
        overflow-wrap: anywhere;
    }

    body.woocommerce-checkout #payment,
    body.woocommerce-checkout #place_order,
    body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout #place_order,
    body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
        min-height: 52px !important;
    }

    /* شريط التنقل السفلي المخصص لا يتجاوز الشاشة. */
    body.woocommerce-cart [class*="bottom-nav"],
    body.woocommerce-checkout [class*="bottom-nav"],
    body.woocommerce-cart [class*="mobile-nav"],
    body.woocommerce-checkout [class*="mobile-nav"] {
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 390px) {
    body.woocommerce-cart .gd-mobile-cart-card {
        padding: 12px;
    }

    body.woocommerce-cart .gd-mobile-cart-top {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 10px;
    }

    body.woocommerce-cart .gd-mobile-cart-image,
    body.woocommerce-cart .gd-mobile-cart-image .gd-mobile-cart-value,
    body.woocommerce-cart .gd-mobile-cart-image a,
    body.woocommerce-cart .gd-mobile-cart-image img {
        width: 68px !important;
        height: 68px !important;
        max-width: 68px !important;
    }

    body.woocommerce-cart .gd-mobile-quantity {
        grid-template-columns: 38px 50px 38px;
    }

    body.woocommerce-cart .gd-mobile-qty-button {
        width: 38px !important;
        min-width: 38px !important;
    }

    body.woocommerce-cart .gd-mobile-qty-input {
        width: 50px !important;
        min-width: 50px !important;
    }
}


/* ==========================================================
   Green Dome 2.4.2 — بطاقات مستقلة للشحن والإجمالي على الجوال
   توضع في نهاية الملف لتتغلب على تنسيقات Astra والإضافات الأخرى.
   ========================================================== */
@media (max-width: 768px) {

    body.woocommerce-cart .cart_totals {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .cart_totals h2 {
        display: block !important;
        width: 100% !important;
        margin: 0 0 14px !important;
        padding: 0 !important;
        text-align: right !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table,
    body.woocommerce-cart .cart_totals table.shop_table tbody,
    body.woocommerce-cart .cart_totals table.shop_table tfoot {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        table-layout: auto !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal,
    body.woocommerce-cart .cart_totals table.shop_table tr.shipping,
    body.woocommerce-cart .cart_totals table.shop_table tr.order-total {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 12px !important;
        padding: 14px !important;
        border: 1px solid rgba(20, 48, 39, 0.13) !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr.shipping {
        background: #fbfcfa !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr.order-total {
        margin-bottom: 0 !important;
        background: #f1f6f3 !important;
        border-color: rgba(20, 48, 39, 0.18) !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal > th,
    body.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal > td,
    body.woocommerce-cart .cart_totals table.shop_table tr.shipping > th,
    body.woocommerce-cart .cart_totals table.shop_table tr.shipping > td,
    body.woocommerce-cart .cart_totals table.shop_table tr.order-total > th,
    body.woocommerce-cart .cart_totals table.shop_table tr.order-total > td {
        display: block !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #17251f !important;
        text-align: right !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr > th {
        color: #5b655f !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        line-height: 1.5 !important;
    }

    body.woocommerce-cart .cart_totals table.shop_table tr > td {
        color: #17251f !important;
        font-size: 15px !important;
        line-height: 1.75 !important;
        overflow-wrap: anywhere !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping ul#shipping_method,
    body.woocommerce-cart .cart_totals tr.shipping ul.woocommerce-shipping-methods {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping ul#shipping_method li,
    body.woocommerce-cart .cart_totals tr.shipping ul.woocommerce-shipping-methods li {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #85a13b !important;
        font-size: 17px !important;
        font-weight: 800 !important;
        line-height: 1.6 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping input[type="radio"] {
        flex: 0 0 auto !important;
        margin-top: 6px !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping label {
        display: block !important;
        min-width: 0 !important;
        color: #85a13b !important;
        font-size: 17px !important;
        font-weight: 800 !important;
        line-height: 1.6 !important;
        overflow-wrap: anywhere !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping .woocommerce-shipping-destination,
    body.woocommerce-cart .cart_totals tr.shipping .shipping-calculator-button,
    body.woocommerce-cart .cart_totals tr.shipping .woocommerce-shipping-calculator,
    body.woocommerce-cart .cart_totals tr.shipping small {
        display: block !important;
        width: 100% !important;
        margin: 9px 0 0 !important;
        color: #5b655f !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 1.75 !important;
        text-align: right !important;
        overflow-wrap: anywhere !important;
    }

    body.woocommerce-cart .cart_totals tr.shipping .shipping-calculator-button {
        color: #85a13b !important;
        font-weight: 700 !important;
        text-decoration: none !important;
    }

    body.woocommerce-cart .cart_totals tr.cart-subtotal .amount,
    body.woocommerce-cart .cart_totals tr.cart-subtotal bdi {
        color: #173c31 !important;
        font-size: 17px !important;
        font-weight: 750 !important;
    }

    body.woocommerce-cart .cart_totals tr.order-total .amount,
    body.woocommerce-cart .cart_totals tr.order-total bdi,
    body.woocommerce-cart .cart_totals tr.order-total strong {
        color: #173c31 !important;
        font-size: 20px !important;
        font-weight: 900 !important;
    }

    body.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 14px 0 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* دعم WooCommerce Cart Blocks */
    body.woocommerce-cart .wc-block-components-totals-wrapper,
    body.woocommerce-cart .wc-block-components-totals-item,
    body.woocommerce-cart .wc-block-components-totals-shipping,
    body.woocommerce-cart .wc-block-components-totals-footer-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .wc-block-components-totals-item,
    body.woocommerce-cart .wc-block-components-totals-shipping,
    body.woocommerce-cart .wc-block-components-totals-footer-item {
        margin: 0 0 12px !important;
        padding: 14px !important;
        border: 1px solid rgba(20, 48, 39, 0.13) !important;
        border-radius: 14px !important;
        background: #ffffff !important;
    }

    body.woocommerce-cart .wc-block-components-totals-footer-item {
        background: #f1f6f3 !important;
        border-color: rgba(20, 48, 39, 0.18) !important;
    }
}


/* ==========================================================
   Green Dome 2.4.3 — ملخص جوال نظيف بلا تكرار للعناوين
   ========================================================== */
.gd-mobile-totals-cards {
    display: none;
}

@media (max-width: 768px) {
    body.woocommerce-cart .cart_totals.gd-mobile-totals-ready table.shop_table {
        display: none !important;
    }

    body.woocommerce-cart .gd-mobile-totals-cards {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-summary-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 16px;
        border: 1px solid rgba(20, 48, 39, 0.13);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
        direction: rtl;
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-summary-label {
        min-width: 0;
        color: #17251f;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.45;
        text-align: right;
    }

    body.woocommerce-cart .gd-mobile-summary-value {
        min-width: 0;
        color: #173c31;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.45;
        text-align: left;
        white-space: nowrap;
    }

    body.woocommerce-cart .gd-mobile-summary-value .amount,
    body.woocommerce-cart .gd-mobile-summary-value bdi,
    body.woocommerce-cart .gd-mobile-summary-value strong {
        color: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
    }

    body.woocommerce-cart .gd-mobile-summary-shipping {
        background: #fbfcfa;
    }

    body.woocommerce-cart .gd-mobile-summary-shipping .gd-mobile-summary-value {
        color: #85a13b;
        font-size: 18px;
    }

    body.woocommerce-cart .gd-mobile-summary-total {
        background: #f1f6f3;
        border-color: rgba(20, 48, 39, 0.18);
    }

    body.woocommerce-cart .gd-mobile-summary-total .gd-mobile-summary-label,
    body.woocommerce-cart .gd-mobile-summary-total .gd-mobile-summary-value {
        color: #173c31;
        font-size: 19px;
        font-weight: 900;
    }

    body.woocommerce-cart .gd-mobile-summary-notes {
        grid-column: 1 / -1;
        width: 100%;
        margin: 2px 0 0;
        padding-top: 12px;
        border-top: 1px solid rgba(20, 48, 39, 0.08);
        color: #5b655f;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.75;
        text-align: right;
        box-sizing: border-box;
    }

    body.woocommerce-cart .gd-mobile-summary-notes p {
        margin: 0 0 7px !important;
        color: inherit !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }

    body.woocommerce-cart .gd-mobile-summary-notes p:last-child {
        margin-bottom: 0 !important;
    }

    body.woocommerce-cart .gd-mobile-shipping-calculator {
        display: inline-block !important;
        margin: 0 !important;
        color: #85a13b !important;
        font-size: 14px !important;
        font-weight: 750 !important;
        text-decoration: none !important;
    }
}
