/* Johnbros storefront — global styles (ported from the design reference) */
:root {
  --jb-bg: #f5eddf;
  --jb-ink: #2c1c11;
  --jb-card: #fbf7ef;
  --jb-border: #e6dac6;
  --jb-gold: #c19a5b;
  --jb-gold-lt: #e9d4a8;
  --jb-gold-soft: #e9c98d;
  --jb-brown: #a56a3c;
  --jb-brown-dk: #5a3620;
  --jb-red: #9e2b25;
  --jb-panel: #3a2416;
}
* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--jb-bg);
  color: var(--jb-ink);
  -webkit-font-smoothing: antialiased;
  font-family: 'Manrope', sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--jb-gold); color: var(--jb-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9b89a; border-radius: 8px; }
::-webkit-scrollbar-track { background: #efe6d6; }

input[type=range].jbrange {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 6px;
  background: linear-gradient(90deg, #5a3620, #a56a3c);
  outline: none;
}
input[type=range].jbrange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fbf7ef;
  border: 3px solid #5a3620;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(44, 28, 17, .3);
}
input[type=range].jbrange::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fbf7ef;
  border: 3px solid #5a3620;
  cursor: pointer;
}

@keyframes jbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jbUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jbMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes jbSpin { to { transform: rotate(360deg); } }
@keyframes jbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

/* Generic hover helper: replicate the design's style-hover via a data attribute.
   Elements with [data-hover] get the extra inline styles applied on hover through JS. */

