/* ========== БАЗА ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background: #faf6f1; /* светлый фон под логотип */
    color: #111827;
}

a {
    color: inherit;
}

/* Контейнер */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

/* ========== ШАПКА (фронт + админка) ========== */
.site-header,
header {
    background: #ffffff;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.header-tagline {
    font-size: 13px;
    color: #6b7280;
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a,
.main-nav span {
    margin-left: 16px;
    text-decoration: none;
    font-size: 14px;
    color: #4b5563;
    position: relative;
}

.main-nav a:first-child {
    margin-left: 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: #ff4b2b;
    transition: width 0.18s ease;
}

.main-nav a:hover {
    color: #111827;
}

.main-nav a:hover::after {
    width: 100%;
}

/* При скролле чуть приподнимаем шапку */
.header-scrolled {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

/* Верхняя плашка */
.top-strip {
    background: #fff7f3;
    border-bottom: 1px solid #ffe2d5;
    font-size: 13px;
    color: #6b7280;
}

.top-strip-inner {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.top-strip-contact a {
    text-decoration: none;
    color: #ff4b2b;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-primary {
    background: #ff4b2b;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 75, 43, 0.35);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    background: #e6381b;
    box-shadow: 0 6px 18px rgba(230, 56, 27, 0.45);
}

.btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.btn-link {
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #111827;
}

/* Пружинка для кнопок (используется JS) */
.btn-press {
    transform: scale(0.96) !important;
    box-shadow: none !important;
}

/* ========== HERO-БЛОК ========== */
.hero {
    margin-top: 16px;
    margin-bottom: 24px;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;
}

.hero-text {
    flex: 1.2;
    min-width: 260px;
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 18px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #f3f4f6;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff1ec;
    font-size: 12px;
    margin-bottom: 8px;
    color: #c2410c;
    font-weight: 600;
}

.hero-tag::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff4b2b;
}

.hero-text h2 {
    margin: 0 0 8px;
    font-size: 26px;
    color: #111827;
}

.hero-text p {
    margin: 0 0 12px;
    font-size: 14px;
    color: #4b5563;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hero-benefits {
    list-style: none;
    padding-left: 16px;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.hero-benefits li::marker {
    content: "• ";
}

/* Hero карточка справа */
.hero-illustration {
    flex: 1;
    min-width: 260px;
    display: flex;
    justify-content: center;
}

.hero-card {
    background: #ffffff;
    color: #111827;
    border-radius: 18px;
    padding: 16px;
    max-width: 360px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    border: 1px solid #f3f4f6;
}

.hero-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
}

.hero-card-main {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 6px;
}

.hero-card-img-placeholder {
    flex: 1;
    min-width: 100px;
    background: #fff4ed;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ffb199;
    color: #c2410c;
}

.hero-card-info {
    flex: 1.2;
    font-size: 12px;
}

.hero-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-card-text {
    font-size: 12px;
    color: #4b5563;
    margin-bottom: 6px;
}

.hero-card-meta {
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #6b7280;
}

.hero-card-footer {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
}

/* ========== ПОИСК ========== */
.search-section {
    margin: 8px 0 14px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 220px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.search-input:focus {
    border-color: #ff4b2b;
    box-shadow: 0 0 0 1px rgba(255, 75, 43, 0.25);
}

.search-button {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    background: #ff4b2b;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 75, 43, 0.35);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.search-button:hover {
    background: #e6381b;
    box-shadow: 0 6px 18px rgba(230, 56, 27, 0.45);
}

.search-reset {
    font-size: 13px;
    text-decoration: none;
    color: #f97316;
}

.search-reset:hover {
    color: #c2410c;
}

/* ========== КАТЕГОРИИ (витрина) ========== */
.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 14px;
    text-decoration: none;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.category-chip:hover {
    background: #fff4ed;
    border-color: #ffb199;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.category-chip.active {
    background: #ff4b2b;
    color: #ffffff;
    border-color: #ff4b2b;
    box-shadow: 0 4px 14px rgba(255, 75, 43, 0.35);
}

/* ========== СЕКЦИЯ ТОВАРОВ ========== */
.products-section {
    margin-top: 8px;
}

.section-title {
    font-size: 20px;
    margin: 0 0 10px;
    color: #111827;
}

/* Сетка */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* Карточка товара */
.product-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 12px 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    border: 1px solid #f3f4f6;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
    border-color: #ffb199;
}

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

.product-image-wrapper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Форма "В корзину" */
.product-add-form {
    margin-top: 8px;
}

/* Текст в карточке */
.product-card h3 {
    font-size: 16px;
    margin: 4px 0 6px;
    color: #111827;
}

.product-category {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    margin: 4px 0;
    color: #16a34a;
}

.product-sku {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 6px;
}

.product-desc {
    font-size: 13px;
    color: #374151;
    margin: 0;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-page {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 8px;
}

.product-page-image {
    flex: 1;
    min-width: 260px;
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.product-page-image img {
    max-width: 100%;
    border-radius: 10px;
    display: block;
}

.product-page-image-placeholder {
    width: 100%;
    padding: 40px;
    border-radius: 10px;
    background: #f3f4f6;
    text-align: center;
    color: #9ca3af;
}

.product-page-info {
    flex: 1;
    min-width: 260px;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #f3f4f6;
}

.product-page-info h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.product-page-category {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 6px;
}

.product-page-price {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0 8px;
    color: #16a34a;
}

.product-page-sku {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 8px;
}

.product-page-desc {
    font-size: 14px;
    color: #374151;
    margin-top: 12px;
}

/* Форма на странице товара */
.product-page-cart-form {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.qty-input {
    width: 70px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

/* ========== КОРЗИНА (фронт) ========== */
.cart-page h1 {
    margin-top: 0;
}

.cart-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    min-width: 600px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cart-table th,
.cart-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.cart-table th {
    background: #fff4ed;
    color: #6b7280;
    text-align: left;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-product-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-actions {
    margin-top: 10px;
}

.cart-summary {
    margin-top: 16px;
    font-size: 15px;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

/* Оформление заказа */
.order-section {
    margin-top: 30px;
    background: #ffffff;
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #f3f4f6;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-form input[type="text"],
.order-form textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.order-form textarea {
    resize: vertical;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #16a34a33;
    color: #166534;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* ========== БЛОК ПРЕИМУЩЕСТВ ========== */
.advantages-section {
    margin-top: 32px;
    margin-bottom: 24px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.adv-card {
    background: #ffffff;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    font-size: 14px;
    border: 1px solid #f3f4f6;
}

.adv-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 15px;
}

/* ========== ФУТЕР ========== */
.site-footer {
    margin-top: 24px;
    background: #111827;
    color: #e5e7eb;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 8px;
}

.footer-col h3,
.footer-col h4 {
    margin-top: 0;
    margin-bottom: 6px;
}

.footer-col p {
    margin: 2px 0;
    font-size: 13px;
    color: #cbd5f5;
}

.site-footer a {
    color: #f97316;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    font-size: 12px;
    padding: 6px 0 10px;
    text-align: left;
}

/* ========== АДМИНКА ========== */

/* Двухколоночный layout (товары + форма) */
.admin-two-cols {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Обёртка таблиц в админке */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
}

.table-wrapper .cart-table {
    min-width: 700px;
}

/* Селект статуса заказа */
.order-status-select {
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
}

/* ========== АНИМАЦИИ (под main.js) ========== */
.product-card,
.adv-card,
.hero,
.hero-card {
    opacity: 0;
    transform: translateY(25px);
    transition: 0.6s ease;
}

.anim-show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Бургер-меню */
.burger {
    width: 30px;
    height: 22px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 3px;
    background: #111827;
    border-radius: 3px;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        background: #ffffff;
        padding: 12px;
        border-radius: 12px;
        position: absolute;
        top: 60px;
        right: 16px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    }

    .main-nav.nav-open {
        display: flex;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 12px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .main-nav a,
    .main-nav span {
        margin-left: 0;
        margin-right: 8px;
        font-size: 13px;
    }

    .top-strip-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        margin-top: 10px;
        margin-bottom: 18px;
    }

    .hero-content {
        flex-direction: column;
    }

    .hero-text h2 {
        font-size: 22px;
    }

    .hero-text p {
        font-size: 13px;
    }

    .hero-card {
        max-width: 100%;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-button,
    .search-reset {
        align-self: flex-start;
    }

    /* Категории лентой со скроллом */
    .categories-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .category-chip {
        font-size: 13px;
        padding: 6px 10px;
    }

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

    .product-page {
        flex-direction: column;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    /* Админка в колонку */
    .admin-two-cols {
        flex-direction: column;
        gap: 20px;
    }

    .cart-table th,
    .cart-table td {
        font-size: 13px;
        padding: 8px;
    }

    .order-status-select {
        font-size: 12px;
    }
}

