@charset "UTF-8";
/*
 * Bike price & specification (brands, brand models, model details) and second-hand bike pages
 * (templates/Models/bike_price_and_specification.php, Models/bike_specification.php,
 *  Items/second_hand_bike.php, Items/items_detail_view.php).
 * Builds on content-pages.css (.bbc header, chips, pager, crumbs, tiles); the ad details page also
 * uses product-page.css for its gallery. px is used because the theme sets html { font-size: 62.5% }.
 */
.bbk {
    --bbk-red: #ED1D24;
    --bbk-red-dark: #c4141a;
    --bbk-green: #059669;
    --bbk-ink: #1b1d21;
    --bbk-muted: #6b7078;
    --bbk-line: #e6e7eb;
    --bbk-soft: #f6f7f9;
    --bbk-radius: 16px;
    --bbk-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}

/* ---------- Buttons ---------- */
.bbk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.bbk-btn--primary {
    color: #fff !important;
    background: var(--bbk-red);
    border: 0;
}
.bbk-btn--primary:hover {
    background: var(--bbk-red-dark);
}
.bbk-btn--green {
    color: #fff !important;
    background: var(--bbk-green);
    border: 0;
}
.bbk-btn--green:hover {
    background: #047857;
}
.bbk-btn--outline {
    color: var(--bbk-ink) !important;
    background: #fff;
    border: 2px solid var(--bbk-line);
}
.bbk-btn--outline:hover {
    color: var(--bbk-red) !important;
    border-color: var(--bbk-red);
}

/* ---------- Filter bar (second-hand listing) ---------- */
.bbk-filter {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: var(--bbk-radius);
    box-shadow: var(--bbk-shadow);
}
.bbk-filter select,
.bbk-filter input {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    font-size: 14px;
    color: var(--bbk-ink);
    background: var(--bbk-soft);
    border: 2px solid transparent;
    border-radius: 10px;
}
.bbk-filter select:focus,
.bbk-filter input:focus {
    outline: none;
    background: #fff;
    border-color: var(--bbk-red);
}
.bbk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--bbk-muted);
}
.bbk-toolbar strong {
    color: var(--bbk-ink);
}

/* ---------- Ad cards ---------- */
.bbk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.bbk-ad {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: var(--bbk-radius);
    box-shadow: var(--bbk-shadow);
    transition: transform .2s, box-shadow .2s;
}
.bbk-ad:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
}
.bbk-ad__img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bbk-soft);
}
.bbk-ad__img img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .4s;
}
.bbk-ad:hover .bbk-ad__img img {
    transform: scale(1.05);
}
.bbk-ad__time {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 3px 9px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.bbk-ad__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}
.bbk-ad__price {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--bbk-red);
}
.bbk-ad__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
}
.bbk-ad__title a {
    color: var(--bbk-ink);
}
.bbk-ad__title a:hover {
    color: var(--bbk-red);
}
.bbk-ad__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--bbk-muted);
}
.bbk-ad__meta .fa {
    margin-right: 5px;
    color: #9aa0a8;
}
.bbk-sell-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(140deg, #ED1D24 0%, #a50f14 80%);
    border-radius: var(--bbk-radius);
}
.bbk-sell-card .fa-motorcycle {
    font-size: 34px;
    opacity: .9;
}
.bbk-sell-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.bbk-sell-card p {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .88);
}
.bbk-sell-card .bbk-btn {
    color: var(--bbk-red) !important;
    background: #fff;
}
.bbk-seo {
    margin-top: 36px;
}

/* ---------- Model cards (brand page) ---------- */
.bbk-models {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.bbk-model {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: var(--bbk-radius);
    box-shadow: var(--bbk-shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.bbk-model:hover {
    border-color: rgba(237, 29, 36, .4);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
}
.bbk-model__img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 11;
    padding: 12px;
    background: linear-gradient(180deg, #fff 0%, var(--bbk-soft) 100%);
}
.bbk-model__img img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}
.bbk-model__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--bbk-line);
}
.bbk-model__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--bbk-ink);
}
.bbk-model__en {
    font-size: 12px;
    color: var(--bbk-muted);
}
.bbk-model__price {
    margin-top: auto;
    font-size: 17px;
    font-weight: 800;
    color: var(--bbk-red);
}
.bbk-model__price--na {
    font-size: 13px;
    font-weight: 600;
    color: var(--bbk-muted);
}
.bbk-brand-head {
    display: flex;
    align-items: center;
    gap: 16px;
}
.bbk-brand-head__logo {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: 16px;
}
.bbk-brand-head__logo img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}

