/* ============================================================
   BoostFlow — каталог (page-catalog.php) + строки корзины.
   ============================================================ */

/* Каталог использует более широкий контейнер */
.bf-cat-tabs, .bf-cat-main, .bf-subtabs { max-width: 1460px; }

/* ---------- SERVICE TYPE TABS (подтаби типу послуги) ---------- */
.bf-subtabs {
  position: relative; z-index: 5; margin: 22px auto 0; padding-bottom: 16px;
  border-bottom: 1px solid var(--bf-border);
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 18px 28px;
}
.bf-subtab {
  display: flex; flex-direction: column; gap: 8px; cursor: pointer; flex-shrink: 0;
  background: none; border: none; padding: 0; font-family: inherit;
}
.bf-subtab__label {
  display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.15;
  color: var(--bf-text-muted); font-weight: 600; transition: color .15s ease; white-space: nowrap;
}
.bf-subtab:hover .bf-subtab__label { color: #fff; }
.bf-subtab.is-active .bf-subtab__label { color: #fff; font-weight: 700; }
.bf-subtab__bar { height: 3px; width: 100%; border-radius: 3px; background: transparent; }
.bf-subtab.is-active .bf-subtab__bar { background: linear-gradient(90deg, #6366f1, #8b5cf6); }

/* ---------- PLATFORM TABS ---------- */
.bf-cat-tabs { position: relative; z-index: 5; margin: 20px auto 0; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.bf-cat-tab {
  display: flex; align-items: center; gap: 9px;
  background: var(--bf-hover-1); border: 1px solid var(--bf-border);
  border-radius: var(--bf-r-lg); padding: 11px 17px; font-size: 14px; font-weight: 500; color: var(--bf-text-2);
}
.bf-cat-tab:hover { border-color: rgba(255,255,255,0.28); }
.bf-cat-tab.is-active { font-weight: 700; color: #fff; background: rgba(124,108,247,0.14); border-color: rgba(139,92,246,0.4); }
.bf-cat-tab__ico { display: flex; width: 24px; height: 24px; border-radius: 7px; align-items: center; justify-content: center; flex: none; }

/* ---------- BREADCRUMB + TITLE ---------- */
.bf-crumbs { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--bf-text-muted); margin-bottom: 16px; }
.bf-crumbs a { display: flex; align-items: center; gap: 6px; }
.bf-cat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.bf-cat-safe { display: flex; align-items: center; gap: 13px; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22); border-radius: 15px; padding: 15px 20px; }
.bf-cat-safe__ico { display: flex; width: 38px; height: 38px; border-radius: 11px; align-items: center; justify-content: center; background: rgba(16,185,129,0.16); color: #34d399; flex: none; }

/* ---------- MAIN LAYOUT ---------- */
.bf-cat-main { position: relative; z-index: 5; margin: 26px auto 0; display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }

/* ---------- FILTERS ---------- */
.bf-filters { background: rgba(255,255,255,0.03); border: 1px solid var(--bf-border); border-radius: 18px; padding: 22px 20px; position: sticky; top: 16px; }
.bf-filters__label { font-size: 13px; font-weight: 700; color: var(--bf-text-3); margin-bottom: 14px; }
.bf-filters__group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.bf-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.bf-check input { display: none; }
.bf-check__box { display: flex; width: 19px; height: 19px; border-radius: 6px; flex: none; align-items: center; justify-content: center; margin-top: 1px; background: transparent; border: 2px solid rgba(255,255,255,0.2); color: transparent; transition: all .15s ease; }
.bf-check input:checked + .bf-check__box { background: var(--bf-grad-cta); border-color: transparent; color: #fff; }
.bf-switch { width: 38px; height: 21px; border-radius: 11px; background: rgba(255,255,255,0.12); position: relative; cursor: pointer; border: none; transition: background .18s ease; padding: 0; }
.bf-switch > span { position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .18s ease; }
.bf-switch[aria-pressed="true"] { background: var(--bf-primary-2); }
.bf-switch[aria-pressed="true"] > span { left: 19.5px; }

/* ---------- TOOLBAR + VIEW ---------- */
.bf-cat-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.bf-view { display: flex; align-items: center; gap: 5px; background: var(--bf-hover-1); border: 1px solid var(--bf-border-2); border-radius: var(--bf-r-md); padding: 5px; }
.bf-view__btn { display: flex; width: 34px; height: 34px; border-radius: 8px; align-items: center; justify-content: center; background: transparent; border: none; color: var(--bf-text-muted); cursor: pointer; transition: all .15s ease; }
.bf-view__btn.is-active { background: var(--bf-grad-cta); color: #fff; }

/* ---------- PRODUCT GRID + CARD ---------- */
.bf-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bf-cat-grid.is-list { grid-template-columns: 1fr; }
.bf-pcard { background: #14121f; border: 1px solid var(--bf-border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.bf-pcard:hover { transform: translateY(-4px); border-color: rgba(139,92,246,0.4); box-shadow: 0 16px 38px rgba(0,0,0,0.4); }
.bf-pcard[hidden] { display: none; }
.bf-pcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.bf-pcard__ico { display: flex; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; flex: none; }
.bf-pcard__disc { font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg,#ec4899,#f43f5e); border-radius: 8px; padding: 3px 8px; }
.bf-pcard__specs { display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.bf-pcard__specs > div { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #a8a4ba; }
.bf-pcard__price { display: flex; align-items: baseline; gap: 9px; margin-bottom: 16px; }
.bf-pcard__btn { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bf-grad-brand); border: none; color: #fff; font-size: 14px; font-weight: 700; padding: 12px; border-radius: 12px; cursor: pointer; font-family: inherit; box-shadow: 0 8px 22px rgba(139,92,246,0.4); }

/* ---------- ORDER MODAL ---------- */
.bf-omodal { position: relative; width: 100%; max-width: 1120px; max-height: 92vh; overflow: auto; margin: 4vh auto; background: linear-gradient(160deg,#1a1430,#12101d); border: 1px solid var(--bf-border-2); border-radius: 26px; box-shadow: 0 40px 100px rgba(0,0,0,0.6); display: grid; grid-template-columns: 1fr 1fr; }
.bf-omodal__close { position: absolute; top: 22px; right: 22px; z-index: 2; width: 40px; height: 40px; border-radius: 11px; }
.bf-omodal__left { padding: 34px; border-right: 1px solid var(--bf-border); }
.bf-omodal__right { padding: 40px 38px 34px; display: flex; flex-direction: column; }
.bf-omodal__art { position: relative; height: 260px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.bf-omodal__disc { font-size: 14px; font-weight: 800; color: #f87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); border-radius: 10px; padding: 5px 11px; }

/* ---------- CART ITEM ROW (drawer) ---------- */
.bf-ci { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bf-border); }
.bf-ci__name { font-size: 13.5px; font-weight: 700; }
.bf-ci__sub { font-size: 12px; color: var(--bf-text-muted); margin-top: 2px; }
.bf-ci__qty { display: flex; align-items: center; gap: 8px; }
.bf-ci__qty button { width: 24px; height: 24px; border-radius: 7px; background: var(--bf-hover-2); border: 1px solid var(--bf-border-2); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.bf-ci__price { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.bf-ci__rm { width: 24px; height: 24px; border-radius: 7px; background: transparent; border: none; color: var(--bf-text-muted); cursor: pointer; font-size: 18px; line-height: 1; }
.bf-ci__rm:hover { color: #f87171; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) { .bf-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .bf-cat-main { grid-template-columns: 1fr; }
  .bf-filters { position: static; }
  .bf-omodal { grid-template-columns: 1fr; }
  .bf-omodal__left { border-right: none; border-bottom: 1px solid var(--bf-border); }
}
@media (max-width: 560px) { .bf-cat-grid { grid-template-columns: 1fr; } }