/* Product image zoom on card/tile hover */
.jb-zoom { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.jb-zoom-wrap:hover .jb-zoom { transform: scale(var(--jb-zoom, 1.05)); }

/* Responsive grid helpers (mobile <760, tablet <1080, desktop >=1080) */
.jb-prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.jb-cat-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.jb-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.jb-review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.jb-insta-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.jb-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.jb-heritage-grid { display: grid; grid-template-columns: 1fr 1fr; }
.jb-pd-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.jb-gallery { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; align-items: start; }
.jb-thumbs { display: flex; flex-direction: column; gap: 10px; }
.jb-main { aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: #efe4d2; }
.jb-main img { width: 100%; height: 100%; object-fit: cover; }
.jb-cart-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px; align-items: start; }
.jb-measure-grid { display: grid; grid-template-columns: 1.35fr 1fr; }
.jb-step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.jb-val-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Account area grids (sidebar layout, dashboard stats, order/address panels, orders list rows) */
.jb-account-grid { display: grid; grid-template-columns: 230px 1fr; gap: 34px; align-items: start; }
.jb-stat-grid    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.jb-order-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.jb-orders-row   { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 12px; align-items: center; }
.jb-fit-help     { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.jb-customise-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }

/* Legal / policy document pages */
.jb-legal { color: #4a3a2c; font-size: 14.5px; line-height: 1.85; font-family: 'Manrope', sans-serif; }
.jb-legal h3 { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1.5px; color: #2c1c11; margin: 36px 0 12px; padding-top: 22px; border-top: 1px solid #e6dac6; }
.jb-legal h3:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.jb-legal p { margin: 0 0 15px; }
.jb-legal a { color: #a56a3c; border-bottom: 1px solid #cbbda0; }
.jb-legal strong { color: #2c1c11; }

/* Home "Shop by Category" — equal editorial cards with a fixed height so they
   stay compact on large screens (the old span-2 + aspect-ratio tile ballooned). */
.jb-home-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.jb-home-cat-grid > a { position: relative; display: block; height: 400px; overflow: hidden; border-radius: 3px; background: #2c1c11; transition: box-shadow .3s ease; }
.jb-home-cat-grid > a:hover { box-shadow: 0 20px 44px -20px rgba(44,28,17,.7); }
.jb-home-cat-grid .jb-cat-shop { transition: color .2s ease, letter-spacing .2s ease; }
.jb-home-cat-grid > a:hover .jb-cat-shop { color: #f7ecd8; letter-spacing: 3px; }
@media (max-width: 1079px) { .jb-home-cat-grid > a { height: 340px; } }
@media (max-width: 759px)  { .jb-home-cat-grid { grid-template-columns: 1fr; } .jb-home-cat-grid > a { height: 300px; } }

/* Home "Shop by Style" — horizontally-scrollable circular category browse row */
.jb-style-row { display: flex; gap: 26px; overflow-x: auto; max-width: 1240px; margin: 0 auto; padding: 8px 24px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.jb-style-row::-webkit-scrollbar { height: 6px; }
.jb-style-row::-webkit-scrollbar-thumb { background: #cdbb98; border-radius: 6px; }
.jb-style-row::-webkit-scrollbar-track { background: transparent; }
.jb-style-item { flex: 0 0 auto; width: 116px; text-align: center; text-decoration: none; scroll-snap-align: start; }
.jb-style-circle { --jb-zoom: 1.09; position: relative; width: 108px; height: 108px; border-radius: 50%; overflow: hidden; margin: 0 auto 13px; background: #e7dbc6; border: 1px solid #e0d0b4; box-shadow: 0 6px 16px -10px rgba(44,28,17,.5); transition: box-shadow .25s ease, transform .25s ease; }
.jb-style-item:hover .jb-style-circle { box-shadow: 0 14px 26px -10px rgba(44,28,17,.55); transform: translateY(-3px); }
.jb-style-label { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600; color: #2c1c11; }
@media (max-width: 759px) { .jb-style-item { width: 100px; } .jb-style-circle { width: 92px; height: 92px; } }

/* Buttons — professional, consistent CTA treatment (hover lift + soft shadow) */
.jb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  padding: 15px 32px; border-radius: 2px; border: 1px solid transparent; box-sizing: border-box;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.jb-btn:active { transform: translateY(0); }
.jb-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.jb-btn-gold { background: #e9d4a8; color: #2c1c11; box-shadow: 0 6px 18px -8px rgba(44,28,17,.45); }
.jb-btn-gold:hover { background: #f0dcae; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(44,28,17,.5); }
.jb-btn-dark { background: #2c1c11; color: #f5eddf; box-shadow: 0 6px 18px -8px rgba(44,28,17,.5); }
.jb-btn-dark:hover { background: #40281a; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(44,28,17,.6); }
.jb-btn-outline { background: transparent; color: #2c1c11; border-color: #b79c6f; }
.jb-btn-outline:hover { background: #2c1c11; color: #f5eddf; border-color: #2c1c11; transform: translateY(-2px); }
.jb-btn-ghost { background: transparent; color: #e9d4a8; border-color: rgba(193,154,91,.6); }
.jb-btn-ghost:hover { background: rgba(193,154,91,.14); border-color: #c19a5b; transform: translateY(-2px); }
.jb-btn-block { width: 100%; }

@media (max-width: 1079px) {
  .jb-prod-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 759px) {
  .jb-prod-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .jb-cat-grid, .jb-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .jb-review-grid, .jb-val-grid { grid-template-columns: 1fr; }
  .jb-insta-grid { grid-template-columns: repeat(3, 1fr); }
  .jb-foot-grid { grid-template-columns: 1fr 1fr; }
  .jb-heritage-grid, .jb-pd-grid, .jb-cart-grid, .jb-measure-grid, .jb-step-grid { grid-template-columns: 1fr; }
  .jb-pd-grid { gap: 28px; }
  .jb-gallery { grid-template-columns: 1fr; }
  .jb-thumbs { flex-direction: row; order: 2; }
  .jb-thumbs > div { width: 64px; height: 76px; }
  .jb-account-grid, .jb-stat-grid, .jb-order-grid, .jb-fit-help, .jb-customise-grid { grid-template-columns: 1fr; }
  .jb-orders-row { grid-template-columns: 1fr auto; gap: 10px 12px; }
}
/* Header nav collapses to the slide-out menu until there is room for the full
   nav + logo + icons on one row (below ~1024px they overlap the wordmark). */
@media (max-width: 1023px) {
  .jb-hide-mobile { display: none !important; }
}
@media (min-width: 1024px) {
  .jb-show-mobile { display: none !important; }
}
/* Compact header on phones — shrink the crest + wordmark and tighten the icon
   buttons so the account/wishlist/bag icons stop overlapping the logo on narrow
   screens. (Inline styles set the desktop sizes, so these overrides use !important.) */
@media (max-width: 560px) {
  .jb-headbar { padding-left: 14px !important; padding-right: 14px !important; height: 64px !important; gap: 8px !important; }
  .jb-burger { font-size: 21px !important; padding: 2px !important; }
  .jb-logo { gap: 6px !important; }
  .jb-logo-crest { height: 34px !important; }
  .jb-logo-name { font-size: 14px !important; letter-spacing: 1px !important; }
  .jb-logo-since { font-size: 6px !important; letter-spacing: 1.5px !important; margin-top: 2px !important; }
  .jb-headicons { gap: 2px !important; margin-left: 0 !important; }
  .jb-headicons > a, .jb-headicons > button { width: 34px !important; height: 34px !important; font-size: 16px !important; }
}
