@charset "UTF-8";

/*
 * Исходные стили сайта — редактируются вручную, без сборки и минификации.
 * Отступ: 4 пробела. Одно CSS-свойство на строку.
 * Цвета и шрифты задаются в :root; адаптивные правила подписаны отдельно.
 * Порядок правил сохранён: более поздние правила могут переопределять ранние.
 */

/* 01. Цвета, шрифты и общие переменные */
:root {
    --paper: #f8f6f1;
    --ink: #243d35;
    --muted: #747970;
    --line: #dcded4;
    --green: #253f35;
    --accent: #aa764d;
    --white: #fff;
    --serif: Georgia,'Times New Roman',serif;
    --sans: 'Segoe UI',Arial,sans-serif;
}


/* 02. Базовые элементы и типографика */
* {
    box-sizing: border-box;
}

html {
    /* Одинаковая ширина длинных и коротких страниц каталога. */
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-padding-top: 28px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,input,textarea,select {
    font: inherit;
}

button,a,input,select,textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
    outline: 3px solid #b17645;
    outline-offset: 4px;
}

h1,h2,h3,p {
    margin-top: 0;
}

h1,h2 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -.045em;
    line-height: 1.06;
}

h1 {
    font-size: clamp(2.7rem,5.6vw,5.6rem);
}

h2 {
    font-size: clamp(2.1rem,3.2vw,3.5rem);
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.35;
}

p {
    margin-bottom: 1.3rem;
}

.container {
    width: min(1360px,calc(100% - 112px));
    margin-inline: auto;
}


/* 03. Шапка и основная навигация */
.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header>.container {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    font-family: var(--serif);
    font-size: 2.1rem;
    letter-spacing: .16em;
    line-height: 1.05;
}

.brand span {
    display: block;
    font-family: var(--sans);
    font-size: .65rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-top: 9px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 42px;
    font-size: .9rem;
}

.site-nav a {
    position: relative;
    padding: 12px 0;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 100%;
    border-bottom: 1px solid;
    transition: right .2s;
}

.site-nav a:hover::after {
    right: 0;
}

.site-nav a.active {
    color: var(--green);
    background: #e2e8dc;
    box-shadow: 8px 0 #e2e8dc, -8px 0 #e2e8dc;
}

.site-nav a.active::after,
.site-nav a[aria-busy="true"]::after {
    right: 0;
    border-bottom-width: 2px;
}

.site-nav a[aria-disabled="true"] {
    cursor: default;
}

.site-nav a[aria-busy="true"] {
    cursor: progress;
}


/* 04. Подписи и кнопки */
.eyebrow {
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .17em;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--muted);
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--green);
    border-radius: 2px;
    background: var(--green);
    color: #fff;
    padding: 15px 26px;
    font-size: .9rem;
    line-height: 1.4;
    min-height: 48px;
    transition: background .2s,color .2s;
    max-width: 100%;
}

.button:hover {
    background: #3c5a4c;
    color: white;
}

.button-secondary {
    background: transparent;
    color: var(--ink);
    border-color: #aeb7ac;
}

.button-secondary:hover {
    background: #e4e9e1;
    color: var(--ink);
}

.button-danger {
    background: #8e3f35;
    border-color: #8e3f35;
    color: white;
}

.button-danger:hover {
    background: #71342d;
}


/* 05. Главная: первый экран */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 590px;
    align-items: stretch;
    margin: 34px 0 90px;
    background: #e9ebe2;
}

