/*
Theme Name: Tiny Lions
Theme URI: https://tiny-lions.com/
Author: Tiny Lions
Description: A warm, natural catalog theme for rugs, throws and yarn goods. Mega-menu navigation, hero slider, category grid and a filterable product catalog.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tiny-lions
Tags: catalog, e-commerce, custom-menu, featured-images, full-width-template, block-styles, wide-blocks
*/

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --tl-cream:      #FAF6F0;
  --tl-cream-2:    #F3ECE1;
  --tl-sand:       #E8DCCA;
  --tl-clay:       #C05F3C;
  --tl-clay-dark:  #A34A2A;
  --tl-clay-soft:  #F0DDD4;
  --tl-moss:       #6B7355;
  --tl-charcoal:   #2B2724;
  --tl-ink:        #1C1917;
  --tl-grey:       #6E655C;
  --tl-grey-light: #9A9088;
  --tl-line:       #E0D6C8;
  --tl-white:      #FFFFFF;

  --tl-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --tl-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tl-max:      1280px;
  --tl-max-wide: 1520px;
  --tl-gutter:   24px;

  --tl-radius:    4px;
  --tl-radius-lg: 10px;

  --tl-shadow-sm: 0 1px 2px rgba(43, 39, 36, .06), 0 2px 8px rgba(43, 39, 36, .05);
  --tl-shadow-md: 0 4px 12px rgba(43, 39, 36, .08), 0 12px 32px rgba(43, 39, 36, .07);
  --tl-shadow-lg: 0 8px 24px rgba(43, 39, 36, .10), 0 24px 60px rgba(43, 39, 36, .10);

  --tl-header-h: 84px;
  --tl-ease: cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--tl-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--tl-charcoal);
  background: var(--tl-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--tl-clay); text-decoration: none; transition: color .2s var(--tl-ease); }
a:hover { color: var(--tl-clay-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tl-font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--tl-ink);
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--tl-clay);
  outline-offset: 3px;
  border-radius: 2px;
}

.tl-skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--tl-charcoal); color: #fff;
  padding: 12px 20px; z-index: 999; border-radius: 0 0 var(--tl-radius) 0;
}
.tl-skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   3. Layout helpers
   ============================================================ */
.tl-container { width: 100%; max-width: var(--tl-max); margin: 0 auto; padding: 0 var(--tl-gutter); }
.tl-container--wide { max-width: var(--tl-max-wide); }
.tl-container--narrow { max-width: 780px; }

.tl-section { padding: clamp(56px, 8vw, 104px) 0; }
.tl-section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.tl-section--cream { background: var(--tl-cream); }
.tl-section--sand  { background: var(--tl-sand); }

.tl-section-head { max-width: 680px; margin: 0 0 clamp(32px, 4vw, 56px); }
.tl-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.tl-section-head p { color: var(--tl-grey); font-size: 1.0625rem; margin-bottom: 0; }

.tl-eyebrow {
  display: inline-block;
  font-family: var(--tl-font-body);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--tl-clay);
  margin-bottom: 14px;
}

/* ============================================================
   4. Buttons
   ============================================================ */
.tl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px;
  font-family: var(--tl-font-body);
  font-size: .9375rem; font-weight: 600; letter-spacing: .01em;
  border: 1.5px solid transparent; border-radius: var(--tl-radius);
  text-align: center; cursor: pointer;
  transition: background-color .2s var(--tl-ease), color .2s var(--tl-ease),
              border-color .2s var(--tl-ease), transform .12s var(--tl-ease);
}
.tl-btn:active { transform: translateY(1px); }

