a.added_to_cart {
    display: none !important;
}

/* ---------------------------------------------------------
   Woo cart spacing (mobile-first gutter consistency)
   --------------------------------------------------------- */
body.woocommerce-cart .wp-site-blocks > main.wp-block-group {
    padding-top: clamp(18px, 4vw, 36px);
    padding-bottom: clamp(28px, 6vw, 56px);
}

body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wp-block-woocommerce-cart.alignwide,
body.woocommerce-cart .wc-block-store-notices.alignwide {
    width: min(1160px, calc(100% - 1.25rem));
    margin-left: auto;
    margin-right: auto;
}

/* Keep cart product links consistent with theme text color. */
body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a,
body.woocommerce-cart .woocommerce-cart-form .product-name a,
.wp-block-woocommerce-cart .wc-block-components-product-name,
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a,
.wp-block-woocommerce-cart .woocommerce-cart-form .product-name a,
.wp-block-woocommerce-cart .wc-block-cart-item__product a {
    color: #1a1a2e;
    text-decoration: none;
}

body.woocommerce-cart .wc-block-components-product-name:visited,
body.woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:visited,
body.woocommerce-cart .woocommerce-cart-form .product-name a:visited,
.wp-block-woocommerce-cart .wc-block-components-product-name:visited,
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:visited,
.wp-block-woocommerce-cart .woocommerce-cart-form .product-name a:visited,
.wp-block-woocommerce-cart .wc-block-cart-item__product a:visited {
    color: #1a1a2e;
}

