/* ==============================================
   СТРАНИЦА ТОВАРА (single product)
   ============================================== */

.woocommerce div.product .product_title {font-size: 32px;}


/* ----- 1. ЦЕНЫ НА СТРАНИЦЕ ТОВАРА (single) ----- */
.woocommerce div.product .summary .price .woocommerce-Price-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--global-palette4,#094C72);
}

.woocommerce div.product .summary .price del .woocommerce-Price-amount {
    font-size: 18px;
    font-weight: 400;
    color: var(--global-palette3,#052f44);
    text-decoration: line-through;
}

.woocommerce div.product .summary .price ins .woocommerce-Price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--global-palette10,#ff4500);
    text-decoration: none;
}


/* -----  БЛОК примітка ----- */
.ddd-note-block {
    padding: 20px 0;
    background: none;
    text-align: left;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ddd-note-block small {
/*    font-weight: 300;*/
    color: var(--global-palette3,#052f44);
   /* letter-spacing: 1px;*/
}


/* -----  БЛОК КОНТАКТОВ (Viber) ----- */
.ddd-contact-block {
    padding: 20px 0;
    background: none;
    text-align: left;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ddd-contact-text {
    font-size: 1em;
    font-weight: 700;
    color: var(--global-palette1, #1a252e);
    margin: 0;
}

.ddd-contact-viber {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: #7360f2;
    padding: 0.25em 1em;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.ddd-contact-viber:hover, .ddd-contact-viber:focus {
    background: #5a4bd1;
    color: #fff;
}



.ddd-viber-icon {
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ddd-viber-icon svg {
    width: 1.2em;
    height: 1.2em;
    display: block;
}
/* ----- 3. ПРОПОРЦИИ ГАЛЕРЕИ И СВОДКИ (ПК) ----- */
.woocommerce div.product .woocommerce-product-gallery {
    width: 30% !important;
    float: left !important;
    margin-right: 4% !important;
}

.woocommerce div.product .summary {
    width: 66% !important;
    float: right !important;
    clear: none !important;
}

/* ----- 4. ГАЛЕРЕЯ: ВЫСОТА ИЗОБРАЖЕНИЙ ----- */
.woocommerce-product-gallery img {
    width: 100% !important;
    height: 400px !important;
    object-fit: contain !important;
    background: var(--global-palette9,#FFFFFF);
}

.woocommerce-product-gallery .flex-control-thumbs img {
    width: 100% !important;
    height: 100px !important;
    object-fit: cover !important;
}



/* ==============================================
   ИКОНКА СУМКИ НА КНОПКЕ "В КОРЗИНУ" (СИНГЛ)
   ============================================== */

/* --- Иконка перед текстом --- */
.single_add_to_cart_button::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 5h-14l1.5-2h11zM21.794 5.392l-2.994-3.992c-0.196-0.261-0.494-0.399-0.8-0.4h-12c-0.326 0-0.616 0.156-0.8 0.4l-2.994 3.992c-0.043 0.056-0.081 0.117-0.111 0.182-0.065 0.137-0.096 0.283-0.095 0.426v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.219-0.071-0.422-0.189-0.585-0.004-0.005-0.007-0.010-0.011-0.015zM4 7h16v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707zM15 10c0 0.829-0.335 1.577-0.879 2.121s-1.292 0.879-2.121 0.879-1.577-0.335-2.121-0.879-0.879-1.292-0.879-2.121c0-0.552-0.448-1-1-1s-1 0.448-1 1c0 1.38 0.561 2.632 1.464 3.536s2.156 1.464 3.536 1.464 2.632-0.561 3.536-1.464 1.464-2.156 1.464-3.536c0-0.552-0.448-1-1-1s-1 0.448-1 1z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    vertical-align: middle;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* --- При наведении: иконка белая + анимация --- */
.single_add_to_cart_button:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 5h-14l1.5-2h11zM21.794 5.392l-2.994-3.992c-0.196-0.261-0.494-0.399-0.8-0.4h-12c-0.326 0-0.616 0.156-0.8 0.4l-2.994 3.992c-0.043 0.056-0.081 0.117-0.111 0.182-0.065 0.137-0.096 0.283-0.095 0.426v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.219-0.071-0.422-0.189-0.585-0.004-0.005-0.007-0.010-0.011-0.015zM4 7h16v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707zM15 10c0 0.829-0.335 1.577-0.879 2.121s-1.292 0.879-2.121 0.879-1.577-0.335-2.121-0.879-0.879-1.292-0.879-2.121c0-0.552-0.448-1-1-1s-1 0.448-1 1c0 1.38 0.561 2.632 1.464 3.536s2.156 1.464 3.536 1.464 2.632-0.561 3.536-1.464 1.464-2.156 1.464-3.536c0-0.552-0.448-1-1-1s-1 0.448-1 1z'/%3E%3C/svg%3E");
    transform: scale(1.1);
}


.single_add_to_cart_button {
    background: var(--global-palette5,#3d5e81) !important;
}

.single_add_to_cart_button:hover {
    background: var(--global-palette2,#4abc1a) !important;
}


/* ==============================================
   КОНТЕНТ ВКЛАДКИ "ОПИСАНИЕ" НА СТРАНИЦЕ ТОВАРА
   ============================================== */

.woocommerce-Tabs-panel--description {
    margin: 1em 0 !important;
    color: var(--global-palette1, #1a252e);
    padding: 25px !important;
    line-height: 1.1em;
    border: 1px dotted var(--global-palette6,#5d7b9d);;
}
 
.woocommerce-Tabs-panel--description p {padding-top: 0; margin-top: 0;}

/* ----- 5. АДАПТИВ: ПЛАНШЕТЫ (768–1024px) — 50/50 ----- */
@media (max-width: 1024px) {
    .woocommerce div.product .woocommerce-product-gallery {
        width: 46% !important;
        margin-right: 4% !important;
    }

    .woocommerce div.product .summary {
        width: 50% !important;
    }
}

/* ----- 6. АДАПТИВ: МОБИЛКИ (до 768px) — 100% ----- */
@media (max-width: 768px) {
    .woocommerce div.product .woocommerce-product-gallery,
    .woocommerce div.product .summary {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }

    .woocommerce-product-gallery img {
        height: 350px !important;
    }

    .woocommerce-product-gallery .flex-control-thumbs img {
        height: 70px !important;
    }
}

/* ----- 7. АДАПТИВ: МОБИЛКИ (до 480px) — мелкие ----- */
@media (max-width: 480px) {
    .woocommerce-product-gallery img {
        height: 300px !important;
    }

    .woocommerce-product-gallery .flex-control-thumbs img {
        height: 60px !important;
    }

    .ddd-contact-viber {
        font-size: 14px;
        padding: 6px 16px;
    }
}

/* ==============================================
   МИНИАТЮРЫ (THUMBNAILS) — ОБВОДКА (АДАПТИВНАЯ СЕТКА)
   ============================================== */

.woocommerce-product-gallery .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-start !important;
}

.woocommerce-product-gallery .flex-control-thumbs li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ----- 6 колонок на больших ПК (≥ 1440px) ----- */
@media (min-width: 1440px) {
    .woocommerce-product-gallery .flex-control-thumbs li {
        flex: 0 0 calc(16.666% - 10px) !important;
        max-width: calc(16.666% - 10px) !important;
    }
}

/* ----- 4 колонки на маленьких ПК (1024–1439px) ----- */
@media (min-width: 1024px) and (max-width: 1439px) {
    .woocommerce-product-gallery .flex-control-thumbs li {
        flex: 0 0 calc(25% - 10px) !important;
        max-width: calc(25% - 10px) !important;
    }
}

/* ----- 3 колонки на планшетах и мобилках (≤ 1023px) ----- */
@media (max-width: 1023px) {
    .woocommerce-product-gallery .flex-control-thumbs li {
        flex: 0 0 calc(33.333% - 10px) !important;
        max-width: calc(33.333% - 10px) !important;
    }
}

/* Квадратная миниатюра с обводкой и отступом */
.woocommerce-product-gallery .flex-control-thumbs img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important; /* ← квадрат всегда */
    object-fit: cover !important;
    
    border: 2px solid var(--global-palette7, #d5dce4) !important;
    opacity: 0.8 !important;
    transition: border-color 0.3s ease, opacity 0.3s ease !important;
    
    padding: 3px !important;
    box-sizing: border-box !important;
    background-color: var(--global-palette9, #ffffff) !important;
    background-clip: content-box !important;
}

.woocommerce-product-gallery .flex-control-thumbs img:hover {
    opacity: 1 !important;
    border-color: var(--global-palette6, #5d7b9d) !important;
}

.woocommerce-product-gallery .flex-control-thumbs img.flex-active {
    opacity: 1 !important;
    border-color: var(--global-palette3, #052f44) !important;
}