/**
 * Inline Styles - вынесенные из шаблонов стили
 * Из: woocommerce/loop/header.php
 */

/* Active Filters Container Styles */
.active-filters-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.active-filters-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #495057;
}

.filter-item {
    margin-bottom: 0.75rem;
}

.filter-label {
    font-weight: 600;
    color: #212529;
    margin-right: 0.5rem;
}

.filter-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-value {
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.2rem;
    font-size: 0.9rem;
}

/* H1-visual - H2 со стилями H1 для корректной семантики */
.h1-visual {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    margin: inherit;
    color: inherit;
}

/* H3-1 как H2 - сохранение стилей для about.php */
h2.h3-1 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    margin: inherit;
}

/* ===== Секция «О товаре» — описание категории ===== */

/* Шапка секции */
.ca-section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #234989;
}
.ca-section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #234989;
    margin-bottom: 8px;
}
.ca-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--gray-900, #151b21) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -1px;
}

/* Белые карточки-контейнеры */
.ca-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Левая колонка — текст + изображение */
.ca-2.ca-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.ca-2-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    letter-spacing: -0.1px;
}
.ca-2-image {
    max-width: 280px;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
}
.ca-2-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Средняя колонка — цена + инфо */
.ca-3.ca-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
    margin: 0;
    max-width: none;
    font-size: 15px;
    line-height: 1.6;
}
.ca-3.ca-card > .ca-3-price {
    font-size: 28px;
    font-weight: 700;
    color: #234989;
    letter-spacing: -0.5px;
    margin-bottom: 0 !important;
    text-align: center;
}
.ca-3-info {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

/* Правая колонка — аккордеон */
.ca-4.ca-card {
    padding: 20px 28px;
}

/* Аккордеон — улучшенный дизайн */
#main-page-category-2 .pesontedan {
    border-bottom: 1px solid #e5e7eb;
}
#main-page-category-2 .pesontedan:last-child {
    border-bottom: none;
}
#main-page-category-2 .pesontedan label {
    font-size: 15px;
    font-weight: 600;
    color: #151b21;
    padding: 14px 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
#main-page-category-2 .pesontedan label:hover {
    color: #234989;
}
#main-page-category-2 .pesontedan label img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
#main-page-category-2 .pesontedan label:hover img {
    opacity: 1;
}
#main-page-category-2 .pesontedan-content {
    color: #444;
    font-size: 14px;
    line-height: 1.7;
    border-bottom: none;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
#main-page-category-2 .pesontedan input:checked ~ .pesontedan-content {
    padding: 0 0 16px;
}
#main-page-category-2 .pesontedan-content p {
    margin: 0 0 12px;
}
#main-page-category-2 .pesontedan-content p:last-child {
    margin-bottom: 0;
}
#main-page-category-2 .pesontedan-content strong {
    color: #151b21;
}

/* Адаптив */
@media (max-width: 1200px) {
    .ca-section-title {
        font-size: 28px !important;
    }
    .ca-card {
        padding: 22px;
    }
    .ca-2.ca-card {
        flex-direction: row;
        align-items: flex-start;
    }
    .ca-2-image {
        max-width: 160px;
        flex-shrink: 0;
    }
    .ca-3.ca-card {
        flex-direction: row;
        text-align: left;
    }
    .ca-3-price {
        font-size: 24px;
        white-space: nowrap;
    }
}
@media (max-width: 800px) {
    .ca-section-title {
        font-size: 24px !important;
    }
    .ca-card {
        padding: 18px;
    }
    .ca-2.ca-card {
        flex-direction: column;
    }
    .ca-2-image {
        max-width: 120px;
    }
    .ca-3.ca-card {
        flex-direction: column;
        text-align: center;
    }
    .ca-3-price {
        font-size: 22px;
    }
    .ca-4.ca-card {
        padding: 14px 18px;
    }
}
@media (max-width: 600px) {
    .ca-section-header {
        margin-bottom: 20px;
        padding-bottom: 14px;
    }
    .ca-section-title {
        font-size: 22px !important;
    }
    .ca-card {
        padding: 16px;
        border-radius: 8px;
    }
}

