/* === BRB Red theme (clean) === */
:root {
    /* brand */
    --brb-red: #e53935;
    --brb-red-dark: #c62828;

    /* surfaces & text */
    --brb-bg: #f6f7fb;
    --ink: #111827;
    --ink-2: #374151;
    --muted: #6b7280;

    /* strokes & shadows */
    --stroke: #e9eef6;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08),
        0 2px 10px rgba(15, 23, 42, 0.06);

    /* scale */
    --radius-sm: 12px;
    --radius: 14px;
    --radius-lg: 18px;
    --pad-2: 10px;
    --pad-3: 12px;
    --pad-4: 14px;
    --pad-5: 16px;
    --gap-2: 12px;
    --gap-3: 14px;
    --gap-4: 16px;
}

body {
    background: var(--brb-bg);
}

/* ---------- Hero / top-bar ---------- */
.brb-hero {
    background: linear-gradient(90deg, var(--brb-red), var(--brb-red-dark));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.brb-hero .title {
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* ---------- Section card ---------- */
.brb-section {
    margin-top: 24px;
}

/* ---------- Buttons ---------- */
.btn-brb {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brb-red);
    --bs-btn-border-color: var(--brb-red);
    --bs-btn-hover-bg: var(--brb-red-dark);
    --bs-btn-hover-border-color: var(--brb-red-dark);
    --bs-btn-focus-shadow-rgb: 229, 57, 53;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    box-shadow: 0 8px 26px rgba(229, 57, 53, 0.35);
}
.btn-soft {
    color: var(--brb-red-dark);
    background: #fde8e8;
    border: 1px solid #fbd0d0;
    border-radius: 12px;
    padding: 0.45rem 0.8rem;
    font-weight: 600;
}

/* ---------- Children (wide rows) ---------- */
.brb-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 22px rgba(16, 24, 40, 0.04);
}
.brb-tile + .brb-tile {
    border-top: 1px solid #eef1f4;
}
.brb-tile-link {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    --shine-offset: clamp(36px, 18vw, 160px);
    --shine-width: clamp(120px, 32vw, 260px);
}
.brb-tile-link:hover {
    background: #fff7f7;
}
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.brb-tile-title {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #1f2937;
}
.brb-tile-media {
    display: inline-flex;
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.brb-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (max-width: 576px) {
    .brb-tile-link {
        padding: 16px;
    }
    .brb-tile-title {
        font-size: 1.05rem;
    }
    .brb-tile-media {
        width: 72px;
        height: 72px;
        --shine-offset: 28px;
        --shine-width: 130px;
    }
    
}

/* ---------- Detail page: title ---------- */
.detail-title {
    font-weight: 900;
    letter-spacing: 0.2px;
    color: var(--ink);
    font-size: clamp(22px, 3vw, 40px);
    margin: 4px 0 12px;
}

/* ---------- Detail layout (image + facts) ---------- */
/* mobile: сначала факты, потом aside */
.detail-wrap {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "facts" "aside";
    gap: 22px;
}
/* desktop: картинка слева, факты справа; левую колонку делаем шире */
@media (min-width: 1200px) {
    .detail-wrap {
        grid-template-columns: 1.35fr 1.65fr;
        grid-template-areas: "aside facts";
        align-items: start;
    }
}
.logo-brb {
    width: 36px;
    height: 36px;
}
.top-strip {
    background: linear-gradient(180deg, #fdeaea, #ffffff);
    border-bottom: 1px solid #f1e2e2;
}
.top-strip__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
}
.back-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: #c62828;
    background: #fff;
    border: 1px solid #f2d9d9;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.08);
}
.back-btn:hover {
    background: #fff5f5;
}
.top-strip__title {
    font-weight: 700;
    color: #0f172a;
}
.facts-grid {
    grid-area: facts;
}
.detail-aside {
    grid-area: aside;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.detail-aside img {
    width: 100%;
    height: auto;
    max-width: 300px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
    padding: 15px;
}
.detail-aside .aside-caption {
    text-align: center;
    font-weight: 700;
    color: var(--ink);
    font-size: 13.5px;
    opacity: 0.9;
}
/* на десктопе делаем картинку чуть крупнее и сдвигаем влево */
@media (min-width: 1200px) {
    .detail-aside {
        position: sticky;
        top: 88px;
    }
    .detail-aside img {
        width: 108%;
        max-width: none;
        transform: translateX(-3%);
    }
}

/* ---------- Facts grid & cards ---------- */
.facts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-3);
}
@media (min-width: 992px) {
    .facts-grid--two {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-4);
    }
    .facts-grid--two > .fact {
        height: 100%;
    }
}

