/* =============================================
   Ушастая Ферма — премиальный эко-стиль
   ============================================= */

:root {
    /* Глубокий лес, шалфей, слоновая кость, латунь */
    --color-primary:         #1f4d3a;
    --color-primary-dark:    #153329;
    --color-primary-light:   #2d6b52;
    --color-sage:            #6b8f71;
    --color-sage-muted:      #a8c4a8;
    --color-accent:          #c9a227;
    --color-accent-soft:     #e8d5a3;
    --color-accent-dark:     #9a7b1a;
    --color-cream:           #f7f4ec;
    --color-cream-deep:      #ebe6d9;
    --color-beige:           #e8e2d4;
    --color-brown:           #3d2f26;
    --color-brown-light:     #6b5d52;
    --color-text:            #2a2622;
    --color-text-light:      #5c554d;
    --color-white:           #ffffff;
    --color-border:          #d4cdc0;
    --color-success:         #2d6b4e;
    --color-warning:         #c9a227;
    --color-danger:          #b54a3c;
    --color-info:            #4a7c6a;

    --font-heading: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --font-body:    'Source Sans 3', system-ui, -apple-system, sans-serif;

    --shadow-sm:   0 2px 8px rgba(21, 51, 41, 0.06);
    --shadow-md:   0 8px 24px rgba(21, 51, 41, 0.08);
    --shadow-lg:   0 20px 48px rgba(21, 51, 41, 0.1);
    --shadow-glow: 0 0 0 1px rgba(201, 162, 39, 0.15);

    --radius-sm:   8px;
    --radius-md:   16px;
    --radius-lg:   24px;

    --transition:  0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Сброс и базовые стили */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Премиальный фон и сглаживание только публичная часть */
.site-body {
    background-color: var(--color-cream);
    background-image:
        radial-gradient(ellipse 120% 80% at 100% -20%, rgba(107, 143, 113, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(201, 162, 39, 0.07) 0%, transparent 48%),
        linear-gradient(180deg, #faf8f3 0%, var(--color-cream-deep) 55%, var(--color-cream) 100%);
    -webkit-font-smoothing: antialiased;
}

.main {
    flex: 1;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-brown);
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   Верхняя панель
   ============================================= */
.top-bar {
    background: linear-gradient(90deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    font-size: 0.82rem;
    padding: 10px 0;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.top-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar__contacts a,
.top-bar__hours {
    color: rgba(255,255,255,0.9);
}

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

.top-bar__socials {
    display: flex;
    gap: 12px;
}

.top-bar__socials a {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    transition: color var(--transition), transform var(--transition);
}

.top-bar__socials a:hover {
    color: var(--color-accent);
    transform: scale(1.15);
}

/* =============================================
   Шапка (Header)
   ============================================= */
/* Без backdrop-filter — иначе в Chrome/Safari растровый логотип в шапке может выглядеть «мыльным» */
.header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm), 0 1px 0 rgba(31, 77, 58, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 205, 192, 0.6);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 20px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    isolation: isolate;
}

/* Кратко: чёткое уменьшение с полноразмерного PNG (атрибуты width/height в разметке) */
.header__logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px;
    box-sizing: border-box;
    flex-shrink: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    image-rendering: auto;
}

.header__logo-text {
    display: flex;
    flex-direction: column;
}

.header__brand {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1.15;
    letter-spacing: 0.03em;
}

.header__tagline {
    font-size: 0.7rem;
    color: var(--color-sage);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}

/* Навигация */
.header__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all var(--transition);
    white-space: nowrap;
}

.header__nav a:hover,
.header__nav a.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Корзина */
.header__cart {
    position: relative;
    font-size: 1.4rem;
    color: var(--color-brown);
    padding: 8px;
    transition: color var(--transition);
}

.header__cart:hover {
    color: var(--color-primary);
}

.header__cart-count {
    position: absolute;
    top: 0;
    right: -4px;
    background: var(--color-danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.header__cart-count.visible {
    display: flex;
}

/* Бургер-меню */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.header__burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-brown);
    border-radius: 2px;
    transition: all var(--transition);
}

.header__burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.header__burger.open span:nth-child(2) {
    opacity: 0;
}

.header__burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* =============================================
   Герой-блок (главная)
   ============================================= */
.hero {
    background:
        radial-gradient(ellipse 100% 120% at 85% 20%, rgba(201, 162, 39, 0.18) 0%, transparent 42%),
        radial-gradient(ellipse 70% 90% at 10% 80%, rgba(107, 143, 113, 0.22) 0%, transparent 45%),
        linear-gradient(155deg, var(--color-primary-dark) 0%, var(--color-primary) 38%, var(--color-primary-light) 72%, #1a3d2e 100%);
    color: var(--color-white);
    padding: clamp(56px, 10vw, 100px) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><path fill="rgba(255,255,255,0.04)" d="M60 8c-8 12-14 28-14 44s6 32 14 44c8-12 14-28 14-44S68 20 60 8z"/></svg>') repeat;
    background-size: 120px 120px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(247, 244, 236, 0.35), transparent);
    pointer-events: none;
}

.hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: 580px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
}