.hero-copy {
    padding: 68px 52px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.hero-copy .eyebrow {
    color: #657263;
}

.hero-copy h1 {
    margin-bottom: 26px;
}

.hero-copy>p:not(.eyebrow) {
    max-width: 350px;
    color: #647066;
}

.hero-copy .button {
    margin-top: 16px;
}

.hero-image {
    min-width: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 90%;
    height: 90%;
    max-height: 580px;
    object-fit: contain;
    transition: transform .6s;
}

.hero-image:hover img {
    transform: scale(1.025);
}


/* 06. Заголовки разделов и карточки каталога */
.section-heading {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 34px;
}

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

.section-heading h2 {
    margin: 0;
}

.section-heading>a {
    flex-shrink: 0;
    font-size: .9rem;
    padding-bottom: 7px;
    border-bottom: 1px solid #aab3a8;
}

.product-grid {
    --catalog-columns: 5;
    --catalog-column-gap: 26;
    display: grid;
    grid-template-columns: repeat(var(--catalog-columns), minmax(0, 1fr));
    width: 100%;
    gap: 42px 26px;
}

@media (max-width: 1199.98px) {
    .product-grid {
        --catalog-columns: 4;
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-image {
    background: #fff;
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    position: relative;
}

.product-image img {
    position: absolute;
    inset: 6%;
    width: 88%;
    height: 88%;
    object-fit: contain;
    object-position: center;
    transition: transform .4s;
}

.product-card:hover .product-image img {
    transform: scale(1.055);
}

.product-card > a {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.product-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    position: relative;
    padding: 19px 0 0;
}

.product-meta {
    font-size: .75rem;
    color: var(--muted);
    letter-spacing: .1em;
}

.product-info h3 {
    margin: 6px 0 4px;
}

.product-info p {
    color: var(--muted);
    font-size: .875rem;
    margin: 0 0 8px;
}

.product-info>span:last-child:not(.product-meta) {
    margin-top: auto;
    padding-top: 8px;
    font-size: .9rem;
}


/* 07. Главная: производство и контакты */
.about-section {
    margin: 100px 0 0;
    padding: 70px 60px;
    background: var(--green);
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 70px;
}

.about-section .eyebrow {
    grid-column: 1/-1;
    color: #bcc6b6;
    margin-bottom: 35px;
}

.about-section h2 {
    margin: 0;
}

.about-section>p:last-child {
    align-self: end;
    max-width: 410px;
    color: #d6ddcf;
    margin: 0;
}

.contact-section {
    padding: 82px 0 70px;
    border-bottom: 1px solid var(--line);
}

.contact-section .eyebrow {
    margin-bottom: 18px;
}

.contact-section h2 {
    margin-bottom: 20px;
}

.contact-section a {
    border-bottom: 1px solid #acb7a8;
}


/* 08. Подвал */
.site-footer {
    margin-top: 78px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer .container {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
    font-size: .8rem;
}

.site-footer .brand {
    color: var(--ink);
    font-size: 1.4rem;
}

.site-footer p {
    margin: 0;
    flex: 1;
}

.site-footer a:not(.brand) {
    font-size: .75rem;
}


/* 09. Каталог: заголовок и категории */
.page-heading {
    padding: 58px 0 22px;
}

.page-heading h1 {
    font-size: clamp(2.7rem,4.8vw,4.8rem);
    margin-bottom: 20px;
}

.page-heading p:last-child {
    color: var(--muted);
}

.page-heading .eyebrow {
    margin-bottom: 18px;
}

.category-nav {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.chip {
    font-size: .85rem;
    border: 1px solid #d2d8cc;
    border-radius: 2px;
    padding: 10px 16px;
    line-height: 1.4;
    background: transparent;
}

.chip:hover {
    background: #e9ede4;
}

.chip.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}


/* 10. Карточка украшения */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    padding: 30px 0 20px;
    margin: 0;
}

.breadcrumbs a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 70px;
    margin-bottom: 80px;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-content: start;
}

.gallery img {
    width: 100%;
    object-fit: contain;
    background: #fff;
    aspect-ratio: 1;
}

.gallery .gallery-main {
    grid-column: 1/-1;
}

.product-copy {
    padding: 40px 0;
    min-width: 0;
}

.product-copy .eyebrow {
    margin-bottom: 22px;
}

.product-copy h1 {
    font-size: clamp(2.5rem,4vw,4.2rem);
    overflow-wrap: anywhere;
}

.product-copy>p:not(.eyebrow,.product-price) {
    color: #69756c;
}

.spec-list {
    margin: 32px 0;
}

.spec-list>div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: .9rem;
}

.spec-list dt {
    color: var(--muted);
}

.spec-list dd {
    margin: 0;
}

.product-price {
    font-size: 1.7rem;
    font-family: var(--serif);
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
    background: #ecefe7;
    margin-bottom: 30px;
}

.empty-state h1 {
    font-size: 2.5rem;
}


/* 11. Админка: навигация, формы и таблицы */
.admin-shell {
    min-height: 65vh;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    font-size: .9rem;
}

.admin-nav form {
    margin-left: auto;
}

.admin-nav .button {
    padding: 8px 18px;
    min-height: 40px;
}

.admin-shell .page-heading {
    padding-top: 36px;
}

.admin-shell h1 {
    font-size: 2.8rem;
}

.admin-shell h2 {
    font-size: 1.9rem;
}

.panel {
    background: white;
    border: 1px solid var(--line);
    padding: 32px;
    margin: 24px 0;
}

.panel h2 {
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-wide {
    grid-column: 1/-1;
}

.field label,label.field {
    font-size: .9rem;
    font-weight: 500;
}

.field small,small {
    font-size: .8rem;
    color: var(--muted);
}

input:not([type=checkbox],[type=radio],[type=hidden]),textarea,select {
    display: block;
    width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid #bfc8be;
    border-radius: 3px;
    padding: 11px 12px;
    min-height: 46px;
    color: var(--ink);
    font-size: 1rem;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input[type=file] {
    padding: 8px;
    font-size: .85rem;
}

input::file-selector-button {
    border: 0;
    background: #edf0e9;
    padding: 8px 13px;
    color: var(--ink);
    margin-right: 12px;
    cursor: pointer;
}

input[type=checkbox],input[type=radio] {
    accent-color: var(--green);
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

form .actions {
    margin-top: 24px;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.alert {
    padding: 16px 20px;
    margin: 24px 0;
    border-left: 3px solid #678363;
    background: #e8f0e4;
    font-size: .95rem;
}

.alert.error {
    border-color: #a64d3d;
    background: #fbebe5;
    color: #813c2c;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--line);
}

.admin-table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: .9rem;
}

.admin-table td,.admin-table th {
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-table th {
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted);
    background: #eef1e9;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table td img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.admin-table .button {
    padding: 8px 13px;
    min-height: 38px;
    font-size: .8rem;
}

.admin-table a:not(.button) {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: .75rem;
    background: #edf0e8;
    color: #4e654a;
    white-space: nowrap;
}

.image-editor {
    display: grid;
    gap: 12px;
    grid-column: 1/-1;
}

.image-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--line);
    padding: 16px;
}

.image-row>img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.image-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    min-width: 0;
}

.image-row label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: .9rem;
}

