/*
Theme Name: Convex Containers
Description: WooCommerce theme for a shipping container and modular building supplier. Rebuilds the reference layout without a page builder: one stylesheet, no Elementor, no premium theme licence.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: convex
*/

:root{
	--ink:#242424; --steel:#242424; --steel-900:#1a1a1a; --steel-700:#3a3a3a;
	--accent:#a1cfde; --accent-600:#91bac7; --accent-ink:#1f4753;
	--sage:#c2d197;
	--bg:#fff; --soft:#f5f7f8; --tint:#eaf2f6; --line:#e2e8ec; --muted:#767676;
	--wrap:1200px; --radius:8px;
	--shadow:0 1px 2px rgba(36,36,36,.05),0 8px 24px rgba(36,36,36,.07);
	--s0:clamp(1rem,.97rem+.15vw,1.0625rem);
	--s1:clamp(1.12rem,1.05rem+.35vw,1.3rem);
	--s2:clamp(1.35rem,1.22rem+.65vw,1.8rem);
	--s3:clamp(1.65rem,1.4rem+1.25vw,2.35rem);
	--s4:clamp(1.9rem,1.5rem+2.1vw,3rem);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;transition-duration:.001ms!important}}
body{margin:0;background:var(--bg);color:var(--ink);font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:var(--s0);line-height:1.65;-webkit-font-smoothing:antialiased}
img,svg{max-width:100%;height:auto;display:block}
a{color:var(--accent-600);text-underline-offset:2px}
a:hover{color:var(--steel)}
h1,h2,h3,h4{line-height:1.18;margin:0 0 .5em;color:var(--steel);font-weight:750;letter-spacing:-.015em}
h1{font-size:var(--s4)} h2{font-size:var(--s3)} h3{font-size:var(--s2)} h4{font-size:var(--s1)}
p{margin:0 0 1.1em}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
.skip-link{position:absolute;left:-9999px;background:var(--steel);color:#fff;padding:12px 18px}
.skip-link:focus{left:0;color:#fff}

.wrap{width:min(100% - 2rem,var(--wrap));margin-inline:auto}
.section{padding:clamp(2.75rem,6vw,4.75rem) 0}
.section--soft{background:var(--soft)}
.section--steel{background:var(--steel-900);color:#cfdbe7}
.section--steel h2,.section--steel h3{color:#fff}
.eyebrow{display:inline-block;font-size:.78rem;font-weight:750;letter-spacing:.15em;text-transform:uppercase;color:var(--accent);margin-bottom:.7rem}
.section__head{max-width:46rem;margin-bottom:2.25rem}
.section__head p{color:var(--muted);font-size:var(--s1);margin:0}
.section--steel .section__head p{color:#9fb3c8}

.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.8rem 1.5rem;border-radius:var(--radius);font-weight:700;text-decoration:none;border:2px solid transparent;transition:background-color .18s,color .18s,border-color .18s}
.btn--primary{background:var(--accent);color:var(--accent-ink)}
.btn--primary:hover{background:var(--accent-600);color:var(--accent-ink)}
.btn--steel{background:var(--steel);color:#fff}
.btn--steel:hover{background:var(--steel-700);color:#fff}
.btn--ghost{border-color:rgba(255,255,255,.5);color:#fff}
.btn--ghost:hover{background:rgba(255,255,255,.12);color:#fff}
.btn--outline{border-color:var(--line);color:var(--steel);background:#fff}
.btn--outline:hover{border-color:var(--steel)}

/* header */
.site-header{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid var(--line)}
.topbar{background:var(--steel-900);color:#b9c9d8;font-size:.86rem}
.topbar .wrap{display:flex;flex-wrap:wrap;gap:.4rem 1.5rem;justify-content:space-between;padding:.5rem 1rem}
.topbar a{color:#dce6ef;text-decoration:none}
.topbar a:hover{color:#fff}
.hdr{display:flex;align-items:center;gap:1.25rem;min-height:72px}
.brand{display:flex;align-items:center;gap:.65rem;text-decoration:none;margin-right:auto;font-weight:800;color:var(--steel);font-size:1.1rem;line-height:1.1}
.brand img{max-height:46px;width:auto}
.brand span{display:block;font-size:.72rem;font-weight:500;color:var(--muted);letter-spacing:.02em}
.nav ul{display:flex;align-items:center;gap:.2rem;list-style:none;margin:0;padding:0}
.nav a{display:block;padding:.5rem .75rem;border-radius:6px;color:var(--steel);font-weight:600;text-decoration:none;font-size:.95rem}
.nav a:hover{background:var(--tint)}
.nav .current-menu-item>a{color:var(--accent-600)}
.navbtn{display:inline-flex;flex-direction:column;justify-content:center;gap:5px;width:44px;height:44px;padding:0 10px;background:none;border:1px solid var(--line);border-radius:7px;cursor:pointer}
.navbtn span{display:block;height:2px;background:var(--steel);border-radius:2px;transition:transform .2s,opacity .2s}
.navbtn[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.navbtn[aria-expanded="true"] span:nth-child(2){opacity:0}
.navbtn[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.hdr__cta{display:none}
@media(min-width:1040px){.hdr__cta{display:inline-flex}.navbtn{display:none}}
@media(max-width:1039px){
	.nav{position:fixed;inset:auto 0 auto 0;top:var(--navtop,72px);background:#fff;border-bottom:1px solid var(--line);box-shadow:var(--shadow);max-height:0;overflow:hidden;transition:max-height .25s}
	.nav.is-open{max-height:80vh;overflow-y:auto}
	.nav ul{flex-direction:column;align-items:stretch;gap:0;padding:.5rem 1rem 1.25rem}
	.nav a{padding:.9rem .5rem;border-bottom:1px solid var(--line);border-radius:0;font-size:1.05rem}
}

/* hero */
.hero{position:relative;background:linear-gradient(130deg,#1a1a1a 0%,#242424 55%,#2e4a54 100%);color:#fff;overflow:hidden}
.hero::after{content:"";position:absolute;inset:0;background:radial-gradient(55rem 28rem at 88% -15%,rgba(161,207,222,.30),transparent 62%);pointer-events:none}
.hero__in{position:relative;z-index:1;padding:clamp(3rem,8vw,5.5rem) 0}
.hero h1{color:#fff;margin-bottom:.55rem;max-width:20ch}
.hero p{color:rgba(255,255,255,.9);font-size:var(--s1);max-width:40rem}
.hero .eyebrow{color:#a1cfde}
.hero__act{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:1.8rem}
.hero__stats{display:flex;flex-wrap:wrap;gap:1.2rem 2.5rem;margin-top:2.2rem;padding-top:1.4rem;border-top:1px solid rgba(255,255,255,.18)}
.hero__stats strong{display:block;font-size:1.65rem;color:#fff;line-height:1.1}
.hero__stats span{font-size:.85rem;color:rgba(255,255,255,.7)}

/* grids */
.grid{display:grid;gap:1.25rem}
@media(min-width:640px){.grid--2{grid-template-columns:repeat(2,1fr)}}
@media(min-width:900px){.grid--3{grid-template-columns:repeat(3,1fr)}}
@media(min-width:640px){.grid--4{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1040px){.grid--4{grid-template-columns:repeat(4,1fr)}}

/* category tiles */
.cat{position:relative;display:block;border-radius:var(--radius);overflow:hidden;background:var(--steel);text-decoration:none;min-height:190px;border:1px solid var(--line)}
.cat img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:.55;transition:transform .4s,opacity .3s}
.cat:hover img{transform:scale(1.05);opacity:.42}
.cat__b{position:relative;z-index:1;padding:1.5rem;display:flex;flex-direction:column;justify-content:flex-end;min-height:190px}
.cat__b h3{color:#fff;font-size:1.12rem;margin:0 0 .2rem}
.cat__b span{color:rgba(255,255,255,.82);font-size:.88rem}

/* product cards */
.pcard{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;transition:border-color .2s,box-shadow .2s,transform .2s}
.pcard:hover{border-color:#b4c6d8;box-shadow:var(--shadow);transform:translateY(-2px)}
.pcard__m{aspect-ratio:4/3;background:var(--tint);overflow:hidden}
.pcard__m img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.pcard:hover .pcard__m img{transform:scale(1.04)}
.pcard__b{padding:1.1rem 1.15rem 1.25rem;display:flex;flex-direction:column;flex:1}
.pcard h3{font-size:1.02rem;line-height:1.3;margin:0 0 .4rem}
.pcard h3 a{color:var(--steel);text-decoration:none}
.pcard h3 a:hover{color:var(--accent-600)}
.pcard .price{font-weight:800;color:var(--steel);font-size:1.15rem;margin:.1rem 0 .9rem}
.pcard .btn{margin-top:auto;justify-content:center}

/* feature rows */
.feat{display:grid;gap:2rem;align-items:center}
@media(min-width:900px){.feat{grid-template-columns:1fr 1fr;gap:3rem}.feat--rev>div:first-child{order:2}}
.feat ul{padding-left:1.15rem;color:var(--muted)}
.feat li+li{margin-top:.45rem}

/* grading */
.grade{background:#fff;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--radius);padding:1.4rem 1.5rem}
.grade h3{font-size:1.05rem;margin-bottom:.35rem;text-transform:uppercase;letter-spacing:.04em}
.grade p{color:var(--muted);margin:0;font-size:.95rem}

/* page + woo */
.page-hero{background:linear-gradient(130deg,var(--steel-900),var(--steel) 72%);color:#fff;padding:clamp(2.5rem,5vw,4rem) 0}
.page-hero h1{color:#fff;margin:0}
.page-hero .crumbs{font-size:.85rem;color:rgba(255,255,255,.65);margin-bottom:.7rem}
.page-hero .crumbs a{color:rgba(255,255,255,.85)}
.prose{max-width:46rem}
.prose>*+*{margin-top:1.05em}
.prose h2{margin-top:2em}
.prose table{width:100%;border-collapse:collapse}
.prose th,.prose td{text-align:left;padding:.6rem .75rem;border-bottom:1px solid var(--line)}
.prose th{background:var(--soft);width:40%}
.woocommerce-message,.woocommerce-info{border-top-color:var(--accent)!important}
@media(min-width:640px){}
@media(min-width:1040px){}
.woocommerce ul.products li.product{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1rem;margin:0;text-align:left}
.woocommerce ul.products li.product img{border-radius:6px;margin-bottom:.75rem}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:1rem!important;color:var(--steel);padding:0!important}
.woocommerce ul.products li.product .price{color:var(--steel)!important;font-weight:800}
.woocommerce .button,.woocommerce a.button,.woocommerce button.button{background:var(--accent)!important;color:var(--accent-ink)!important;border-radius:var(--radius)!important;font-weight:700!important}
.woocommerce .button:hover{background:var(--accent-600)!important}

/* footer */
.site-footer{background:var(--steel-900);color:rgba(255,255,255,.75);padding-top:clamp(2.75rem,5vw,4rem)}
.site-footer h3{color:#fff;font-size:.95rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:1rem}
.site-footer a{color:rgba(255,255,255,.8);text-decoration:none}
.site-footer a:hover{color:#fff;text-decoration:underline}
.fgrid{display:grid;gap:2rem;padding-bottom:2.5rem}
@media(min-width:760px){.fgrid{grid-template-columns:1.6fr 1fr 1fr 1.2fr;gap:2.5rem}}
.flist{list-style:none;margin:0;padding:0;display:grid;gap:.5rem;font-size:.94rem}
.fbot{border-top:1px solid rgba(255,255,255,.14);padding:1.1rem 0 2rem;font-size:.86rem;color:rgba(255,255,255,.6);display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;justify-content:space-between}




/* ================================================================
   RESPONSIVE LAYER — single source of truth.

   Written mobile-first. The important part is the first block:
   WooCommerce's smallscreen.css sets `width:48%; float:left` on
   every product <li>. Inside a CSS Grid parent the float is ignored
   but the 48% is not, so each card rendered at roughly half of its
   own column. Those three declarations have to be unset at every
   width, not just on phones.
   ================================================================ */

/* 1. Neutralise WooCommerce's float grid, all widths. */
.woocommerce ul.products,
.woocommerce-page ul.products{
	display:grid;
	grid-template-columns:repeat(2,1fr);
	gap:1rem;
	margin:0 0 2rem;
	padding:0;
	list-style:none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{content:none!important;display:none!important}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product,
.woocommerce ul.products[class*="columns-"] li.product:nth-child(2n){
	width:auto!important;
	float:none!important;
	clear:none!important;
	margin:0!important;
	display:flex;
	flex-direction:column;
}
.woocommerce ul.products li.product a img{margin:0 0 .65rem;width:100%}
.woocommerce ul.products li.product .button{margin-top:auto}

/* 2. Product columns step up with the viewport. */
@media(min-width:768px){
	.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(3,1fr);gap:1.25rem}
}
@media(min-width:1040px){
	.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(4,1fr);gap:1.5rem}
}

/* 3. The theme's own card grids follow the same steps. */
.grid--2,.grid--3,.grid--4{grid-template-columns:repeat(2,1fr)}
@media(max-width:479px){
	.grid--2{grid-template-columns:1fr}
}
@media(min-width:768px){
	.grid--3{grid-template-columns:repeat(3,1fr)}
	.grid--4{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:1040px){
	.grid--4{grid-template-columns:repeat(4,1fr)}
}

/* 4. Nothing may exceed the viewport. */
html,body{max-width:100%;overflow-x:hidden}
img,table,pre,iframe{max-width:100%}
h1,h2,h3,h4,p,li,a,td,th{overflow-wrap:anywhere}

/* 5. Wide tables scroll in their own box. */
.prose table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
.prose table th,.prose table td{min-width:6.5rem}
@media(min-width:768px){
	.prose table{display:table}
	.prose table th,.prose table td{min-width:0}
}

/* 6. Phone sizing. */
@media(max-width:767px){
	.section{padding:2.25rem 0}
	.hero__in{padding:2.5rem 0}
	.hero__stats{gap:.9rem 1.5rem;margin-top:1.5rem;padding-top:1.1rem}
	.hero__stats strong{font-size:1.3rem}
	.hero__stats span{font-size:.78rem}
	.hero__act{gap:.6rem}
	.hero__act .btn{flex:1 1 100%;justify-content:center}
	.section__head{margin-bottom:1.4rem}

	.cat,.cat__b{min-height:132px}
	.cat__b{padding:.85rem}
	.cat__b h3{font-size:.9rem;margin-bottom:.1rem}
	.cat__b span{font-size:.75rem}

	.pcard__b{padding:.7rem .75rem .85rem}
	.pcard h3{font-size:.85rem;line-height:1.3;margin-bottom:.3rem}
	.pcard .price{font-size:.92rem;margin:0 0 .6rem}
	.pcard .btn{font-size:.78rem;padding:.5rem .55rem}

	.woocommerce ul.products li.product{padding:.6rem}
	.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.84rem!important;line-height:1.3}
	.woocommerce ul.products li.product .price{font-size:.88rem!important}
	.woocommerce ul.products li.product .button{width:100%;text-align:center;font-size:.78rem!important;padding:.55rem .5rem!important}

	.feat{gap:1.5rem}
	.grade{padding:1.05rem 1.15rem}
	.fgrid{gap:1.6rem}
	.fbot{flex-direction:column;gap:.3rem}
	.woocommerce-result-count,.woocommerce-ordering{float:none!important;width:100%;margin-bottom:.75rem}
	.woocommerce-ordering select{width:100%}
}

/* 7. Header stays on one line. */
@media(max-width:1039px){
	.hdr{min-height:62px;gap:.7rem}
	.brand{font-size:.98rem}
	.brand img{max-height:36px}
	.brand span{display:none}
}

/* 8. Touch targets. */
@media(pointer:coarse){
	.nav a,.btn{min-height:44px;display:flex;align-items:center}
	.btn{justify-content:center}
}

/* 9. Single product page on a phone. */
@media(max-width:767px){
	.woocommerce div.product div.images,
	.woocommerce div.product div.summary{width:100%!important;float:none!important;margin:0 0 1.25rem!important}
	.woocommerce div.product .woocommerce-tabs ul.tabs{padding:0!important}
	.woocommerce div.product .woocommerce-tabs ul.tabs li{display:block;margin:0 0 .25rem!important;border-radius:4px}
}

/* Quote button on every unit. Full width so it reads as the card's action. */
.woocommerce ul.products li.product .cvx-quote,
.pcard .cvx-quote{
	display:flex;width:100%;justify-content:center;margin-top:auto;
	text-decoration:none;font-size:.85rem;padding:.6rem .7rem;
}
.cvx-quote-wrap{margin:1rem 0 1.25rem}
.cvx-quote-wrap .cvx-quote{display:inline-flex;width:auto;padding:.8rem 1.6rem;font-size:1rem}
@media(max-width:767px){
	.cvx-quote-wrap .cvx-quote{display:flex;width:100%}
	.woocommerce ul.products li.product .cvx-quote{font-size:.78rem;padding:.5rem .55rem}
}

/* ---------- hero slideshow ----------
   Cross-fading background images behind the hero text. Pure CSS animation,
   no library and no JavaScript: the slides are divs with background-image and
   staggered animation delays, so there is nothing to block rendering.
   The gradient sits on top so the text keeps its contrast whatever the photo.
   ------------------------------------ */
.hero--has-slides{background:#1a1a1a}
.hero__slides{position:absolute;inset:0;z-index:0;overflow:hidden}
.hero__slide{
	position:absolute;inset:0;
	background-size:cover;background-position:center;
	opacity:0;
	animation:cvxFade 24s infinite;
}
.hero__slide:nth-child(1){animation-delay:0s}
.hero__slide:nth-child(2){animation-delay:6s}
.hero__slide:nth-child(3){animation-delay:12s}
.hero__slide:nth-child(4){animation-delay:18s}
@keyframes cvxFade{
	0%   {opacity:0;transform:scale(1.06)}
	6%   {opacity:1}
	25%  {opacity:1;transform:scale(1)}
	31%  {opacity:0}
	100% {opacity:0}
}
/* Readability layer over the photographs. */
.hero--has-slides::before{
	content:"";position:absolute;inset:0;z-index:1;
	background:linear-gradient(100deg,
		rgba(20,20,20,.90) 0%,
		rgba(20,20,20,.78) 38%,
		rgba(20,20,20,.45) 68%,
		rgba(26,38,44,.35) 100%);
}
.hero--has-slides::after{z-index:2}
.hero--has-slides .hero__in{position:relative;z-index:3}

/* A still image is better than a moving one for anyone who asked for less motion. */
@media(prefers-reduced-motion:reduce){
	.hero__slide{animation:none}
	.hero__slide:nth-child(1){opacity:1}
}
@media(max-width:767px){
	.hero--has-slides::before{
		background:linear-gradient(170deg,rgba(20,20,20,.86) 0%,rgba(20,20,20,.80) 55%,rgba(20,20,20,.72) 100%);
	}
}
