/*
Theme Name: Hello Elementor Child - Iron Fort
Theme URI: https://ironfort.ru
Description: Дочерняя тема Hello Elementor для сайта «Железный Форт» (ironfort.ru) — производство кровли и фасадов из оцинкованной стали. Каталог доборных элементов на WooCommerce, свои виджеты Elementor (каталог, карточка товара с вариантами и корзиной, галерея, таблица RAL), оформление заказа и PDF-документы; вёрстка по макетам Figma для компьютера, планшета и телефона.
Author: Iron Fort Dev
Author URI: https://ironfort.ru
Template: hello-elementor
Version: 1.3.12
Text Domain: hello-elementor-child
*/

/* ==========================================================================
   IRON FORT CATALOG STYLES
   Prefix: .if- (Iron Fort)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* Fonts */
    --if-font-heading: ONDER, sans-serif;
    --if-font-body: Inter, sans-serif;
    
    /* Colors - Use Elementor primary color if available, fallback to red */
    --if-color-primary: var(--e-global-color-primary, #DC2626);
    --if-color-dark: #111827;
    --if-color-text: var(--e-global-color-text, #374151);
    --if-color-text-light: #6B7280;
    --if-color-text-muted: #9CA3AF;
    --if-color-border: #E5E7EB;
    --if-color-border-light: #F3F4F6;
    --if-color-bg: #F3F4F6;
    --if-color-white: #FFFFFF;
    
    /* Spacing */
    --if-container-max: 1400px;
    --if-gap: 24px;
    --if-gap-sm: 16px;
    --if-gap-xs: 8px;
    
    /* Border Radius */
    --if-radius: 16px;
    --if-radius-sm: 8px;
    --if-radius-pill: 9999px;
    
    /* Transitions */
    --if-transition: all 0.3s ease;
    --if-transition-fast: all 0.15s ease;
    
    /* Shadows */
    --if-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --if-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --if-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   Base / Reset for Catalog
   -------------------------------------------------------------------------- */
.if-catalog-page {
    background-color: var(--if-color-bg);
    min-height: 100vh;
}

.if-catalog-page *,
.if-catalog-page *::before,
.if-catalog-page *::after {
    box-sizing: border-box;
}

/* Inherit fonts from body (set by Elementor) */
.if-catalog-page,
.if-catalog-page .if-catalog-wrapper {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.if-container {
    max-width: var(--if-container-max);
    margin: 0 auto;
    padding: 0 var(--if-gap);
}

/* --------------------------------------------------------------------------
   Top Categories Navigation (ПРОДУКЦИЯ)
   -------------------------------------------------------------------------- */
.if-top-categories {
    margin-bottom: var(--if-gap);
    padding-bottom: var(--if-gap);
    border-bottom: 2px solid var(--if-color-border);
}

.if-top-categories__title {
    font-family: var(--if-font-heading);
    font-size: 25px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #FF0000;
    margin: 0 0 var(--if-gap-sm);
}

/* --------------------------------------------------------------------------
   Catalog Section (КАТАЛОГ with category previews)
   -------------------------------------------------------------------------- */
.if-catalog-section {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--if-color-border);
}

.if-catalog-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--if-gap);
    gap: var(--if-gap);
}

.if-catalog-filter-group {
    display: flex;
    gap: 40px;
}

.if-catalog-filter-group--right {
    gap: 60px;
}

.if-filter__options--vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.if-filter__options--vertical .if-filter__btn {
    padding: 4px 0;
    border: none;
    background: none;
    font-size: 11px;
    color: var(--if-color-text-muted);
}

.if-filter__options--vertical .if-filter__btn:hover,
.if-filter__options--vertical .if-filter__btn.active {
    color: var(--if-color-dark);
}

/* Category Preview List */
.if-category-preview-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.if-category-preview {
    display: flex;
    gap: var(--if-gap);
    align-items: flex-start;
}

.if-category-preview__header {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: var(--if-gap-sm);
}

.if-category-preview__title {
    font-family: var(--if-font-heading);
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: #FF0000;
    margin: 0;
    line-height: 1.2;
}

.if-category-preview__link {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
    font-family: var(--if-font-body);
    font-size: 12px;
    font-weight: 600;
    color: #FF0000;
    text-decoration: none;
    text-transform: uppercase;
}

.if-category-preview__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--if-color-border);
    border-radius: 50%;
    font-size: 18px;
    color: var(--if-color-dark);
    transition: var(--if-transition-fast);
}

.if-category-preview__link:hover .if-category-preview__arrow {
    border-color: #FF0000;
    color: #FF0000;
}

/* Preview Cards Grid */
.if-category-preview__products {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--if-gap);
}

.if-preview-card {
    background: var(--if-color-white);
    border-radius: var(--if-radius);
    padding: var(--if-gap);
    position: relative;
    border: 1px solid var(--if-color-border-light);
}

.if-preview-card__logo {
    position: absolute;
    top: var(--if-gap-sm);
    left: var(--if-gap-sm);
}

.if-preview-card__details {
    position: absolute;
    top: var(--if-gap-sm);
    right: var(--if-gap-sm);
    font-family: var(--if-font-heading);
    font-size: 10px;
    font-weight: 700;
    color: var(--if-color-dark);
    text-decoration: none;
    text-transform: uppercase;
}

.if-preview-card__details:hover {
    color: #FF0000;
}

.if-preview-card__image {
    display: block;
    text-align: center;
    margin-bottom: var(--if-gap-sm);
    padding-top: 20px;
}

.if-preview-card__image img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.if-preview-card__title {
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-sm);
    text-align: center;
    line-height: 1.3;
}

.if-preview-card__actions {
    display: flex;
    gap: var(--if-gap-xs);
    justify-content: center;
}

.if-btn--small {
    padding: 10px 16px;
    font-size: 10px;
}

.if-btn--red {
    background: #FF0000;
    border-color: #FF0000;
    color: var(--if-color-white);
    padding: 12px 40px;
}

.if-btn--red:hover {
    background: #cc0000;
    border-color: #cc0000;
}

/* Catalog More Button */
.if-catalog-more {
    display: flex;
    justify-content: center;
    margin-top: var(--if-gap);
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.if-breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--if-color-text-muted);
    padding: var(--if-gap) 0;
}

.if-breadcrumbs a {
    color: var(--if-color-text-muted);
    text-decoration: none;
    transition: var(--if-transition-fast);
}

.if-breadcrumbs a:hover {
    color: var(--if-color-primary);
}

.if-breadcrumbs__separator {
    color: var(--if-color-border);
}

.if-breadcrumbs__current {
    color: var(--if-color-dark);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Catalog Header (Search + Title)
   -------------------------------------------------------------------------- */
.if-catalog-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--if-gap);
    margin-bottom: var(--if-gap);
}

.if-catalog-title {
    font-size: 25px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #FF0000;
    margin: 0;
    font-family: var(--if-font-heading); /* ONDER for headings */
}

.if-search-form {
    display: flex;
    align-items: center;
    background: var(--if-color-white);
    border: 1px solid var(--if-color-border);
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: 300px;
    overflow: hidden;
}

.if-search-form__input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    width: 100%;
    padding: 12px 16px;
    color: var(--if-color-text);
    font-family: var(--if-font-body);
}

.if-search-form__input::placeholder {
    color: var(--if-color-text-muted);
    font-family: var(--if-font-body);
    text-transform: uppercase;
    font-size: 11px;
}

.if-search-form__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-left: 1px solid var(--if-color-border);
}

.if-search-form__icon {
    color: var(--if-color-text-muted);
    flex-shrink: 0;
}

.if-search-form__btn:hover .if-search-form__icon {
    color: var(--if-color-dark);
}

/* --------------------------------------------------------------------------
   Top Filters Bar
   -------------------------------------------------------------------------- */
.if-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--if-gap);
    padding: var(--if-gap-sm) 0;
    margin-bottom: var(--if-gap);
    border-bottom: 1px solid var(--if-color-border);
}

.if-filters-group {
    display: flex;
    align-items: center;
    gap: var(--if-gap);
    flex-wrap: wrap;
}

.if-filter {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
}

.if-filter__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--if-color-text-muted);
    white-space: nowrap;
    font-family: var(--if-font-heading); /* ONDER for filter labels */
}

.if-filter__options {
    display: flex;
    gap: 4px;
}

.if-filter__btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--if-color-border);
    border-radius: var(--if-radius-sm);
    background: var(--if-color-white);
    color: var(--if-color-text);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-filter__btn:hover {
    border-color: var(--if-color-dark);
}

.if-filter__btn.active {
    background: var(--if-color-dark);
    border-color: var(--if-color-dark);
    color: var(--if-color-white);
}

.if-filter__select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--if-color-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* --------------------------------------------------------------------------
   Main Layout (Sidebar + Content)
   -------------------------------------------------------------------------- */
.if-catalog-layout {
    display: flex;
    gap: var(--if-gap);
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.if-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.if-sidebar__inner {
    position: sticky;
    top: 100px;
    background: var(--if-color-white);
    border-radius: var(--if-radius);
    padding: var(--if-gap);
    box-shadow: var(--if-shadow);
}

.if-sidebar__title {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-sm);
    padding-bottom: var(--if-gap-sm);
    border-bottom: 1px solid var(--if-color-border-light);
    font-family: var(--if-font-heading); /* ONDER for headings */
}

/* Category List in Sidebar */
.if-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.if-category-item {
    margin: 0;
}

.if-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--if-color-text-light);
    border-radius: var(--if-radius-sm);
    transition: var(--if-transition-fast);
    font-family: var(--if-font-body); /* LTRemark for sidebar categories */
}

.if-category-link:hover {
    background: var(--if-color-border-light);
    color: var(--if-color-primary);
}

.if-category-link.active {
    background: var(--if-color-dark);
    color: var(--if-color-white);
    box-shadow: var(--if-shadow);
}

.if-category-link__arrow {
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--if-transition-fast);
}

.if-category-link.active .if-category-link__arrow,
.if-category-link:hover .if-category-link__arrow {
    opacity: 1;
    transform: translateX(0);
}

.if-category-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--if-color-text-muted);
    background: var(--if-color-border-light);
    padding: 2px 8px;
    border-radius: var(--if-radius-pill);
}

.if-category-link.active .if-category-count {
    background: rgba(255,255,255,0.2);
    color: var(--if-color-white);
}

/* --------------------------------------------------------------------------
   Products Grid
   -------------------------------------------------------------------------- */
.if-catalog-content {
    flex: 1;
    min-width: 0;
}

.if-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--if-gap);
}

/* --------------------------------------------------------------------------
   Product Card
   -------------------------------------------------------------------------- */
.if-product-card {
    background: var(--if-color-white);
    border-radius: var(--if-radius);
    padding: var(--if-gap);
    border: 1px solid var(--if-color-border-light);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--if-transition);
}

.if-product-card:hover {
    box-shadow: var(--if-shadow-xl);
    transform: translateY(-4px);
}

/* Badge */
.if-product-badge {
    position: absolute;
    top: var(--if-gap-sm);
    left: var(--if-gap-sm);
    background: var(--if-color-primary);
    color: var(--if-color-white);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

/* Details Link */
.if-product-details-link {
    position: absolute;
    top: var(--if-gap-sm);
    right: var(--if-gap-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--if-color-primary);
    text-decoration: none;
    opacity: 0;
    transform: translateX(8px);
    transition: var(--if-transition-fast);
    z-index: 2;
}

.if-product-card:hover .if-product-details-link {
    opacity: 1;
    transform: translateX(0);
}

.if-product-details-link:hover {
    text-decoration: underline;
}

/* Image */
.if-product-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    margin-bottom: var(--if-gap-sm);
    background: var(--if-color-border-light);
    border-radius: var(--if-radius-sm);
    overflow: hidden;
    transition: var(--if-transition-fast);
}

.if-product-card:hover .if-product-image {
    background: var(--if-color-border);
}

.if-product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Title */
.if-product-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-sm);
    font-family: var(--if-font-heading); /* ONDER for product titles */
}

.if-product-title a {
    color: inherit;
    text-decoration: none;
}

.if-product-title a:hover {
    color: var(--if-color-primary);
}

/* Variations (Pills/Buttons) */
.if-product-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--if-gap-sm);
}

.if-variation-btn {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--if-color-border);
    border-radius: var(--if-radius-sm);
    background: var(--if-color-white);
    color: var(--if-color-text);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-variation-btn:hover {
    border-color: var(--if-color-dark);
}

.if-variation-btn.active {
    background: var(--if-color-dark);
    border-color: var(--if-color-dark);
    color: var(--if-color-white);
}

/* Quantity */
.if-product-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: var(--if-gap-sm);
}