.hero__badge i {
    color: var(--color-accent-soft);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 5vw, 3.15rem);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 22px;
    line-height: 1.12;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.hero__title span {
    color: var(--color-accent-soft);
    font-style: italic;
    font-weight: 500;
}

.hero__desc {
    font-size: 1.12rem;
    line-height: 1.75;
    opacity: 0.92;
    margin-bottom: 36px;
    max-width: 34em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__image {
    flex-shrink: 0;
}

/* Одинаковые физические размеры с главной — чёткое даунскейлинг с 1024×1024, без «мыла» от width:100% в сетке */
.hero__image img,
.about-image img,
.about-image .hero__image img {
    width: min(340px, 88vw);
    height: min(340px, 88vw);
    max-width: none;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 40px rgba(201, 162, 39, 0.12));
}

/* =============================================
   Кнопки
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.btn--primary {
    background: linear-gradient(145deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-brown);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
}

.btn--primary:hover {
    background: linear-gradient(145deg, var(--color-accent-soft) 0%, var(--color-accent) 100%);
    color: var(--color-brown);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201, 162, 39, 0.4);
}

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.5);
}

.btn--outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn--green {
    background: linear-gradient(145deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(31, 77, 58, 0.25);
}

.btn--green:hover {
    background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(31, 77, 58, 0.3);
}

.btn--danger {
    background: var(--color-danger);
    color: var(--color-white);
    border-color: var(--color-danger);
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn--block {
    width: 100%;
    justify-content: center;
}

/* =============================================
   Секции
   ============================================= */
.section {
    padding: clamp(64px, 12vw, 96px) 0;
    position: relative;
}

.section--alt {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 244, 236, 0.85) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.section__header {
    text-align: center;
    margin-bottom: clamp(40px, 8vw, 56px);
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section__title::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 18px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-sage), var(--color-accent));
    opacity: 0.9;
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 12px auto 0;
    line-height: 1.65;
    font-weight: 400;
}

/* =============================================
   Преимущества
   ============================================= */
.advantages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.advantage {
    text-align: center;
    padding: 36px 24px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 205, 192, 0.65);
    transition: all var(--transition);
}

.advantage:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: rgba(107, 143, 113, 0.35);
}

.advantage__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    background: linear-gradient(145deg, var(--color-cream-deep) 0%, var(--color-beige) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.advantage__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-brown);
}

.advantage__text {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* =============================================
   Карточки товаров
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.product-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 205, 192, 0.55);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

/* Клик по карточке ведёт на страницу товара; футер с кнопкой выше слоя ссылки */
.product-card__cover-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(107, 143, 113, 0.28);
}

.product-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-beige);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.product-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__category {
    font-size: 0.8rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-brown);
}

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

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

.product-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    flex: 1;
}

.product-card__footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.product-card__price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.product-card__price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
}

/* =============================================
   Бейджи
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--green {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge--orange {
    background: var(--color-warning);
    color: var(--color-white);
}

.badge--available {
    background: var(--color-success);
    color: var(--color-white);
}

.badge--preorder {
    background: var(--color-accent);
    color: var(--color-brown);
}

.badge--unavailable {
    background: var(--color-text-light);
    color: var(--color-white);
}

/* =============================================
   Страница товара
   ============================================= */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 40px 0;
}

.product-detail__image {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
}

.product-detail__image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-detail__info {
    padding: 20px 0;
}

.product-detail__category {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-detail__title {
    font-size: 2rem;
    margin-bottom: 16px;
}

.product-detail__price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 20px;
}

.product-detail__price small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.product-detail__desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 28px;
}

.product-detail__options {
    margin-bottom: 24px;
}

.product-detail__options label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-brown);
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    padding: 10px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
}

.option-btn:hover,
.option-btn.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.quantity-control button {
    width: 44px;
    height: 44px;
    background: var(--color-beige);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--transition);
    color: var(--color-text);
}

.quantity-control button:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.quantity-control input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-white);
}

.product-detail__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =============================================
   Категории-фильтр
   ============================================= */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    justify-content: center;
}

.category-filter a {
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    background: var(--color-white);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 205, 192, 0.7);
    transition: all var(--transition);
}

.category-filter a:hover,
.category-filter a.active {
    background: linear-gradient(145deg, var(--color-primary-light), var(--color-primary));
    color: var(--color-white);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* =============================================
   Хлебные крошки
   ============================================= */
.breadcrumb {
    padding: 16px 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--color-text-light);
}

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