.fact {
    background: #fff;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fact:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.fact__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--pad-3) var(--pad-5);
    min-height: 44px;
    color: #fff;
    background: linear-gradient(
        90deg,
        var(--brb-red) 0%,
        var(--brb-red-dark) 100%
    );
    font-weight: 800;
}
.fact__icon {
    font-size: 17px;
    opacity: 0.95;
}
.fact__title {
    font-size: 15px;
    letter-spacing: 0.2px;
}

.fact__body {
    flex: 1;
    padding: var(--pad-4) var(--pad-5);
    color: var(--ink-2);
    line-height: 1.45;
}

.fact__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fact__item {
    position: relative;
    padding-left: 16px;
    color: var(--ink);
}
.fact__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    border-left: 6px solid var(--brb-red);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.9;
}

/* ---------- Content helpers ---------- */
.brb-content img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--stroke);
}

/* ---------- Mobile polish ---------- */
@media (max-width: 768px) {
    .fact__head {
        padding: var(--pad-2) var(--pad-4);
        min-height: 40px;
    }
    .fact__title {
        font-size: 14px;
    }
    .fact__body {
        padding: var(--pad-3) var(--pad-4);
    }
    .fact__item {
        font-size: 14px;
    }
    .facts-grid {
        gap: var(--gap-2);
    }
    .detail-wrap {
        gap: 18px;
    }
}
@media (max-width: 420px) {
    .detail-title {
        font-size: 20px;
    }
    .fact__title,
    .fact__item {
        font-size: 13.5px;
    }
   
  }
}
.navbar-brb {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.navbar-brb .navbar-brand strong {
    color: #e53935;
}

/* брендовый красный */
.navbar-brb .nav-link {
    font-weight: 600;
    color: #0f172a;
}

.navbar-brb .nav-link:hover,
.navbar-brb .nav-link.active {
    color: #c62828;
}
@media (max-width: 380px) {
  .brb-tile-link {
    --shine-offset: 22px;
    --shine-width: 80px;
  }
  @media (max-width: 370px) {
  .brb-tile-link {
    --shine-offset: 22px;
    --shine-width: 80px;
  }
/* компактнее на больших экранах */
@media (min-width: 992px) {
    .navbar-brb .btn {
        border-radius: 12px;
    }
}
/* ----- Карточка продукта: одинаковое поле под картинку ----- */
.product-card { display: flex; flex-direction: column; height: 100%; }

.product-card .product-media {
  aspect-ratio: 4 / 3;                 /* одинаковая высота у всех */
  display: grid;
  place-items: center;
  background: #fff;
  border-bottom: 1px solid #eef1f4;
  padding: 10px;
}

.product-card .product-media img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.product-card .card-body { flex: 1; }

.product-card .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;               /* максимум 2 строки */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.25rem * 1.25 * 2);
}

/* Чуть компактнее на мобильных */
@media (max-width: 576px) {
  .product-card .product-media { aspect-ratio: 5 / 4; padding: 8px; }
}
/* Ряд с «бликом» */
.brb-tile-link {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  color: inherit;
  text-decoration: none;
  background: #fff;

  /* Responsive-переменные для блика */
  --shine-offset: clamp(36px, 18vw, 160px);
  --shine-width:  clamp(120px, 32vw, 260px);
}
.brb-tile-link:hover { background: #fff7f7; }

/* Сам блик
.brb-tile-link::after {
  content: "";
  position: absolute;
  right: var(--shine-offset);
  top: 0;
  bottom: 0;
  width: var(--shine-width);
  background: linear-gradient(135deg, #fff 0%, #f6f7fb 40%, #fff 85%);
  opacity: 0.9;
  transform: skewX(-20deg);
  pointer-events: none;
  will-change: transform;
} */

/* Мобильные коррекции */
@media (max-width: 576px) {
  .brb-tile-link { padding: 16px; --shine-offset: 28px; --shine-width: 130px; }
  .brb-tile-title { font-size: 1.05rem; }
  .brb-tile-media { width: 72px; height: 72px; }
}

@media (max-width: 420px) {
  .brb-tile-link { --shine-offset: 22px; --shine-width: 110px; }
}

@media (max-width: 380px) {
  .brb-tile-link { --shine-offset: 20px; --shine-width: 90px; }
}
