/* ==========================================================================
   TreasureBox Dungarvan: main stylesheet (mobile-first)
   1. Tokens   2. Base   3. Buttons   4. Header   5. Search   6. Hero
   7. Sections & grids   8. Cards   9. Page heads   10. Product page
   11. Footer   12. Motion   13. Breakpoints
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	--tb-primary: #0f5c5a;
	--tb-accent: #e8a317;
	--tb-primary-dark: #0a4341;
	--tb-primary-soft: #e3f0ee;
	--tb-accent-soft: #fdf1d4;
	--tb-coral: #e4573d;
	--tb-bg: #fffdf9;
	--tb-tint: #f6f1e7;
	--tb-surface: #ffffff;
	--tb-text: #1c2b2a;
	--tb-muted: #55655f;
	--tb-border: #e7e1d4;
	--tb-focus: #0b57d0;
	--tb-radius: 16px;
	--tb-radius-sm: 10px;
	--tb-shadow-sm: 0 1px 2px rgba(28, 43, 42, .06), 0 1px 3px rgba(28, 43, 42, .05);
	--tb-shadow: 0 6px 18px rgba(28, 43, 42, .08);
	--tb-shadow-lg: 0 16px 40px rgba(28, 43, 42, .14);
	--tb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tb-font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--tb-ease: cubic-bezier(.2, .7, .2, 1);
	--tb-gutter: 16px;
	--tb-header-h: 64px;
}

@supports (color: color-mix(in srgb, red 10%, white)) {
	:root {
		--tb-primary-dark: color-mix(in srgb, var(--tb-primary) 78%, black);
		--tb-primary-soft: color-mix(in srgb, var(--tb-primary) 11%, white);
		--tb-accent-soft: color-mix(in srgb, var(--tb-accent) 20%, white);
	}
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--tb-header-h) + 16px); }
body {
	margin: 0;
	font-family: var(--tb-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--tb-text);
	background: var(--tb-bg);
	overflow-x: hidden;
	text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--tb-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tb-primary-dark); }
h1, h2, h3, h4 { font-family: var(--tb-font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--tb-text); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--tb-focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--tb-accent); color: #1c1c1c; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; margin: 0; clip: auto; clip-path: none;
	background: #fff; color: var(--tb-text); padding: 12px 18px; border-radius: 8px; z-index: 1000; box-shadow: var(--tb-shadow-lg);
}

.tb-container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--tb-gutter); }
.tb-container--narrow { max-width: 820px; }
.tb-center { text-align: center; }
.tb-mt { margin-top: 2.5rem; }
.tb-main:focus { outline: none; }

/* 3. Buttons --------------------------------------------------------------- */
.tb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 46px; padding: .65em 1.4em; border-radius: 999px; border: 2px solid transparent;
	font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color .2s var(--tb-ease), color .2s var(--tb-ease), border-color .2s var(--tb-ease), transform .2s var(--tb-ease), box-shadow .2s var(--tb-ease);
}
.tb-btn:active { transform: translateY(1px) scale(.99); }
.tb-btn--primary { background: var(--tb-primary); color: #fff; box-shadow: 0 4px 12px rgba(15, 92, 90, .25); }
.tb-btn--primary:hover { background: var(--tb-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 92, 90, .3); }
.tb-btn--ghost { background: transparent; color: var(--tb-primary); border-color: var(--tb-primary); }
.tb-btn--ghost:hover { background: var(--tb-primary); color: #fff; transform: translateY(-2px); }
.tb-btn--lg { min-height: 52px; padding-inline: 1.8em; font-size: 1.02rem; }
.tb-btn .tb-icon { transition: transform .2s var(--tb-ease); }
.tb-btn:hover .tb-icon--arrow { transform: translateX(3px); }

.tb-link-arrow { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tb-link-arrow .tb-icon { transition: transform .2s var(--tb-ease); }
.tb-link-arrow:hover .tb-icon { transform: translateX(4px); }

.tb-iconbtn {
	display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
	background: transparent; color: var(--tb-text); transition: background-color .2s, color .2s;
}
.tb-iconbtn:hover { background: var(--tb-primary-soft); color: var(--tb-primary); }

/* 4. Header ---------------------------------------------------------------- */
.tb-announce { background: var(--tb-primary); color: #fff; font-size: .875rem; }
.tb-announce__inner { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 38px; padding-block: 6px; }
.tb-announce__text { margin: 0; text-align: center; line-height: 1.35; }
.tb-announce a { color: #fff; text-underline-offset: 3px; }
.tb-announce__nav { display: none; }

.tb-header { position: sticky; top: 0; z-index: 60; background: var(--tb-bg); border-bottom: 1px solid var(--tb-border); transition: box-shadow .25s; }
.tb-header.is-scrolled { box-shadow: 0 6px 20px rgba(28, 43, 42, .08); }
.admin-bar .tb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tb-header { top: 46px; } }
.tb-header__inner { display: flex; align-items: center; gap: 8px; min-height: var(--tb-header-h); }
.tb-burger { order: 0; display: inline-grid; place-items: center; width: 46px; height: 46px; margin-left: -8px; border: 0; background: transparent; border-radius: 50%; color: var(--tb-text); }
.tb-burger:hover { background: var(--tb-primary-soft); }
.tb-brand { order: 1; flex: 1; min-width: 0; }
.tb-header__actions { order: 3; display: flex; align-items: center; margin-right: -8px; }

.tb-brand__link, .tb-brand .custom-logo-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tb-text); }
.tb-brand .custom-logo { max-height: 44px; width: auto; }
.tb-brand__mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tb-primary); color: var(--tb-accent); flex: none; transition: transform .4s var(--tb-ease); }
.tb-brand__link:hover .tb-brand__mark { transform: rotate(-8deg) scale(1.06); }
.tb-brand__text { font-family: var(--tb-font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.01em; }

/* Drawer (mobile) */
.tb-overlay { position: fixed; inset: 0; background: rgba(15, 30, 29, .5); z-index: 69; opacity: 0; transition: opacity .3s; }
.tb-overlay.is-on { opacity: 1; }
.tb-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 360px); z-index: 70; background: var(--tb-surface);
	transform: translateX(-102%); visibility: hidden; transition: transform .35s var(--tb-ease), visibility 0s .35s;
	display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--tb-shadow-lg);
}
.tb-drawer.is-open { transform: none; visibility: visible; transition: transform .35s var(--tb-ease), visibility 0s; }
.tb-drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--tb-border); }
.tb-drawer__title { font-family: var(--tb-font-head); font-weight: 700; font-size: 1.15rem; }
.tb-drawer__close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; }
.tb-drawer__close:hover { background: var(--tb-primary-soft); }
.tb-drawer__search { padding: 16px 20px 28px; margin-top: auto; border-top: 1px solid var(--tb-border); }