.tl-btn--primary { background: var(--tl-clay); color: #fff; border-color: var(--tl-clay); }
.tl-btn--primary:hover { background: var(--tl-clay-dark); border-color: var(--tl-clay-dark); color: #fff; }

.tl-btn--outline { background: transparent; color: var(--tl-charcoal); border-color: var(--tl-charcoal); }
.tl-btn--outline:hover { background: var(--tl-charcoal); color: #fff; }

.tl-btn--light { background: #fff; color: var(--tl-charcoal); border-color: #fff; }
.tl-btn--light:hover { background: var(--tl-cream); color: var(--tl-clay-dark); border-color: var(--tl-cream); }

.tl-btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.tl-btn--ghost-light:hover { background: #fff; color: var(--tl-charcoal); border-color: #fff; }

.tl-btn--sm { padding: 10px 20px; font-size: .875rem; }
.tl-btn--block { width: 100%; }

.tl-link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9375rem; color: var(--tl-clay);
}
.tl-link-arrow svg { transition: transform .2s var(--tl-ease); }
.tl-link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   5. Header / mega menu
   ============================================================ */
.tl-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--tl-line);
}

.tl-header__bar {
  display: flex; align-items: center; gap: 28px;
  height: var(--tl-header-h);
}

.tl-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tl-brand img { max-height: 52px; width: auto; }
.tl-brand__text {
  font-family: var(--tl-font-display);
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em;
  color: var(--tl-ink); line-height: 1.1;
}
.tl-brand__tag {
  display: block;
  font-family: var(--tl-font-body);
  font-size: .625rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tl-clay); margin-top: 2px;
}
.tl-brand:hover .tl-brand__text { color: var(--tl-clay); }

.tl-header__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.tl-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  background: #fff; color: var(--tl-charcoal);
  transition: border-color .2s var(--tl-ease), color .2s var(--tl-ease), background-color .2s var(--tl-ease);
}
.tl-icon-btn:hover { border-color: var(--tl-clay); color: var(--tl-clay); background: var(--tl-clay-soft); }

/* --- primary nav --- */
.tl-nav { display: flex; }
.tl-nav ul { list-style: none; margin: 0; padding: 0; }

.tl-nav > ul { display: flex; align-items: center; gap: 4px; }

.tl-nav > ul > li { position: relative; }

.tl-nav > ul > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; height: var(--tl-header-h);
  font-size: .9375rem; font-weight: 500;
  color: var(--tl-charcoal);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s var(--tl-ease), border-color .2s var(--tl-ease);
}
.tl-nav > ul > li > a::after {
  content: ""; width: 7px; height: 7px; flex-shrink: 0;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55; display: none;
}
.tl-nav > ul > li.menu-item-has-children > a::after { display: block; }

.tl-nav > ul > li:hover > a,
.tl-nav > ul > li:focus-within > a,
.tl-nav > ul > li.current-menu-item > a,
.tl-nav > ul > li.current-menu-ancestor > a {
  color: var(--tl-clay);
  border-bottom-color: var(--tl-clay);
}

/* --- dropdown / mega panel --- */
.tl-nav ul ul {
  position: absolute; top: 100%; left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--tl-line);
  border-top: 3px solid var(--tl-clay);
  border-radius: 0 0 var(--tl-radius-lg) var(--tl-radius-lg);
  box-shadow: var(--tl-shadow-md);
  padding: 12px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s var(--tl-ease), transform .18s var(--tl-ease), visibility .18s;
}
.tl-nav li:hover > ul,
.tl-nav li:focus-within > ul {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.tl-nav ul ul li { position: relative; }
.tl-nav ul ul a {
  display: block; padding: 9px 22px;
  font-size: .9375rem; font-weight: 400; color: var(--tl-charcoal);
  white-space: nowrap;
}
.tl-nav ul ul a:hover { background: var(--tl-cream); color: var(--tl-clay); }

.tl-nav ul ul ul { top: -12px; left: 100%; }

/* Mega panel variant: add class `tl-mega` to a top-level menu item in WP */
.tl-nav > ul > li.tl-mega { position: static; }
.tl-nav > ul > li.tl-mega > ul {
  left: 0; right: 0; width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 32px;
  padding: 36px calc((100vw - var(--tl-max)) / 2 + var(--tl-gutter));
  border-radius: 0;
}
.tl-nav > ul > li.tl-mega > ul > li > a {
  font-family: var(--tl-font-display);
  font-size: 1rem; font-weight: 600;
  padding: 0 0 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--tl-line);
  color: var(--tl-ink);
}
.tl-nav > ul > li.tl-mega > ul > li > a:hover { background: transparent; color: var(--tl-clay); }
.tl-nav > ul > li.tl-mega ul ul {
  position: static; opacity: 1; visibility: visible; transform: none;
  border: 0; box-shadow: none; padding: 0; min-width: 0; background: transparent;
}
.tl-nav > ul > li.tl-mega ul ul a { padding: 6px 0; color: var(--tl-grey); }
.tl-nav > ul > li.tl-mega ul ul a:hover { background: transparent; color: var(--tl-clay); }