/* ---------- Model details ---------- */
.bbk-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: var(--bbk-radius);
    box-shadow: var(--bbk-shadow);
}
.bbk-hero__img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 16px;
    background: radial-gradient(70% 70% at 50% 60%, #f1f2f5 0%, #fff 100%);
    border-radius: 14px;
}
.bbk-hero__img img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}
.bbk-hero__title {
    margin: 10px 0 4px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
}
.bbk-hero__en {
    margin: 0;
    font-size: 15px;
    color: var(--bbk-muted);
}
.bbk-hero__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 18px 0;
    padding: 14px 18px;
    background: var(--bbk-soft);
    border-radius: 14px;
}
.bbk-hero__price small {
    font-size: 13px;
    color: var(--bbk-muted);
}
.bbk-hero__price strong {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--bbk-red);
}
.bbk-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}
.bbk-facts li {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--bbk-line);
    border-radius: 12px;
}
.bbk-facts small {
    display: block;
    overflow: hidden;
    font-size: 12px;
    color: var(--bbk-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bbk-facts strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    color: var(--bbk-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bbk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.bbk-card {
    margin-top: 24px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: var(--bbk-radius);
    box-shadow: var(--bbk-shadow);
}
.bbk-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.bbk-card__title {
    position: relative;
    margin: 0;
    padding-left: 14px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}
.bbk-card__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 4px;
    background: var(--bbk-red);
}
.bbk-spec-search {
    position: relative;
    width: 260px;
    max-width: 100%;
}
.bbk-spec-search .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    color: #9aa0a8;
    transform: translateY(-50%);
}
.bbk-spec-search input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 14px 0 38px;
    font-size: 14px;
    background: var(--bbk-soft);
    border: 2px solid transparent;
    border-radius: 999px;
}
.bbk-spec-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--bbk-red);
}
.bbk-spec {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.bbk-spec tr:nth-child(even) {
    background: var(--bbk-soft);
}
.bbk-spec th,
.bbk-spec td {
    padding: 11px 14px;
    line-height: 1.5;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--bbk-line);
}
.bbk-spec th {
    width: 42%;
    font-weight: 600;
    color: #3d4149;
}
.bbk-spec td {
    color: var(--bbk-ink);
    overflow-wrap: anywhere;
}
.bbk-spec-wrap.is-collapsed .bbk-spec tr.is-extra {
    display: none;
}
.bbk-spec tr[hidden] {
    display: none;
}
.bbk-spec-more {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.bbk-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.bbk-gallery figure {
    margin: 0;
}
.bbk-gallery a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bbk-soft);
    border-radius: 12px;
}
.bbk-gallery img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .3s;
}
.bbk-gallery a:hover img {
    transform: scale(1.04);
}
.bbk-gallery figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #3d4149;
}
.bbk-gallery figcaption b {
    display: block;
    color: var(--bbk-ink);
}

