/* ═══════════════════════════════════════════════════════
   HOME — главная страница: баннер, сетка категорий,
   преимущества, промо-баннеры, карусель новинок
   ═══════════════════════════════════════════════════════ */

/* ─── ОБЩИЙ ВРАППЕР КОНТЕНТА ─── */
.main { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* ─── ЗАГОЛОВОК СЕКЦИИ ─── */
.section-title {
    font-size: 18px; font-weight: 800; margin-bottom: 14px;
    padding-bottom: 10px; border-bottom: 2px solid #eee;
    display: flex; align-items: center; gap: 8px;
}
.section-title .accent { color: #f25e5e; }

.cat-section { padding: 24px 0; }

/* ─── ГЛАВНЫЙ БАННЕР ─── */
.banner {
    background: linear-gradient(135deg, #1c1c1c 0%, #2d1500 100%);
    border-radius: 10px;
    padding: 28px 36px;
    color: white;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}
.banner::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 35%;
    background-image: url('/static/img/banner.jpg');
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to right, transparent 0%, black 30%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
}
.banner h2 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.banner p  { opacity: 0.7; font-size: 13px; margin-bottom: 18px; max-width: 420px; }

/* ─── СЕТКА КАТЕГОРИЙ ─── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}
.cat-card {
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px 12px;
    border: 2px solid transparent;
    text-align: center;
    height: 140px;
    /* анимация — transition переопределяется в animations */
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s),
                box-shadow 0.2s, border-color 0.2s !important;
}
.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,107,43,0.18);
    border-color: #f25e5e;
}
.cat-card .ico  { font-size: 32px; margin-bottom: 8px; }
.cat-card .name { font-size: 12px; font-weight: 700; line-height: 1.35; }
.cat-card .cnt  { font-size: 11px; color: #aaa; margin-top: 4px; }

/* ─── ПРЕИМУЩЕСТВА ─── */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    margin-top: 20px;
}
.feature-card {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    /* анимация — transition переопределяется */
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s) !important;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(242,94,94,0.15);
}

.feature-card:hover .f-ico-wrap {
    transform: scale(1.12) rotate(-4deg);
    box-shadow: 0 8px 20px rgba(242,94,94,0.4);
}
.f-ico-wrap svg { width: 100%; height: 100%; }
.f-title { font-size: 13px; font-weight: 700; color: #1a1a1a; }
.f-desc  { font-size: 12px; color: #999; margin-top: 3px; line-height: 1.4; }

/* hover — покачивание иконки */
.feature-card:hover .f-ico { display: inline-block; animation: wiggle 0.4s ease; }
@keyframes wiggle {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(-12deg) scale(1.2); }
    75%  { transform: rotate(8deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* ─── ПРОМО-БАННЕРЫ ─── */
.promo-section  { margin-bottom: 28px; }
.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.promo-banner {
    position: relative;
    border-radius: 12px;
    padding: 28px 28px 24px;
    color: white;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 200px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.promo-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}
.promo-banner::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 55%;
    background-image: url('/static/img/banner.jpg');
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to right, transparent 0%, black 50%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
    opacity: 0.45;
    transition: opacity 0.2s;
}
.promo-banner:hover::after { opacity: 0.6; }

.promo-banner--fire  { background: linear-gradient(135deg, #1c1c1c 0%, #3d1200 100%); }
.promo-banner--smoke { background: linear-gradient(135deg, #1a2340 0%, #0d1a35 100%); }
.promo-banner--stone { background: linear-gradient(135deg, #1a1f1a 0%, #2d3a1e 100%); }

.promo-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.promo-tag {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: #f25e5e;
    background: rgba(242,94,94,0.15);
    border: 1px solid rgba(242,94,94,0.3);
    border-radius: 4px;
    padding: 2px 8px;
    align-self: flex-start;
    margin-bottom: 2px;
}
.promo-banner h3 { font-size: 20px; font-weight: 900; letter-spacing: -0.3px; line-height: 1.2; }
.promo-banner p  { font-size: 12px; opacity: 0.6; line-height: 1.5; max-width: 220px; }
.promo-link { margin-top: 20px; font-size: 13px; font-weight: 700; color: #f25e5e; }

/* ─── КАРУСЕЛЬ НОВИНОК ─── */
.new-products-section { margin-bottom: 28px; }
.new-products-section .section-title { justify-content: space-between; }

.np-arrows { display: flex; gap: 6px; margin-left: auto; }
.np-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e0;
    background: white; color: #555;
    font-size: 22px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.np-arrow:hover:not(:disabled) {
    border-color: #f25e5e;
    color: #f25e5e;
    background: #fff5f0;
}
.np-arrow:disabled { opacity: 0.3; cursor: default; }

.new-products-wrap  {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    padding: 4px 0;
}
.new-products-wrap:active { cursor: grabbing; }
.new-products-wrap::-webkit-scrollbar { display: none; }
.new-products-track {
    display: flex;
    gap: 14px;
}
.new-product-card { flex: 0 0 290px; width: 290px; scroll-snap-align: start; }