.if-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid var(--if-color-border);
    border-radius: var(--if-radius-sm);
    background: var(--if-color-white);
    color: var(--if-color-text);
    cursor: pointer;
    transition: var(--if-transition-fast);
    user-select: none;
}

.if-qty-btn:hover {
    border-color: var(--if-color-dark);
    background: var(--if-color-dark);
    color: var(--if-color-white);
}

/* Shared quantity stepper icon (inline SVG from if_qty_icon()).
   currentColor = follows each button's text/hover color. Size is a % of the
   button, so cart (30px), catalog (15px) and IF Split (20px) all scale from
   one rule. pointer-events off so clicks always reach the button. */
.if-qty-ico {
    display: block;
    /* Fixed px (not %) so the inline SVG never collapses to 0 width inside the flex
       button. Concrete dark fill (not currentColor) so the +/- stays visible even
       when the button's inherited color is overridden. Catalog overrides to 9px below. */
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    fill: var(--if-color-dark, #000);
    pointer-events: none;
}

.if-qty-ico line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    /* Constant crisp stroke at every button size (15/20/30px) instead of a
       sub-pixel hairline on the small catalog stepper. */
    vector-effect: non-scaling-stroke;
}

.if-qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--if-color-border);
    border-radius: var(--if-radius-sm);
    color: var(--if-color-dark);
}

.if-qty-input::-webkit-outer-spin-button,
.if-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.if-qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Actions */
.if-product-actions {
    display: flex;
    gap: var(--if-gap-xs);
    margin-top: auto;
}

.if-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
    border: 2px solid transparent;
    font-family: var(--if-font-heading); /* ONDER for buttons */
}

.if-btn--primary {
    background: var(--if-color-dark);
    border-color: var(--if-color-dark);
    color: var(--if-color-white);
}

.if-btn--primary:hover {
    background: var(--if-color-text);
    border-color: var(--if-color-text);
}

.if-btn--outline {
    background: transparent;
    border-color: var(--if-color-dark);
    color: var(--if-color-dark);
}

.if-btn--outline:hover {
    background: var(--if-color-dark);
    color: var(--if-color-white);
}

/* --------------------------------------------------------------------------
   Banner Card (Unique Order)
   -------------------------------------------------------------------------- */
.if-banner-card {
    background: var(--if-color-border-light);
    border: 2px dashed var(--if-color-border);
    border-radius: var(--if-radius);
    padding: var(--if-gap);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.if-banner-card__icon {
    color: var(--if-color-primary);
    margin-bottom: var(--if-gap-sm);
}

.if-banner-card__title {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-sm);
    font-family: var(--if-font-heading); /* ONDER for banner title */
}

.if-banner-card__title span {
    color: var(--if-color-primary);
}

.if-banner-card__actions {
    display: flex;
    gap: var(--if-gap-xs);
    margin-top: var(--if-gap-sm);
}

.if-banner-card__btn {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
    border: none;
}

.if-banner-card__btn--primary {
    background: var(--if-color-dark);
    color: var(--if-color-white);
}

.if-banner-card__btn--primary:hover {
    background: var(--if-color-text);
}

.if-banner-card__btn--secondary {
    background: var(--if-color-white);
    color: var(--if-color-dark);
    border: 1px solid var(--if-color-border);
}

.if-banner-card__btn--secondary:hover {
    background: var(--if-color-border-light);
}

.if-banner-card__bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    opacity: 0.1;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.if-pagination-wrapper {
    margin-top: var(--if-gap);
    padding-top: var(--if-gap);
}

.if-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--if-gap-xs);
    margin-bottom: var(--if-gap-sm);
}

.if-pagination__link,
.if-pagination__current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--if-radius-sm);
    text-decoration: none;
    transition: var(--if-transition-fast);
}

.if-pagination__link {
    background: var(--if-color-white);
    color: var(--if-color-text);
    border: 1px solid var(--if-color-border);
}

.if-pagination__link:hover {
    border-color: var(--if-color-dark);
    color: var(--if-color-dark);
}

.if-pagination__current {
    background: var(--if-color-dark);
    color: var(--if-color-white);
}

.if-pagination__dots {
    color: var(--if-color-text-muted);
}

/* Load More Button */
.if-load-more {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 16px 32px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    background: var(--if-color-white);
    border: 2px solid var(--if-color-border);
    border-radius: var(--if-radius-pill);
    color: var(--if-color-text);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-load-more:hover {
    border-color: var(--if-color-dark);
    color: var(--if-color-dark);
}

.if-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.if-load-more.loading {
    position: relative;
    color: transparent;
}

.if-load-more.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--if-color-border);
    border-top-color: var(--if-color-dark);
    border-radius: 50%;
    animation: if-spin 0.6s linear infinite;
}

@keyframes if-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   SEO Text Block
   -------------------------------------------------------------------------- */
.if-seo-block {
    background: var(--if-color-white);
    border-radius: var(--if-radius);
    padding: var(--if-gap);
    margin-top: var(--if-gap);
    box-shadow: var(--if-shadow);
}

.if-seo-block__title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-sm);
    font-family: var(--if-font-heading); /* ONDER for SEO title */
}

.if-seo-block__content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--if-color-text-light);
    font-family: var(--if-font-body); /* LTRemark for SEO text */
}

.if-seo-block__content p {
    margin: 0 0 var(--if-gap-sm);
}

.if-seo-block__content p:last-child {
    margin-bottom: 0;
}

.if-seo-block__highlight {
    background: var(--if-color-border-light);
    border-left: 4px solid var(--if-color-primary);
    padding: var(--if-gap-sm);
    border-radius: 0 var(--if-radius-sm) var(--if-radius-sm) 0;
    margin-top: var(--if-gap-sm);
}

.if-seo-block__highlight-title {
    font-weight: 700;
    color: var(--if-color-dark);
    margin-bottom: var(--if-gap-xs);
}

.if-seo-block__highlight ul {
    margin: var(--if-gap-xs) 0 0;
    padding-left: 20px;
}

.if-seo-block__highlight li {
    margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   No Products
   -------------------------------------------------------------------------- */
.if-no-products {
    grid-column: 1 / -1;
    background: var(--if-color-white);
    border: 2px dashed var(--if-color-border);
    border-radius: var(--if-radius);
    padding: 60px var(--if-gap);
    text-align: center;
    color: var(--if-color-text-muted);
}

.if-no-products__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--if-color-text-light);
    margin: 0 0 var(--if-gap-xs);
}

/* --------------------------------------------------------------------------
   Loading State
   -------------------------------------------------------------------------- */
.if-loading {
    position: relative;
    pointer-events: none;
}

.if-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* --------------------------------------------------------------------------
   Responsive (breakpoints as in Elementor: phone ≤767, tablet 768–1024)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .if-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .if-catalog-layout {
        flex-direction: column;
    }
    
    .if-sidebar {
        width: 100%;
    }
    
    .if-sidebar__inner {
        position: static;
    }
    
    .if-category-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .if-category-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    :root {
        --if-gap: 16px;
    }
    
    .if-catalog-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .if-catalog-title {
        font-size: 24px;
        text-align: center;
    }
    
    .if-search-form {
        max-width: 100%;
    }
    
    .if-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .if-filters-group {
        justify-content: center;
    }
    
    .if-products-grid {
        grid-template-columns: 1fr;
    }
    
    .if-product-actions {
        flex-direction: column;
    }
    
    .if-btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   WooCommerce Overrides
   -------------------------------------------------------------------------- */
.if-catalog-page .woocommerce-result-count,
.if-catalog-page .woocommerce-ordering {
    display: none;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.if-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.if-hidden {
    display: none !important;
}

/* ==========================================================================
   CART PAGE STYLES
   ========================================================================== */

.if-cart-page {
    /* background like in mock (warm beige) */
    background-color: #E9E6DA;
    min-height: 100vh;
    padding: var(--if-gap) 0 60px;
}

.if-cart-title {
    font-family: var(--if-font-heading);
    font-size: 25px;
    font-weight: 900;
    text-transform: uppercase;
    color: #FF0000;
    margin: 0 0 var(--if-gap);
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

/* Cart updating overlay */
.if-cart-loader {
    position: fixed;
    inset: 0;
    background: rgba(233, 230, 218, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.if-cart-loader.is-active {
    display: flex;
}

.if-cart-loader__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(17, 24, 39, 0.18);
    border-radius: var(--if-radius-pill);
    padding: 14px 18px;
}

.if-cart-loader__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(17, 24, 39, 0.18);
    border-top-color: #FF0000;
    border-radius: 50%;
    animation: if-spin 0.6s linear infinite;
}

.if-cart-loader__text {
    font-family: var(--if-font-body);
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.7);
}

/* Hide default WP/Elementor page title on cart page (we render our own) */
body.woocommerce-cart .entry-title,
body.woocommerce-cart .elementor-page-title,
body.woocommerce-cart .woocommerce-products-header__title {
    display: none !important;
}

/* WooCommerce default: remove outer border on order/cart tables */
.woocommerce table.shop_table {
    border: none !important;
}

/* Woo notices on cart: keep visual style aligned with IF layout */
body.woocommerce-cart .woocommerce-notices-wrapper {
    margin: 0 0 18px;
}

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(17, 24, 39, 0.2);
    border-radius: 12px;
    color: #111827;
    font-family: var(--if-font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 12px 16px 12px 40px;
}

/* Kill default Woo magenta hover/focus on cart/checkout controls */
body.woocommerce-cart .if-cart-page :is([type="button"], [type="submit"], button):hover,
body.woocommerce-cart .if-cart-page :is([type="button"], [type="submit"], button):focus,
body.woocommerce-checkout .if-checkout-page :is([type="button"], [type="submit"], button):hover,
body.woocommerce-checkout .if-checkout-page :is([type="button"], [type="submit"], button):focus {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Keep brand buttons in expected states after global override above */
body.woocommerce-cart .if-cart-page .if-cart-share-btn:hover,
body.woocommerce-cart .if-cart-page .if-cart-share-btn:focus {
    background: #333 !important;
    color: var(--if-color-white);
}

body.woocommerce-cart .if-cart-page .if-btn--checkout:hover,
body.woocommerce-cart .if-cart-page .if-btn--checkout:focus {
    background: #cc0000 !important;
    color: var(--if-color-white);
}

body.woocommerce-cart .if-cart-page .if-qty-btn:hover,
body.woocommerce-cart .if-cart-page .if-qty-btn:focus {
    background: transparent !important;
}

body.woocommerce-checkout .if-checkout-page :is(.if-btn--checkout-submit, #place_order):hover,
body.woocommerce-checkout .if-checkout-page :is(.if-btn--checkout-submit, #place_order):focus {
    background: #cc0000 !important;
    color: #edebde !important;
}

/* Cart Layout */
.if-cart-layout {
    display: flex;
    gap: var(--if-gap);
    align-items: flex-start;
}

.if-cart-items-wrapper {
    flex: 0 0 67%;
    min-width: 0;
}

/* Actions Bar */
.if-cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 10px 16px;
    border: 1px solid rgba(17, 24, 39, 0.25);
    border-radius: var(--if-radius-pill);
    margin-bottom: var(--if-gap-sm);
}

.if-cart-select-all {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--if-color-dark);
    cursor: pointer;
}

.if-cart-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF0000;
}

.if-cart-actions-right {
    display: flex;
    align-items: center;
    gap: var(--if-gap-sm);
}

.if-cart-share-btn {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--if-color-white);
    background: var(--if-color-dark);
    border: none;
    padding: 8px 18px;
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-cart-share-btn:hover {
    background: #333;
}

.if-cart-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--if-radius-pill);
    color: var(--if-color-text-muted);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-cart-delete-btn:hover {
    border-color: #FF0000;
    color: #FF0000;
}

/* Section Title */
.if-cart-section-title {
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.35);
    margin-bottom: var(--if-gap-sm);
    padding-left: 4px;
}

/* Cart Items */
.if-cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--if-gap-sm);
}

.if-cart-item {
    display: flex;
    align-items: center;
    gap: var(--if-gap);
    background: #D9D6CB;
    padding: 16px 18px;
    border-radius: var(--if-radius);
}

.if-cart-item__checkbox {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    padding: 5px;
    background: #d9d6cb; /* corner pad flush to the image top-left */
    border-radius: 0 0 8px 0;
}

/* Square checkbox shared by the cart and the catalog sidebar (.if-checkbox on the input,
   products-module widget): the owner asked for the catalog boxes to look exactly like
   these, so both read the same rule instead of two copies drifting apart. */