.image-row input[type=number] {
    display: inline-block;
    width: 80px;
    margin-left: 0;
}

.login-panel {
    max-width: 500px;
    margin: 60px auto;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    background: white;
    padding: 12px;
    z-index: 10;
}

.skip-link:focus {
    top: 12px;
}


/* 12. Адаптивность и уменьшение анимации */
@media(min-width:1500px) {
    .hero-copy {
        padding-left: 70px;
    }

    .hero {
        min-height: 640px;
    }

}


/* Адаптивные правила: @media(max-width:1000px) */
@media(max-width:1000px) {
    .container {
        width: calc(100% - 64px);
    }

    .hero {
        min-height: 470px;
        margin-bottom: 60px;
    }

    .hero-copy {
        padding: 42px 30px;
    }

    .hero-copy h1 {
        font-size: 3.8rem;
    }

    .hero-image img {
        width: 98%;
        height: 98%;
    }

    .site-nav {
        gap: 24px;
    }

    .product-detail {
        gap: 36px;
    }

    .about-section {
        padding: 50px 36px;
        gap: 30px;
    }

    .product-grid {
        --catalog-columns: 3;
        --catalog-column-gap: 18;
        gap: 30px 18px;
    }

    .site-footer .container {
        gap: 20px;
    }

}


/* Адаптивные правила: @media(max-width:680px) */
@media(max-width:680px) {
    .container {
        width: calc(100% - 36px);
    }

    .site-header>.container {
        min-height: 96px;
        flex-direction: column;
        gap: 15px;
        padding: 24px 0 14px;
        align-items: flex-start;
    }

    .brand {
        font-size: 1.8rem;
    }

    .brand span {
        font-size: .6rem;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
        gap: 14px;
        font-size: .8rem;
    }

    .site-nav a {
        padding: 4px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        margin: 20px 0 48px;
        min-height: 0;
    }

    .hero-copy {
        padding: 34px 26px;
    }

    .hero-copy h1 {
        font-size: 3.4rem;
        margin-bottom: 18px;
    }

    .hero-copy .eyebrow {
        font-size: .65rem;
        margin-bottom: 18px;
    }

    .hero-copy>p:not(.eyebrow) {
        font-size: .95rem;
    }

    .hero-copy .button {
        margin-top: 0;
    }

    .hero-image {
        min-height: 300px;
        max-height: 370px;
    }

    .hero-image img {
        width: 84%;
        height: 320px;
    }

    .section-heading {
        gap: 18px;
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .section-heading h2 {
        font-size: 2.25rem;
    }

    .section-heading .eyebrow {
        font-size: .65rem;
    }

    .section-heading>a {
        font-size: .85rem;
    }

    .product-grid {
        --catalog-columns: 2;
        --catalog-column-gap: 14;
        grid-template-columns: repeat(var(--catalog-columns), minmax(0, 1fr));
        gap: 28px 14px;
    }

    .product-image {
        aspect-ratio: 1;
    }

    .product-image img {
        inset: 6%;
        width: 88%;
        height: 88%;
    }

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

    .product-info h3 {
        font-size: .9rem;
        margin-top: 5px;
    }

    .product-info p {
        font-size: .75rem;
    }

    .product-meta {
        font-size: .65rem;
    }

    .product-info>span:last-child:not(.product-meta) {
        font-size: .85rem;
    }

    .about-section {
        grid-template-columns: 1fr;
        margin-top: 52px;
        padding: 34px 26px;
        gap: 24px;
    }

    .about-section .eyebrow {
        margin: 0;
    }

    .about-section h2 {
        font-size: 2.5rem;
    }

    .about-section>p:last-child {
        font-size: .95rem;
    }

    .contact-section {
        padding: 48px 0 32px;
    }

    .contact-section h2 {
        font-size: 2.4rem;
    }

    .site-footer {
        margin-top: 45px;
        padding: 30px 0;
    }

    .site-footer .container {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .site-footer p {
        font-size: .8rem;
    }

    .page-heading {
        padding-top: 32px;
    }

    .page-heading h1 {
        font-size: 2.8rem;
        overflow-wrap: anywhere;
    }

    .page-heading>p:last-child {
        font-size: .9rem;
    }

    .category-nav {
        gap: 7px;
        margin-bottom: 26px;
    }

    .chip {
        font-size: .8rem;
        padding: 9px 11px;
    }

    .breadcrumbs {
        font-size: .75rem;
        padding: 22px 0 18px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 35px;
    }

    .product-copy {
        padding: 22px 0;
    }

    .product-copy h1 {
        font-size: 2.5rem;
    }

    .product-copy .eyebrow {
        font-size: .7rem;
        margin-bottom: 15px;
    }

    .spec-list>div {
        grid-template-columns: 96px 1fr;
        gap: 12px;
    }

    .admin-nav {
        gap: 14px;
        font-size: .8rem;
    }

    .admin-nav form {
        margin-left: 0;
    }

    .admin-nav .button {
        padding: 7px 12px;
    }

    .admin-shell h1 {
        font-size: 2.2rem;
    }

    .panel {
        padding: 21px 16px;
        margin: 20px 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .field-wide {
        grid-column: auto;
    }

    .image-row {
        grid-template-columns: 70px 1fr;
        padding: 12px;
        gap: 12px;
    }

    .image-row>img {
        width: 70px;
        height: 80px;
    }

    .image-row label {
        font-size: .8rem;
    }

    .actions .button {
        padding: 12px 16px;
    }

    .admin-table td,.admin-table th {
        padding: 12px;
    }

    .empty-state {
        padding: 35px 20px;
    }

    .login-panel {
        margin: 30px 0;
    }

    .button {
        font-size: .85rem;
    }

    .contact-section p {
        overflow-wrap: anywhere;
    }

}


/* Адаптивные правила: @media(prefers-reduced-motion:reduce) */
@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none!important;
    }

}


/* Дополнительные общие правила */
.site-nav {
    flex-wrap: wrap;
}

.product-copy p,.product-info h3 {
    overflow-wrap: anywhere;
}


/* Каталог: навигация по коллекциям */
.collection-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px;
    height: 64px;
    padding-inline: 8px;
    margin: -16px 0 36px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.collection-nav > * {
    flex-shrink: 0;
}

.collection-nav .chip {
    white-space: nowrap;
}

.collection-nav-empty {
    color: var(--muted);
    font-size: .875rem;
}

.collection-nav>span {
    font-size: .85rem;
    color: var(--muted);
    margin-right: 12px;
}

.collection-nav .chip {
    border-color: transparent;
}

.collection-nav .chip.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

/* Выбранный фильтр и ожидание загрузки не меняют размеры строки. */
.category-nav .chip[aria-disabled="true"],
.collection-nav .chip[aria-disabled="true"] {
    cursor: default;
}

.category-nav .chip.is-loading,
.collection-nav .chip.is-loading {
    background: #e2e8dc;
    color: var(--ink);
    border-color: var(--green);
    box-shadow: inset 0 -3px 0 var(--green);
    cursor: progress;
}


/* Адаптивные правила: @media(max-width:680px) */
@media(max-width:680px) {
    .site-nav,.chip {
        font-size: .875rem;
    }

    .product-info h3 {
        font-size: 1rem;
    }

    .product-meta {
        font-size: .75rem;
    }

}


/* 13. Страница «О производстве» */
.workshop-page figure {
    margin: 0;
}

.workshop-page figcaption {
    font-size: .8125rem;
    color: var(--muted);
    line-height: 1.5;
    padding-top: 14px;
}

.workshop-page figure a {
    display: block;
}

.workshop-page figure img {
    width: 100%;
    height: auto;
}

.workshop-intro {
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(0,.8fr);
    gap: 8%;
    padding: 64px 0 72px;
    align-items: center;
}

.workshop-intro-copy {
    padding: 26px 0;
}

.workshop-intro h1 {
    font-size: clamp(2.65rem,5.7vw,5.7rem);
    margin-bottom: 32px;
}

.workshop-intro h1 em {
    font-weight: 400;
    color: #86704e;
}

.workshop-lead {
    max-width: 540px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #637066;
    margin-bottom: 30px;
}

.workshop-text-link {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid #a3afa0;
    padding-bottom: 10px;
    font-size: .875rem;
}

.workshop-hero-photo {
    max-width: 410px;
    justify-self: end;
    width: 100%;
}

.workshop-hero-photo img {
    aspect-ratio: 2/3;
    object-fit: cover;
}

.workshop-story {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
    padding: 64px 0 72px;
}

.workshop-story h2 {
    font-size: clamp(2rem,3.2vw,3.2rem);
    margin-bottom: 0;
}

.workshop-story-copy {
    max-width: 550px;
    align-self: center;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #637066;
}

.workshop-story-copy p {
    margin: 0;
}

.workshop-craft {
    background: #e9ece3;
    padding: 50px 34px 36px;
    margin-inline: -34px;
    scroll-margin-top: 24px;
}

.workshop-craft-heading {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    align-items: end;
    margin-bottom: 36px;
}

.workshop-craft-heading h2 {
    margin: 0;
    font-size: clamp(2rem,3.2vw,3.2rem);
}

.workshop-craft-heading>p {
    max-width: 390px;
    color: #637066;
    font-size: .9375rem;
    line-height: 1.8;
    margin: 0;
}

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

.workshop-process-grid img {
    aspect-ratio: 2/3;
    object-fit: cover;
}

.workshop-process-grid figcaption {
    color: var(--ink);
}

.workshop-process-grid figcaption span {
    display: inline-block;
    font-size: .75rem;
    color: var(--muted);
    margin-right: 12px;
}

.workshop-care {
    max-width: 730px;
    line-height: 1.8;
    font-size: .9375rem;
    color: #637066;
    margin: 34px 0 0;
}

.workshop-archive {
    padding: 80px 0 0;
}

.workshop-archive .section-heading>p {
    font-size: .875rem;
    color: var(--muted);
    margin: 0;
}

.workshop-archive-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 44px;
    align-items: start;
}