.tb-nav { padding: 8px 12px; }
.tb-menu, .tb-menu ul { list-style: none; margin: 0; padding: 0; }
.tb-menu > li { position: relative; display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--tb-border); }
.tb-menu a { display: block; flex: 1; padding: 14px 8px; color: var(--tb-text); text-decoration: none; font-weight: 600; transition: color .2s; }
.tb-menu a:hover, .tb-menu .current-menu-item > a, .tb-menu .current-menu-ancestor > a { color: var(--tb-primary); }
.tb-sub-toggle { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--tb-muted); border-radius: 50%; }
.tb-sub-toggle .tb-icon { transition: transform .25s var(--tb-ease); }
.tb-sub-toggle[aria-expanded="true"] .tb-icon { transform: rotate(180deg); }
.tb-menu .sub-menu { flex-basis: 100%; display: none; padding: 0 0 8px 12px; }
.tb-menu .is-open > .sub-menu { display: block; animation: tb-fade .25s var(--tb-ease); }
.tb-menu .sub-menu a { font-weight: 500; padding: 10px 8px; color: var(--tb-muted); }
.tb-menu .sub-menu li { display: flex; flex-wrap: wrap; align-items: center; }

/* Category strip */
.tb-strip { border-top: 1px solid var(--tb-border); background: var(--tb-surface); }
.tb-strip__inner { display: flex; gap: 6px; overflow-x: auto; padding-block: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tb-strip__inner::-webkit-scrollbar { display: none; }
.tb-strip__link { flex: none; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--tb-text); text-decoration: none; background: var(--tb-tint); transition: background-color .2s, color .2s; }
.tb-strip__link:hover, .tb-strip__link.is-current { background: var(--tb-primary); color: #fff; }
.tb-strip__more { background: transparent; color: var(--tb-primary); }

/* 5. Search ---------------------------------------------------------------- */
.tb-searchpanel { border-top: 1px solid var(--tb-border); background: var(--tb-surface); padding-block: 14px; animation: tb-slide .25s var(--tb-ease); }
.tb-searchpanel[hidden] { display: none; }
.tb-search { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 720px; margin-inline: auto; background: var(--tb-surface); border: 2px solid var(--tb-border); border-radius: 999px; padding: 4px 4px 4px 16px; transition: border-color .2s, box-shadow .2s; }
.tb-search:focus-within { border-color: var(--tb-primary); box-shadow: 0 0 0 4px var(--tb-primary-soft); }
.tb-search__icon { color: var(--tb-muted); display: inline-flex; flex: none; }
.tb-search__input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 4px; outline: none; font-size: 1rem; -webkit-appearance: none; appearance: none; }
.tb-search__input::-webkit-search-cancel-button { display: none; }
.tb-search__submit { min-height: 42px; padding-inline: 1.2em; flex: none; }
.tb-search__spinner { position: absolute; right: 108px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid var(--tb-border); border-top-color: var(--tb-primary); border-radius: 50%; opacity: 0; pointer-events: none; }
.tb-search.is-loading .tb-search__spinner { opacity: 1; animation: tb-spin .7s linear infinite; }
.tb-live-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 80; background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); box-shadow: var(--tb-shadow-lg); padding: 8px; max-height: min(70vh, 480px); overflow-y: auto; text-align: left; animation: tb-slide .2s var(--tb-ease); }
.tb-live-results[hidden] { display: none; }
.tb-live-results ul { list-style: none; margin: 0; padding: 0; }
.tb-live-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--tb-radius-sm); color: var(--tb-text); text-decoration: none; transition: background-color .15s; }
.tb-live-item:hover, .tb-live-item:focus-visible, .tb-live-item.is-active { background: var(--tb-primary-soft); }
.tb-live-item__img { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--tb-tint); }
.tb-live-item__text { min-width: 0; }
.tb-live-item__title { display: block; font-weight: 600; line-height: 1.3; }
.tb-live-item__meta { display: block; font-size: .85rem; color: var(--tb-muted); }
.tb-live-message { padding: 14px 10px; color: var(--tb-muted); margin: 0; }
.tb-live-all { display: block; margin-top: 4px; padding: 12px; text-align: center; font-weight: 600; border-top: 1px solid var(--tb-border); text-decoration: none; }