/* submenu toggle button (mobile only) */
.tl-submenu-toggle { display: none; }

/* --- mobile toggle --- */
.tl-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  background: #fff; padding: 0;
  align-items: center; justify-content: center;
}
.tl-burger span {
  display: block; position: relative;
  width: 20px; height: 2px; background: var(--tl-charcoal);
  transition: background-color .2s var(--tl-ease);
}
.tl-burger span::before, .tl-burger span::after {
  content: ""; position: absolute; left: 0;
  width: 20px; height: 2px; background: var(--tl-charcoal);
  transition: transform .25s var(--tl-ease), top .25s var(--tl-ease);
}
.tl-burger span::before { top: -6px; }
.tl-burger span::after  { top: 6px; }
.tl-burger[aria-expanded="true"] span { background: transparent; }
.tl-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.tl-burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ============================================================
   6. Hero slider
   ============================================================ */
.tl-hero { position: relative; background: var(--tl-charcoal); overflow: hidden; }

.tl-hero__track { position: relative; height: clamp(460px, 62vh, 660px); }

.tl-hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--tl-ease), visibility .7s;
}
.tl-hero__slide.is-active { opacity: 1; visibility: visible; }

.tl-hero__media { position: absolute; inset: 0; }
.tl-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.tl-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28,25,23,.78) 0%, rgba(28,25,23,.55) 45%, rgba(28,25,23,.15) 100%);
}

.tl-hero__inner {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  max-width: 620px; color: #fff;
  padding: 40px 0;
}
.tl-hero__inner .tl-eyebrow { color: var(--tl-sand); }
.tl-hero__title {
  color: #fff; margin-bottom: .35em;
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  line-height: 1.05;
}
.tl-hero__title em { font-style: italic; color: var(--tl-sand); }
.tl-hero__text {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: rgba(255,255,255,.88);
  margin-bottom: 32px; max-width: 480px;
}
.tl-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.tl-hero__dots {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3;
  display: flex; gap: 10px;
}
.tl-hero__dots .tl-container { display: flex; gap: 10px; }
.tl-hero__dot {
  width: 40px; height: 3px; padding: 0;
  border: 0; border-radius: 2px;
  background: rgba(255,255,255,.35);
  transition: background-color .25s var(--tl-ease);
}
.tl-hero__dot.is-active { background: #fff; }

.tl-hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  backdrop-filter: blur(4px);
  transition: background-color .2s var(--tl-ease);
}
.tl-hero__arrow:hover { background: rgba(255,255,255,.3); }
.tl-hero__arrow--prev { left: 18px; }
.tl-hero__arrow--next { right: 18px; }

/* ============================================================
   7. Trust / feature strip
   ============================================================ */
.tl-strip { background: var(--tl-charcoal); color: #fff; }
.tl-strip__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: rgba(255,255,255,.12);
}
.tl-strip__item {
  background: var(--tl-charcoal);
  padding: 26px 24px;
  display: flex; align-items: flex-start; gap: 14px;
}
.tl-strip__item svg { flex-shrink: 0; color: var(--tl-sand); margin-top: 2px; }
.tl-strip__item strong { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 2px; }
.tl-strip__item span { font-size: .8125rem; color: rgba(255,255,255,.62); line-height: 1.45; }

