/* Контейнер карточки: две колонки */
div.motol-product-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    max-width: 1200px;
    margin: 0 auto;
}

/* Левая колонка: галерея */
div.motol-product-layout .woocommerce-product-gallery {
    flex: 1 1 35%;
    min-width: 300px;
    order: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #fafbfc;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
}

div.motol-product-layout .woocommerce-product-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Правая колонка: сводка */
div.motol-product-layout .entry-summary {
    flex: 1 1 45%;
    min-width: 300px;
    order: 2;
    padding-left: 24px;
    margin-top: 0;
}

/* Заголовок */
div.motol-product-layout .product_title.entry-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: #1a1a1a;
    margin: 0 0 12px;
}

/* Цена */
div.motol-product-layout .price {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

div.motol-product-layout .price del {
    font-size: 18px;
    font-weight: 400;
    color: #8b9097;
    margin-right: 8px;
}

/* Форма покупки */
div.motol-product-layout form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

div.motol-product-layout .quantity input {
    height: 48px;
    border: 1px solid #dcdfe3;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    width: 80px;
    box-sizing: border-box;
}

div.motol-product-layout button.single_add_to_cart_button {
    background: #e30611;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    height: 48px;
    padding: 0 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s ease;
    white-space: nowrap;
}

div.motol-product-layout button.single_add_to_cart_button:hover {
    background: #c00510;
}

/* Метаданные (категории) */
div.motol-product-layout .product_meta {
    margin-top: 16px;
    font-size: 14px;
    color: #62666d;
}

/* Вкладки (Отзывы) — теперь это отдельный аккуратный блок внизу карточки */
div.motol-product-layout .wc-tabs-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 0 24px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    margin-top: 24px; /* отступ от формы покупки */
    width: 100%; /* на всю ширину карточки */
    order: 3; /* ставим после сводки */
}

div.motol-product-layout ul.tabs {
    border-bottom: 2px solid #eceff2;
    margin: 0 -24px 20px;
    padding: 0 24px;
}

div.motol-product-layout ul.tabs li {
    margin: 0 24px 0 0;
}

div.motol-product-layout ul.tabs li a {
    display: inline-block;
    padding: 16px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #62666d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

div.motol-product-layout ul.tabs li.active a,
div.motol-product-layout ul.tabs li a:hover {
    color: #e30611;
    border-bottom-color: #e30611;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    div.motol-product-layout {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        border-radius: 12px;
        margin: 0;
    }

    div.motol-product-layout .woocommerce-product-gallery,
    div.motol-product-layout .entry-summary,
    div.motol-product-layout .wc-tabs-wrapper {
        width: 100%;
        flex: none;
        order: 0;
        min-width: auto;
    }

    div.motol-product-layout .entry-summary {
        padding-left: 0;
        margin-top: 16px;
    }

    div.motol-product-layout form.cart {
        flex-direction: column;
        align-items: stretch;
    }

    div.motol-product-layout .quantity input {
        width: 100%;
    }

    div.motol-product-layout button.single_add_to_cart_button {
        width: 100%;
    }
}



/* Стилизация блока отзывов под общую карточку */
div.motol-product-layout .woocommerce-tabs {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    padding: 24px;
    margin-top: 24px;
    border: none;
}

/* Заголовки внутри вкладок */
div.motol-product-layout .woocommerce-Reviews-title,
div.motol-product-layout h2.comment-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    border-bottom: 1px solid #eceff2;
    padding-bottom: 12px;
}

/* Табы (вкладки) */
div.motol-product-layout ul.tabs {
    border-bottom: 2px solid #eceff2;
    margin: 0 -24px 20px;
    padding: 0 24px;
}

div.motol-product-layout ul.tabs li {
    margin: 0 24px 0 0;
    list-style: none;
}

div.motol-product-layout ul.tabs li a {
    display: inline-block;
    padding: 16px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #62666d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

div.motol-product-layout ul.tabs li.active a,
div.motol-product-layout ul.tabs li a:hover {
    color: #e30611;
    border-bottom-color: #e30611;
}

/* Форма отзыва: поля и кнопки */
div.motol-product-layout .comment-form-rating select,
div.motol-product-layout #comment {
    width: 100%;
    border: 1px solid #dcdfe3;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fafbfc;
    color: #1a1a1a;
}

div.motol-product-layout .comment-form-rating select {
    height: 48px;
    padding-left: 16px;
}

div.motol-product-layout #comment {
    min-height: 120px;
    resize: vertical;
}

div.motol-product-layout .form-submit input[type="submit"] {
    background: #e30611;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 32px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 16px;
    transition: background .15s ease;
}

div.motol-product-layout .form-submit input[type="submit"]:hover {
    background: #c00510;
}

