/* NORU – one hand-written stylesheet reproducing the legacy Warehouse look.
   Values come from docs/DESIGN.md (extracted from the live theme). */

:root {
  --text: #333;
  --heading: #1f2937;
  --link-hover: #000;
  --muted: #777;
  --border: #e3e3e3;
  --border-menu: #dcdcdc;
  --divider: hsla(0, 0%, 63%, .25);
  --primary: #4a748a;            /* theme buttons */
  --primary-alt: #155e75;        /* landing-page buttons (cyan-800) */
  --primary-alt-text: #fefce8;
  --secondary-bg: #f8f8f8;
  --secondary-hover: #dedede;
  --gold: #d4af37;               /* sale badge */
  --green: #8dab7f;
  --red: #f95738;
  --img-bg: #f3f3f3;
  --band: #f3f3f3;               /* category header band */
  --band-blue: #cedce8;          /* category description band */
  --section-bar: #e5e7eb;
  --seo-box: #cbd5e1;
  --footer-bg: #f8f8f8;
  --bg: #fff;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Source Sans Pro", system-ui, sans-serif;
  --container: 1670px;
  --inner: 1175px;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
@media (max-width: 767px) { html { font-size: 15px; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.4 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { color: var(--heading); font-weight: 600; margin: 0; }
h1 { font-size: 1.875rem; line-height: 1.2; }
h2 { font-size: 1.125rem; line-height: 1.55; margin: 20px 0 .5rem; }
h3 { font-size: 1rem; margin-top: .75rem; }
p { margin: 0 0 .8rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
s { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.narrow { max-width: var(--inner); }
.muted { color: var(--muted); font-size: .8rem; }

.page-title, .listing-head h1, .product-info h1, article > h1 {
  font: 700 1.944rem/1.2 var(--serif); color: var(--text); text-align: center;
  margin: 0 0 .8em; padding-bottom: .5em;
}
.section-title {
  font: 700 .889rem/1.4 var(--serif); text-align: center; text-transform: none;
  border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin: 2.5rem 0 1.2rem;
}

.button {
  display: inline-block; padding: .417rem .833rem; background: var(--primary); color: #fff;
  border: 0; border-radius: 0; font: inherit; cursor: pointer; text-align: center;
}
.button:hover { background: #f5f5f5; color: var(--text); }
.button.primary { width: 100%; padding: 1rem 1.5rem; font-weight: 700; text-transform: uppercase; }

/* rich text from the legacy CMS */
.rte { line-height: 1.5; }
.rte h2 { font: 700 1.2rem/1.3 var(--sans); color: var(--text); margin: 1.6rem 0 .5rem; }
.rte h3 { font: 700 1.05rem/1.3 var(--sans); color: var(--text); margin: 1.3rem 0 .4rem; }
.rte > :first-child { margin-top: 0; }
.rte ul { list-style: disc; padding: .6rem .6rem .6rem 2rem; }
.rte ol { list-style: decimal; padding: .6rem .6rem .6rem 2rem; }
.rte p a, .rte ul a, .rte ol a { text-decoration: underline; font-weight: 700; }
.rte img { margin: 1rem auto; }
.rte table { border-collapse: collapse; width: 100%; }
.rte td, .rte th { border: 1px solid var(--border); padding: .4rem .6rem; }

/* ---------------------------------------------------------------- header */
.topbar { font-size: .667rem; color: var(--muted); text-align: center; padding: .444rem 0; }
.topbar span { white-space: nowrap; }
.site-header { background: #fff; }
.header-row { display: flex; align-items: center; gap: 5rem; padding: 1.389rem 15px; max-width: 1175px; }
.logo img { height: 50px; width: auto; }
.header-search { flex: 1; position: relative; }
.header-search input {
  width: 100%; padding: 10px 44px 10px 10px; border: 1px solid rgba(0, 0, 0, .8); font: inherit; background: #fff;
}
.header-search input:focus { outline: 2px solid var(--text); outline-offset: -1px; }
.header-search button { position: absolute; right: 0; top: 0; bottom: 0; width: 44px; border: 0; background: none; cursor: pointer; }
.menu-toggle { display: none; }

.main-nav { border-bottom: 1px solid var(--border-menu); position: sticky; top: 0; background: #fff; z-index: 20; }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; max-width: var(--container); margin: 0 auto; }
.main-nav > ul > li > a {
  display: block; padding: 0 .833rem; line-height: 2.778rem; font-size: .833rem; text-transform: uppercase;
}
.main-nav > ul > li > a.highlight { background: var(--gold); color: #fff; }
.main-nav > ul > li.has-sub > a::after {
  content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; vertical-align: .2em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.megamenu {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--border-menu);
  border-bottom: 1px solid var(--border-menu); padding: 1.5rem 0; opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: opacity .3s, transform .3s, visibility .3s;
}
.main-nav li:hover > .megamenu, .main-nav li:focus-within > .megamenu { opacity: 1; visibility: visible; transform: none; }
.megamenu > ul { max-width: var(--inner); margin: 0 auto; padding: 0 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem 2rem; }
.megamenu > ul.wide { max-width: var(--container); grid-template-columns: repeat(6, 1fr); }
.megamenu > ul.wide ul { max-height: 60vh; overflow: auto; }
.megamenu-col > a, .megamenu-title { font-weight: 700; text-transform: uppercase; font-size: .778rem; display: block; margin-bottom: .4rem; }
.megamenu-col ul a { font-size: .778rem; display: block; padding: .15rem 0 .15rem 10px; position: relative; }
.megamenu-col ul a::before { content: "›"; position: absolute; left: 0; transition: left .2s; }
.megamenu-col ul a:hover::before { left: 3px; }

@media (max-width: 991.98px) {
  .header-row { justify-content: space-between; padding: 1.111rem 15px; }
  .header-search { display: none; }
  body.search-open .header-search { display: block; position: absolute; left: 15px; right: 15px; top: 100%; z-index: 30; }
  .menu-toggle, .search-toggle {
    display: block; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: .3rem;
  }
  .main-nav { display: none; position: static; }
  body.nav-open .main-nav { display: block; }
  .main-nav > ul { display: block; }
  .main-nav > ul > li { border-top: 1px solid var(--border-menu); }
  .main-nav > ul > li > a { line-height: 2.6rem; }
  .megamenu { position: static; opacity: 1; visibility: visible; transform: none; display: none; padding: .3rem 0 .8rem; border: 0; background: #f2f2f2; }
  .main-nav li.open > .megamenu { display: block; }
  .megamenu > ul { grid-template-columns: 1fr; }
}
@media (min-width: 992px) { .search-toggle { display: none; } }

/* ----------------------------------------------------------- breadcrumbs */
.breadcrumbs { font-size: .778rem; padding: .556rem 15px; max-width: var(--inner); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "/"; opacity: .4; margin: 0 .3em; }

/* -------------------------------------------------------------- listings */
.full-band { background: var(--band); margin: 0 0 1.5rem; }
.full-band > .inner { max-width: var(--inner); margin: 0 auto; padding: 15px; }
.listing-head h1 { margin-bottom: .4em; padding-bottom: .2em; }
.listing-head .lead { text-align: justify; }
.subcats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1.5rem; }
.subcats a { display: block; padding: .35rem .8rem; border: 1px solid var(--divider); font-size: .889rem; }
.subcats a:hover { border-color: #000; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1400px) { .grid.wide { grid-template-columns: repeat(5, 1fr); } }

.card { padding: 10px; margin-bottom: 15px; text-align: center; display: flex; flex-direction: column; }
.card-img { position: relative; background: var(--img-bg); padding: 25px 0 35px; }
.card-img img { mix-blend-mode: multiply; margin: 0 auto; aspect-ratio: 1; object-fit: contain; }
.badge-sale {
  position: absolute; top: .5rem; left: 1rem; background: var(--gold); color: #fff; font-size: 16px;
  padding: .3125rem .4375rem; line-height: 1.1;
}
.card-title { font: 400 1rem/1.35 var(--sans); color: var(--text); height: 2.7em; overflow: hidden; margin: .6rem 0 .2rem; }
.card-brand { color: var(--muted); font-size: .8rem; margin-top: .5rem; }
.card-price { margin-top: auto; padding-top: .4rem; }
.card-price .price { font-size: 1rem; }
.price-before { font-size: .8rem; margin-left: .3rem; }
.card-shop { color: var(--muted); font-size: .75rem; }
.card .button { margin-top: .5rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: .3rem; margin: 1.5rem 0; font-size: .889rem; }
.pagination a, .pagination span { padding: .4rem .8rem; border: 1px solid var(--divider); }
.pagination a:hover, .pagination .current { border-color: #000; }

.description-band { background: var(--band-blue); margin-top: 20px; }
.description-band > .inner { max-width: var(--inner); margin: 0 auto; padding: 1.5rem 15px; }
@media (min-width: 992px) { .description-band .rte { columns: 2; column-gap: 2.5rem; } .description-band .rte h2 { break-after: avoid; } }

/* --------------------------------------------------------------- product */
.product { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: .5rem; max-width: 1175px; }
@media (min-width: 768px) { .product { grid-template-columns: 1fr 1fr; } }
.product-gallery .main { mix-blend-mode: multiply; width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-gallery { background: var(--img-bg); }
.thumbs { display: flex; gap: .5rem; padding: .5rem; background: #fff; flex-wrap: wrap; }
.thumbs img { width: 80px; height: 80px; object-fit: contain; background: var(--img-bg); }
.product-info h1 { margin-bottom: .3em; text-align: left; }
.product-brand { color: var(--text); font-size: .9rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.product-info .short { margin-bottom: 1.2rem; }
.best-price { font-size: 1.556rem; font-weight: 700; margin: 1rem 0; text-align: center; border-top: 1px solid var(--border); padding-top: 1rem; }
.best-price s { font-size: 1rem; font-weight: 400; margin-left: .4rem; }
.best-price .badge { background: var(--gold); color: #fff; font-size: .8rem; padding: .15rem .4rem; margin-left: .4rem; vertical-align: middle; }
.also-buy { margin-top: 15px; }
.also-buy h3 { font: 700 1rem var(--serif); text-align: center; margin-bottom: .4rem; }
.also-buy li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--text); padding: 10px 0; }
.offer-note { color: var(--muted); font-size: .75rem; margin-top: .6rem; text-align: center; }
.no-offers { background: var(--secondary-bg); padding: 1rem; text-align: center; }
.product-details { display: grid; gap: 2rem; margin-top: 2rem; max-width: 1175px; }
@media (min-width: 768px) { .product-details { grid-template-columns: 2fr 1fr; } }
.product-details .details-title { font: 700 .889rem var(--serif); text-align: center; border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin: 0 0 1rem; }
.data-sheet { display: flex; flex-wrap: wrap; margin: 0; }
.data-sheet dt, .data-sheet dd { flex: 0 0 50%; margin: 0; padding: .5rem; border-bottom: 1px solid var(--divider); }
.data-sheet dt { font-weight: 700; }

/* ------------------------------------------------------------------ home */
.home-showcase { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 768px) { .home-showcase { grid-template-columns: 1fr 1fr; } }
.showcase { position: relative; display: block; }
.showcase-label {
  position: absolute; bottom: 1.75rem; left: 1.25rem; padding: .75rem; font-size: 1.125rem; border-radius: .25rem;
  background: rgba(241, 245, 249, .8); color: #374151; border: 2px solid #374151;
}
.showcase-label.light { top: 1.25rem; right: 1.25rem; bottom: auto; left: auto; background: rgba(148, 163, 184, .3); color: #fefce8; border-color: #fefce8; }
.section-bar { background: var(--section-bar); font: 400 1.25rem var(--serif); text-align: center; padding: 1rem; margin: 2rem 0 1rem; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(6, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(8, 1fr); } }
.tile { text-align: center; font-size: .889rem; }
.tile img { aspect-ratio: 1; object-fit: cover; margin-bottom: .3rem; background: var(--img-bg); }
.seo-box { background: var(--seo-box); padding: 1.25rem 2.5rem; margin-top: 2rem; }
.seo-box h1 { text-align: center; font-size: 1.5rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .seo-box .rte { columns: 2; column-gap: 2rem; } }
@media (min-width: 1024px) { .seo-box .rte { columns: 3; } }
.seo-box .rte p { text-align: justify; }
.button-alt { background: var(--primary-alt); color: var(--primary-alt-text); border-radius: .25rem; font-weight: 600; padding: .5rem 1rem; }
.button-alt:hover { background: #0e4a5c; color: #fff; }

/* ------------------------------------------------------------------ blog */
.posts { display: grid; gap: 1.5rem; }
@media (min-width: 576px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post-card { border: 1px solid rgba(0, 0, 0, .125); box-shadow: 2px 2px 8px rgba(0, 0, 0, .2); background: #fff; display: flex; flex-direction: column; }
.post-card img { aspect-ratio: 2 / 1; object-fit: cover; width: 100%; }
.post-card .body { padding: 1.563rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.05rem; }
.post-card .button { align-self: flex-start; margin-top: auto; }
.post-card .meta { font-size: .8rem; color: var(--muted); border-top: 1px solid rgba(0, 0, 0, .125); padding: .6rem 1.25rem; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.5rem; }
.pills a { background: #ccc; border-radius: 4px; padding: 10px; font-weight: 600; text-transform: uppercase; font-size: .8rem; }
.post-meta { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.5rem; }
.post-cover { margin: 0 auto 1.5rem; }

/* ---------------------------------------------------------------- brands */
.letters { display: flex; flex-wrap: wrap; justify-content: center; border-bottom: 1px solid var(--divider); padding-bottom: .6rem; margin-bottom: 1rem; }
.letters a + a::before { content: "/"; opacity: .4; margin: 0 .35em; }
.letter-block { border-bottom: 1px solid var(--divider); padding: 1rem 0; }
.letter-block h2 { font-size: 2rem; font-weight: 700; margin: 0 0 .5rem; }
.letter-block ul { columns: 2; }
@media (min-width: 576px) { .letter-block ul { columns: 4; } }
.letter-block li { padding: .15rem 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); color: var(--muted); font-size: 15px; margin-top: 3rem; padding: 40px 0 22px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer h3 { color: var(--text); font-size: .889rem; font-weight: 700; text-transform: uppercase; margin: 0 0 .8rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr auto; } }
.footer-grid li { padding: .15rem 0; }
.social { display: flex; gap: .8rem; }
.social a:hover.fb { color: #3b5998; }
.social a:hover.ig { color: #517fa3; }
.social a:hover.pi { color: #cb2027; }
.to-top {
  position: fixed; left: 1rem; bottom: 1rem; width: 2.5rem; height: 2.5rem; background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 1.4rem; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--text); color: #fff; }

/* ------------------------------------------------------------ utilities */
.center { text-align: center; }
.icon { width: 1em; height: 1em; vertical-align: -.125em; fill: currentColor; }

/* --------------------------------------------------------------- filters */
.listing { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .listing:has(.facets-col) { grid-template-columns: minmax(180px, 16%) 1fr; } }
.listing-main { min-width: 0; }
.listing-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; font-size: .889rem; }
.listing-bar select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--divider); background: #fff; margin-left: .3rem; }
.facets > summary { font-weight: 700; padding: .6rem 0; cursor: pointer; list-style: none; }
.facets > summary::-webkit-details-marker { display: none; }
@media (min-width: 768px) { .facets > summary { pointer-events: none; } }
@media (max-width: 767px) {
  .facets > summary { border: 1px solid var(--divider); text-align: center; padding: .6rem; }
  .facets[open] > summary { margin-bottom: .5rem; }
}
.facet { border-bottom: 1px solid var(--divider); }
.facet > summary { font-weight: 700; padding: .6rem 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after { content: "›"; transform: rotate(90deg); transition: transform .2s; }
.facet[open] > summary::after { transform: rotate(-90deg); }
.facet ul { padding-bottom: .6rem; max-height: 16rem; overflow: auto; }
.facet li { font-size: .9375rem; padding: .1rem 0; }
.facet label { cursor: pointer; display: flex; gap: .4rem; align-items: baseline; }
.facet input[type=checkbox] { accent-color: var(--primary); }
.price-range { display: flex; gap: .5rem; padding-bottom: .6rem; }
.price-range input { width: 100%; font: inherit; padding: .3rem; border: 1px solid var(--divider); }
.facets-submit { width: 100%; margin-top: .8rem; }
.js .facet:not(:last-of-type) ~ .facets-submit { display: block; }
.reset { font-size: .85rem; text-decoration: underline; }
.facet-count { color: var(--gold); }
.empty { padding: 2rem 0; }

/* Long category intros: clamp on phones so products show above the fold. */
@media (max-width: 767px) {
  .js .listing-head .lead.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .read-more { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; margin-top: .3rem; }
}
@media (min-width: 768px) { .read-more { display: none; } }

.preview-bar { background: #fff3cd; border-bottom: 1px solid #e0c46c; padding: .6rem 15px; text-align: center; font-size: .9rem; }
.preview-bar a { text-decoration: underline; }

/* Product cards inside guides */
.inline-product { max-width: 320px; margin: 1rem auto 1.5rem; border: 1px solid var(--border); }
.rte .inline-product .card-title { font-weight: 400; text-decoration: none; }
.rte table { margin: 1rem 0; font-size: .9rem; }

.post-card-img { display: block; }
.post-card .post-card-img.contain img { object-fit: contain; background: var(--img-bg); padding: .75rem; }
.post-card .post-card-placeholder { display: grid; place-items: center; aspect-ratio: 2 / 1; background: var(--img-bg); }
.post-card .post-card-placeholder img { width: 28%; height: auto; aspect-ratio: auto; object-fit: contain; opacity: .3; padding: 0; background: none; }

/* Product lists from legacy Elementor blog posts */
.inline-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.inline-products .inline-product { max-width: none; margin: 0; }
.rte figure { margin: 1.2rem 0; }
.rte figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .3rem; }
.video-link { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--border); text-decoration: none !important; }

/* Responsive visibility carried over from legacy Elementor content */
@media (max-width: 767px) { .rte .only-desktop { display: none; } }
@media (min-width: 768px) { .rte .only-mobile { display: none; } }
@media (min-width: 768px) { .rte .side-banner { float: right; width: 120px; margin: 0 0 1rem 1.5rem; } }
.rte::after { content: ""; display: block; clear: both; }
