/* =====================================================================
   Winnerleasing — Black Friday. Home page blocks, static markup.
   1:1 with the mockup "Головна — повний редизайн":
   Категорії · Товари дня · Рекомендовані · Блог · Відгуки
   Fonts: Unbounded 700/900, Manrope 500/700/800 (Google Fonts).
   All classes are prefixed with "bf-". No :root variables.
   ===================================================================== */

/* ---------- page wrapper ---------- */
.bf-home {
    background: #0b0b0b;
    color: #ffffff;
    font-family: 'Manrope', Arial, sans-serif;
    padding-bottom: 64px;
}
.bf-block {
    color: #ffffff;
    font-family: 'Manrope', Arial, sans-serif;
}
.bf-home *, .bf-home *::before, .bf-home *::after,
.bf-block *, .bf-block *::before, .bf-block *::after { box-sizing: border-box; }
.bf-home a, .bf-block a { color: #d9d9d9; text-decoration: none; }
.bf-home a:hover, .bf-block a:hover { color: #ffffff; }

.bf-wrap {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}
.bf-sec { padding-top: 64px; }

/* section head */
.bf-sh {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.bf-st {
    margin: 0;
    color: #ffffff;
    font-family: 'Unbounded', Arial, sans-serif;
    font-weight: 900;
    font-size: 36px;
    line-height: 1.1;
    letter-spacing: -1px;
}
a.bf-sl {
    color: #ff680a;
    font-weight: 800;
    font-size: 15px;
}
a.bf-sl:hover { color: #ffffff; }
.bf-pill {
    border: 1px solid #444444;
    border-radius: 999px;
    padding: 8px 16px;
    color: #c9c9c9;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ---------- Категорії ---------- */
.bf-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
a.bf-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    height: 180px;
    padding: 20px;
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 16px;
    color: #ffffff;
    overflow: hidden;
    transition: border-color .2s;
}
a.bf-cat:hover { border-color: #ff680a; color: #ffffff; }
.bf-cat-name {
    font-family: 'Unbounded', Arial, sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: -.5px;
}
.bf-cat-sub {
    color: #9a9a9a;
    font-weight: 700;
    font-size: 13px;
}
.bf-cat-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #222222;
    color: #ff680a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: background .2s, color .2s;
}
a.bf-cat:hover .bf-cat-arrow { background: #ff680a; color: #000000; }

/* ---------- Товари дня ---------- */
.bf-day-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.bf-day {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
}
.bf-day-img {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #222222;
    color: #8a8a8a;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bf-day-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bf-day-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bf-day-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
}
.bf-day-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.bf-day-price b { color: #ff680a; font-size: 18px; font-weight: 800; }
.bf-day-price s { color: #9a9a9a; font-size: 13px; }

/* ---------- Рекомендовані ---------- */
.bf-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.bf-tab {
    height: 40px;
    padding: 0 20px;
    background: transparent;
    color: #c9c9c9;
    border: 1px solid #333333;
    border-radius: 999px;
    font: 800 14px 'Manrope', Arial, sans-serif;
    cursor: pointer;
}
.bf-tab:hover { border-color: #ff680a; color: #ffffff; }
.bf-tab.is-active {
    background: #ff680a;
    border-color: #ff680a;
    color: #000000;
}
.bf-prod-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.bf-prod {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
}
.bf-prod-img {
    position: relative;
    height: 200px;
    background: #222222;
    border-radius: 8px;
    color: #8a8a8a;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bf-prod-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bf-prod-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: #ff680a;
    color: #000000;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
}
.bf-prod-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: #ff680a;
    color: #000000;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
}
.bf-prod-stock {
    color: #6fcf8f;
    font-size: 12px;
    font-weight: 800;
}
.bf-prod-name {
    min-height: 60px;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
}
.bf-prod-reviews {
    color: #9a9a9a;
    font-size: 13px;
}
.bf-prod-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.bf-prod-price b { color: #ffffff; font-weight: 800; font-size: 22px; }
.bf-prod-price s { color: #9a9a9a; font-size: 14px; }
.bf-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    background: #ff680a;
    color: #000000;
    border: 0;
    border-radius: 10px;
    font: 800 15px 'Manrope', Arial, sans-serif;
    cursor: pointer;
}
.bf-cart:hover { background: #ff7f2e; }
.bf-more-row {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}
a.bf-more {
    display: inline-flex;
    align-items: center;
    height: 56px;
    padding: 0 32px;
    border: 1px solid #444444;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 700;
    font-size: 17px;
}
a.bf-more:hover { border-color: #ff680a; }

/* ---------- Блог ---------- */
.bf-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
a.bf-post {
    display: flex;
    flex-direction: column;
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .2s;
}
a.bf-post:hover { border-color: #444444; }
.bf-post-img {
    height: 220px;
    background: #222222;
    color: #8a8a8a;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bf-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-post-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bf-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
}
.bf-post-cat { color: #ff680a; letter-spacing: 1px; }
.bf-post-date { color: #8a8a8a; }
.bf-post-title {
    color: #ffffff;
    font-family: 'Unbounded', Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
}

/* ---------- Відгуки ---------- */
.bf-rev-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.bf-rev {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 16px;
}
.bf-rev-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bf-rev-img {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #222222;
    color: #8a8a8a;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bf-rev-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bf-rev-who { min-width: 0; }
.bf-rev-author { color: #ffffff; font-weight: 800; font-size: 16px; }
.bf-rev-date { color: #8a8a8a; font-size: 13px; }
a.bf-rev-product {
    color: #ff680a;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
}
a.bf-rev-product:hover { color: #ffffff; }
.bf-rev-text {
    margin: 0;
    color: #c9c9c9;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- smaller screens (the mockup is desktop 1440) ---------- */
@media (max-width: 1199.98px) {
    .bf-prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .bf-cat-grid,
    .bf-prod-grid,
    .bf-day-grid,
    .bf-rev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .bf-wrap { padding: 0 16px; }
    .bf-sec { padding-top: 40px; }
    .bf-sh { margin-bottom: 18px; }
    .bf-st { font-size: 26px; }
    a.bf-cat { height: 140px; padding: 16px; }
    .bf-cat-name { font-size: 16px; }
    .bf-blog-grid,
    .bf-day-grid,
    .bf-rev-grid { grid-template-columns: minmax(0, 1fr); }
    .bf-prod { padding: 10px; }
    .bf-prod-img { height: 150px; }
    .bf-prod-name { font-size: 13px; min-height: 52px; }
    .bf-prod-price { flex-direction: column; gap: 0; }
    .bf-prod-price b { font-size: 18px; }
    .bf-post-img { height: 180px; }
    .bf-post-title { font-size: 17px; }
}


/* =====================================================================
   OpenCart integration (modules on the home page)
   ===================================================================== */
/* page container = mockup width */
@media (min-width: 768px) {
    #common-home {
        max-width: 1440px !important;
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}
#common-home .row > .col-12 > .bf-block { padding-left: 0; padding-right: 0; }

/* headings: neutralise theme h2 styles */
.bf-block h2.bf-st { margin: 0; padding: 0; text-transform: none; }
.bf-block h2.bf-st a { color: #ffffff; }
.bf-block h2.bf-st a:hover { color: #ff680a; }

/* real photos: white background, whole image visible */
.bf-has-img { background: #ffffff !important; }
.bf-prod-img.bf-has-img img { padding: 8px; }
.bf-day-img.bf-has-img img,
.bf-rev-img.bf-has-img img { padding: 4px; }
a.bf-prod-img { display: flex; }

/* product card parts that are links in the shop */
a.bf-prod-name,
a.bf-prod-name:visited { color: #ffffff; }
a.bf-prod-name:hover { color: #ff680a; }
.bf-prod-cart { margin-top: auto; }
.bf-prod-cart .bf-cart { width: 100%; }
.bf-prod-nostock .bf-prod-img img { filter: grayscale(1); opacity: .6; }

/* day products are links */
a.bf-day,
a.bf-day:visited { color: #ffffff; transition: border-color .2s; }
a.bf-day:hover { border-color: #444444; }
a.bf-day:hover .bf-day-name { color: #ff680a; }
.bf-day-nostock { opacity: .55; }

/* "show more" is a button in the shop */
button.bf-more {
    display: inline-flex;
    align-items: center;
    height: 56px;
    padding: 0 32px;
    background: transparent;
    border: 1px solid #444444;
    border-radius: 12px;
    color: #ffffff;
    font: 700 17px 'Manrope', Arial, sans-serif;
    cursor: pointer;
}
button.bf-more:hover { border-color: #ff680a; }
button.bf-more.oct-animated { opacity: .6; }

/* tabs built by JS from neighbouring product modules */
.bf-products.bf-tab-hidden { display: none; }
.bf-products.bf-tab-member { padding-top: 0; }
.bf-products.bf-tab-member > .bf-sh { display: none; }

/* review text: keep cards even */
.bf-rev-text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- v3: phones — discount badge top-left, "BLACK FRIDAY" tag bottom-left ----------
   On narrow cards the tag used to wrap to 2 lines and cover the badge. */
@media (max-width: 767.98px) {
    .bf-prod-badge {
        top: 8px !important; left: 8px !important; right: auto !important; bottom: auto !important;
        z-index: 2;
        padding: 3px 8px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
    }
    .bf-prod-tag {
        top: auto !important; bottom: 8px !important; left: 8px !important; right: auto !important;
        z-index: 2;
        max-width: calc(100% - 16px);
        padding: 3px 7px !important;
        background: #000000 !important;
        color: #ff680a !important;
        border: 1px solid #ff680a;
        border-radius: 5px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        letter-spacing: .02em;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