/* ---------- Ad details ---------- */
.bbk-detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.bbk-detail-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--bbk-line);
    border-radius: 12px;
}
.bbk-detail-facts .fa {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    font-size: 15px;
    line-height: 34px;
    text-align: center;
    color: var(--bbk-red);
    background: #fff1f1;
    border-radius: 10px;
}
.bbk-detail-facts small {
    display: block;
    font-size: 11px;
    color: var(--bbk-muted);
}
.bbk-detail-facts strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bbk-seller {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--bbk-line);
    border-radius: 14px;
}
.bbk-seller__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    border-radius: 50%;
}
.bbk-seller__info {
    flex: 1;
    min-width: 140px;
}
.bbk-seller__info small {
    display: block;
    font-size: 12px;
    color: var(--bbk-muted);
}
.bbk-seller__info strong {
    font-size: 16px;
}
.bbk-contact-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.bbk-phones {
    display: none;
    gap: 8px;
    margin-top: 12px;
}
.bbk-phones.is-open {
    display: grid;
}
.bbk-phones a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--bbk-ink);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
}
.bbk-phones a .fa {
    color: var(--bbk-green);
}
.bbk-desc {
    font-size: 15px;
    line-height: 1.85;
    color: #2d3138;
    overflow-wrap: anywhere;
}
.bbk-two {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.bbk-two > .bbk-card {
    margin-top: 24px;
}
.bbk-safety {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
    color: #3d4149;
}
.bbk-safety li {
    display: flex;
    gap: 10px;
}
.bbk-safety .fa {
    margin-top: 4px;
    color: var(--bbk-green);
}

/* chat */
.bbk-chat .chatTable {
    display: block;
    width: 100%;
    max-height: 340px;
    margin-bottom: 14px;
    overflow-y: auto;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.bbk-chat .chatRow td {
    display: block;
}
.bbk-chat .chatMessageMine,
.bbk-chat .chatMessageOther {
    display: inline-block;
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 14px;
}
.bbk-chat .chatMessageMine {
    background: #e0f2fe;
    border-bottom-left-radius: 4px;
}
.bbk-chat .chatMessageOther {
    float: right;
    background: #dcfce7;
    border-bottom-right-radius: 4px;
}
.bbk-chat .chatTimeSpan {
    margin-top: 4px;
    font-size: 11px;
    color: var(--bbk-muted);
}
.bbk-chat .chatUserCircle {
    display: none;
}
.bbk-chat textarea {
    width: 100%;
    min-height: 80px;
    margin: 0 0 10px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    background: var(--bbk-soft);
    border: 2px solid transparent;
    border-radius: 12px;
    resize: vertical;
}
.bbk-chat textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--bbk-red);
}
.bbk-chat select {
    width: 100%;
    height: 44px;
    margin-bottom: 10px;
    font-size: 14px;
    border-radius: 10px;
}
.bbk-chat__empty {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--bbk-muted);
}

/* mobile sticky contact bar */
.bbk-sticky {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .bbk-grid,
    .bbk-models {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bbk-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bbk-filter .bbk-btn,
    .bbk-filter select[name="district_id"] {
        grid-column: 1 / -1;
    }
    .bbk-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    .bbk-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bbk-two {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .bbk-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 64px; /* above the site's fixed bottom toolbar */
        z-index: 98;
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        background: #fff;
        border-top: 1px solid #e6e7eb;
        box-shadow: 0 -6px 18px rgba(16, 24, 40, .08);
    }
    .bbk-sticky strong {
        padding-right: 4px;
        font-size: 17px;
        color: #ED1D24;
        white-space: nowrap;
    }
    .bbk-sticky .bbk-btn {
        min-height: 42px;
        padding: 0 10px;
        font-size: 14px;
    }
    .bbk--has-sticky {
        padding-bottom: 150px;
    }
}
@media (max-width: 767.98px) {
    .bbk-grid {
        gap: 12px;
    }
    .bbk-ad__body {
        gap: 6px;
        padding: 10px 12px 12px;
    }
    .bbk-ad__price {
        font-size: 16px;
    }
    .bbk-ad__title {
        font-size: 14px;
    }
    .bbk-ad__meta {
        flex-direction: column;
        gap: 2px;
        font-size: 12px;
    }
    .bbk-ad__time {
        font-size: 11px;
    }
    .bbk-sell-card {
        grid-column: 1 / -1;
    }
    .bbk-models {
        gap: 12px;
    }
    .bbk-model__body {
        padding: 10px 12px 12px;
    }
    .bbk-model__name {
        font-size: 14px;
    }
    .bbk-model__price {
        font-size: 15px;
    }
    .bbk-brand-head__logo {
        width: 56px;
        height: 56px;
    }
    .bbk-hero {
        padding: 16px;
    }
    .bbk-hero__title {
        font-size: 23px;
    }
    .bbk-hero__price strong {
        font-size: 24px;
    }
    .bbk-actions .bbk-btn {
        flex: 1 1 100%;
    }
    .bbk-card {
        padding: 18px 16px;
    }
    .bbk-card__title {
        font-size: 18px;
    }
    .bbk-spec-search {
        width: 100%;
    }
    .bbk-spec th,
    .bbk-spec td {
        padding: 9px 10px;
        font-size: 13px;
    }
    .bbk-gallery {
        grid-template-columns: minmax(0, 1fr);
    }
    .bbk-detail-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bbk-contact-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* long brand list on brand pages: one scrollable row instead of many wrapped rows */
.bbk .bbk-chips-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

/* model select stays disabled until a brand is chosen (main.js populateBikeModels) */
.bbk-filter select:disabled {
    cursor: not-allowed;
    opacity: .6;
}

/* "clear filters" link on the /search-bikes results header */
.bbk-clear {
    font-weight: 600;
    color: var(--bbk-red);
    text-decoration: underline;
}
