/* assets/css/style.css — Pelastus */

:root {
    --red: #e11d1d;
    --red-dark: #b91515;
    --dark: #0f1115;
    --dark-2: #161a20;
    --text: #1c1f26;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f6f7f9;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border: none;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    font-family: var(--font);
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn--outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--outline:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 16px 34px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------- Шапка ---------- */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}
.header__logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 38px; height: 38px;
    background: var(--red);
    color: #fff;
    border-radius: 8px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 20px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 800; font-size: 20px; }
.logo-sub { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .5px; }

.header__nav { display: flex; gap: 4px; margin-left: auto; }
.header__nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text);
    transition: background .2s, color .2s;
}
.header__nav a:hover { background: #f0f1f3; }
.header__nav a.is-active { color: var(--red); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 14px; }
.header__search { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.header__search input {
    border: none; outline: none; padding: 8px 12px; font-size: 14px; width: 170px;
    font-family: var(--font);
}
.header__search button { border: none; background: #f0f1f3; padding: 0 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; align-self: stretch; color: var(--muted); }
.header__search button:hover { background: var(--red); color: #fff; }
.header__cart { position: relative; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.cart-icon {
    width: 20px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
}
.cart-label { display: inline; }
.cart-count {
    position: absolute; top: -6px; right: -10px;
    background: var(--red); color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px; display: grid; place-items: center;
    padding: 0 4px;
}
.header__burger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #0b0e13 0%, #141922 55%, #1a1114 100%);
    color: #fff;
    padding: 90px 0 100px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; right: -100px; top: -100px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(225,29,29,.28), transparent 70%);
}
.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.hero__badge {
    display: inline-block; background: rgba(225,29,29,.15);
    border: 1px solid rgba(225,29,29,.4); color: #ff8f8f;
    padding: 6px 14px; border-radius: 20px; font-size: 13px; margin-bottom: 20px;
}
.hero h1 { font-size: 48px; line-height: 1.1; font-weight: 800; margin-bottom: 20px; }
.hero h1 span { color: var(--red); }
.hero p { font-size: 18px; color: #cbd0d8; margin-bottom: 32px; max-width: 520px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section--white { background: var(--white); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__head h2 { font-size: 34px; font-weight: 800; margin-bottom: 12px; }
.section__head p { color: var(--muted); font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature__icon { font-size: 30px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---------- Сетка товаров ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.product-card__img { position: relative; aspect-ratio: 4/3; background: #f0f1f3; display: grid; place-items: center; overflow: hidden; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__ph { font-size: 48px; font-weight: 800; color: #c3c7cd; }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge--new { background: var(--red); color: #fff; }
.product-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-card__cat { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.product-card__title { font-weight: 600; font-size: 15px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.product-card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-card__price { font-weight: 800; font-size: 17px; }

/* ---------- Каталог ---------- */
.catalog { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: 92px; }
.filter { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.filter h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.filter__search { display: flex; gap: 8px; }
.filter__search input {
    flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; font-size: 14px; font-family: var(--font); outline: none;
}
.filter__search input:focus { border-color: var(--red); }
.filter__search button { flex-shrink: 0; border: none; background: var(--red); color: #fff; padding: 0 16px; border-radius: 8px; cursor: pointer; }
.filter__list { display: flex; flex-direction: column; gap: 8px; }
.filter__list label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; color: var(--text); }
.filter__list input { accent-color: var(--red); width: 16px; height: 16px; }
.filter__price { display: flex; align-items: center; gap: 8px; }
.filter__price input {
    width: 100%; border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 10px; font-size: 14px; font-family: var(--font); outline: none;
}
.filter__select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: var(--font); background: var(--white); }
.btn-reset { width: 100%; background: #f0f1f3; color: var(--text); border: 1px solid var(--border); padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-family: var(--font); }
.btn-reset:hover { background: #e4e5e8; }

.catalog-main__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.catalog-main__head h1 { font-size: 26px; font-weight: 800; }
.catalog-main__head span { color: var(--muted); font-size: 14px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--border); background: var(--white);
    font-weight: 600; font-size: 14px;
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .is-current { background: var(--red); color: #fff; border-color: var(--red); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ---------- Карточка товара ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.product__img { border-radius: 10px; overflow: hidden; background: #f0f1f3; display: grid; place-items: center; }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__info h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.product__cat { color: var(--muted); margin-bottom: 20px; }
.product__price { font-size: 32px; font-weight: 800; color: var(--red); margin-bottom: 20px; }
.product__desc { margin-bottom: 24px; color: #3a3f48; }
.product__stock { margin-bottom: 20px; font-size: 14px; }
.product__stock--yes { color: #16a34a; font-weight: 600; }
.product__stock--no { color: var(--red); font-weight: 600; }
.qty { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.qty button { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--white); border-radius: 8px; font-size: 18px; cursor: pointer; }
.qty input { width: 54px; height: 38px; text-align: center; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: var(--font); }

.product__specs { margin-bottom: 24px; }
.product__specs h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { color: var(--muted); width: 45%; }

/* ---------- Формы ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea {
    width: 100%; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 14px; font-size: 15px; font-family: var(--font); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--red); }
.form-group textarea { min-height: 110px; resize: vertical; }

/* ---------- Контакты / прочее ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list strong { display: block; }
.contact-list a { color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.stat { text-align: center; }
.stat__num { font-size: 40px; font-weight: 800; color: var(--red); }
.stat__label { color: var(--muted); }

.cta { background: linear-gradient(135deg, var(--dark), #1a1114); color: #fff; border-radius: var(--radius); padding: 48px; text-align: center; }
.cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.cta p { color: #cbd0d8; margin-bottom: 28px; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review__stars { color: #f59e0b; margin-bottom: 10px; }
.review p { font-size: 14px; color: #3a3f48; }
.review__author { margin-top: 14px; font-weight: 700; font-size: 14px; }
.review__author span { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* ---------- Таблица корзины ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th, .cart-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { background: #fafafa; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.cart-total { text-align: right; margin-top: 20px; font-size: 22px; font-weight: 800; }

/* ---------- Flash ---------- */
.flash-wrap { position: fixed; top: 84px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 14px 20px; border-radius: 8px; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: slideIn .3s; }
.flash--success { background: #16a34a; }
.flash--error { background: var(--red); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Таблицы админки ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: #fafafa; }
.table tr:hover td { background: #fafafa; }

.tab-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; }
.btn:not(.btn--outline) .tab-badge { background: #fff; color: var(--red); }
.row--new td { background: #f0faf0; }
.table tr.row--new:hover td { background: #e4f4e4; }
.row--done td { background: #fff4f4; }
.table tr.row--done:hover td { background: #ffe4e4; }

.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--dark); transition: box-shadow .15s, border-color .15s; }
.stat-card:hover { box-shadow: var(--shadow); border-color: var(--red); }
.stat-card__num { font-size: 28px; font-weight: 800; color: var(--red); line-height: 1; }
.stat-card__label { font-size: 13px; color: var(--muted); }
.stat-card--alert { border-color: var(--red); }
.stat-card--alert .stat-card__num { color: var(--red); }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: #cbd0d8; margin-top: 72px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 56px 20px; }
.footer__logo { color: #fff; font-size: 24px; font-weight: 800; display: block; margin-bottom: 14px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__col h4 { color: #fff; font-size: 14px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.footer__col a { color: #cbd0d8; transition: color .2s; }
.footer__col a:hover { color: var(--red); }
.footer__bottom { border-top: 1px solid #262b34; padding: 20px 0; font-size: 13px; color: #8a8f98; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .reviews { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .header__nav {
        display: none;
        position: absolute; top: 72px; left: 0; right: 0;
        background: var(--white); flex-direction: column; padding: 12px;
        box-shadow: 0 12px 24px rgba(0,0,0,.1);
    }
    .header__nav.is-open { display: flex; }
    .header__burger { display: block; }
    .header__search input { width: 120px; }
    .catalog { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .product { grid-template-columns: 1fr; padding: 20px; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .hero h1 { font-size: 36px; }
}
@media (max-width: 600px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .features { grid-template-columns: 1fr; }
    .header__search { display: none; }
    .section { padding: 48px 0; }
    .section__head h2 { font-size: 26px; }
}
