/* ============================================
   ПЛЕМЕННАЯ — style.css
   Референс: dribbble.com/shots/26584534
   ============================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

/* === CSS ПЕРЕМЕННЫЕ === */
:root {
    --color-primary:       #C8824A;
    --color-primary-dark:  #A6672E;
    --color-primary-light: #F5E6D6;
    --color-bg-main:       #FFFBF7;
    --color-bg-section:    #FDF6EE;
    --color-bg-card:       #FFFFFF;
    --color-text-h:        #2C1810;
    --color-text-body:     #4A3728;
    --color-text-muted:    #9B8070;
    --color-border:        #EDE0D4;
    --font-heading:        'Playfair Display', Georgia, serif;
    --font-body:           'Inter', 'Segoe UI', Arial, sans-serif;
    --radius-card:         16px;
    --radius-pill:         50px;
    --shadow-card:         0 2px 16px rgba(200, 130, 74, 0.10);
    --shadow-card-hover:   0 8px 32px rgba(200, 130, 74, 0.18);
    --transition:          0.2s ease;
}

/* === СБРОС И БАЗА === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-body);
    background: var(--color-bg-main);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === КНОПКИ === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-primary);
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--color-primary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-outline:hover {
    background: var(--color-bg-section);
    transform: translateY(-1px);
}

/* === ШАПКА === */
.header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition);
}
.header.scrolled {
    box-shadow: 0 2px 20px rgba(200, 130, 74, 0.10);
}
.header .container {
    display: flex;
    align-items: center;
    gap: 40px;
}
.logo {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
    letter-spacing: -0.5px;
}
.nav {
    display: flex;
    gap: 28px;
    flex: 1;
}
.nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-body);
    transition: color var(--transition);
    position: relative;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}
.nav a:hover { color: var(--color-primary); }
.nav a:hover::after { width: 100%; }

/* === HERO === */
.hero {
    background: var(--color-bg-section);
    padding: 80px 0 64px;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-content {}
.hero-badge {
    display: inline-block;
    background: var(--color-primary-light);
    color: #8B4513;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text-h);
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero h1 span { color: var(--color-primary); }
.hero-sub {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}
.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.hero-stats {
    display: flex;
    gap: 32px;
}
.hero-stat-num {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-h);
}
.hero-stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
}
.hero-visual {
    background: var(--color-primary-light);
    border-radius: 24px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    position: relative;
    overflow: hidden;
}
.hero-visual::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(200,130,74,0.12);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

/* === КАТЕГОРИИ === */
.categories {
    padding: 80px 0;
    background: #fff;
}
.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-h);
    text-align: center;
    margin-bottom: 48px;
}
.section-title span { color: var(--color-primary); }

.cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cat-card {
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.cat-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.cat-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 12px rgba(200,130,74,0.15);
}
.cat-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-h);
}
.cat-count {
    font-size: 12px;
    color: var(--color-text-muted);
    background: var(--color-bg-section);
    padding: 3px 10px;
    border-radius: 20px;
}

/* === ТОВАРЫ === */
.products {
    padding: 80px 0;
    background: var(--color-bg-section);
}
.products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
}
.products-header .section-title { margin-bottom: 0; text-align: left; }
.view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}
.view-all:hover { gap: 8px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.product-img {
    height: 180px;
    background: var(--color-bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
}
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.product-badge.stop {
    background: #FDEAEA;
    color: #D95B5B;
}
.product-body {
    padding: 16px 20px 20px;
}
.product-body h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-h);
    margin-bottom: 6px;
}
.product-weight {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-price {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
}
.btn-cart {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-cart:hover {
    background: var(--color-primary-dark);
    transform: scale(1.03);
}

/* === КАК ЗАКАЗАТЬ === */
.how-to-order {
    padding: 80px 0;
    background: #fff;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}
.steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(12.5% + 12px);
    right: calc(12.5% + 12px);
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}
.step {
    text-align: center;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}
.step-num {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(200,130,74,0.30);
}
.step h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-h);
    margin-bottom: 8px;
}
.step p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* === КОНТАКТЫ === */
.contacts {
    padding: 80px 0;
    background: var(--color-bg-section);
}
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-card {
    background: #fff;
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: var(--shadow-card);
}
.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--color-text-h);
    margin-bottom: 20px;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
}
.contact-row:last-of-type { border-bottom: none; }
.contact-icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.contact-label { font-size: 12px; color: var(--color-text-muted); }
.contact-value { font-size: 15px; font-weight: 500; color: var(--color-text-h); }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    transition: background var(--transition), transform var(--transition);
}
.btn-whatsapp:hover {
    background: #1db954;
    transform: translateY(-1px);
}