/* ============================================================
   8. Category grid
   ============================================================ */
.tl-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.tl-cat-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--tl-line);
  border-radius: var(--tl-radius-lg);
  overflow: hidden;
  transition: transform .25s var(--tl-ease), box-shadow .25s var(--tl-ease), border-color .25s var(--tl-ease);
}
.tl-cat-card:hover { transform: translateY(-5px); box-shadow: var(--tl-shadow-md); border-color: var(--tl-sand); }

.tl-cat-card__media { aspect-ratio: 3 / 4; overflow: hidden; background: var(--tl-cream-2); }
.tl-cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tl-ease); }
.tl-cat-card:hover .tl-cat-card__media img { transform: scale(1.05); }

.tl-cat-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.tl-cat-card__body h3 { margin-bottom: 8px; }
.tl-cat-card__body p { font-size: .9375rem; color: var(--tl-grey); flex: 1; margin-bottom: 18px; }

/* ============================================================
   9. Featured / split blocks
   ============================================================ */
.tl-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.tl-split--reverse .tl-split__media { order: 2; }

.tl-split__media { border-radius: var(--tl-radius-lg); overflow: hidden; background: var(--tl-cream-2); }
.tl-split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.tl-split__body h2 { margin-bottom: .45em; }
.tl-split__body p { color: var(--tl-grey); font-size: 1.0625rem; }
.tl-split__body .tl-btn { margin-top: 20px; }

.tl-promo {
  background: var(--tl-clay); color: #fff;
  border-radius: var(--tl-radius-lg);
  padding: clamp(36px, 5vw, 64px);
}
.tl-promo h2 { color: #fff; }
.tl-promo p { color: rgba(255,255,255,.9); font-size: 1.0625rem; }
.tl-promo .tl-eyebrow { color: rgba(255,255,255,.75); }

/* ============================================================
   10. Product catalog
   ============================================================ */
.tl-catalog { display: grid; grid-template-columns: 268px 1fr; gap: 44px; align-items: start; }

/* --- filter sidebar --- */
.tl-filters {
  position: sticky; top: calc(var(--tl-header-h) + 20px);
  background: var(--tl-cream);
  border: 1px solid var(--tl-line);
  border-radius: var(--tl-radius-lg);
  padding: 24px;
}
.tl-filters__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--tl-line);
}
.tl-filters__head h2 { font-size: 1.125rem; margin: 0; }
.tl-filters__clear {
  font-size: .8125rem; font-weight: 600; color: var(--tl-clay);
  background: none; border: 0; padding: 0;
}

.tl-filter-group { border-bottom: 1px solid var(--tl-line); padding: 14px 0; }
.tl-filter-group:last-of-type { border-bottom: 0; }

.tl-filter-group__toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 4px 0;
  background: none; border: 0; text-align: left;
  font-family: var(--tl-font-body);
  font-size: .8125rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--tl-charcoal);
}
.tl-filter-group__toggle::after {
  content: ""; width: 8px; height: 8px; flex-shrink: 0;
  border-right: 1.5px solid var(--tl-grey); border-bottom: 1.5px solid var(--tl-grey);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .22s var(--tl-ease);
}
.tl-filter-group__toggle[aria-expanded="false"]::after { transform: rotate(-45deg) translate(-2px, 2px); }

.tl-filter-group__body { padding-top: 12px; }
.tl-filter-group__toggle[aria-expanded="false"] + .tl-filter-group__body { display: none; }

.tl-check {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; cursor: pointer;
  font-size: .9375rem; color: var(--tl-charcoal);
}
.tl-check input { width: 17px; height: 17px; accent-color: var(--tl-clay); cursor: pointer; flex-shrink: 0; }
.tl-check:hover { color: var(--tl-clay); }
.tl-check__count { margin-left: auto; font-size: .8125rem; color: var(--tl-grey-light); }