.workshop-portrait {
    max-width: 330px;
    justify-self: end;
}

.workshop-building {
    padding-top: 42px;
}

.workshop-outro {
    padding: 48px 0;
    margin-top: 70px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

.workshop-outro h2 {
    margin: 0;
    font-size: clamp(2rem,3vw,3rem);
}

.about-section a:not(.button) {
    display: inline-block;
    color: #fff;
    border-bottom: 1px solid #aebda5;
    padding-bottom: 4px;
}

.about-section>div p {
    color: #d6ddcf;
}

.about-section>div {
    align-self: end;
}

.about-section .button {
    color: var(--white);
    border-color: #aebda5;
}

.about-section .button:hover {
    background: #385448;
}

.workshop-page a img {
    transition: filter .2s;
}

.workshop-page a:hover img {
    filter: brightness(1.035);
}


/* Адаптивные правила: @media(max-width:1000px) */
@media(max-width:1000px) {
    .workshop-intro {
        gap: 6%;
        padding: 44px 0 52px;
    }

    .workshop-intro h1 {
        font-size: clamp(2.5rem,5.8vw,4.3rem);
    }

    .workshop-craft {
        margin-inline: 0;
        padding: 36px 24px;
    }

    .workshop-craft-heading {
        gap: 30px;
    }

    .workshop-craft-heading>p {
        max-width: 300px;
    }

    .workshop-process-grid {
        gap: 14px;
    }

    .workshop-archive-grid {
        gap: 30px;
    }

    .workshop-story {
        gap: 6%;
        padding: 48px 0;
    }

    .workshop-story h2 {
        font-size: 2.5rem;
    }

}


/* Адаптивные правила: @media(max-width:680px) */
@media(max-width:680px) {
    .workshop-intro {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 0 40px;
    }

    .workshop-intro-copy {
        padding: 0;
    }

    .workshop-intro h1 {
        font-size: clamp(2.5rem,9.5vw,3.5rem);
        margin-bottom: 24px;
        overflow-wrap: anywhere;
    }

    .workshop-intro .eyebrow {
        margin-bottom: 20px;
    }

    .workshop-lead {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 24px;
    }

    .workshop-hero-photo {
        max-width: none;
        justify-self: stretch;
    }

    .workshop-hero-photo img {
        max-height: 570px;
        object-position: 50% 40%;
    }

    .workshop-story {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 36px 0 42px;
    }

    .workshop-story h2 {
        font-size: 2.2rem;
    }

    .workshop-story-copy {
        font-size: 1rem;
        line-height: 1.75;
    }

    .workshop-craft {
        padding: 30px 16px;
        margin-inline: -4px;
    }

    .workshop-craft-heading {
        flex-direction: column;
        align-items: start;
        gap: 24px;
        margin-bottom: 28px;
    }

    .workshop-craft-heading .eyebrow {
        margin-bottom: 18px;
    }

    .workshop-craft-heading>p {
        max-width: none;
    }

    .workshop-process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 12px;
    }

    .workshop-process-grid figcaption {
        font-size: .8125rem;
    }

    .workshop-process-grid figcaption span {
        display: block;
        margin: 0 0 4px;
    }

    .workshop-care {
        font-size: .875rem;
        margin-top: 28px;
    }

    .workshop-archive {
        padding-top: 46px;
    }

    .workshop-archive-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .workshop-building {
        padding-top: 0;
    }

    .workshop-portrait {
        max-width: 270px;
        justify-self: start;
    }

    .workshop-archive .section-heading {
        gap: 15px;
    }

    .workshop-archive h2 {
        font-size: 2.3rem;
    }

    .workshop-outro {
        flex-direction: column;
        align-items: start;
        padding: 30px 0;
        margin-top: 42px;
        gap: 24px;
    }

}