.breadcrumb span {
    color: var(--color-text-light);
    margin: 0 8px;
}

.breadcrumb strong {
    color: var(--color-text);
}

/* =============================================
   Формы
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-brown);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 46, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path d="M1 1l5 5 5-5" stroke="%23666" stroke-width="2" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* Radio-кнопки стилизованные */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 140px;
}

.radio-card input {
    display: none;
}

.radio-card label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}

.radio-card input:checked + label {
    border-color: var(--color-primary);
    background: rgba(45, 106, 46, 0.05);
    color: var(--color-primary-dark);
}

/* =============================================
   Корзина
   ============================================= */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-table th {
    background: var(--color-beige);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-brown);
}

.cart-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-item__info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-item__img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item__name {
    font-weight: 600;
    color: var(--color-brown);
}

.cart-item__option {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.cart-item__remove {
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.1rem;
    background: none;
    border: none;
    padding: 4px;
    transition: transform var(--transition);
}

.cart-item__remove:hover {
    transform: scale(1.2);
}

.cart-summary {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-summary__row:last-of-type {
    border-bottom: none;
}

.cart-summary__total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    padding: 40px 0;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--color-border);
    margin-bottom: 20px;
}

.cart-empty h2 {
    margin-bottom: 12px;
}

.cart-empty p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* =============================================
   Страница «О ферме»
   ============================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-grid--reverse {
    direction: rtl;
}

.about-grid--reverse > * {
    direction: ltr;
}

/* Круглый/квадратный логотип: без обрезки 4:3 и cover — иначе выглядит «битым» */
/* Без «коробки»: логотип лежит на фоне секции, не в белой/бежевой рамке */
.about-image {
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 3vw, 24px);
    aspect-ratio: auto;
    max-height: none;
    margin: 0 auto;
    max-width: min(100%, 420px);
}

/* Как на главной: тот же зелёный градиент и листовой орнамент, что у .hero */
.about-image--hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    max-width: min(100%, 400px);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(24px, 4vw, 40px);
    background:
        radial-gradient(ellipse 100% 120% at 85% 20%, rgba(201, 162, 39, 0.18) 0%, transparent 42%),
        radial-gradient(ellipse 70% 90% at 10% 80%, rgba(107, 143, 113, 0.22) 0%, transparent 45%),
        linear-gradient(155deg, var(--color-primary-dark) 0%, var(--color-primary) 38%, var(--color-primary-light) 72%, #1a3d2e 100%);
    box-shadow:
        0 24px 48px rgba(26, 61, 46, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.about-image--hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><path fill="rgba(255,255,255,0.04)" d="M60 8c-8 12-14 28-14 44s6 32 14 44c8-12 14-28 14-44S68 20 60 8z"/></svg>') repeat;
    background-size: 120px 120px;
    pointer-events: none;
    border-radius: inherit;
}

.about-image--hero .hero__image {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Размеры img заданы вместе с .hero__image img выше */

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.about-text p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    margin-bottom: 16px;
}

.about-text ul li {
    padding: 6px 0 6px 28px;
    position: relative;
}

.about-text ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* =============================================
   Контакты
   ============================================= */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item__icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item__text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-item__text p,
.contact-item__text a {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* =============================================
   Доставка
   ============================================= */
.delivery-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.delivery-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition);
}

.delivery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.delivery-card__icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.delivery-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.delivery-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================
   Алерты / уведомления
   ============================================= */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert--info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* =============================================
   CTA-секция
   ============================================= */