.tl-swatches { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.tl-swatch {
  width: 30px; height: 30px; padding: 0;
  border: 2px solid transparent; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tl-line);
  transition: border-color .2s var(--tl-ease), transform .15s var(--tl-ease);
}
.tl-swatch:hover { transform: scale(1.1); }
.tl-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px var(--tl-clay); }

/* --- results toolbar --- */
.tl-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 26px;
  border-bottom: 1px solid var(--tl-line);
}
.tl-toolbar__count { font-size: .9375rem; color: var(--tl-grey); }
.tl-toolbar__count strong { color: var(--tl-charcoal); }
.tl-toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tl-select {
  padding: 9px 34px 9px 14px;
  font-family: var(--tl-font-body); font-size: .875rem;
  color: var(--tl-charcoal); background-color: #fff;
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%236E655C' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  font-size: .8125rem; font-weight: 500;
  background: var(--tl-clay-soft); color: var(--tl-clay-dark);
  border: 0; border-radius: 100px;
}
.tl-chip::after { content: "\00d7"; font-size: 1rem; line-height: 1; opacity: .7; }
.tl-chip:hover::after { opacity: 1; }

.tl-filters-mobile-toggle { display: none; }

/* --- product grid --- */
.tl-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 30px 24px;
}

.tl-prod-card { display: flex; flex-direction: column; }
.tl-prod-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--tl-radius-lg);
  overflow: hidden;
  background: var(--tl-cream-2);
  margin-bottom: 14px;
}
.tl-prod-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tl-ease); }
.tl-prod-card:hover .tl-prod-card__media img { transform: scale(1.05); }

.tl-prod-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 11px;
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--tl-charcoal); color: #fff;
  border-radius: 100px;
}
.tl-prod-card__badge--new { background: var(--tl-moss); }
.tl-prod-card__badge--sale { background: var(--tl-clay); }

.tl-prod-card__fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.9); color: var(--tl-charcoal);
  border: 0; border-radius: 50%;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s var(--tl-ease), transform .2s var(--tl-ease), color .2s var(--tl-ease);
}
.tl-prod-card:hover .tl-prod-card__fav { opacity: 1; transform: translateY(0); }
.tl-prod-card__fav:hover { color: var(--tl-clay); }
.tl-prod-card__fav.is-on { opacity: 1; transform: none; color: var(--tl-clay); }

.tl-prod-card__cat {
  font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--tl-grey-light); margin-bottom: 5px;
}
.tl-prod-card__title { font-size: 1.0625rem; margin: 0 0 6px; }
.tl-prod-card__title a { color: var(--tl-ink); }
.tl-prod-card__title a:hover { color: var(--tl-clay); }
.tl-prod-card__meta { font-size: .875rem; color: var(--tl-grey); }
.tl-prod-card__price { font-weight: 600; color: var(--tl-charcoal); }

.tl-prod-card__colors { display: flex; gap: 5px; margin-top: 10px; }
.tl-prod-card__colors i {
  width: 15px; height: 15px; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tl-line);
}

.tl-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 72px 24px;
  background: var(--tl-cream); border-radius: var(--tl-radius-lg);
}
.tl-empty h3 { margin-bottom: 8px; }
.tl-empty p { color: var(--tl-grey); }

/* ============================================================
   11. Single product
   ============================================================ */
.tl-product { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.tl-product__gallery { position: sticky; top: calc(var(--tl-header-h) + 20px); }
.tl-product__main {
  border-radius: var(--tl-radius-lg); overflow: hidden;
  background: var(--tl-cream-2); margin-bottom: 14px;
}
.tl-product__main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.tl-product__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tl-product__thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: var(--tl-radius);
  overflow: hidden; background: var(--tl-cream-2); aspect-ratio: 1/1;
}
.tl-product__thumbs button.is-active { border-color: var(--tl-clay); }
.tl-product__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.tl-product__price { font-family: var(--tl-font-display); font-size: 1.75rem; color: var(--tl-clay); margin-bottom: 20px; }
.tl-product__specs { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .9375rem; }
.tl-product__specs th, .tl-product__specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--tl-line); }
.tl-product__specs th { width: 38%; font-weight: 600; color: var(--tl-grey); }