/* 15. Аккаунт покупателя и кнопки добавления в корзину */
.site-header > .container {
    flex-wrap: wrap;
}

.site-nav {
    gap: 28px;
}

.site-account {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: .9rem;
}

.site-account form {
    display: flex;
    align-items: center;
    margin: 0;
}

/* Ссылка корзины и кнопка выхода используют одинаковую строку текста. */
.site-account > a,
.site-account .text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
    padding: 4px 0;
    line-height: 24px;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    font-size: .75rem;
    font-family: Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.text-button {
    border: 0;
    padding: 4px 0;
    background: transparent;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

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

.card-cart-form {
    margin-top: 18px;
}

.card-cart-form .button {
    width: 100%;
}

.model-cart-form {
    display: grid;
    grid-template-columns: minmax(0, 130px) max-content;
    align-items: end;
    gap: 12px 20px;
    margin: 24px 0;
}

.model-cart-form .field {
    max-width: 130px;
    margin: 0;
}

.account-panel {
    max-width: 620px;
    margin: 56px auto 80px;
}

.account-panel h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.account-form,
.login-panel form {
    display: grid;
    gap: 20px;
    margin-top: 28px;
}

.account-form .form-note {
    margin: -10px 0 0;
}

.account-form .button {
    width: 100%;
}

.account-switch {
    margin: 24px 0 0;
}

.account-switch a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.form-note {
    color: var(--muted);
    font-size: .875rem;
}

/* 16. Корзина, оформление и подтверждение заказа */
.commerce-page {
    padding: 52px 0 80px;
}

.commerce-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 44px;
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 22px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.cart-item img,
.cart-image-placeholder {
    width: 104px;
    height: 130px;
    object-fit: contain;
    background: #efede7;
}

.cart-image-placeholder {
    display: grid;
    place-items: center;
    font: 2.5rem var(--serif);
}

.cart-item h2 {
    font-size: 1.65rem;
    letter-spacing: -.02em;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}

.cart-item .eyebrow {
    margin-bottom: 8px;
}

.cart-item-actions,
.quantity-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-item-actions {
    gap: 12px 24px;
    font-size: .8125rem;
}

.quantity-form {
    display: grid;
    grid-template-columns: 68px auto;
}

.quantity-form label {
    grid-column: 1 / -1;
}

.cart-item-actions .text-button {
    min-height: 46px;
}

.quantity-form input {
    width: 68px;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
}

.cart-line-total {
    white-space: nowrap;
    font-weight: 500;
}

/* Автоматическое сохранение количества в корзине. */
.commerce-page [hidden] {
    display: none !important;
}

.cart-update-status {
    margin: 0 0 20px;
    color: var(--muted);
}

.cart-update-error {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #b36a4b;
    background: #f7eee8;
}

.cart-update-error p {
    margin-bottom: 12px;
}

.cart-update-notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-left: 3px solid var(--green);
    background: #e2e8dc;
    color: var(--ink);
}

