/* ============================================================
   PART 1 — cleaned-up draft styles
   (.gc-single-*, .gc-badge, .gc-pros-cons, etc.)
   NOTE: these classes are not present in the current live
   template — they won't visually affect the BMW M5 page today,
   included only because you asked for the cleaned-up version.
   ============================================================ */

/* WRAPPER */
.gc-single-wrap{
    max-width:1400px;
    margin:40px auto;
    padding:0 20px;
}

/* HERO */
.gc-single-hero{
    display:grid;
    grid-template-columns:260px 1fr 340px;
    gap:24px;
    align-items:start;
}

/* LEFT PANEL */
.gc-single-side{
    background:#F5F5F5;
    color:#000;
    border-radius:24px;
    padding:24px;
    position:sticky;
    top:120px;
}

.gc-stat{
    margin-bottom:18px;
}

.gc-stat span{
    display:block;
    font-size:13px;
    color:#999;
    margin-bottom:4px;
}

.gc-stat strong{
    font-size:22px;
    font-weight:700;
}

.gc-price{
    margin-top:30px;
    font-size:34px;
    font-weight:800;
}

.gc-buy-btn{
    display:block;
    margin-top:24px;
    background: linear-gradient(270deg, #6CB243 -2.56%, #247C3F 100%);
    color:#fff;
    text-align:center;
    padding:14px;
    border-radius:14px;
    font-weight:700;
    text-decoration:none;
    transition:.25s;
}

.gc-buy-btn:hover{
    transform:translateY(-2px);
    color:#fff;
}

/* GALLERY */
.gc-single-gallery{
    background:#fff;
    border-radius:24px;
    padding:20px;
    box-shadow:0 8px 30px rgba(0,0,0,.08);
}

.gc-main-image{
    border-radius:18px;
    overflow:hidden;
}

.gc-main-image img{
    width:100%;
    display:block;
    object-fit:cover;
}

.gc-gallery-thumbs{
    display:flex;
    gap:12px;
    margin-top:16px;
}

.gc-thumb{
    width:90px;
    height:70px;
    object-fit:cover;
    border-radius:12px;
    cursor:pointer;
    border:3px solid transparent;
    transition:.25s;
}

.gc-thumb.active{
    border-color:#17B036;
}

/* RIGHT INFO */
.gc-single-info{
    background:#fff;
    border-radius:24px;
    padding:30px;
    box-shadow:0 8px 30px rgba(0,0,0,.08);
}

.gc-badge{
    display:inline-block;
    background: linear-gradient(270deg, #6CB243 -2.56%, #247C3F 100%);
    color:#fff;
    padding:8px 14px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    margin-bottom:18px;
}

.gc-single-info h1{
    font-size:42px;
    line-height:1.1;
    margin:0 0 20px;
}

.gc-single-info p{
    font-size:16px;
    line-height:1.7;
    color:#666;
}

/* TABS (draft version) */
.gc-tabs.sticky{
    position:sticky;
    top:80px;
    z-index:100;
    background:#fff;
    padding:15px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

/* LAYOUT */
.gc-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:30px;
}

/* CONTENT */
.gc-content{
    min-width:0;
}

.gc-tab-panel{
    display:none;
    background:#fff;
    border-radius:24px;
    padding:30px;
    margin-bottom:24px;
    box-shadow:0 8px 25px rgba(0,0,0,.06);
}

.gc-tab-panel.active{
    display:block;
}

.gc-tab-panel h2{
    margin:0 0 20px;
    font-size:32px;
}

.gc-tab-panel p{
    color:#666;
    line-height:1.8;
}

.gc-tab-panel ul{
    padding-left:20px;
}

.gc-tab-panel li{
    margin-bottom:10px;
}

/* SPECS GRID */
.gc-spec-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    border:1px solid #eee;
    border-radius:18px;
    overflow:hidden;
}

.gc-spec-grid div{
    padding:16px 20px;
    border-bottom:1px solid #eee;
}

.gc-spec-grid div:nth-child(odd){
    background:#fafafa;
    font-weight:600;
}

/* PROS CONS */
.gc-pros-cons{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-bottom:30px;
}

.gc-pros,
.gc-cons{
    border-radius:24px;
    padding:24px;
    color:#fff;
}

.gc-pros{
    background:#17B036;
}

.gc-cons{
    background:#222;
}

.gc-pros h3,
.gc-cons h3{
    margin-top:0;
}

.gc-pros ul,
.gc-cons ul{
    margin:0;
    padding-left:18px;
}

/* SIMILAR CARS */
.gc-similar{
    margin-top:60px;
}

.gc-similar h2{
    margin-bottom:24px;
}

.gc-similar-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

.gc-similar-card{
    display:block;
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    text-decoration:none;
    color:#222;
    box-shadow:0 8px 25px rgba(0,0,0,.06);
    transition:.25s;
}

.gc-similar-card:hover{
    transform:translateY(-4px);
}

.gc-similar-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
}

