/* =========================================
   ПОСАДОЧНЫЕ СТРАНИЦЫ КАТЕГОРИЙ (Landing Tiles - 4 Columns)
========================================= */

.cat-landing-container {
    max-width: 1440px; 
    margin: 40px auto 80px auto;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
}

/* ШАПКА */
.cat-landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #fb5a6c; 
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.cat-landing-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    font-weight: 700;
    color: #4a3c5a;
    margin: 0;
    line-height: 1.2;
}

.btn-show-all {
    background-color: #936098;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-show-all:hover {
    background-color: #7b4a80;
}

/* SEO ТЕКСТЫ */
.cat-landing-seo-top,
.cat-landing-seo-bottom {
    margin-bottom: 40px;
    background: #fcf9fa;
    padding: 25px 30px;
    border-radius: 8px;
    border-left: 4px solid #936098;
}

.cat-landing-seo-top h2,
.cat-landing-seo-bottom h3 {
    font-size: 20px;
    color: #333333;
    margin-bottom: 15px;
    font-weight: 700;
}

.cat-landing-seo-top p,
.cat-landing-seo-bottom p {
    font-size: 15px;
    color: #555555;
    line-height: 1.6;
    margin: 0;
}

/* СЕТКА ТОВАРОВ */
.cat-landing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 60px;
}

.cat-tile-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; 
    text-decoration: none; 
    color: inherit;
    position: relative;
}

.cat-tile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(147, 96, 152, 0.12);
}

/* КАРУСЕЛЬ ИЗОБРАЖЕНИЙ С ЭФФЕКТОМ ЗАТУХАНИЯ (FADE) */
.cat-tile-carousel {
    width: 100%;
    aspect-ratio: 1 / 1; 
    background: #f5f5f5;
    position: relative;
    border-bottom: 1px solid #eeeeee;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease; 
}

.carousel-slide:first-child {
    opacity: 1;
    visibility: visible;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.cat-tile-card:hover .carousel-slide.active {
    transform: scale(1.03);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcf9fa;
    position: absolute;
    top: 0; left: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.cat-tile-card:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: #936098;
    color: #ffffff;
}

.prev-btn { left: 8px; }
.next-btn { right: 8px; }

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 10;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* =========================================
   КОНТЕНТ ПЛИТКИ И ПАТТЕРН ВОДЯНОГО ЗНАКА
========================================= */
.cat-tile-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    overflow: hidden;
}

.cat-tile-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/img/logo_watermark.svg');
    background-repeat: repeat;
    background-position: top left;
    background-size: 80px;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

.cat-tile-content > * {
    position: relative;
    z-index: 2;
}

/* ВЕРХНИЙ БАР: ТАБ СЛЕВА, ЦЕНА СПРАВА */
.cat-tile-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #e5e5e5;
    position: relative;
    z-index: 5;
    gap: 8px;
}

.cat-tile-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-grow: 1;
    min-width: 0;
}

/* БЛОК ЦЕНЫ: СТРОГО В ОДНУ СТРОКУ БЕЗ ПЕРЕНОСОВ */
.cat-tile-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    text-align: right;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.cat-tile-price-block .price-value {
    font-size: clamp(18px, 1.35vw, 22px); 
    color: #fb5a6c; 
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    line-height: 1.1;
    margin-bottom: 3px;
    white-space: nowrap !important;
    letter-spacing: -0.2px;
}

.cat-tile-price-block .price-label {
    font-size: 9.5px; 
    color: #888888;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1;
    white-space: nowrap !important;
}

/* =======================================================
   ЕДИНЫЙ СТИЛЬ КНОПКИ «ОПЦИИ» ДЛЯ ВСЕХ КАРТОЧЕК
======================================================= */
.bsp-options-btn {
    appearance: none;
    border: 1px solid rgba(147, 96, 152, 0.35);
    background: #ffffff;
    color: #5A2A75;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(147, 96, 152, 0.08);
    transition: all 0.25s ease;
    z-index: 10;
    white-space: nowrap;
    flex-shrink: 0;
}