/* 6. Hero ------------------------------------------------------------------ */
.tb-hero { position: relative; overflow: hidden; padding-block: 44px 52px; background: linear-gradient(180deg, var(--tb-primary-soft) 0%, var(--tb-bg) 100%); }
.tb-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.tb-hero__blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.tb-hero__blob--1 { width: 340px; height: 340px; right: -110px; top: -90px; background: radial-gradient(circle at 30% 30%, var(--tb-accent-soft), transparent 70%); }
.tb-hero__blob--2 { width: 300px; height: 300px; left: -120px; bottom: -120px; background: radial-gradient(circle at 60% 40%, rgba(15, 92, 90, .13), transparent 70%); }
.tb-hero__dots { position: absolute; right: 6%; bottom: 14%; width: 120px; height: 120px; background-image: radial-gradient(var(--tb-primary) 1.6px, transparent 1.7px); background-size: 16px 16px; opacity: .18; }
.tb-hero__inner { position: relative; display: grid; gap: 36px; align-items: center; }
.tb-eyebrow { display: inline-block; margin: 0 0 .8rem; padding: .3em .9em; border-radius: 999px; background: var(--tb-accent-soft); color: #7a5300; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tb-hero__title { font-size: clamp(2rem, 7.4vw, 3.6rem); letter-spacing: -.02em; margin-bottom: .4em; }
.tb-hero__text { font-size: clamp(1.02rem, 2.6vw, 1.2rem); color: var(--tb-muted); max-width: 34em; margin-bottom: 1.6rem; }
.tb-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tb-hero__actions .tb-btn { flex: 1 1 100%; }
.tb-hero__visual { display: none; }
.tb-hero__photo { border-radius: 28px; overflow: hidden; box-shadow: var(--tb-shadow-lg); aspect-ratio: 6 / 5; }
.tb-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.tb-hero__art { position: relative; height: 380px; }
.tb-hero__tile { position: absolute; display: grid; place-items: center; border-radius: 28px; box-shadow: var(--tb-shadow-lg); color: #fff; animation: tb-float 7s ease-in-out infinite; }
.tb-hero__tile--a { width: 220px; height: 240px; left: 50%; top: 6%; margin-left: -150px; background: linear-gradient(145deg, var(--tb-primary), var(--tb-primary-dark)); color: var(--tb-accent); transform: rotate(-5deg); }
.tb-hero__tile--b { width: 150px; height: 150px; right: 6%; top: 0; background: var(--tb-accent); color: var(--tb-primary-dark); transform: rotate(7deg); animation-delay: -2s; }
.tb-hero__tile--c { width: 170px; height: 170px; right: 12%; bottom: 0; background: var(--tb-surface); color: var(--tb-primary); border: 1px solid var(--tb-border); transform: rotate(-3deg); animation-delay: -4s; }

/* 7. Sections & grids ------------------------------------------------------ */
.tb-section { padding-block: 48px; }
.tb-section--tint { background: var(--tb-tint); }
.tb-section--tight { padding-block: 28px; }
.tb-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.tb-section__title { font-size: clamp(1.5rem, 4.6vw, 2.15rem); margin: 0; }
.tb-section__intro { margin: .35em 0 0; color: var(--tb-muted); }

.tb-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 8. Cards ----------------------------------------------------------------- */
.tb-card { position: relative; display: flex; flex-direction: column; background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--tb-shadow-sm); transition: transform .3s var(--tb-ease), box-shadow .3s var(--tb-ease), border-color .3s; }
.tb-card:hover, .tb-card:focus-within { transform: translateY(-5px); box-shadow: var(--tb-shadow-lg); border-color: transparent; }
.tb-card__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--tb-tint); }
.tb-card__media img, .tb-cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--tb-ease); }
.tb-card:hover .tb-card__media img, .tb-cat-card:hover .tb-cat-card__media img { transform: scale(1.06); }
.tb-card__body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 16px; flex: 1; }
.tb-card__kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tb-primary); }
.tb-card__title { margin: 0; font-family: var(--tb-font); font-size: .98rem; font-weight: 650; line-height: 1.3; letter-spacing: 0; }
.tb-card__title a { color: var(--tb-text); text-decoration: none; }
.tb-card__title a::after { content: ""; position: absolute; inset: 0; }
.tb-card__meta { margin: 0; font-size: .85rem; color: var(--tb-muted); }
.tb-card__price { margin: 6px 0 0; font-weight: 700; color: var(--tb-primary-dark); }
.tb-badge { position: absolute; top: 10px; left: 10px; padding: .25em .75em; border-radius: 999px; background: var(--tb-accent); color: #3b2800; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; box-shadow: var(--tb-shadow-sm); }

.tb-cat-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tb-primary-soft); }
.tb-cat-card__body { display: flex; flex-direction: column; padding: 12px 14px 14px; }
.tb-cat-card__name { font-family: var(--tb-font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.tb-cat-card__count { font-size: .85rem; color: var(--tb-muted); }
.tb-cat-card__go { position: absolute; right: 12px; bottom: 12px; display: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tb-primary); color: #fff; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s var(--tb-ease); }
.tb-cat-card:hover .tb-cat-card__go { opacity: 1; transform: none; }
.tb-cat-card[hidden] { display: none; }

.tb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--tb-primary); background:
	radial-gradient(circle at 20% 15%, var(--tb-accent-soft), transparent 55%),
	linear-gradient(135deg, var(--tb-primary-soft), var(--tb-tint)); }