/* Сообщение «Отзывов пока нет» */
div.motol-product-layout .woocommerce-noreviews {
    color: #62666d;
    font-size: 15px;
    padding: 20px;
    background: #fafbfc;
    border-radius: 10px;
    text-align: center;
}

/* Похожие товары: возвращаем в конец карточки */
div.motol-product-layout section.related.products {
    order: 4;              /* после галереи (1), сводки (2) и отзывов (3) */
    width: 100%;           /* на всю ширину карточки, а не в колонку */
    flex-basis: 100%;
    margin-top: 32px;
}


/* ============================================================
   ПОХОЖИЕ ТОВАРЫ — стиль как на странице каталога
   ============================================================ */

div.motol-product-layout section.related.products h2 {
    font-size: 22px;
    font-weight: 700;
    color: #191919;
    text-transform: uppercase;
    margin: 0 0 16px;
}

/* Сетка — как ul.products в каталоге */
div.motol-product-layout section.related.products ul.products {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

/* Карточка — аналог .shipment */
div.motol-product-layout section.related.products ul.products li.product {
    background-color: #ffffff;
    border: 1px solid #eaeaec;
    border-radius: 12px;
    padding: 0;
    margin: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

div.motol-product-layout section.related.products ul.products li.product:hover {
    border-color: #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Картинка: 360px, одинаковая высота, как в каталоге */
div.motol-product-layout section.related.products ul.products li.product img {
    width: 100% !important;
    height: 360px !important;
    object-fit: contain !important;
    display: block;
    background-color: #ffffff;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 0;
}

/* Цена: крупная, жирная */
div.motol-product-layout section.related.products ul.products li.product span.price {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #191919;
    margin: 4px 16px;
    line-height: 1.2;
}

/* Заголовок: максимум 2 строки, как .title-shipment */
div.motol-product-layout section.related.products ul.products li.product h2 {
    font-size: 14px;
    font-weight: 400;
    color: #191919;
    line-height: 1.35;
    margin: 0 16px 8px 16px;
    padding: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    min-height: 2.7em;
    flex-grow: 1;
}

/* Кнопка "В корзину" — аналог .more: тёмная, прижата к низу */
div.motol-product-layout section.related.products ul.products li.product a.button {
    display: block;
    width: calc(100% - 32px);
    margin: auto 16px 16px 16px;
    padding: 14px 0;
    background-color: #2d2f36;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

div.motol-product-layout section.related.products ul.products li.product a.button:hover {
    background-color: #3e74cc;
    transform: translateY(-1px);
}

/* Адаптив — те же брейкпоинты, что в каталоге */
@media (max-width: 767px) {
    div.motol-product-layout section.related.products ul.products li.product {
        width: 100% !important;
    }
    div.motol-product-layout section.related.products ul.products li.product img {
        height: 300px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    div.motol-product-layout section.related.products ul.products li.product {
        width: calc(50% - 8px) !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    div.motol-product-layout section.related.products ul.products li.product {
        width: calc(33.333% - 11px) !important;
    }
}

@media (min-width: 1200px) {
    div.motol-product-layout section.related.products ul.products li.product {
        width: calc(25% - 12px) !important;
    }
}


/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.custom-breadcrumbs-wrapper,
.woocommerce-breadcrumb,
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin: 0;
    padding: 0;
}

.custom-breadcrumbs-wrapper a,
.woocommerce-breadcrumb a,
.breadcrumbs a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.custom-breadcrumbs-wrapper a:hover,
.woocommerce-breadcrumb a:hover,
.breadcrumbs a:hover {
    color: #e30611; /* Красный акцент как у кнопок */
    border-bottom-color: #e30611;
}

/* Если крошки попали внутрь flex-контейнера, им нужна ширина 100% */
div.motol-product-layout .custom-breadcrumbs-wrapper,
div.motol-product-layout .woocommerce-breadcrumb,
div.motol-product-layout .breadcrumbs {
    width: 100%;
    order: -1; /* Выносим перед фото и названием */
    margin-bottom: 24px;
    padding-left: 0;
    padding-right: 0;
}



/* Ряд миниатюр под главным фото */
div.motol-product-layout .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

div.motol-product-layout .flex-control-thumbs li {
    width: calc(25% - 6px);
    flex: 0 0 auto;
    float: none;
}

div.motol-product-layout .flex-control-thumbs li img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #eaeaec;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

div.motol-product-layout .flex-control-thumbs li img.flex-active,
div.motol-product-layout .flex-control-thumbs li img:hover {
    border-color: #2d2f36;
}

/* Миниатюры не должны растягиваться нашими общими правилами */
div.motol-product-layout .flex-control-thumbs li img {
    height: 80px !important;
}

.woocommerce-product-gallery {
  position: relative;
}
.woocommerce-product-gallery__trigger {
  position: absolute;
  left: 30px;
  top: 30px;
  z-index: +99;
}