.bsp-options-btn svg {
    color: #df1b53;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.bsp-options-btn:hover {
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(223, 27, 83, 0.25);
    transform: translateY(-1px);
}

.bsp-options-btn:hover svg {
    color: #ffffff;
    transform: rotate(60deg);
}

.bsp-options-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* =======================================================
   ЗАГОЛОВОК ИЗДЕЛИЙ: ЕДИНЫЙ КЕГЛЬ (16px) И ХОВЕР #965995
======================================================= */
.cat-tile-header {
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    width: 100%;
}

.cat-tile-title,
.cat-tile-title a,
.qc-card-title,
.qc-card-title a {
    font-family: var(--font-base, 'Inter', sans-serif) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #333333 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.25s ease !important;
}

/* ПРИ НАВЕДЕНИИ КУРСОРА НАЗВАНИЕ ПЕРЕКРАШИВАЕТСЯ В #965995 */
.cat-tile-title a:hover,
.qc-card-title a:hover,
.cat-tile-card:hover .cat-tile-title a,
.cat-tile-card:hover .qc-card-title a {
    color: #965995 !important;
}

.cat-tile-badge .tag-badge {
    padding: 4px 10px;
    font-size: 9px;
}

.cat-tile-desc {
    font-size: 12px;
    color: #555555;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* =========================================
   ФОРМУЛА ТЕПЛА (СВОРАЧИВАЕМЫЙ АККОРДЕОН)
========================================= */
.formula-tepla-module {
    margin-top: auto; 
    background: #ffffff; 
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: relative;
    z-index: 5;
    margin-bottom: 15px; 
    transition: all 0.3s ease;
}

.ft-accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.ft-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #936098;
}

.ft-fire-icon {
    width: 14px; 
    height: 14px;
}

.ft-chevron {
    width: 16px;
    height: 16px;
    color: #936098;
    transition: transform 0.3s ease;
}

.formula-tepla-module.is-open {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border-color: #e5e5e5;
}

.formula-tepla-module.is-open .ft-chevron {
    transform: rotate(180deg);
}

.formula-tepla-module.is-open .ft-accordion-content {
    max-height: 1000px; 
    opacity: 1;
    margin-top: 15px;
}

.ft-accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.ft-tabs-container {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 8px;
}

.ft-tab {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    transition: all 0.2s ease;
}

.cat-tile-card:hover .ft-tab {
    background-color: #fcf9fa;
    border-color: rgba(147, 96, 152, 0.1);
}

.ft-tab-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-tab-icon svg {
    width: 100%;
    height: 100%;
}

.ft-tab-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ft-tab-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 4px; 
    line-height: 1;
}

.ft-tab-value {
    font-size: 12px;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
    display: inline-flex; 
    align-items: center;  
    flex-wrap: wrap;      
    gap: 6px;             
}

/* ОБЪЕМНЫЕ ВНУТРЕННИЕ БЕЙДЖИ */
.ft-inner-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 30px; 
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.06), inset 0 2px 0 rgba(255,255,255,0.8); 
    text-shadow: 0 1px 0 rgba(255,255,255,0.6); 
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap; 
}

