body .wd-product .wd-add-btn.wd-add-btn-replace {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

body .wd-product button.wci-accordion-header,
body .wd-product .wci-accordion-header {
    display: none !important;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity {
    grid-column: 1;
    display: inline-grid;
    grid-template-columns: 36px 48px 36px;
    min-width: 120px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #dddff1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 53, 86, 0.08);
    align-self: stretch;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    background: #f6f4ff;
    color: #5d34c6;
    font-size: 20px;
    font-weight: 700;
    box-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"]:hover,
body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"]:focus {
    background: #ede8ff;
    color: #452694;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"]:active {
    transform: scale(0.97);
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input.qty {
    width: 48px;
    min-width: 48px;
    min-height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-inline: 1px solid #ece8fb;
    background: #ffffff;
    color: #24324a;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    box-shadow: none;
    -moz-appearance: textfield;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input.qty::-webkit-outer-spin-button,
body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input.qty::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity:focus-within {
    border-color: #a18bff;
    box-shadow: 0 10px 22px rgba(79, 44, 171, 0.12), 0 0 0 3px rgba(100, 56, 209, 0.1);
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop {
    grid-column: 2;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6438d1 0%, #4f2cab 52%, #452694 100%);
    background-size: 160% 160%;
    background-position: 0 50%;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(79, 44, 171, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: center;
    text-transform: uppercase;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-position 0.4s ease, filter 0.28s ease;
    will-change: transform, box-shadow, background-position;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:first-child {
    grid-column: 1 / -1;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop::before {
    content: none;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 0;
    transform: none;
    transition: none;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:hover span,
body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:focus span {
    transform: none;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .product_type_simple.add_to_cart_button span::before,
body .wd-product .wd-add-btn.wd-add-btn-replace > .product_type_grouped.add_to_cart_button span::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: url("../images/add-to-cart-icon.svg") center/18px 18px no-repeat;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:hover,
body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:focus {
    color: #ffffff;
    background-position: 100% 50%;
    filter: saturate(1.08) brightness(1.04);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(79, 44, 171, 0.24), 0 0 0 3px rgba(100, 56, 209, 0.12);
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(79, 44, 171, 0.18);
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #bfe7ca;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f3fff7 100%);
    color: #178b43;
    box-shadow: 0 8px 18px rgba(60, 186, 84, 0.1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop .wd-whatsapp-buy-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop .wd-whatsapp-buy-button__icon svg {
    display: block;
    width: 22px;
    height: 21px;
}

body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop:hover,
body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop:focus {
    color: #14783a;
    border-color: #3cba54;
    background: linear-gradient(180deg, #ffffff 0%, #ecfff2 100%);
    box-shadow: 0 12px 22px rgba(60, 186, 84, 0.14);
    transform: translateY(-1px);
}

body.search-results .woocommerce-products-header__title.page-title,
body.search-results .wd-woo-page-title .title,
body.search-results .wd-page-title .title,
body.single-product .related-products .wd-el-title.title.element-title,
body.single-product .related.products > h2 {
    margin-bottom: 24px;
    color: #4f2cab;
    font-size: clamp(32px, 4.4vw, 58px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

body.single-product .related-products .wd-el-title.title.element-title,
body.single-product .related.products > h2 {
    text-align: center;
}

body.search-results .woocommerce-products-header,
body.search-results .wd-woo-page-title {
    margin-bottom: 28px;
}

body.home .wd-products-element.wd-carousel-container .wd-nav-pagin-item span {
    background-color: #efeafe;
    border-color: #ccbdf6;
}

body.home .wd-products-element.wd-carousel-container .wd-nav-pagin-item.wd-active span {
    background-color: #5d34c6;
    border-color: #5d34c6;
    transform: scale(1.25);
    box-shadow: 0 0 0 4px rgba(93, 52, 198, 0.14);
}

body.home .wd-products-element.wd-carousel-container .wd-nav-pagin-item:not(.wd-active):hover span {
    background-color: #e2d8fb;
    border-color: #8f6ee6;
}

body.home .wd-products-element.wd-carousel-container .wd-nav-arrows .wd-arrow-inner {
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: #5d34c6;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(79, 44, 171, 0.22);
}

body.home .wd-products-element.wd-carousel-container .wd-nav-arrows .wd-arrow-inner:hover {
    color: #ffffff;
    background: #452694;
    box-shadow: 0 16px 28px rgba(79, 44, 171, 0.28);
}

body.home .wd-products-element.wd-carousel-container .wd-nav-arrows .wd-disabled .wd-arrow-inner {
    color: rgba(255, 255, 255, 0.68);
    background: #b8a6ea;
}

@media (max-width: 767px) {
    body .wd-product .wd-add-btn.wd-add-btn-replace {
        grid-template-columns: minmax(0, 1fr) 60px;
        gap: 8px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity {
        width: 100%;
        min-width: 0;
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        border-radius: 10px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"],
    body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input.qty,
    body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop,
    body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop {
        min-height: 42px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input[type="button"] {
        font-size: 18px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .quantity input.qty {
        width: auto;
        min-width: 0;
        font-size: 15px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop {
        padding: 0 8px;
        border-radius: 10px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .product_type_simple.add_to_cart_button span::before,
    body .wd-product .wd-add-btn.wd-add-btn-replace > .product_type_grouped.add_to_cart_button span::before {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        background-size: 16px 16px;
    }

    body .wd-product .wd-add-btn.wd-add-btn-replace > .add-to-cart-loop,
    body .wd-product .wd-add-btn.wd-add-btn-replace > .wd-whatsapp-buy-button--loop {
        font-size: 11px;
    }

    body.search-results .woocommerce-products-header__title.page-title,
    body.search-results .wd-woo-page-title .title,
    body.search-results .wd-page-title .title,
    body.single-product .related-products .wd-el-title.title.element-title,
    body.single-product .related.products > h2 {
        margin-bottom: 18px;
        font-size: clamp(26px, 9vw, 40px);
    }

    body.home .wd-products-element.wd-carousel-container .wd-nav-arrows .wd-arrow-inner {
        width: 42px;
        height: 42px;
    }
}