.if-cart-item__checkbox input[type="checkbox"],
.if-cart-select-all input[type="checkbox"],
input[type="checkbox"].if-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid rgba(17, 24, 39, 0.3);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease;
}
.if-cart-item__checkbox input[type="checkbox"]:hover,
.if-cart-select-all input[type="checkbox"]:hover,
input[type="checkbox"].if-checkbox:hover {
    border-color: rgba(17, 24, 39, 0.55);
}
.if-cart-item__checkbox input[type="checkbox"]:checked,
.if-cart-select-all input[type="checkbox"]:checked,
input[type="checkbox"].if-checkbox:checked {
    border-color: var(--if-color-primary, #DC2626);
}
/* Checkmark (rotated-border trick) */
.if-cart-item__checkbox input[type="checkbox"]:checked::after,
.if-cart-select-all input[type="checkbox"]:checked::after,
input[type="checkbox"].if-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--if-color-primary, #DC2626);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.if-cart-item__image {
    flex: 0 0 100px;
    position: relative;
}

.if-cart-item__image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 10px;
    overflow: hidden;
}

.if-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.if-cart-item__info {
    flex: 1;
    min-width: 0;
}

.if-cart-item__name {
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--if-color-dark);
    margin: 0 0 var(--if-gap-xs);
    line-height: 1.4;
}

.if-cart-item__name a {
    color: inherit;
    text-decoration: none;
}

.if-cart-item__name a:hover {
    color: #FF0000;
}

.if-cart-item__variations {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--if-gap-xs);
}

.if-cart-item__variation-pill {
    display: inline-block;
    padding: 2px 10px;
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    color: #FF0000;
    border: 1px solid #FF0000;
    border-radius: var(--if-radius-pill);
}

.if-cart-item__remove {
    display: inline-flex;
    color: var(--if-color-text-muted);
    transition: var(--if-transition-fast);
}

.if-cart-item__remove:hover {
    color: #FF0000;
}

.if-cart-item__remove svg {
    width: 22px;
    height: 22px;
}

.if-cart-item__price {
    flex: 0 0 120px;
    font-family: var(--if-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--if-color-dark);
    text-align: right;
}

.if-cart-item__quantity {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--if-gap-xs);
}

/* Custom Quantity Input for Cart */
.if-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.if-qty-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    background: transparent;
    border: 1px solid rgba(17, 24, 39, 0.35);
    border-radius: 50%;
    color: var(--if-color-dark);
    cursor: pointer;
    transition: var(--if-transition-fast);
    user-select: none;
}

.if-qty-btn:hover {
    border-color: #FF0000;
    color: #FF0000;
    background: transparent;
}

/* Cart stepper buttons: 30×30 including the border (по ТЗ). Scoped to the cart
   wrapper so it overrides the shared .if-qty-btn without touching the widget/cards.
   padding:0 beats the reset.css [type=button]{padding:1rem} that was inflating them. */
.if-qty-wrapper .if-qty-btn {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    padding: 14px;
}

/* Neutralise reset.css `button:hover/:focus { background:#c36; color:#fff }` on the
   cart +/- for hover/focus/active. (0,3,0) beats the reset's [type=button]:hover (0,2,0). */
.if-qty-wrapper .if-qty-btn:hover,
.if-qty-wrapper .if-qty-btn:focus,
.if-qty-wrapper .if-qty-btn:active {
    background: transparent;
    color: #FF0000;
    border-color: #FF0000;
}

/* Empty cart (cart-empty.php override) + cart-page notices → ONDER font.
   Colors / sizes / texts are tunable in Customizer → Корзина → «Пустая корзина». */
.if-cart-empty,
.if-cart-empty__message,
.if-cart-empty__button,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
    font-family: var(--if-font-heading) !important;
}

.if-cart-empty__message {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.if-cart-empty__button {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    /* border-style set so the Customizer border-width/color controls actually render
       (default width is 0 → no visible border until you set it). */
    border-style: solid;
}

.if-qty-input {
    width: 44px;
    height: 34px;
    border: none !important;
    text-align: center;
    font-family: var(--if-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #FF0000;
    background: transparent;
    -moz-appearance: textfield;
}

.if-qty-input::-webkit-outer-spin-button,
.if-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.if-cart-item__unit-price {
    font-family: var(--if-font-heading);
    font-size: 12px;
    color: rgba(17, 24, 39, 0.45);
}

/* Cart Sidebar */
.if-cart-sidebar {
    flex: 0 0 33%;
}

.if-cart-totals {
    background: #D9D6CB;
    color: var(--if-color-dark);
    padding: 28px 30px;
    border-radius: var(--if-radius);
    min-height: 292px;
}

.if-cart-totals__title {
    font-family: var(--if-font-heading);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0 0 22px;
    line-height: 1.05;
}

.if-cart-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--if-gap-xs) 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.18);
}

.if-cart-totals__row--total {
    border-bottom: none;
    padding-top: var(--if-gap);
    margin-top: var(--if-gap-sm);
}

.if-cart-totals__label {
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
}

.if-cart-totals__row--total .if-cart-totals__label {
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 700;
    opacity: 1;
}

.if-cart-totals__value {
    font-family: var(--if-font-heading);
    font-size: 22px;
    font-weight: 900;
}

.if-cart-totals__row--total .if-cart-totals__value {
    font-size: 34px;
}

.if-cart-totals__on-request-note,
.if-review-order-on-request-note td {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--if-color-text-light, #6B7280);
}

.if-cart-totals__actions {
    margin-top: 22px;
}

