/*
 Theme Name:   Manufactory Child Theme
 Theme URI:    https://manufactory.axiomthemes.com/
 Description:  Manufactory Child Theme
 Author:       AxiomThemes
 Author URI:   https://axiomthemes.com/
 Template:     manufactory
 Version:      1.0.0
 Tags:         business, construction, corporate, engineering, factory, gas, industrial, industry, machinery, manufacturing, mechanical, oil, plant, power, refinery
 Text Domain:  manufactory
*/


/* =Theme customization starts here
------------------------------------------------------------ */

/**
 * Стили для карточки товара с flexbox стилем
 */

/* Общий контейнер */
.volume-table-container {
    margin: 25px 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
}

/* Статус наличия с кружочком */
.stock-status-with-dot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 15px 0;
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Табы выбора объема */
.volume-tabs-wrapper {
    display: flex;
    gap: 8px;
    margin: 0 0 20px 0;
    flex-wrap: wrap;
}

.volume-tab {
    padding: 10px 24px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #ffffff;
    transition: all 0.2s ease;
}

.volume-tab:hover {
    border-color: #333;
    color: #333;
    background: #f5f5f5;
}

.volume-tab.active {
    background: #333;
    color: white;
    border-color: #333;
}

/* Flexbox контейнер для вариаций */
.variations-flex-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

/* Карточка вариации */
.variation-card {
    display: block !important;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    opacity: 1 !important;
    visibility: visible !important;
}