[data-cart-checkout][aria-disabled="true"] {
    opacity: .55;
    cursor: wait;
}

.quantity-form input[aria-invalid="true"] {
    border-color: #a04730;
}

.order-summary {
    padding: 28px;
    border: 1px solid var(--line);
    background: #eeeee6;
}

.order-summary h2,
.contact-summary h2,
.order-items-title,
.admin-order h2 {
    font-size: 2rem;
}

.summary-price {
    display: block;
    margin: 0 0 24px;
    font-size: 1.7rem;
    font-weight: 500;
}

.order-summary .button {
    width: 100%;
    text-align: center;
}

.order-summary > .form-note:last-child {
    margin: 20px 0 0;
}

.unavailable {
    color: #92432c;
    font-size: .875rem;
}

.contact-summary {
    margin-bottom: 32px;
}

.contact-summary dd {
    overflow-wrap: anywhere;
}

.checkout-line {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.checkout-line > span {
    flex-shrink: 0;
}

.mock-notice {
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    background: #f4eadd;
    font-size: .875rem;
}

.order-success {
    max-width: 850px;
    margin: 60px auto 80px;
}

.order-success h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.order-success > .button {
    margin-top: 28px;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* 17. Заказы и почтовый мок в админке */
.admin-order {
    margin-bottom: 24px;
    overflow-wrap: anywhere;
}

.mock-message summary {
    cursor: pointer;
    padding: 12px 0;
}

.mock-message pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: .875rem/1.7 var(--sans);
    background: var(--paper);
    padding: 20px;
}

/* 18. Адаптация корзины и аккаунта */
@media (max-width: 1050px) {
    .site-header > .container {
        gap: 20px;
        padding-block: 22px;
    }

    .site-nav {
        gap: 20px;
    }

    .commerce-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 24px;
    }

    .cart-item {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 16px;
    }

    .cart-item img,
    .cart-image-placeholder {
        width: 80px;
        height: 110px;
    }

    .cart-line-total {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    .site-account {
        width: 100%;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid var(--line);
    }

    .commerce-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .commerce-page {
        padding: 32px 0 48px;
    }

    .account-panel,
    .order-success {
        margin: 32px auto 48px;
        padding: 24px;
    }

    .checkout-line {
        flex-direction: column;
        gap: 8px;
    }

    .order-summary {
        padding: 24px;
    }

    .cart-item-actions {
        align-items: end;
    }

    .quantity-form {
        gap: 8px;
    }

    .quantity-form label {
        width: 100%;
    }
}

/* 19. Планшетная компоновка и компактная шапка */
@media (max-width: 900px) {
    .site-header > .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px 20px;
        padding-block: 20px 12px;
    }

    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .site-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 6px 0;
    }

    .site-account {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        gap: 14px;
        padding: 0;
        border: 0;
        white-space: nowrap;
    }

    .site-account > a,
    .site-account .text-button {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        gap: 4px;
    }

    .commerce-layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .hero-copy h1 {
        font-size: clamp(2.6rem, 10vw, 4rem);
    }

    .image-controls {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 480px) {
    .site-header > .container {
        column-gap: 10px;
    }

    .site-header .brand {
        font-size: 1.5rem;
    }

    .site-header .brand span {
        font-size: .5rem;
    }

    .site-account {
        gap: 10px;
        font-size: .8125rem;
    }

    .cart-count {
        min-width: 22px;
        height: 22px;
    }

    .hero-copy {
        padding: 28px 22px;
    }

}

