/* ================================
   NF Add to Cart (ProductPageWidgets)
   ================================ */

/* Wrapper (old: .customAddToCart) */
.nf-atc {
    border: 1px solid #d4d4d4;
    border-radius: 20px;
    padding: 20px;
    background: #fff;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

/* Top price row (old: .topInfo / .mainsale.pricetop / .regularcrossed) */
.nf-atc__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .35rem .75rem;
    margin-bottom: 10px;
}
.nf-atc__top-right {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
    text-align: right;
}
.nf-atc__price-per-kg {
    display: block;
    color: #000;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    min-width: 0;
    margin-top: 0.15rem;
}
.nf-atc__price-per-kg .nf-atc__ppkg-val,
.nf-atc__price-per-kg .nf-atc__ppkg-val .woocommerce-Price-amount {
    color: inherit;
    font-weight: 400;
}
.nf-atc__price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
}
.nf-atc__price-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}
.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: 27%;
    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: 5%;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: 45%;
    margin-top: -25%;
}
@media only screen and (max-width: 480px) {
    .nf-atc__packInfo {
        margin-top: -37%;
        margin-bottom: 8%;
    }

}


.nf-atc__packInfo strong {
    margin: 0;
    line-height: 1;
}

.nf-atc__packPrice {
    text-align:center;
}
.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: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .375rem;
    padding: 10px 20px !important;
    width: 70% !important;
    font-weight: 500 !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;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}
.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 – match OLD add-to-cart bundle (60-day guarantee, free delivery, delivery days) */
.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) {
        .nf-atc__price-per-kg {
            font-size: 13px;
        }

        /* 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 { font-size: 12px; }
        .top-main h1.elementor-heading-title {
            font-size: 28px !important;
        }

        /* Size selector on mobile */
        .nf-atc__size-selector {
            margin-top: 15px;
            margin-bottom: 15px;
        }

        .nf-atc__size-label label {
            font-size: 14px;
        }

        .nf-atc__size-advisor {
            font-size: 12px;
        }

        .nf-atc__size-select {
            padding: 10px 14px;
            font-size: 14px;
            padding-right: 36px;
        }
    }

/* Size Selector (Merch Widget) */
.nf-atc__size-selector {
    margin-top: 20px;
    margin-bottom: 20px;
}

