
/*
Theme Name: Побочки Ивана
Theme URI: https://pobochki-ivana.ru
Author: Ivan
Description: Авторская тема для сайта «Побочки Ивана».
Version: 0.5.5
Text Domain: pobochki
*/

/*
 * ПОБОЧКИ ИВАНА — CSS / ITERATION 09 / 2026-11-08
 *
 * Editing guide:
 *   1. Change shared colors and dimensions in the first :root block.
 *   2. Page-specific declarations are below, in historical cascade order.
 *   3. V14–V24 overrides are intentionally retained: removing or moving
 *      them can change desktop/mobile appearance.
 *   4. The --ui-* tokens centralize recurring literal colors without
 *      changing their original values. This is a safe incremental refactor,
 *      NOT a fully deduplicated stylesheet.
 *   5. Iteration 04 aligns card title/price typography on home and catalog.
 *      Card geometry, grid columns, forms and breakpoints remain unchanged.
 *   6. Future dark mode should override semantic tokens only after the
 *      remaining literal colors have been classified and tested.
 *
 * Do not append another hotfix section; edit the owning component rule,
 * then verify home, catalog, product, about, contacts and mobile.
 */

/* ==========================================
   1. VARIABLES & RESET
========================================== */

:root {

    /* Centralized legacy colors; exact original values, no redesign yet. */
    --ui-white: #ffffff;
    --ui-ink: #222222;
    --ui-muted: #777777;
    --ui-warm-surface: #e9e7e1;
    --ui-brand-mark: #e04432;
    --ui-placeholder-border: #ccc9c2;
    --ui-accent-hover: #e5df00;
    /* Iteration 02: archive identity, shared across all public pages. */
    --archive-mark: #e04432;
    --archive-label-tracking: .085em;
    --archive-focus-width: 2px;
    --archive-focus-offset: 4px;
    --archive-index-size: 7px;
    --archive-index-gap: 10px;
    --archive-heading-rule: 1px;
    /* Iteration 04: shared product-card typography */
    --archive-card-title-size: clamp(17px, 1.6vw, 21px);
    --archive-card-title-weight: 800;
    --archive-card-title-leading: 1.24;
    --archive-card-price-size: 19px;
    --archive-card-price-weight: 700;
    /* Shared product-card details across home and catalog. */
    --archive-card-title-tracking: -.025em;
    --archive-card-price-leading: 1.25;
    --archive-card-mobile-title-size: 16px;
    --archive-card-mobile-price-size: 17px;
    /* Iteration 05: restrained archival card details */
    --archive-card-rule: #b9b8b3;
    --archive-card-info-gap: 13px;
    --archive-card-focus: #222222;
    --archive-filter-active: #222222;
    --archive-filter-muted: #62615e;
    --background: #f5f4f0;
    --text: #222222;
    --accent: #f2ed00;
    --border: #222222;
    --muted: #777777;
    --surface: #e9e7e1;
    --success: #23853c;

    /* Общие размеры страниц и типографика */
    --page-width: 1320px;
    --page-gutter: 24px;
    --page-top: 56px;
    --page-bottom: 96px;
    --heading-size: clamp(42px, 6vw, 76px);
    --heading-weight: 900;
    --heading-leading: 1.02;
    --heading-tracking: -0.055em;
    --section-gap: 48px;
    --body-size: 17px;
    --control-border-width: 2px;
    --control-font-size: 15px;
    --control-font-weight: 800;
    --eyebrow-font-size: 12px;
    --eyebrow-font-weight: 800;
    --eyebrow-tracking: .08em;
    --control-transition: .2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: min(var(--page-width), calc(100% - 2 * var(--page-gutter)));
    max-width: var(--page-width);
    margin-inline: auto;
}

/* ==========================================
   2. HEADER
========================================== */

.site-header {
    background: var(--ui-white);
    border-bottom: 2px solid var(--border);
}

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-decoration: none;
}

.site-logo span {
    display: inline-block;
    color: var(--archive-mark);
    transform: rotate(-12deg);
    transform-origin: center;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.site-nav a {
    font-size: 15px;
    font-weight: 600;
}

.site-nav a:hover {
    text-decoration: underline;
}

/* ==========================================
   3. BUTTONS
========================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    border: var(--control-border-width) solid var(--border);
    font-size: var(--control-font-size);
    font-weight: var(--control-font-weight);
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.button:hover {
    transform: translate(-3px, -3px);
}

.button-primary {
    background: var(--accent);
    color: var(--text);
}

.button-primary:hover {
    background: var(--ui-accent-hover);
}

/* ==========================================
   4. HERO
========================================== */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
    min-height: 580px;
    padding-bottom: 64px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}

.hero h1 {
    margin: 28px 0;
    font-size: clamp(42px, 5.2vw, 82px);
    line-height: 1.05;
    letter-spacing: -3px;
}

.hero-highlight {
    background: var(--accent);
    padding: 0 8px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.hero p {
    max-width: 480px;
    margin: 0 0 32px;
    font-size: 21px;
    line-height: 1.5;
}

.hero-visual {
    min-height: 440px;
}

.hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 440px;
    padding: 24px;
    background: #d9d7d0;
    border: 2px solid var(--border);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

/* ==========================================
   5. CATALOG
========================================== */

.catalog-section {
    padding-top: 40px;
    padding-bottom: 100px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
}

.section-heading h2 {
    margin: 0 0 20px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -2px;
}

.section-heading span {
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    min-width: 0;
}

.product-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #dedcd6;
    border: 1px solid var(--ui-placeholder-border);
    font-size: 13px;
    font-weight: 700;
}

.product-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-link:hover .product-photo {
    transform: scale(1.04);
}

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

.product-info {
    padding: 16px 0;
}

.product-status {
    font-size: 12px;
    color: var(--success);
    font-weight: 800;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.product-info h3 {
    margin: 12px 0;
    font-size: 18px;
    line-height: 1.3;
}

.product-info strong {
    font-size: 23px;
    font-weight: 800;
}

.product-info strong .amount {
    font-weight: 800;
}

.catalog-empty {
    padding: 48px 0;
    font-size: 20px;
    color: var(--muted);
}

/* ==========================================
   6. ABOUT
========================================== */

.about-section {
    background: var(--surface);
    border-top: 2px solid var(--border);
}

.about-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.about-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 24px;
    background: var(--ui-placeholder-border);
    text-align: center;
    font-weight: 700;
}

.about-content h2 {
    margin: 0 0 24px;
    font-size: 48px;
    line-height: 1.1;
}

.about-content p {
    font-size: 19px;
    line-height: 1.6;
}

/* ==========================================
   7. FOOTER
========================================== */

.site-footer {
    background: var(--text);
    color: var(--ui-white);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 110px;
}

.footer-inner a {
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

/* ==========================================
   8. SINGLE PRODUCT PAGE
========================================== */

body.single-product .single-product-page {
    padding-top: 40px;
    padding-bottom: 100px;
}

body.single-product .single-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 70px;
    align-items: start;
}

body.single-product .single-product-gallery {
    min-width: 0;
    background: var(--surface);
}

body.single-product .single-product-image {
    display: block;
    width: 100%;
    height: auto;
}

body.single-product .single-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    padding: 24px;
    text-align: center;
}

body.single-product .single-product-details {
    min-width: 0;
}

