/*
 * Shop, category and brand pages, and every product list inside the shop area (related, recently viewed).
 * Idea: the page is a consultation sentence; products stand on a wooden shelf.
 */

/* ---- Header band ---- */
.tml-woo{padding-top:18px}
.tml .woocommerce-breadcrumb{font-size:13px;color:var(--tml-soft);margin:0 0 12px}
/* Full-bleed band: stretches edge to edge, content stays aligned with the page container. */
.tml-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 32px;align-items:center;background:var(--tml-mint);border-radius:0;margin:0 calc(50% - 50vw) 24px;padding:clamp(14px,1.8vw,22px) calc(50vw - 50%)}
.tml-hero-art{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}
.tml-mandala{position:absolute;right:-80px;top:50%;width:300px;height:300px;margin-top:-150px;color:var(--tml-leaf);opacity:.13;animation:tml-spin 140s linear infinite}
@keyframes tml-spin{to{transform:rotate(360deg)}}
.tml-hero-main{position:relative;min-width:0}
.tml .tml-eyebrow{font:700 11px/1 var(--tml-sans);letter-spacing:.16em;text-transform:uppercase;color:var(--tml-leaf-2);margin:0 0 8px;display:flex;align-items:center;gap:10px}
.tml .tml-eyebrow::before{content:"";width:28px;height:2px;background:var(--tml-kumkum)}
.tml-hero h1{font-size:clamp(26px,3vw,38px);line-height:1.05;color:var(--tml-leaf);margin:0}
.tml-hero h1 i{font:400 .5em/1 var(--tml-serif);font-style:normal;color:var(--tml-kumkum);margin-left:.3em}
.tml-hero-note{margin-top:6px;color:var(--tml-soft);max-width:70ch;font-size:14.5px}
.tml-hero-note p{margin:0}
.tml-hero-count{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:80px}
.tml-hero-count b{font:400 clamp(40px,4.4vw,58px)/.85 var(--tml-serif);color:var(--tml-leaf);letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.tml-hero-count span{font:700 11px/1.3 var(--tml-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--tml-leaf-2);margin-top:6px}

/* ---- Layout: filters left, results right ---- */
.tml-shop-layout{display:grid;grid-template-columns:232px minmax(0,1fr);gap:24px;align-items:start}
.tml-results-col{min-width:0}
.tml-filters{background:var(--tml-card);border:1px solid var(--tml-rule);border-radius:var(--tml-r-lg);padding:4px 20px 18px}
/* Desktop: the filter panel follows you down the product list, below the sticky header (and admin bar). Tall panels scroll inside. */
@media (min-width:1041px){.tml-shop-layout>.tml-filters{position:sticky;top:calc(var(--wp-admin--admin-bar--height,0px) + 130px);max-height:calc(100vh - var(--wp-admin--admin-bar--height,0px) - 146px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--tml-rule-strong) transparent}}
.tml .tml-filters-close{display:none}
.tml-fs{border-bottom:1px solid var(--tml-rule)}
.tml-fs>summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;padding:14px 0 8px;font:700 12px/1 var(--tml-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--tml-leaf)}
.tml-fs>summary::-webkit-details-marker{display:none}
.tml-fs>summary::after{content:"";margin-left:auto;width:18px;height:18px;background:var(--tml-soft);mask:url('../images/chevron-down.svg') center/contain no-repeat;transition:transform .25s var(--tml-ease)}
.tml-fs[open]>summary::after{transform:rotate(180deg)}
.tml-fs>summary b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--tml-r-pill);background:var(--tml-kumkum);color:var(--tml-white);font:700 11px/1 var(--tml-sans);letter-spacing:0}
.tml-fs-body{padding:0 0 12px;display:grid;gap:2px}
.tml-check,.tml-switch{display:flex;align-items:center;gap:10px;min-height:32px;cursor:pointer;font-weight:500;position:relative}
.tml-check input,.tml-switch input{position:absolute;opacity:0;width:1px;height:1px}
.tml-box{flex:none;width:20px;height:20px;border:1.5px solid var(--tml-rule-strong);border-radius:6px;display:grid;place-items:center;transition:background-color .2s,border-color .2s}
.tml-check input:checked+.tml-box{background:var(--tml-leaf);border-color:var(--tml-leaf)}
.tml-check input:checked+.tml-box::after{content:"";width:14px;height:14px;background:var(--tml-paper);mask:url('../images/check.svg') center/contain no-repeat}
.tml-check input:focus-visible+.tml-box,.tml-switch input:focus-visible~.tml-knob{outline:2px solid var(--tml-leaf);outline-offset:2px}
.tml-check:hover .tml-box{border-color:var(--tml-leaf)}
.tml-lab{flex:1;min-width:0}
.tml-lab i{font:400 14px/1 var(--tml-serif);font-style:normal;color:var(--tml-soft);margin-left:4px}
.tml-check em{font-style:normal;font-size:13px;color:var(--tml-soft)}
.tml-switch{justify-content:space-between}
.tml-knob{flex:none;width:42px;height:24px;border-radius:var(--tml-r-pill);background:var(--tml-rule);position:relative;transition:background-color .25s}
.tml-knob::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:var(--tml-card);box-shadow:var(--tml-shadow-chip);transition:transform .25s var(--tml-ease)}
.tml-switch input:checked~.tml-knob{background:var(--tml-leaf)}
.tml-switch input:checked~.tml-knob::after{transform:translateX(18px);background:var(--tml-haldi)}
/* Price timeline: one rail with milestones, two handles. */
.tml-timeline{padding:2px 6px 0}
.tml-tl-read{display:flex;align-items:baseline;justify-content:center;gap:8px;margin:0 0 14px;font:700 17px/1 var(--tml-serif);color:var(--tml-leaf);font-variant-numeric:tabular-nums}
.tml-tl-read span{color:var(--tml-soft);font-weight:400}
.tml-tl-rail{position:relative;height:24px;margin:0 -2px}
.tml-tl-rail::before{content:"";position:absolute;left:0;right:0;top:10px;height:4px;border-radius:4px;background:var(--tml-rule)}
.tml-tl-fill{position:absolute;top:10px;height:4px;border-radius:4px;background:var(--tml-leaf);left:calc(var(--lo)*1%);right:calc((100 - var(--hi))*1%)}
.tml-tl-rail input[type=range]{position:absolute;inset:0;width:100%!important;min-height:0!important;height:24px;margin:0;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;pointer-events:none;appearance:none;-webkit-appearance:none}
.tml-tl-rail input[type=range]::-webkit-slider-runnable-track{background:none;height:24px;border:0}
.tml-tl-rail input[type=range]::-moz-range-track{background:none;height:24px;border:0}
.tml-tl-rail input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;width:22px;height:22px;margin-top:1px;border-radius:50%;background:var(--tml-leaf);border:4px solid var(--tml-haldi);box-shadow:var(--tml-shadow-chip);cursor:grab;transition:transform .15s var(--tml-ease)}
.tml-tl-rail input[type=range]::-moz-range-thumb{pointer-events:auto;box-sizing:border-box;width:22px;height:22px;border-radius:50%;background:var(--tml-leaf);border:4px solid var(--tml-haldi);box-shadow:var(--tml-shadow-chip);cursor:grab}
.tml-tl-rail input[type=range]:hover::-webkit-slider-thumb,.tml-tl-rail input[type=range]:active::-webkit-slider-thumb{transform:scale(1.15)}
.tml-tl-rail input[type=range]:focus-visible::-webkit-slider-thumb{outline:2px solid var(--tml-leaf);outline-offset:3px}
.tml-tl-rail input[type=range]:focus-visible::-moz-range-thumb{outline:2px solid var(--tml-leaf);outline-offset:3px}
.tml-tl-marks{position:relative;height:30px;margin:2px 0 0;padding:0;list-style:none}
.tml-tl-marks li{position:absolute;left:calc(var(--at)*1%);top:0;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;font:600 11px/1 var(--tml-sans);color:var(--tml-soft);white-space:nowrap}
.tml-tl-marks li:first-child{transform:translateX(-6px);align-items:flex-start}
.tml-tl-marks li:last-child{transform:translateX(calc(-100% + 6px));align-items:flex-end}
.tml-tl-marks i{width:2px;height:7px;border-radius:2px;background:var(--tml-rule-strong)}
.tml-tl-marks li:first-child i{margin-left:5px}
.tml-tl-marks li:last-child i{margin-right:5px}
.tml .tml-filter-form>.tml-btn{width:100%;margin-top:18px}
.tml-filter-form>.tml-clear{display:block;text-align:center;margin-top:12px}
.tml-clear{font-weight:700;font-size:14px;color:var(--tml-kumkum);text-decoration:underline;text-underline-offset:4px}