.tb-ph .tb-icon { opacity: .75; }
.tb-ph__emoji { font-size: 2.6rem; line-height: 1; }
.tb-ph--large { min-height: 320px; aspect-ratio: 1 / 1; border-radius: var(--tb-radius); }

.tb-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 560px; margin: 8px auto; padding: 36px 24px; text-align: center; background: var(--tb-surface); border: 2px dashed var(--tb-border); border-radius: 24px; }
.tb-empty__icon { width: 84px; height: 84px; border-radius: 24px; margin-bottom: 10px; }
.tb-empty__title { font-size: 1.35rem; margin-bottom: .2em; }
.tb-empty p { color: var(--tb-muted); margin-bottom: 1rem; }

.tb-catcloud { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tb-catcloud__group { background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); padding: 16px 18px; transition: box-shadow .3s, transform .3s var(--tb-ease); }
.tb-catcloud__group:hover { box-shadow: var(--tb-shadow); transform: translateY(-3px); }
.tb-catcloud__parent { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--tb-font-head); font-weight: 700; font-size: 1.1rem; color: var(--tb-text); text-decoration: none; }
.tb-catcloud__parent:hover { color: var(--tb-primary); }
.tb-catcloud__count { flex: none; min-width: 2em; padding: .1em .6em; text-align: center; border-radius: 999px; background: var(--tb-primary-soft); color: var(--tb-primary-dark); font-family: var(--tb-font); font-size: .78rem; font-weight: 700; }
.tb-catcloud__children { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tb-catcloud__children a { display: inline-block; padding: .25em .85em; border-radius: 999px; background: var(--tb-tint); font-size: .88rem; color: var(--tb-text); text-decoration: none; transition: background-color .2s, color .2s; }
.tb-catcloud__children a:hover { background: var(--tb-primary); color: #fff; }

.tb-about { display: grid; gap: 22px; align-items: center; padding: 28px 22px; border-radius: 28px; background: linear-gradient(135deg, var(--tb-primary-soft), var(--tb-accent-soft)); border: 1px solid var(--tb-border); }
.tb-about__mark { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px; background: var(--tb-primary); color: var(--tb-accent); box-shadow: var(--tb-shadow); }
.tb-about p { color: var(--tb-text); max-width: 46em; }

.tb-info-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tb-info { padding: 22px; background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); transition: box-shadow .3s, transform .3s var(--tb-ease); }
.tb-info:hover { box-shadow: var(--tb-shadow); transform: translateY(-3px); }
.tb-info h3 { font-size: 1.15rem; margin-bottom: .3em; }
.tb-info p { margin-bottom: .4em; color: var(--tb-muted); }
.tb-info__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border-radius: 14px; background: var(--tb-primary-soft); color: var(--tb-primary); }