/* ===== Контакты — информационный блок ===== */
.contacts-info {
    padding-top: 24px;
    margin-bottom: 40px;
}
.contacts-info__actions {
    margin-bottom: 24px;
}
.contacts-info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.contacts-info__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8f9fb;
    border-radius: 12px;
    padding: 20px 24px;
}
.contacts-info__item svg {
    flex-shrink: 0;
    margin-top: 2px;
    stroke: #234989;
}
.contacts-info__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7a8086;
    margin-bottom: 4px;
}
.contacts-info__value {
    font-size: 15px;
    font-weight: 600;
    color: #1a2332;
    line-height: 1.5;
}
.contacts-info__link {
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}
.contacts-info__link:hover {
    color: #3d5a96;
}
.contacts-info__phone.phone_block {
    position: relative;
    width: fit-content;
    height: 22px;
    display: flex;
}
.contacts-info__phone.phone_block a {
    color: #1a2332;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.contacts-info__phone.phone_block a:hover {
    color: #3d5a96;
}
.contacts-info__phone.phone_block .view {
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
    top: 0;
    padding-right: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, transparent 0%, #f8f9fb 35%, #f8f9fb 100%);
    color: #3d5a96;
}
.contacts-info__phone.phone_block:hover .view {
    background: linear-gradient(90deg, transparent 0%, #f8f9fb 55%, #f8f9fb 100%);
}
.contacts-info__phone.phone_block .view span {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}
.contacts-info__messengers {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.contacts-info__item--messengers .footer-msg {
    background: #e2e8f0;
}
@media (max-width: 600px) {
    .contacts-info__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .contacts-info__item {
        padding: 16px 18px;
    }
    .contacts-info {
        margin-bottom: 28px;
    }
}

/* ===== Footer phone_block — скрытие номера ===== */
.footer-phone.phone_block {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: flex;
}
.footer-phone.phone_block a {
    color: #1a2332;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.footer-phone.phone_block a:hover {
    color: #3d5a96;
}
.footer-phone.phone_block .view {
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
    top: 0;
    padding-right: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, transparent 0%, #f5f7fa 35%, #f5f7fa 100%);
    color: #3d5a96;
}
.footer-phone.phone_block:hover .view {
    background: linear-gradient(90deg, transparent 0%, #f5f7fa 55%, #f5f7fa 100%);
}
.footer-phone.phone_block .view span {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

/* ===== Inline phone_block (в тексте категорий/статей) ===== */
.phone_block--inline {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    white-space: nowrap;
}
.phone_block--inline a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    font-size: inherit;
}
.phone_block--inline a:hover {
    color: #3d5a96;
}
.phone_block--inline .view {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding-right: 2px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    user-select: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, transparent 0%, #fff 35%, #fff 100%);
    color: #3d5a96;
}
.phone_block--inline:hover .view {
    background: linear-gradient(90deg, transparent 0%, #fff 55%, #fff 100%);
}
/* Тёмный фон секций (ca-card и т.п.) */
.ca-card .phone_block--inline .view {
    background: linear-gradient(90deg, transparent 0%, #f8fafc 35%, #f8fafc 100%);
}
.ca-card .phone_block--inline:hover .view {
    background: linear-gradient(90deg, transparent 0%, #f8fafc 55%, #f8fafc 100%);
}

/* ===== Доставка/Оплата — переиспользуют .service-page стили ===== */

/* Текстовый контент внутри intro-desc должен занимать всю ширину */
.service-page__intro-desc .service-page__scope-text {
    width: 100%;
    text-align: left;
}

/* Градиентная заглушка вместо фото на странице оплаты */
.service-page__intro-image--gradient {
    background: linear-gradient(135deg, #002C58 0%, #0044aa 50%, var(--brand, #002FFF) 100%);
}
.service-page__intro-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Контент доставки/оплаты внутри service-page ===== */
.service-page__scope-text h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900, #111827);
    margin: 28px 0 16px;
    line-height: 1.2;
}
.service-page__scope-text h3:first-child {
    margin-top: 0;
}
.service-page__scope-text ol {
    list-style: none;
    counter-reset: sp-counter;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.service-page__scope-text ol li {
    counter-increment: sp-counter;
    position: relative;
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #E5E7EB);
    border-radius: 14px;
    padding: 20px 20px 20px 64px;
    font-size: 15px;
    line-height: 1.6;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-page__scope-text ol li:hover {
    border-color: var(--brand, #002FFF);
    box-shadow: 0 8px 32px rgba(0, 47, 255, 0.08);
}
.service-page__scope-text ol li::before {
    content: counter(sp-counter);
    position: absolute;
    left: 16px;
    top: 18px;
    width: 32px;
    height: 32px;
    background: var(--brand-light, #EBF0FF);
    color: var(--brand, #002FFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.service-page__scope-text p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-600, #4B5563);
}
.service-page__scope-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .service-page__scope-text ol li {
        padding: 16px 16px 16px 52px;
        font-size: 14px;
        border-radius: 10px;
    }
    .service-page__scope-text ol li::before {
        left: 12px;
        top: 14px;
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    .service-page__scope-text h3 {
        font-size: 18px;
        margin: 24px 0 12px;
    }
}