@media (max-width: 480px) {
    .account-panel h1 {
        font-size: 2rem;
    }
}

/* Отдельные действия удаления не сливаются с подтверждением. */
.delete-form {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 16px;
}

.delete-form > label {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Local cart feedback keeps catalog cards stable after adding a model. */
.card-cart-form [data-cart-feedback] {
    min-height: 2.8em;
    margin: 8px 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--muted);
}

.model-cart-form [data-cart-feedback] {
    grid-column: 1 / -1;
    min-height: 1.5em;
    margin: 0;
}

/* Catalog window: only nearby cards are mounted; home cards remain unchanged. */
[data-virtual-catalog] {
    display: block;
    --virtual-columns: var(--catalog-columns);
    --virtual-column-gap: var(--catalog-column-gap);
    --virtual-row-gap: 42;
    --virtual-image-ratio: 1;
    --virtual-copy-height: 270;
    overflow-anchor: none;
}

/* Reserve the initial viewport before deferred JS mounts virtual rows.
 * Ready catalogs use the exact height calculated by the virtualizer. */
[data-virtual-catalog]:not([data-virtual-ready]) {
    min-height: 100vh;
    min-height: 100svh;
}

[data-virtual-catalog][data-virtual-ready] {
    display: block;
    position: relative;
}