.if-btn--checkout {
    display: block;
    width: 100%;
    min-height: 43px;
    padding: 10px 26px;
    font-family: var(--if-font-heading);
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    background: #FF0000;
    color: var(--if-color-white);
    border: none;
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-btn--checkout:hover {
    background: #cc0000;
    color: var(--if-color-white);
}

.if-cart-totals__links {
    margin-top: var(--if-gap);
    text-align: center;
}

.if-cart-delivery-link {
    font-family: var(--if-font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--if-color-dark);
    text-decoration: underline;
    opacity: 1;
}

.if-cart-delivery-link:hover {
    opacity: 1;
    color: var(--if-color-dark);
}

/* Cart Page Responsive */
@media (max-width: 1024px) {
    .if-cart-layout {
        flex-direction: column;
        align-items: stretch; /* see .if-checkout-layout below — same cross-axis flip */
    }
    
    .if-cart-sidebar {
        flex: none;
    }
}

@media (max-width: 767px) {
    .if-cart-item {
        flex-wrap: wrap;
    }
    
    .if-cart-item__image {
        flex: 0 0 80px;
    }
    
    .if-cart-item__image img {
        width: 80px;
        height: 80px;
    }
    
    .if-cart-item__price {
        flex: 0 0 100%;
        text-align: left;
        margin-top: var(--if-gap-sm);
    }
    
    .if-cart-item__quantity {
        flex: 0 0 100%;
        align-items: flex-start;
    }

    /* «Выбрать все» and the bin stay in one row, as on desktop. Stacked, the pill
       turned into a 92px-tall oval that looked like a broken button; one row needs
       ~180px of the 306px available even at 360. */
    .if-cart-actions-bar {
        flex-direction: row;
        gap: var(--if-gap-xs);
        padding: 2px 4px 2px 16px;
    }

    /* Tap targets ≥40px (phones). The visible sizes stay as they are. */
    .if-cart-select-all {
        min-height: 40px;
    }

    .if-cart-page .if-cart-delete-btn {
        width: 40px;
        height: 40px;
    }

    /* Item checkbox: 18px box, invisible ~40px hit area around it (::after is the tick).
       The inset counts from inside the 2px border: 18 + 2 × (14 − 2) = 42. */
    .if-cart-page .if-cart-item__checkbox input[type="checkbox"]::before {
        content: "";
        position: absolute;
        inset: -14px;
    }

    /* Bin under the item name: 22px icon + 9px padding = 40px, negative margin keeps its place.
       (0,3,1) beats WooCommerce `.woocommerce a.remove { display:block; width:1em; height:1em }`,
       which kept the link a 24px box. */
    .if-cart-page .if-cart-item a.if-cart-item__remove {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 40px;
        height: 40px;
        padding: 9px;
        margin: -9px;
    }

    /* −/+ stay 30px circles (по ТЗ); a transparent ring makes them 42px to the finger
       (the inset counts from inside the 1px border: 30 + 2 × (7 − 1) = 42). */
    .if-cart-page .if-qty-wrapper .if-qty-btn {
        position: relative;
    }

    .if-cart-page .if-qty-wrapper .if-qty-btn::after {
        content: "";
        position: absolute;
        inset: -7px;
        border-radius: 50%;
    }

    /* «УСЛОВИЯ ДОСТАВКИ»: 12px-tall text link → 40px. */
    .if-cart-delivery-link {
        display: inline-block;
        padding: 14px 0;
    }

    /* No empty screen-height of beige under the totals card on a short cart. */
    .if-cart-page {
        min-height: 0;
    }

    .if-cart-page .if-cart-totals {
        min-height: 0;
        padding: 22px 18px;
    }

    /* «ПЕРЕЙТИ К ОФОРМЛЕНИЮ»: the Customizer's line-height 28px made it a 76px block when
       the label wrapped. Centred flex box; if it still wraps on a narrow phone, ONDER
       (drawn ~2× its size) needs line-height 2 so the lines do not touch. (0,3,0) beats the
       Customizer's `.if-cart-page .if-btn--checkout`. */
    .if-cart-page .if-cart-totals .if-btn--checkout {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 14px;
        line-height: 2;
    }

    /* --- По кадру Figma 1435:4249 (576px → 390px, ×0,677) ---
       Две класса в селекторах: Кастомайзер (if-cart-checkout-customizer-css.php) печатает
       свои размеры после этого файла с весом (0,1,0)–(0,2,0). */

    /* «КОРЗИНА»: ONDER обычного начертания, ≈170px шириной (было 25px с синтетическим
       жирным 900 — почти во всю ширину экрана, в 1,9 раза крупнее кадра). */
    .if-cart-page .if-cart-title {
        font-size: 13px;
        font-weight: 400;
        font-style: normal;
        line-height: 2;
        margin-bottom: 10px;
    }

    /* «ВЫБРАТЬ ВСЕ»: надпись мельче, значок чёрный (был серый); полоса 42px — нажимать
       по-прежнему по 40px. */
    .if-cart-page .if-cart-actions-bar {
        padding: 0 0 0 14px;
    }

    .if-cart-page .if-cart-select-all {
        font-size: 4.5px;
        font-weight: 400;
    }

    .if-cart-page .if-cart-delete-btn {
        color: #000;
    }

    /* «ДОСТУПНЫ ДЛЯ ЗАКАЗА» (подписи групп корзины): в кадре их нет — мелкая серая подпись
       ONDER 5px по линии «Выбрать все», с воздухом сверху (было 9px чёрным, межстрочный 7px
       из Кастомайзера — вплотную к полосе). */
    .if-cart-page .if-cart-section-title {
        margin: 14px 0 8px;
        padding-left: 14px;
        font-size: 5px;
        font-weight: 400;
        line-height: 2;
        color: rgba(17, 24, 39, 0.55);
    }

    /* Знак ₽ в корзине — как в кадре («25000 ₽»); на всём сайте его прячет «Дополнительный
       CSS» Кастомайзера (.woocommerce-Price-currencySymbol, вес 0,1,0). */
    .if-cart-page .woocommerce-Price-currencySymbol {
        display: inline;
        margin-left: 0.15em;
        font-family: var(--if-font-body, 'Inter', sans-serif);
        font-size: 1.59em;
        font-weight: 900;
        line-height: 0;
    }

    /* В ONDER нет знака ₽ (выходил крошечным) — он Inter Black, как цена на странице
       товара. «522 ₽ / ШТ» не рвётся на две строки: если рядом со счётчиком не хватает
       места, цена за штуку уходит строкой ниже целиком. */
    .if-cart-page .if-cart-item .if-cart-item__quantity {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .if-cart-page .if-cart-item .if-cart-item__unit-price {
        white-space: nowrap;
    }

    /* Поле числа 48px без полей reset.css (было 44 + 2 × 16px — «−» и «+» стояли на 75px
       друг от друга, как в кадре «− 1000 +» вплотную); «1000» ONDER 9px помещается. */
    .if-cart-page .if-qty-wrapper .if-qty-input {
        box-sizing: border-box;
        width: 48px;
        padding: 0;
    }

    /* «Вы отложили … в свою корзину» над корзиной: ONDER 16px (≈32px на глаз) занимал пол
       экрана — на телефоне 6px, как подписи корзины, ссылка «Просмотр корзины» — строкой. */
    body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
    body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info,
    body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error {
        font-size: 6px;
        line-height: 2;
    }

    /* «Просмотр корзины» на самой корзине не нужен: крупным ONDER он вылезал плашкой в две
       налезающие строки над «КОРЗИНОЙ». */
    body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message .button.wc-forward {
        display: none;
    }

    /* −/+ — чёрные кружки с жирными знаками, как в кадре (были серая рамка 35% и черта 1px). */
    .if-cart-page .if-qty-wrapper .if-qty-btn {
        border-color: #000;
        color: #000;
    }

    .if-cart-page .if-qty-wrapper .if-qty-btn:hover,
    .if-cart-page .if-qty-wrapper .if-qty-btn:focus-visible {
        border-color: #FF0000;
        color: #FF0000;
    }

    .if-cart-page .if-qty-wrapper .if-qty-btn .if-qty-ico {
        fill: currentColor;
    }

    .if-cart-page .if-qty-wrapper .if-qty-btn .if-qty-ico rect {
        stroke: currentColor;
        stroke-width: 1.5px;
    }

    /* Карточка товара: фото слева на всю высоту карточки, справа сверху вниз — сумма
       (и значок удаления в правом углу), название, пилюли вариаций в один ряд, счётчик.
       Было: справа только название и пилюли, сумма и счётчик — отдельными строками под
       фото, карточка 338×254 вместо ≈356×110. Обёртка .if-cart-item__info — display:
       contents, её дети встают в ячейки сетки карточки; то, что выведут хуки WooCommerce
       после названия, — строкой на всю правую часть. Название — Inter обычным регистром,
       как названия товаров в карточках каталога и на странице товара (решение владельца:
       названия товаров — Inter). */
    .if-cart-page .if-cart-item {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr) auto;
        grid-template-areas:
            "img price rm"
            "img name name"
            "img vars vars"
            "img qty qty";
        grid-template-rows: auto auto auto 1fr;
        column-gap: 10px;
        row-gap: 5px;
        align-items: start;
        padding: 3px 8px 3px 3px;
        border-radius: 8px;
    }

    .if-cart-page .if-cart-item__info {
        display: contents;
    }

    .if-cart-page .if-cart-item__info > * {
        grid-column: 2 / -1;
    }

    .if-cart-page .if-cart-item .if-cart-item__image {
        grid-area: img;
        align-self: stretch;
    }

    .if-cart-page .if-cart-item .if-cart-item__image a {
        width: 100%;
        height: 100%;
        min-height: 97px;
        padding: 4px;
        border-radius: 6px;
    }

    .if-cart-page .if-cart-item .if-cart-item__image img {
        width: 100%;
        height: 100%;
    }

    .if-cart-page .if-cart-item .if-cart-item__price {
        grid-area: price;
        margin: 8px 0 0;
        font-size: 6.8px;
        text-align: left;
    }

    /* Значок удаления — чёрный, в правом верхнем углу (был красный #a00 из WooCommerce
       `.woocommerce a.remove { color: … !important }` под пилюлями). Зона нажатия 40px
       остаётся; отрицательные поля — чтобы она не раздвигала строку суммы. */
    .woocommerce .if-cart-page .if-cart-item a.if-cart-item__remove {
        grid-area: rm;
        margin: -3px -6px -14px 0;
        color: #000 !important;
    }

    .woocommerce .if-cart-page .if-cart-item a.if-cart-item__remove:hover {
        background: transparent;
        color: #FF0000 !important;
    }

    .if-cart-page .if-cart-item .if-cart-item__name {
        grid-area: name;
        margin: 0;
        font-family: var(--if-font-body);
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: 0;
        text-transform: none;
    }

    .if-cart-page .if-cart-item .if-cart-item__variations {
        grid-area: vars;
        gap: 4px;
        margin: 0;
    }

    .if-cart-page .if-cart-item .if-cart-item__variation-pill {
        padding: 1px 7px;
        font-size: 4.5px;
        line-height: 2;
    }

    .if-cart-page .if-cart-item .if-cart-item__quantity {
        grid-area: qty;
        flex-direction: row;
        align-items: center;
        align-self: end;
        gap: 10px;
        margin: 2px 0 6px;
    }

    .if-cart-page .if-cart-item .if-cart-item__unit-price {
        font-size: 5px;
    }

    /* Итоги — панель на всю ширину экрана со скруглением сверху, закреплена у нижнего
       края, пока видны товары (кадр: «ИТОГО: 25000 ₽» слева, красная «К ОФОРМЛЕНИЮ»
       справа, под ней подчёркнутая «УСЛОВИЯ ДОСТАВКИ»). Было: карточка 338×292 с полями,
       «ИТОГО» и сумма отдельной строкой, кнопка во всю ширину в две строки. «ВАША
       КОРЗИНА» скрыта (в кадре её нет, а «КОРЗИНА» — заголовок страницы); «ТОВАР (n) —
       n ШТ» — тонкая серая строка над итогом (была крупной, 11/22px). */
    .if-cart-page .if-cart-sidebar {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 0 calc(50% - 50vw);
    }

    .if-cart-page .if-cart-totals {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 0;
        padding: 16px 16px 8px;
        border-radius: 14px 14px 0 0;
    }

    .if-cart-page .if-cart-totals > * {
        grid-column: 1 / -1;
    }

    .if-cart-page .if-cart-totals .if-cart-totals__title {
        display: none;
    }

    .if-cart-page .if-cart-totals .if-cart-totals__row:not(.if-cart-totals__row--total) {
        margin: 0 0 10px;
        padding: 0 0 8px;
        border-bottom-color: rgba(17, 24, 39, 0.12);
    }

    .if-cart-page .if-cart-totals .if-cart-totals__row:not(.if-cart-totals__row--total) .if-cart-totals__label,
    .if-cart-page .if-cart-totals .if-cart-totals__row:not(.if-cart-totals__row--total) .if-cart-totals__value {
        font-size: 5px;
        font-weight: 400;
        opacity: 0.6;
    }

    .if-cart-page .if-cart-totals .if-cart-totals__row--total {
        grid-column: 1;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        margin: 0;
        padding: 0;
    }

    .if-cart-page .if-cart-totals__row--total .if-cart-totals__label::after {
        content: ":";
    }

    .if-cart-page .if-cart-totals .if-cart-totals__row--total .if-cart-totals__label,
    .if-cart-page .if-cart-totals .if-cart-totals__row--total .if-cart-totals__value {
        font-size: 6.8px;
        font-weight: 400;
    }

    .if-cart-page .if-cart-totals .if-cart-totals__actions {
        grid-column: 2;
        margin: 0;
    }

    .if-cart-page .if-cart-totals .if-btn--checkout {
        min-height: 40px;
        padding: 0 16px;
        font-size: 6px;
        font-weight: 400;
        white-space: nowrap;
    }

    /* «ПЕРЕЙТИ К ОФОРМЛЕНИЮ» → «К ОФОРМЛЕНИЮ», как в кадре (cart.php: первое слово в
       span.if-btn__prefix); на компьютере подпись прежняя. */
    .if-cart-page .if-btn--checkout .if-btn__prefix {
        display: none;
    }

    .if-cart-page .if-cart-totals .if-cart-totals__links {
        grid-column: 1 / -1;
        margin: 0;
        text-align: right;
    }

    .if-cart-page .if-cart-totals .if-cart-delivery-link {
        font-size: 6px;
        text-decoration: underline;
    }

    /* Кнопка «Наверх» встала бы на «К ОФОРМЛЕНИЮ» закреплённой панели — она выше панели. */
    body.woocommerce-cart .if-site-totop {
        bottom: 184px;
    }
}

/* ==========================================================================
   CHECKOUT PAGE STYLES
   ========================================================================== */

.if-checkout-page {
    background-color: #edebde;
    min-height: 100vh;
    padding: 40px 0 80px;
}

/* Сбросить серый фон Elementor-секции и контейнеров вокруг шаблона checkout */
body.if-checkout-page-body .elementor-section,
body.if-checkout-page-body .elementor-container,
body.if-checkout-page-body .elementor-column,
body.if-checkout-page-body .elementor-widget-wrap,
body.if-checkout-page-body .elementor-widget,
body.if-checkout-page-body .elementor-widget-shortcode,
body.if-checkout-page-body .elementor-widget-shortcode .elementor-widget-container,
body.if-checkout-page-body .elementor-widget-woocommerce-checkout-page,
body.if-checkout-page-body .elementor-widget-woocommerce-checkout-page .elementor-widget-container {
    background: transparent !important;
    background-color: transparent !important;
}

.if-checkout-layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.if-checkout-main {
    flex: 1;
    min-width: 0;
}

.if-checkout-sidebar {
    flex: 0 0 420px;
}

/* Checkout Title — Onder Regular, red (бесплатный Onder рендерит крупно, держим размер в 2× от Figma) */
.if-checkout-title {
    font-family: var(--if-font-heading);
    font-size: 13px;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #FF0000;
    margin: 0 0 24px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Checkout Form Fields */
.if-checkout-fields {
    margin-bottom: var(--if-gap);
}

.if-checkout-billing .woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.if-checkout-billing .form-row {
    margin: 0 0 12px;
    padding: 0;
}

/* WooCommerce `.woocommerce form .form-row { padding: 3px; margin: 0 0 6px }` (0,2,1) used to
   win over the rule above: the fields were 6px narrower than «Я заказываю как» and the order
   cards under them. (0,3,0) here. */
.if-checkout-page .if-checkout-billing .form-row {
    margin: 0 0 12px;
    padding: 0;
}

.if-checkout-billing .woocommerce-input-wrapper {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.if-checkout-billing .woocommerce-input-wrapper .thwcfe-input-field {
    width: 100%;
    height: 43px;
    padding: 0 24px;
    font-family: var(--if-font-body);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid #9e9e9e;
    border-radius: 48px;
    background: transparent;
    color: var(--if-color-dark);
    box-sizing: border-box;
}

.if-checkout-billing .woocommerce-input-wrapper .thwcfe-input-field:focus {
    border-color: #FF0000;
    outline: none;
}

.if-checkout-billing .form-row label,
.if-checkout-billing .woocommerce-billing-fields > h3,
.if-checkout-billing .woocommerce-billing-fields__heading {
    display: none !important;
}

.if-checkout-billing .form-row input,
.if-checkout-billing .form-row select,
.if-checkout-billing .form-row textarea {
    width: 100%;
    height: 43px;
    padding: 0 24px;
    font-family: var(--if-font-body);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid #9e9e9e;
    border-radius: 48px;
    background: transparent;
    color: var(--if-color-dark);
    outline: none;
    transition: var(--if-transition-fast);
    box-sizing: border-box;
}

.if-checkout-billing .form-row textarea {
    height: auto;
    min-height: 90px;
    padding: 14px 24px;
    border-radius: 20px;
}

/* THWCFE plugin overrides input border/radius/background with higher priority —
   force the theme's pill look back on the billing inputs (text-transform already wins). */
.if-checkout-billing .woocommerce-input-wrapper input.thwcfe-input-field,
.if-checkout-billing .woocommerce-input-wrapper input.input-text {
    font-family: var(--if-font-heading) !important; /* ONDER */
    height: 43px !important;
    padding: 0 24px !important;
    border: 1px solid #9e9e9e !important;
    border-radius: 48px !important;
    background: transparent !important;
    box-sizing: border-box !important;
}
.if-checkout-billing .woocommerce-input-wrapper input.thwcfe-input-field:focus,
.if-checkout-billing .woocommerce-input-wrapper input.input-text:focus {
    border-color: #FF0000 !important;
}

.if-checkout-billing .form-row input::placeholder,
.if-checkout-billing .form-row textarea::placeholder {
    color: var(--if-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.if-checkout-billing .form-row input:focus,
.if-checkout-billing .form-row select:focus,
.if-checkout-billing .form-row textarea:focus {
    border-color: #FF0000;
    position: relative;
    z-index: 1;
}

/* Customer Type Toggle — pill-карточка как у полей формы */
.if-checkout-customer-type {
    display: flex;
    align-items: center;
    gap: var(--if-gap-sm);
    height: 43px;
    padding: 0 24px;
    border: 1px solid #9e9e9e;
    border-radius: 48px;
    margin: 0 0 12px;
    box-sizing: border-box;
}

.if-customer-type-label {
    font-family: var(--if-font-body);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--if-color-text-muted);
    letter-spacing: 0.04em;
}

.if-customer-type-options {
    display: flex;
    align-items: center;
    gap: var(--if-gap-xs);
}

.if-customer-type-option {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--if-font-body);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--if-color-dark);
    cursor: pointer;
    letter-spacing: 0.04em;
}

/* Hidden from sight but not from the keyboard (display:none took the radios out of Tab). */
.if-customer-type-option {
    position: relative;
}

.if-customer-type-option input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.if-customer-type-option input:focus-visible + span {
    outline: 2px solid var(--if-color-dark);
    outline-offset: 2px;
}

.if-customer-type-option input:checked + span {
    color: #FF0000;
    font-weight: 700;
}

.if-customer-type-separator {
    color: var(--if-color-text-muted);
}

/* Order Section */
.if-checkout-order {
    margin-top: 40px;
}

.if-checkout-order-title {
    font-family: var(--if-font-heading);
    font-size: 13px;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #FF0000;
    margin: 0 0 16px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Review Order — отдельные скруглённые карточки вместо единой таблицы */
.if-order-review,
#order_review.if-order-review {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
}

.if-review-order-table {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: transparent;
}

.if-review-order-table thead,
.if-review-order-table tbody,
.if-review-order-table tfoot {
    display: block;
    width: 100%;
    background: transparent;
}

.if-review-order-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #9e9e9e;
    border-radius: 48px;
    background: transparent !important;
    height: 43px;
    padding: 0 24px;
    margin-bottom: 12px;
}

.if-review-order-table th,
.if-review-order-table td {
    display: block;
    width: auto;
    padding: 0;
    margin: 0;
    border: 0 !important;
    background: transparent !important;
    text-align: left;
    vertical-align: middle;
    font-family: var(--if-font-heading);
    font-size: 6px;
    font-weight: 400;
    color: var(--if-color-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.if-review-order-table th.product-total,
.if-review-order-table td.product-total,
.if-review-order-table tfoot td {
    text-align: right;
}

/* Шапка ТОВАР/СУММА */
.if-review-order-table thead th {
    color: var(--if-color-text-muted);
    font-size: 6px;
}

/* Карточки товаров — большие скруглённые блоки 20px */
.if-review-order-table tr.cart_item {
    border-radius: 20px;
    height: auto;
    min-height: 70px;
    padding: 14px 24px;
    align-items: start;
}

.if-review-order-table tr.cart_item td {
    font-family: var(--if-font-body);
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    color: var(--if-color-dark);
    line-height: 1.3;
    letter-spacing: 0;
}

.if-review-order-table tr.cart_item td.product-name {
    padding-right: 16px;
}

.if-review-order-table tr.cart_item .product-quantity {
    color: var(--if-color-text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.if-review-order-table tr.cart_item td.product-total {
    font-weight: 700;
}

/* Pill-строки итогов (subtotal/order-total/fee/tax) */
.if-review-order-table tr.cart-subtotal th,
.if-review-order-table tr.cart-subtotal td,
.if-review-order-table tr.order-total th,
.if-review-order-table tr.order-total td,
.if-review-order-table tr.fee th,
.if-review-order-table tr.fee td,
.if-review-order-table tr.tax-total th,
.if-review-order-table tr.tax-total td,
.if-review-order-table tr.cart-discount th,
.if-review-order-table tr.cart-discount td {
    font-family: var(--if-font-heading);
    font-size: 7px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.if-review-order-table tr.cart-subtotal th,
.if-review-order-table tr.order-total th,
.if-review-order-table tr.fee th,
.if-review-order-table tr.tax-total th,
.if-review-order-table tr.cart-discount th {
    color: var(--if-color-text-muted);
}

.if-review-order-table tr.cart-subtotal td .amount,
.if-review-order-table tr.order-total td .amount,
.if-review-order-table tr.fee td .amount,
.if-review-order-table tr.tax-total td .amount,
.if-review-order-table tr.cart-discount td .amount {
    font-family: var(--if-font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--if-color-dark);
}

.if-review-order-table tr.order-total td .amount {
    color: var(--if-color-dark);
}

/* Большая карточка ДОСТАВКА — 2 колонки */
.if-review-order-table tr.shipping,
.if-review-order-table tr.woocommerce-shipping-totals {
    grid-template-columns: 1fr 1fr;
    border-radius: 20px;
    height: auto;
    min-height: 80px;
    padding: 16px 24px;
    align-items: start;
    column-gap: 24px;
}

.if-review-order-table tr.shipping th,
.if-review-order-table tr.shipping td {
    font-family: var(--if-font-heading);
    font-size: 7px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--if-color-text-muted);
    text-align: left;
}

.if-review-order-table tr.shipping td {
    color: var(--if-color-dark);
}

/* Shipping Options */
.if-shipping-options {
    font-family: var(--if-font-body);
    font-size: 11px;
    text-transform: uppercase;
}

.if-shipping-options ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.if-shipping-options li {
    margin-bottom: 4px;
}

.if-shipping-options .shipping-calculator-button {
    color: #FF0000;
    text-decoration: underline;
    font-size: 10px;
}

.if-shipping-options input[type="radio"] {
    width: auto !important;
    height: auto !important;
    display: inline !important;
    margin: 0 6px 0 0;
    vertical-align: middle;
    accent-color: var(--if-color-dark);
    cursor: pointer;
}

.if-shipping-options label {
    display: inline;
    font-family: var(--if-font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
    font-weight: 400;
    cursor: pointer;
}

/* «ДОСТАВКА» в «Ваш заказ»: разметка WooCommerce cart/cart-shipping.php
   (<ul id="shipping_method"><li><input class="shipping_method"><label>). Выбранный способ —
   тёмный, остальные серые, как «Варианты оплаты» в макете. Класс ставит assets/js/checkout.js. */
.if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method {
    list-style: none;
    margin: 0;
    padding: 0;
}

.if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li {
    margin: 0 0 6px;
    padding: 0;
    line-height: 1.6;
}

.if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li:last-child {
    margin-bottom: 0;
}

.if-review-order-table tr.woocommerce-shipping-totals input.shipping_method[type="radio"] {
    width: auto;
    height: auto;
    margin: 0 6px 0 0;
    vertical-align: middle;
    accent-color: var(--if-color-dark);
    cursor: pointer;
}

.if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method label {
    display: inline;
    font-family: var(--if-font-heading);
    font-size: 7px; /* ONDER: на глаз ≈14px */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9e9e9e;
    cursor: pointer;
}

.if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li.if-shipping-method--selected label {
    color: var(--if-color-dark);
}

/* Payment Methods — отдельная карточка radius 20px */
.if-checkout-page #payment {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* #payment контейнер: визуально прозрачный — карточка только вокруг методов */
.if-checkout-payment {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    background: transparent;
}

.if-payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    margin: 0 0 16px;
    border: 1px solid #9e9e9e;
    border-radius: 20px;
}

.if-payment-label {
    font-family: var(--if-font-heading);
    font-size: 7px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--if-color-text-muted);
    margin: 0;
    padding-top: 2px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.if-payment-options {
    font-family: var(--if-font-body);
    font-size: 14px;
    color: var(--if-color-dark);
    min-width: 0;
}

.if-payment-text p {
    margin: 0 0 var(--if-gap-xs);
    text-transform: uppercase;
}

.if-payment-text p:last-child {
    margin-bottom: 0;
}

.if-payment-options .wc_payment_methods,
.if-checkout-page #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
}

.if-payment-options .wc_payment_method,
.if-checkout-page #payment .wc_payment_method {
    margin-bottom: 8px;
}

.if-payment-options .wc_payment_method:last-child,
.if-checkout-page #payment .wc_payment_method:last-child {
    margin-bottom: 0;
}

.if-checkout-payment .wc_payment_method input[type="radio"] {
    width: auto !important;
    height: auto !important;
    display: inline !important;
    margin: 0 6px 0 0;
    vertical-align: middle;
    accent-color: var(--if-color-dark);
    cursor: pointer;
}

.if-checkout-payment .wc_payment_method > label,
.if-payment-options .wc_payment_method label {
    display: inline;
    font-family: var(--if-font-heading);
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
    font-weight: 400;
    cursor: pointer;
}

/* Невыбранные методы — приглушённый цвет */
.if-checkout-payment .wc_payment_method:not(.wc_payment_method--selected) > label,
.if-payment-options .wc_payment_method:not(.wc_payment_method--selected) label {
    color: #9e9e9e;
}

.if-checkout-payment .payment_box {
    margin: 6px 0 0 18px;
    padding: 0;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.if-checkout-payment .payment_box p {
    font-family: var(--if-font-body);
    font-size: 13px;
    color: var(--if-color-text-muted);
    margin: 0;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
}

/* Place Order Button — pill 48px, фиксированной ширины */
.if-place-order {
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.if-place-order .woocommerce-terms-and-conditions-wrapper,
.if-place-order .woocommerce-privacy-policy-text {
    display: none !important;
}

/* Согласие на обработку ПДн — обязательная галочка над кнопкой
   (includes/legal-links.php, хук woocommerce_review_order_before_submit).
   Размер и цвет подписи — как у блока конфиденциальности внизу, их же меняет
   Кастомайзер (if_checkout_privacy_font_size / _text_color). */
.if-place-order .if-pd-consent {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}
.if-place-order .if-pd-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-family: var(--if-font-heading);
    font-size: 6px;
    font-weight: 400;
    line-height: 1.9;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
}
.if-place-order .if-pd-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #FF0000;
    cursor: pointer;
}
.if-place-order .if-pd-consent a {
    color: #FF0000;
    text-decoration: none;
}
.if-place-order .if-pd-consent a:hover {
    text-decoration: underline;
}
.if-place-order .if-pd-consent abbr.required {
    color: #FF0000;
    border: 0;
    text-decoration: none;
}
/* (0,4,1) — выше правила WooCommerce `.woocommerce form .form-row.woocommerce-invalid label`. */
.woocommerce-checkout .if-place-order .if-pd-consent.woocommerce-invalid label {
    color: #FF0000;
}
/* WooCommerce `.woocommerce form .form-row label.checkbox { display: inline }` (0,3,2)
   перебивал flex выше: галочка стояла вплотную к «Я», без зазора 10px. */
.woocommerce-checkout .if-place-order .if-pd-consent label.checkbox {
    display: flex;
}

.if-btn--checkout-submit,
.if-checkout-page #place_order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 345px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto;
    height: 43px;
    padding: 0 32px;
    font-family: var(--if-font-heading);
    font-size: 7px;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #FF0000;
    color: #edebde;
    border: none;
    border-radius: 48px;
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-btn--checkout-submit:hover,
.if-checkout-page #place_order:hover {
    background: #cc0000;
}

/* Privacy Notice — full-width блок под 2-колоночной разметкой */
.if-checkout-privacy {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--if-color-dark);
    max-width: none;
}

