.wd-engraving-products-section {
    margin: 30px 0;
}

/* Показываем разный текст для десктоп и мобильных */
.wd-button-text-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .wd-button-text-desktop {
        display: none;
    }

    .wd-button-text-mobile {
        display: inline;
    }
}

.wd-engraving-products-grid {
    /* grid-template-columns: repeat(<?php echo esc_attr($atts['columns']); ?>, 1fr); */
    display: grid;
    grid-template-columns: repeat(4, 279px);
    gap: 64px 28px !important;
    margin-top: 48px;
    justify-content: center;
}

.wd-engraving-products-grid {
    column-gap: 28px !important;
    /* отступ между карточками по горизонтали */
    row-gap: 64px !important;
    /* отступ между карточками по вертикали */
    margin-top: 48px;
}

.wd-engraving-product-card {
    width: 279px;
    height: 539px;
    text-align: left;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.wd-engraving-product-image {
    height: 330px;
    /* Увеличиваем область для изображения */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wd-engraving-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Сохраняет пропорции изображения */
    object-position: center;
}

.wd-engraving-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Отключаем стандартные размеры WooCommerce */
.wd-engraving-product-image .attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    margin-top: 40px;
}

.wd-engraving-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wd-engraving-product-image {
    margin-bottom: 15px;
    background-color: #F3F3F5 !important;
    border-radius: 12px;
}

.wd-engraving-product-image a {
    display: block;
}

.wd-engraving-product-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background-color: #F3F3F5 !important;
}

.wd-engraving-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.3;
}

.wd-engraving-product-title a {
    color: #333;
    text-decoration: none;
}

.wd-engraving-product-title a:hover {
    color: #FF3284;
}

.wd-engraving-product-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.wd-engraving-product-price del {
    color: #999;
    font-size: 14px;
    margin-right: 5px;
}

.wd-engraving-product-price ins {
    background: transparent;
    text-decoration: none;
}

.wd-personalize-button {
    display: inline-block;
    padding: 12px 24px;
    background: #FF3284;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #FF3284;
    width: 100%;
    text-align: center;
    font-size: 16px;
    height: 40px;
    line-height: 16px;
}

.wd-personalize-button:hover {
    background: white;
    color: #FF3284;
}

.wd-out-of-stock {
    display: inline-block;
    padding: 12px 24px;
    background: #f8f8f8;
    color: #999;
    border-radius: 6px;
    font-weight: 500;
    width: 100%;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .wd-engraving-products-grid {
        /* grid-template-columns: repeat(<?php echo esc_attr($atts['columns']); ?>, 1fr); */
        display: grid;
        grid-template-columns: repeat(2, 160px);
        gap: 20px 28px !important;
        margin-top: 32px;
        justify-content: center;
        /* или start */
    }

    .wd-engraving-product-card {
        width: 158px;
        height: 450px;
        text-align: left;
        transition: all 0.3s ease;
        background: #fff;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .wd-engraving-products-title {
        text-align: center;
        margin-bottom: 30px;
        font-size: 28px;
        font-weight: 500;
        color: #333233;
        font-family: "Nekst Medium";
        position: relative;
    }

    .elementor-widget-video .elementor-wrapper iframe,
    .elementor-widget-video .elementor-wrapper video {
        background-color: white;
    }

    .switcher-text {
        font-size: 16px !important;
    }
}

@media (max-width: 1024px) {
    .wd-engraving-products-grid {
        /* grid-template-columns: repeat(<?php echo esc_attr($atts['columns']); ?>, 1fr); */
        display: grid;
        grid-template-columns: repeat(2, 160px);
        gap: 20px 28px !important;
        margin-top: 32px;
        justify-content: center;
        /* или start */
    }

    .wd-engraving-product-card {
        width: 158px;
        height: 450px;
        text-align: left;
        transition: all 0.3s ease;
        background: #fff;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .wd-engraving-products-title {
        text-align: center;
        margin-bottom: 30px;
        font-size: 28px;
        font-weight: 500;
        color: #333233;
        font-family: "Nekst Medium";
        position: relative;
    }

    .elementor-widget-video .elementor-wrapper iframe,
    .elementor-widget-video .elementor-wrapper video {
        background-color: white;
    }

    .switcher-text {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .wd-engraving-products-grid {
        /* grid-template-columns: repeat(<?php echo esc_attr($atts['columns']); ?>, 1fr); */
        display: grid;
        grid-template-columns: repeat(2, 160px);
        gap: 20px 28px !important;
        margin-top: 32px;
        justify-content: center;
    }

    .wd-engraving-product-card {
        width: 158px;
        height: 450px;
        text-align: left;
        transition: all 0.3s ease;
        background: #fff;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .elementor-widget-video .elementor-wrapper iframe,
    .elementor-widget-video .elementor-wrapper video {
        background-color: white;
    }

    .switcher-text {
        font-size: 16px !important;
    }
}

.wd-engraving-products-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 500;
    color: #333233;
    font-family: "Nekst Medium";
    position: relative;
}