/* === ФУТЕР === */
.footer {
    background: var(--color-text-h);
    padding: 32px 0;
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
}
.footer-info {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.footer-copy {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-visual { height: 260px; font-size: 64px; }
    .hero h1 { font-size: 38px; }
    .cats-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 32px; }
    .hero-stats { gap: 20px; }
    .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .products-grid { grid-template-columns: 1fr; }
    .contacts-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; gap: 16px; }
    .section-title { font-size: 28px; }
    .footer .container { flex-direction: column; gap: 12px; text-align: center; }
}
/* === КОРЗИНА === */

/* Кнопка корзины в шапке */
.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Счётчик товаров на кнопке */
.cart-counter {
    background: #fff;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Уведомление сверху */
.cart-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #2C1810;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    white-space: nowrap;
}
.cart-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Тёмный фон за панелью */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 24, 16, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Боковая панель корзины */
.cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(44, 24, 16, 0.15);
    transition: right 0.35s ease;
}
.cart-panel.open {
    right: 0;
}

/* Шапка панели */
.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}
.cart-panel-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--color-text-h);
}
.cart-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition);
}
.cart-close:hover {
    background: var(--color-bg-section);
    color: var(--color-text-h);
}

/* Список товаров */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: 40px 0;
    font-size: 15px;
}

/* Карточка товара в корзине */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-item-emoji {
    font-size: 32px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-bg-section);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-h);
    margin-bottom: 2px;
}
.cart-item-weight {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Кнопки +/- */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-section);
    border-radius: var(--radius-pill);
    padding: 4px 8px;
}
.cart-item-controls button {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
    line-height: 1;
}
.cart-item-controls button:hover {
    background: var(--color-primary-light);
}
.cart-item-controls span {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-h);
    min-width: 16px;
    text-align: center;
}
.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Футер панели */
.cart-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-section);
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--color-text-body);
}
.cart-total-row strong {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--color-text-h);
}
/* === ФОРМА ЗАКАЗА === */
.order-section {
    padding: 80px 0;
    background: #fff;
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Переключатель доставка/самовывоз */
.delivery-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--color-bg-section);
    padding: 6px;
    border-radius: var(--radius-pill);
}
.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.toggle-btn.active {
    background: #fff;
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(200,130,74,0.15);
}

/* Поля формы */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-body);
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text-h);
    background: var(--color-bg-main);
    transition: border-color var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--color-primary);
    background: #fff;
}
.form-input.error {
    border-color: #D95B5B;
    background: #FFF5F5;
}
.form-textarea {
    min-height: 100px;
    resize: vertical;
}
.form-error {
    display: block;
    font-size: 12px;
    color: #D95B5B;
    margin-top: 4px;
    min-height: 16px;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    justify-content: center;
    margin-top: 8px;
}

/* Итог заказа */
.order-summary {
    background: var(--color-bg-section);
    border-radius: var(--radius-card);
    padding: 28px;
    position: sticky;
    top: 90px;
}
.order-summary h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--color-text-h);
    margin-bottom: 20px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--color-text-body);
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.summary-divider {
    height: 1px;
    background: var(--color-border);
    margin: 16px 0;
}
.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--color-text-body);
    margin-bottom: 16px;
}
.summary-total-row strong {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-text-h);
}
.summary-note {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
}

/* Успешная отправка */
.order-success {
    text-align: center;
    padding: 40px 20px;
}
.success-icon {
    width: 64px;
    height: 64px;
    background: #E8F5E0;
    color: #5A9E6F;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.order-success h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-text-h);
    margin-bottom: 12px;
}
.order-success p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}
.success-note {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .order-grid { grid-template-columns: 1fr; }
    .order-summary { position: static; }
}