/* 9. Page heads, breadcrumbs, toolbar, pagination -------------------------- */
.tb-pagehead { position: relative; overflow: hidden; padding-block: 28px 26px; background: linear-gradient(180deg, var(--tb-primary-soft), var(--tb-bg)); border-bottom: 1px solid var(--tb-border); }
.tb-pagehead--slim { padding-block: 14px; background: var(--tb-bg); }
.tb-pagehead__title { font-size: clamp(1.8rem, 6vw, 2.9rem); margin-bottom: .25em; }
.tb-pagehead__icon { display: inline-block; margin-right: .2em; }
.tb-pagehead__intro { color: var(--tb-muted); max-width: 44em; font-size: 1.05rem; }
.tb-pagehead__intro p:last-child { margin-bottom: 0; }
.tb-pagehead__count { color: var(--tb-muted); font-weight: 600; margin-bottom: 1rem; }
.tb-pagehead__search { margin-top: 1rem; }
.tb-pagehead__search .tb-search { margin-inline: 0; }
.tb-center .tb-pagehead__search .tb-search { margin-inline: auto; }
.tb-pagehead--cat.has-image { color: #fff; border: 0; min-height: 260px; display: flex; align-items: flex-end; padding-block: 36px 30px; background: var(--tb-primary-dark); }
.tb-pagehead--cat.has-image .tb-pagehead__bg { position: absolute; inset: 0; }
.tb-pagehead--cat.has-image .tb-pagehead__bg img { width: 100%; height: 100%; object-fit: cover; }
.tb-pagehead--cat.has-image .tb-pagehead__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 29, .25), rgba(10, 30, 29, .82)); }
.tb-pagehead--cat.has-image .tb-pagehead__inner { position: relative; z-index: 1; width: 100%; }
.tb-pagehead--cat.has-image h1, .tb-pagehead--cat.has-image .tb-pagehead__intro, .tb-pagehead--cat.has-image .tb-pagehead__count, .tb-pagehead--cat.has-image .tb-breadcrumbs, .tb-pagehead--cat.has-image .tb-breadcrumbs a { color: #fff; }

.tb-breadcrumbs { margin-bottom: 14px; font-size: .88rem; }
.tb-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; list-style: none; margin: 0; padding: 0; }
.tb-breadcrumbs li { display: inline-flex; align-items: center; }
.tb-breadcrumbs li + li::before { content: "/"; margin-inline: .6em; opacity: .5; }
.tb-breadcrumbs a { color: var(--tb-muted); text-decoration: none; }
.tb-breadcrumbs a:hover { color: var(--tb-primary); text-decoration: underline; }
.tb-breadcrumbs [aria-current] { font-weight: 600; }