[data-virtual-catalog] > .product-card {
    position: absolute;
    width: var(--virtual-card-width);
    height: var(--virtual-card-height);
}

[data-virtual-catalog] .product-card > a {
    flex: none;
}

[data-virtual-catalog] .product-image {
    height: var(--virtual-image-height);
    aspect-ratio: auto;
    flex: none;
}

[data-virtual-catalog] .product-info {
    height: 160px;
    flex: none;
    display: grid;
    grid-template-rows: 16px 44px 40px 24px;
    gap: 4px;
    padding-top: 16px;
}

[data-virtual-catalog] .product-meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 16px;
}

[data-virtual-catalog] .product-info h3,
[data-virtual-catalog] .product-info p {
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

[data-virtual-catalog] .product-info h3 {
    font-size: 16px;
    line-height: 22px;
}

[data-virtual-catalog] .product-info p {
    line-height: 20px;
}

[data-virtual-catalog] .product-info > span:last-child:not(.product-meta) {
    margin: 0;
    padding: 0;
    line-height: 24px;
}

[data-virtual-catalog] .card-cart-form {
    margin-top: 10px;
    height: 100px;
}

[data-virtual-catalog] .card-cart-form .button {
    height: 48px;
    padding: 10px 8px;
}

[data-virtual-catalog] .card-cart-form [data-cart-feedback] {
    height: 40px;
    min-height: 0;
    margin-top: 8px;
    line-height: 20px;
    overflow: hidden;
}

.catalog-result-count {
    color: var(--muted);
    margin: 0 0 24px;
}

@media (max-width: 1000px) {
    [data-virtual-catalog] {
        --virtual-row-gap: 30;
    }
}

@media (max-width: 680px) {
    /* Mobile home keeps the first six items in the administrator's order. */
    [data-home-featured] .product-card:nth-child(n + 7) {
        display: none;
    }

    [data-virtual-catalog] {
        --virtual-row-gap: 28;
    }

    [data-virtual-catalog] .product-info h3 {
        font-size: 14px;
    }
}

/* Keep the add action and its feedback independent of intrinsic text width. */
.model-cart-form {
    grid-template-columns: minmax(0, 130px) minmax(0, 180px);
}

.model-cart-form > .button {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 4px 8px;
    text-align: center;
}

.model-cart-form [data-cart-feedback] {
    min-width: 0;
    min-height: 2.8em;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.card-cart-form a.button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* Числа в личном кабинете: ровная строка и цельные артикулы. */
.account-page .account-numeric {
    font-family: var(--sans);
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: normal;
    white-space: nowrap;
    overflow-wrap: normal;
}

.account-order-page > h1 {
    font-size: clamp(1.75rem, 4.8vw, 3rem);
    line-height: 1.2;
}

.account-order-page .account-order-item h2 {
    font-size: clamp(1.25rem, 2.3vw, 1.6rem);
    line-height: 1.35;
    letter-spacing: normal;
    overflow-wrap: normal;
}


/* Ровные цифры в обычных и виртуальных карточках каталога. */
.product-info .card-numeric {
    font-family: var(--sans);
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}


/* Ровные цифры на странице изделия без изменения размеров и интервалов. */
.product-copy .model-numeric {
    font-family: var(--sans);
    font-variant-numeric: lining-nums tabular-nums;
    overflow-wrap: anywhere;
}


/* Обычный артикул переносится целиком; очень длинный остаётся в ширине экрана. */
.product-copy h1 .model-numeric {
    display: inline-block;
    max-width: 100%;
}
