/*
Theme Name: Fiber Bet 2026
Description: S.E. TRADE shop theme: price-list catalogue, dosage calculator, quote form.
Version: 1.0
Requires PHP: 7.4
Text Domain: fiberbet
*/
:root {
	--paper: #efede8;
	--card: #faf9f6;
	--ink: #17191b;
	--graphite: #202326;
	--muted: #66635d;
	--line: #d3cfc7;
	--red: #d9291c;
	--red-dark: #b31f14;
	--ok: #2c6e49;
	--head: "Barlow Condensed", "Arial Narrow", sans-serif;
	--body: "Barlow", Arial, sans-serif;
	--mono: "IBM Plex Mono", Consolas, monospace;
	--wrap: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.02; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(44px, 6.4vw, 92px); text-transform: uppercase; }
h2 { font-size: clamp(34px, 4vw, 56px); text-transform: uppercase; }
h3 { font-size: 28px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.eyebrow { font: 500 13px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.eyebrow b { color: var(--red); font-weight: 500; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 10px 14px; z-index: 99; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 600 17px/1 var(--body); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.dark .btn.ghost { color: #fff; border-color: #fff; }
.dark .btn.ghost:hover { background: #fff; color: var(--ink); }

/* Top bar + header */
.topbar { background: var(--graphite); color: #d9d6cf; font: 400 14px/1.3 var(--body); }
.topbar .wrap { display: flex; gap: 26px; align-items: center; min-height: 40px; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .push { margin-left: auto; }
.header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .wrap { display: flex; align-items: center; gap: 30px; min-height: 78px; }
.logo img { width: 190px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font: 600 16px/1 var(--body); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.on { border-bottom-color: var(--red); }
.hcart { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); text-decoration: none; font: 600 15px/1 var(--body); }
.hcart:hover { background: var(--ink); color: #fff; }
.hcart .num { background: var(--red); color: #fff; padding: 3px 7px; font-size: 13px; }
.burger { display: none; width: 46px; height: 46px; border: 1px solid var(--ink); background: none; cursor: pointer; padding: 0; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }

/* Hero */
.hero { padding: 64px 0 72px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 20px; max-width: 34em; margin: 26px 0 32px; color: #33363a; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 34px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 15px; color: var(--muted); }
.hero .facts b { color: var(--ink); font-weight: 600; }

/* Ruler: fibre lengths drawn to scale */
.ruler { --mm: 1.5mm; background: var(--graphite); color: #e9e6df; padding: 30px 30px 26px; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 10mm 10mm; }
.ruler .cap { display: flex; justify-content: space-between; gap: 16px; font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a8a49c; margin-bottom: 22px; }
.ruler .fam { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); text-decoration: none; }
.ruler .fam:hover .name { color: #fff; }
.ruler .fam:hover .bar { background-color: #fff; }
.ruler .name { font: 600 21px/1.1 var(--head); text-transform: uppercase; letter-spacing: .02em; color: #e9e6df; }
.ruler .name small { display: block; font: 400 11px/1.3 var(--mono); letter-spacing: .04em; color: #a8a49c; margin-top: 5px; text-transform: none; }
.ruler .rows { display: grid; gap: 7px; align-content: center; }
.ruler .row { display: flex; align-items: center; gap: 10px; font: 400 12px/1 var(--mono); color: #bdb9b1; }
.ruler .bar { display: block; width: calc(var(--len) * var(--mm)); height: 4px; background-color: #d8d4cc; flex: none; transition: background-color .15s; }
.ruler .micro .bar { height: 2px; }
.ruler .xmesh .bar { height: 6px; background-image: repeating-linear-gradient(115deg, transparent 0 4px, rgba(32,35,38,.75) 4px 6px); }
.ruler .poliarm .bar { height: 6px; background-color: transparent !important; background-image: radial-gradient(circle at 4px -1px, transparent 3.5px, #d8d4cc 3.5px 5px, transparent 5px), radial-gradient(circle at 4px 7px, transparent 3.5px, #d8d4cc 3.5px 5px, transparent 5px); background-size: 16px 6px; background-position: 0 0, 8px 0; }
.ruler .steel .bar { height: 5px; background-color: var(--red); border-radius: 0; }
.ruler .fam.steel:hover .bar { background-color: #ff5a4a; }
.ruler .foot { font: 400 12px/1.4 var(--mono); color: #8e8a83; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }

/* Sections */
.section { padding: 84px 0; }
.section.tight { padding: 60px 0; }
.section.white { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--graphite); color: #ebe8e1; }
.section.dark .eyebrow { color: #a8a49c; }
.sec_head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.sec_head p { max-width: 30em; margin: 0; color: var(--muted); }
.dark .sec_head p { color: #b9b5ad; }

/* Family cards */
.fams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.fam_card { background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s, transform .15s; }
.fam_card:hover { border-color: var(--ink); transform: translateY(-3px); }
.fam_card .ph { aspect-ratio: 7 / 4; overflow: hidden; background: #ddd; }
.fam_card .ph img { width: 100%; height: 100%; object-fit: cover; }
.fam_card .in { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.fam_card .type { font: 500 12px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.fam_card h3 { text-transform: uppercase; margin-bottom: 12px; }
.fam_card p { font-size: 15.5px; color: #3b3e42; }
.spec { margin: auto 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.spec li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.spec span { color: var(--muted); }
.spec b { font: 500 14px/1.5 var(--mono); text-align: right; }
.fam_card .go { margin-top: 18px; font-weight: 600; display: flex; justify-content: space-between; border-top: 2px solid var(--ink); padding-top: 14px; }
.fam_card:hover .go { color: var(--red); }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--ink); background: var(--card); }
.calc form { padding: 34px; display: grid; gap: 22px; align-content: start; }
.calc label, .field label { display: block; font: 600 14px/1.3 var(--body); margin-bottom: 8px; }
.calc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=number], input[type=text], input[type=tel], input[type=email], select, textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid #9c988f; background: #fff; font: 500 17px/1.3 var(--body); color: var(--ink); border-radius: 0; }
textarea { min-height: 110px; resize: vertical; }
.unit { position: relative; }
.unit input { padding-right: 52px; font-family: var(--mono); }
.unit i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 400 14px/1 var(--mono); color: var(--muted); font-style: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; }
.chips label { margin: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #9c988f; background: #fff; cursor: pointer; font-weight: 600; }
.chips input:checked + label { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 3px; }
.chips label.off { color: #9a968e; text-decoration: line-through; }
input[type=range] { width: 100%; accent-color: var(--red); min-height: 30px; }
.calc .result { background: var(--graphite); color: #ebe8e1; padding: 34px; display: flex; flex-direction: column; }
.calc .result .big { font: 600 clamp(64px, 8vw, 104px)/.95 var(--head); color: #fff; margin: 6px 0 4px; }
.calc .result .big small { font-size: .38em; color: #b9b5ad; margin-left: 8px; }
.calc .result dl { margin: 22px 0; display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 15.5px; }
.calc .result dt, .calc .result dd { margin: 0; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.16); }
.calc .result dt { color: #b9b5ad; padding-right: 20px; }
.calc .result dd { font-family: var(--mono); text-align: right; }
.calc .result .btn { margin-top: auto; align-self: start; }
.note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.dark .note, .result .note { color: #a8a49c; }

/* Numbers band */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.stats > div { padding: 30px 30px 6px 0; border-right: 1px solid rgba(255,255,255,.18); margin-right: 30px; }
.stats > div:last-child { border: 0; margin: 0; }
.stats .v { font: 600 clamp(60px, 7vw, 96px)/1 var(--head); color: #fff; }
.stats .v sup { font-size: .4em; color: var(--red); vertical-align: top; margin-left: 4px; position: relative; top: .3em; }
.stats p { color: #c9c5bd; max-width: 22em; margin-top: 10px; }

/* Applications */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; margin: 0; padding: 0; list-style: none; counter-reset: a; }
.apps li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-weight: 500; }
.apps li::before { counter-increment: a; content: counter(a, decimal-leading-zero); font: 400 13px/1.9 var(--mono); color: var(--red); }

/* Wholesale */
.hurt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.hurt ul { padding: 0; margin: 24px 0 0; list-style: none; }
.hurt li { padding: 13px 0 13px 30px; border-top: 1px solid var(--line); position: relative; }
.hurt li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 14px; height: 3px; background: var(--red); }
.form { background: var(--card); border: 1px solid var(--line); padding: 32px; display: grid; gap: 16px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form h3 { text-transform: uppercase; }

/* Footer */
.footer { background: var(--ink); color: #c9c5bd; padding: 60px 0 28px; font-size: 15.5px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; }
.footer .brand { font: 600 30px/1 var(--head); color: #fff; letter-spacing: .04em; margin: 0 0 14px; }
.footer .brand i { color: var(--red); font-style: normal; }
.footer .ft { font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8e8a83; margin: 0 0 14px; }
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .legal { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: #8e8a83; }
.footer .legal .push { margin-left: auto; }

/* Shop: price list */
.page_head { padding: 44px 0 34px; border-bottom: 1px solid var(--line); }
.crumbs { font: 400 13px/1.3 var(--mono); color: var(--muted); margin: 0 0 16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.page_head h1 { font-size: clamp(40px, 5vw, 68px); }
.page_head p { max-width: 44em; margin: 16px 0 0; color: #33363a; }
.jump { position: sticky; top: 78px; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; }
.jump a { flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600; font-size: 15px; }
.jump a:hover { border-color: var(--ink); }
.group { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.group .top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.group .ph { border: 1px solid var(--line); background: #fff; }
.group .ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.group .ph.pack img { object-fit: contain; padding: 14px; }
.group .side h2 { font-size: 40px; margin-bottom: 4px; }
.group .side .type { font: 500 12px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.group .side p { font-size: 15.5px; color: #3b3e42; margin: 12px 0 0; }
.group .side .spec { margin-top: 16px; }
.plist { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
.plist th { text-align: left; font: 500 12px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--ink); }
.plist td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plist tr:last-child td { border-bottom: 0; }
.plist tbody tr:hover { background: #fff; }
.plist .nm a { font-weight: 600; text-decoration: none; }
.plist .nm a:hover { color: var(--red); }
.plist .nm small { display: block; font-size: 13.5px; color: var(--muted); }
.plist .pr { white-space: nowrap; font: 500 18px/1.2 var(--mono); }
.plist .pr del { display: block; font-size: 13px; color: #8e8a83; font-weight: 400; }
.plist .pr small { font-size: 12px; color: var(--muted); display: block; }
.plist .act { text-align: right; white-space: nowrap; }
.plist .act .row_buy { display: inline-flex; gap: 8px; align-items: center; }
.plist .qty { width: 70px; min-height: 42px; padding: 6px 8px; text-align: center; font-family: var(--mono); font-size: 15px; }
.tag { display: inline-block; white-space: nowrap; font: 500 11.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 5px 7px; border: 1px solid currentColor; }
.tag.ok { color: var(--ok); }
.tag.out { color: #8e8a83; }
.tag.hurt { color: var(--red); }
.sublabel { font: 600 22px/1.2 var(--head); text-transform: uppercase; margin: 30px 0 12px; }

/* Product */
.product { padding: 40px 0 70px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.gallery .main { background: #fff; border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; padding: 30px; }
.gallery .main img { max-height: 100%; width: auto; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery .thumbs img { aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); background: #fff; width: 100%; }
.gallery .thumbs img.on { border-color: var(--ink); }
.buy h1 { font-size: clamp(36px, 4vw, 54px); margin-bottom: 14px; }
.buy .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 20px 0 6px; }
.buy .price b, .buy .price del { white-space: nowrap; }
.buy .price b { font: 600 46px/1 var(--mono); letter-spacing: -.02em; }
.buy .price del { font: 400 18px/1 var(--mono); color: #8e8a83; }
.buy .opt { margin-top: 24px; }
.buy .opt > span { display: block; font: 600 14px/1.3 var(--body); margin-bottom: 8px; }
.buy .cta { display: flex; gap: 12px; margin-top: 28px; }
.buy .cta .qty { width: 92px; min-height: 56px; text-align: center; font: 500 18px/1 var(--mono); }
.buy .cta .btn { flex: 1; justify-content: center; min-height: 56px; font-size: 18px; }
.buy .cover { margin-top: 18px; padding: 16px 18px; border: 1px dashed #9c988f; font-size: 15.5px; }
.buy .cover b { font-family: var(--mono); font-weight: 500; }
.buy .spec { margin-top: 28px; font-size: 16px; }
.details { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 56px; }
.details h2 { font-size: 34px; margin-bottom: 20px; }
.details .apps { grid-template-columns: 1fr; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 1100px) {
	.fams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nav { gap: 18px; }
	.nav a { font-size: 15px; }
	.footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	body { font-size: 16px; }
	.wrap { padding: 0 20px; }
	.topbar .hide_m { display: none; }
	.burger { display: block; order: 3; }
	.hcart { margin-left: auto; }
	.header .wrap { gap: 12px; min-height: 66px; }
	.logo img { width: 150px; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--ink); flex-direction: column; gap: 0; padding: 6px 20px 16px; margin: 0; }
	.nav.open { display: flex; }
	.nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
	.hero { padding: 40px 0 48px; }
	.hero .wrap, .calc, .hurt, .product, .details, .group .top { grid-template-columns: minmax(0, 1fr); }
	.hero .wrap { gap: 36px; }
	.ruler { --mm: 1.35mm; padding: 22px 18px; }
	.section { padding: 56px 0; }
	.sec_head { flex-direction: column; align-items: start; gap: 14px; margin-bottom: 28px; }
	.stats, .apps { grid-template-columns: minmax(0, 1fr); }
	.stats > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); margin: 0; padding: 24px 0 10px; }
	.hurt, .details, .product { gap: 36px; }
	.jump { top: 66px; }
	.group { padding: 40px 0; scroll-margin-top: 120px; }
	.group .top { gap: 22px; }
	.group .ph { max-width: 340px; }
	/* price list rows become cards */
	.plist, .plist tbody, .plist tr, .plist td { display: block; }
	.plist thead { display: none; }
	.plist tr { padding: 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
	.plist tr:last-child { border-bottom: 0; }
	.plist td { padding: 0; border: 0; }
	.plist .nm { grid-column: 1 / -1; }
	.plist .act { grid-column: 1 / -1; text-align: left; }
	.plist .act .row_buy { display: flex; }
	.plist .act .btn { flex: 1; justify-content: center; }
	.plist .pr { text-align: right; }
	.plist .pr del { display: inline; margin-right: 8px; }
}
@media (max-width: 600px) {
	.fams, .footer .cols, .calc .two, .form .two { grid-template-columns: minmax(0, 1fr); }
	.calc form, .calc .result, .form { padding: 22px 18px; }
	.ruler { --mm: .7mm; }
	.ruler .fam { grid-template-columns: 78px 1fr; }
	.ruler .name { font-size: 18px; }
	.hero .actions .btn { flex: 1 1 100%; justify-content: center; }
	.buy .cta .btn { flex: 1; justify-content: center; }
	.btn { padding: 0 18px; }
	.hcart span.t { display: none; }
	.buy .price b { font-size: 38px; }
	.plist tr { grid-template-columns: minmax(0, 1fr) auto; }
	.plist .pr del { display: block; margin: 0; }
	.footer .legal .push { margin-left: 0; }
}
@media (max-width: 360px) {
	.ruler { --mm: .55mm; }
}
