/* =======================================================
   МОДУЛЬ: ПАНЕЛЬ БЫСТРОГО РАСЧЕТА (FULL-WIDTH)
======================================================= */
.quick-calc-panel-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #fcfafd; 
    border-top: 1px solid #e2dae6;
    border-bottom: 1px solid #e2dae6;
    
    /* Скрываем по умолчанию для анимации аккордеона */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease, padding 0.6s ease;
}

/* ПАТТЕРН СО СТЯЖКАМИ И СТИЛИСТИЧЕСКИМ КОНТУРОМ */
.quick-calc-panel-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/footer_bg.png');
    background-repeat: repeat;
    background-size: 500px; 
    opacity: 0.15; 
    filter: drop-shadow(1px 1px 2px rgba(107, 63, 116, 0.5)) contrast(1.2);
    pointer-events: none;
    z-index: 0;
}

.quick-calc-panel-wrapper.is-open {
    max-height: 4000px; 
    opacity: 1;
    padding: 60px 0;
}

.quick-calc-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1; /* Поднимаем контент над паттерном */
}

.quick-calc-header {
    text-align: center;
    margin-bottom: 40px;
}

.quick-calc-header h2 {
    font-family: var(--font-title, 'Playfair Display', serif);
    font-size: 38px;
    color: #4a3c5a;
    margin-bottom: 15px;
}

.quick-calc-header p {
    font-family: var(--font-base, sans-serif);
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Сетка для 8 калькуляторов */
.quick-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Карточка отдельного калькулятора */
.qc-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.qc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(147, 96, 152, 0.1);
    border-color: #d1c7d6;
}

.qc-card-title {
    font-family: var(--font-title, 'Playfair Display', serif);
    font-size: 20px;
    color: #4a3c5a;
    margin: 0 0 15px 0;
    text-align: center;
    line-height: 1.2;
}

/* =======================================================
   БЛОК АВТОМАТИЧЕСКОЙ СМЕНЫ ФОТО
======================================================= */
.qc-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px; 
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #eeeeee;
}

.qc-img-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.qc-img-slide.active {
    opacity: 1;
}

.qc-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =======================================================
   КАЛЬКУЛЯТОР
======================================================= */
.qc-tic-container {
    margin-top: auto; 
}

.qc-tic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.qc-tic-row:last-of-type {
    border-bottom: none;
    padding-bottom: 20px;
}

.qc-tic-label {
    font-family: var(--font-base, sans-serif);
    font-size: 11px;
    font-weight: 800;
    color: #936098;
    text-transform: uppercase;
}

.qc-tic-stepper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    overflow: hidden;
}

.qc-tic-btn {
    width: 30px; 
    height: 30px;
    background: #fcfafd; 
    border: none;
    font-size: 16px; 
    font-weight: bold; 
    color: #555;
    cursor: pointer; 
    transition: background 0.2s;
}

.qc-tic-btn:hover { background: #e5e5e5; color: #936098; }

.qc-tic-input {
    width: 45px; 
    height: 30px;
    text-align: center; 
    border: none;
    border-left: 1px solid #dcdcdc; 
    border-right: 1px solid #dcdcdc;
    font-weight: 700; 
    font-size: 14px; 
    color: #333; 
    outline: none;
    -moz-appearance: textfield;
}

.qc-tic-input::-webkit-outer-spin-button,
.qc-tic-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qc-tic-unit-val { font-size: 14px; font-weight: 700; color: #333; }
.qc-tic-total-val { font-size: 18px; font-weight: 800; color: #936098; }

.qc-tic-action { 
    margin-top: 15px; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 3D КНОПКА ЗАКАЗА С БЛИКОМ */
.qc-tic-btn-order {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 30px;
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%);
    box-shadow: 0 4px 12px rgba(223, 27, 83, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.qc-tic-btn-order::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: none;
}

.qc-tic-btn-order:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 20px rgba(147, 96, 152, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.qc-tic-btn-order:hover::after {
    animation: qc-shine 0.7s ease-out;
}

.qc-tic-btn-order:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 5px rgba(223, 27, 83, 0.3), inset 0 2px 4px rgba(0,0,0,0.15);
}

/* ВТОРИЧНАЯ КНОПКА КАТАЛОГА */
.qc-tic-btn-secondary {
    display: block; 
    width: 100%;
    background: transparent; 
    color: #936098;
    border: 1px solid rgba(147, 96, 152, 0.3);
    text-align: center; 
    padding: 12px; 
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 700; 
    font-size: 11px; 
    text-decoration: none; 
    text-transform: uppercase; 
    transition: all 0.2s;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.qc-tic-btn-secondary:hover { 
    background: #fcfafd; 
    border-color: #936098;
    color: #5A2A75; 
}

@keyframes qc-shine {
    100% { left: 200%; }
}

/* Кнопка закрытия */
.quick-calc-close {
    display: block;
    margin: 40px auto 0;
    padding: 12px 40px;
    background: transparent;
    border: 2px solid #936098;
    color: #936098;
    font-family: var(--font-base, sans-serif);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-calc-close:hover {
    background: #936098;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 96, 152, 0.3);
}

@media (max-width: 1200px) {
    .quick-calc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .quick-calc-grid { grid-template-columns: 1fr; }
    .quick-calc-panel-wrapper.is-open { padding: 40px 0; }
    .quick-calc-header h2 { font-size: 28px; }
}

/* =======================================================
   ДОПОЛНЕНИЯ: ЕДИНЫЙ СТИЛЬ КНОПКИ «ОПЦИИ» И ШРИФТ ЗАГОЛОВКА
======================================================= */
.top6-enlarged-title a,
.popular-grid-full .cat-tile-title.top6-enlarged-title a {
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

.bsp-options-btn {
    appearance: none;
    border: 1px solid rgba(147, 96, 152, 0.35);
    background: #ffffff;
    color: #5A2A75;
    padding: 5px 12px;
    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: 5px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(147, 96, 152, 0.08);
    transition: all 0.25s ease;
    z-index: 10;
    white-space: nowrap;
}

.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);
}