/* ---------- Category hero ---------- */
.cat-hero { background: linear-gradient(160deg, #F5F7FF 0%, #FFFFFF 55%, #F3F6FF 100%); padding: 36px 0 48px; }
.cat-hero__inner { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; }
.cat-breadcrumbs { font-size: 13px; color: var(--color-muted); margin-bottom: 16px; }
.cat-breadcrumbs a:hover { color: var(--color-primary); }
.cat-breadcrumbs__sep { margin: 0 8px; color: #C7CBD4; }
.cat-hero h1 { font-size: 42px; margin: 4px 0 14px; }
.cat-hero__desc { color: var(--color-muted); font-size: 15.5px; max-width: 520px; margin: 0 0 26px; }
.cat-hero__meta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cat-hero__count { font-weight: 700; color: var(--color-dark); font-size: 14.5px; }
.cat-hero__visual { display: flex; align-items: center; justify-content: center; }
.cat-hero__visual img { max-height: 320px; object-fit: contain; }
.cat-hero__visual-fallback { width: 200px; height: 200px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 60px; }

/* ---------- Subcategory slider ---------- */
.cat-subcats { padding: 34px 24px; }
.cat-subslider { position: relative; display: flex; align-items: center; gap: 12px; }
.cat-subslider__viewport { overflow: hidden; flex: 1; }
.cat-subslider__track { display: flex; gap: 18px; transition: transform var(--speed-med) var(--ease); }
.cat-subslider__arrow { flex-shrink: 0; background: #fff; }
.subcat-card { flex: 0 0 calc((100% - 90px) / 6); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform var(--speed-med) var(--ease), box-shadow var(--speed-med) var(--ease); }
.subcat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.subcat-card__image { display: block; aspect-ratio: 1/0.85; overflow: hidden; background: var(--color-bg-soft); }
.subcat-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--speed-med) var(--ease); }
.subcat-card:hover .subcat-card__image img { transform: scale(1.04); }
.subcat-card__body { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.subcat-card__body strong { font-size: 14px; }
.subcat-card__body span { font-size: 12px; color: var(--color-muted); }
.subcat-card__link { color: var(--color-primary) !important; font-weight: 700; margin-top: 4px; transition: transform var(--speed-fast) var(--ease); display: inline-block; }
.subcat-card:hover .subcat-card__link { transform: translateX(4px); }

/* ---------- Main content ---------- */
.cat-main { padding: 10px 24px 60px; }
.cat-main__head h2 { font-size: 26px; margin: 30px 0 4px; }
.cat-mobile-bar { display: none; }
.cat-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--color-border); margin-bottom: 18px; }
.cat-toolbar__count { font-size: 14px; color: var(--color-muted); font-weight: 600; }
.cat-toolbar__sort { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.cat-toolbar__sort select { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; font-family: var(--font-body); font-size: 13.5px; background: #fff; }

/* ---------- Active filter chips ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg-soft); border: 1px solid var(--color-border); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cat-chip .lntm-icon { width: 11px; height: 11px; }
.cat-chip:hover { background: #EAEDF3; }
.cat-chip--clear { background: transparent; border: none; color: var(--color-sale); text-decoration: underline; }

/* ---------- Layout: sidebar + grid ---------- */
.cat-layout { display: grid; grid-template-columns: 264px 1fr; gap: 32px; align-items: start; }
.cat-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; }
.cat-filter-group { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.cat-filter-group__head { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: none; font-size: 14.5px; font-weight: 700; cursor: pointer; padding: 0; color: var(--color-dark); }
.cat-filter-group__head span { font-size: 16px; color: var(--color-muted); }
.cat-filter-group__body { margin-top: 14px; overflow: hidden; }
.cat-filter-search { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.cat-checklist { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.cat-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.cat-check input { accent-color: var(--color-primary); width: 15px; height: 15px; flex-shrink: 0; }
.cat-check em { font-style: normal; color: var(--color-muted); font-size: 12px; margin-left: auto; }

/* ---------- Price slider ---------- */
.cat-price-slider { position: relative; height: 32px; }
.cat-price-slider__track { position: absolute; top: 14px; left: 0; right: 0; height: 4px; background: var(--color-bg-soft); border-radius: 999px; }
.cat-price-slider__range { position: absolute; top: 0; height: 4px; background: var(--color-primary); border-radius: 999px; }
.cat-price-slider input[type="range"] {
	position: absolute; top: 0; left: 0; width: 100%; height: 32px; margin: 0; background: none; pointer-events: none;
	-webkit-appearance: none; appearance: none;
}
.cat-price-slider input[type="range"]::-webkit-slider-thumb {
	pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
	background: #fff; border: 3px solid var(--color-primary); cursor: pointer; margin-top: 7px; box-shadow: var(--shadow-sm);
}
.cat-price-slider input[type="range"]::-moz-range-thumb {
	pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--color-primary); cursor: pointer;
}
.cat-price-values { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--color-dark); margin-top: 8px; }

/* ---------- Grid wrap / skeleton / empty ---------- */
.cat-grid-wrap { position: relative; min-height: 200px; }
.cat-grid-loading[hidden] { display: none; }
.cat-grid-loading { position: absolute; inset: 0; z-index: 2; }
.skeleton-card { border-radius: var(--radius); background: linear-gradient(90deg, var(--color-bg-soft) 25%, #EDEFF3 37%, var(--color-bg-soft) 63%); background-size: 400% 100%; animation: lntm-skeleton 1.4s ease infinite; aspect-ratio: 3/4; }
@keyframes lntm-skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.cat-empty { text-align: center; padding: 70px 20px; }
.cat-empty__icon { display: inline-flex; width: 60px; height: 60px; border-radius: 50%; background: var(--color-bg-soft); align-items: center; justify-content: center; color: var(--color-primary); font-size: 26px; margin-bottom: 18px; }
.cat-empty h3 { font-size: 22px; margin-bottom: 8px; }
.cat-empty p { color: var(--color-muted); margin-bottom: 24px; }
.cat-empty__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Non-product search results (pages/posts) ---------- */
.search-result-card { display: block; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; transition: box-shadow var(--speed-fast), transform var(--speed-fast); }
.search-result-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.search-result-card__img { display: block; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-soft); margin-bottom: 14px; }
.search-result-card__img img { width: 100%; height: 100%; object-fit: cover; }
.search-result-card__type { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--color-primary); margin-bottom: 6px; }
.search-result-card strong { display: block; font-size: 15px; margin-bottom: 6px; color: var(--color-dark); }
.search-result-card p { font-size: 13px; color: var(--color-muted); margin: 0; line-height: 1.5; }

/* ---------- Pagination ---------- */
.cat-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.cat-page-btn { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--color-border); background: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background var(--speed-fast), color var(--speed-fast); }
.cat-page-btn:hover:not(:disabled) { background: var(--color-bg-soft); }
.cat-page-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.cat-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.cat-page-btn--ellipsis { border: none; background: none; cursor: default; }

/* Search page / My Account Orders pagination re-uses .cat-page-btn as a
   wrapper around WordPress's/WooCommerce's own <a> links — needs padding:0
   on the OUTER box so the inner <a> fills it edge-to-edge. Scoped to
   .cat-pagination--links only, so it never affects the category/shop
   page's own plain <button> pagination (which needs its normal padding). */
.cat-pagination--links .cat-page-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cat-pagination--links .cat-page-btn a, .cat-pagination--links .cat-page-btn > span.current {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0 10px; color: inherit; text-decoration: none;
}
.cat-pagination--links .cat-page-btn.is-active { color: #fff; }

/* ---------- SEO content ---------- */
.cat-seo { padding: 40px 24px; border-top: 1px solid var(--color-border); margin-top: 40px !important; }
.cat-seo__content { position: relative; max-height: 1000px; overflow: hidden; transition: max-height var(--speed-med) var(--ease); }
.cat-seo__content.is-collapsed { max-height: 160px; }
.cat-seo__content.is-collapsed::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(0deg, #fff, transparent); }
.cat-seo__text { color: var(--color-muted); font-size: 14.5px; line-height: 1.7; }
.cat-seo__toggle { margin-top: 14px; background: none; border: none; color: var(--color-primary); font-weight: 700; cursor: pointer; font-size: 14px; }

/* ---------- Mobile bottom sheets ---------- */
.cat-mobile-sheet-overlay { position: fixed; inset: 0; background: rgba(11,13,16,.5); z-index: 420; opacity: 0; visibility: hidden; transition: opacity var(--speed-med), visibility var(--speed-med); }
.cat-mobile-sheet-overlay.is-open { opacity: 1; visibility: visible; }
.cat-mobile-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; max-height: 82vh; background: #fff; z-index: 430;
	border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform var(--speed-med) var(--ease);
	display: flex; flex-direction: column;
}
.cat-mobile-sheet.is-open { transform: translateY(0); }
.cat-mobile-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.cat-mobile-sheet__head strong { font-family: var(--font-heading); font-size: 17px; }
.cat-mobile-sheet__head button { background: var(--color-bg-soft); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.cat-mobile-sheet__body { padding: 18px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cat-mobile-sheet--sort .cat-check { padding: 10px 0; border-bottom: 1px solid var(--color-bg-soft); }
.cat-mobile-sheet__foot { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--color-border); flex-shrink: 0; }
.cat-mobile-sheet__foot .btn { flex: 1; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.cat-layout { grid-template-columns: 220px 1fr; gap: 24px; }
	.subcat-card { flex-basis: calc((100% - 54px) / 4); }
}
@media (max-width: 1024px) {
	.cat-hero__inner { grid-template-columns: 1fr; text-align: center; }
	.cat-hero__desc { margin-left: auto; margin-right: auto; }
	.cat-hero__meta { justify-content: center; }
	.cat-hero__visual { order: -1; }
	.subcat-card { flex-basis: calc((100% - 36px) / 3); }
}
@media (max-width: 900px) {
	.cat-layout { grid-template-columns: 1fr; }
	.cat-sidebar { display: none; } /* moved into the mobile bottom sheet by JS when opened */
	.cat-mobile-bar { display: flex; gap: 12px; position: sticky; top: 0; z-index: 20; background: #fff; padding: 12px 0; margin-bottom: 6px; border-bottom: 1px solid var(--color-border); }
	.cat-mobile-bar__btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
	.cat-hero { padding: 26px 0 34px; }
	.cat-hero h1 { font-size: 30px; }
	.subcat-card { flex-basis: calc((100% - 18px) / 2); }
}
@media (max-width: 480px) {
	.subcat-card { flex-basis: 62%; }
	.cat-hero__meta { flex-direction: column; align-items: center; }
	.cat-hero__meta .btn { width: auto; }
	.cat-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Closed sheets: fully hidden (no keyboard focus, no full-page screenshot ghost) */
.cat-mobile-sheet { visibility: hidden; transition: transform var(--speed-med) var(--ease), visibility 0s linear var(--speed-med); }
.cat-mobile-sheet.is-open { visibility: visible; transition: transform var(--speed-med) var(--ease), visibility 0s; }
