/*
Theme Name: Jacqueline Child
Theme URI: http://jacqueline.themerex.net/
Template: jacqueline
Author: ThemeREX
Author URI: https://themerex.net/
Version: 1.0.0
Text Domain: jacqueline-child
*/

/* ==========================================================================
   Шрифты: Forum (заголовки) + Raleway (текст)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Forum&family=Raleway:wght@400;500;600;700&display=swap');

/* Основной текст — Raleway */
body,
.product-archive-container,
.single-product-container,
.product-card-content,
.vpsl-wrap,
p, span, li, a, label, input, select, textarea, button {
    font-family: 'Raleway', sans-serif;
}

/* Заголовки — Forum */
h1, h2, h3, h4, h5, h6,
.product-archive-title,
.category-banner-title,
.product-card-title,
.product-card-title a,
.single-product-title,
.vpsl-heading {
    font-family: 'Forum', serif;
    line-height: 1.15;
}

/* Line-height 1.15 для прописных в кастомных блоках */
.product-card-content p,
.product-card-content span,
.single-product-container p,
.single-product-container li {
    line-height: 1.15;
}

/* ==========================================================================
   Custom Product Catalog & Single Product Styles
   ========================================================================== */

/* Page wrapper adjustments for fullwidth banner */
.tax-product_cat .page_content_wrap,
.post-type-archive-product .page_content_wrap {
    padding-top: 0 !important;
}

/* 1. Global / Layout wrappers */
.product-archive-container,
.single-product-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: inherit;
    color: #333333;
}

/* Single Product Container Width Alignment with Catalog */
.single-product .page_content_wrap .content_wrap,
.single-product .content_wrap,
.single-product .content,
.single-product-container {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.single-product-container{
    padding:0 20px;
}

.single-product .content {
    width: 100% !important;
    float: none !important;
}

.product-archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.product-archive-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111111;
    position: relative;
    display: inline-block;
}

.product-archive-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666666;
}

/* Fullwidth Category Banner Styles (Edge-to-Edge directly below header) */
.category-banner-fullwidth {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 380px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: -30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.category-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
}

.category-banner-overlay .content_wrap,
.category-banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.category-banner-content {
    max-width: 600px;
    color: #111111;
    text-align: left;
    margin-left: 0;
}

.category-banner-title {
    font-size: 2.2rem !important;
    color: #111111 !important;
    font-weight: 600 !important;
    margin: 0 0 10px 0 !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

.category-banner-description {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #444444;
}

/* Combined Layout Grid / Sidebar */
.archive-layout-body {
    display: flex;
    gap: 40px;
}

.catalog-sidebar {
    flex: 0 0 250px;
    width: 250px;
}

.catalog-main-content {
    flex-grow: 1;
}

/* Sidebar Tabs Navigation */
.catalog-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #111111;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 30px;
}

.catalog-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.catalog-tab-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

.catalog-tab-btn:hover {
    background: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e0;
}

.catalog-tab-btn.active {
    background: #2d3748;
    color: #ffffff;
    border-color: #2d3748;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Catalog Toolbar & Head Size Selector */
.catalog-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.catalog-filter-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-filter-wrap label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

#catalog-size-select {
    border: 1px solid #cbd5e0;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #2d3748;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

#catalog-size-select:focus {
    border-color: #2d3748;
}

/* 2. Products Grid (Archive) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important; /* 4 in a row on PC */
    gap: 25px;
    transition: opacity 0.2s ease;
}

.product-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-image-wrap {
    background: #fbfbfb;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
    height: 220px; /* height for 4-in-row layout */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-title {
    font-size: 0.85rem !important;
    font-weight: 600;
    margin: 0 0 16px 0;
    line-height: 1.35;
}

.product-card-title a {
    color: #111111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card-title a:hover {
    color: #2d3748;
}

/* Action Buttons */
.product-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Details button positioning */
.btn-details {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: 1px solid #222222 !important;
    background: transparent !important;
    color: #222222 !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}

.btn-details:hover {
    background: #222222 !important;
    color: #ffffff !important;
}

/* Related Products Section */
.product-related-section {
    border-top: 1px solid #eaeaea;
    padding-top: 50px;
    margin-top: 60px;
}

/* 3. Single Product Page styles */
.product-summary-wrap {
    display: flex;
    gap: 50px;
    margin-bottom: 50px;
}

.product-gallery-column {
    flex: 1;
    max-width: 50%;
}

.product-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-main-image-wrap {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: #fbfbfb;
    padding: 30px;
    text-align: center;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
}

.product-main-image-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.product-thumbnail-item {
    border: 1px solid #eaeaea;
    border-radius: 4px;
    padding: 8px;
    background: #fbfbfb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    transition: border-color 0.2s ease;
}

.product-thumbnail-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-thumbnail-item:hover,
.product-thumbnail-item.active {
    border-color: #2d3748;
}

/* Product Info (Right Column) */
.single-product-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.2;
    color: #111111;
}

.product-meta-info {
    font-size: 0.95rem;
    color: #777777;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.product-meta-info strong {
    color: #222222;
}

.single-product-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 30px;
}

