/* Product Features Section */
.acf-product-block {
    margin: 40px 0;
    padding: 20px;
    width: 100%;
    clear: both;
}

.acf-product-heading {
    font-weight: 600;
    font-size: 32px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* === GORA: 2 KOLUMNY - opis+tabela | zdjecie === */
.acf-product-columns {
    display: flex;
    align-items: stretch;
    gap: 30px;
    margin-bottom: 30px;
}

/* KOLUMNA 1: Opis + Tabela */
.acf-product-col-info {
    flex: 1;
    min-width: 0;
}

.acf-product-description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* === SIMPLE: only description + image (no table, no features) === */
.acf-product-block--simple .acf-product-columns {
    align-items: center;
    margin-bottom: 0;
}

.acf-product-block--simple .acf-product-description {
    margin-bottom: 0;
}

.acf-product-block--simple .acf-product-image img {
    max-height: 500px;
    width: auto;
    object-fit: contain;
}

/* KOLUMNA 2: Zdjecie - cover na cala wysokosc */
.acf-product-image {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
}

.acf-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === DOL: 3 kafelki na pelna szerokosc === */
.acf-product-features {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.acf-feature-tile {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 24px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.acf-feature-tile:hover {
    border-color: var(--accent, #5cb85c);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.acf-feature-tile.has-popup {
    cursor: pointer;
}

.acf-feature-icon {
    margin-bottom: 12px;
}

.acf-feature-icon img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.acf-feature-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
}

.acf-feature-description {
    font-weight: 400;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.acf-feature-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent, #5cb85c);
}

.acf-feature-more .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.acf-feature-tile.has-popup:hover .acf-feature-more .arrow {
    transform: translateX(5px);
}

/* Popup Modal */
.acf-feature-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.acf-feature-popup-overlay.is-visible {
    display: flex;
}

.acf-feature-popup-container {
    background: #fff;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.acf-feature-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.acf-feature-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.acf-feature-popup-content {
    padding: 40px 30px 30px;
}

.acf-popup-item {
    text-align: center;
}

.acf-popup-icon {
    margin-bottom: 20px;
}

.acf-popup-icon img {
    max-width: 80px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.acf-popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.acf-popup-description {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    text-align: left;
}

/* === RESPONSIVE - Tablet === */
@media (max-width: 1024px) {
    .acf-product-columns {
        flex-direction: column;
        gap: 24px;
    }

    .acf-product-col-info {
        flex: none;
        width: 100%;
    }

    .acf-product-image {
        flex: none;
        width: 100%;
        max-height: 400px;
    }

    .acf-product-image img {
        height: auto;
        max-height: 400px;
        object-fit: contain;
    }

    .acf-product-block--simple .acf-product-image img {
        max-height: 380px;
    }

    .acf-product-features {
        gap: 15px;
    }

    .acf-feature-tile {
        padding: 15px 10px;
    }

    .acf-feature-icon img {
        width: 50px;
        height: 50px;
    }

    .acf-feature-title {
        font-size: 15px;
    }

    .acf-feature-description {
        font-size: 13px;
    }

    .acf-feature-more {
        font-size: 11px;
    }
}

/* === RESPONSIVE - Mobile === */
@media (max-width: 768px) {
    .acf-product-heading {
        font-size: 24px;
    }

    .acf-product-description {
        font-size: 14px;
    }

    .acf-product-block--simple .acf-product-image {
        display: flex;
        justify-content: center;
    }

    .acf-product-block--simple .acf-product-image img {
        max-height: 300px;
    }

    .acf-product-features {
        gap: 10px;
    }

    .acf-feature-tile {
        padding: 12px 8px;
    }

    .acf-feature-icon img {
        width: 40px;
        height: 40px;
    }

    .acf-feature-title {
        font-size: 13px;
    }

    .acf-feature-description {
        font-size: 11px;
    }

    .acf-feature-more {
        font-size: 10px;
    }

    .acf-feature-popup-container {
        max-width: 95%;
    }

    .acf-feature-popup-content {
        padding: 50px 20px 20px;
    }

    .acf-popup-title {
        font-size: 20px;
    }

    .acf-popup-description {
        font-size: 14px;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .acf-product-features {
        gap: 8px;
    }

    .acf-feature-tile {
        padding: 10px 6px;
    }

    .acf-feature-icon img {
        width: 35px;
        height: 35px;
    }

    .acf-feature-title {
        font-size: 11px;
    }

    .acf-feature-description {
        font-size: 10px;
    }

    .acf-feature-more {
        font-size: 9px;
    }
}

/* Additional Product Page Styles */
h1.product_title.entry-title {
    font-size: 1.5em;
    font-weight: 700;
}

section.related.products h2 {
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
}

.variations th.label {
    display: block;
    margin-bottom: 8px;
}

.variations td.value {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variations td.value ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.variations td.value ul li {
    display: flex;
    align-items: center;
    margin: 0;
}

.variations td.value ul li label {
    margin-left: 5px;
}

.variations td.value ul li input {
    margin-right: 5px;
}

.woocommerce-variation-add-to-cart:before {
    content: 'Ilość: ';
    font-weight: 700;
    font-size: 17px;
    padding: 8px;
    width: 100%;
    margin-bottom: 8px;
}

.woocommerce div.product form.cart div.quantity {
    margin-bottom: 25px;
}

.yith-add-to-wishlist-button-block.yith-add-to-wishlist-button-block--single.yith-add-to-wishlist-button-block--initialized {
    margin-top: 15px;
}