.gc-similar-card span{
    display:block;
    padding:20px;
    font-weight:700;
}

/* DARK FEATURE BLOCKS */
.gc-feature-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.gc-feature{
    background:#111;
    color:#fff;
    border-radius:24px;
    padding:24px;
}

.gc-feature strong{
    display:block;
    font-size:32px;
    margin-bottom:10px;
}

.gc-feature span{
    color:#999;
}

/* TABLE */
.gc-table{
    width:100%;
    border-collapse:collapse;
}

.gc-table td{
    padding:16px;
    border-bottom:1px solid #eee;
}

.gc-table td:first-child{
    font-weight:700;
    background:#fafafa;
}

/* MOBILE (draft version) */
@media(max-width:1100px){
    .gc-single-hero{ grid-template-columns:1fr; }
    .gc-single-side{ position:relative; top:auto; }
    .gc-similar-grid{ grid-template-columns:1fr 1fr; }
}

@media(max-width:768px){
    .gc-single-info h1{ font-size:30px; }
    .gc-pros-cons{ grid-template-columns:1fr; }
    .gc-similar-grid{ grid-template-columns:1fr; }
    .gc-feature-grid{ grid-template-columns:1fr; }
    .gc-gallery-thumbs{ overflow:auto; }
	body .carhero{ grid-template-columns:1fr!important; }
	body .carhero-brand img { width:32px;height:32px;}
}

@media(max-width:480px){
    .gc-single-wrap{ padding:0 12px; }
    .gc-tab-panel{ padding:20px; }
    .gc-single-info{ padding:20px; }
    .gc-single-side{ padding:20px; }
    .gc-price{ font-size:28px; }
}


/* ============================================================
   PART 2 — fixes for the LIVE BMW M5 page
   (.carhero / .gc-tabs / .gc-sidebar) — this is the part that
   actually changes what you see on the frontend.
   Selectors are boosted in specificity where needed so they
   still win over the two inline <style> blocks that currently
   load after single-car.css.
   ============================================================ */

/* 1) Narrow the spec card (currently 320px) to 283px */
.carhero {
    grid-template-columns: 283px 1fr !important;
}

/* 2) Tabs: pin the green underline onto the grey line */
.gc-tabs {
    border-bottom: 1px solid #ececec !important;
}
.gc-tabs .gc-tab.active::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    border-radius: 20px !important;
    background: #17B036 !important;
    z-index: 2 !important;
}

/* stop the bold-on-hover jump that reads as "scaling" */
.gc-tab:hover {
    font-weight: 500 !important;
}
.gc-tab.active,
.gc-tab.active:hover {
    font-weight: 700 !important;
}

/* 3) Sidebar: Expand all / Collapse all + section list */
.gc-sidebar-actions #gcExpandAll,
.gc-sidebar-actions #gcCollapseAll {
    color: #17B036 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.gc-sidebar-actions #gcExpandAll:hover,
.gc-sidebar-actions #gcCollapseAll:hover {
    color: #000000 !important;
}

.gc-sidebar-box {
    border-radius: 16px !important;
}

.gc-sidebar-actions {
    padding-bottom: 14px !important;
    border-bottom: 1px solid #ececec !important;
    margin-bottom: 16px !important;
}

.gc-sidebar-nav {
    gap: 4px !important;
}

.gc-sidebar-box .gc-sidebar-nav a {
    padding: 9px 10px !important;
    border-radius: 8px !important;
}

.gc-sidebar-box .gc-sidebar-nav a:hover {
    background: #F3FBF5 !important;
    padding-left: 10px !important;
}