.if-checkout-privacy p {
    font-family: var(--if-font-heading);
    font-size: 6px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--if-color-dark);
    line-height: 1.8;
    letter-spacing: 0.04em;
    margin: 0;
}

.if-checkout-privacy a {
    color: #FF0000;
    text-decoration: none;
}

.if-checkout-privacy a:hover {
    text-decoration: underline;
}

/* Checkout Sidebar — Onder без italic+900, body LT_Remark */
.if-checkout-info-block {
    background: transparent;
    padding: 0;
}

.if-checkout-info-title {
    font-family: var(--if-font-heading);
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #7E0100;
    margin: 0 0 16px;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

.if-checkout-info-subtitle {
    font-family: var(--if-font-heading);
    font-size: 8px;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: var(--if-color-dark);
    margin: 0 0 24px;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.if-checkout-info-section {
    margin-bottom: 28px;
}

.if-checkout-info-section h5 {
    font-family: var(--if-font-heading);
    font-size: 7px;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: var(--if-color-dark);
    margin: 0 0 10px;
    letter-spacing: 0.04em;
}

.if-checkout-info-section p {
    font-family: var(--if-font-body);
    font-size: 16px;
    line-height: 1.25;
    color: var(--if-color-dark);
    margin: 0 0 10px;
}

.if-checkout-info-section p:last-child {
    margin-bottom: 0;
}

/* Checkout Responsive */
@media (max-width: 1024px) {
    .if-checkout-layout {
        flex-direction: column;
        /* align-items: flex-start from the base rule controls the WIDTH once the
           axis flips, leaving .if-checkout-main shrink-to-fit instead of full
           width (and letting it blow past the container when its min-content is
           wider). The sidebar used to carry a one-off width:100% patch for the
           same reason; stretch fixes both properly. */
        align-items: stretch;
    }

    .if-checkout-sidebar {
        flex: none;
    }

    /* = desktop; 30px was an Inter size, ONDER draws it ~60px */
    .if-checkout-title,
    .if-checkout-order-title {
        font-size: 13px;
    }

    /* One column: the privacy note goes right under «Подтвердить заказ» (mob-checkout),
       not after the whole «Условия доставки» text ~1500px lower. The two-column wrapper
       steps aside (display: contents) so the note can sit between its children. */
    .if-checkout-page > .if-container {
        display: flex;
        flex-direction: column;
    }

    .if-checkout-page .if-checkout-layout {
        display: contents;
    }

    .if-checkout-page .if-checkout-main {
        order: 1;
    }

    .if-checkout-page .if-checkout-privacy {
        order: 2;
    }

    .if-checkout-page .if-checkout-sidebar {
        order: 3;
        margin-top: 60px;
    }
}

@media (max-width: 767px) {
    /* Mobile checkout against Figma mob-checkout.png (576px frame ×0.677).
       ONDER draws about 2× its nominal size: 5px ONDER ≈ 10px text. */

    /* --- Headings «ОФОРМЛЕНИЕ ЗАКАЗА», «ВАШ ЗАКАЗ» ---
       Two classes, not one: the Customizer prints .if-checkout-title { font-size: 25px }
       (if_checkout_title_font_size) inline after this file and would win at (0,1,0).
       4.1vw: «ОФОРМЛЕНИЕ» ≈ 92% of the content width at 360–430 (mockup ≈ 93%).
       line-height ~1.7: ONDER caps are taller than the nominal size, at 1.4 the two
       lines touched. */
    .if-checkout-main .if-checkout-title,
    .if-checkout-order .if-checkout-order-title {
        font-size: clamp(12px, 4.1vw, 18px);
        line-height: 1.7;
        overflow-wrap: break-word;
    }

    .if-checkout-main .if-checkout-title {
        margin-bottom: 14px;
    }

    .if-checkout-order {
        margin-top: 24px;
    }

    .if-checkout-order .if-checkout-order-title {
        margin-bottom: 10px;
    }

    /* --- Fields: small black ONDER hints, typed text in Inter ---
       (0,4,1) + !important beats the Customizer's 7px !important ONDER at (0,3,1).
       At 7px «ФИО/НАЗВАНИЕ ОРГАНИЗАЦИИ» was cut to «…ОРГАНИЗАЦ». Typed text: Inter 14px in
       normal case, readable and the e-mail as typed (iOS zoom is handled site-wide). */
    .if-checkout-page .if-checkout-billing .woocommerce-input-wrapper input.input-text {
        font-family: var(--if-font-body) !important;
        font-size: 14px !important;
        letter-spacing: 0;
        text-transform: none;
        padding: 0 16px !important;
    }

    .if-checkout-page .if-checkout-billing .woocommerce-input-wrapper input.input-text::placeholder {
        font-family: var(--if-font-heading);
        font-size: 5px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--if-color-dark);
        opacity: 1;
    }

    /* --- «Я ЗАКАЗЫВАЮ КАК: ЮР. ЛИЦО / ФИЗ.ЛИЦО» — one pill row like the fields ---
       The line is ≈284px of text at 5px ONDER; below ~390px the size steps down with the
       screen ((100vw − 96px) / 59 ≈ 4.5px at 360) so it stays on one line. */
    .if-checkout-customer-type {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 5px;
        row-gap: 0;
        height: auto;
        min-height: 43px;
        padding: 0 16px;
        border-radius: 48px;
    }

    .if-checkout-customer-type .if-customer-type-label,
    .if-checkout-customer-type .if-customer-type-option,
    .if-checkout-customer-type .if-customer-type-separator {
        font-family: var(--if-font-heading);
        font-size: clamp(4px, calc((100vw - 96px) / 59), 5px);
        line-height: 2;
        letter-spacing: 0.04em;
        color: var(--if-color-dark);
    }

    .if-checkout-customer-type .if-customer-type-options {
        gap: 3px;
    }

    /* 40px to the finger inside the 43px pill; the negative margin keeps the row height. */
    .if-checkout-customer-type .if-customer-type-option {
        padding: 15px 0;
        margin: -15px 0;
    }

    .if-checkout-customer-type .if-customer-type-option input:checked + span {
        color: #FF0000;
        font-weight: 400;
    }

    /* --- «ВАШ ЗАКАЗ»: ТОВАР/СУММА and the items are one card; the same 16px inner
       padding in every card and pill; 12px between cards. ---
       WooCommerce `.woocommerce table.shop_table th/td { padding: 9px 12px }` (0,2,1) and
       `table.shop_table { margin-bottom: 24px }` used to win over the theme's zeros. */
    .if-checkout-page .if-order-review table.if-review-order-table {
        margin: 0;
    }

    .if-checkout-page table.if-review-order-table th,
    .if-checkout-page table.if-review-order-table td {
        padding: 0;
    }

    .if-review-order-table tr {
        column-gap: 12px;
        padding: 0 16px;
    }

    .if-review-order-table thead tr {
        height: auto;
        padding: 14px 16px 6px;
        margin-bottom: 0;
        border-bottom: 0;
        border-radius: 20px 20px 0 0;
    }

    .if-review-order-table tbody tr.cart_item {
        min-height: 0;
        padding: 6px 16px;
        margin-bottom: 0;
        border-top: 0;
        border-bottom: 0;
        border-radius: 0;
    }

    .if-review-order-table tbody tr.cart_item:last-child {
        padding-bottom: 14px;
        margin-bottom: 12px;
        border-bottom: 1px solid #9e9e9e;
        border-radius: 0 0 20px 20px;
    }

    .if-review-order-table tr.cart_item td.product-name {
        padding-right: 0;
    }

    /* Labels black, sums regular Inter, as in the mockup. */
    .if-checkout-page .if-review-order-table tfoot th {
        color: var(--if-color-dark);
    }

    .if-checkout-page .if-review-order-table tr.cart_item td.product-total,
    .if-checkout-page .if-review-order-table tfoot td strong,
    .if-checkout-page .if-review-order-table tfoot td .amount {
        font-weight: 400;
    }

    .if-review-order-table tr.if-review-order-on-request-note {
        height: auto;
        padding: 0 16px;
        border: 0;
    }

    /* --- «ДОСТАВКА» and «ВАРИАНТЫ ОПЛАТЫ»: outlined pills two per row; the selected one
       red. The radio stays in the page for the keyboard (Tab, arrows), only invisible. --- */
    .if-review-order-table tr.shipping,
    .if-review-order-table tr.woocommerce-shipping-totals {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 10px;
        min-height: 0;
        padding: 12px 16px 14px;
    }

    .if-payment-methods {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px 16px 14px;
        margin: 0 0 12px;
    }

    .if-payment-label {
        color: var(--if-color-dark);
        padding-top: 0;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method,
    .if-checkout-page #payment ul.payment_methods {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* WooCommerce's clearfix ::before/::after would take up grid cells. */
    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method::before,
    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method::after,
    .if-checkout-page #payment ul.payment_methods::before,
    .if-checkout-page #payment ul.payment_methods::after {
        content: none;
        display: none;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li,
    .if-checkout-page #payment ul.payment_methods li.wc_payment_method {
        position: relative;
        margin: 0;
        padding: 0;
        line-height: normal;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li > input.shipping_method,
    .if-checkout-page #payment ul.payment_methods li.wc_payment_method > input.input-radio {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        opacity: 0;
        pointer-events: none;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li > label,
    .if-checkout-page #payment ul.payment_methods li.wc_payment_method > label {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        min-height: 40px;
        margin: 0;
        padding: 4px 8px;
        border: 1px solid #c60200;
        border-radius: 48px;
        font-family: var(--if-font-heading);
        font-size: 5px;
        font-weight: 400;
        line-height: 2;
        letter-spacing: 0.04em;
        text-align: center;
        text-transform: uppercase;
        /* A long name wraps inside its pill. Only a long word that cannot fit half a row
           («РАССЧИТЫВАЕТСЯ») is hyphenated, at least 5 letters on each side, so
           «НАЛИЧНЫМИ» or «СТОИМОСТЬ» are not cut. */
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        -webkit-hyphenate-limit-before: 5;
        -webkit-hyphenate-limit-after: 5;
        hyphenate-limit-chars: 11 5 5;
        color: var(--if-color-dark);
        cursor: pointer;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li > input.shipping_method:checked + label,
    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li.if-shipping-method--selected > label,
    .if-checkout-page #payment ul.payment_methods li.wc_payment_method > input.input-radio:checked + label {
        border-color: #FF0000;
        box-shadow: inset 0 0 0 1px #FF0000;
        color: #FF0000;
    }

    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method li > input.shipping_method:focus-visible + label,
    .if-checkout-page #payment ul.payment_methods li.wc_payment_method > input.input-radio:focus-visible + label {
        outline: 2px solid var(--if-color-dark);
        outline-offset: 2px;
    }

    /* No descriptions under the methods in the mockup. A gateway that asks for input
       (card form etc.) keeps its box. */
    .if-checkout-page #payment .payment_box:not(:has(input, select, textarea)) {
        display: none !important;
    }

    /* --- Consent checkbox (152-ФЗ, stays) and «ПОДТВЕРДИТЬ ЗАКАЗ» ---
       `#payment div.form-row { padding: 1em }` pushed both 16px inwards. */
    /* column-gap 0: an empty item after the button (hooked output) took a 14px gap and
       pushed the centred button 7px to the left. */
    .if-checkout-page #payment div.form-row.if-place-order {
        margin: 0;
        padding: 0;
        justify-content: center;
        gap: 14px 0;
    }

    /* WooCommerce `.woocommerce form .form-row { padding: 3px }` inset the checkbox row. */
    .if-checkout-page .if-place-order .if-pd-consent {
        margin: 0;
        padding: 0;
    }

    /* Plain readable text in 3 lines instead of 6 lines of 8px ONDER capitals.
       (0,4,1) beats the Customizer's `.if-place-order .if-pd-consent label` font-size. */
    .woocommerce-checkout .if-place-order .if-pd-consent label.checkbox {
        align-items: flex-start;
        gap: 10px;
        font-family: var(--if-font-body);
        font-size: 12px;
        line-height: 1.4;
        letter-spacing: 0;
        text-transform: none;
    }

    .woocommerce-checkout .if-place-order .if-pd-consent input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0;
    }

    /* At 360 the label wrapped and, with WooCommerce's line-height 1 on 7px ONDER, the
       two lines overlapped. Width by content (≈250px), one line, centred.
       (2,2,0) beats woocommerce-smallscreen `#payment #place_order { width:100%; margin-bottom:1em }`. */
    .if-checkout-page #payment .if-place-order #place_order {
        width: auto !important;
        min-width: 220px !important;
        max-width: 100% !important;
        margin: 0 auto;
        padding: 0 24px;
        line-height: 1.2;
        white-space: nowrap;
    }

    /* --- Privacy note: right under the button, centred, normal case --- */
    .if-checkout-page .if-checkout-privacy {
        margin: 14px 0 0;
        padding: 0;
        border-top: 0;
        text-align: center;
    }

    .if-checkout-page .if-checkout-privacy p {
        font-family: var(--if-font-body);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: 0;
        text-transform: none;
    }

    /* --- «УСЛОВИЯ ДОСТАВКИ» --- */
    .if-checkout-page .if-checkout-sidebar {
        margin-top: 28px;
    }

    /* (0,1,0): a colour chosen in the Customizer still wins. */
    .if-checkout-info-title {
        color: #FF0000;
    }

    /* «УСЛОВИЯ ДОСТАВКИ» ≈190px, заметно меньше слогана под ним (Figma 1435:4368); при
       11px (≈317px) он был крупнее слогана. (0,3,0) beats the Customizer's
       .if-checkout-info-title { font-size } printed after this file. */
    .if-checkout-page .if-checkout-sidebar .if-checkout-info-title {
        font-size: 6.5px;
        line-height: 1.7;
    }

    /* Slogan and section headings in one line: ONDER 9px from the Customizer wrapped
       «ВЫГОДНО, БЫСТРО, ОТВЕТСТВЕННО» and «РАСЧЕТ СТОИМОСТИ ДОСТАВКИ» to two, and the
       two lines touched. The slogan is ≈50× the font size wide, the content is
       100vw − 52px: ≈6.5px at 390 (≈325px, as in the mockup), 5.9px at 360. */
    .if-checkout-sidebar .if-checkout-info-subtitle,
    .if-checkout-sidebar .if-checkout-info-section h5 {
        font-size: min(7.5px, calc((100vw - 52px) / 52));
    }

    .if-checkout-sidebar .if-checkout-info-subtitle {
        margin-bottom: 4px;
    }

    /* «Автодоставка» is a bold sub-line of the slogan in the mockup, not an ONDER heading.
       Text of the conditions Inter 12px / 1.3, «Автодоставка» the same size (mockup: the
       first paragraph in 3 lines; at 16px it took 5 and the block was 1.6× longer). */
    .if-checkout-sidebar .if-checkout-info-section:first-of-type h5 {
        font-family: var(--if-font-body);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 0;
        text-transform: none;
        margin-bottom: 2px;
    }

    .if-checkout-page .if-checkout-sidebar .if-checkout-info-section p {
        font-size: 12px;
        line-height: 1.3;
    }

    /* «ТОВАР / СУММА / ДОСТАВКА / ИТОГО / ВАРИАНТЫ ОПЛАТЫ» — те же мелкие подписи ONDER,
       что подсказки в полях (были 6–7px с синтетическим жирным WooCommerce
       `.woocommerce table.shop_table th { font-weight: 700 }` — в 1,7 раза крупнее). */
    .if-checkout-page table.if-review-order-table tr > th,
    .if-checkout-page .if-payment-methods .if-payment-label {
        font-size: 5px;
        font-weight: 400;
    }

    /* Строка товара — Inter 12px (было 14px из Кастомайзера). */
    .if-checkout-page table.if-review-order-table tr.cart_item td {
        font-size: 12px;
    }

    /* Колонка «СУММА»: суммы под заголовком, с одного края, и в карточке товара, и в
       строках «СУММА» / «ИТОГО» (кадр: колонка на x≈285 при 390). Было: прижаты вправо. */
    .if-checkout-page .if-review-order-table thead tr,
    .if-checkout-page .if-review-order-table tr.cart_item,
    .if-checkout-page .if-review-order-table tr.cart-subtotal,
    .if-checkout-page .if-review-order-table tr.order-total {
        grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
    }

    .if-checkout-page .if-review-order-table th.product-total,
    .if-checkout-page .if-review-order-table td.product-total,
    .if-checkout-page .if-review-order-table tr.cart-subtotal td,
    .if-checkout-page .if-review-order-table tr.order-total td {
        text-align: left;
    }
}