/* ---- Toolbar and chips ---- */
.tml-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;flex-wrap:wrap}
.tml .woocommerce-result-count{float:none;margin:0;color:var(--tml-soft);font-size:14px;order:2;margin-right:auto}
.tml-sort{order:3;position:relative}
.tml-dd{position:relative}
.tml-dd>summary{list-style:none;display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 14px 0 16px;border:1.5px solid var(--tml-rule-strong);border-radius:var(--tml-r-pill);background:var(--tml-card);cursor:pointer;user-select:none;transition:border-color .2s,box-shadow .2s}
.tml-dd>summary::-webkit-details-marker{display:none}
.tml-dd>summary:hover{border-color:var(--tml-leaf)}
.tml-dd[open]>summary{border-color:var(--tml-leaf);box-shadow:0 0 0 4px color-mix(in srgb,var(--tml-leaf) 12%,transparent)}
.tml-dd>summary:focus-visible{outline:2px solid var(--tml-leaf);outline-offset:3px}
.tml-dd>summary>.tml-i{width:18px;height:18px;color:var(--tml-leaf-2)}
.tml-dd-kick{font-size:13px;color:var(--tml-soft)}
.tml-dd>summary b{font-weight:700;font-size:15px}
.tml-dd .tml-dd-caret{width:18px;height:18px;color:var(--tml-soft);transition:transform .25s var(--tml-ease)}
.tml-dd[open] .tml-dd-caret{transform:rotate(180deg)}
.tml-dd-list{position:absolute;right:0;top:calc(100% + 10px);z-index:45;min-width:250px;margin:0;padding:8px;list-style:none;background:var(--tml-card);border:1px solid var(--tml-rule);border-radius:var(--tml-r-lg);box-shadow:var(--tml-shadow-drawer),var(--tml-shadow);animation:tml-dd .2s var(--tml-ease)}
@keyframes tml-dd{from{opacity:0;transform:translateY(-6px) scale(.98)}}
.tml-dd-list a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;border-radius:var(--tml-r-sm);font-weight:500;transition:background-color .15s}
.tml-dd-list a:hover,.tml-dd-list a:focus-visible{background:var(--tml-mint)}
.tml-dd-list a.is-on{background:var(--tml-mint);font-weight:700;color:var(--tml-leaf)}
.tml-dd-list a .tml-i{width:18px;height:18px;flex:none}
.tml .tml-filter-toggle{display:none;order:1}
.tml .tml-filter-toggle b{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:var(--tml-r-pill);background:var(--tml-kumkum);color:var(--tml-white);font-size:11px}
.tml-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;align-items:center}
.tml-chips a:not(.tml-clear){display:inline-flex;gap:8px;align-items:center;padding:6px 8px 6px 14px;border:1.5px solid var(--tml-leaf);border-radius:var(--tml-r-pill);background:color-mix(in srgb,var(--tml-leaf) 6%,transparent);font-size:14px;font-weight:600;transition:background-color .2s,color .2s}
.tml-chips a:not(.tml-clear) span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--tml-leaf);color:var(--tml-paper)}
.tml-chips a:not(.tml-clear) span .tml-i{width:12px;height:12px}
.tml-chips a:not(.tml-clear):hover{background:var(--tml-leaf);color:var(--tml-paper)}
.tml-chips a:not(.tml-clear):hover span{background:var(--tml-paper);color:var(--tml-leaf)}