body.single-product .single-product-category {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

body.single-product .single-product-category a {
    text-decoration: none;
}

body.single-product .single-product-category a:hover {
    text-decoration: underline;
}

body.single-product .single-product-details h1 {
    margin: 24px 0;
    font-size: clamp(40px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -2px;
    overflow-wrap: anywhere;
}

body.single-product .single-product-price {
    margin-bottom: 24px;
    font-size: 36px;
    font-weight: 800;
}

body.single-product .single-product-price .amount {
    font-weight: 800;
}

body.single-product .single-product-stock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 15px;
}

body.single-product .stock-dot {
    display: inline-block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    background: #2caa48;
    border-radius: 50%;
}

body.single-product .single-product-description {
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.7;
}

body.single-product .single-product-description p {
    margin-top: 0;
    margin-bottom: 16px;
}

body.single-product .product-inquiry {
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

body.single-product .product-inquiry p {
    margin: 0 0 24px;
    font-size: 15px;
}

/* ==========================================
   9. BREADCRUMBS
========================================== */

body.single-product .product-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

body.single-product .product-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

body.single-product .product-breadcrumbs a:hover {
    color: var(--text);
    text-decoration: underline;
}

body.single-product .breadcrumb-separator {
    color: #aaaaaa;
}

body.single-product .breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

/* ==========================================
   10. RESPONSIVE: TABLETS
========================================== */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 320px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    body.single-product .single-product-layout {
        gap: 32px;
    }

}

/* ==========================================
   11. RESPONSIVE: MOBILE
========================================== */

@media (max-width: 700px) {

    .container {
        width: calc(100% - 32px);
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 18px;
        padding: 20px 0;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-nav a {
        font-size: 14px;
    }

    .hero {
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: clamp(40px, 11vw, 60px);
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-visual,
    .hero-placeholder {
        min-height: 300px;
    }

    .section-heading {
        display: block;
    }

    .products-grid {
        gap: 12px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .product-info strong {
        font-size: 19px;
    }

    .about-inner {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .about-content h2 {
        font-size: 36px;
    }

    .about-content p {
        font-size: 17px;
    }

    .footer-inner {
        flex-wrap: wrap;
        padding: 30px 0;
    }

    body.single-product .single-product-page {
        padding-top: 24px;
        padding-bottom: 60px;
    }

    body.single-product .single-product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    body.single-product .single-product-details h1 {
        font-size: clamp(36px, 9vw, 52px);
    }

    body.single-product .single-product-price {
        font-size: 30px;
    }

    body.single-product .product-breadcrumbs {
        margin-bottom: 24px;
    }

}

@media (max-width: 380px) {

    .site-logo {
        font-size: 22px;
    }

    .products-grid {
        gap: 10px;
    }

    .product-info strong {
        font-size: 17px;
    }

}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .button,
    .product-photo {
        transition: none;
    }

}


/* ==========================================
   12. STICKY FOOTER
========================================== */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header,
.site-footer {
    flex-shrink: 0;
}

main {
    flex-grow: 1;
}

.site-footer {
    margin-top: auto;
}


body.single-product .product-inquiry .button.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    background: var(--accent);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 0;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

body.single-product .product-inquiry .button.button-primary:hover {
    background: var(--ui-accent-hover);
    color: var(--text);
}

/* ==========================================
   13. PRODUCT GALLERY
========================================== */

.single-product-gallery {
    min-width: 0;
}

.pobochki-gallery {
    width: 100%;
}

.gallery-main {
    width: 100%;
    background: var(--ui-warm-surface);
    overflow: hidden;
}

.gallery-main-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.gallery-thumbnail {
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid transparent;
    background: var(--ui-warm-surface);
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: border-color 0.2s ease;
}

.gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnail:hover {
    border-color: var(--ui-muted);
}

.gallery-thumbnail.is-active {
    border-color: var(--ui-ink);
}

.gallery-thumbnail:focus-visible {
    outline: 3px solid var(--ui-ink);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .gallery-thumbnails {
        gap: 8px;
        margin-top: 8px;
    }
}

/* ==========================================
   14. CATALOG PAGE
========================================== */

.catalog-page {
    padding-top: 70px;
    padding-bottom: 110px;
}

.catalog-page-heading {
    margin-bottom: 44px;
}

.catalog-page-heading h1 {
    margin: 18px 0 20px;
    font-size: clamp(48px, 7vw, 92px);
    line-height: 1;
    letter-spacing: -3px;
}

.catalog-page-heading p {
    max-width: 560px;
    font-size: 19px;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 30px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
}

.catalog-filters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.catalog-filters a:hover {
    background: #e3e0d8;
}

.catalog-filters a.is-active {
    background: var(--accent);
    border-color: var(--border);
}

.catalog-products {
    row-gap: 44px;
}

.catalog-pagination {
    margin-top: 60px;
}

.catalog-pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    font-weight: 700;
    text-decoration: none;
}

.catalog-pagination .page-numbers.current {
    background: var(--accent);
}

.catalog-empty-state {
    padding: 70px 0;
}

.catalog-empty-state h2 {
    font-size: 38px;
    margin: 0 0 16px;
}

.catalog-empty-state p {
    margin-bottom: 28px;
}

@media (max-width: 700px) {
    .catalog-page {
        padding-top: 40px;
        padding-bottom: 70px;
    }

    .catalog-page-heading h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .catalog-page-heading p {
        font-size: 17px;
    }

    .catalog-filters {
        gap: 8px;
    }

    .catalog-filters a {
        padding: 10px 13px;
        font-size: 12px;
    }
}


/* Блок проданной работы */

.single-product-details .single-product-sold {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #242424;
    background: #e9e8e4;
}

.single-product-details .single-product-sold__label {
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #242424;
}

.single-product-details .single-product-sold p {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Проданные товары в каталоге */

.catalog-products .product-card .product-image {
    position: relative;
}

.catalog-products .product-sold-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 8px 12px;
    background: #242424;
    color: var(--ui-white);
    border: 1px solid #242424;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .06em;
}

.catalog-products .product-card.is-sold .product-photo {
    opacity: .8;
}

.catalog-products .product-card.is-sold .product-status {
    color: #666;
}

.catalog-products .product-card.is-sold .product-link:hover .product-photo {
    opacity: 1;
}

/* Возврат из карточки товара в каталог.
   Typography is shared with .eyebrow in SHARED DESIGN SYSTEM. */
.product-back-link {
    width: fit-content;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.product-back-link:hover {
    opacity: 0.55;
}

/* ==========================================
   CONTACTS — single source of truth
   ========================================== */
.contacts-page { min-height: 65vh; }
.contacts-inner { width: 100%; }
.contacts-dot { color: #f2df37; }
.contacts-list { border-top: 0; }
.contacts-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    min-width: 0;
    padding: 26px 4px;
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    transition: background-color .2s ease, padding-inline .2s ease;
}
.contacts-item:hover, .contacts-item:focus-visible {
    background-color: rgba(0,0,0,.035);
    padding-inline: 14px;
}
.contacts-name {
    min-width: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
}
.contacts-handle {
    min-width: 0;
    justify-self: end;
    text-align: right;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    overflow-wrap: anywhere;
    transition: text-decoration-color .2s ease;
}
.contacts-item:hover .contacts-handle,
.contacts-item:focus-visible .contacts-handle {
    text-decoration-color: currentColor;
}
@media (max-width: 650px) {
    .contacts-item { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 22px 4px; }
    .contacts-name { font-size: 19px; }
    .contacts-handle { grid-column: 1; justify-self: start; text-align: left; font-size: 16px; }
}

/* ==========================================
   15. MOBILE POLISH / ACCESSIBILITY (0.4.1)
   ========================================== */

/* Keep focus visible for keyboard users. */
.site-nav a:focus-visible,
.site-logo:focus-visible,
.button:focus-visible,
.product-link:focus-visible,
.catalog-filters a:focus-visible,
.product-back-link:focus-visible,
.contacts-item:focus-visible,
.footer-inner a:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 4px;
}

/* Prevent unusually long text from overflowing narrow cards. */
.product-info h3,
.catalog-page-heading h1,
.about-content p {
    overflow-wrap: break-word;
}

@media (max-width: 700px) {
    /* Tighter transitions between home-page sections. */
    .hero {
        gap: 24px;
        padding-top: 32px;
        padding-bottom: 20px;
    }

    .hero h1 {
        margin-top: 22px;
        margin-bottom: 24px;
    }

    .hero p {
        margin-bottom: 26px;
    }

    .catalog-section {
        padding-top: 24px;
        padding-bottom: 52px;
    }

    .section-heading {
        margin-bottom: 22px;
    }

    .section-heading h2 {
        margin-bottom: 14px;
    }

    .catalog-products {
        row-gap: 28px;
    }

    .about-inner {
        gap: 24px;
        padding-top: 40px;
        padding-bottom: 44px;
    }

    .about-content h2 {
        margin-bottom: 18px;
    }

    .about-content p {
        margin-top: 0;
        margin-bottom: 18px;
    }

    /* Preserve the existing two-column product grid. */
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Make the catalog heading less vertically expansive. */
    .catalog-page {
        padding-bottom: 56px;
    }

    .catalog-page-heading {
        margin-bottom: 30px;
    }

    .catalog-filters {
        padding-bottom: 24px;
        margin-bottom: 26px;
    }

    .catalog-pagination {
        margin-top: 40px;
    }

    body.single-product .single-product-description {
        margin-bottom: 30px;
    }

    .contacts-page {
        padding-top: 42px;
        padding-bottom: 64px;
    }
}

@media (max-width: 380px) {
    .hero {
        gap: 20px;
    }

    .catalog-products {
        row-gap: 24px;
    }

    .product-info {
        padding-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-thumbnail,
    .catalog-filters a,
    .product-back-link,
    .contacts-item,
    body.single-product .product-breadcrumbs a {
        transition: none;
    }
}

/* ==========================================
   MOBILE: COMPACT CATALOG
========================================== */

@media (max-width: 700px) {

    .catalog-page {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .catalog-page-heading {
        margin-bottom: 28px;
    }

    .catalog-page-heading h1 {
        margin-top: 14px;
        margin-bottom: 16px;
    }

    .catalog-page-heading p {
        margin-top: 0;
        margin-bottom: 0;
    }

    .catalog-filters {
        padding-bottom: 22px;
        margin-bottom: 24px;
    }

    .catalog-products {
        row-gap: 24px;
    }

    .catalog-pagination {
        margin-top: 32px;
    }
}

/* ==========================================
   404 PAGE
========================================== */

.error-page {
    display: flex;
    align-items: center;
    padding-top: 90px;
    padding-bottom: 110px;
}

.error-page__content {
    max-width: 760px;
}

.error-page__eyebrow {
    margin: 0 0 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.error-page__number {
    font-size: clamp(110px, 20vw, 240px);
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.error-page__number span {
    color: #e00000;
    font-size: 0.4em;
    vertical-align: top;
    letter-spacing: 0;
}

.error-page__title {
    margin: 35px 0 24px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.error-page__description {
    max-width: 460px;
    margin: 0 0 36px;
    font-size: 18px;
    line-height: 1.6;
}

.error-page__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 16px 28px;
    border: var(--control-border-width) solid var(--border);
    background: var(--accent);
    color: var(--text);
    font-size: var(--control-font-size);
    font-weight: var(--control-font-weight);
    text-align: center;
    text-decoration: none;
    transition: background-color var(--control-transition);
}

.error-page__button:hover {
    background: var(--ui-accent-hover);
}

.error-page__home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    margin: 0 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.error-page__home:hover {
    opacity: 0.55;
}

@media (max-width: 700px) {
    .error-page {
        padding-top: 48px;
        padding-bottom: 64px;
    }

    .error-page__eyebrow {
        margin-bottom: 28px;
        font-size: 11px;
    }

    .error-page__number {
        font-size: clamp(100px, 32vw, 150px);
    }

    .error-page__title {
        margin-top: 28px;
        font-size: clamp(36px, 11vw, 48px);
    }

    .error-page__description {
        font-size: 16px;
    }

    .error-page__button {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .error-page__home {
        display: flex;
        width: 100%;
        min-height: 44px;
        margin: 12px 0 0;
    }
}
/* ==========================================
   WORKSHOP / ABOUT PAGE — EDITORIAL LAYOUT
========================================== */
/* Compact About page */

.about-page .about-page-hero {
    padding-top: 42px;
    padding-bottom: 40px;
}

.about-page .about-page-hero h1 {
    font-size: clamp(38px, 5.5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.about-page .about-page-hero h1 span {
    display: inline;
}

.about-page .about-page-hero .about-page-accent {
    display: none;
}

.about-page .about-page-section {
    padding-top: 38px;
    padding-bottom: 38px;
}

.about-page .about-page-section h2 {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
}

.about-page .about-page-section p {
    font-size: 17px;
    line-height: 1.65;
}

@media (max-width: 700px) {
    .about-page .about-page-hero {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .about-page .about-page-section {
        padding-top: 28px;
        padding-bottom: 28px;
    }
}

/* ============================================================
   WORKSHOP / ABOUT PAGE — single source of page-specific styles.
   Outer geometry and heading typography use SHARED DESIGN SYSTEM tokens.
   ============================================================ */
.workshop-page {
    padding: var(--page-top) 0 var(--page-bottom);
    overflow: hidden;
}
.workshop-page .workshop-inner {
    width: min(var(--page-width), calc(100% - 2 * var(--page-gutter)));
    max-width: var(--page-width);
    margin-inline: auto;
}
.workshop-page .workshop-heading {
    width: 100%;
    max-width: none;
    margin: 0 0 var(--section-gap);
    padding: 0 0 28px;
    min-height: 0;
    border-bottom: var(--archive-heading-rule) solid var(--border);
}
.workshop-page .workshop-heading .eyebrow,
.product-back-link {
    display: block;
    margin: 0;
    font-size: var(--eyebrow-font-size);
    font-weight: var(--eyebrow-font-weight);
    line-height: 1.5;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}
.workshop-page .workshop-heading h1 {
    max-width: 100%;
    margin: 16px 0 0;
    padding: 0;
    font-size: var(--heading-size);
    font-weight: var(--heading-weight);
    line-height: var(--heading-leading);
    letter-spacing: var(--heading-tracking);
    text-transform: uppercase;
    overflow-wrap: break-word;
}
.workshop-page .workshop-dot { color: var(--archive-mark); }
.workshop-page .workshop-content { width: 100%; max-width: none; }
.workshop-page .workshop-intro,
.workshop-page .workshop-section {
    display: grid;
    grid-template-columns: minmax(0, .35fr) minmax(0, .65fr);
    gap: 50px;
    border-bottom: 1px solid var(--border);
}
.workshop-page .workshop-intro { padding: 34px 0 46px; }
.workshop-page .workshop-intro-label,
.workshop-page .workshop-outro-label {
    display: block;
    font-size: var(--eyebrow-font-size);
    font-weight: var(--eyebrow-font-weight);
    line-height: 1.5;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}
.workshop-page .workshop-intro p {
    max-width: 700px;
    margin: 0;
    font-size: clamp(20px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.03em;
}
.workshop-page .workshop-section { padding: 48px 0 54px; }
.workshop-page .workshop-section-title,
.workshop-page .workshop-section-body { min-width: 0; }
.workshop-page .workshop-section-number {
    display: block;
    margin-bottom: 14px;
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}
.workshop-page .workshop-section-title h2 {
    max-width: 370px;
    margin: 0;
    font-size: clamp(30px, 3.2vw, 48px);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -.055em;
}
.workshop-page .workshop-section-body { max-width: 710px; overflow-wrap: break-word; }
.workshop-page .workshop-section-body p {
    margin: 0 0 20px;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.65;
}
.workshop-page .workshop-section-body p:last-child { margin-bottom: 0; }
.workshop-page .workshop-outro {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 52px 0 0;
    text-align: center;
}
.workshop-page .workshop-outro-label { margin-bottom: 16px; }
.workshop-page .workshop-outro h2 {
    max-width: none;
    margin: 0;
    font-size: clamp(36px, 5vw, 66px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.06em;
}
.workshop-page .workshop-outro .button {
    align-self: center;
    flex-shrink: 0;
    min-height: 62px;
}
.workshop-page .workshop-outro .button:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 4px;
}
@media (max-width: 900px) {
    .workshop-page .workshop-intro,
    .workshop-page .workshop-section { grid-template-columns: 1fr; gap: 24px; }
    .workshop-page .workshop-intro { padding: 30px 0 38px; }
    .workshop-page .workshop-section { padding: 38px 0 44px; }
    .workshop-page .workshop-section-title h2 { max-width: none; }
    .workshop-page .workshop-outro { align-items: stretch; }
}
@media (max-width: 700px) {
    .workshop-page .workshop-heading { padding-bottom: 22px; }
    .workshop-page .workshop-heading h1 { margin-top: 12px; }
    .workshop-page .workshop-intro p { font-size: 22px; }
    .workshop-page .workshop-section-title h2 { font-size: 36px; }
    .workshop-page .workshop-section-body p { font-size: 16px; }
    .workshop-page .workshop-outro .button { width: 100%; max-width: 360px; }
}

/* ============================================================
   V13.1 — ORDER ENQUIRY MODAL
   All modal appearance is maintained here, not in PHP.
   ============================================================ */
.pobochki-modal[hidden] { display: none !important; }
.pobochki-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pobochki-modal__backdrop { position: absolute; inset: 0; background: rgba(18,18,18,.62); }
.pobochki-modal__panel {
    position: relative; width: 100%; max-width: 660px;
    max-height: 92vh; max-height: 92dvh; overflow-y: auto;
    overscroll-behavior: contain; padding: clamp(24px, 3.5vw, 40px);
    border: 0; outline: 0; border-radius: 0;
    box-shadow: 0 24px 72px rgba(0,0,0,.2);
}
.pobochki-modal__close { position: absolute; top: 16px; right: 19px; border: 0; padding: 5px 8px; background: transparent; color: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
.pobochki-modal__close:hover { opacity: .55; }
.pobochki-modal__close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pobochki-modal__eyebrow { margin: 0 35px 12px 0; font-size: var(--eyebrow-font-size); font-weight: var(--eyebrow-font-weight); letter-spacing: var(--eyebrow-tracking); line-height: 1.5; text-transform: uppercase; }
.pobochki-modal__panel h2 { margin: 0 30px 16px 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; font-weight: 900; }
.pobochki-modal__product { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 0 0 20px; margin: 0 0 24px; border: 0; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; line-height: 1.4; }
.pobochki-modal__product-name { min-width: 0; flex: 1 1 220px; }
.pobochki-modal__price-group { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pobochki-modal__price-label { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
.pobochki-modal__price { display: block; font-size: 22px; line-height: 1.2; white-space: nowrap; font-weight: 900; font-variant-numeric: tabular-nums; }
.pobochki-modal__price .amount { white-space: nowrap; }
#pobochki-inquiry-form { display: flex; flex-direction: column; gap: 17px; }
#pobochki-inquiry-form .pobochki-form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
#pobochki-inquiry-form > label:not(.pobochki-consent),
#pobochki-inquiry-form .pobochki-form-row > label { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; font-size: 14px; font-weight: 700; }
#pobochki-inquiry-form input:not([type="checkbox"]), #pobochki-inquiry-form textarea { display: block; width: 100%; min-height: 46px; padding: 11px 12px; background: #fff; color: var(--text); border: 1px solid #999; border-radius: 0; font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.4; }
#pobochki-inquiry-form textarea { min-height: 92px; resize: vertical; }
#pobochki-inquiry-form input:focus, #pobochki-inquiry-form textarea:focus { border-color: var(--text); outline: 1px solid var(--text); outline-offset: 0; }
#pobochki-inquiry-form .pobochki-consent { display: flex; align-items: flex-start; gap: 12px; margin: 3px 0 0; font-size: 14px; font-weight: 400; line-height: 1.55; }
#pobochki-inquiry-form .pobochki-consent input[type="checkbox"] { margin: 4px 0 0; flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--text); }
#pobochki-inquiry-form .pobochki-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
#pobochki-inquiry-form .pobochki-submit { display: block; width: 100%; min-height: 52px; padding: 13px 18px; border: 1px solid var(--text); border-radius: 0; background: var(--accent); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: background .15s ease; }
#pobochki-inquiry-form .pobochki-submit:not(:disabled):hover { background: #e6e100; }
#pobochki-inquiry-form .pobochki-submit:disabled { background: #dededb; color: #777; border-color: #b5b5b5; cursor: not-allowed; opacity: 1; }
.pobochki-form-message { margin: 0; font-size: 14px; font-weight: 700; }
.pobochki-form-message:empty { display: none; }
.pobochki-form-message.is-error { color: #b42318; }
.pobochki-form-message.is-success { color: #18743b; }
.pobochki-form-note { margin: -5px 0 0; font-size: 13px; line-height: 1.5; color: var(--archive-filter-muted); }
.pobochki-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Reserve the vertical scrollbar track while the inquiry modal locks scrolling.
   This prevents the centered page layout from shifting horizontally. */
html { scrollbar-gutter: stable; }
body.pobochki-modal-open { overflow: hidden; }
@media (max-width: 600px) {
    .pobochki-modal { padding: 10px; }
    .pobochki-modal__panel { padding: 30px 20px; max-height: 95vh; max-height: 95dvh; }
    #pobochki-inquiry-form .pobochki-form-row { grid-template-columns: minmax(0,1fr); gap: 17px; }
    .pobochki-modal__panel h2 { font-size: clamp(30px, 8vw, 38px); }
}

/* ============================================================
   SHARED DESIGN SYSTEM — tokens are defined in :root at the top.
   Common layout takes precedence over older per-page spacing.
   ============================================================ */
/* Unified top and bottom spacing for interior pages. */
.catalog-page,
.contacts-page,
body.single-product .single-product-page,
.page-default,
.error-page {
    padding-top: var(--page-top);
    padding-bottom: var(--page-bottom);
}
/* Page headers start at the same horizontal and vertical anchor. */
.catalog-page-heading,
.contacts-heading,
.page-default__heading {
    margin: 0 0 var(--section-gap);
    padding: 0 0 28px;
    border-bottom: var(--archive-heading-rule) solid var(--border);
    min-height: 0;
}
.catalog-page-heading h1,
.contacts-heading h1,
.page-default__heading h1 {
    max-width: 100%;
    margin: 16px 0 0;
    padding: 0;
    font-size: var(--heading-size);
    font-weight: var(--heading-weight);
    line-height: var(--heading-leading);
    letter-spacing: var(--heading-tracking);
    overflow-wrap: break-word;
}
.catalog-page-heading p {
    margin: 20px 0 0;
    max-width: 650px;
    font-size: var(--body-size);
    line-height: 1.6;
    color: var(--archive-filter-muted);
}
.eyebrow {
    display: block;
    margin: 0;
    font-size: var(--eyebrow-font-size);
    font-weight: var(--eyebrow-font-weight);
    line-height: 1.5;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}
/* Archive index: a quiet red registration mark, shared by page headings.
   The marker is inline and does not change the container or heading position. */
.catalog-page-heading .eyebrow::before,
.contacts-heading .eyebrow::before,
.workshop-heading .eyebrow::before,
.page-default__heading .eyebrow::before,
body.home .hero .eyebrow::before {
    content: "";
    display: inline-block;
    width: var(--archive-index-size);
    height: var(--archive-index-size);
    margin-right: var(--archive-index-gap);
    background: var(--archive-mark);
    vertical-align: .08em;
    transform: rotate(-12deg);
}
.page-default__body { max-width: 850px; font-size: var(--body-size); line-height: 1.7; }
.page-default__body > :first-child { margin-top: 0; }
.page-default__body > :last-child { margin-bottom: 0; }
/* Single product retains its useful gallery layout, but uses the same page inset. */
/* The 404 illustration remains intentionally oversized. */
.error-page { min-height: 60vh; }
.pobochki-modal__panel { background: var(--background); color: var(--text); font-family: inherit; }
.pobochki-modal__panel h2 { letter-spacing: var(--heading-tracking); }
@media (max-width: 700px) {
    :root {
        --page-gutter: 16px;
        --page-top: 30px;
        --page-bottom: 56px;
        --section-gap: 28px;
        --heading-size: clamp(36px, 9vw, 54px);
        --body-size: 16px;
    }
    .catalog-page-heading,
    .contacts-heading,
    .page-default__heading { padding-bottom: 22px; }
    .catalog-page-heading h1,
    .contacts-heading h1,
    .page-default__heading h1 { margin-top: 12px; }
}


/* ============================================================
   V2 — CONTACTS AND PRODUCT CONTENT CORRECTIONS
   ============================================================ */

/* Product descriptions should fill the details column. */
body.single-product .single-product-description {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
}
body.single-product .single-product-description > *,
body.single-product .single-product-description p {
    width: 100%;
    max-width: none;
    min-width: 0;
}


/* ============================================================
   V3 — COMMON PAGE RHYTHM
   Conservative alignment pass: no markup, gallery or inquiry changes.
   Edit the shared tokens in SHARED DESIGN SYSTEM above.
   ============================================================ */

/* Keep heading typography and separators consistent on standard pages. */
.catalog-page-heading,
.contacts-heading,
.page-default__heading {
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--border);
}

/* Remove page-specific heading width constraints; the outer container
   defines the alignment instead. */
.catalog-page-heading > div,
.contacts-heading,
.page-default__heading {
    width: 100%;
    max-width: none;
}

/* Shared reading rhythm for text, without touching product descriptions. */
.page-default__body {
    overflow-wrap: break-word;
}

/* ============================================================
   V4 — ALIGNMENT OF HOME, WORKSHOP AND PRODUCT PAGES
   Only layout and typography; no template or commerce changes.
   ============================================================ */

/* Home retains its two-column editorial hero, but its text starts
   at the same vertical page inset as the other page headings. */
.hero {
    padding-top: var(--page-top);
    align-items: start;
}
.hero h1 {
    margin: 16px 0 24px;
    font-size: var(--heading-size);
    line-height: var(--heading-leading);
    letter-spacing: var(--heading-tracking);
}
.hero .eyebrow {
    font-size: 12px;
    line-height: 1.5;
}

/* The product page already starts at the shared inset. Reduce the
   navigation stack before the gallery without hiding navigation. */
body.single-product .product-back-link {
    margin: 0;
}
body.single-product .product-breadcrumbs {
    margin-top: 14px;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .hero h1 {
        margin-top: 12px;
        font-size: var(--heading-size);
        letter-spacing: var(--heading-tracking);
    }
}

/* ============================================================
   V11 — EDITORIAL CATALOG
   Scoped to the shop archive: other pages retain their styling.
   ============================================================ */
:root {
    --catalog-filter-gap: 28px;
    --catalog-card-gap: 12px;
    --catalog-image-hover-scale: 1.025;
}

.catalog-page .catalog-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: var(--catalog-filter-gap);
    row-gap: 12px;
    margin-bottom: 34px;
    padding: 0 0 0;
    border-bottom: 1px solid var(--border);
}
.catalog-page .catalog-filters a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 0 14px;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    transition: color .18s ease, border-color .18s ease;
}
.catalog-page .catalog-filters a:hover {
    background: transparent;
    border-bottom-color: var(--border);
}
.catalog-page .catalog-filters a.is-active {
    background: transparent;
    border-bottom-color: var(--archive-filter-active);
    color: var(--text);
}
.catalog-page .catalog-filters a:not(.is-active) { color: var(--archive-filter-muted); }
.catalog-page .catalog-filters a:not(.is-active):hover { color: var(--text); }
.catalog-page .catalog-filters a:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.catalog-page .catalog-products {
    column-gap: 22px;
    row-gap: 48px;
}
.catalog-page .catalog-products .product-image {
    position: relative;
    border: 0;
    background: var(--surface);
}
.catalog-page .catalog-products .product-photo {
    transition: transform .35s ease, opacity .25s ease;
}
.catalog-page .catalog-products .product-link:hover .product-photo {
    transform: scale(var(--catalog-image-hover-scale));
}
.catalog-page .catalog-products .product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--catalog-card-gap);
    padding: 15px 0 0;
}
.catalog-page .catalog-products .product-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.catalog-page .catalog-products .product-status:not(.is-sold)::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--success);
}
.catalog-page .catalog-products .product-status.is-sold { color: #696864; }
.catalog-page .catalog-products .product-info h3 {
    margin: 0;
    font-size: var(--archive-card-title-size);
    line-height: var(--archive-card-title-leading);
    font-weight: var(--archive-card-title-weight);
    letter-spacing: var(--archive-card-title-tracking);
    overflow-wrap: anywhere;
}
.catalog-page .catalog-products .product-info strong,
.catalog-page .catalog-products .product-info strong .amount {
    font-size: var(--archive-card-price-size);
    line-height: var(--archive-card-price-leading);
    font-weight: var(--archive-card-price-weight);
}
.catalog-page .catalog-products .product-link:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
.catalog-page .catalog-products .product-card.is-sold .product-photo { opacity: .9; }
.catalog-page .catalog-products .product-card.is-sold .product-link:hover .product-photo { opacity: 1; }

@media (max-width: 700px) {
    :root { --catalog-filter-gap: 20px; --catalog-card-gap: 9px; }
    .catalog-page .catalog-filters { row-gap: 4px; margin-bottom: 24px; }
    .catalog-page .catalog-filters a { min-height: 42px; padding: 9px 0 12px; font-size: 13px; }
    .catalog-page .catalog-products { column-gap: 12px; row-gap: 32px; }
    .catalog-page .catalog-products .product-info { padding-top: 12px; }
    .catalog-page .catalog-products .product-info h3 { font-size: var(--archive-card-mobile-title-size); }
    .catalog-page .catalog-products .product-info strong,
    .catalog-page .catalog-products .product-info strong .amount { font-size: var(--archive-card-mobile-price-size); }
}
@media (prefers-reduced-motion: reduce) {
    .catalog-page .catalog-products .product-photo,
    .catalog-page .catalog-filters a { transition: none; }
}

/* ==========================================
   V12 — CATALOG GALLERY GRID
   Only catalog cards; page heading and global geometry untouched.
========================================== */
.catalog-page .products-grid.catalog-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(18px, 2.5vw, 36px);
    row-gap: clamp(38px, 4vw, 64px);
}
.catalog-page .catalog-products .product-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.catalog-page .catalog-products .product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 700px) {
    .catalog-page .products-grid.catalog-products {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 36px;
    }
}

/* ==========================================
   V12.1 — CATALOG HEADER / FILTER SPACING
   Catalog only; shared page geometry stays unchanged.
========================================== */
.catalog-page .catalog-page-heading {
    margin-bottom: 32px;
    padding-bottom: 0;
    border-bottom: 0;
}
.catalog-page .catalog-filters {
    margin-bottom: 24px;
}
@media (max-width: 700px) {
    .catalog-page .catalog-page-heading {
        margin-bottom: 24px;
    }
    .catalog-page .catalog-filters {
        margin-bottom: 20px;
    }
}

/* ============================================================
   V13 — SINGLE PRODUCT editorial polish (scoped)
   ============================================================ */
body.single-product .single-product-layout { gap: clamp(28px, 4vw, 64px); }
body.single-product .single-product-gallery { background: transparent; }
body.single-product .gallery-main { background: var(--surface, #e9e7e1); }
body.single-product .gallery-main-image { aspect-ratio: 1 / 1; object-fit: contain; }
body.single-product .gallery-thumbnails { gap: 10px; margin-top: 10px; }
body.single-product .gallery-thumbnail { border-width: 1px; border-color: transparent; transition: border-color .15s ease, opacity .15s ease; }
body.single-product .gallery-thumbnail.is-active { border-color: var(--text, #222); }
body.single-product .gallery-thumbnail:hover { border-color: #777; }
body.single-product .single-product-category { display: block; margin: 0 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .045em; }
body.single-product .single-product-details h1 { margin: 0 0 26px; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.07; letter-spacing: -.035em; }
body.single-product .single-product-price { margin-bottom: 12px; font-size: clamp(27px, 2.6vw, 34px); line-height: 1.2; }
body.single-product .single-product-stock { margin-bottom: 30px; font-size: 13px; }
body.single-product .stock-dot { width: 7px; height: 7px; flex-basis: 7px; }
body.single-product .single-product-description { margin-bottom: 30px; font-size: 16px; line-height: 1.65; }
body.single-product .single-product-description p:last-child { margin-bottom: 0; }
body.single-product .product-inquiry { border-top-width: 1px; padding-top: 22px; }
body.single-product .product-inquiry p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
@media (max-width: 700px) { body.single-product .single-product-layout { gap: 28px; } body.single-product .single-product-details h1 { font-size: clamp(34px, 8vw, 48px); } }


/* ============================================================
   V14 — HOME, SHARED HEADER AND FOOTER
   Keep page container and heading alignment unchanged.
   ============================================================ */
:root {
    --v14-ink: #222222;
    --v14-line: rgba(34,34,34,.65);
    --v14-motion: 180ms ease;
}
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { min-height: 76px; }
.site-nav a {
    position: relative;
    display: inline-block;
    padding: 9px 0;
    text-decoration: none;
    transition: opacity var(--v14-motion);
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 4px;
    height: 1px; background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--v14-motion);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: none; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-logo:focus-visible, .site-nav a:focus-visible, .footer-v14 a:focus-visible {
    outline: var(--archive-focus-width) solid var(--accent);
    outline-offset: var(--archive-focus-offset);
}

/* Home only: same top inset as the rest of the site. */
body.home .hero {
    min-height: 0;
    grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr);
    gap: clamp(28px, 5vw, 72px);
    padding-top: var(--page-top);
    padding-bottom: clamp(52px, 6vw, 90px);
}
body.home .hero-content { justify-content: center; }
body.home .hero h1 {
    margin: 18px 0 22px;
    max-width: 760px;
    font-size: clamp(42px, 5.3vw, 76px);
    line-height: 1.035;
}
body.home .hero p {
    margin-bottom: 26px;
    max-width: 470px;
    font-size: clamp(16px, 1.5vw, 19px);
}
body.home .hero-visual { min-height: 0; }
body.home .home-featured-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}
body.home .home-featured-photo {
    width: 100%; height: 100%; object-fit: cover;
    display: block; transition: transform 350ms ease;
}
body.home .home-featured-image:hover .home-featured-photo { transform: scale(1.025); }
body.home .home-featured-caption {
    border-top: 1px solid rgba(34,34,34,.28);
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 13px 16px;
    background: rgba(245,244,240,.94);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .055em;
}
body.home .hero-placeholder {
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-width: 1px;
}
body.home .catalog-section { padding-top: 0; padding-bottom: clamp(64px,7vw,100px); }
body.home .section-heading { border-bottom-width: 1px; }
body.home .home-products-layout.is-single {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: clamp(24px,3vw,44px);
    align-items: stretch;
}
body.home .home-products-layout .products-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: clamp(20px,2.5vw,36px);
}
body.home .home-products-layout.is-single .products-grid { grid-template-columns: minmax(0,1fr); }
body.home .product-image { border: 0; }
body.home .product-info { padding: 12px 0 0; }
body.home .product-info h3 { margin: 6px 0; font-size: var(--archive-card-title-size); line-height: var(--archive-card-title-leading); font-weight: var(--archive-card-title-weight); letter-spacing: var(--archive-card-title-tracking); overflow-wrap: anywhere; }
body.home .product-info strong,
body.home .product-info strong .amount { font-size: var(--archive-card-price-size); font-weight: var(--archive-card-price-weight); line-height: var(--archive-card-price-leading); }
body.home .home-one-product-note {
    border-top: 1px solid var(--border);
    padding: clamp(20px,3vw,40px) 0;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
body.home .home-one-product-note p {
    max-width: 440px; margin: 18px 0 26px;
    font-size: clamp(22px,2.5vw,36px);
    line-height: 1.18; font-weight: 700; letter-spacing: -.035em;
}
body.home .home-one-product-note a,
body.home .home-about-link {
    display: inline-block;
    font-weight: 700;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}
body.home .about-section { border-top-width: 1px; }
body.home .about-inner {
    gap: clamp(30px,5vw,72px);
    padding-top: clamp(52px,6vw,84px);
    padding-bottom: clamp(52px,6vw,84px);
}
body.home .about-photo { min-height: 310px; }
body.home .about-content h2 { font-size: clamp(34px,3.5vw,48px); }
body.home .about-content p { font-size: clamp(16px,1.5vw,19px); }
body.home .home-about-link { margin-top: 12px; }

/* One shared footer for every template. */
.site-footer { background: #222; color: #fff; }
.footer-v14 { padding-top: clamp(42px,5vw,72px); }
.footer-v14-top {
    display: flex; align-items: end; justify-content: space-between;
    gap: 28px; padding-bottom: clamp(38px,5vw,64px);
}
.footer-v14-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #bdbdbd; }
.footer-v14-top h2 {
    margin: 12px 0 8px;
    font-size: clamp(38px,5vw,68px);
    line-height: 1.04; letter-spacing: -.05em;
}
.footer-v14-top p { margin: 0; color: #ccc; font-size: 17px; }
.footer-v14-contact {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 17px 23px; min-height: 52px;
    background: var(--accent); color: #171717;
    border: 1px solid #171717;
    font-size: 13px; font-weight: 800;
    text-decoration: none; text-align: center;
    transition: background var(--v14-motion), transform var(--v14-motion);
}
.footer-v14-contact:hover { background: #e5df00; text-decoration: none; }
.footer-v14-bottom {
    border-top: 1px solid #666;
    display: flex; align-items: center; justify-content: space-between;
    gap: 22px; padding: 25px 0 32px;
}
.footer-v14-brand { font-size: 18px; font-weight: 900; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.footer-v14-brand span { display: inline-block; color: var(--archive-mark); transform: rotate(-12deg); }
.footer-v14-nav { display: flex; gap: clamp(14px,2.5vw,32px); flex-wrap: wrap; }
.footer-v14-nav a { font-size: 13px; text-decoration: none; }
.footer-v14-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-v14-year { color: #bbb; font-size: 13px; white-space: nowrap; }
@media (max-width: 900px) {
    body.home .hero { grid-template-columns: 1fr 1fr; gap: 24px; }
    body.home .hero h1 { font-size: clamp(38px,5vw,58px); }
}
@media (max-width: 700px) {
    .header-inner { min-height: 0; }
    .site-nav { gap: 18px; }
    body.home .hero { grid-template-columns: minmax(0,1fr); padding-top: var(--page-top); }
    body.home .hero h1 { font-size: clamp(40px,9vw,62px); }
    body.home .hero-visual { width: 100%; }
    body.home .home-products-layout.is-single { grid-template-columns: minmax(0,1fr); }
    body.home .home-products-layout .products-grid { grid-template-columns: minmax(0,1fr); }
    body.home .product-info h3 { font-size: var(--archive-card-mobile-title-size); }
    body.home .product-info strong, body.home .product-info strong .amount { font-size: var(--archive-card-mobile-price-size); }
    body.home .home-one-product-note { padding-top: 24px; }
    body.home .about-inner { grid-template-columns: minmax(0,1fr); }
    .footer-v14-top { flex-direction: column; align-items: flex-start; }
    .footer-v14-bottom { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .site-nav a::after, body.home .home-featured-photo, .footer-v14-contact { transition: none; }
}


/* ============================================================
   V14.1 — home section rhythm, workshop navigation and compact footer
   Scoped to home where possible. Shared footer intentionally global.
   ============================================================ */
body.home .hero { padding-bottom: clamp(38px, 4vw, 64px); }
body.home .catalog-section {
    padding-bottom: clamp(40px, 4.5vw, 64px);
}
body.home .section-heading { margin-bottom: clamp(20px, 2.2vw, 30px); }
body.home .home-one-product-note { border-top: 0; padding: 16px 0 20px; }
body.home .home-one-product-note p { margin: 12px 0 20px; }

/* Entire navigation panel is one accessible link; no JS required. */
body.home .home-workshop-section {
    background: var(--surface, var(--ui-warm-surface));
    border-top: 1px solid var(--border, var(--ui-ink));
}
body.home .home-workshop-link {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: clamp(36px, 4.5vw, 62px) 0 clamp(40px, 4.8vw, 68px);
    color: var(--text, var(--ui-ink));
    text-decoration: none;
}
body.home .home-workshop-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .065em;
}
body.home .home-workshop-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: clamp(20px, 3vw, 38px) 0;
    border-top: 1px solid var(--border, var(--ui-ink));
    border-bottom: 1px solid var(--border, var(--ui-ink));
}
body.home .home-workshop-title {
    display: block;
    font-size: clamp(36px, 5.2vw, 74px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.055em;
    transition: transform 200ms ease;
}
body.home .home-workshop-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: clamp(58px, 6.3vw, 88px);
    height: clamp(58px, 6.3vw, 88px);
    background: var(--accent, #f2e900);
    border: 1px solid var(--border, var(--ui-ink));
    font-family: Arial, sans-serif;
    font-size: clamp(30px, 3.5vw, 46px);
    line-height: 1;
    transition: transform 200ms ease, background 200ms ease;
}
body.home .home-workshop-subtitle {
    display: block;
    margin-top: 20px;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.5;
}
body.home .home-workshop-link:hover .home-workshop-arrow { background: #e6df00; }
body.home .home-workshop-link:hover .home-workshop-title { transform: translateX(4px); }
body.home .home-workshop-link:focus-visible { outline: 2px solid var(--text, #222); outline-offset: -2px; }

/* The footer is intentionally shorter on ALL pages. */
.footer-v14 { padding-top: clamp(28px, 3.2vw, 46px); }
.footer-v14-top { padding-bottom: clamp(26px, 3vw, 42px); gap: 20px; }
.footer-v14-top h2 { margin: 8px 0 6px; font-size: clamp(36px, 4.2vw, 58px); }
.footer-v14-top p { font-size: 16px; }
.footer-v14-bottom { padding: 19px 0 22px; gap: 16px; }

@media (max-width: 700px) {
    body.home .hero { padding-bottom: 34px; }
    body.home .catalog-section { padding-bottom: 40px; }
    body.home .home-one-product-note { padding: 12px 0 8px; }
    body.home .home-workshop-link { padding: 34px 0 40px; }
    body.home .home-workshop-meta { font-size: 10px; }
    body.home .home-workshop-main { gap: 12px; }
    body.home .home-workshop-title { font-size: clamp(34px, 8vw, 50px); }
    body.home .home-workshop-arrow { width: 54px; height: 54px; font-size: 30px; }
    .footer-v14 { padding-top: 30px; }
    .footer-v14-top { padding-bottom: 26px; gap: 22px; }
    .footer-v14-bottom { padding: 18px 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
    body.home .home-workshop-title,
    body.home .home-workshop-arrow { transition: none; }
}

/* V14.2 — simplify workshop navigation and truly compact footer */
body.home .home-workshop-section { border-top: 0; }
body.home .home-workshop-link {
    padding-top: clamp(30px, 3.5vw, 48px);
    padding-bottom: clamp(32px, 3.8vw, 52px);
}
body.home .home-workshop-main {
    border-top: 0;
    border-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}
body.home .home-workshop-subtitle {
    border-top: 0;
    margin-top: 10px;
    padding-top: 0;
}
.footer-v14 { padding-top: clamp(22px, 2.4vw, 32px); }
.footer-v14-top { padding-bottom: clamp(18px, 2.3vw, 28px); }
.footer-v14-top h2 { margin: 0 0 5px; font-size: clamp(34px, 3.7vw, 52px); }
.footer-v14-top p { font-size: 15px; }
.footer-v14-bottom { padding: 15px 0 18px; }
@media (max-width:700px) {
    body.home .home-workshop-link { padding-top: 30px; padding-bottom: 34px; }
    .footer-v14 { padding-top: 26px; }
    .footer-v14-top { padding-bottom: 22px; }
    .footer-v14-bottom { padding: 17px 0 22px; }
}

/* V14.3: one separator, clear primary/secondary action hierarchy */
body.home .home-workshop-section { border-top: 1px solid #252525; }
body.home .home-workshop-arrow { background: transparent; border: 1px solid #252525; color: #222; }
body.home .home-workshop-arrow svg { display: block; width: 45%; height: 45%; min-width: 27px; min-height: 27px; }
body.home .home-workshop-link:hover .home-workshop-arrow { background: #222; color: #fff; transform: translate(3px,-3px); }
.footer-v14-contact { background: transparent; color: #fff; border: 1px solid #fff; }
.footer-v14-contact:hover { background: #fff; color: #222; transform: translateY(-2px); }
.footer-v14-contact:focus-visible { outline: 2px solid #f2e900; outline-offset: 4px; }

/* V14.4 — sold items: unmistakable badge and restrained dimming.
   Uses the existing .is-sold class from archive-product.php. */
.catalog-page .catalog-products .product-card.is-sold .product-image {
    position: relative;
    isolation: isolate;
}
.catalog-page .catalog-products .product-card.is-sold .product-photo {
    opacity: .68;
    filter: saturate(.72);
}
.catalog-page .catalog-products .product-card.is-sold .product-link:hover .product-photo {
    opacity: .76;
    filter: saturate(.82);
}
.catalog-page .catalog-products .product-card.is-sold .product-sold-badge {
    display: none;
}
.catalog-page .catalog-products .product-card.is-sold .product-image::after {
    content: "ПРОДАНО";
    position: absolute;
    z-index: 3;
    top: 16px;
    left: 16px;
    padding: 10px 14px;
    background: var(--ui-ink);
    color: var(--ui-white);
    border: 1px solid var(--ui-ink);
    font-size: 13px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: .055em;
    pointer-events: none;
}
@media (max-width: 700px) {
    .catalog-page .catalog-products .product-card.is-sold .product-image::after {
        top: 10px;
        left: 10px;
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* v14.5 — stronger visual separation for sold work */
.catalog-page .catalog-products .product-card.is-sold .product-photo {
    opacity: .72;
    filter: grayscale(.65) saturate(.35) brightness(1.06);
}
.catalog-page .catalog-products .product-card.is-sold .product-link:hover .product-photo {
    opacity: .78;
    filter: grayscale(.55) saturate(.45) brightness(1.04);
}


/* ============================================================
   V14.6 — compact home-page vertical rhythm
   Only home-page section spacing; interior pages and footer unchanged.
   ============================================================ */
body.home .hero {
    padding-bottom: 20px;
}
body.home .catalog-section {
    padding-bottom: clamp(28px, 3.4vw, 48px);
}
@media (max-width: 700px) {
    body.home .hero {
        padding-bottom: 18px;
    }
    body.home .catalog-section {
        padding-bottom: 30px;
    }
}


/* V14.7 — mobile-only corrections verified on iPhone */
@media (max-width: 700px) {
    /* Contacts: restore the same inset as other interior pages. */
    .contacts-page .contacts-inner {
        width: calc(100% - 32px);
        max-width: var(--page-width);
        margin-inline: auto;
    }
    .contacts-page { min-height: 0; }
    .contacts-page .contacts-heading { margin-bottom: 16px; }
    .contacts-page .contacts-item { padding: 20px 0; }

    /* Workshop: tighten heading-to-first-section rhythm. */
    .workshop-page .workshop-heading { margin-bottom: 0; padding-bottom: 18px; }
    .workshop-page .workshop-section:first-child { padding-top: 20px; }
    .workshop-page .workshop-intro:first-child { padding-top: 20px; }

    /* Home: keep the workshop link prominent, not oversized. */
    body.home .home-workshop-link { padding-top: 22px; padding-bottom: 24px; }
    body.home .home-workshop-main { margin-top: 0; gap: 12px; }
    body.home .home-workshop-title { font-size: clamp(30px, 7vw, 38px); line-height: 1.07; }
    body.home .home-workshop-arrow { width: 46px; height: 46px; }
    body.home .home-workshop-arrow svg { min-width: 22px; min-height: 22px; }
    body.home .home-workshop-subtitle { margin-top: 8px; font-size: 14px; }

    /* Shared footer: reduce bulk while preserving touch targets. */
    .footer-v14 { padding-top: 22px; }
    .footer-v14-top { gap: 16px; padding-bottom: 20px; }
    .footer-v14-top h2 { font-size: clamp(30px, 7.5vw, 38px); margin-bottom: 4px; }
    .footer-v14-top p { font-size: 14px; }
    .footer-v14-contact { min-height: 44px; padding: 11px 16px; font-size: 12px; }
    .footer-v14-bottom { gap: 12px; padding-top: 16px; padding-bottom: 18px; }
    .footer-v14-brand { font-size: 17px; }
    .footer-v14-nav { gap: 12px; }
    .footer-v14-nav a { font-size: 12px; }
    .footer-v14-year { font-size: 12px; }
}

/* V14.8 — compact mobile inquiry sheet; desktop unchanged */
@media (max-width: 600px) {
  .pobochki-modal { padding: 0; align-items: stretch; justify-content: stretch; }
  .pobochki-modal__panel {
    width: 100%; max-width: none; height: 100%; max-height: none;
    height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: none;
  }
  .pobochki-modal__close { top: max(15px, env(safe-area-inset-top)); right: 14px; min-width: 44px; min-height: 44px; }
  .pobochki-modal__eyebrow { margin: 0 48px 8px 0; font-size: 11px; }
  .pobochki-modal__panel h2 { font-size: clamp(28px, 8vw, 34px); margin: 0 38px 14px 0; line-height: 1.12; }
  .pobochki-modal__product { gap: 5px 12px; padding-bottom: 14px; margin-bottom: 18px; font-size: 14px; }
  .pobochki-modal__price { font-size: 19px; }
  .pobochki-modal__price-label { font-size: 11px; }
  #pobochki-inquiry-form { gap: 13px; }
  #pobochki-inquiry-form .pobochki-form-row { gap: 13px; }
  #pobochki-inquiry-form > label:not(.pobochki-consent),
  #pobochki-inquiry-form .pobochki-form-row > label { gap: 5px; font-size: 13px; }
  #pobochki-inquiry-form input:not([type="checkbox"]),
  #pobochki-inquiry-form textarea { min-height: 44px; padding: 9px 11px; font-size: 16px; }
  #pobochki-inquiry-form textarea { min-height: 68px; }
  #pobochki-inquiry-form .pobochki-consent { gap: 10px; margin-top: 2px; font-size: 12px; line-height: 1.45; }
  #pobochki-inquiry-form .pobochki-consent input[type="checkbox"] { flex-basis: 20px; width: 20px; height: 20px; }
  #pobochki-inquiry-form .pobochki-submit { min-height: 48px; padding: 11px 14px; font-size: 13px; }
}


/* V15 — catalog navigation, workshop composition, social cards */
.catalog-page .catalog-filters {
    border-bottom: 0;
    gap: 8px 28px;
    margin-bottom: 28px;
}
.catalog-page .catalog-filters a {
    border: 0;
    padding: 10px 0 12px;
    text-decoration: none;
    transition: color .2s ease;
}
.catalog-page .catalog-filters a::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .22s ease;
    pointer-events: none;
}
.catalog-page .catalog-filters a:hover::after,
.catalog-page .catalog-filters a:focus-visible::after,
.catalog-page .catalog-filters a.is-active::after { transform: scaleX(1); }
.catalog-page .catalog-filters a:hover,
.catalog-page .catalog-filters a.is-active { border-bottom-color: transparent; }

/* Override older duplicated workshop layout rules, including workshop.css. */
.workshop-page .workshop-section {
    grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
    column-gap: clamp(24px, 3vw, 48px);
    padding-top: 30px;
    padding-bottom: 34px;
}
.workshop-page .workshop-section-body { max-width: 760px; }
.workshop-page .workshop-section-title h2 { max-width: 100%; }

/* Contacts: two fully clickable cards, no inherited row/list dividers.
   Component palette is kept local: these tokens preserve the approved colors. */
.contacts-page {
    --contacts-card-surface: #eae9e5;
    --contacts-card-hover: #e2e1dd;
    --contacts-card-hover-border: #888;
    --contacts-icon-telegram: #229ed9;
    --contacts-icon-instagram: #a93675;
    --contacts-arrow-border: #252525;
}

.contacts-page { min-height: 0; }
.contacts-page .contacts-heading { margin-bottom: 28px; }
.contacts-page .contacts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    border: 0;
    margin: 0;
    padding: 0;
}
.contacts-page .contacts-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 260px;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--border);
    background: var(--contacts-card-surface);
    color: var(--text);
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.contacts-page .contacts-item:hover,
.contacts-page .contacts-item:focus-visible {
    background: var(--contacts-card-hover);
    border-color: var(--contacts-card-hover-border);
    transform: translateY(-3px);
}
.contacts-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; }
.contacts-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 12px; color: #fff; }
.contacts-card__icon svg { width: 32px; height: 32px; }
.contacts-card__icon--telegram { background: var(--contacts-icon-telegram); }
.contacts-card__icon--instagram { background: var(--contacts-icon-instagram); }
.contacts-card__arrow { font-size: 32px; line-height: 1; transition: transform .2s ease; }
.contacts-item:hover .contacts-card__arrow { transform: translate(3px, -3px); }
.contacts-page .contacts-name { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.1; }
.contacts-page .contacts-handle { grid-column: auto; justify-self: auto; text-align: left; font-size: 16px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
    .workshop-page .workshop-section { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 28px 0 32px; }
    .contacts-page .contacts-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .contacts-page .contacts-item { min-height: 210px; }
}
@media (max-width: 700px) {
    .catalog-page .catalog-filters a { border: 0; padding: 10px 0 12px; }
    .contacts-page .contacts-item { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .catalog-page .catalog-filters a,
    .catalog-page .catalog-filters a::after,
    .contacts-page .contacts-item,
    .contacts-card__arrow { transition: none; }
}


/* V16: compact empty-category state with a clear return action. */
.catalog-page .catalog-empty-state {
    margin-top: clamp(30px, 4vw, 58px);
    padding: clamp(28px, 4vw, 48px);
    background: #eae9e5;
    border: 1px solid #d7d5d0;
    max-width: 780px;
}
.catalog-page .catalog-empty-state h2 {
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.1;
    margin: 0 0 14px;
}
.catalog-page .catalog-empty-state p {
    max-width: 520px;
    margin: 0 0 26px;
    line-height: 1.5;
}
.catalog-page .catalog-empty-state .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    background: var(--ui-ink);
    border: 1px solid var(--ui-ink);
    color: var(--ui-white);
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.catalog-page .catalog-empty-state .button:hover,
.catalog-page .catalog-empty-state .button:focus-visible {
    background: var(--ui-white);
    color: var(--ui-ink);
    transform: translateY(-2px);
}
@media (max-width: 700px) {
    .catalog-page .catalog-empty-state { margin-top: 24px; padding: 24px 20px; }
    .catalog-page .catalog-empty-state .button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .catalog-page .catalog-empty-state .button { transition: none; }
}

/* V17: align catalog empty-state primary CTA with site-wide yellow CTA. */
.catalog-page .catalog-empty-state .button.button-primary {
    background: var(--accent);
    border: 2px solid var(--text);
    color: var(--text);
}
.catalog-page .catalog-empty-state .button.button-primary:hover,
.catalog-page .catalog-empty-state .button.button-primary:focus-visible {
    background: var(--ui-white);
    border-color: var(--text);
    color: var(--text);
}
/* AJAX navigation: only catalog content changes, with a subtle transition. */
.catalog-page .catalog-products,
.catalog-page .catalog-empty-state,
.catalog-page .catalog-pagination { transition: opacity 180ms ease; }
.catalog-page.is-loading .catalog-products,
.catalog-page.is-loading .catalog-empty-state,
.catalog-page.is-loading .catalog-pagination { opacity: .45; pointer-events: none; }
.catalog-page.is-entering .catalog-products,
.catalog-page.is-entering .catalog-empty-state,
.catalog-page.is-entering .catalog-pagination { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .catalog-page .catalog-products, .catalog-page .catalog-empty-state,
    .catalog-page .catalog-pagination { transition: none; }
}

/* V18 — mobile-first product journey. Desktop layout and inquiry logic unchanged. */
@media (max-width: 700px) {
    /* Keep one compact return link instead of two navigation rows. */
    body.single-product .product-breadcrumbs { display: none; }
    body.single-product .single-product-page { padding-top: 18px; padding-bottom: 38px; }
    body.single-product .product-back-link { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 12px; }
    body.single-product .single-product-layout { gap: 20px; }
    body.single-product .gallery-thumbnails { gap: 8px; margin-top: 8px; }
    body.single-product .gallery-thumbnail { width: 64px; height: 64px; }

    body.single-product .single-product-details { display: flex; flex-direction: column; align-items: stretch; }
    body.single-product .single-product-category { margin-bottom: 9px; font-size: 11px; }
    body.single-product .single-product-details h1 { margin: 0 0 13px; font-size: clamp(30px, 8vw, 40px); line-height: 1.08; }
    body.single-product .single-product-price { margin: 0 0 7px; font-size: 29px; line-height: 1.15; }
    body.single-product .single-product-stock { margin: 0 0 18px; font-size: 13px; }

    /* Sold products retain their original explanation and never show a CTA. */
    body.single-product .product-inquiry { order: 1; display: flex; flex-direction: column; border-top: 0; padding-top: 0; margin-bottom: 24px; }
    body.single-product .product-inquiry .button.button-primary { order: -1; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 13px 16px; text-align: center; }
    body.single-product .product-inquiry p { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #66645f; }
    body.single-product .single-product-description { order: 2; border-top: 1px solid var(--border); padding-top: 19px; margin: 0; font-size: 15px; line-height: 1.65; }
    body.single-product .single-product-description p { margin-bottom: 12px; }

    .catalog-page .products-grid.catalog-products { row-gap: 28px; }
    .catalog-page .catalog-products .product-info { padding-top: 10px; }
    .catalog-page .catalog-products .product-info h3 { font-size: 17px; line-height: 1.35; }
}

@media (max-width: 600px) {
    /* Inputs stay at 16px to avoid iOS focus zoom. The sheet itself scrolls above the keyboard. */
    .pobochki-modal__panel { min-height: 0; overscroll-behavior: contain; scroll-padding-bottom: 28px; }
    #pobochki-inquiry-form .pobochki-consent { font-size: 13px; line-height: 1.5; }
    #pobochki-inquiry-form .pobochki-submit { min-height: 54px; font-size: 14px; }
    .pobochki-form-note { font-size: 13px; line-height: 1.55; }
    .pobochki-form-message { font-size: 14px; line-height: 1.5; }
}

/* V19 — unique product description directly after the primary inquiry CTA. */
body.single-product .single-product-details { display: flex; flex-direction: column; align-items: stretch; }
body.single-product .single-product-details .product-inquiry { order: 1; }
body.single-product .single-product-details .single-product-description { order: 2; }
@media (max-width: 700px) {
    body.single-product .product-inquiry { margin-bottom: 18px; }
    body.single-product .single-product-description { padding-top: 16px; }
}

/* V21: contextual featured-work caption, including native WooCommerce sale prices. */
body.home .home-featured-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 14px;
}
body.home .home-featured-sale-price {
    font-size: 14px;
    letter-spacing: 0;
    white-space: nowrap;
}
body.home .home-featured-sale-price del { opacity: .6; margin-right: 6px; }
body.home .home-featured-sale-price ins { text-decoration: none; }
body.home .home-featured-archive-status { opacity: .7; }
@media (max-width: 700px) {
    .site-nav { column-gap: 16px; row-gap: 5px; }
    .site-nav a { white-space: nowrap; }
}

/* V22 — restrained sale presentation, consistent across the site. */
.pobochki-sale-badge {
    position: absolute; z-index: 3; top: 12px; left: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 32px; padding: 5px 11px;
    background: #b8322b; color: var(--ui-white); border: 1px solid #8c251f;
    font-size: 13px; line-height: 1.1; font-weight: 900; letter-spacing: .015em;
    pointer-events: none;
}
.product-image, body.single-product .gallery-main { position: relative; }
.pobochki-price del { color: #777; opacity: 1; font-size: .68em; font-weight: 600; margin-right: 8px; }
.pobochki-price ins { text-decoration: none; color: inherit; font-weight: 900; }
.pobochki-price.is-discounted { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; }
.pobochki-price.is-discounted ins { order: -1; }
body.home .home-featured-work { display: flex; flex-direction: column; gap: 0; }
body.home .home-featured-heading { padding-bottom: 14px; }
body.home .home-featured-heading .eyebrow { font-size: 10px; }
body.home .home-featured-heading h2 { margin: 6px 0 0; font-size: clamp(24px, 2.7vw, 35px); line-height: 1.12; letter-spacing: -.04em; }
body.home .home-featured-image { overflow: hidden; }
body.home .home-featured-details { padding-top: 15px; }
body.home .home-featured-details h3 { margin: 0 0 9px; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.3; }
body.home .home-featured-details .pobochki-price { font-size: clamp(23px, 2.3vw, 30px); font-weight: 900; }
body.home .home-featured-button { margin-top: 15px; padding: 13px 20px; }
body.home .home-featured-archive-status { font-size: 12px; font-weight: 800; }
body.single-product .single-product-price.pobochki-price.is-discounted { display: flex; }
@media (max-width: 700px) {
    .pobochki-sale-badge { top: 9px; left: 9px; min-height: 29px; padding: 5px 9px; font-size: 12px; }
    body.home .home-featured-heading { padding-bottom: 11px; }
    body.home .home-featured-heading h2 { font-size: 26px; }
    body.home .home-featured-button { width: 100%; }
}

/* V23: one accessible link for the entire featured product, without a second CTA. */
body.home .home-featured-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
body.home .home-featured-link .home-featured-image { display: block; }
body.home .home-featured-link .home-featured-details { display: block; }
body.home .home-featured-name-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
body.home .home-featured-name {
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 800;
    line-height: 1.3;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 180ms ease;
}
body.home .home-featured-arrow {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    transition: transform 180ms ease;
}
body.home .home-featured-link:hover .home-featured-photo,
body.home .home-featured-link:focus-visible .home-featured-photo { transform: scale(1.025); }
body.home .home-featured-link:hover .home-featured-name,
body.home .home-featured-link:focus-visible .home-featured-name { text-decoration-color: currentColor; }
body.home .home-featured-link:hover .home-featured-arrow,
body.home .home-featured-link:focus-visible .home-featured-arrow { transform: translate(2px, -2px); }
body.home .home-featured-link:focus-visible { outline: 2px solid #111; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
    body.home .home-featured-link .home-featured-photo,
    body.home .home-featured-name,
    body.home .home-featured-arrow { transition: none; }
}

/* Shared outline for the featured-work and contacts arrows. */
:root { --archive-arrow-border: #252525; }
/* V24: consistent, font-independent external-link arrows (featured + contacts).
   Same SVG and monochrome interaction as the workshop link. */
body.home .home-featured-arrow,
.contacts-page .contacts-card__arrow {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: 1px solid var(--archive-arrow-border);
    background: transparent;
    color: var(--ui-ink);
    font-size: inherit;
    line-height: 1;
    transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
body.home .home-featured-arrow svg,
.contacts-page .contacts-card__arrow svg {
    display: block;
    width: 54%;
    height: 54%;
}
body.home .home-featured-link:hover .home-featured-arrow,
body.home .home-featured-link:focus-visible .home-featured-arrow,
.contacts-page .contacts-item:hover .contacts-card__arrow,
.contacts-page .contacts-item:focus-visible .contacts-card__arrow {
    background: var(--ui-ink);
    color: var(--ui-white);
    transform: translate(2px, -2px);
}
body.home .home-featured-link:active .home-featured-arrow,
.contacts-page .contacts-item:active .contacts-card__arrow {
    background: var(--ui-ink);
    color: var(--ui-white);
    transform: translate(1px, -1px);
}
@media (max-width: 700px) {
    body.home .home-featured-arrow,
    .contacts-page .contacts-card__arrow { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    body.home .home-featured-arrow,
    .contacts-page .contacts-card__arrow { transition: none; }
}

/* ============================================================
   ITERATION 05 — PRODUCT CARDS / ARCHIVE DETAIL
   Scoped to catalog and home. No grid or product image changes.
   ============================================================ */
body.home .products-grid .product-info,
.catalog-page .catalog-products .product-info {
    border-top: 1px solid var(--archive-card-rule);
    margin-top: var(--archive-card-info-gap);
    padding-top: 12px;
}
/* A compact information hierarchy: availability, title, price. */
body.home .products-grid .product-info h3,
.catalog-page .catalog-products .product-info h3 {
    margin-top: 9px;
    margin-bottom: 11px;
}
body.home .products-grid .product-info .product-status,
.catalog-page .catalog-products .product-info .product-status {
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: var(--archive-label-tracking);
}
body.home .products-grid .product-link:focus-visible,
.catalog-page .catalog-products .product-link:focus-visible {
    outline: var(--archive-focus-width) solid var(--archive-card-focus);
    outline-offset: var(--archive-focus-offset);
}
/* The existing sold state remains dominant and legible. */
.catalog-page .catalog-products .product-card.is-sold .product-info {
    border-top-color: #9c9b96;
}
@media (max-width: 700px) {
    :root { --archive-card-info-gap: 10px; }
    body.home .products-grid .product-info,
    .catalog-page .catalog-products .product-info { padding-top: 10px; }
    body.home .products-grid .product-info h3,
    .catalog-page .catalog-products .product-info h3 { margin-top: 7px; margin-bottom: 9px; }
}

/* V26 — Product separator: consistent desktop/mobile placement.
   The divider belongs to the description, below the inquiry CTA. */
body.single-product .single-product-details .product-inquiry {
    border-top: 0;
    padding-top: 0;
}
body.single-product .single-product-details .single-product-description {
    border-top: 1px solid var(--border, #ccc);
    padding-top: 19px;
}

/* ITERATION 07 — Desktop spacing between inquiry button and description rule.
   The mobile layout already has the intended spacing; leave it unchanged. */
@media (min-width: 701px) {
    body.single-product .single-product-details .product-inquiry {
        margin-bottom: 22px;
    }
}


/* ============================================================
   ITERATION 09 — HOME / EDITORIAL SECTION HIERARCHY
   Keep layout, section spacing and card geometry unchanged.
   ============================================================ */
:root {
    --home-section-caption-color: #686868;
    --home-section-rule-color: #4b4b4b;
    --home-section-heading-tracking: -.045em;
}
/* The main stock heading leads; the explanatory line is supporting copy. */
body.home .catalog-section .section-heading {
    border-bottom-color: var(--home-section-rule-color);
}
body.home .catalog-section .section-heading h2 {
    font-weight: 850;
    letter-spacing: var(--home-section-heading-tracking);
    text-wrap: balance;
}
body.home .catalog-section .section-heading > span {
    color: var(--home-section-caption-color);
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: .01em;
    text-align: right;
    max-width: 260px;
}
/* Featured-work heading uses the same editorial rhythm. */
body.home .home-featured-heading h2 {
    font-weight: 850;
    letter-spacing: var(--home-section-heading-tracking);
    text-wrap: balance;
}
/* Keep the small section labels consistently quiet. */
body.home .home-featured-heading .eyebrow {
    letter-spacing: var(--eyebrow-tracking);
}
@media (max-width: 700px) {
    /* Existing mobile stacking remains in control. */
    body.home .catalog-section .section-heading > span {
        max-width: none;
        text-align: left;
        font-size: 12px;
    }
}

/* ITERATION 20 — Motion accessibility.
   Keep hover/focus styling, but remove remaining decorative transitions
   when the visitor requests reduced motion in OS/browser settings.
   No changes to ordinary motion, layout, colors, or typography. */
@media (prefers-reduced-motion: reduce) {
    .catalog-page .catalog-filters a::after,
    .catalog-page .catalog-products .product-photo,
    body.single-product .gallery-thumbnail,
    #pobochki-inquiry-form .pobochki-submit,
    .error-page__button,
    .error-page__home,
    .contacts-handle,
    .contacts-page .contacts-card__arrow {
        transition: none;
    }
}

/* V24 — availability switch: independent of category selection. */
.catalog-availability {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: -10px 0 30px;
    font-size: 13px;
}
.catalog-availability__label { color: var(--muted, #777); font-weight: 600; }
.catalog-availability__option {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: background-color .2s ease;
}
.catalog-availability__option:hover { background: #e3e0d8; }
.catalog-availability__option.is-active { background: var(--accent); }
.catalog-availability__option:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 600px) {
    .catalog-availability { gap: 8px; margin-top: -12px; }
    .catalog-availability__label { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .catalog-availability__option { transition: none; }
}

/* ITERATION 26 — product gallery: original proportions and image lightbox. */
body.single-product .gallery-main {
    background: transparent;
    overflow: visible;
    cursor: zoom-in;
    position: relative;
}
body.single-product .gallery-main-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(72vh, 680px);
    margin-inline: auto;
    aspect-ratio: auto;
    object-fit: contain;
}
body.single-product .gallery-main:focus-visible {
    outline: 3px solid var(--text, #222);
    outline-offset: 3px;
}
body.single-product .gallery-main::after {
    content: 'УВЕЛИЧИТЬ ↗';
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 10px;
    background: rgba(25, 25, 25, .88);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    pointer-events: none;
}
html { scrollbar-gutter: stable; }
body.pobochki-lightbox-open { overflow: hidden; }
.pobochki-lightbox[hidden] { display: none !important; }
.pobochki-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(13, 14, 15, .96);
    color: white;
    padding: 55px 65px;
}
.pobochki-lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
}
.pobochki-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 125px);
    width: auto;
    height: auto;
    object-fit: contain;
}
.pobochki-lightbox__counter { margin-top: 14px; font-size: 12px; color: #ddd; }
.pobochki-lightbox button {
    position: absolute;
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(30,30,30,.65);
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}
.pobochki-lightbox button:hover { background: #444; }
.pobochki-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pobochki-lightbox__close { top: 16px; right: 20px; }
.pobochki-lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.pobochki-lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
    .pobochki-lightbox { padding: 68px 12px 76px; }
    .pobochki-lightbox__image { max-height: calc(100dvh - 165px); }
    .pobochki-lightbox__prev, .pobochki-lightbox__next { top: auto; bottom: 18px; transform: none; }
    .pobochki-lightbox__prev { left: calc(50% - 60px); }
    .pobochki-lightbox__next { right: calc(50% - 60px); }
}

/* Product details: use existing WooCommerce attributes, no empty placeholders. */
body.single-product .pobochki-product-facts {
    margin: 22px 0;
    padding: 16px 0;
    border-top: 1px solid var(--text, #222);
    border-bottom: 1px solid var(--text, #222);
}
body.single-product .pobochki-product-facts__row {
    display: grid;
    grid-template-columns: minmax(100px, 35%) minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    font-size: 13px;
    line-height: 1.45;
}
body.single-product .pobochki-product-facts dt { color: #777; }
body.single-product .pobochki-product-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
body.single-product .pobochki-inquiry-note {
    margin: 10px 0 0;
    max-width: 380px;
    font-size: 12px;
    line-height: 1.55;
    color: #666;
}


/* ITERATION 28 — stable product gallery stage.
   The frame stays square so thumbnails never jump when images change.
   Portrait and landscape images fit entirely without cropping. */
body.single-product .gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--surface, #e9e7e1);
}
body.single-product .gallery-main-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
}

/* ITERATION 29 — deliberate spacing for the inquiry CTA and its explanation.
   Keep the button and helper copy separate on desktop and mobile. */
body.single-product .single-product-details .product-inquiry {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}
body.single-product .single-product-details .product-inquiry .pobochki-inquiry-note {
    margin: 0;
    max-width: 420px;
    font-size: 13px;
    line-height: 1.6;
    color: #66645f;
}
@media (max-width: 700px) {
    body.single-product .single-product-details .product-inquiry {
        align-items: stretch;
        gap: 14px;
        margin-bottom: 24px;
    }
    body.single-product .single-product-details .product-inquiry .pobochki-inquiry-note {
        max-width: none;
        font-size: 12px;
        line-height: 1.6;
    }
}


/* ITERATION 30 — artwork facts, under the author's description.
   Compact editorial text, no table and no interference with the inquiry CTA. */
body.single-product .single-product-details .pobochki-artwork-details {
    order: 3;
    margin: 24px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--border, #ccc);
    min-width: 0;
}
body.single-product .pobochki-artwork-details__title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
    line-height: 1.4;
}
body.single-product .pobochki-artwork-details__content {
    display: grid;
    gap: 7px;
}
body.single-product .pobochki-artwork-details__item {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
body.single-product .pobochki-artwork-details__label {
    color: #6a6865;
}
@media (max-width: 700px) {
    body.single-product .single-product-details .pobochki-artwork-details {
        margin-top: 20px;
        padding-top: 16px;
    }
    body.single-product .pobochki-artwork-details__item {
        font-size: 13px;
        line-height: 1.6;
    }
}