.gc-sidebar-box .gc-sidebar-nav a.active {
    background: #F3FBF5 !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

.rtl .carhero-toolbar {
	left: 18px;
	right: auto;
}

/* ===== MOBILE single car: one-column layout (section-nav sidebar hidden, the accordion replaces it), compact tabs and accordion ===== */
@media (max-width:768px){
  .gc-layout{
    grid-template-columns:minmax(0,1fr) !important;
    gap:0 !important;
  }
  .gc-layout > .gc-sidebar{
    display:none !important;
  }
  .gc-tabs{
    justify-content:space-between;
    gap:14px;
  }
  .gc-tabs .gc-tab{
    font-size:14px;
    white-space:nowrap;
    flex:0 0 auto;
  }
  .overview_section{
    margin-bottom:16px;
  }
  .gc-tab-panel .overview_section h2{
    font-size:17px !important;
    font-weight:600;
  }
  .gc-tab-panel .overview_section p{
    font-weight:400 !important;
  }
  .gc-accordion-header,
  .gc-accordion-header span{
    font-size:16px;
    font-weight:600;
  }
  .gc-accordion-header{
    padding:18px 48px 18px 18px;
  }
  .gc-accordion-header::after{
    border-right:1.5px solid #4CAF50;
    border-bottom:1.5px solid #4CAF50;
  }
}

/* ===== MOBILE single car: spec card — icon, label and value on one line; price label + price on one line ===== */
@media (max-width:768px){
  .carhero-card{
    display:flex !important;
    flex-wrap:wrap;
    justify-content:center;
    align-items:baseline;
    column-gap:10px;
    padding:8px 20px 20px !important;
  }
  .carhero-card .carhero-item{
    flex:0 0 100%;
    display:flex !important;
    align-items:center;
    justify-content:flex-start !important;
    gap:6px;
    padding:12px 0 0 !important;
  }
  .carhero-card .single_label{
    flex:0 0 auto;
    align-items:center;
  }
  .carhero-card .single_label img{
    width:20px;
    height:20px;
  }
  .carhero-card .single_value{
    padding:0 !important;
    line-height:24px;
  }
  .carhero-card .carhero-price-label,
  .carhero-card .carhero-price{
    flex:0 0 auto;
    width:auto !important;
    padding-top:22px !important;
    margin:0 !important;
    line-height:1.2;
  }
  .carhero-card .carhero-button{
    flex:0 0 100%;
    margin-top:16px;
  }
}

/* ===== MOBILE single car header: model title and availability text 16px ===== */
@media (max-width:768px){
  section.carhero .carhero-head-left .carhero-small-title{
    font-size:16px !important;
    line-height:1.25 !important;
  }
  section.carhero .carhero-heading p{
    font-size:16px !important;
    line-height:1.4 !important;
  }
}

.carhero-tool.like-btn.active { background: #6CB243; }
.carhero-tool.like-btn.active img { filter: brightness(0) invert(1); }

/* ==========================================================
   Gallery full screen – image centred (QA BUG_13, 2026-10-13)
   ========================================================== */
.carhero-gallery .carhero-stage:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
}
.carhero-gallery .carhero-stage:fullscreen .carhero-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carhero-gallery .carhero-stage:fullscreen #gcMainImage {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    object-fit: contain;
}
/* Safari */
.carhero-gallery .carhero-stage:-webkit-full-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
}
.carhero-gallery .carhero-stage:-webkit-full-screen .carhero-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carhero-gallery .carhero-stage:-webkit-full-screen #gcMainImage {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    object-fit: contain;
}

/* Release v1 (2026-10-14): overview tab shows only the summary */
#overview .overview_accordion,
.sidebar_nav.overview{display:none !important;}
@media (min-width:769px){
  .gc-layout:has(#overview.gc-tab-panel.active){grid-template-columns:1fr !important;}
  .gc-layout:has(#overview.gc-tab-panel.active) > .gc-sidebar{display:none !important;}
}

/* Client batch 2026-10-15 */
/* 2. hide the badge on the car page gallery */
.carhero-badge{display:none !important;}
/* 3. spec tab sidebar: hide the trim checkboxes (Base / Exclusive / Pinnacle) */
.sidebar_nav.spec .gc-checkbox-list{display:none !important;}

/* Client batch 2026-10-15 — 4. "where to buy" sidebar checkboxes: box on the right, before the text */
.sidebar_nav .gc-checkbox-item{display:flex !important;align-items:center;justify-content:flex-start !important;gap:8px;}
.sidebar_nav .gc-checkbox-item .checker{order:-1;margin:0 !important;width:auto !important;height:auto !important;display:flex !important;flex:none;}
.sidebar_nav .gc-checkbox-item .checker span{margin:0 !important;width:auto !important;height:auto !important;background:none !important;border:0 !important;box-shadow:none !important;display:flex !important;}
.sidebar_nav .gc-checkbox-item .checker input{margin:0 !important;left:0 !important;opacity:1 !important;}