.cta {
    background:
        radial-gradient(ellipse 80% 100% at 100% 0%, rgba(201, 162, 39, 0.2) 0%, transparent 50%),
        linear-gradient(145deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-primary-light) 100%);
    color: var(--color-white);
    text-align: center;
    padding: clamp(48px, 8vw, 72px) 24px;
    border-radius: var(--radius-lg);
    margin: 48px 0;
    border: 1px solid rgba(201, 162, 39, 0.35);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cta h2 {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.cta p {
    font-size: 1.05rem;
    opacity: 0.92;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

/* =============================================
   Подвал (Footer)
   ============================================= */
.footer {
    background:
        linear-gradient(180deg, rgba(201, 162, 39, 0.12) 0%, transparent 28%),
        linear-gradient(165deg, #2a221c 0%, var(--color-brown) 40%, #1f1814 100%);
    color: rgba(255, 255, 255, 0.82);
    padding: 64px 0 0;
    margin-top: 48px;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer__logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px;
    box-sizing: border-box;
}

.footer__logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-white);
}

.footer__desc {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer__badges .badge {
    font-size: 0.7rem;
}

.footer__col h4 {
    color: var(--color-white);
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.footer__col ul {
    list-style: none;
}

.footer__col ul li {
    margin-bottom: 10px;
}

.footer__col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer__col ul li a:hover {
    color: var(--color-accent);
}

.footer__contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer__contacts i {
    color: var(--color-accent);
    width: 18px;
}

.footer__socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer__socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.footer__socials a:hover {
    background: var(--color-accent);
    color: var(--color-brown);
    transform: translateY(-2px);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* =============================================
   Страница оформления заказа
   ============================================= */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.checkout-form {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.checkout-form h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-beige);
}

.checkout-items {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.checkout-items h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-beige);
}

.checkout-product {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.checkout-product:last-of-type {
    border-bottom: none;
}

.checkout-product img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.checkout-product__info {
    flex: 1;
}

.checkout-product__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-brown);
}

.checkout-product__meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.checkout-product__price {
    font-weight: 700;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

/* =============================================
   Результат заказа
   ============================================= */
.order-success {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.order-success__icon {
    font-size: 4rem;
    color: var(--color-success);
    margin-bottom: 20px;
}

.order-success h1 {
    margin-bottom: 12px;
}

.order-success p {
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.order-number {
    display: inline-block;
    background: var(--color-beige);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 20px 0;
}

/* =============================================
   Страница-заглушка
   ============================================= */
.page-header {
    background:
        radial-gradient(ellipse 60% 100% at 0% 50%, rgba(107, 143, 113, 0.2) 0%, transparent 55%),
        linear-gradient(155deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    color: var(--color-white);
    padding: clamp(44px, 8vw, 64px) 0;
    text-align: center;
    border-bottom: 1px solid rgba(201, 162, 39, 0.22);
}

.page-header h1 {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.55;
}

/* =============================================
   Админ-панель
   ============================================= */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--color-brown);
    color: var(--color-white);
    padding: 24px 0;
}

.admin-sidebar__brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar__brand h3 {
    color: var(--color-white);
    font-size: 1.1rem;
}

.admin-sidebar__brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    transition: all var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
}

.admin-nav a i {
    width: 20px;
    text-align: center;
}

.admin-content {
    padding: 24px 32px;
    background: var(--color-cream);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-header h1 {
    font-size: 1.6rem;
}

/* Таблица в админке */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th {
    background: var(--color-beige);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-brown);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

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

.admin-table tr:hover td {
    background: rgba(45, 106, 46, 0.03);
}

/* Статусы */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-new        { background: #e3f2fd; color: #1565c0; }
.status-confirmed  { background: #e8f5e9; color: #2e7d32; }
.status-processing { background: #fff3e0; color: #e65100; }
.status-ready      { background: #e0f7fa; color: #00695c; }
.status-delivered  { background: #f1f8e9; color: #33691e; }
.status-cancelled  { background: #fce4ec; color: #c62828; }

/* Логин */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--color-beige);
}

.login-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--color-text-light);
    margin-bottom: 28px;
}

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal__header h3 {
    font-size: 1.2rem;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 4px;
}

.modal__body {
    padding: 24px;
}

.modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Карточка «Процесс» */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    counter-reset: step;
}

.process-step {
    text-align: center;
    padding: 36px 22px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 205, 192, 0.55);
    position: relative;
    counter-increment: step;
    transition: box-shadow var(--transition), transform var(--transition);
}

.process-step:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.process-step::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--color-primary-light), var(--color-primary));
    color: var(--color-white);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 auto 18px;
    box-shadow: 0 4px 14px rgba(31, 77, 58, 0.25);
}

.process-step h4 {
    margin-bottom: 10px;
    font-size: 1.08rem;
    color: var(--color-primary-dark);
}

.process-step p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* SVG заглушка */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-beige);
    color: var(--color-brown-light);
    font-size: 3rem;
}

/* =============================================
   Адаптивность
   ============================================= */
@media (max-width: 1024px) {
    .hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__image img,
    .about-image img,
    .about-image .hero__image img {
        width: 260px;
        height: 260px;
    }

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

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

    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

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

    .about-grid--reverse {
        direction: ltr;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar__hours {
        display: none;
    }

    .header__nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        z-index: 999;
    }

    .header__nav.open {
        display: flex;
    }

    .header__nav a {
        font-size: 1.2rem;
        padding: 12px 32px;
    }

    .header__burger {
        display: flex;
    }

    .hero {
        padding: 50px 0;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__desc {
        font-size: 1rem;
    }

    .section {
        padding: 50px 0;
    }

    .section__title {
        font-size: 1.7rem;
    }

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

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .category-filter {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .category-filter a {
        flex-shrink: 0;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        margin-bottom: 16px;
        background: var(--color-white);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-brown);
        margin-right: 12px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.6rem;
    }

    .hero__image img,
    .about-image img,
    .about-image .hero__image img {
        width: 200px;
        height: 200px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .product-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-card__footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Утилиты */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
