/*
Theme Name: Brakes Direct
Theme URI: https://brakesdirect.ca
Author: Brakes Direct
Author URI: https://brakesdirect.ca
Description: Custom theme for Brakes Direct — guaranteed-fit brake parts, direct to your driveway. Built for WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: brakesdirect
Tags: e-commerce, custom-colors, custom-menu, full-width-template
*/

:root{
  --navy:#152642;
  --navy-deep:#0d1a2e;
  --red:#e8453c;
  --red-dark:#c8362e;
  --ice:#f4f6f9;
  --line:#e2e6ed;
  --grey:#5b6678;
  --green:#1f9d63;
}
*{box-sizing:border-box;}
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color:var(--navy);
  background:var(--ice);
  line-height:1.5;
  margin:0;
}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
.wrap{max-width:1180px; margin:0 auto; padding:0 24px;}

/* ---- Top bar ---- */
.topbar{background:var(--navy-deep); color:#cfd8e6; font-size:13px;}
.topbar .wrap{display:flex; justify-content:space-between; align-items:center; height:36px;}
.topbar .pill{background:var(--red); color:#fff; padding:3px 10px; border-radius:20px; font-weight:600; font-size:11.5px; letter-spacing:.3px;}

/* ---- Header ---- */
.site-header{background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50;}
.site-header .wrap{display:flex; align-items:center; justify-content:space-between; height:74px;}
.logo{display:flex; align-items:center; gap:10px; font-weight:800; font-size:24px; letter-spacing:-.5px;}
.logo .mark{
  width:40px; height:40px; border-radius:10px;
  background:linear-gradient(145deg, var(--red), var(--red-dark));
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:20px; font-weight:900;
}
.logo .sub{color:var(--grey); font-weight:600; font-size:11px; letter-spacing:1.5px; text-transform:uppercase; display:block; margin-top:-2px;}
.main-nav ul{display:flex; gap:28px; font-weight:600; font-size:14.5px; color:var(--navy); list-style:none; margin:0; padding:0;}
.main-nav a:hover{color:var(--red);}
.header-cta{display:flex; align-items:center; gap:16px;}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:11px 22px; border-radius:8px; font-weight:700; font-size:14.5px; cursor:pointer; border:none;
}
.btn-primary{background:var(--red); color:#fff;}
.btn-primary:hover{background:var(--red-dark); color:#fff;}
.btn-ghost{background:transparent; color:var(--navy); border:1.5px solid var(--line);}

/* ---- Hero ---- */
.hero{
  background:linear-gradient(115deg, var(--navy) 0%, var(--navy-deep) 60%);
  color:#fff; padding:64px 0 80px; position:relative; overflow:hidden;
}
.hero::after{
  content:""; position:absolute; right:-120px; top:-80px; width:420px; height:420px;
  background:radial-gradient(circle, rgba(232,69,60,.28) 0%, rgba(232,69,60,0) 70%);
}
.hero .wrap{position:relative; z-index:2;}
.hero h1{font-size:44px; font-weight:800; max-width:640px; line-height:1.15; letter-spacing:-1px; margin:0;}
.hero h1 span{color:#ff8a82;}
.hero p.lead{margin-top:16px; font-size:18px; color:#c7d1e0; max-width:560px;}
.badges{display:flex; gap:10px; flex-wrap:wrap; margin-top:22px;}
.badge{background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); padding:7px 14px; border-radius:20px; font-size:13px; font-weight:600; color:#e8edf5;}
.badge.highlight{background:rgba(232,69,60,.18); border-color:rgba(232,69,60,.4); color:#ffb9b3;}

/* ---- Quote / configurator box ---- */
.quote-box{
  background:#fff; border-radius:16px; padding:30px; margin-top:34px; max-width:840px;
  box-shadow:0 20px 60px rgba(0,0,0,.25); color:var(--navy);
}
.quote-box h3{font-size:18px; margin:0 0 4px;}
.quote-box .hint{color:var(--grey); font-size:13.5px; margin-bottom:18px;}
.tabs{display:flex; gap:6px; margin-bottom:18px;}
.tab{padding:9px 18px; border-radius:8px; font-size:13.5px; font-weight:700; cursor:pointer; background:var(--ice); color:var(--grey); border:1px solid var(--line);}
.tab.active{background:var(--navy); color:#fff; border-color:var(--navy);}
.field-row{display:grid; grid-template-columns:repeat(4, 1fr); gap:10px;}
.field-row.vin{grid-template-columns:1fr 160px;}
select, input{
  width:100%; padding:13px 14px; border-radius:8px; border:1.5px solid var(--line);
  font-size:14.5px; color:var(--navy); background:#fff; font-family:inherit; cursor:pointer;
}
input{cursor:text;}
select:disabled{color:#aab2c0; cursor:not-allowed; background:var(--ice);}
select:focus, input:focus{outline:none; border-color:var(--red);}
.vin-guarantee{display:flex; align-items:center; gap:8px; margin-top:14px; font-size:13px; color:var(--green); font-weight:600;}
.vin-guarantee .dot{width:8px; height:8px; border-radius:50%; background:var(--green);}
.step-label{font-size:12.5px; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--grey); margin:22px 0 10px;}
.step-label:first-of-type{margin-top:6px;}

/* segmented buttons (position) */
.seg{display:flex; gap:8px; flex-wrap:wrap;}
.seg-btn{flex:1; min-width:110px; text-align:center; padding:12px 14px; border-radius:9px; border:1.5px solid var(--line); background:#fff; font-weight:700; font-size:14px; cursor:pointer; color:var(--navy); user-select:none;}
.seg-btn .sm{display:block; font-weight:500; font-size:11.5px; color:var(--grey); margin-top:2px;}
.seg-btn.sel{border-color:var(--red); background:#fff5f4; color:var(--red-dark);}
.seg-btn.sel .sm{color:var(--red-dark);}

/* component checkbox cards */
.comp-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:8px;}
.comp-card{border:1.5px solid var(--line); border-radius:9px; padding:13px; cursor:pointer; user-select:none; background:#fff; display:flex; flex-direction:column; gap:6px;}
.comp-card .top{display:flex; justify-content:space-between; align-items:center;}
.comp-card .ic{font-size:18px;}
.comp-card .chk{width:18px; height:18px; border-radius:5px; border:1.5px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; font-weight:800;}
.comp-card.sel{border-color:var(--red); background:#fff5f4;}
.comp-card.sel .chk{background:var(--red); border-color:var(--red);}
.comp-card strong{font-size:14px;}
.comp-card span.range{font-size:12px; color:var(--grey);}

/* tier picker per line */
.tier-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; border:1.5px solid var(--line); border-radius:10px; padding:12px 16px; margin-top:8px;}
.tier-row .lbl{font-weight:700; font-size:14.5px; display:flex; align-items:center; gap:8px;}
.tier-row .lbl .ic{font-size:17px;}
.tier-pick{display:flex; gap:6px;}
.tier-pick button{padding:8px 13px; font-size:12.5px; font-weight:700; border-radius:7px; border:1.5px solid var(--line); background:#fff; cursor:pointer; color:var(--grey);}
.tier-pick button.sel{background:var(--navy); color:#fff; border-color:var(--navy);}
.tier-pick button.sel.t-third{background:#5b6678; border-color:#5b6678;}
.tier-pick button.sel.t-second{background:var(--red); border-color:var(--red);}
.tier-pick button.sel.t-first{background:var(--navy); border-color:var(--navy);}

.quote-summary{margin-top:22px; background:var(--ice); border:1.5px solid var(--line); border-radius:12px; padding:20px 22px; display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap;}
.quote-summary .lines{font-size:13px; color:var(--grey); line-height:1.7;}
.quote-summary .lines b{color:var(--navy);}
.quote-summary .total{text-align:right;}
.quote-summary .total .amt{font-size:30px; font-weight:800; color:var(--red);}
.quote-summary .total .cap{font-size:11.5px; color:var(--grey); margin-top:2px;}

/* ---- Value strip ---- */
.strip{background:#fff; border-bottom:1px solid var(--line);}
.strip .wrap{display:grid; grid-template-columns:repeat(4,1fr); gap:0; padding:30px 24px;}
.strip .item{padding:0 22px; border-left:1px solid var(--line);}
.strip .item:first-child{border-left:none; padding-left:0;}
.strip .item .num{color:var(--red); font-weight:800; font-size:22px; display:block; margin-bottom:4px;}
.strip .item .lbl{font-size:13.5px; color:var(--grey); font-weight:600;}

/* ---- Section heading ---- */
.bd-section{padding:72px 0;}
.section-head{max-width:620px; margin:0 auto 44px; text-align:center;}
.kicker{color:var(--red); font-weight:800; font-size:13px; letter-spacing:1.6px; text-transform:uppercase;}
.section-head h2{font-size:32px; font-weight:800; margin:8px 0 0; letter-spacing:-.5px;}
.section-head p{color:var(--grey); margin-top:12px; font-size:16px;}

/* ---- Tier explainer cards ---- */
.tiers{display:grid; grid-template-columns:repeat(3,1fr); gap:22px;}
.tier-card{background:#fff; border:1.5px solid var(--line); border-radius:16px; padding:28px; display:flex; flex-direction:column; gap:14px; position:relative; transition:.15s;}
.tier-card:hover{border-color:var(--red); transform:translateY(-3px); box-shadow:0 16px 40px rgba(21,38,66,.1);}
.tier-card .ribbon{position:absolute; top:-12px; right:24px; background:var(--navy); color:#fff; font-size:11px; font-weight:800; letter-spacing:1px; padding:6px 12px; border-radius:6px; text-transform:uppercase;}
.tier-card.mid .ribbon{background:var(--red);}
.tier-card h3{font-size:20px; font-weight:800; margin:0;}
.tier-card .price{font-size:25px; font-weight:800; color:var(--navy);}
.tier-card .price span{font-size:13px; color:var(--grey); font-weight:600; display:block; margin-top:2px;}
.tier-card ul{list-style:none; display:flex; flex-direction:column; gap:9px; font-size:14px; color:var(--navy); margin:0; padding:0;}
.tier-card ul li{display:flex; gap:9px; align-items:flex-start;}
.tier-card ul li::before{content:"✓"; color:var(--green); font-weight:800;}
.tier-card .note{font-size:12.5px; color:var(--grey); border-top:1px solid var(--line); padding-top:12px;}
.mix-callout{margin-top:28px; background:linear-gradient(120deg, #fff, var(--ice)); border:1.5px dashed var(--red); border-radius:14px; padding:20px 26px; display:flex; align-items:center; gap:18px; justify-content:space-between; flex-wrap:wrap;}
.mix-callout .txt strong{display:block; font-size:16px; margin-bottom:3px;}
.mix-callout .txt span{color:var(--grey); font-size:14px;}

/* ---- How it works ---- */
.steps{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.step{background:#fff; border:1.5px solid var(--line); border-radius:14px; padding:24px;}
.step .n{width:34px; height:34px; border-radius:50%; background:var(--navy); color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-size:15px;}
.step h4{font-size:16px; margin:0 0 6px;}
.step p{font-size:13.5px; color:var(--grey); margin:0;}

/* ---- Trust / value section ---- */
.trust{background:var(--navy); color:#fff;}
.trust .grid{display:grid; grid-template-columns:1.1fr 1fr; gap:50px; align-items:center;}
.trust h2{font-size:30px; font-weight:800; line-height:1.25; letter-spacing:-.5px; margin:0;}
.trust h2 .red{color:#ff8a82;}
.trust p{margin-top:14px; color:#c7d1e0; font-size:15.5px; max-width:480px;}
.trust-cards{display:flex; flex-direction:column; gap:14px;}
.trust-card{background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); border-radius:12px; padding:18px 20px; display:flex; gap:14px; align-items:flex-start;}
.trust-card .ic{font-size:20px;}
.trust-card strong{display:block; margin-bottom:3px; font-size:15px;}
.trust-card span{font-size:13.5px; color:#c7d1e0;}

/* ---- Coverage ---- */
.coverage{display:flex; align-items:center; gap:50px; background:#fff; border:1.5px solid var(--line); border-radius:18px; padding:36px;}
.coverage .map-ph{flex:0 0 230px; height:230px; border-radius:50%; background:radial-gradient(circle at 35% 35%, #ffe1de, var(--ice)); border:2px dashed var(--red); display:flex; align-items:center; justify-content:center; text-align:center; font-weight:700; color:var(--red); font-size:14px; padding:20px;}
.coverage h3{font-size:24px; font-weight:800; margin:0 0 10px;}
.coverage p{color:var(--grey); font-size:15px; max-width:520px; margin-bottom:14px;}
.chip-row{display:flex; gap:8px; flex-wrap:wrap;}
.chip{background:var(--ice); border:1px solid var(--line); padding:6px 13px; border-radius:20px; font-size:13px; font-weight:600; color:var(--navy);}

/* ---- CTA banner ---- */
.cta-banner{background:linear-gradient(120deg, var(--red), var(--red-dark)); color:#fff; border-radius:20px; padding:46px 50px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:24px;}
.cta-banner h3{font-size:26px; font-weight:800; max-width:480px; margin:0;}
.cta-banner p{margin-top:8px; color:#ffe2df; font-size:15px;}
.cta-banner .btn-primary{background:#fff; color:var(--red-dark);}
.cta-banner .btn-primary:hover{background:#ffe2df;}

/* ---- Footer ---- */
.site-footer{background:var(--navy-deep); color:#9fb0c8; padding:50px 0 28px; font-size:13.5px;}
.foot-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:30px; padding-bottom:30px; border-bottom:1px solid rgba(255,255,255,.1);}
.foot-grid h5{color:#fff; font-size:14px; margin:0 0 14px;}
.foot-grid ul{list-style:none; display:flex; flex-direction:column; gap:9px; margin:0; padding:0;}
.foot-bottom{padding-top:22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;}

/* ---- WooCommerce shop overrides (kept consistent with brand) ---- */
.woocommerce ul.products li.product .price{color:var(--red); font-weight:800;}
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.woocommerce-page a.button, .woocommerce-page button.button{
  background:var(--red) !important; color:#fff !important; border-radius:8px !important; font-weight:700 !important; border:none !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover{background:var(--red-dark) !important;}
.woocommerce span.onsale{background:var(--navy) !important; border-radius:6px !important;}
.woocommerce-breadcrumb{padding:18px 0; color:var(--grey); font-size:13px;}

/* ---- Hamburger toggle button ---- */
.nav-toggle{
  display:none; flex-direction:column; justify-content:space-between;
  width:28px; height:21px; background:none; border:none; cursor:pointer; padding:0;
}
.nav-toggle span{display:block; width:100%; height:3px; background:var(--navy); border-radius:2px; transition:.2s;}
.nav-toggle.open span:nth-child(1){transform:translateY(9px) rotate(45deg);}
.nav-toggle.open span:nth-child(2){opacity:0;}
.nav-toggle.open span:nth-child(3){transform:translateY(-9px) rotate(-45deg);}

@media(max-width:920px){
  .field-row, .field-row.vin{grid-template-columns:1fr 1fr;}
  .strip .wrap{grid-template-columns:repeat(2,1fr); gap:20px;}
  .strip .item{border-left:none; border-top:1px solid var(--line); padding:18px 0 0;}
  .strip .item:first-child{border-top:none; padding-top:0;}
  .tiers, .steps{grid-template-columns:1fr;}
  .trust .grid{grid-template-columns:1fr;}
  .coverage{flex-direction:column; text-align:center;}
  .foot-grid{grid-template-columns:1fr 1fr;}
  .comp-grid{grid-template-columns:1fr 1fr;}
  .nav-toggle{display:flex;}

  /* Mobile nav — hidden until toggled */
  .main-nav{
    display:none; position:absolute; top:74px; left:0; right:0; z-index:100;
    background:#fff; border-bottom:2px solid var(--red); box-shadow:0 8px 30px rgba(0,0,0,.1);
  }
  .main-nav.open{display:block;}
  .main-nav ul{flex-direction:column; gap:0; padding:0; margin:0;}
  .main-nav ul li a{display:block; padding:16px 24px; border-bottom:1px solid var(--line); font-size:16px;}

  .hero h1{font-size:34px;}
  .hero{padding:48px 0 60px;}
  .cta-banner{padding:30px 24px;}
  .cta-banner h3{font-size:22px;}
}

@media(max-width:480px){
  .field-row, .field-row.vin{grid-template-columns:1fr;}
  .comp-grid{grid-template-columns:1fr 1fr;}
  .seg{flex-direction:column;}
  .seg-btn{min-width:unset;}
  .hero h1{font-size:28px;}
  .hero p.lead{font-size:16px;}
  .quote-summary{flex-direction:column; text-align:center;}
  .quote-summary .total{text-align:center;}
  .strip .wrap{grid-template-columns:1fr;}
  .foot-grid{grid-template-columns:1fr;}
  .topbar .wrap{flex-direction:column; height:auto; padding:8px 24px; gap:4px; text-align:center;}
  .header-cta .btn-ghost:first-child{display:none;} /* hide "My Garage" on tiny screens, keep Find My Brakes + cart */
  .mix-callout{flex-direction:column;}
}
