/* SgAiSolution WooCommerce Cart Cleaner Pro v1.2 — Cart + product add-to-cart presentation */
body.sgai-cart-pro-v12 {
    --sgai-ink: #151515;
    --sgai-muted: #666;
    --sgai-line: #e7e7e7;
    --sgai-panel: #ffffff;
    --sgai-soft: #f7f7f8;
    --sgai-accent: #111111;
    --sgai-success: #16803c;
}

body.sgai-cart-pro-v12 .woocommerce {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 22px 50px;
    color: var(--sgai-ink);
}

/* Theme page titles are often subdued/duplicated; the plugin adds a cart-specific hero. */
body.sgai-cart-pro-v12 .sgai-cart-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 12px 0 28px;
    padding: 26px 28px;
    border: 1px solid var(--sgai-line);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #f6f6f6 100%);
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
}

body.sgai-cart-pro-v12 .sgai-cart-kicker {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--sgai-muted);
}

body.sgai-cart-pro-v12 .sgai-cart-intro h1 {
    margin: 0 0 7px;
    font-size: clamp(32px, 4.2vw, 50px);
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--sgai-ink);
}

body.sgai-cart-pro-v12 .sgai-cart-intro p {
    margin: 0;
    max-width: 690px;
    font-size: 15px;
    color: var(--sgai-muted);
}

body.sgai-cart-pro-v12 .sgai-cart-intro-badge {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--sgai-line);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Desktop: Cart items + sticky order summary */
body.sgai-cart-pro-v12 .sgai-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, .85fr);
    gap: 28px;
    align-items: start;
}

body.sgai-cart-pro-v12 .woocommerce-cart-form,
body.sgai-cart-pro-v12 .cart-collaterals {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

body.sgai-cart-pro-v12 .woocommerce-cart-form {
    min-width: 0;
}

body.sgai-cart-pro-v12 .cart-collaterals {
    position: sticky;
    top: 26px;
}

body.sgai-cart-pro-v12 table.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--sgai-line);
    border-radius: 16px;
    background: var(--sgai-panel);
    box-shadow: 0 10px 28px rgba(0,0,0,.055);
}

body.sgai-cart-pro-v12 table.shop_table th {
    padding: 15px 14px;
    border: 0;
    border-bottom: 1px solid var(--sgai-line);
    background: var(--sgai-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #474747;
}

body.sgai-cart-pro-v12 table.shop_table td {
    padding: 18px 14px;
    vertical-align: middle;
    border-color: var(--sgai-line);
}

body.sgai-cart-pro-v12 .product-name a {
    display: inline-block;
    color: var(--sgai-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
}

body.sgai-cart-pro-v12 .product-name a:hover { text-decoration: underline; }

body.sgai-cart-pro-v12 .product-thumbnail img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--sgai-line);
}

body.sgai-cart-pro-v12 .product-price,
body.sgai-cart-pro-v12 .product-subtotal {
    font-weight: 800;
    color: var(--sgai-ink);
}

body.sgai-cart-pro-v12 .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #6d6d6d !important;
    background: #f3f3f3 !important;
    font-size: 23px;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}
body.sgai-cart-pro-v12 .product-remove a.remove:hover {
    transform: scale(1.05);
    background: #e8e8e8 !important;
}

body.sgai-cart-pro-v12 .quantity .qty {
    width: 78px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #d8d8d8;
    border-radius: 9px;
    background: #fff;
    font-weight: 700;
    text-align: center;
}

body.sgai-cart-pro-v12 td.actions {
    padding: 16px !important;
    background: #fbfbfb;
}

body.sgai-cart-pro-v12 .coupon {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

body.sgai-cart-pro-v12 .coupon .input-text {
    min-height: 46px;
    padding: 9px 12px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 9px !important;
    background: #fff;
}

body.sgai-cart-pro-v12 .button,
body.sgai-cart-pro-v12 button.button,
body.sgai-cart-pro-v12 a.button {
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 9px !important;
    font-weight: 800 !important;
}

body.sgai-cart-pro-v12 .cart_totals {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 24px;
    border: 1px solid var(--sgai-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0,0,0,.07);
}

body.sgai-cart-pro-v12 .cart_totals h2 {
    margin: 0 0 18px;
    padding: 0;
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

body.sgai-cart-pro-v12 .cart_totals table.shop_table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

body.sgai-cart-pro-v12 .cart_totals table.shop_table th,
body.sgai-cart-pro-v12 .cart_totals table.shop_table td {
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--sgai-line);
    background: transparent;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
}

body.sgai-cart-pro-v12 .cart_totals table.shop_table td {
    text-align: right;
    font-weight: 800;
}

body.sgai-cart-pro-v12 .cart_totals .order-total th,
body.sgai-cart-pro-v12 .cart_totals .order-total td {
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: 18px;
    border-bottom: 0;
}

body.sgai-cart-pro-v12 .wc-proceed-to-checkout {
    padding: 14px 0 0 !important;
}

body.sgai-cart-pro-v12 .wc-proceed-to-checkout .checkout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    margin: 0 !important;
    padding: 15px 18px !important;
    border-radius: 11px !important;
    background: var(--sgai-success) !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    letter-spacing: .01em;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(22,128,60,.18);
}

