/* brw_v2.css — стили новой SEO-архитектуры BRW (Phase 1) */

.brw-v2-home, .brw-v2-listing, .brw-v2-product, .brw-v2-collections-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}
.brw-v2-container { display: flex; flex-direction: column; gap: 40px; }
.brw-v2-h1 { font-size: 32px; margin: 0 0 12px; color: #222; }
.brw-v2-h2 { font-size: 22px; margin: 0 0 16px; color: #222; }
.brw-v2-intro { color: #555; font-size: 15px; line-height: 1.5; max-width: 760px; margin: 0 0 16px; }
.brw-v2-section { margin-top: 16px; }

.brw-v2-grid { display: grid; gap: 16px; }
.brw-v2-grid--tiles       { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.brw-v2-grid--collections { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.brw-v2-grid--products    { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.brw-v2-tile {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 18px;
    text-decoration: none;
    color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color .15s, transform .15s;
}
.brw-v2-tile:hover { border-color: #ff5722; transform: translateY(-2px); }
.brw-v2-tile__name  { font-weight: 600; }
.brw-v2-tile__count { color: #888; font-size: 13px; }

.brw-v2-col-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #222;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, transform .15s;
}
.brw-v2-col-card:hover { border-color: #ff5722; transform: translateY(-2px); }
.brw-v2-col-card__img  { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #f4f4f4; }
.brw-v2-col-card__name { padding: 12px 14px 4px; font-weight: 600; }
.brw-v2-col-card__count { padding: 0 14px 12px; color: #888; font-size: 13px; }

/* Слайдшоу превью коллекции — два слоя со сменой через transform */
.brw-v2-col-card__slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #f4f4f4;
    overflow: hidden;
}
.brw-v2-col-card__slideshow--static {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.brw-v2-col-card__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

.brw-v2-product-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s;
    position: relative;
}
.brw-v2-product-card:hover { border-color: #ff5722; }
.brw-v2-product-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafafa;
    overflow: hidden;
}
.brw-v2-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
    display: block;
}
.brw-v2-product-card__dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px 0 0;
    pointer-events: none;
}
.brw-v2-product-card__dot {
    width: 18px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: background .15s;
}
.brw-v2-product-card__dot.active { background: #ff5722; }

.brw-v2-product-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.brw-v2-product-card__name {
    font-size: 14px;
    color: #222;
    text-decoration: none;
    line-height: 1.35;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brw-v2-product-card__name:hover { color: #ff5722; }
.brw-v2-product-card__sizes { font-size: 12px; color: #888; margin: 0; }
.brw-v2-product-card__price { font-size: 18px; font-weight: 700; color: #ff5722; margin: 0; }
.brw-v2-product-card__price--empty { color: #888; font-weight: 400; font-size: 14px; }
.brw-v2-product-card__btn {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 6px;
    border: 1.5px solid #222;
    color: #222;
    text-decoration: none;
    font-family: 'Roboto Mono', monospace, sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background .15s, color .15s;
}
.brw-v2-product-card__btn:hover { background: #222; color: #fff; }

.brw-v2-product-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #eee;
}
.brw-v2-product-card__act {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: background .12s, color .12s;
}
.brw-v2-product-card__act + .brw-v2-product-card__act { border-left: 1px solid #eee; }
.brw-v2-product-card__act:hover { background: #f5f5f5; color: #222; }
.brw-v2-product-card__act.active-wl   { color: #e91e63; }
.brw-v2-product-card__act.active-cart { color: #ff5722; }
.brw-v2-product-card__act svg { flex-shrink: 0; }

.brw-v2-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 20px; }
.brw-v2-tag {
    background: #f4f4f4;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.brw-v2-tag:hover { background: #ff5722; color: #fff; }

.brw-v2-filters {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    align-items: end;
}
.brw-v2-filter { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.brw-v2-filter span { color: #666; }
.brw-v2-filter input { padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 140px; }
.brw-v2-filter input:focus { border-color: #ff5722; outline: none; }
.brw-v2-filters button {
    cursor: pointer;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 14px;
}
.brw-v2-filters button:hover { background: #e64a19; }

.brw-v2-empty { padding: 60px 0; text-align: center; color: #888; font-size: 15px; }

.brw-v2-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
    margin-top: 8px;
}
@media (max-width: 900px) {
    .brw-v2-product-layout { grid-template-columns: 1fr; }
}
.brw-v2-gallery img { width: 100%; border-radius: 8px; display: block; background: #f4f4f4; }
.brw-v2-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.brw-v2-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    background: #f4f4f4;
}
.brw-v2-thumb.active { border-color: #ff5722; }
.brw-v2-info { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 16px; }
.brw-v2-price { font-size: 28px; font-weight: 700; margin: 0; }
.brw-v2-price--empty { font-size: 18px; color: #888; font-weight: 400; }
.brw-v2-cta {
    cursor: pointer;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-weight: 700;
    font-size: 15px;
}
.brw-v2-cta:hover { background: #e64a19; }
.brw-v2-pdf-link { font-size: 13px; color: #666; text-decoration: none; }
.brw-v2-pdf-link:hover { color: #ff5722; }

.brw-v2-chars { margin-top: 40px; }
.brw-v2-chars table { border-collapse: collapse; width: 100%; max-width: 680px; }
.brw-v2-chars td { padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
.brw-v2-chars td:first-child { color: #666; width: 200px; }

.brw-v2-desc { margin-top: 32px; max-width: 760px; }
.brw-v2-desc p { line-height: 1.6; color: #444; margin: 0 0 12px; }

.brw-v2-variants { margin-top: 32px; }

/* ─── Collection-mode: head + gallery + sidebar + grouped sections ─── */
.brw-v2-col-head { margin-bottom: 20px; }
.brw-v2-col-head .brw-v2-h1 { margin: 0 0 6px; font-size: 28px; }
.brw-v2-col-head__meta { color: #888; font-size: 14px; margin: 0 0 12px; }
.brw-v2-col-head__desc {
    color: #444;
    font-size: 14px;
    line-height: 1.55;
    max-width: 900px;
    margin: 0;
}

/* Лента превью коллекции (horizontal-scroll с миниатюрами) */
.brw-v2-col-gallery {
    position: relative;
    margin: 0 -8px 28px;
    padding: 0 8px;
}
.brw-v2-col-gallery__track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0;
}
.brw-v2-col-gallery__track::-webkit-scrollbar { display: none; }
.brw-v2-col-gallery__item {
    flex: 0 0 auto;
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    background: #f4f4f4;
    transition: transform .15s;
}
.brw-v2-col-gallery__item:hover { transform: scale(1.03); }
.brw-v2-col-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 2;
}
.brw-v2-col-gallery__arrow:hover { background: #fff; }
.brw-v2-col-gallery__arrow--prev { left: 0; }
.brw-v2-col-gallery__arrow--next { right: 0; }

.brw-v2-col-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}
@media (max-width: 900px) {
    .brw-v2-col-layout { grid-template-columns: 1fr; }
}

.brw-v2-sidebar {
    position: sticky;
    top: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px 0;
}
.brw-v2-sidebar__head {
    padding: 0 16px 10px;
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    border-bottom: 1px solid #f0f0f0;
}
.brw-v2-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.brw-v2-sidebar__item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 16px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
}
.brw-v2-sidebar__item a:hover { background: #fafafa; color: #ff5722; }
.brw-v2-sidebar__item a.active {
    background: #fff5f1;
    color: #ff5722;
    border-left-color: #ff5722;
    font-weight: 600;
}
.brw-v2-sidebar__count { color: #aaa; font-size: 12px; }

.brw-v2-col-content { min-width: 0; }
.brw-v2-group { margin-bottom: 40px; scroll-margin-top: 16px; }
.brw-v2-group__header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.brw-v2-group__title {
    margin: 0;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #222;
}
.brw-v2-group__qty { color: #999; font-size: 14px; }