body.woocommerce-cart .wc-block-components-product-name:hover,
body.woocommerce-cart .wc-block-components-product-name:focus-visible,
body.woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:hover,
body.woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:focus-visible,
body.woocommerce-cart .woocommerce-cart-form .product-name a:hover,
body.woocommerce-cart .woocommerce-cart-form .product-name a:focus-visible,
.wp-block-woocommerce-cart .wc-block-components-product-name:hover,
.wp-block-woocommerce-cart .wc-block-components-product-name:focus-visible,
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:hover,
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a:focus-visible,
.wp-block-woocommerce-cart .woocommerce-cart-form .product-name a:hover,
.wp-block-woocommerce-cart .woocommerce-cart-form .product-name a:focus-visible,
.wp-block-woocommerce-cart .wc-block-cart-item__product a:hover,
.wp-block-woocommerce-cart .wc-block-cart-item__product a:focus-visible {
    color: #1a1a2e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------------------------------------------------------
   Woo archive spacing (shop/category/tag)
   --------------------------------------------------------- */
body.post-type-archive-product .wp-site-blocks > main.wp-block-group,
body.tax-product_cat .wp-site-blocks > main.wp-block-group,
body.tax-product_tag .wp-site-blocks > main.wp-block-group {
    padding-top: clamp(18px, 2.5vw, 32px);
    padding-bottom: clamp(40px, 5vw, 72px);
}

body.post-type-archive-product .wc-block-store-notices.alignwide,
body.post-type-archive-product .wp-block-breadcrumbs.alignwide,
body.post-type-archive-product .wp-block-query-title.alignwide,
body.post-type-archive-product .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
body.post-type-archive-product .wp-block-woocommerce-product-collection.alignwide,
body.tax-product_cat .wc-block-store-notices.alignwide,
body.tax-product_cat .wp-block-breadcrumbs.alignwide,
body.tax-product_cat .wp-block-query-title.alignwide,
body.tax-product_cat .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
body.tax-product_cat .wp-block-woocommerce-product-collection.alignwide,
body.tax-product_tag .wc-block-store-notices.alignwide,
body.tax-product_tag .wp-block-breadcrumbs.alignwide,
body.tax-product_tag .wp-block-query-title.alignwide,
body.tax-product_tag .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
body.tax-product_tag .wp-block-woocommerce-product-collection.alignwide {
    width: min(1160px, calc(100% - 1.25rem));
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------
   Woo product archive spacing (shop/category/tag pages)
   --------------------------------------------------------- */
body.post-type-archive-product .wp-block-breadcrumbs,
body.tax-product_cat .wp-block-breadcrumbs,
body.tax-product_tag .wp-block-breadcrumbs {
    margin-bottom: 0.65rem;
}

body.post-type-archive-product .wp-block-query-title,
body.tax-product_cat .wp-block-query-title,
body.tax-product_tag .wp-block-query-title {
    margin-bottom: 0.9rem;
}

body.post-type-archive-product .wp-block-woocommerce-store-notices,
body.tax-product_cat .wp-block-woocommerce-store-notices,
body.tax-product_tag .wp-block-woocommerce-store-notices {
    margin-bottom: 0.75rem;
}

body.post-type-archive-product .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
body.tax-product_cat .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
body.tax-product_tag .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex {
    margin-bottom: 1.35rem;
}

body.post-type-archive-product .wp-block-woocommerce-product-collection,
body.tax-product_cat .wp-block-woocommerce-product-collection,
body.tax-product_tag .wp-block-woocommerce-product-collection {
    margin-top: 0.5rem;
}

body.post-type-archive-product .wc-block-product-template,
body.tax-product_cat .wc-block-product-template,
body.tax-product_tag .wc-block-product-template {
    row-gap: clamp(1.5rem, 2.2vw, 2.3rem);
    column-gap: clamp(1rem, 1.8vw, 1.8rem);
}

body.post-type-archive-product .wc-block-product .wp-block-post-title,
body.tax-product_cat .wc-block-product .wp-block-post-title,
body.tax-product_tag .wc-block-product .wp-block-post-title {
    margin-top: 1rem;
    margin-bottom: 0.65rem;
    padding-inline: 0.4rem;
}

body.post-type-archive-product .wc-block-product .wp-block-post-title a,
body.tax-product_cat .wc-block-product .wp-block-post-title a,
body.tax-product_tag .wc-block-product .wp-block-post-title a {
    color: #1a1a2e;
    text-decoration: none;
}

body.post-type-archive-product .wc-block-product .wp-block-post-title a:hover,
body.post-type-archive-product .wc-block-product .wp-block-post-title a:focus-visible,
body.tax-product_cat .wc-block-product .wp-block-post-title a:hover,
body.tax-product_cat .wc-block-product .wp-block-post-title a:focus-visible,
body.tax-product_tag .wc-block-product .wp-block-post-title a:hover,
body.tax-product_tag .wc-block-product .wp-block-post-title a:focus-visible {
    color: #1a1a2e;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

@media (max-width: 768px) {
    body.woocommerce-cart,
    body.woocommerce-cart .wp-site-blocks,
    body.woocommerce-cart .wp-site-blocks > main {
        overflow-x: clip;
    }

    body.woocommerce-cart .wp-site-blocks > main {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-cart .wp-block-woocommerce-cart.alignwide,
    body.woocommerce-cart .wc-block-store-notices.alignwide {
        width: min(100%, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
        margin-left: auto;
        margin-right: auto;
    }

    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar {
        width: 100%;
        max-width: 100%;
    }

    body.post-type-archive-product,
    body.post-type-archive-product .wp-site-blocks,
    body.post-type-archive-product .wp-site-blocks > main,
    body.tax-product_cat,
    body.tax-product_cat .wp-site-blocks,
    body.tax-product_cat .wp-site-blocks > main,
    body.tax-product_tag,
    body.tax-product_tag .wp-site-blocks,
    body.tax-product_tag .wp-site-blocks > main {
        overflow-x: clip;
    }

    body.post-type-archive-product .wp-site-blocks > main,
    body.tax-product_cat .wp-site-blocks > main,
    body.tax-product_tag .wp-site-blocks > main {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    body.post-type-archive-product .wc-block-store-notices.alignwide,
    body.post-type-archive-product .wp-block-breadcrumbs.alignwide,
    body.post-type-archive-product .wp-block-query-title.alignwide,
    body.post-type-archive-product .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
    body.post-type-archive-product .wp-block-woocommerce-product-collection.alignwide,
    body.tax-product_cat .wc-block-store-notices.alignwide,
    body.tax-product_cat .wp-block-breadcrumbs.alignwide,
    body.tax-product_cat .wp-block-query-title.alignwide,
    body.tax-product_cat .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
    body.tax-product_cat .wp-block-woocommerce-product-collection.alignwide,
    body.tax-product_tag .wc-block-store-notices.alignwide,
    body.tax-product_tag .wp-block-breadcrumbs.alignwide,
    body.tax-product_tag .wp-block-query-title.alignwide,
    body.tax-product_tag .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
    body.tax-product_tag .wp-block-woocommerce-product-collection.alignwide {
        width: min(100%, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
        margin-left: auto;
        margin-right: auto;
    }

    body.post-type-archive-product .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
    body.tax-product_cat .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex,
    body.tax-product_tag .wp-site-blocks main > .wp-block-group.alignwide.is-layout-flex {
        row-gap: 0.75rem;
    }
}