.tl-breadcrumb { font-size: .875rem; color: var(--tl-grey); margin-bottom: 16px; }
.tl-breadcrumb a { color: var(--tl-grey); }
.tl-breadcrumb a:hover { color: var(--tl-clay); }
.tl-breadcrumb span { margin: 0 8px; opacity: .5; }

/* ============================================================
   12. Page header / editorial
   ============================================================ */
.tl-page-head { background: var(--tl-cream); padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--tl-line); }
.tl-page-head h1 { margin-bottom: .3em; }
.tl-page-head p { color: var(--tl-grey); font-size: 1.0625rem; max-width: 640px; margin: 0; }

.tl-entry { max-width: 760px; }
.tl-entry img { border-radius: var(--tl-radius-lg); margin: 28px 0; }
.tl-entry blockquote {
  margin: 28px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--tl-clay);
  font-family: var(--tl-font-display); font-size: 1.25rem; font-style: italic;
  color: var(--tl-ink);
}
.tl-entry h2, .tl-entry h3 { margin-top: 1.6em; }

/* ============================================================
   13. Newsletter
   ============================================================ */
.tl-newsletter { background: var(--tl-sand); }
.tl-newsletter__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.tl-newsletter h2 { margin-bottom: .3em; }
.tl-newsletter p { color: var(--tl-grey); margin: 0; }
.tl-newsletter__form { display: flex; gap: 10px; flex-wrap: wrap; }
.tl-newsletter__form input[type="email"] {
  flex: 1; min-width: 220px;
  padding: 14px 18px;
  font-family: var(--tl-font-body); font-size: .9375rem;
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  background: #fff; color: var(--tl-charcoal);
}
.tl-newsletter__form input::placeholder { color: var(--tl-grey-light); }

/* ============================================================
   14. Footer
   ============================================================ */