.tb-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 20px; padding: 14px 16px; background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); }
.tb-toolbar__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 0; }
.tb-toolbar label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tb-muted); }
.tb-toolbar select { width: 100%; min-height: 44px; padding: .5em 2.2em .5em .9em; border: 2px solid var(--tb-border); border-radius: 12px; background: var(--tb-bg); transition: border-color .2s; }
.tb-toolbar select:hover, .tb-toolbar select:focus { border-color: var(--tb-primary); }
.tb-results { position: relative; transition: opacity .2s; }
.tb-results.is-loading { opacity: .45; pointer-events: none; }

.tb-pagination { margin-top: 36px; }
.tb-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tb-pagination a, .tb-pagination span { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-width: 44px; min-height: 44px; padding: 0 .9em; border-radius: 999px; border: 1px solid var(--tb-border); background: var(--tb-surface); color: var(--tb-text); font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.tb-pagination a:hover { background: var(--tb-primary-soft); border-color: var(--tb-primary); }
.tb-pagination .current { background: var(--tb-primary); border-color: var(--tb-primary); color: #fff; }
.tb-pagination .dots { border-color: transparent; background: transparent; }

.tb-prose { font-size: 1.05rem; }
.tb-prose > * + * { margin-top: 1em; }
.tb-prose h2, .tb-prose h3 { margin-top: 1.6em; }
.tb-prose img { border-radius: var(--tb-radius-sm); }
.tb-prose__thumb { margin-bottom: 1.5rem; border-radius: var(--tb-radius); overflow: hidden; }
.tb-prose table { width: 100%; border-collapse: collapse; }
.tb-prose th, .tb-prose td { padding: .6em; border: 1px solid var(--tb-border); text-align: left; }
.alignwide, .alignfull { max-width: 100%; }

/* 10. Product page --------------------------------------------------------- */
.tb-product__layout { display: grid; gap: 28px; padding-block: 8px 40px; }
.tb-gallery__main { position: relative; border-radius: var(--tb-radius); overflow: hidden; background: var(--tb-tint); border: 1px solid var(--tb-border); aspect-ratio: 1 / 1; }
.tb-gallery__main img { width: 100%; height: 100%; object-fit: contain; background: #fff; transition: opacity .25s; }
.tb-gallery__main img.is-swapping { opacity: 0; }
.tb-gallery__thumbs { display: flex; gap: 8px; margin: 12px 0 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.tb-gallery__thumb { flex: none; width: 68px; height: 68px; padding: 0; border: 2px solid var(--tb-border); border-radius: 12px; overflow: hidden; background: #fff; transition: border-color .2s, transform .2s var(--tb-ease); }
.tb-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tb-gallery__thumb:hover { transform: translateY(-2px); }
.tb-gallery__thumb.is-active { border-color: var(--tb-primary); }

.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.tb-chips a { display: inline-block; padding: .25em .9em; border-radius: 999px; background: var(--tb-primary-soft); color: var(--tb-primary-dark); font-size: .85rem; font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s; }
.tb-chips a:hover { background: var(--tb-primary); color: #fff; }
.tb-product__title { font-size: clamp(1.7rem, 5.4vw, 2.6rem); margin-bottom: .3em; }
.tb-product__price { font-size: 1.6rem; font-weight: 800; color: var(--tb-primary-dark); margin-bottom: .6em; }
.tb-product__excerpt { color: var(--tb-muted); font-size: 1.05rem; }
.tb-specs { display: grid; gap: 8px; margin: 1.2rem 0; padding: 14px 16px; background: var(--tb-tint); border-radius: var(--tb-radius-sm); }
.tb-specs div { display: flex; gap: 12px; }
.tb-specs dt { flex: 0 0 90px; font-weight: 700; color: var(--tb-muted); }
.tb-specs dd { margin: 0; font-weight: 600; word-break: break-word; }
.tb-highlights { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 8px; }
.tb-highlights li { display: flex; gap: 10px; align-items: flex-start; }
.tb-highlights .tb-icon { flex: none; margin-top: 3px; padding: 2px; border-radius: 50%; background: var(--tb-primary); color: #fff; width: 20px; height: 20px; }
.tb-product__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.tb-product__actions .tb-btn { flex: 1 1 100%; }
.tb-product__actions .tb-btn--ghost .tb-icon { transform: rotate(180deg); }
.tb-product__note { font-size: .86rem; color: var(--tb-muted); padding: 10px 14px; border-left: 3px solid var(--tb-accent); background: var(--tb-accent-soft); border-radius: 0 10px 10px 0; }
.tb-product__desc { padding-block: 8px 48px; }
.tb-product__desc .tb-prose { max-width: 820px; }
.tb-product__desc > .tb-section__title { margin-bottom: 14px; }

/* 11. Footer --------------------------------------------------------------- */
.tb-footer { margin-top: 24px; background: #12312f; color: #d6e4e2; }
.tb-footer a { color: #d6e4e2; text-decoration: none; transition: color .2s; }
.tb-footer a:hover { color: var(--tb-accent); }
.tb-footer__grid { display: grid; gap: 32px; padding-block: 48px 36px; grid-template-columns: 1fr; }
.tb-footer__title { font-family: var(--tb-font); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.tb-footer .tb-brand__link, .tb-footer .tb-brand__text { color: #fff; }
.tb-footer .tb-brand__mark { background: var(--tb-accent); color: #12312f; }
.tb-footer__brand p { max-width: 30em; }
.tb-footer-menu, .tb-footer .menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tb-footer-menu .sub-menu { list-style: none; padding-left: 14px; margin-top: 8px; display: grid; gap: 6px; }
.tb-footer__all { color: var(--tb-accent) !important; font-weight: 600; }
.tb-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tb-contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.tb-contact-list .tb-icon { flex: none; margin-top: 3px; color: var(--tb-accent); }
.tb-social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 18px 0 0; padding: 0; }
.tb-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background-color .2s, transform .2s var(--tb-ease), color .2s; }
.tb-social a:hover { background: var(--tb-accent); color: #12312f; transform: translateY(-3px); }
.tb-footer__bar { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.tb-footer__bar-inner { display: flex; flex-direction: column; gap: 4px; padding-block: 18px; }
.tb-footer__bar p { margin: 0; }
.tb-footer__note { opacity: .75; }

/* 12. Motion --------------------------------------------------------------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .6s var(--tb-ease), translate .6s var(--tb-ease), transform .3s var(--tb-ease), box-shadow .3s var(--tb-ease), border-color .3s; }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }
@keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-slide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes tb-spin { to { transform: rotate(360deg); } }
@keyframes tb-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; translate: none; }
	.tb-card:hover, .tb-btn:hover, .tb-catcloud__group:hover, .tb-info:hover { transform: none; }
}

/* 13. Breakpoints (mobile-first) ------------------------------------------- */
@media (min-width: 480px) {
	:root { --tb-gutter: 20px; }
	.tb-hero__actions .tb-btn, .tb-product__actions .tb-btn { flex: 0 1 auto; }
	.tb-grid { gap: 16px; }
}

@media (min-width: 720px) {
	:root { --tb-gutter: 28px; --tb-header-h: 72px; }
	.tb-grid--products, .tb-grid--cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tb-section { padding-block: 64px; }
	.tb-section--tight { padding-block: 36px; }
	.tb-card__body { padding: 14px 16px 18px; }
	.tb-card__title { font-size: 1.02rem; }
	.tb-cat-card__go { display: grid; }
	.tb-cat-card__name { font-size: 1.15rem; }
	.tb-catcloud { grid-template-columns: repeat(2, 1fr); gap: 18px; }
	.tb-info-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
	.tb-about { grid-template-columns: auto 1fr; gap: 36px; padding: 44px; }
	.tb-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
	.tb-footer__bar-inner { flex-direction: row; justify-content: space-between; align-items: center; }
	.tb-toolbar__field { flex: 0 1 240px; }
	.tb-search__submit { min-height: 46px; padding-inline: 1.6em; }
	.tb-search__spinner { right: 124px; }
	.tb-product__layout { gap: 44px; }
}

@media (min-width: 992px) {
	.tb-burger, .tb-drawer__top, .tb-drawer__search, .tb-overlay { display: none !important; }
	.tb-announce__nav { display: block; }
	.tb-announce__inner { justify-content: space-between; }
	.tb-announce__text { text-align: left; }
	.tb-announce .tb-menu { display: flex; gap: 18px; }
	.tb-announce .tb-menu > li { border: 0; display: block; }
	.tb-announce .tb-menu a { padding: 0; font-weight: 500; font-size: .85rem; color: #fff; }

	.tb-brand { order: 0; flex: 0 0 auto; margin-right: 20px; }
	.tb-drawer { position: static; order: 1; flex: 1; width: auto; transform: none; visibility: visible; background: transparent; box-shadow: none; overflow: visible; flex-direction: row; justify-content: center; }
	.tb-nav { padding: 0; }
	.tb-menu--main, .tb-nav > .tb-menu { display: flex; align-items: center; gap: 2px; }
	.tb-nav > .tb-menu > li { border: 0; flex-wrap: nowrap; }
	.tb-nav > .tb-menu > li > a { flex: none; padding: 10px 14px; border-radius: 999px; font-size: .97rem; }
	.tb-nav > .tb-menu > li > a:hover, .tb-nav > .tb-menu > li:focus-within > a { background: var(--tb-primary-soft); }
	.tb-nav .tb-sub-toggle { width: 24px; height: 36px; margin-left: -10px; border-radius: 8px; }
	.tb-nav .sub-menu {
		display: block; position: absolute; left: 0; top: 100%; z-index: 90; min-width: 240px; padding: 8px; margin-top: 10px;
		background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); box-shadow: var(--tb-shadow-lg);
		opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .25s var(--tb-ease), visibility 0s .25s;
	}
	.tb-nav li:hover > .sub-menu, .tb-nav li:focus-within > .sub-menu, .tb-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
	.tb-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
	.tb-nav .sub-menu li { position: relative; }
	.tb-nav .sub-menu a { padding: 10px 12px; border-radius: 10px; color: var(--tb-text); font-weight: 500; }
	.tb-nav .sub-menu a:hover { background: var(--tb-primary-soft); color: var(--tb-primary); }
	.tb-nav .sub-menu .sub-menu { left: 100%; top: -8px; margin: 0 0 0 8px; }
	.tb-nav .sub-menu .tb-sub-toggle { margin-left: -36px; margin-right: 6px; transform: rotate(-90deg); }
	.tb-header__actions { order: 2; margin-right: 0; }

	.tb-hero { padding-block: 84px 92px; }
	.tb-hero__inner { grid-template-columns: 1.1fr .9fr; gap: 56px; }
	.tb-hero__visual { display: block; }

	.tb-grid--products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
	.tb-grid--cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
	.tb-catcloud { grid-template-columns: repeat(3, 1fr); }
	.tb-info-grid { grid-template-columns: repeat(3, 1fr); }
	.tb-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; }
	.tb-product__layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
	.tb-gallery { position: sticky; top: calc(var(--tb-header-h) + 24px); }
	.tb-product__desc { padding-top: 16px; }
}

@media (min-width: 1440px) {
	:root { --tb-gutter: 32px; }
	.tb-container { max-width: 1320px; }
	.tb-grid--cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.tb-section { padding-block: 80px; }
}

@media (max-width: 359px) {
	.tb-brand__text { font-size: 1rem; }
	.tb-brand__mark { width: 32px; height: 32px; }
	.tb-card__body { padding: 10px 10px 14px; }
	.tb-search__submit { padding-inline: .9em; }
	.tb-search__spinner { right: 88px; }
}

@media print {
	.tb-header, .tb-announce, .tb-footer, .tb-search, .tb-toolbar, .tb-pagination { display: none !important; }
}