.variation-card:hover {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.variation-card.selected {
    border-color: #333;
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Блок с атрибутами */
.variation-attributes {
    margin-bottom: 15px;
}

.attribute-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.attribute-row:last-child {
    margin-bottom: 0;
}

.attribute-label {
    color: #666;
    font-weight: 400;
    white-space: nowrap;
}

.attribute-dots {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, #ccc, #ccc 4px, transparent 4px, transparent 8px);
    margin: 0 10px;
}

.attribute-value {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

/* Футер карточки с ценой и наличием */
.variation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eaeaea;
}

.variation-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Цена по запросу */
.price-on-request {
    color: #333;
    font-style: normal;
}

.variation-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

/* Статусы наличия */
.stock-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.instock .stock-dot {
    background-color: #00aa00;
}

.outofstock .stock-dot {
    background-color: #dc3232;
}

.onrequest .stock-dot {
    background-color: #ffa500;
}

.instock .stock-text {
    color: #00aa00;
}

.outofstock .stock-text {
    color: #dc3232;
}

.onrequest .stock-text {
    color: #333;
}

/* Сообщение для товаров по запросу */
.price-request-message {
    margin: 10px 0;
    padding: 10px;
    background: #fff8e7;
    border-left: 3px solid #ffa500;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Загрузчик */
.table-loader {
    text-align: center;
    padding: 40px;
}

.loader-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщение об ошибке/отсутствии товаров */
.no-variations-message {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
}

/* Кнопка покупки */
.single_add_to_cart_button {
    background: #333 !important;
    color: white !important;
    padding: 16px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    width: 100% !important;
    margin-top: 25px !important;
    transition: background 0.2s ease !important;
}

.single_add_to_cart_button:hover {
    background: #555 !important;
}

.single_add_to_cart_button:disabled,
.single_add_to_cart_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Поле количества */
.quantity {
    margin: 20px 0;
}

.quantity input {
    width: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

/* Скрываем стандартные селекты вариаций */
table.variations {
    display: none !important;
}

/* Скрываем вкладку с атрибутами */
.woocommerce-tabs .tabs li.additional_information_tab,
.woocommerce-tabs .panel#tab-additional_information {
    display: none !important;
}

/* Стили для модального окна заявки */
.inquiry-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.inquiry-modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 30px;
    /*border-radius: 8px;*/
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.inquiry-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.inquiry-modal-close:hover {
    color: #333;
}

.inquiry-product-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.inquiry-product-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.inquiry-product-price {
    font-size: 16px;
    color: #666;
}

.inquiry-form-group {
    margin-bottom: 15px;
}

.inquiry-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.inquiry-form-group input,
.inquiry-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.inquiry-form-group input:focus,
.inquiry-form-group textarea:focus {
    border-color: #007cba;
    outline: none;
}

.inquiry-submit-button {
    background: #333;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.inquiry-submit-button:hover {
    background: #555;
}

.inquiry-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inquiry-success-message {
    text-align: center;
    padding: 30px;
}

.inquiry-success-message h3 {
    color: #46b450;
    margin-bottom: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .volume-tabs-wrapper {
        gap: 6px;
    }
    
    .volume-tab {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    .variation-card {
        padding: 14px 16px;
    }
    
    .attribute-row {
        font-size: 13px;
    }
    
    .inquiry-modal-content {
        margin: 15vh auto;
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .volume-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .variation-card {
        padding: 12px;
    }
    
    .attribute-label {
        font-size: 12px;
    }
    
    .attribute-value {
        font-size: 12px;
    }
    
    .quantity input {
        width: 80px;
        padding: 10px;
    }
}
/* Стили для изображения товара в модальном окне */
.inquiry-product-details {
    display: flex;
    gap: 15px;
    align-items: center;
}

.inquiry-product-image {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.inquiry-product-info-text {
    flex: 1;
}

.inquiry-product-info-text .inquiry-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.inquiry-product-info-text .inquiry-product-price {
    font-size: 14px;
    color: #666;
}

@media (max-width: 480px) {
    .inquiry-product-details {
        flex-direction: column;
        text-align: center;
    }
    
    .inquiry-product-image {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
}
/* Стили для кнопки запроса цены */
.inquiry-button-container {
    margin-top: 15px;
    margin-bottom: 15px;
}

.inquiry-button:disabled,
.inquiry-button.disabled,
.inquiry-button[disabled] {
    opacity: 1 !important;
    cursor: pointer !important;
    background: #333 !important;
    pointer-events: auto !important;
}

/* Стандартная кнопка WooCommerce */
.single_add_to_cart_button {
    margin-top: 15px !important;
}
.inquiry-modal-content h3 {
    margin-top: 0;
	font-weight: 600;
}

.sc_layouts_login {
    display: flex;
}

.woocommerce.single-product div.product .product_title{
    display: block!important;
    margin-top: 0;
    letter-spacing: 0;
}

/* Стили для анимации смены изображения */
.woocommerce-product-gallery {
    transition: opacity 0.3s ease;
}

.woocommerce-product-gallery.loading {
    opacity: 0.7;
}

.woocommerce-product-gallery__image img {
    transition: opacity 0.3s ease;
}

/* Стили для активной карточки вариации */
.variation-card.selected {
    border-color: #333;
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.variation-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.variation-card:hover {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Скрываем стандартную кнопку "В корзину", но оставляем в DOM для работы скриптов */
.single_add_to_cart_button {
    display: none !important;
}

/* Также скрываем форму, но оставляем в DOM */
form.cart {
    position: relative;
}

/* Скрываем стандартный селект вариаций, он уже скрыт в JS */
table.variations {
    display: none !important;
}

/* Скрываем весь блок добавления в корзину */
.woocommerce-variation-add-to-cart,
.single_variation_wrap,
.variations_button,
.woocommerce-variation-add-to-cart-button {
    display: none !important;
}

/* Скрываем поле количества */
.quantity {
    display: none !important;
}


/* Фиксируем высоту главного изображения в галерее товара */
.woocommerce-product-gallery__image img {
    max-height: 550px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

.woocommerce-product-gallery__image {
    text-align: center;
}

/* Убираем лупу */
.woocommerce-product-gallery__trigger {
    display: none !important;
}

/* ссылки в подвале */

.custom_links_list_item_link {
    background: none !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.custom_links_list_item_title {
    transition: color 0.2s ease !important;
}

.custom_links_list_item_link:hover {
    background: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.custom_links_list_item_link:hover .custom_links_list_item_title {
    color: #DF3C2A !important;
}

.widget_custom_links ul > li.custom_links_list_item:hover .custom_links_list_item_title:after {
    width: 0 !important;
}

.breadcrumbs .breadcrumbs_item{
	text-transform: none;
}

.sc_layouts_title_description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin-top: 25px;
    text-align: left;
}

.product-card{
	border-radius: 0;
}

.product-page__layout{
	margin-top:25px;
}