.tl-footer { background: var(--tl-charcoal); color: rgba(255,255,255,.7); padding-top: clamp(48px, 6vw, 80px); }
.tl-footer a { color: rgba(255,255,255,.7); }
.tl-footer a:hover { color: #fff; }

.tl-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px;
  padding-bottom: 48px;
}
.tl-footer__brand .tl-brand__text { color: #fff; }
.tl-footer__brand p { font-size: .9375rem; margin-top: 16px; max-width: 300px; }

.tl-footer h4 {
  color: #fff; font-family: var(--tl-font-body);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 16px;
}
.tl-footer ul { list-style: none; margin: 0; padding: 0; }
.tl-footer li { margin-bottom: 9px; font-size: .9375rem; }

.tl-social { display: flex; gap: 10px; margin-top: 20px; }
.tl-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  transition: background-color .2s var(--tl-ease), border-color .2s var(--tl-ease);
}
.tl-social a:hover { background: var(--tl-clay); border-color: var(--tl-clay); color: #fff; }

.tl-footer__bar {
  border-top: 1px solid rgba(255,255,255,.13);
  padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center;
  font-size: .8125rem;
}
.tl-footer__bar nav { margin-left: auto; }
.tl-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.tl-footer__legal li { margin: 0; font-size: .8125rem; }

/* ============================================================
   15. Pagination & misc WP
   ============================================================ */
.tl-pagination { margin-top: 48px; display: flex; justify-content: center; }
.tl-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px; margin: 0 3px;
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  color: var(--tl-charcoal); font-size: .9375rem;
}
.tl-pagination .page-numbers:hover { border-color: var(--tl-clay); color: var(--tl-clay); }
.tl-pagination .page-numbers.current { background: var(--tl-clay); border-color: var(--tl-clay); color: #fff; }

.alignwide  { max-width: var(--tl-max-wide); margin-left: auto; margin-right: auto; }
.alignfull  { max-width: none; }
.alignleft  { float: left; margin: 0 28px 20px 0; }
.alignright { float: right; margin: 0 0 20px 28px; }
.aligncenter { margin-left: auto; margin-right: auto; }

.wp-caption-text, figcaption { font-size: .8125rem; color: var(--tl-grey); text-align: center; margin-top: 8px; }

.admin-bar .tl-header { top: 32px; }

/* ============================================================
   16. Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .tl-nav > ul > li > a { padding: 0 10px; font-size: .875rem; }
  .tl-catalog { grid-template-columns: 240px 1fr; gap: 32px; }
}

@media (max-width: 980px) {
  :root { --tl-header-h: 70px; }

  .tl-burger { display: flex; }

  .tl-nav {
    position: fixed; top: var(--tl-header-h); left: 0; right: 0; bottom: 0;
    background: #fff; overflow-y: auto;
    padding: 12px var(--tl-gutter) 40px;
    display: none;
    border-top: 1px solid var(--tl-line);
  }
  .tl-nav.is-open { display: block; }

  .tl-nav > ul { display: block; }
  .tl-nav > ul > li > a {
    height: auto; padding: 14px 0;
    border-bottom: 1px solid var(--tl-line);
    font-size: 1.0625rem; font-weight: 600;
    justify-content: space-between;
  }
  .tl-nav > ul > li.menu-item-has-children > a::after { transform: rotate(45deg); }

  .tl-nav ul ul,
  .tl-nav > ul > li.tl-mega > ul {
    position: static; display: none;
    opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; border-radius: 0;
    padding: 4px 0 12px 14px;
    grid-template-columns: 1fr; gap: 0;
    min-width: 0; width: auto;
  }
  .tl-nav li.is-open > ul { display: block; }
  .tl-nav > ul > li.tl-mega.is-open > ul { display: block; }
  .tl-nav ul ul a { padding: 9px 0; white-space: normal; }

  .tl-nav > ul > li.menu-item-has-children { position: relative; }
  .tl-submenu-toggle {
    display: block; position: absolute; top: 0; right: -8px;
    width: 48px; height: 52px; padding: 0;
    background: none; border: 0;
  }
  .tl-submenu-toggle::after {
    content: ""; position: absolute; top: 50%; right: 16px;
    width: 8px; height: 8px; margin-top: -6px;
    border-right: 1.6px solid var(--tl-grey); border-bottom: 1.6px solid var(--tl-grey);
    transform: rotate(45deg);
    transition: transform .2s var(--tl-ease);
  }
  .tl-nav li.is-open > .tl-submenu-toggle::after { transform: rotate(-135deg); margin-top: -2px; }
  .tl-nav > ul > li.menu-item-has-children > a::after { display: none; }

  .tl-header__actions .tl-btn { display: none; }

  .tl-split, .tl-newsletter__inner { grid-template-columns: 1fr; }
  .tl-split--reverse .tl-split__media { order: 0; }

  .tl-product { grid-template-columns: 1fr; }
  .tl-product__gallery { position: static; }

  .tl-catalog { grid-template-columns: 1fr; }
  .tl-filters {
    position: static;
    display: none;
  }
  .tl-filters.is-open { display: block; margin-bottom: 24px; }
  .tl-filters-mobile-toggle { display: inline-flex; }

  .tl-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --tl-gutter: 18px; }
  .tl-hero__track { height: 520px; }
  .tl-hero__arrow { display: none; }
  .tl-prod-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 22px 14px; }
  .tl-cat-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .tl-cat-card__body { padding: 16px; }
  .tl-footer__grid { grid-template-columns: 1fr; }
  .tl-footer__bar { flex-direction: column; align-items: flex-start; }
  .tl-footer__bar nav { margin-left: 0; }
  .tl-btn { padding: 12px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