.nf-atc__size-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.nf-atc__size-label label {
    font-weight: 700;
    font-size: 16px;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.nf-atc__size-advisor {
    font-size: 14px;
    color: #999;
    text-decoration: none;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.nf-atc__size-advisor:hover {
    color: #666;
    text-decoration: underline;
}

/* Tabela velikosti button (ACF Accordion Merch – after Velikost & Prileganje) */
.nf-paa-merch__tabela-wrap {
    margin-top: 16px;
}
.nf-paa-merch__tabela-btn {
    display: inline-block;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 16px;
    color: #000;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.nf-paa-merch__tabela-btn:hover {
    text-decoration: none;
    color: #000;
    border-color: #999;
    background: #f9f9f9;
}

/* Color Selector – circular swatches (Merch Widget) */
.nf-atc__color-selector {
    margin-top: 12px;
    margin-bottom: 20px;
}

.nf-atc__color-label {
    margin-bottom: 10px;
}

.nf-atc__color-label-text,
.nf-atc__color-label label {
    font-weight: 700;
    font-size: 16px;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Hidden input keeps form attribute value; swatches set it via JS */
.nf-atc__color-select {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.nf-atc__color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.nf-atc__color-swatch {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}

.nf-atc__color-swatch:hover {
    border-color: #999;
}

.nf-atc__color-swatch.is-selected {
    border-color: gainsboro;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px gainsboro;
}

/* Light colors (white, cream, etc.) need a visible outline so the circle is seen */
.nf-atc__color-swatch--light {
    border: 1px solid #D9D9D9;
}

.nf-atc__color-swatch--light.is-selected {
    border-color: gainsboro;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px gainsboro;
}

.nf-atc__size-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 300;
    color: #000;
    background-color: #F9F9FA;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    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 16px center;
    background-size: 12px 8px;
    padding-right: 40px;
}

.nf-atc__size-select:focus {
    outline: none;
    border-color: #1FB15A;
    box-shadow: 0 0 0 2px rgba(31, 177, 90, 0.1);
}

.nf-atc__size-select option {
    padding: 8px;
    color: #000;
    background-color: #fff;
}

.nf-atc__size-select option:disabled {
    color: #999;
}

/* 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;
}

/* Disabled button state for merch widget (when no size selected) */
.nf-atc__btn--merch.nf-atc__btn--disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.nf-atc__btn--merch.nf-atc__btn--disabled:hover {
    background: #1FB15A !important;
    border-color: #0ea44b !important;
}

/* Size Advisor Popup */
.nf-atc__size-advisor-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nf-atc__size-advisor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.nf-atc__size-advisor-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.nf-atc__size-advisor-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.nf-atc__size-advisor-close:hover {
    color: #000;
    background-color: #fff;
}

.nf-atc__size-advisor-content h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.nf-atc__size-advisor-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.nf-atc__size-advisor-text p {
    margin: 0 0 15px 0;
}

.nf-atc__size-advisor-text p:last-child {
    margin-bottom: 0;
}

.nf-atc__size-advisor-text strong {
    font-weight: 700;
    color: #000;
}

.nf-atc__size-advisor-table-label {
    margin-bottom: 8px !important;
    font-weight: 600;
}

.nf-atc__size-advisor-table {
    width: 100%;
    margin: 0 0 15px 0;
    border-collapse: collapse;
    font-size: 15px;
    color: #333;
}

.nf-atc__size-advisor-table th,
.nf-atc__size-advisor-table td {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid #d4d4d4;
}

.nf-atc__size-advisor-table th {
    font-weight: 600;
    color: #000;
    background: #f9f9fa;
}

.nf-atc__size-advisor-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Prevent body scroll when popup is open */
body.nf-size-advisor-open {
    overflow: hidden;
}

/* Mobile styles for popup */
@media only screen and (max-width: 767px) {
    .nf-atc__size-advisor-popup {
        padding: 10px;
    }
    
    .nf-atc__size-advisor-content {
        padding: 25px 20px;
        max-height: 90vh;
    }
    
    .nf-atc__size-advisor-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .nf-atc__size-advisor-text {
        font-size: 14px;
    }
}



span.button.nf-atc__btn.nf-atc__btn--soldout {
    background-color: #8B8B8B !important;
    border-color: #8B8B8B !important;
}

/* Merch widget: force Add to cart on top, then 60-day guarantee etc. below */
.nf-atc-merch__stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.nf-atc-merch__stack .nf-atc__btn {
    order: 1;
    width: 70% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px !important;
    align-self: center;
}
.nf-atc-merch__stack .nf-atc__features {
    order: 2;
    margin-top: 24px;
    margin-bottom: 20px;
}


@media screen and (min-device-width: 1200px) and (max-device-width: 1450px) {
    .nf-atc__pack {
        padding-top:2rem;
    }

}

@media screen and (min-device-width: 1200px) and (max-device-width: 1300px) {
    .nf-atc__payments img {
        max-height:20px;
    }

}



@media screen and (min-device-width: 1400px) {

.nf-atc-merch-form .nf-atc__qselect .nf-atc__pack {
   padding-top: 2.5rem!important;

}

}


@media screen and (max-device-width: 800px) {
    .nf-atc__pack {
        padding-top:35%;
    }
    .nf-atc-merch-form .nf-atc__pack {
        padding-top:2.5rem;
    }
}


.grid-1 .nf-atc__pack {
    padding-top: 8% !important;
}


@media screen and (min-device-width: 1200px) and (max-device-width: 1300px) {
    .grid-1 .nf-atc__pack {
        padding-top: 10% !important;
    }

}

@media screen and (max-device-width: 800px) {
    .grid-1 .nf-atc__pack {
        padding-top: 12% !important;
    }


}


.grid-2 .nf-atc__pack {
    padding-top: 16% !important;
}


@media screen and (min-device-width: 1200px) and (max-device-width: 1300px) {
    .grid-2 .nf-atc__pack {
        padding-top: 20% !important;
    }

}

@media screen and (max-device-width: 800px) {
    .grid-2 .nf-atc__pack {
        padding-top: 24% !important;
    }


}