/* ---- Product grids in the shop area ---- */
.tml-woo ul.products,.tml-woo .tml-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px;margin-bottom:48px}
.tml-shop-layout ul.products{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important}
.tml-live{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--tml-online);animation:tml-ping 2s infinite}
@keyframes tml-ping{70%,100%{box-shadow:0 0 0 8px transparent}}

/* Cards enter one after another */
.tml-shopx ul.products>li{animation:tml-rise .6s var(--tml-ease) both}
.tml-shopx ul.products>li:nth-child(2){animation-delay:.05s}.tml-shopx ul.products>li:nth-child(3){animation-delay:.1s}.tml-shopx ul.products>li:nth-child(4){animation-delay:.15s}.tml-shopx ul.products>li:nth-child(n+5){animation-delay:.2s}
@keyframes tml-rise{from{opacity:0;transform:translateY(22px)}}
.tml-shopx.is-busy .tml-results-col{opacity:.4;transition:opacity .2s;pointer-events:none}
.tml-shopx.is-busy .tml-hero-count b{opacity:.4}

/* ---- Empty ---- */
.tml-bare{text-align:center;padding:56px 16px 72px;max-width:560px;margin:0 auto}
.tml-bare h2{font-size:clamp(26px,3vw,36px);color:var(--tml-leaf)}
.tml-bare p{color:var(--tml-soft);margin-bottom:22px}