/* Phones narrower than 375px: one pill per row, long method names stay readable. */
@media (max-width: 374px) {
    .if-checkout-page .if-review-order-table tr.woocommerce-shipping-totals ul#shipping_method,
    .if-checkout-page #payment ul.payment_methods {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   THANK YOU PAGE STYLES
   ========================================================================== */

.if-thankyou-page {
    background-color: #E9E6DA;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px var(--if-gap);
    border-top: 1px solid var(--if-color-dark);
    border-bottom: 1px solid var(--if-color-dark);
}

.if-thankyou-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.if-thankyou-title {
    font-family: var(--if-font-heading);
    font-size: 36px;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    color: #FF0000;
    margin: 0 0 var(--if-gap-sm);
    letter-spacing: 0.02em;
}

.if-thankyou-title--error {
    color: var(--if-color-dark);
}

.if-thankyou-order-number {
    font-family: var(--if-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--if-color-dark);
    margin-bottom: 60px;
}

.if-thankyou-message {
    font-family: var(--if-font-body);
    font-size: 14px;
    color: var(--if-color-text);
    margin-bottom: var(--if-gap);
}

.if-thankyou-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--if-gap-sm);
}

.if-btn--thankyou {
    display: inline-block;
    min-width: 280px;
    padding: 14px 32px;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    background: transparent;
    color: var(--if-color-dark);
    border: 2px solid var(--if-color-dark);
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
}

