/*
Theme Name: BuyForLess
Theme URI: https://www.buyforless.com/
Author: BuyForLess.com
Description: Lightweight custom theme for the BuyForLess product search and BuyForLess Guides.
Version: 1.9.0
License: GPL-2.0-or-later
Text Domain: buyforless
*/
:root{
 --bfl-blue:#1a73e8;
 --bfl-green:#188038;
 --bfl-red:#ea4335;
 --bfl-text:#202124;
 --bfl-muted:#667085;
 --bfl-line:#e3e6ea;
 --bfl-soft:#f7f8fa;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
 margin:0;
 background:#fff;
 color:var(--bfl-text);
 font-family:Arial,Helvetica,sans-serif;
 -webkit-font-smoothing:antialiased;
}
a{color:var(--bfl-blue);text-decoration:none}
img{max-width:100%;height:auto}
.site-shell{min-height:100vh;display:flex;flex-direction:column}
.site-main{flex:1}
.bfl-brand{
 display:inline-block;
 font-weight:700;
 letter-spacing:-2px;
 line-height:1;
 text-decoration:none;
}
.bfl-brand .blue{color:var(--bfl-blue)}
.bfl-brand .green{color:var(--bfl-green)}
.bfl-brand .red{color:var(--bfl-red)}
.site-header{
 min-height:54px;
 display:flex;
 justify-content:center;
 align-items:center;
 padding:10px 20px;
}
.site-header .bfl-brand{font-size:22px}
.home .site-header{visibility:hidden;height:0;min-height:0;padding:0}
.bfl-home{
 width:min(780px,calc(100% - 32px));
 margin:0 auto;
 padding:16vh 0 80px;
}
.bfl-home-brand{text-align:center;margin-bottom:28px}
.bfl-home-brand .bfl-brand{
 font-size:clamp(50px,9vw,72px);
 letter-spacing:-4px;
}
.bfl-home h1{
 text-align:center;
 font-size:clamp(22px,4vw,29px);
 line-height:1.25;
 font-weight:400;
 margin:0 0 22px;
}
.bfl-plugin-slot > .bfl{width:100%!important;margin:0!important;padding:0!important}
.bfl-plugin-slot .bfl-logo,
.bfl-plugin-slot .bfl > h1{display:none!important}
.bfl-plugin-slot .bfl-search{margin:0 auto}
.bfl-fallback-search{
 height:58px;
 border:1px solid #dfe1e5;
 border-radius:30px;
 display:flex;
 align-items:center;
 padding:0 8px 0 20px;
 box-shadow:0 1px 6px rgba(32,33,36,.14);
 background:#fff;
}
.bfl-fallback-search input{
 flex:1;min-width:0;border:0;outline:0;background:transparent;
 font-size:18px;padding:0 10px;
}
.bfl-fallback-search button{
 width:44px;height:44px;border:0;border-radius:50%;
 background:transparent;cursor:pointer;padding:10px;
}
.bfl-fallback-search svg{width:23px;fill:var(--bfl-blue)}
.bfl-home-help{
 text-align:center;color:var(--bfl-muted);font-size:13px;margin-top:16px
}
.content-wrap{
 width:min(780px,calc(100% - 32px));
 margin:28px auto 70px;
}
.article{
 width:min(720px,100%);
 margin:0 auto;
}
.article h1{
 font-size:clamp(30px,5vw,44px);
 line-height:1.12;
 letter-spacing:-1px;
 margin:18px 0 10px;
}
.article-meta{font-size:13px;color:var(--bfl-muted);margin-bottom:30px}
.article-content{font-size:17px;line-height:1.75}
.article-content h2{font-size:27px;line-height:1.25;margin-top:38px}
.article-content h3{font-size:21px;margin-top:30px}
.article-content p{margin:0 0 20px}
.article-content ul,.article-content ol{padding-left:24px}
.article-content img{border-radius:8px}
.archive-title{font-size:32px;margin:15px 0 28px}
.post-list article{padding:22px 0;border-bottom:1px solid var(--bfl-line)}
.post-list h2{font-size:22px;margin:0 0 7px}
.post-list p{color:var(--bfl-muted);line-height:1.55;margin:0}
.site-footer{
 border-top:1px solid #f0f1f3;
 text-align:center;
 padding:18px 20px;
 color:#8a94a3;
 font-size:12px;
}
.site-footer a{color:#7a8491;margin:0 8px}
@media(max-width:600px){
 .bfl-home{padding-top:18vh}
 .bfl-home-brand .bfl-brand{letter-spacing:-2.7px}
 .bfl-fallback-search{height:54px;padding-left:14px}
 .bfl-fallback-search input{font-size:16px}
 .article-content{font-size:16px}
}

/* BuyForLess 1.1 refinements */
.bfl-home{width:min(720px,calc(100% - 32px));padding-top:11vh}
.bfl-home-brand .bfl-brand{font-size:clamp(46px,7vw,64px)}
.bfl-home h1{font-size:clamp(21px,3vw,27px);margin-bottom:20px}
.bfl-plugin-slot,.bfl-fallback-search{width:100%;max-width:640px;margin-left:auto;margin-right:auto}
.bfl-live-results{margin:42px auto 0;max-width:720px}
.bfl-live-results>h2{font-size:24px;margin:0 0 8px;padding-bottom:12px;border-bottom:1px solid var(--bfl-line)}
.bfl-offers{width:100%}
.bfl-offer{display:grid;grid-template-columns:112px minmax(0,1fr) 120px;gap:18px;align-items:center;padding:20px 0;border-bottom:1px solid var(--bfl-line)}
.bfl-offer-image{display:flex;align-items:center;justify-content:center;width:112px;height:100px}
.bfl-offer-image img{max-width:112px;max-height:100px;object-fit:contain}
.bfl-offer-main h3{font-size:17px;line-height:1.3;margin:0 0 7px}
.bfl-offer-main h3 a{color:var(--bfl-text)}
.bfl-offer-desc{font-size:13px;line-height:1.45;color:var(--bfl-muted);margin-bottom:7px}
.bfl-merchant{font-size:13px;font-weight:700;color:#454b54}
.bfl-offer-buy{text-align:right}
.bfl-price{font-size:20px;font-weight:700;color:var(--bfl-green);margin-bottom:2px}
.bfl-old-price{font-size:12px;color:#8a94a3;text-decoration:line-through;margin-bottom:9px}
.bfl-deal{display:inline-block;background:var(--bfl-blue);color:#fff!important;border-radius:20px;padding:9px 15px;font-size:13px;font-weight:700}
@media(max-width:600px){
 .bfl-home{padding-top:8vh}
 .bfl-offer{grid-template-columns:82px minmax(0,1fr);gap:13px}
 .bfl-offer-image{width:82px;height:82px}
 .bfl-offer-image img{max-width:82px;max-height:82px}
 .bfl-offer-buy{grid-column:2;text-align:left;display:flex;align-items:center;gap:12px}
 .bfl-price{margin:0}
 .bfl-old-price{display:none}
}

/* BuyForLess 1.2 */
.site-header{display:none}
.bfl-home{
 width:min(760px,calc(100% - 32px));
 padding-top:8vh;
}
.bfl-home-brand .bfl-brand{
 font-size:clamp(50px,8vw,68px);
}
.bfl-plugin-slot,
.bfl-fallback-search{
 width:100%;
 max-width:590px;
}
.bfl-live-results{
 max-width:760px;
 margin-top:30px;
}
.bfl-offer{
 grid-template-columns:126px minmax(0,1fr) 130px;
 gap:20px;
 padding:22px 0;
}
.bfl-offer-image{
 width:126px;
 height:110px;
}
.bfl-offer-image img{
 max-width:126px;
 max-height:110px;
}
.bfl-offer-main h3{
 font-size:18px;
 line-height:1.3;
}
.bfl-offer-desc{
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
 overflow:hidden;
 font-size:13px;
 line-height:1.45;
}
.bfl-price{
 font-size:22px;
}
.bfl-deal{
 padding:10px 17px;
 font-size:14px;
}
@media(max-width:600px){
 .bfl-home{padding-top:6vh}
 .bfl-offer{grid-template-columns:88px minmax(0,1fr);gap:13px;padding:18px 0}
 .bfl-offer-image{width:88px;height:88px}
 .bfl-offer-image img{max-width:88px;max-height:88px}
 .bfl-offer-main h3{font-size:16px}
 .bfl-price{font-size:19px}
 .bfl-deal{font-size:13px;padding:9px 14px}
}

/* BuyForLess 1.3 */
.bfl-home-brand{margin-bottom:22px}

/* BuyForLess 1.5 compact results header */
.bfl-results-page{
 width:min(1040px,calc(100% - 40px));
 margin:0 auto;
 padding:38px 0 70px;
}
.bfl-results-header{
 display:flex;
 align-items:center;
 gap:34px;
 padding-bottom:24px;
 border-bottom:1px solid var(--bfl-line);
}
.bfl-results-brand{
 flex:0 0 auto;
 line-height:1;
}
.bfl-results-brand .bfl-brand{
 font-size:34px;
 letter-spacing:-2px;
 white-space:nowrap;
}
.bfl-results-search{
 flex:1;
 max-width:none;
 margin:0;
 height:52px;
}
.bfl-results-search input{
 font-size:17px;
}
.bfl-results-page .bfl-live-results{
 max-width:100%;
 margin:14px 0 0;
}
.bfl-results-page .bfl-offer{
 grid-template-columns:126px minmax(0,1fr) 130px;
}
@media(max-width:700px){
 .bfl-results-page{
  width:min(100% - 28px,760px);
  padding-top:24px;
 }
 .bfl-results-header{
  display:block;
  padding-bottom:18px;
 }
 .bfl-results-brand{
  display:block;
  text-align:center;
  margin-bottom:17px;
 }
 .bfl-results-brand .bfl-brand{
  font-size:32px;
 }
 .bfl-results-search{
  width:100%;
 }
}

/* BuyForLess 1.6 */
.bfl-results-search{
 position:relative;
 padding-right:86px;
}
.bfl-results-search input{
 padding-right:10px;
}
.bfl-clear-search{
 position:absolute;
 right:49px;
 top:50%;
 transform:translateY(-50%);
 width:28px;
 height:28px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 border:0;
 background:transparent;
 color:#7b8490;
 font-size:25px;
 line-height:1;
 cursor:pointer;
 padding:0;
}
.bfl-clear-search:hover{color:#202124}

/* Tighter result rows */
.bfl-results-page .bfl-offer{
 padding:17px 0;
}
.bfl-results-page .bfl-offer-image{
 height:94px;
}
.bfl-results-page .bfl-offer-image img{
 max-height:94px;
}

/* Center price over action and make action smaller */
.bfl-results-page .bfl-offer-buy{
 text-align:center;
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
}
.bfl-results-page .bfl-price{
 width:100%;
 text-align:center;
}
.bfl-results-page .bfl-deal{
 padding:8px 13px;
 font-size:12px;
 border-radius:18px;
}
@media(max-width:600px){
 .bfl-results-page .bfl-offer{
  padding:15px 0;
 }
 .bfl-results-page .bfl-offer-buy{
  grid-column:2;
  flex-direction:row;
  justify-content:flex-start;
  gap:10px;
 }
 .bfl-results-page .bfl-price{
  width:auto;
 }
 .bfl-results-page .bfl-deal{
  padding:7px 11px;
  font-size:12px;
 }
}

/* BuyForLess 1.7: one clear X only */
.bfl-results-search input[type="search"]::-webkit-search-cancel-button,
.bfl-results-search input[type="search"]::-webkit-search-decoration{
 -webkit-appearance:none;
 appearance:none;
 display:none;
}
.bfl-results-search input[type="search"]::-ms-clear,
.bfl-results-search input[type="search"]::-ms-reveal{
 display:none;
 width:0;
 height:0;
}

/* Put custom X to the right of the search icon */
.bfl-results-search{
 padding-right:92px;
}
.bfl-results-search button[type="submit"]{
 position:absolute;
 right:47px;
 top:50%;
 transform:translateY(-50%);
}
.bfl-clear-search{
 right:12px;
}

/* BuyForLess 1.8 mobile results redesign */
@media(max-width:700px){
 .bfl-results-page{
  width:calc(100% - 28px);
  padding:14px 0 45px;
 }
 .bfl-results-header{
  padding-bottom:15px;
  border-bottom:1px solid var(--bfl-line);
 }
 .bfl-results-brand{
  margin-bottom:14px;
 }
 .bfl-results-brand .bfl-brand{
  font-size:30px;
  letter-spacing:-1.6px;
 }
 .bfl-results-search{
  height:50px;
  padding-right:82px;
 }
 .bfl-results-search input{
  font-size:17px;
 }
 .bfl-results-page .bfl-live-results{
  margin-top:0;
 }
 .bfl-results-page .bfl-offer{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  grid-template-areas:
   "image info"
   "image buy";
  column-gap:15px;
  row-gap:8px;
  align-items:start;
  padding:18px 0;
 }
 .bfl-results-page .bfl-offer-image{
  grid-area:image;
  width:92px;
  height:108px;
  align-self:center;
 }
 .bfl-results-page .bfl-offer-image img{
  max-width:92px;
  max-height:108px;
 }
 .bfl-results-page .bfl-offer-main{
  grid-area:info;
  min-width:0;
 }
 .bfl-results-page .bfl-offer-main h3{
  font-size:16px;
  line-height:1.24;
  margin:0 0 5px;
 }
 .bfl-results-page .bfl-offer-desc{
  font-size:13px;
  line-height:1.35;
  margin-bottom:5px;
  -webkit-line-clamp:2;
 }
 .bfl-results-page .bfl-merchant{
  font-size:12px;
 }
 .bfl-results-page .bfl-offer-buy{
  grid-area:buy;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  text-align:left;
 }
 .bfl-results-page .bfl-price{
  width:auto;
  font-size:19px;
  line-height:1;
  margin:0;
  white-space:nowrap;
 }
 .bfl-results-page .bfl-deal{
  white-space:nowrap;
  padding:7px 12px;
  font-size:11px;
  line-height:1.1;
  border-radius:16px;
 }
}
@media(max-width:390px){
 .bfl-results-page .bfl-offer{
  grid-template-columns:82px minmax(0,1fr);
  column-gap:12px;
 }
 .bfl-results-page .bfl-offer-image{
  width:82px;
  height:100px;
 }
 .bfl-results-page .bfl-offer-image img{
  max-width:82px;
  max-height:100px;
 }
 .bfl-results-page .bfl-offer-main h3{
  font-size:15px;
 }
}

/* BuyForLess 1.9 compact mobile listings */
@media(max-width:700px){
 .bfl-results-page .bfl-offer{
  grid-template-columns:82px minmax(0,1fr);
  grid-template-areas:
   "image info"
   "image buy";
  column-gap:13px;
  row-gap:6px;
  padding:13px 0;
 }
 .bfl-results-page .bfl-offer-image{
  width:82px;
  height:88px;
 }
 .bfl-results-page .bfl-offer-image img{
  max-width:82px;
  max-height:88px;
 }
 .bfl-results-page .bfl-offer-desc{
  display:none;
 }
 .bfl-results-page .bfl-offer-main h3{
  font-size:15px;
  line-height:1.2;
  margin:0 0 5px;
 }
 .bfl-results-page .bfl-merchant{
  font-size:12px;
  line-height:1.2;
 }
 .bfl-results-page .bfl-offer-buy{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin:0;
 }
 .bfl-results-page .bfl-price{
  width:auto;
  font-size:18px;
  line-height:1;
  margin:0;
 }
 .bfl-results-page .bfl-deal{
  padding:6px 11px;
  font-size:11px;
  line-height:1;
  border-radius:15px;
 }
}