/* ---- Pagination ---- */
.tml nav.woocommerce-pagination{margin:8px 0 56px}
.tml nav.woocommerce-pagination ul{border:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:0;padding:0}
.tml nav.woocommerce-pagination ul li{border:0;float:none;list-style:none}
.tml nav.woocommerce-pagination ul li .page-numbers{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0 6px;border-radius:var(--tml-r-pill);border:1.5px solid var(--tml-rule);background:var(--tml-card);font-weight:600}
.tml nav.woocommerce-pagination ul li .page-numbers.current,.tml nav.woocommerce-pagination ul li a.page-numbers:hover{background:var(--tml-leaf);color:var(--tml-paper);border-color:var(--tml-leaf)}

/* ---- Smaller screens ---- */
@media (max-width:1040px){
	.tml-woo ul.products,.tml-woo .tml-grid,.tml-shop-layout ul.products{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))!important}
	.tml-shop-layout{grid-template-columns:minmax(0,1fr)}
	.tml .tml-filter-toggle{display:inline-flex}
	.tml-filters{position:fixed;top:0;left:0;bottom:0;width:min(340px,90%);max-height:none;overflow-y:auto;overscroll-behavior:contain;z-index:70;border-radius:0 var(--tml-r-lg) var(--tml-r-lg) 0;transform:translateX(-100%);visibility:hidden;transition:transform .4s var(--tml-ease),visibility .4s;background:var(--tml-paper);padding-top:14px}
	.tml-filters.is-on{transform:none;visibility:visible}
	.tml .tml-filters-close{display:block;margin:0 0 0 auto}
}
@media (max-width:820px){
	.tml-hero{grid-template-columns:minmax(0,1fr) auto}
	.tml-hero-count{flex-direction:row;gap:6px;align-items:baseline}
	.tml-hero-count b{font-size:34px}
	.tml-hero-count span{margin:0}
	.tml-mandala{right:-200px;opacity:.1}
}
@media (max-width:720px){
	.tml-woo ul.products,.tml-woo .tml-grid,.tml-shop-layout ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px}
	.tml .woocommerce-result-count{display:none}
	.tml-toolbar{flex-wrap:nowrap}
	.tml-sort{margin-left:auto}
	.tml-dd-kick{display:none}
}
@media (prefers-reduced-motion:reduce){
	.tml-mandala,.tml-live{animation:none}
	.tml-shopx ul.products>li{animation:none}
}

/* Icons inside pagination and links */
.tml .page-numbers .tml-i{width:18px;height:18px}
.tml .tml-all{display:flex;align-items:center;gap:8px}
.tml .tml-all .tml-i{width:16px;height:16px}