.if-btn--thankyou:hover {
    background: var(--if-color-dark);
    color: var(--if-color-white);
}

/* Реквизиты для оплаты на «Спасибо» (includes/company-requisites.php) */
.if-thankyou-requisites {
    max-width: 600px;
    margin: -20px auto 40px;
    padding: 20px 24px;
    border: 1px solid #9e9e9e;
    border-radius: 20px;
    text-align: left;
}

.if-thankyou-requisites__title {
    font-family: var(--if-font-heading);
    font-size: 8px; /* ONDER: на глаз ≈16px */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
    margin: 0 0 14px;
}

.if-thankyou-requisites__list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
    font-family: var(--if-font-body);
    font-size: 14px;
    line-height: 1.35;
    color: var(--if-color-dark);
}

.if-thankyou-requisites__list dt {
    color: var(--if-color-text-muted);
}

.if-thankyou-requisites__list dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* «На согласовании» / «счёт пришлёт менеджер» — под номером заказа, над кнопками */
.if-thankyou-message--note {
    max-width: 520px;
    margin: -20px auto 40px;
}

/* Hide default WooCommerce order details on thank you page */
.if-thankyou-page .woocommerce-order-overview,
.if-thankyou-page .woocommerce-order-details,
.if-thankyou-page .woocommerce-customer-details {
    display: none;
}

/* Print styles for order info */
@media print {
    .if-thankyou-page {
        background: white;
        min-height: auto;
        padding: 20px;
    }
    
    .if-thankyou-actions {
        display: none;
    }

    .if-thankyou-requisites {
        border-color: #000;
    }

    .if-thankyou-page .woocommerce-order-overview,
    .if-thankyou-page .woocommerce-order-details,
    .if-thankyou-page .woocommerce-customer-details {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .if-thankyou-title {
        font-size: 28px;
    }

    .if-thankyou-requisites {
        padding: 16px;
    }

    .if-thankyou-requisites__list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .if-thankyou-requisites__list dd {
        margin-bottom: 8px;
    }

    .if-btn--thankyou {
        min-width: 100%;
    }

    /* --- «Спасибо» по кадру Figma 1435:3827 (576px → 390px, ×0,677) ---
       Две класса: Кастомайзер печатает .if-thankyou-title { font-size: 10px;
       line-height: 20px } и .if-btn--thankyou { font-size: 7px } после этого файла. */

    /* Без линий сверху и снизу, блок сразу под шапкой (был 60vh с центровкой по
       вертикали — заголовок на y≈196). */
    .if-thankyou-page {
        align-items: flex-start;
        min-height: 0;
        padding: 56px 0 80px;
        border-top: 0;
        border-bottom: 0;
    }

    .if-thankyou-page > .if-container {
        width: 100%;
    }

    /* «СПАСИБО» / «ЗА ВАШ ЗАКАЗ!» — прямой ONDER в две строки по центру (был наклонный
       синтетический курсив и жирный 900, 10px; перенос после первого слова —
       thankyou.php). */
    .if-thankyou-content .if-thankyou-title {
        margin: 0 0 44px;
        /* «ЗА ВАШ ЗАКАЗ!» ≈ 20,5 × размер: 16,6px при 390 (≈340px, как в кадре), при 320
           ≈280px — в колонку 288px помещается. */
        font-size: clamp(11px, 4.25vw, 17px);
        font-style: normal;
        font-weight: 400;
        line-height: 2;
        text-wrap: balance;
    }

    /* Номер заказа ≈7,5px ONDER (было 18px жирным — в 2,4 раза крупнее кадра). */
    .if-thankyou-content .if-thankyou-order-number {
        margin-bottom: 56px;
        font-size: 7.5px;
        font-weight: 400;
        line-height: 2;
    }

    /* Кнопки — пилюли по ширине текста по центру, рамка 1px #C60200, текст в одну
       строку (были во всю ширину, рамка 2px, «СКАЧАТЬ ИНФОРМАЦИЮ / О ЗАКАЗЕ» в две
       строки). Нажимать — по 40px. */
    .if-thankyou-actions {
        gap: 10px;
    }

    .if-thankyou-actions .if-btn--thankyou {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        min-height: 40px;
        padding: 0 24px;
        border: 1px solid #C60200;
        font-size: 5px;
        font-weight: 400;
        line-height: 2;
    }
}

@media (min-width: 768px) {
    .if-thankyou-title .if-br-mobile {
        display: none;
    }
}

/* ==========================================================================
   CONTACT FORM 7 (CF7) STYLES
   ========================================================================== */

.wpcf7 {
    width: 100%;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: var(--if-gap-sm);
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-tel,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-select {
    width: 100%;
    padding: 14px 20px;
    font-family: var(--if-font-body);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
    background: transparent;
    border: 1px solid var(--if-color-dark);
    border-radius: var(--if-radius-pill);
    outline: none;
    transition: var(--if-transition-fast);
    appearance: none;
    -webkit-appearance: none;
}

.wpcf7-form-control.wpcf7-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111827' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    cursor: pointer;
}

.wpcf7-form-control.wpcf7-textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--if-font-body);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--if-color-dark);
    background: transparent;
    border: 1px solid var(--if-color-dark);
    border-radius: var(--if-radius-sm);
    outline: none;
    resize: vertical;
    min-height: 120px;
    transition: var(--if-transition-fast);
}