/* Градиентные цветовые темы */
.ft-theme-blue { border-left: 3px solid #0284c7; background: #f0f9ff; }
.ft-theme-blue .ft-tab-icon, .ft-theme-blue .ft-tab-label { color: #0284c7; }
.ft-theme-blue .ft-inner-badge { background: linear-gradient(135deg, #e0f2fe, #bae6fd); color: #0284c7; border-color: #7dd3fc; }

.ft-theme-green { border-left: 3px solid #059669; background: #ecfdf5; }
.ft-theme-green .ft-tab-icon, .ft-theme-green .ft-tab-label { color: #059669; }
.ft-theme-green .ft-inner-badge { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; border-color: #6ee7b7; }

.ft-theme-orange { border-left: 3px solid #d97706; background: #fffbeb; }
.ft-theme-orange .ft-tab-icon, .ft-theme-orange .ft-tab-label { color: #d97706; }
.ft-theme-orange .ft-inner-badge { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; border-color: #fcd34d; }

.ft-theme-purple { border-left: 3px solid #936098; background: #fcf9fa; }
.ft-theme-purple .ft-tab-icon, .ft-theme-purple .ft-tab-label { color: #936098; }
.ft-theme-purple .ft-inner-badge { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); color: #7c3aed; border-color: #c4b5fd; }

.ft-theme-red { border-left: 3px solid #fb5a6c; background: #fff2f4; }
.ft-theme-red .ft-tab-icon, .ft-theme-red .ft-tab-label { color: #fb5a6c; }
.ft-theme-red .ft-inner-badge { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #dc2626; border-color: #fca5a5; }

.ft-theme-gray { border-left: 3px solid #888888; background: #f9f9f9; }
.ft-theme-gray .ft-tab-icon, .ft-theme-gray .ft-tab-label { color: #555555; }
.ft-theme-gray .ft-inner-badge { background: linear-gradient(135deg, #fafafa, #e5e5e5); color: #555555; border-color: #d4d4d4; }

.ft-theme-dark { border-left: 3px solid #4a3c5a; background: #f5f5f5; }
.ft-theme-dark .ft-tab-icon, .ft-theme-dark .ft-tab-label { color: #4a3c5a; }
.ft-theme-dark .ft-inner-badge { background: linear-gradient(135deg, #f4f4f5, #e4e4e7); color: #4a3c5a; border-color: #d4d4d8; }

/* =========================================
   ИНТЕРАКТИВНЫЙ БЛОК РАСЧЕТА ТИРАЖА НА ПЛИТКЕ
========================================= */
.tic-container {
    background: #fdfafb;
    border: 1px solid #f2eef0;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    z-index: 5;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.01);
}

.tic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tic-total-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dddddd;
    margin-bottom: 15px; 
}

.tic-label {
    font-size: 11px;
    font-weight: 700;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tic-unit-val {
    font-size: 13px;
    font-weight: 700;
    color: #555555;
    font-family: 'Inter', sans-serif;
}

.tic-total-row .tic-label {
    color: #333333;
    font-size: 12px;
}

.tic-total-val {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #936098;
}

.tic-stepper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    overflow: hidden;
    height: 30px;
}

.tic-btn {
    width: 30px;
    height: 100%;
    background: #f5f5f5;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #555555;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tic-btn:hover {
    background: #e5e5e5;
    color: #333333;
}

.tic-input {
    width: 45px;
    height: 100%;
    text-align: center;
    border: none;
    border-left: 1px solid #dddddd;
    border-right: 1px solid #dddddd;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #333333;
    font-size: 13px;
    outline: none;
    -moz-appearance: textfield;
}

.tic-input::-webkit-outer-spin-button,
.tic-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =========================================
   АНИМИРОВАННАЯ КНОПКА ЗАКАЗАТЬ
========================================= */
.tic-action {
    position: relative;
    width: 100%;
}

.tic-btn-order {
    display: block;
    width: 100%;
    background-color: #10b981; 
    color: #ffffff;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.tic-btn-order:hover {
    background-color: #059669;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.tic-btn-text {
    position: relative;
    z-index: 2; 
}

.tic-btn-pattern {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('/assets/img/logo_watermark.svg');
    background-repeat: repeat;
    background-size: 60px;
    opacity: 0;
    z-index: 1;
    transform: rotate(-15deg);
    transition: opacity 0.4s ease;
    pointer-events: none; 
}

.tic-btn-order:hover .tic-btn-pattern {
    opacity: 0.15; 
}

/* ПУСТОЕ СОСТОЯНИЕ */
.cat-landing-empty {
    padding: 60px 20px;
    text-align: center;
    background: #fcf9fa;
    border: 1px dashed #dddddd;
    border-radius: 8px;
    margin-bottom: 50px;
    color: #888888;
    font-size: 15px;
}

/* =========================================
   АДАПТИВНОСТЬ
========================================= */
@media screen and (max-width: 1200px) {
    .cat-landing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 992px) {
    .cat-landing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 576px) {
    .cat-landing-grid { grid-template-columns: 1fr; }
    .cat-landing-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .carousel-btn { opacity: 1; background: rgba(255, 255, 255, 0.9); }
}