/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

.sticky-product-gallery {
    position: sticky;
    top: 30px; /* Отступ сверху */
    align-self: flex-start;
}

/* Для мобильных устройств - отключаем sticky */
@media (max-width: 768px) {
    .sticky-product-gallery {
        position: relative;
        top: auto;
    }
}


/* ===== Таблица цен ремонта ([twc_acf_value]) ===== */
.twc-price-table-wrap {
    margin: 10px 0 20px;
    border: 1px solid rgba(16, 16, 16, .1);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(16, 16, 16, .04);
}

.twc-price-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 15px;
}

.twc-price-table th,
.twc-price-table td {
    padding: 13px 18px;
    border: 0;
    border-bottom: 1px solid rgba(16, 16, 16, .07);
    vertical-align: middle;
    text-align: left;
}

.twc-price-table tbody tr:last-child td {
    border-bottom: 0;
}

.twc-price-table thead th {
    background: var(--wd-primary-color, #2e6bc6);
    color: #fff;
    font-family: var(--wd-title-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.twc-price-table thead th:last-child,
.twc-price-table .twc-price-value {
    text-align: right;
    white-space: nowrap;
}

.twc-price-table tbody tr {
    transition: background-color .15s ease;
}

.twc-price-table tbody tr:hover {
    background: rgba(46, 107, 198, .05);
}

.twc-price-table .twc-price-service {
    color: var(--wd-title-color, #242424);
}

.twc-price-table .twc-price-group th {
    padding-top: 16px;
    background: #f7f8fa;
    color: var(--wd-title-color, #242424);
    font-family: var(--wd-title-font);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.twc-price {
    font-family: var(--wd-title-font);
    font-weight: 700;
    font-size: 16px;
    color: var(--wd-title-color, #242424);
    font-variant-numeric: tabular-nums;
}

.twc-price--free,
.twc-price--ask {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.twc-price--free {
    background: #e7f6ec;
    color: #1e7a3e;
}

.twc-price--ask {
    background: #f1f3f6;
    color: #6b7280;
}

@media (max-width: 576px) {
    .twc-price-table {
        font-size: 14px;
    }

    .twc-price-table th,
    .twc-price-table td {
        padding: 11px 12px;
    }
}


/* ===== Шапка: текстовый логотип и кнопка записи (header-elements/*.php) ===== */
.twc-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--wd-title-color, #242424);
}

.twc-logo__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(150deg, var(--wd-primary-color, #2e6bc6) 0%, #1b3f80 100%);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(27, 63, 128, .6);
}

.twc-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.twc-logo__name {
    font-family: var(--wd-title-font);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.twc-logo__tag {
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.twc-header-cta {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.twc-header-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--wd-primary-color, #2e6bc6);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}

.twc-header-cta__btn:hover {
    box-shadow: 0 10px 22px -8px rgba(46, 107, 198, .7);
    transform: translateY(-1px);
}

/* Мобильная шапка: только иконка */
.whb-hidden-lg .twc-header-cta__btn {
    padding: 10px;
}

.whb-hidden-lg .twc-header-cta__btn span {
    display: none;
}

.whb-hidden-lg .twc-logo__mark {
    width: 34px;
    height: 34px;
}

.whb-hidden-lg .twc-logo__name {
    font-size: 19px;
}

.whb-hidden-lg .twc-logo__tag {
    display: none;
}


/* ===== Подвал (inc/site.php) ===== */
.wd-prefooter {
    padding-bottom: 0 !important;
}

.twc-footer {
    --band-bg: #0f1b33;
    padding: 70px 0 0;
    background: var(--band-bg);
    box-shadow: 0 0 0 100vmax var(--band-bg);
    clip-path: inset(0 -100vmax);
    color: rgba(255, 255, 255, .65);
    font-size: 15px;
}

.twc-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 40px;
    padding-bottom: 50px;
}

.twc-footer__name {
    margin-bottom: 14px;
    color: #fff;
    font-family: var(--wd-title-font);
    font-size: 24px;
    font-weight: 700;
}

.twc-footer__brand p {
    max-width: 320px;
    margin: 0;
    line-height: 1.6;
}

.twc-footer__title {
    margin-bottom: 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.twc-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.twc-footer li {
    margin: 0 0 10px;
}

.twc-footer a {
    color: rgba(255, 255, 255, .75);
    transition: color .15s ease;
}

.twc-footer a:hover {
    color: #fff;
}

.twc-footer .twc-footer__btn {
    color: #9cc0ff;
    font-weight: 600;
}

.twc-footer__bottom {
    padding: 22px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
}

@media (max-width: 768px) {
    .twc-footer {
        padding-top: 50px;
    }

    .twc-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .twc-footer__brand {
        grid-column: span 2;
    }
}

/* Телефон в шапке */
.twc-header-cta {
    gap: 16px;
}

.twc-header-cta__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wd-title-color, #242424) !important;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.twc-header-cta__phone svg {
    color: #1e9e57;
}

.twc-header-cta__phone:hover {
    color: var(--wd-primary-color, #2e6bc6) !important;
}

/* Мобильная шапка: только кнопка звонка (если номер есть), иначе — запись */
.whb-hidden-lg .twc-header-cta__phone {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #1e9e57;
}

.whb-hidden-lg .twc-header-cta__phone svg {
    color: #fff;
}

.whb-hidden-lg .twc-header-cta__phone span {
    display: none;
}

.whb-hidden-lg .twc-header-cta__phone + .twc-header-cta__btn {
    display: none;
}

/* Узкий десктоп: номер не влезает рядом с меню — показываем иконку звонка */
@media (max-width: 1499px) {
    .whb-visible-lg .twc-header-cta__phone {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: #e5f6ec;
    }

    .whb-visible-lg .twc-header-cta__phone span {
        display: none;
    }
}

/* ===== SEO-тексты (inc/seo.php) ===== */
.twc-seo-text {
    margin: 26px 0 10px;
    color: #5b6472;
    font-size: 15px;
    line-height: 1.7;
}

.twc-seo-text h2 {
    margin: 0 0 10px;
    color: #14181f;
    font-size: 20px;
    font-weight: 700;
    text-transform: none;
}

.twc-seo-text p {
    margin: 0 0 10px;
}

.twc-seo-text b {
    color: #14181f;
}

.twc-seo-text--cat {
    max-width: 860px;
    margin: 0 0 50px;
    padding: 30px 34px;
    border-radius: 22px;
    background: #f4f7fb;
}

.twc-seo-text__links a {
    color: var(--wd-primary-color, #2e6bc6);
    font-weight: 500;
}


/* ===== Логотип Taisera «винт» (inc/brand.php) ===== */
.twc-brand {
    display: inline-flex;
    align-items: center;
    gap: .34em;
    font-size: 30px;                 /* размер логотипа задаётся font-size */
    line-height: 1;
    color: #14181f;
    white-space: nowrap;
}

.twc-brand--dark {
    color: #ffffff;
}

.twc-brand__mark {
    display: block;
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    filter: drop-shadow(0 .12em .22em rgba(27, 63, 128, .35));
}

.twc-brand__word {
    font-family: "Sora", "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -.035em;
}

.twc-brand__i {
    position: relative;
    display: inline-block;
}

.twc-brand__tittle {
    position: absolute;
    left: 50%;
    top: -.06em;
    width: .3em;
    height: .3em;
    transform: translateX(-50%);
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

/* Наведение на логотип — винт проворачивается, как под отвёрткой */
.twc-brand__screw {
    transform-box: view-box;
    transform-origin: 50px 50px;
    transition: transform .9s cubic-bezier(.3, 1.35, .5, 1);
}

.wd-logo:hover .twc-brand__screw,
.twc-mm__brand:hover .twc-brand__screw,
.twc-footer__name:hover .twc-brand__screw {
    transform: rotate(-216deg);
}

.wd-logo:hover .twc-brand__tittle,
.twc-mm__brand:hover .twc-brand__tittle,
.twc-footer__name:hover .twc-brand__tittle {
    transform: translateX(-50%) rotate(-216deg);
    transition-duration: .9s;
}

/* На телефоне наведения нет — при касании тоже прокрутится */
.wd-logo:active .twc-brand__screw {
    transform: rotate(-216deg);
}

/* Шапка: компьютер / телефон */
.whb-visible-lg .twc-brand {
    font-size: 28px;
}

.whb-hidden-lg .twc-brand {
    font-size: 23px;
}

/* Мобильное меню и подвал */
.twc-mm__brand .twc-brand {
    font-size: 22px;
}

.twc-footer__name .twc-brand {
    font-size: 26px;
}

@media (prefers-reduced-motion: reduce) {
    .twc-brand__tittle,
    .twc-brand__screw {
        transition: none;
    }
}
