/* ================================
   NF Add to Cart (ProductPageWidgets)
   ================================ */

/* Wrapper (old: .customAddToCart) */
.nf-atc {
    border: 1px solid #d4d4d4;
    border-radius: 20px;
    padding: 20px;
    background: #fff;
}

/* Top price row (old: .topInfo / .mainsale.pricetop / .regularcrossed) */
.nf-atc__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 10px;
}
.nf-atc__price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}
.nf-atc__main {
    color: #000;
    font-weight: 700;
    font-size: 28px;
}
.nf-atc__regular,
.nf-atc__regular .woocommerce-Price-amount,
.nf-atc__regular.crosslined .woocommerce-Price-amount {
    color: #000;
    text-decoration: line-through;
    font-size: 20px;
}
.nf-atc__badge-total {
    color: #de1528;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Quantity cards (old: .offerpaket, .qSelect, .paket, .label, .packageInfo, .packagePrice) */
.nf-atc__qselect { display: grid; gap: 0; }
.nf-atc__qselect.grid-1 { grid-template-columns: 1fr; }
.nf-atc__qselect.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nf-atc__qselect.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nf-atc__qselect label {
    display: block;
    position: relative;
}
.nf-atc__qselect .nf-atc__qty {
    position: absolute;
    top: .5rem;
    left: .5rem;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    z-index: 10;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #d4d4d4;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s ease;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.nf-atc__qselect .nf-atc__qty:checked {
    background: #1FB15A;
    border-color: #1FB15A;
    border-width: 1px;
    box-shadow: inset 0 0 0 3px #fff;
}
.nf-atc__pack {
    background-color: #f9f9fa;
    border: 1px solid gainsboro;
    border-radius: 0;
    padding: .9rem .9rem .75rem;
    position: relative;
    padding-top: 2.5rem;
    margin-top: 0;
    border-right: none;
}
.nf-atc__qselect label:first-child .nf-atc__pack {
    border-radius: 12px 0 0 12px;
    border-left: 1px solid gainsboro;
}
.nf-atc__qselect label:last-child .nf-atc__pack {
    border-radius: 0 12px 12px 0;
    border-right: 1px solid gainsboro;
}
.nf-atc__qselect label:only-child .nf-atc__pack {
    border-radius: 12px;
    border-right: 1px solid gainsboro;
    width: fit-content;
}
.nf-atc__packInfo {
    font-weight: 600;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: 1.75rem;
    margin-top: -1.5rem;
}
.nf-atc__packInfo strong {
    margin: 0;
    line-height: 1;
}
.nf-atc__packPrice .price { display: inline-block; }
.nf-atc__badge {
    position: absolute; top: .5rem; right: .5rem;
    font-size: .8rem; line-height: 1;
    background: #fff; border: 1px solid gainsboro; border-radius: 999px;
    padding: .15rem .4rem;
}
.nf-atc__choice {
    margin-top: 0;
    font-size: .75rem;
    color: #fff;
    background: #000;
    padding: .25rem .5rem;
    border-radius: 0 0 50px 50px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}
.nf-atc__qselect label.col.top {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.nf-atc__qselect label.col.top .nf-atc__pack {
    border-radius: 0;
    border-right: none;
}
.nf-atc__qselect label.col.top:first-child .nf-atc__pack {
    border-radius: 12px 0 0 0;
    border-left: 1px solid gainsboro;
}
.nf-atc__qselect label.col.top:last-child .nf-atc__pack {
    border-radius: 0 12px 0 0;
    border-right: 1px solid gainsboro;
}
.nf-atc__qselect label.col.top:only-child .nf-atc__pack {
    border-radius: 12px 12px 0 0;
    border-right: 1px solid gainsboro;
}

/* Tabs group (old: .tabsItems.grid-2.addtocartsub) */
.nf-atc__tabs { margin-top: .75rem; }
.nf-atc__tabstrip {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem;
    background-color: #f9f9fa;
    border: 1px solid #fff;
    border-radius: 50px;
}
.nf-atc__tab {
    text-align: center;
    background-color: #f9f9fa;
    border: none;
    border-radius: 50px;
    padding: .4rem .75rem;
    cursor: pointer;
    user-select: none;
}
.nf-atc__tab.active { background-color: #d4d4d4; }
.nf-atc__tab--onetime { /* old: .onetimepursch */ }
.nf-atc__tab--subscr  { /* old: .subscraddtocart */ }

/* Tabs content (old: .contWrap.onetimepurchwrap / .onetimeContent / .subscrContent) */
.nf-atc__content { background: #fff; padding: .75rem 0 0; border: 0; }
.nf-atc__content--onetime { position: relative; }
.nf-atc__content--subscr { display: none; }

/* Subscription list with checkmarks */
.nf-atc__subscr-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}
.nf-atc__subscr-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.nf-atc__subscr-list li:last-child {
    margin-bottom: 0;
}
.nf-atc__subscr-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('../../../images/product-page/checkmarkprodcutpage.svg');
    background-repeat: no-repeat;
    background-position: center;
}
.nf-atc__subscr-list .nf-atc__subscr-delivery {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap;
}
.nf-atc__subscr-list .nf-atc__subscr-delivery span {
    white-space: nowrap;
}
.nf-atc__subscr-list .nf-atc__period {
    padding: 0rem .75rem;
    border: 1px solid #d4d4d4;
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23000' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .5rem center;
    background-size: 12px 8px;
    padding-right: 2rem;
    width: 100px;
}

/* Optional "hand" icon (mapped from legacy) */
.nf-atc__content--onetime:after {
    content: "";
    display: block;
    position: absolute;
    width: 20px; height: 27px;
    left: 2px; top: 8px;
    background: url(/wp-content/plugins/nf-platform/assets/images/product-page/hand-green.svg)
    center center / contain no-repeat;
}

/* Add padding to text to make room for hand icon */
.nf-atc__content--onetime > p {
    padding-left: 28px;
}

/* Add to cart button (old: .buttonaddto) - matching pro/cons style */
.nf-atc__btn,
.nf-atc .nf-atc__btn,
.nf-atc a.nf-atc__btn,
a.nf-atc__btn.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .375rem;
    padding: 10px 40px !important;
    width: 100% !important;
    font-weight: 400 !important;
    background: #1FB15A !important;
    border-radius: 35px !important;
    border: 1px solid #0ea44b !important;
    color: #fff !important;
    font-size: 16px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
}
.nf-atc__btn:hover,
.nf-atc .nf-atc__btn:hover,
.nf-atc a.nf-atc__btn:hover,
a.nf-atc__btn.button:hover {
    background: #117c3c !important;
    color: #fff !important;
    border-color: #117c3c !important;
}

/* “each N days” beside button price */
.nf-atc__btnTime { margin-left: .25rem; }

/* Save row text (old: .prihranek) */
.nf-atc__save { margin-top: .25rem; }

/* Feature icons row (old: .product-icons-row / .featureWrapper / .feature-inner) */
.nf-atc__features {
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nf-atc__features .feature {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.nf-atc__features .feature img {
    max-height: 20px;
    min-height: 20px;
    width: 20px;
}
.nf-atc__features .feature span {
    font-weight: 300;
    font-size: 14px;
    line-height: 1.2;
}

/* Small text helpers (old: .return, .free, .delivery) */
.nf-atc__features .return,
.nf-atc__features .free,
.nf-atc__features .delivery { font-size: 14px; }

/* Payment logos row */
.nf-atc__payments {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}
.nf-atc__payments img {
    max-height: 30px;
    width: auto;
    object-fit: contain;
}

/* Phone text */
.nf-atc__phone {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

/* General helpers */
.nf-atc__prompt { margin: .25rem 0; }
.nocross { text-decoration: none !important; }

/* Subscription benefits list (mapped from legacy .subscription-benefits) */
.nf-atc .subscription-benefits { list-style: none; padding-left: 0; }
.nf-atc .subscription-benefits li { position: relative; padding-left: 25px; }
.nf-atc .subscription-benefits li::before {
    content: "";
    position: absolute;
    top: 30%;
}

    /* ---- Legacy additions mapped to NF classes ---- */

    /* .tabsItems.grid-2.addtocartsub > div */
.nf-atc__tabstrip > .nf-atc__tab {
    font-size: 14px !important;
}

    /* .onetimeContent.onetimepurch > p */
    .nf-atc__content--onetime > p {
        font-size: 14px !important;
    }

    /* button.elementor-button.add-to-cart-icon.buttonaddto */
    .nf-atc__btn {
        font-weight: 500 !important; /* override earlier weight */
    }


    /* .featureWrapper - removed position relative to keep it inside the box */

    /* ul.subscription-benefits */
    .nf-atc .subscription-benefits {
        font-size: 14px !important;
    }

    /* -------------------- Mobile -------------------- */
    @media only screen and (max-width: 767px) {
        /* select.subscription */
        .nf-atc__period {
            width: 35% !important;
        }

        /* .customAddToCart */
        .nf-atc {
            margin-top: 20px !important;
        }

        /* theme-level helper retained from legacy */
        .product-main {
            padding-bottom: 0 !important;
        }

        /* Features section - add margin left and right */
        .nf-atc__features {
            margin-left: 10px;
            margin-right: 10px;
        }

        /* Features text - add margin left and right */
        .nf-atc__features .feature span {
            margin-left: 10px;
            margin-right: 10px;
        }

        /* Center the button */
        .nf-atc__btn {
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        /* Payment logos - smaller on mobile */
        .nf-atc__payments img {
            max-height: 25px;
        }

        .nf-atc__packPrice .price { display: flex; font-size: 12px; }
    }

/* Out of Stock State */
.nf-atc__btn--soldout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #666 !important;
    background-color: #e0e0e0 !important;
    border: none !important;
    border-radius: 30px;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
}

.nf-atc__btn--soldout:hover {
    background-color: #e0e0e0 !important;
    color: #666 !important;
}



span.button.nf-atc__btn.nf-atc__btn--soldout {
    background-color: #8B8B8B !important;
    border-color: #8B8B8B !important;
}