.single-product-actions {
    background: #f9f9f9;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 25px;
    margin: 40px 0;
}

.single-product-actions .actions-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333333;
}

.actions-buttons {
    display: flex;
    gap: 15px;
}

.btn-marketplace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.btn-marketplace:active {
    transform: scale(0.98);
}

.btn-yandex {
    background: #ffcc00;
    color: #000000 !important;
    border: 1px solid #ffcc00;
    margin-bottom: 0px !important;
}

.btn-yandex:hover {
    background: #e6b800;
    border-color: #e6b800;
}

.btn-uzum {
    background: #7000ff;
    color: #ffffff !important;
    border: 1px solid #7000ff;
}

.btn-uzum:hover {
    background: #5c00d6;
    border-color: #5c00d6;
}

.actions-buttons .btn-marketplace.large {
    flex: 1;
    text-align: center;
    padding: 14px 25px;
    font-size: 1.05rem;
}

/* Product Details (Bottom) */
.product-additional-details {
    border-top: 1px solid #eaeaea;
    padding-top: 40px;
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #111111;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2d3748;
}

.specs-table-large {
    width: 100%;
    border-collapse: collapse;
}

.specs-table-large td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.specs-table-large tr:nth-child(even) {
    background: #fafafa;
}

.advantages-content-box {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555555;
}

.advantages-content-box ul,
.advantages-content-box ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.advantages-content-box li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */

@media (max-width: 991px) {
    .archive-layout-body {
        flex-direction: column;
        gap: 30px;
    }
    
    .catalog-sidebar {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .catalog-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .catalog-tab-btn {
        width: auto;
        flex: 1 1 calc(50% - 6px);
        text-align: center;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 columns on tablet */
        gap: 20px;
    }
    
    .product-summary-wrap {
        flex-direction: column;
        gap: 30px;
    }
    
    .product-gallery-column,
    .product-info-column {
        max-width: 100%;
    }
    
    .product-additional-details {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 767px) {
    .category-banner-fullwidth {
        height: 220px;
        margin-top: -20px;
        margin-bottom: 25px;
    }
    .category-banner-overlay {
        padding: 0 20px;
    }
    .category-banner-content {
        max-width: 80%;
    }
    .category-banner-title {
        font-size: 1.6rem !important;
    }
    .category-banner-description {
        font-size: 0.95rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 in a row on mobile */
        gap: 15px !important;
    }

    .product-card-image-wrap {
        height: 180px !important;
        padding: 10px !important;
    }

    .product-card-content {
        padding: 15px !important;
    }

    .product-card-title {
        font-size: 0.7rem !important;
    }

    .btn-details {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 600px) {
    .product-archive-title {
        font-size: 2rem;
    }
    
    .catalog-tabs {
        flex-direction: column;
    }
    
    .catalog-tab-btn {
        width: 100%;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-filter-wrap,
    .catalog-sort-wrap {
        justify-content: space-between;
    }
    
    .single-product-title {
        font-size: 2rem;
    }
    
    .actions-buttons {
        flex-direction: column;
    }
    
    .product-meta-info {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   Тулбар фильтров каталога
   ========================================================================== */

/* Общий тулбар */
.catalog-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 24px;
    margin-bottom: 20px;
}

/* Тулбар паст — два фильтра рядом */
.catalog-toolbar--pastes {
    gap: 32px;
}

/* Обёртка одного фильтра: label + select на одной строке */
.catalog-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.catalog-filter-wrap label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
}

.catalog-filter-wrap select {
    min-width: 130px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.catalog-filter-wrap select:focus {
    border-color: #888;
}

@media (max-width: 600px) {
    .catalog-toolbar,
    .catalog-toolbar--pastes {
        flex-wrap: wrap;
        gap: 12px;
    }
    .catalog-filter-wrap select {
        min-width: 100px;
    }
}