body.sgai-cart-pro-v12 .wc-proceed-to-checkout .checkout-button:hover {
    filter: brightness(.94);
}

body.sgai-cart-pro-v12 .sgai-checkout-reassurance {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--sgai-line);
}

body.sgai-cart-pro-v12 .sgai-checkout-reassurance > div {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 9px;
    align-items: start;
    color: var(--sgai-ink);
}
body.sgai-cart-pro-v12 .sgai-checkout-reassurance span { grid-row: 1 / span 2; }
body.sgai-cart-pro-v12 .sgai-checkout-reassurance strong { font-size: 13px; line-height: 1.25; }
body.sgai-cart-pro-v12 .sgai-checkout-reassurance small { font-size: 11px; color: var(--sgai-muted); line-height: 1.35; }

body.sgai-cart-pro-v12 .woocommerce-message,
body.sgai-cart-pro-v12 .woocommerce-info,
body.sgai-cart-pro-v12 .woocommerce-error {
    border-radius: 10px;
}

/* Mobile: compact product cards and stacked order summary. */
@media (max-width: 820px) {
    body.sgai-cart-pro-v12 .woocommerce { padding: 0 12px 36px; }

    body.sgai-cart-pro-v12 .sgai-cart-intro {
        display: block;
        margin: 8px 0 18px;
        padding: 20px 18px;
        border-radius: 14px;
    }
    body.sgai-cart-pro-v12 .sgai-cart-intro h1 { font-size: 34px; }
    body.sgai-cart-pro-v12 .sgai-cart-intro-badge { display: inline-block; margin-top: 14px; }

    body.sgai-cart-pro-v12 .sgai-cart-layout {
        display: block;
    }

    body.sgai-cart-pro-v12 .cart-collaterals {
        position: static;
        margin-top: 18px !important;
    }

    body.sgai-cart-pro-v12 table.shop_table_responsive,
    body.sgai-cart-pro-v12 table.shop_table_responsive tbody,
    body.sgai-cart-pro-v12 table.shop_table_responsive tr,
    body.sgai-cart-pro-v12 table.shop_table_responsive td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body.sgai-cart-pro-v12 table.shop_table_responsive thead { display: none; }

    body.sgai-cart-pro-v12 table.shop_table_responsive {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        background: transparent;
    }

    body.sgai-cart-pro-v12 table.shop_table_responsive tr.cart_item {
        position: relative;
        margin: 0 0 13px;
        padding: 15px;
        border: 1px solid var(--sgai-line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 20px rgba(0,0,0,.05);
    }

    body.sgai-cart-pro-v12 table.shop_table_responsive tr.cart_item td {
        min-height: 42px;
        padding: 9px 0;
        border: 0;
        border-bottom: 1px solid #efefef;
        text-align: right !important;
    }
    body.sgai-cart-pro-v12 table.shop_table_responsive tr.cart_item td:last-child { border-bottom: 0; }

    body.sgai-cart-pro-v12 table.shop_table_responsive tr.cart_item td::before {
        float: left;
        margin-right: 10px;
        color: #555;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
        min-height: 0;
        padding: 0;
        border: 0;
        z-index: 2;
    }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-remove::before { display: none; }

    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-thumbnail {
        display: block;
        float: left;
        width: 76px;
        min-height: 76px;
        margin: 0 12px 8px 0;
        padding: 0;
        border-bottom: 0;
        text-align: left !important;
    }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-thumbnail::before { display: none; }
    body.sgai-cart-pro-v12 .product-thumbnail img { width: 72px; height: 72px; }

    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-name {
        min-height: 76px;
        padding: 3px 42px 8px 0;
        border-bottom: 0;
        text-align: left !important;
    }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-name::before { display: none; }
    body.sgai-cart-pro-v12 .product-name a { font-size: 15px; }

    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-price { clear: both; }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-price::before { content: "Price"; }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-quantity::before { content: "Quantity"; }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.product-subtotal::before { content: "Subtotal"; }

    body.sgai-cart-pro-v12 table.shop_table_responsive tr:not(.cart_item) td.actions {
        display: block;
        padding: 14px !important;
        border: 1px solid var(--sgai-line);
        border-radius: 14px;
        background: #fff;
    }

    body.sgai-cart-pro-v12 .coupon {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }
    body.sgai-cart-pro-v12 .coupon .input-text,
    body.sgai-cart-pro-v12 .coupon .button,
    body.sgai-cart-pro-v12 table.shop_table_responsive td.actions > .button {
        width: 100% !important;
        margin: 0 !important;
    }
    body.sgai-cart-pro-v12 table.shop_table_responsive td.actions > .button { margin-top: 9px !important; }

    body.sgai-cart-pro-v12 .cart_totals { padding: 19px; border-radius: 14px; }
    body.sgai-cart-pro-v12 .wc-proceed-to-checkout .checkout-button { min-height: 58px; font-size: 17px !important; }
}


/* Product-page add-to-cart success notice: clearer, stronger and conversion-focused. */
body.sgai-product-cart-notice-pro.single-product .woocommerce-notices-wrapper {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
}

body.sgai-product-cart-notice-pro.single-product .woocommerce-message {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    margin: 18px 0 28px !important;
    padding: 16px 190px 16px 58px !important;
    border: 1px solid #dce8df !important;
    border-top: 4px solid #16803c !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #202020 !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.07);
}

body.sgai-product-cart-notice-pro.single-product .woocommerce-message::before {
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #16803c !important;
    font-size: 20px;
}

body.sgai-product-cart-notice-pro.single-product .woocommerce-message .button,
body.sgai-product-cart-notice-pro.single-product .woocommerce-message a.button,
body.sgai-product-cart-notice-pro.single-product .woocommerce-message a.wc-forward {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 145px;
    min-height: 44px;
    margin: 0 !important;
    padding: 11px 20px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 7px 18px rgba(0,0,0,.16);
}

body.sgai-product-cart-notice-pro.single-product .woocommerce-message .button:hover,
body.sgai-product-cart-notice-pro.single-product .woocommerce-message a.wc-forward:hover {
    background: #16803c !important;
    color: #fff !important;
}

@media (max-width: 700px) {
    body.sgai-product-cart-notice-pro.single-product .woocommerce-message {
        display: block;
        min-height: 0;
        padding: 17px 16px 16px 50px !important;
        margin: 12px 10px 20px !important;
        font-size: 14px !important;
    }

    body.sgai-product-cart-notice-pro.single-product .woocommerce-message::before {
        left: 17px !important;
        top: 19px !important;
        transform: none;
    }

    body.sgai-product-cart-notice-pro.single-product .woocommerce-message .button,
    body.sgai-product-cart-notice-pro.single-product .woocommerce-message a.wc-forward {
        position: static;
        transform: none;
        width: 100%;
        min-height: 48px;
        margin-top: 14px !important;
    }
}

/* v1.3: Premium Add to Cart button on single-product pages. */
body.sgai-product-cart-notice-pro.single-product form.cart {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

body.sgai-product-cart-notice-pro.single-product form.cart .quantity {
    margin: 0 !important;
}

body.sgai-product-cart-notice-pro.single-product form.cart .quantity .qty {
    min-width: 76px;
    height: 56px;
    padding: 8px 10px;
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.025);
}

body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button,
body.sgai-product-cart-notice-pro.single-product button.single_add_to_cart_button.button,
body.sgai-product-cart-notice-pro.single-product .single_add_to_cart_button.button.alt {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    min-height: 56px;
    margin: 0 !important;
    padding: 15px 28px !important;
    border: 2px solid #111 !important;
    border-radius: 12px !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: .055em;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(0,0,0,.16);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button:hover,
body.sgai-product-cart-notice-pro.single-product button.single_add_to_cart_button.button:hover,
body.sgai-product-cart-notice-pro.single-product .single_add_to_cart_button.button.alt:hover {
    background: #16803c !important;
    border-color: #16803c !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(22,128,60,.24);
}

body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button:focus-visible {
    outline: 3px solid rgba(22,128,60,.28) !important;
    outline-offset: 3px;
}

body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button.disabled,
body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button:disabled {
    opacity: .55 !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    body.sgai-product-cart-notice-pro.single-product form.cart {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 10px;
        width: 100%;
    }

    body.sgai-product-cart-notice-pro.single-product form.cart .quantity,
    body.sgai-product-cart-notice-pro.single-product form.cart .quantity .qty {
        width: 100% !important;
        min-width: 0;
    }

    body.sgai-product-cart-notice-pro.single-product form.cart .single_add_to_cart_button,
    body.sgai-product-cart-notice-pro.single-product button.single_add_to_cart_button.button,
    body.sgai-product-cart-notice-pro.single-product .single_add_to_cart_button.button.alt {
        width: 100% !important;
        min-width: 0;
        min-height: 58px;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 14px !important;
    }
}
