/* ===========================
   YarPolimer — Main Stylesheet
   Colors from original site:
   Primary blue:   #2c5d8f
   Accent orange:  #f57c00
   Text:           #333333
   Light bg:       #f5f5f5
   Green:          #4caf50
   =========================== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    padding-bottom: 0;
}
a { color: #2c5d8f; text-decoration: none; }
a:hover { color: #f57c00; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ==================== HEADER ==================== */
.header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* Top bar — white bg, logo left, phone center, nav right */
.header-top { background: #fff; color: #333; font-size: 13px; border-bottom: 1px solid #eee; }
.header-top__inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 16px; position: relative; }
.header-logo { display: flex; align-items: center; gap: 6px; color: #333; font-weight: 700; font-size: 22px; white-space: nowrap; letter-spacing: .5px; flex-shrink: 0; }
.header-logo:hover { color: #2c5d8f; }
.header-logo__icon { color: #f57c00; font-size: 18px; }
.header-logo__img { height: 44px; width: auto; }
.header-logo-mobile { display: none; align-items: center; gap: 6px; color: #2c5d8f; font-weight: 700; font-size: 18px; white-space: nowrap; }
.header-logo-mobile .header-logo__icon { color: #f57c00; }
.header-logo-mobile .header-logo__img { height: 32px; }
.sale-action { color: #f57c00 !important; }
.header-top__nav { display: flex; gap: 18px; flex-wrap: wrap; flex-shrink: 0; }
.header-top__nav a { color: #555; font-size: 13px; }
.header-top__nav a:hover { color: #2c5d8f; }
.header-top__sale { color: #e53935 !important; font-weight: 600; }
.header-top__phone { display: flex; align-items: center; gap: 6px; position: absolute; left: 50%; transform: translateX(-50%); }
.header-top__phone a { color: #333; font-weight: 700; font-size: 20px; white-space: nowrap; }
.header-top__phone a:hover { color: #2c5d8f; }
.header-top__phone .icon { flex-shrink: 0; stroke: #2c5d8f; }

/* Main bar */
.header-main { border-bottom: 1px solid #eee; }
.header-main__inner { display: flex; align-items: center; gap: 16px; padding: 10px 0; }

.catalog-btn {
    display: flex; align-items: center; gap: 8px;
    background: #2c5d8f; color: #fff;
    padding: 10px 20px; border-radius: 6px;
    font-size: 15px; font-weight: 600;
    white-space: nowrap; transition: background .2s;
}
.catalog-btn:hover { background: #1e4a73; }
.catalog-btn .icon { stroke: #fff; }

.header-search { flex: 1; position: relative; }
.header-search__form { display: flex; }
.header-search__form input {
    flex: 1; padding: 10px 16px;
    border: 2px solid #ddd; border-right: none;
    border-radius: 6px 0 0 6px; outline: none;
    font-size: 15px;
}
.header-search__form input:focus { border-color: #2c5d8f; }
.header-search__form button {
    padding: 10px 16px; background: #2c5d8f; color: #fff;
    border: 2px solid #2c5d8f; border-radius: 0 6px 6px 0;
}
.header-search__form button:hover { background: #1e4a73; }

.search-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #ddd; border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 200; max-height: 400px; overflow-y: auto;
}
.search-dropdown.active { display: block; }
.search-dropdown__item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.search-dropdown__item:hover { background: #f5f5f5; }
.search-dropdown__item img { width: 40px; height: 40px; object-fit: contain; }
.search-dropdown__item-info { flex: 1; }
.search-dropdown__item-name { font-size: 14px; color: #333; }
.search-dropdown__item-price { font-size: 14px; font-weight: 600; color: #f57c00; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-action { display: flex; align-items: center; gap: 6px; color: #333; position: relative; white-space: nowrap; }
.header-action:hover { color: #2c5d8f; }
.header-action__label { font-size: 14px; }

.cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: #f57c00; color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px; display: flex;
    align-items: center; justify-content: center;
    padding: 0 4px;
}
.cart-badge:empty, .cart-badge[data-count="0"] { display: none; }

.burger-btn { display: none; flex-direction: column; gap: 5px; padding: 6px; order: -1; }
.burger-btn span { display: block; width: 24px; height: 2px; background: #333; transition: .3s; }

/* Mobile search icon (hidden on desktop) */
.mobile-search-btn { display: none; color: #333; padding: 6px; }
.mobile-search-btn:hover { color: #2c5d8f; }

/* Nav bar — links between header and content */
.header-nav { background: #fff; border-bottom: 2px solid #eee; }
.header-nav__inner { display: flex; gap: 24px; padding: 8px 0; }
.header-nav__inner a { color: #555; font-size: 14px; font-weight: 500; }
.header-nav__inner a:hover { color: #2c5d8f; }
.header-nav__sale { color: #e53935 !important; font-weight: 600 !important; }

/* ==================== MEGA MENU ==================== */
.mega-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 90; }
.mega-menu-overlay.active { display: block; }

.mega-menu {
    display: none; position: absolute; left: 0; right: 0;
    background: #fff; border-bottom: 3px solid #2c5d8f;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 95;
}
.mega-menu.active { display: block; }
.mega-menu__inner { display: flex; min-height: 400px; }
.mega-menu__categories { width: 280px; border-right: 1px solid #eee; padding: 8px 0; flex-shrink: 0; }
.mega-menu__item { position: relative; }
.mega-menu__item > a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: #333; font-size: 14px;
    transition: background .15s;
}
.mega-menu__item:hover > a, .mega-menu__item.active > a { background: #f5f5f5; color: #2c5d8f; }
.mega-menu__icon { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.mega-menu__arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #999; }

.mega-menu__subcategories { flex: 1; padding: 16px 24px; position: relative; }
.mega-menu__sub-panel { display: none; }
.mega-menu__sub-panel.active { display: block; }
.mega-menu__sub-panel h3 { font-size: 18px; color: #2c5d8f; margin-bottom: 16px; }
.mega-menu__sub-panel ul { columns: 2; gap: 24px; }
.mega-menu__sub-panel li { break-inside: avoid; margin-bottom: 8px; }
.mega-menu__sub-panel li a { color: #333; font-size: 14px; }
.mega-menu__sub-panel li a:hover { color: #f57c00; }
.mega-menu__sub-children { margin-top: 4px; padding-left: 16px; }
.mega-menu__sub-children li { margin-bottom: 4px; }
.mega-menu__sub-children a { font-size: 13px; color: #666; }

/* ==================== MAIN CONTENT ==================== */
.main-content { min-height: 60vh; }
.page-content { padding: 20px 0 40px; }
.page-title { font-size: 28px; font-weight: 700; color: #333; margin-bottom: 24px; }

/* Breadcrumbs */
.breadcrumbs { padding: 12px 0; font-size: 13px; color: #999; margin-bottom: 8px; }
.breadcrumbs a { color: #2c5d8f; }
.breadcrumbs a:hover { color: #f57c00; }
.breadcrumbs__sep { margin: 0 6px; color: #ccc; }

/* ==================== HERO ==================== */
.hero { background: linear-gradient(135deg, #2c5d8f 0%, #1a3d5c 100%); color: #fff; padding: 60px 0; margin-bottom: 0; }
.hero__content { max-width: 600px; }
.hero__content h1 { font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
.hero__content p { font-size: 18px; opacity: .9; margin-bottom: 24px; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 6px;
    font-size: 14px; font-weight: 600;
    transition: all .2s; border: 2px solid transparent;
}
.btn--primary { background: #f57c00; color: #fff; border-color: #f57c00; }
.btn--primary:hover { background: #e06800; border-color: #e06800; color: #fff; }
.btn--cart { background: #2c5d8f; color: #fff; border-color: #2c5d8f; font-size: 13px; padding: 8px 14px; }
.btn--cart:hover { background: #1e4a73; border-color: #1e4a73; color: #fff; }
.btn--quick { background: #eee; color: #555; border-color: #ddd; font-size: 12px; padding: 7px 10px; }
.btn--quick:hover { background: #2c5d8f; color: #fff; border-color: #2c5d8f; }
.btn--quick-full { display: block; width: 100%; text-align: center; margin-top: 8px; background: transparent; color: #2c5d8f; border: 2px solid #2c5d8f; padding: 10px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.btn--quick-full:hover { background: #2c5d8f; color: #fff; }
.btn--outline { background: transparent; color: #2c5d8f; border-color: #2c5d8f; }
.btn--outline:hover { background: #2c5d8f; color: #fff; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--full { width: 100%; }

/* ==================== SECTIONS ==================== */
.section { padding: 40px 0; }
.section--advantages { background: #f5f5f5; }
.section__title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 32px; color: #333; }

/* Advantages */
.advantages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.advantage-card { background: #fff; padding: 32px 24px; border-radius: 8px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.advantage-card__icon { margin-bottom: 16px; }
.advantage-card h3 { font-size: 16px; margin-bottom: 8px; color: #2c5d8f; }
.advantage-card p { font-size: 14px; color: #666; }

/* Categories grid */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.category-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px; background: #f9f9f9; border-radius: 8px;
    text-align: center; transition: all .2s;
    border: 1px solid #eee;
}
.category-card:hover { border-color: #2c5d8f; box-shadow: 0 4px 12px rgba(44,93,143,.15); transform: translateY(-2px); }
.category-card img { width: 120px; height: 100px; object-fit: contain; margin-bottom: 12px; }
.category-card__no-image { width: 120px; height: 100px; background: #eee; border-radius: 4px; margin-bottom: 12px; }
.category-card__name { font-size: 14px; font-weight: 600; color: #333; }

/* Category description */
.category-description { margin-bottom: 24px; font-size: 14px; line-height: 1.6; color: #555; }
.category-description p { margin-bottom: 12px; }

/* ==================== CATALOG SIDEBAR ==================== */
.catalog-with-sidebar { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.catalog-sidebar { position: sticky; top: 120px; align-self: start; }
.catalog-filters { background: #f9f9f9; border-radius: 8px; padding: 16px; }
.catalog-filters h3 { font-size: 16px; margin-bottom: 12px; color: #333; }
.filter-group { margin-bottom: 14px; }
.filter-group__title { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.filter-price-range { display: flex; align-items: center; gap: 6px; }
.filter-price-range input { width: 80px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.filter-price-range span { color: #999; }
.filter-reset { display: block; text-align: center; margin-top: 8px; font-size: 13px; color: #999; }
.filter-reset:hover { color: #e53935; }

/* ==================== PRODUCT CARDS ==================== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.products-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
.products-scroll .product-card { min-width: 240px; scroll-snap-align: start; flex-shrink: 0; }

.product-card {
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    overflow: hidden; transition: all .2s; position: relative;
    display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: #ddd; }
.product-card__badge {
    position: absolute; top: 8px; right: 8px;
    background: #e53935; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 4px; z-index: 2;
    text-transform: uppercase;
}
.product-card__image { display: block; padding: 12px; height: 200px; display: flex; align-items: center; justify-content: center; }
.product-card__image img { max-height: 176px; object-fit: contain; }
.product-card__no-image { width: 100%; height: 176px; background: #f5f5f5; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 13px; }
.product-card__info { padding: 12px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card__name { font-size: 14px; color: #333; font-weight: 500; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; min-height: 2.8em; }
.product-card__name:hover { color: #2c5d8f; }
.product-card__price { margin-bottom: 12px; margin-top: auto; }
.product-card__price-old { text-decoration: line-through; color: #999; font-size: 14px; margin-right: 6px; }
.product-card__price-new { color: #e53935; font-size: 20px; font-weight: 700; }
.product-card__price-current { color: #333; font-size: 20px; font-weight: 700; }
.product-card__units { color: #999; font-size: 13px; }
.product-card__actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.product-card__quick-link { background: none; border: none; color: #2c5d8f; font-size: 13px; cursor: pointer; text-align: center; padding: 4px 0; }
.product-card__quick-link:hover { color: #f57c00; text-decoration: underline; }

/* ==================== CATALOG TOOLBAR ==================== */
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.catalog-toolbar__count { font-size: 14px; color: #666; }
.catalog-toolbar__sort { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.catalog-toolbar__sort select { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 32px; }
.pagination__link {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px;
    border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; color: #333; background: #fff;
}
.pagination__link:hover { border-color: #2c5d8f; color: #2c5d8f; }
.pagination__link--active { background: #2c5d8f; color: #fff; border-color: #2c5d8f; }

/* ==================== PRODUCT DETAIL ==================== */
.product-page { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; margin-bottom: 40px; }

.product-gallery__main { border: 1px solid #eee; border-radius: 8px; padding: 20px; margin-bottom: 12px; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.product-gallery__main img { max-height: 400px; object-fit: contain; }
.product-gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-gallery__thumb { width: 70px; height: 70px; border: 2px solid #eee; border-radius: 4px; cursor: pointer; overflow: hidden; padding: 4px; }
.product-gallery__thumb.active { border-color: #2c5d8f; }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

.product-info__name { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.product-info__brand { font-size: 14px; color: #666; margin-bottom: 16px; }
.product-info__price { margin-bottom: 20px; }
.product-info__price-old { text-decoration: line-through; color: #999; font-size: 18px; margin-right: 8px; }
.product-info__price-new { color: #f57c00; font-size: 32px; font-weight: 700; }
.product-info__price-current { color: #333; font-size: 32px; font-weight: 700; }
.product-info__units { color: #999; font-size: 16px; margin-left: 4px; }

.product-info__actions { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.product-info__quantity { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-btn { width: 36px; height: 36px; font-size: 18px; color: #333; background: #f5f5f5; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: #eee; }
.qty-input { width: 50px; height: 36px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; font-size: 15px; outline: none; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-info__stock { font-size: 14px; margin-top: 12px; }
.in-stock { color: #4caf50; }
.in-stock::before { content: '● '; }
.out-of-stock { color: #999; }

/* Product tabs */
.product-tabs { margin-bottom: 40px; }
.product-tabs__nav { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.product-tabs__btn {
    padding: 12px 24px; font-size: 15px; font-weight: 600;
    color: #666; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all .2s;
}
.product-tabs__btn:hover { color: #2c5d8f; }
.product-tabs__btn.active { color: #2c5d8f; border-bottom-color: #2c5d8f; }
.product-tabs__content { display: none; }
.product-tabs__content.active { display: block; }

.chars-table { width: 100%; border-collapse: collapse; }
.chars-table tr:nth-child(even) { background: #f9f9f9; }
.chars-table td { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #eee; }
.chars-table td:first-child { color: #666; width: 40%; }
.chars-table td:last-child { font-weight: 500; }

.docs-list li { margin-bottom: 8px; }
.docs-list a { display: flex; align-items: center; gap: 8px; color: #2c5d8f; font-size: 14px; }
.docs-list a:hover { color: #f57c00; }

.review { padding: 16px 0; border-bottom: 1px solid #eee; }
.review__header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review__rating { color: #f57c00; }
.review__date { color: #999; font-size: 13px; }
.review__text { font-size: 14px; line-height: 1.6; }
.review__answer { margin-top: 12px; padding: 12px; background: #f5f5f5; border-radius: 6px; font-size: 14px; }

/* ==================== CART ==================== */
.cart-table-wrap { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead th { padding: 12px 16px; text-align: left; border-bottom: 2px solid #eee; font-size: 14px; color: #666; font-weight: 600; }
.cart-table td { padding: 16px; border-bottom: 1px solid #eee; vertical-align: middle; }
.cart-table__product a { display: flex; align-items: center; gap: 12px; color: #333; }
.cart-table__product img { width: 60px; height: 60px; object-fit: contain; }
.cart-table__price { white-space: nowrap; font-weight: 500; }
.cart-table__subtotal { white-space: nowrap; font-weight: 700; font-size: 16px; }
.cart-table__remove button { font-size: 24px; color: #999; padding: 4px 8px; }
.cart-table__remove button:hover { color: #e53935; }

.cart-footer { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; flex-wrap: wrap; gap: 16px; }
.cart-footer__total { font-size: 20px; }
.cart-footer__actions { display: flex; gap: 12px; }

.cart-empty { text-align: center; padding: 60px 0; }
.cart-empty svg { margin: 0 auto 16px; }
.cart-empty p { font-size: 18px; color: #666; margin-bottom: 24px; }

/* ==================== ABOUT TIMELINE ==================== */
.about-content { max-width: 800px; }
.about-content p { margin-bottom: 16px; font-size: 15px; line-height: 1.7; }
.about-content h2 { font-size: 22px; color: #2c5d8f; margin: 32px 0 20px; }

.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #2c5d8f; }
.timeline__item { position: relative; margin-bottom: 32px; }
.timeline__item::before {
    content: ''; position: absolute; left: -28px; top: 4px;
    width: 12px; height: 12px; background: #f57c00;
    border-radius: 50%; border: 2px solid #fff; z-index: 1;
}
.timeline__date { font-size: 14px; color: #f57c00; font-weight: 700; margin-bottom: 4px; }
.timeline__content h3 { font-size: 16px; color: #333; margin-bottom: 4px; }
.timeline__content p { font-size: 14px; color: #666; }

/* ==================== CONTACTS ==================== */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.contacts-info__item { margin-bottom: 20px; }
.contacts-info__item h3 { font-size: 16px; color: #2c5d8f; margin-bottom: 4px; }
.contacts-info__item p { font-size: 15px; }
.contacts-form__field { margin-bottom: 12px; }
.contacts-form__field input,
.contacts-form__field textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 15px; outline: none;
}
.contacts-form__field input:focus,
.contacts-form__field textarea:focus { border-color: #2c5d8f; }
.contacts-map { border-radius: 8px; overflow: hidden; margin-top: 24px; }
.contacts-map iframe { width: 100%; min-height: 400px; }

/* ==================== VACANCY ==================== */
.vacancy-card { background: #f9f9f9; padding: 24px; border-radius: 8px; margin-bottom: 20px; }
.vacancy-card__title { font-size: 20px; color: #2c5d8f; margin-bottom: 12px; }
.vacancy-card__salary { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.vacancy-card h3 { font-size: 15px; margin: 12px 0 8px; }
.vacancy-card ul { padding-left: 20px; list-style: disc; }
.vacancy-card li { margin-bottom: 4px; font-size: 14px; }

/* ==================== TEXT CONTENT ==================== */
.text-content { max-width: 800px; line-height: 1.7; }
.text-content p { margin-bottom: 16px; }
.text-content h2 { font-size: 22px; color: #2c5d8f; margin: 28px 0 16px; }
.text-content ul { padding-left: 20px; list-style: disc; margin-bottom: 16px; }
.text-content li { margin-bottom: 6px; }
.empty-message { text-align: center; padding: 40px; color: #999; font-size: 16px; }

/* ==================== SEARCH PAGE ==================== */
.search-page__form { display: flex; gap: 12px; margin-bottom: 24px; }
.search-page__input { flex: 1; padding: 12px 16px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; outline: none; }
.search-page__input:focus { border-color: #2c5d8f; }
.search-page__count { margin-bottom: 16px; color: #666; font-size: 14px; }

/* ==================== FOOTER ==================== */
.footer { background: #2c3e50; color: #ccc; padding: 40px 0 0; margin-top: 40px; }
.footer__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 32px; }
.footer__col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer__col ul li { margin-bottom: 6px; }
.footer__col a { color: #aaa; font-size: 14px; }
.footer__col a:hover { color: #fff; }
.footer__address, .footer__phone, .footer__email, .footer__schedule { font-size: 14px; margin-bottom: 6px; }
.footer__phone a, .footer__email a { color: #fff; }
.footer__schedule { color: #aaa; margin-top: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: 13px; color: #777; }

/* ==================== MODALS ==================== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 200;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: 12px;
    padding: 32px; max-width: 420px; width: 90%;
    position: relative;
}
.modal__close { position: absolute; top: 12px; right: 16px; font-size: 28px; color: #999; }
.modal__close:hover { color: #333; }
.modal__title { font-size: 20px; margin-bottom: 8px; }
.modal__product-name { font-size: 14px; color: #666; margin-bottom: 16px; }
.modal__field { margin-bottom: 12px; }
.modal__field input, .modal__field textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 15px; outline: none;
}
.modal__field input:focus, .modal__field textarea:focus { border-color: #2c5d8f; }
.modal__consent { font-size: 12px; color: #999; margin-top: 8px; }
.modal__consent a { color: #2c5d8f; }
.modal__error { background: #ffebee; color: #c62828; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 12px; }
.modal__links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; }
.modal__links a { color: #2c5d8f; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: #555; cursor: pointer; }
.checkbox-label input { margin-top: 3px; }

/* ==================== CHECKOUT ==================== */
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.checkout-form h2 { font-size: 18px; color: #2c5d8f; margin: 24px 0 12px; }
.checkout-form h2:first-child { margin-top: 0; }
.checkout-form__field { margin-bottom: 14px; }
.checkout-form__field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; color: #555; }
.checkout-form__field input, .checkout-form__field textarea, .checkout-form__field select {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; outline: none;
}
.checkout-form__field input:focus, .checkout-form__field textarea:focus { border-color: #2c5d8f; }
.field-error { color: #e53935; font-size: 13px; }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.checkout-summary { background: #f9f9f9; border-radius: 8px; padding: 24px; position: sticky; top: 120px; }
.checkout-summary h2 { font-size: 18px; margin-bottom: 16px; }
.checkout-summary__item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; gap: 12px; }
.checkout-summary__product { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.checkout-summary__product img { width: 50px; height: 50px; object-fit: contain; flex-shrink: 0; }
.checkout-summary__name { font-size: 13px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.checkout-summary__qty { font-size: 12px; color: #999; }
.checkout-summary__subtotal { font-weight: 600; white-space: nowrap; }
.checkout-summary__total { padding-top: 16px; font-size: 18px; text-align: right; }

/* ==================== ACCOUNT ==================== */
.account-grid { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav__link { padding: 10px 16px; border-radius: 6px; color: #333; font-size: 15px; }
.account-nav__link:hover { background: #f5f5f5; color: #2c5d8f; }
.account-nav__link.active { background: #2c5d8f; color: #fff; }
.account-content h2 { font-size: 20px; color: #333; margin-bottom: 16px; }
.account-form { max-width: 400px; }

.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th { padding: 10px 12px; text-align: left; border-bottom: 2px solid #eee; font-size: 14px; color: #666; }
.orders-table td { padding: 12px; border-bottom: 1px solid #eee; font-size: 14px; }
.order-status { padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.order-status--new { background: #e3f2fd; color: #1565c0; }
.order-status--processing { background: #fff3e0; color: #e65100; }
.order-status--shipped { background: #e8f5e9; color: #2e7d32; }
.order-status--delivered { background: #e8f5e9; color: #1b5e20; }
.order-status--cancelled { background: #fce4ec; color: #c62828; }
.order-detail-info p { margin-bottom: 6px; font-size: 15px; }

/* Toast */
.toast {
    position: fixed; bottom: 80px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333; color: #fff;
    padding: 12px 24px; border-radius: 8px;
    font-size: 14px; z-index: 300;
    opacity: 0; transition: all .3s ease;
    pointer-events: none;
}
.toast.active { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(50,50,50,.95); color: #ccc; z-index: 150; padding: 12px 0;
}
.cookie-banner.active { display: block; }
.cookie-banner__inner { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.cookie-banner__inner p { font-size: 12px; flex: 1; line-height: 1.4; }
.cookie-banner__inner a { color: #8cb4d8; }
.cookie-banner__btn {
    background: #2c5d8f; color: #fff; border: none;
    padding: 8px 20px; border-radius: 4px;
    font-weight: 700; font-size: 13px; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .5px;
}
.cookie-banner__btn:hover { background: #1e4a73; }

/* ==================== MOBILE NAVIGATION ==================== */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.1);
    z-index: 100; padding: 6px 0 env(safe-area-inset-bottom, 4px);
}
.mobile-nav { justify-content: space-around; }
.mobile-nav__item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #888; font-size: 10px; padding: 4px 8px; position: relative; text-align: center; }
.mobile-nav__item:hover, .mobile-nav__item:active { color: #2c5d8f; }
.mobile-nav__item--call { color: #2c5d8f; }
.mobile-nav__call-icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: #2c5d8f; display: flex;
    align-items: center; justify-content: center;
    margin-top: -18px; box-shadow: 0 2px 8px rgba(44,93,143,.3);
}
.mobile-nav__item--call:hover .mobile-nav__call-icon,
.mobile-nav__item--call:active .mobile-nav__call-icon { background: #1e4a73; }
.mobile-nav__badge {
    position: absolute; top: -2px; right: 0;
    background: #f57c00; color: #fff;
    font-size: 10px; min-width: 16px; height: 16px;
    border-radius: 8px; display: flex;
    align-items: center; justify-content: center;
}

.mobile-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 110; }
.mobile-sidebar-overlay.active { display: block; }
.mobile-sidebar {
    position: fixed; top: 0; left: -300px; width: 300px; height: 100%;
    background: #fff; z-index: 120; transition: left .3s ease;
    overflow-y: auto;
}
.mobile-sidebar.active { left: 0; }
.mobile-sidebar__header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #eee; }
.mobile-sidebar__title { font-size: 18px; font-weight: 700; }
.mobile-sidebar__close { font-size: 28px; color: #999; }
.mobile-sidebar__search { padding: 12px 16px; }
.mobile-sidebar__search form { display: flex; }
.mobile-sidebar__search input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px 0 0 4px; outline: none; }
.mobile-sidebar__search button { padding: 8px 12px; background: #2c5d8f; color: #fff; border: 1px solid #2c5d8f; border-radius: 0 4px 4px 0; }
.mobile-sidebar__nav { padding: 8px 0; }
.mobile-sidebar__nav a { display: block; padding: 12px 16px; color: #333; font-size: 15px; border-bottom: 1px solid #f0f0f0; }
.mobile-sidebar__nav a:hover { background: #f5f5f5; color: #2c5d8f; }
.mobile-sidebar__phone { padding: 16px; border-top: 1px solid #eee; }
.mobile-sidebar__phone a { font-size: 18px; font-weight: 600; color: #2c5d8f; display: block; margin-bottom: 4px; }
.mobile-sidebar__phone span { font-size: 13px; color: #999; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .product-page { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: repeat(2, 1fr); }
    .contacts-grid { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: 1fr; }
    .catalog-with-sidebar { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .header-top__nav { display: none; }
    .header-top__phone { position: static; transform: none; }
}

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

    /* Mobile header: burger LEFT, logo CENTER, search icon RIGHT */
    .header-main__inner {
        display: flex; align-items: center; justify-content: space-between;
        position: relative;
    }
    .burger-btn { display: flex; order: 0; }
    .header-logo-mobile {
        display: flex; order: 1;
        position: absolute; left: 50%; transform: translateX(-50%);
    }
    .catalog-btn { display: none; }
    .header-search { display: none; }
    .header-actions { display: none; }
    .mobile-search-btn { display: flex; order: 2; margin-left: auto; }

    .mobile-nav { display: flex; }
    body { padding-bottom: 60px; }

    .section { padding: 24px 0; }
    .section__title { font-size: 18px; margin-bottom: 20px; }
    .page-title { font-size: 22px; }

    .advantages-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .products-scroll {
        display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
        overflow-x: visible; scroll-snap-type: none; padding-bottom: 0;
    }
    .products-scroll .product-card { min-width: 0; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .product-card__image { height: 140px; padding: 8px; }
    .product-card__info { padding: 8px 10px 12px; }
    .product-card__name { font-size: 13px; min-height: auto; -webkit-line-clamp: 2; }
    .product-card__price-current, .product-card__price-new { font-size: 16px; }
    .product-card__price-old { font-size: 12px; }
    .product-card__units { font-size: 11px; }
    .product-card__actions { flex-direction: column; gap: 4px; }
    .btn--cart { background: #2c5d8f; border-color: #2c5d8f; padding: 7px 10px; font-size: 12px; width: 100%; }
    .btn--cart:hover { background: #1e4a73; border-color: #1e4a73; }
    .btn--quick { font-size: 11px; padding: 5px 8px; background: transparent; border-color: transparent; color: #2c5d8f; }

    .footer__inner { grid-template-columns: 1fr; gap: 20px; }
    .cart-table__product span { max-width: 150px; display: inline-block; }

    .catalog-toolbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .products-grid { gap: 6px; }
    .product-card__image { height: 120px; }
    .hero__content h1 { font-size: 20px; }
    .container { padding: 0 12px; }
}
