/* ============================================
   style.css — Полный файл с квадратными фото
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #faf8f4;
    color: #333;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================
   STICKY-ШАПКА (всегда наверху при скролле)
   ============================================ */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff5e6;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Шапка */
header {
    background: #fff5e6;
    padding: 15px 30px 10px 30px;
    border-bottom: 1px solid #e8d5b8;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Логотип слева */
.logo {
    text-align: left;
    flex-shrink: 0;
}

.logo-top {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.logo-text {
    color: #1e3a1e;
}

.logo-number {
    color: #4a7c3a;
}

.logo-sub {
    font-size: 10px;
    color: #666;
    letter-spacing: 3px;
    margin-top: 2px;
    text-transform: lowercase;
}

/* Центральный блок */
.header-center {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

header h1 {
    color: #5a3d2b;
    margin: 0;
    font-size: 20px;
}

.header-city {
    font-size: 16px;
    color: #5a3d2b;
    font-weight: bold;
    margin: 2px 0 0 0;
}

/* Корзина справа */
.cart-link {
    flex-shrink: 0;
}

.cart-link a {
    display: inline-block;
    padding: 10px 20px;
    background: #d9b382;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
    white-space: nowrap;
    font-size: 14px;
}

.cart-link a:hover {
    background: #b88a5e;
}

/* Условия доставки */
.header-delivery {
    max-width: 1200px;
    margin: 8px auto 0 auto;
    text-align: center;
    color: #5a3d2b;
    font-size: 13px;
}

/* ============================================
   МЕНЮ КАТЕГОРИЙ (внутри sticky-шапки)
   ============================================ */
.category-menu {
    background: #1e3a1e;
    padding: 0 30px;
}

.category-menu-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.category-menu-scroll {
    display: flex;
    overflow-x: auto;
    gap: 2px;
    padding: 6px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.category-menu-scroll::-webkit-scrollbar {
    height: 3px;
}

.category-menu-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.category-menu-scroll::-webkit-scrollbar-thumb {
    background: #4a7c3a;
    border-radius: 2px;
}

.category-menu-scroll .menu-item {
    flex-shrink: 0;
    padding: 8px 16px;
    color: #d9d4c4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.25s;
    white-space: nowrap;
}

.category-menu-scroll .menu-item:hover {
    background: rgba(217, 179, 130, 0.15);
    color: #fff;
}

.category-menu-scroll .menu-item.active {
    background: #4a7c3a;
    color: #fff;
    font-weight: 600;
}

/* ============================================
   БАННЕР С ИНФОРМАЦИЕЙ О ЗАКАЗЕ
   ============================================ */
.order-banner {
    background: linear-gradient(135deg, #fff5e6 0%, #f5e6d3 100%);
    margin: 20px;
    padding: 30px 40px;
    border-radius: 16px;
    border: 2px solid #d9b382;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.order-banner .banner-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.order-banner .banner-content h2 {
    color: #5a3d2b;
    font-size: 28px;
    margin-bottom: 10px;
}

.order-banner .banner-content > p {
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.order-banner .banner-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.order-banner .feature {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #555;
    transition: transform 0.2s;
}

.order-banner .feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-banner .feature span:first-child {
    font-size: 24px;
}

.order-banner .feature strong {
    color: #a5623a;
}

/* ============================================
   КАТЕГОРИИ И ТОВАРЫ
   ============================================ */
main {
    background: #faf8f4;
}

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

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0d5b0;
}

.category-header h2 {
    color: #5a3d2b;
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.btn-up {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #5a3d2b;
    border: 1px solid #5a3d2b;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-up:hover {
    background: #5a3d2b;
    color: #fff;
}

.btn-up .arrow {
    font-size: 16px;
}

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

.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    border: 1px solid #ebe5d8;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 58, 30, 0.12);
    border-color: #d9b382;
}

.product-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   КВАДРАТНОЕ ФОТО ТОВАРА
   ============================================ */
.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    background: #f0ebe0;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 15px;
    margin: 4px 0;
    min-height: 40px;
    color: #5a3d2b;
    font-weight: 600;
    line-height: 1.3;
}

.product-card .price {
    color: #a5623a;
    font-weight: 800;
    font-size: 20px;
    margin-top: auto;
}

.product-card small {
    display: block;
    color: #888;
    font-size: 12px;
    min-height: 18px;
}

.product-card .order-label {
    display: inline-block;
    color: #a5623a;
    font-size: 11px;
    background: #f5e6d3;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 6px;
    font-weight: 600;
    min-height: auto;
    align-self: center;
}

/* ============================================
   УПРАВЛЕНИЕ КОЛИЧЕСТВОМ
   ============================================ */
.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    justify-content: center;
}

.qty-control button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #d9b382;
    background: white;
    color: #d9b382;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.qty-control button:hover {
    background: #d9b382;
    color: white;
}

.qty-control input {
    width: 55px;
    text-align: center;
    padding: 5px;
    border: 1.5px solid #d0c8b8;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #5a3d2b;
}

.product-card .qty-control {
    margin: 8px 0 6px 0;
}

.product-card .qty-control input {
    width: 48px;
    font-size: 14px;
    padding: 3px;
}

.product-card .qty-control button {
    width: 26px;
    height: 26px;
    font-size: 14px;
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn, .add-to-cart {
    display: inline-block;
    margin-top: 6px;
    padding: 10px 20px;
    background: #d9b382;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.25s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.btn:hover, .add-to-cart:hover {
    background: #b88a5e;
}

/* ============================================
   ПОДВАЛ (общий контейнер)
   ============================================ */
footer {
    background: #f5f1e8;
    margin-top: 40px;
    border-top: 1px solid #e0d8c8;
}

/* ============================================
   БЛОК "ОТ ЗАКАЗА ДО УЖИНА"
   ============================================ */
.how-it-works {
    background: #faf7f0;
    padding: 70px 40px 60px 40px;
    border-bottom: 1px solid #e8e2d5;
}

.how-content {
    max-width: 1200px;
    margin: 0 auto;
}

.how-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.how-label {
    font-size: 12px;
    color: #4a7c3a;
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.how-title {
    font-size: 56px;
    line-height: 1.05;
    color: #1e3a1e;
    font-weight: 900;
    letter-spacing: -1.5px;
    max-width: 600px;
}

.how-title em {
    font-style: italic;
    font-weight: 400;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: -1px;
}

.how-note {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    text-align: right;
    max-width: 260px;
    margin-top: 40px;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.step-number {
    font-size: 72px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    color: #a8b8a0;
    line-height: 1;
    margin-bottom: 15px;
    font-weight: 400;
}

.step-title {
    font-size: 22px;
    color: #1e3a1e;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.step-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.how-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0d8c8;
    flex-wrap: wrap;
}

.how-footer-item {
    font-size: 14px;
    color: #888;
}

/* ============================================
   БЛОК ДЛЯ КАФЕ, БАРОВ, РЕСТОРАНОВ
   ============================================ */
.b2b-section {
    background: #1e3a1e;
    color: #f5f1e8;
    padding: 80px 40px;
    margin: 40px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.b2b-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(122, 179, 66, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.b2b-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.b2b-label {
    font-size: 12px;
    color: #7cb342;
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.b2b-title {
    font-size: 64px;
    line-height: 1.05;
    color: #f5f1e8;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 25px;
}

.b2b-title em {
    font-style: italic;
    font-weight: 400;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: -1px;
}

.b2b-desc {
    font-size: 17px;
    color: #c8cfbf;
    line-height: 1.6;
    margin-bottom: 40px;
}

.b2b-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    background: #e8c870;
    color: #1e3a1e;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid #e8c870;
}

.b2b-btn:hover {
    background: #f0d488;
    border-color: #f0d488;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(232, 200, 112, 0.3);
}

.b2b-btn-arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.b2b-btn:hover .b2b-btn-arrow {
    transform: translate(3px, -3px);
}

/* ============================================
   ОСНОВНОЙ ПОДВАЛ
   ============================================ */
.footer-main {
    padding: 50px 40px 25px 40px;
    border-top: 1px solid #e0d8c8;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 35px;
    border-bottom: 1px solid #e0d8c8;
}

.footer-brand {
    text-align: left;
}

.footer-logo {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1;
}

.footer-logo .logo-text {
    color: #1e3a1e;
}

.footer-logo .logo-number {
    color: #4a7c3a;
}

.footer-logo-sub {
    font-size: 11px;
    color: #666;
    letter-spacing: 3px;
    margin-top: 4px;
    text-transform: lowercase;
}

.footer-address {
    text-align: center;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    padding-top: 5px;
}

.footer-address p {
    margin: 3px 0;
}

.footer-email-block {
    text-align: right;
    padding-top: 5px;
}

.footer-email-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.footer-email-big {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 600;
    color: #1e3a1e;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-email-big:hover {
    color: #4a7c3a;
    border-bottom-color: #4a7c3a;
}

.footer-email-arrow {
    font-size: 18px;
    transition: transform 0.3s;
}

.footer-email-big:hover .footer-email-arrow {
    transform: translate(3px, -3px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copy {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.footer-up {
    font-size: 13px;
    color: #1e3a1e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 1px dashed transparent;
    padding-bottom: 2px;
}

.footer-up:hover {
    color: #4a7c3a;
    border-bottom-color: #4a7c3a;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшеты большие */
@media (max-width: 1024px) {
    .how-title { font-size: 44px; }
    .b2b-title { font-size: 50px; }
    .how-steps { gap: 30px; }
    .step-number { font-size: 60px; }
}

/* Планшеты средние */
@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    .logo {
        text-align: center;
        order: 1;
        width: 100%;
    }

    .header-center {
        order: 2;
        width: 100%;
    }

    .cart-link {
        order: 3;
        width: 100%;
        text-align: center;
    }

    .logo-top { font-size: 32px; }

    header h1 { font-size: 18px; }
    .header-city { font-size: 14px; }
    .header-delivery { font-size: 12px; }

    .how-title { font-size: 38px; }
    .b2b-title { font-size: 42px; }
    .how-steps { grid-template-columns: 1fr; gap: 30px; }
    .how-header { flex-direction: column; gap: 20px; }
    .how-note { text-align: left; margin-top: 0; max-width: 100%; }
}

/* Мобильные */
@media (max-width: 768px) {
    header {
        padding: 12px 15px 8px 15px;
    }

    .category-menu {
        padding: 0 15px;
    }

    .category-menu-scroll .menu-item {
        font-size: 12px;
        padding: 6px 12px;
    }

    .logo-top { font-size: 28px; }
    .logo-sub { font-size: 9px; letter-spacing: 2px; }

    header h1 { font-size: 16px; }
    .header-city { font-size: 13px; }

    .cart-link a {
        padding: 8px 16px;
        font-size: 13px;
    }

    .order-banner {
        padding: 20px;
        margin: 10px;
    }

    .order-banner .banner-content h2 {
        font-size: 22px;
    }

    .order-banner .banner-content > p {
        font-size: 15px;
    }

    .order-banner .banner-features {
        grid-template-columns: 1fr;
    }

    .category {
        padding: 25px 15px 15px 15px;
    }

    .category-header h2 {
        font-size: 24px;
    }

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

    .product-card {
        min-height: 340px;
        padding: 10px;
    }

    /* Квадратное фото сохраняется */
    .product-card img {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .product-card h3 {
        font-size: 13px;
        min-height: 34px;
    }

    .product-card .price {
        font-size: 17px;
    }

    .how-it-works {
        padding: 45px 20px 40px 20px;
    }

    .how-label {
        font-size: 10px;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }

    .how-title {
        font-size: 32px;
    }

    .how-note {
        font-size: 14px;
    }

    .step-number {
        font-size: 52px;
    }

    .step-title {
        font-size: 19px;
    }

    .step-desc {
        font-size: 14px;
    }

    .how-footer {
        flex-direction: column;
        gap: 12px;
        padding-top: 20px;
    }

    .how-footer-item {
        font-size: 13px;
    }

    .b2b-section {
        padding: 50px 25px;
        margin: 25px 15px;
        border-radius: 12px;
    }

    .b2b-label {
        font-size: 10px;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }

    .b2b-title {
        font-size: 34px;
    }

    .b2b-desc {
        font-size: 15px;
    }

    .b2b-btn {
        padding: 15px 26px;
        font-size: 15px;
    }

    .footer-main {
        padding: 35px 20px 20px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
        padding-bottom: 25px;
    }

    .footer-brand,
    .footer-address,
    .footer-email-block {
        text-align: center;
    }

    .footer-logo {
        font-size: 32px;
    }

    .footer-email-big {
        font-size: 18px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .logo-top { font-size: 26px; }

    header h1 { font-size: 14px; }
    .header-city { font-size: 12px; }
    .header-delivery { font-size: 11px; }

    .cart-link a {
        padding: 7px 14px;
        font-size: 12px;
    }

    .category-menu-scroll .menu-item {
        font-size: 11px;
        padding: 5px 10px;
    }

    .how-title {
        font-size: 26px;
    }

    .step-number {
        font-size: 44px;
    }

    .step-title {
        font-size: 17px;
    }

    .b2b-title {
        font-size: 28px;
    }

    .b2b-section {
        padding: 40px 20px;
    }

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

    .product-card {
        min-height: 300px;
        padding: 8px;
    }

    /* Квадратное фото сохраняется */
    .product-card img {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .product-card h3 {
        font-size: 12px;
        min-height: 30px;
    }

    .product-card .price {
        font-size: 15px;
    }

    .category-header h2 {
        font-size: 20px;
    }

    .footer-logo {
        font-size: 28px;
    }

    .footer-email-big {
        font-size: 16px;
    }

    .footer-address {
        font-size: 14px;
    }
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.3s ease-in;
}

.order-banner {
    animation: fadeIn 0.5s ease-in;
}

img {
    opacity: 1;
    transition: opacity 0.15s;
}

/* ============================================
   СТАТУС "В НАЛИЧИИ"
   ============================================ */
.product-card .order-label.instock {
    color: #155724;
    background: #d4edda;
}

.product-info .order-label-big.instock {
    color: #155724;
    background: #d4edda;
}