.wpcf7-form-control::placeholder {
    color: var(--if-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wpcf7-form-control.wpcf7-text:focus,
.wpcf7-form-control.wpcf7-email:focus,
.wpcf7-form-control.wpcf7-tel:focus,
.wpcf7-form-control.wpcf7-number:focus,
.wpcf7-form-control.wpcf7-select:focus,
.wpcf7-form-control.wpcf7-textarea:focus {
    border-color: #FF0000;
    border-width: 2px;
}

.if-cf7-request-subtitle {
    font-family: var(--if-font-heading);
    font-size: 0.45em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    text-align: center;
    color: var(--if-color-dark);
}

.wpcf7-not-valid.wpcf7-text,
.wpcf7-not-valid.wpcf7-email,
.wpcf7-not-valid.wpcf7-tel,
.wpcf7-not-valid.wpcf7-number,
.wpcf7-not-valid.wpcf7-textarea {
    border-color: #FF0000;
}

.wpcf7-not-valid-tip {
    font-family: var(--if-font-body);
    font-size: 11px;
    color: #FF0000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
    display: block;
    padding-left: 20px;
}

.wpcf7-form-control.wpcf7-submit {
    display: inline-block;
    padding: 14px 48px;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--if-color-white);
    background: var(--if-color-dark);
    border: 2px solid var(--if-color-dark);
    border-radius: var(--if-radius-pill);
    cursor: pointer;
    transition: var(--if-transition-fast);
    align-self: center;
}

.wpcf7-form-control.wpcf7-submit:hover {
    background: transparent;
    color: var(--if-color-dark);
}

.wpcf7-response-output {
    font-family: var(--if-font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 20px;
    border-radius: var(--if-radius-pill);
    margin-top: var(--if-gap-sm);
    border: 1px solid;
}

.wpcf7-form.sent .wpcf7-response-output {
    color: #16a34a;
    border-color: #16a34a;
}

.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.unacceptable .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output {
    color: #FF0000;
    border-color: #FF0000;
}

.wpcf7-spinner {
    display: none !important;
}

.wpcf7-form.submitting .wpcf7-form-control.wpcf7-submit {
    opacity: 0.6;
    cursor: wait;
}

/* Поле-ловушка антиспама (includes/cf7-mail-context.php): людям не видно */
.wpcf7 .if-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 767px) {
    .wpcf7-form-control.wpcf7-submit {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   CONTACT FORM — CARD LAYOUT (Figma ref)
   Scoped to `.if-contact-form` (added to the Elementor Shortcode widget on the
   contacts page → Advanced → CSS Classes). The request popup uses the SAME CF7
   form (id 18418) and is intentionally left untouched. All form text is ONDER
   (--if-font-heading); backgrounds are transparent so the page cream shows.
   ========================================================================== */

.if-contact-form .wpcf7 {
    max-width: 620px;
    margin-inline: auto;
    padding: clamp(20px, 3vw, 32px);
    background: transparent;
    border: 1px solid var(--if-color-dark, #111827);
    border-radius: 28px;
    /* Text below is sized against the card's own width (cqi), not the screen:
       on tablets the form sits in a column as narrow as a phone. */
    container-type: inline-size;
}

/* Tighter, even row spacing */
.if-contact-form .wpcf7-form {
    gap: 10px;
}
.if-contact-form .wpcf7-form > p {
    margin: 0;
    text-align: center;
}

/* Card title — centered, uppercase, ONDER, compact */
.if-contact-form .wpcf7-form > h1,
.if-contact-form .wpcf7-form > h2,
.if-contact-form .wpcf7-form > h3 {
    margin: 0 0 12px;
    text-align: center;
    text-transform: uppercase;
    font-family: var(--if-font-heading);
    font-size: 12px;
    font-size: clamp(9px, 2.17cqi, 12px); /* 12px on the desktop card, 9px on phones */
    letter-spacing: 0.04em;
}

/* Collapse the (empty) request-subtitle mirror on the contact page */
.if-contact-form .if-cf7-request-subtitle:empty {
    margin: 0;
}

/* Fields — ONDER, transparent, big rounding (pill-ish inputs + rounded textarea) */
.if-contact-form .wpcf7-form-control.wpcf7-text,
.if-contact-form .wpcf7-form-control.wpcf7-email,
.if-contact-form .wpcf7-form-control.wpcf7-tel,
.if-contact-form .wpcf7-form-control.wpcf7-number,
.if-contact-form .wpcf7-form-control.wpcf7-textarea {
    font-family: var(--if-font-heading);
    /* The base CF7 rule's 12px was chosen for Inter; ONDER draws about twice as
       large, so on a phone «ВАШ РЕГИОН*» filled the whole field. 12px stays on the
       desktop card (554px of text width), phones and the narrow tablet column get
       7px — the size of the request popup's fields. The placeholder inherits it. */
    font-size: clamp(7px, 2.17cqi, 12px);
    background: transparent;
    border-radius: 25px;
}

/* Placeholder — ONDER, dark (not muted grey) */
.if-contact-form .wpcf7-form-control::placeholder {
    font-family: var(--if-font-heading);
    color: var(--if-color-dark, #111827);
}

/* Submit — smaller ONDER, solid black pill */
.if-contact-form .wpcf7-form-control.wpcf7-submit {
    padding: 14px 38px;
    font-size: 6px;
    font-weight: 400;
    background: #000000;
}
/* Keep it a solid black pill on hover — the theme's default inverts to dark text,
   which was rendering black-on-black. Pin white text (and keep the black fill). */
.if-contact-form .wpcf7-form-control.wpcf7-submit:hover,
.if-contact-form .wpcf7-form-control.wpcf7-submit:focus {
    background: #000000;
    color: var(--if-color-white, #fff);
}

/* Consent line — centered, small ONDER */
.if-contact-form .wpcf7-form .polite {
    display: block;
    width: 75%;
    margin: 4px auto 0;
    text-align: center;
    font-family: var(--if-font-heading);
    font-size: 6px;
    color: #000000;
}

/* Captcha — centered */
.if-contact-form .h-captcha {
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   КНОПКА «НАВЕРХ» — на всём сайте, со второго экрана
   PHP: includes/back-to-top.php, JS: assets/js/back-to-top.js. Вид как у
   кнопки модуля каталога (.if-products-totop); где она есть, эта убирается.
   ========================================================================== */
.if-site-totop {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--if-color-primary);
    color: var(--if-color-white);
    box-shadow: 0 4px 16px rgba(208, 30, 30, 0.35);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* Цвета повторены для :hover/:focus — иначе побеждает [type=button]:hover
   из reset.css родительской темы (розовый #c36). */
.if-site-totop:hover,
.if-site-totop:focus {
    background: var(--if-color-primary);
    color: var(--if-color-white);
}

.if-site-totop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(208, 30, 30, 0.45);
}

.if-site-totop:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
}

/* visibility — чтобы скрытая кнопка не ловила фокус с клавиатуры */
.if-site-totop.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Открыт поиск в шапке (на телефоне — панель поверх экрана). Отдельным правилом:
   браузер без :has() отбросил бы весь список селекторов вместе с .is-hidden. */
body:has(.if-hsearch.is-open) .if-site-totop {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 767px) {
    .if-site-totop {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .if-site-totop {
        transition: none;
    }

    .if-site-totop:hover {
        transform: none;
    }
}

/* ==========================================================================
   CF7 — согласие на обработку ПДн (152-ФЗ): галочка [acceptance pd-consent]
   Разметка формы (миграция dev/migrations/legal-152fz.php, обе формы — 17834
   в попапе 17984 и 18418 на «Контактах»):
     <span class="polite if-cf7-consent">[acceptance pd-consent]…[/acceptance]</span>
   .polite оставлен ради правила карточки «Контактов» выше, .if-cf7-consent —
   общее для обеих форм. Замер на бою (ONDER 6px ≈ 12px на глаз): попап —
   2 строки на 1440, 4 строки на 375; «Контакты» — 3 строки на 1440 при ширине
   460px, форма не шире экрана.
   ========================================================================== */
.wpcf7-form .if-cf7-consent {
    display: block;
    margin: 4px auto 0;
    text-align: left;
}
.if-contact-form .wpcf7-form .polite.if-cf7-consent {
    width: 100%;
    max-width: 460px;
}
.wpcf7-form .if-cf7-consent .wpcf7-list-item {
    display: block;
    margin: 0;
}
.wpcf7-form .if-cf7-consent label {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.wpcf7-form .if-cf7-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #FF0000;
    cursor: pointer;
}
.wpcf7-form .if-cf7-consent .wpcf7-list-item-label {
    font-family: var(--if-font-heading);
    font-size: 6px;
    line-height: 1.9;
    color: var(--if-color-dark, #111827);
    text-align: left;
}
.wpcf7-form .if-cf7-consent a {
    color: #FF0000;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wpcf7-form .if-cf7-consent .wpcf7-not-valid-tip {
    padding-left: 22px;
    font-size: 10px;
    text-align: left;
}

/* ==========================================================================
   WooCommerce AJAX add-to-cart — loading spinner + "Добавлено" feedback
   JS: assets/js/wc-add-to-cart-feedback.js (WC toggles .loading itself).
   ========================================================================== */
.ajax_add_to_cart.loading {
    position: relative;
    pointer-events: none;
}
.ajax_add_to_cart.loading .elementor-button-content-wrapper,
.ajax_add_to_cart.loading .elementor-button-text {
    opacity: 0.35;
}
.ajax_add_to_cart.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: if-atc-spin 0.6s linear infinite;
    pointer-events: none;
}
@keyframes if-atc-spin {
    to { transform: rotate(360deg); }
}

/* Hide WooCommerce's "Просмотр корзины" link appended after AJAX add-to-cart */
a.added_to_cart,
.added_to_cart.wc-forward {
    display: none !important;
}

/* Hide WooCommerce's native "Распродажа!" sale flash everywhere */
.onsale,
.woocommerce span.onsale,
.woocommerce-page span.onsale {
    display: none !important;
}

/* ==========================================================================
   PRODUCT GALLERY — no sideways scroll on phones
   The thumbnail strip gets margin: 0 -5px from the Elementor product-images
   widget's thumbnail spacing. On phones the gallery runs edge to edge, so the
   strip poked 5px past both sides and every product page scrolled sideways
   (document 380px wide at 375). Only empty gutter is clipped.
   ========================================================================== */
@media (max-width: 767px) {
    .woocommerce div.product .woocommerce-product-gallery {
        overflow-x: clip;
    }
}

/* ==========================================================================
   PHONES — a long word in an Elementor heading must not widen the page
   ONDER draws about twice its nominal size: at 15px «СНЕГОЗАДЕРЖАТЕЛИ» is ~460px,
   wider than any phone. Sizes are set per element (dev/migrations/mobile-polish.php);
   this only catches content added later — the word breaks, the page stays 375px.
   Phones only: on tablets a heading may overflow its own column without widening
   the page, and a mid-word break there would look worse.
   ========================================================================== */
@media (max-width: 767px) {
    .elementor-widget-heading .elementor-heading-title {
        overflow-wrap: break-word;
    }
}

/* ==========================================================================
   PRODUCT GALLERY — visible before single-product.js (LCP)
   WooCommerce prints the gallery with inline opacity:0 and sets it to 1 only
   when its deferred single-product.js initialises (after DOMContentLoaded),
   so the main photo — the LCP element — painted ~1.6-2 s after FCP on phones.
   Galleries with ONE image never get flexslider, so nothing moves when the
   script runs. Multi-image galleries keep WooCommerce's behaviour.
   ========================================================================== */
.woocommerce-product-gallery:not(:has(.woocommerce-product-gallery__image ~ .woocommerce-product-gallery__image)) {
    opacity: 1 !important;
}

/* ==========================================================================
   CONTACT FORM ON A DARK PAGE
   «Контакты» (page 294) got a black page background on 28.09, and the card,
   fields, title and button stayed dark-on-dark (#111827 / #000 on #000): the
   form was invisible. On that page — or anywhere the Shortcode widget also gets
   the class if-contact-form--dark — lines and text are white, the placeholder
   a lighter white, the submit a white pill that turns red on hover. Focus and
   errors keep the site red.
   ========================================================================== */
body.page-id-294 .if-contact-form .wpcf7,
.if-contact-form.if-contact-form--dark .wpcf7 {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}
body.page-id-294 .if-contact-form .wpcf7-form > h1,
body.page-id-294 .if-contact-form .wpcf7-form > h2,
body.page-id-294 .if-contact-form .wpcf7-form > h3,
body.page-id-294 .if-contact-form .if-cf7-request-subtitle,
.if-contact-form.if-contact-form--dark .wpcf7-form > h1,
.if-contact-form.if-contact-form--dark .wpcf7-form > h2,
.if-contact-form.if-contact-form--dark .wpcf7-form > h3,
.if-contact-form.if-contact-form--dark .if-cf7-request-subtitle {
    color: #ffffff;
}
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-text,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-email,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-tel,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-number,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-select,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-textarea,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-text,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-email,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-tel,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-number,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-select,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-textarea {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
    background: transparent;
}
body.page-id-294 .if-contact-form .wpcf7-form-control::placeholder,
.if-contact-form.if-contact-form--dark .wpcf7-form-control::placeholder {
    color: rgba(255, 255, 255, 0.72);
}
body.page-id-294 .if-contact-form .wpcf7-form-control:focus,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-not-valid,
.if-contact-form.if-contact-form--dark .wpcf7-form-control:focus,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-not-valid {
    border-color: #FF0000;
}
/* Browser autofill paints the field light with dark text — keep it dark. */
body.page-id-294 .if-contact-form .wpcf7-form-control:-webkit-autofill,
.if-contact-form.if-contact-form--dark .wpcf7-form-control:-webkit-autofill {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px #000000 inset;
    caret-color: #ffffff;
}
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-submit,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-submit {
    color: #000000;
    background: #ffffff;
    border-color: #ffffff;
}
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-submit:hover,
body.page-id-294 .if-contact-form .wpcf7-form-control.wpcf7-submit:focus,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-submit:hover,
.if-contact-form.if-contact-form--dark .wpcf7-form-control.wpcf7-submit:focus {
    color: #ffffff;
    background: #FF0000;
    border-color: #FF0000;
}
body.page-id-294 .if-contact-form .wpcf7-form .polite,
body.page-id-294 .if-contact-form .if-cf7-consent .wpcf7-list-item-label,
.if-contact-form.if-contact-form--dark .wpcf7-form .polite,
.if-contact-form.if-contact-form--dark .if-cf7-consent .wpcf7-list-item-label {
    color: rgba(255, 255, 255, 0.85);
}
body.page-id-294 .if-contact-form .wpcf7-response-output,
.if-contact-form.if-contact-form--dark .wpcf7-response-output {
    color: #ffffff;
}
body.page-id-294 .if-contact-form .wpcf7-form.sent .wpcf7-response-output,
.if-contact-form.if-contact-form--dark .wpcf7-form.sent .wpcf7-response-output {
    color: #22c55e;
    border-color: #22c55e;
}
body.page-id-294 .if-contact-form .wpcf7-form.invalid .wpcf7-response-output,
body.page-id-294 .if-contact-form .wpcf7-form.unacceptable .wpcf7-response-output,
body.page-id-294 .if-contact-form .wpcf7-form.failed .wpcf7-response-output,
.if-contact-form.if-contact-form--dark .wpcf7-form.invalid .wpcf7-response-output,
.if-contact-form.if-contact-form--dark .wpcf7-form.unacceptable .wpcf7-response-output,
.if-contact-form.if-contact-form--dark .wpcf7-form.failed .wpcf7-response-output {
    color: #FF0000;
    border-color: #FF0000;
}

/* ==========================================================================
   ШАПКА — закреплена на всех страницах, при прокрутке получает подложку (07.10)
   PHP: includes/site-header.php, JS: assets/js/site-header.js (класс
   if-header-scrolled на <html> и --if-header-h — высота шапки).
   Тёмная шапка (17672) закреплена через ElementsKit (.ekit-sticky--top, сама
   встаёт поверх первого экрана); светлая (12) — здесь, без сдвига вёрстки.
   ========================================================================== */
html {
    scroll-padding-top: var(--if-header-h, 0px);
}

.elementor-location-header:not(:has(.ekit-sticky--top)) {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 1000;
}

.elementor-location-header > .e-con {
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Над первым экраном шапка прозрачная, как в макете; как только страница
   сдвинута — плотная подложка с размытием, чтобы меню читалось над любым
   блоком. Тёмной шапке — тёмная подложка вместо «стекла» ElementsKit (blur 1px
   с искажением): белые пункты над бежевыми блоками главной было не прочесть. */
html.if-header-scrolled .elementor-location-header > .e-con {
    background-color: rgba(237, 235, 222, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

html.if-header-scrolled .elementor-location-header:has(.if-hsearch--dark) > .e-con {
    background-color: rgba(12, 12, 12, 0.84);
    box-shadow: none;
}
