/*
Theme Name: Startit
Theme URI: https://startit.qodeinteractive.com/
Description: A Fresh Startup Business Theme
Author: Select Themes
Author URI:  https://qodeinteractive.com
Text Domain: startit
Tags: one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-menu, featured-images, flexible-header, post-formats, sticky-post, threaded-comments, translation-ready
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
Version: 4.9.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

<style>
    /* Убираем все ограничения ширины на странице товара */
    body.single-product .full_width_inner,
    body.single-product .container,
    body.single-product .container_inner,
    body.single-product .wrapper,
    body.single-product .content,
    body.single-product .content_inner {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Основной контейнер товара на всю ширину */
    body.single-product #product-<?php the_ID(); ?> {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff;
        float: none !important;
        clear: both !important;
    }

    /* Трехколоночный макет на всю ширину */
    body.single-product .product-full-width-layout {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 40px 30px !important;
        gap: 40px !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    /* Левый виджет */
    body.single-product .product-widget-left {
        flex: 0 0 280px !important;
        min-width: 250px !important;
        background: #f8f9fa !important;
        padding: 25px !important;
        border-radius: 8px !important;
        position: sticky !important;
        top: 100px !important;
        height: fit-content !important;
        box-shadow: 0 2px 15px rgba(0,0,0,0.05) !important;
    }

    /* Центральный контент - занимает всё доступное пространство */
    body.single-product .product-content-center {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Правый виджет */
    body.single-product .product-widget-right {
        flex: 0 0 280px !important;
        min-width: 250px !important;
        background: #f8f9fa !important;
        padding: 25px !important;
        border-radius: 8px !important;
        position: sticky !important;
        top: 100px !important;
        height: fit-content !important;
        box-shadow: 0 2px 15px rgba(0,0,0,0.05) !important;
    }

    /* Сохраняем оригинальную структуру Startit темы */
    body.single-product .woocommerce-product-gallery {
        float: left !important;
        width: 48% !important;
        margin-right: 2% !important;
        margin-bottom: 30px !important;
    }

    body.single-product .qodef-single-product-summary {
        float: right !important;
        width: 48% !important;
        margin-bottom: 30px !important;
    }

    /* Очистка float */
    body.single-product .product-content-center::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }

    /* Продукт табы на всю ширину */
    body.single-product .woocommerce-tabs {
        clear: both !important;
        width: 100% !important;
        padding: 30px 0 !important;
        margin-top: 20px !important;
        border-top: 1px solid #eaeaea !important;
    }

    /* Похожие товары на всю ширину */
    body.single-product .related.products {
        clear: both !important;
        width: 100% !important;
        padding: 30px 0 !important;
        margin-top: 20px !important;
        border-top: 1px solid #eaeaea !important;
    }

    body.single-product .related.products ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 30px !important;
        margin: 20px 0 0 !important;
        padding: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }

    body.single-product .related.products li.product {
        flex: 1 1 calc(25% - 23px) !important;
        min-width: 200px !important;
        margin: 0 !important;
    }

    /* Стили для виджетов */
    body.single-product .product-widget-left .widget,
    body.single-product .product-widget-right .widget {
        margin-bottom: 30px !important;
        padding-bottom: 20px !important;
        border-bottom: 1px solid #eaeaea !important;
    }

    body.single-product .product-widget-left .widget:last-child,
    body.single-product .product-widget-right .widget:last-child {
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    body.single-product .product-widget-left .widget-title,
    body.single-product .product-widget-right .widget-title {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    /* Адаптивность */
    @media (max-width: 1200px) {
        body.single-product .product-full-width-layout {
            padding: 30px 20px !important;
            gap: 30px !important;
        }
        
        body.single-product .product-widget-left,
        body.single-product .product-widget-right {
            flex: 0 0 240px !important;
        }
    }

    @media (max-width: 992px) {
        body.single-product .product-full-width-layout {
            flex-direction: column !important;
            padding: 20px !important;
        }
        
        body.single-product .product-widget-left,
        body.single-product .product-widget-right {
            flex: 1 1 100% !important;
            width: 100% !important;
            position: static !important;
            margin-bottom: 20px !important;
        }
        
        body.single-product .woocommerce-product-gallery,
        body.single-product .qodef-single-product-summary {
            width: 100% !important;
            float: none !important;
            margin-right: 0 !important;
        }
        
        body.single-product .related.products li.product {
            flex: 1 1 calc(50% - 15px) !important;
        }
    }

    @media (max-width: 768px) {
        body.single-product .related.products li.product {
            flex: 1 1 100% !important;
        }
    }
    
/* Прямое обращение к контейнеру меню */
.qodef-menu-area .qodef-vertical-align-containers {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

/* Усиление для WooCommerce страниц */
body.woocommerce .qodef-menu-area .qodef-vertical-align-containers,
body.woocommerce-page .qodef-menu-area .qodef-vertical-align-containers,
body.single-product .qodef-menu-area .qodef-vertical-align-containers {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

.rt-view-counter .rt-view-label,
.rt-view-counter .rt-view-label span{
    font-weight:700 !important;
    color:#000 !important;
}

.rt-view-box{
    min-width:42px;
    height:28px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:2px solid #dcdcdc;
    border-radius:4px;
    background:#f7f7f7;
    font-weight:700;
    font-size:14px;
    color:#444;
}


.rt-search-fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 30px 40px !important;
    box-sizing: border-box !important;
}

.rt-search-layout {
    display: flex !important;
    gap: 24px !important;
    align-items: flex-start !important;
}

.rt-left-sidebar,
.rt-right-sidebar {
    width: 230px !important;
    flex: 0 0 230px !important;
}

.rt-search-results {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.rt-products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
}

.rt-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    position: relative;
}

.rt-product-image {
    position: relative;
    display: block;
}

.rt-product-image img {
    width: 100%;
    height: auto;
}

.rt-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 42px;
    z-index: 10;
}

.rt-product-title {
    font-size: 15px;
    line-height: 1.4;
    margin: 14px 0 8px;
}

.rt-product-price {
    font-weight: 700;
    margin-bottom: 12px;
}

@media (max-width: 1200px) {
    .rt-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .rt-right-sidebar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .rt-search-layout {
        flex-direction: column !important;
    }

    .rt-left-sidebar,
    .rt-right-sidebar {
        display: none !important;
    }

    .rt-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.rt-widget-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.rt-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.rt-search-top-widget,
.rt-search-bottom-widget {
    width: 100%;
    margin-bottom: 24px;
}

.rt-search-top-widget,
.rt-search-bottom-widget {
    width: 100%;
    margin-bottom: 24px;
}

.rt-search-bottom-widget {
    margin-top: 24px;
}

.rt-blog-search-card {
    display: flex;
    gap: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 24px;
}

.rt-blog-search-image {
    width: 260px;
    flex: 0 0 260px;
}

.rt-blog-search-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 12px;
}

.rt-blog-search-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.rt-blog-search-title a {
    color: #111827;
}

.rt-blog-search-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.rt-blog-search-excerpt {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 14px;
}

.rt-blog-search-readmore {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .rt-blog-search-card {
        flex-direction: column;
    }

    .rt-blog-search-image {
        width: 100%;
        flex: 0 0 auto;
    }
}

/* Mobile fix for search page */
@media (max-width: 768px) {
    .rt-search-fullwidth {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px 14px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .rt-search-layout {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        overflow-x: hidden !important;
    }

    .rt-search-results {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .rt-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .rt-product-card {
        min-width: 0 !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .rt-product-image img {
        max-width: 100% !important;
        height: auto !important;
    }

    .rt-left-sidebar,
    .rt-right-sidebar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .rt-products-grid {
        grid-template-columns: 1fr !important;
    }
}

</style>