/* Thimze Shop Layout — matches approved mockup
   v1.1.3 — consistent product image sizing (crop-to-fill, matched to
   Loobek's real markup: div.products > section.product > figure > img),
   21-per-page grid (3x7 desktop / 2-col mobile), #main-content +
   .main-products classes added so Loobek's native "Load more" AJAX JS
   can find and update the grid, and a MOBILE-ONLY off-canvas drawer for
   Categories/Filter/Sort (hamburger trigger replaces the sidebar only
   below 768px — the desktop <aside> sidebar is untouched and still
   renders exactly as before). */

.tsl-shop-wrapper {
	width: 100%;
	margin: 0;
	background: #f8f9fa;
	border-radius: 0;
	overflow: hidden;
}

/* Hero */
.tsl-hero {
	background: var(--tsl-brand-tint, #e6f8fe);
	padding: 36px 24px;
	text-align: center;
}
.tsl-hero-title {
	font-size: 22px;
	font-weight: 600;
	color: var(--tsl-brand-dark, #0e8eb6);
	margin: 0 0 6px;
}
.tsl-hero-subtitle {
	font-size: 15px;
	color: #1a7a99;
	margin: 0 0 16px;
}
.tsl-hero-cta {
	display: inline-block;
	background: var(--tsl-brand, #19c3f3);
	color: #fff;
	border: none;
	padding: 11px 26px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.15s ease;
}
.tsl-hero-cta:hover {
	background: var(--tsl-brand-dark, #0e8eb6);
	color: #fff;
}

/* Body layout */
.tsl-shop-body {
	display: flex;
	gap: 0;
	padding: 32px 48px;
	align-items: flex-start;
	max-width: 1500px;
	margin: 0 auto;
}

.tsl-shop-sidebar {
	width: 220px;
	flex-shrink: 0;
	padding-right: 24px;
	border-right: 1px solid #e5e5e5;
}
.tsl-sidebar-block {
	margin-bottom: 24px;
}
.tsl-sidebar-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 10px;
	color: #222;
}
.tsl-category-list {
	list-style: none !important;
	margin: 0;
	padding: 0;
}
.tsl-category-list li {
	margin-bottom: 8px;
	list-style: none !important;
}
.tsl-category-list li::before,
.tsl-category-list li::marker {
	content: none !important;
}
.tsl-category-list a {
	font-size: 15px;
	color: #555;
	text-decoration: none;
}
.tsl-category-list a:hover {
	color: var(--tsl-brand-dark, #0e8eb6);
}
.tsl-category-list li.tsl-active a {
	font-weight: 600;
	color: var(--tsl-brand-dark, #1ac4f3);
}
.tsl-cat-count {
	color: #999;
	font-size: 14px;
}

.tsl-cat-row {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 4px !important;
	width: auto !important;
}
.tsl-cat-row a {
	flex: 0 1 auto !important;
	display: inline !important;
	width: auto !important;
}

/* The toggle is a <span role="button">, not a <button> element, specifically
   so theme-wide button styling (full-width, colored background, padding)
   never applies to it in the first place. Inline styles on the element
   itself (in shop-sidebar.php) handle the base reset; this just adds the
   hover/expanded states that don't fit inline. */
.tsl-sidebar-block .tsl-cat-toggle:hover,
.tsl-sidebar-block .tsl-cat-toggle:focus-visible {
	color: var(--tsl-brand-dark, #0e8eb6) !important;
	outline: none !important;
}
.tsl-cat-arrow {
	transition: transform 0.18s ease;
}
.tsl-cat-toggle.tsl-expanded .tsl-cat-arrow {
	transform: rotate(180deg);
}
.tsl-subcategory-list {
	list-style: none !important;
	margin: 0;
	padding: 0 0 0 14px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease;
}
.tsl-subcategory-list.tsl-expanded {
	max-height: 1000px;
}
.tsl-subcategory-list li {
	margin: 8px 0 0;
	list-style: none !important;
}
.tsl-subcategory-list li::before,
.tsl-subcategory-list li::marker {
	content: none !important;
}
.tsl-subcategory-list a {
	font-size: 16px;
	color: #777;
	text-decoration: none;
}
.tsl-subcategory-list a:hover {
	color: var(--tsl-brand-dark, #0e8eb6);
}
.tsl-subcategory-list li.tsl-active a {
	font-weight: 700;
	color: var(--tsl-brand-dark, #0e8eb6);
}

/* WooCommerce price filter widget — Loobek's global widget CSS makes
   this oversized, so we reset it explicitly here. */
.tsl-sidebar-block .widget_price_filter,
.tsl-sidebar-block .widget_price_filter * {
	font-size: 13px !important;
	line-height: 1.5 !important;
}
.tsl-sidebar-block .widget_price_filter .price_label,
.tsl-sidebar-block .widget_price_filter .price_label span {
	font-size: 13px !important;
	font-weight: 400 !important;
}
.tsl-sidebar-block .widget_price_filter h2,
.tsl-sidebar-block .widget_price_filter h3 {
	font-size: 14px !important;
	font-weight: 600 !important;
	margin: 0 0 10px !important;
}

/* Selected category heading shown above the product grid */
.tsl-category-heading {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #222;
}

.tsl-shop-main {
	flex: 1;
	padding-left: 24px;
	min-width: 0;
}

.tsl-shop-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}
.tsl-result-count {
	font-size: 13px;
	color: #777;
}

.tsl-toolbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.tsl-quick-links {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tsl-quick-link {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid var(--tsl-brand, #19c3f3);
	color: var(--tsl-brand-dark, #0e8eb6);
	background: var(--tsl-brand-tint, #e6f8fe);
	transition: background .15s, color .15s, transform .1s;
}
.tsl-quick-link:hover,
.tsl-quick-link:focus {
	background: var(--tsl-brand, #19c3f3);
	color: #fff;
}
.tsl-quick-link:active {
	transform: scale(.97);
}
.tsl-quick-link.is-active {
	background: var(--tsl-brand, #19c3f3);
	color: #fff;
}

.tsl-inline-panel {
	padding-top: 4px;
}

.tsl-panel-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 0;
	margin-bottom: 16px;
	font-size: 13px;
	font-weight: 500;
	color: #777;
	cursor: pointer;
}
.tsl-panel-back:hover {
	color: var(--tsl-brand-dark, #0e8eb6);
}

/* Mobile-only drawer trigger — hidden on desktop by default. Shown
   only inside the @media (max-width: 768px) block below, where it
   replaces the desktop sidebar's job without touching desktop markup
   or styling at all. */
.tsl-mobile-drawer-trigger {
	display: none;
}

/* Product grid
   IMPORTANT: Loobek's theme renders the product loop as
   <div class="products"> > <section class="product"> > .product-wrapper
   > .thumbnail-wrapper > a > figure > img — NOT the default WooCommerce
   <ul class="products"><li class="product"> markup. Selectors below are
   written against the real Loobek markup; "ul.products li.product"
   never matched anything in this theme, which is why earlier versions
   of this stylesheet had no visible effect at all. */
.tsl-product-grid {
	width: 100%;
}
body .tsl-product-grid .products {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 20px !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}
body .tsl-product-grid .products .product {
	background: #fff !important;
	border: 1px solid #eaeaea !important;
	border-radius: 8px !important;
	padding: 14px !important;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
	list-style: none !important;
}
body .tsl-product-grid .products .product::before,
body .tsl-product-grid .products .product::marker {
	content: none !important;
}
body .tsl-product-grid .products .product:hover {
	border-color: var(--tsl-brand, #19c3f3) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
body .tsl-product-grid .products .product .product-wrapper {
	max-width: 100% !important;
	margin: 0 !important;
}
body .tsl-product-grid .products .product .thumbnail-wrapper {
	width: 100% !important;
}

/* Uniform image box: every product image (front + lazy-load + gallery
   back image) is cropped to fill the same square ratio, regardless of
   its native dimensions. The figure is the crop frame; the img inside
   it fills and covers that frame. This is what fixes the sizing
   inconsistency between products. */
body .tsl-product-grid .products .product figure {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	overflow: hidden !important;
	border-radius: 6px !important;
	margin: 0 0 10px !important;
	background: #f3f3f3;
}
body .tsl-product-grid .products .product figure img {
	display: block !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	margin: 0 !important;
	border-radius: 0 !important;
}
/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
	body .tsl-product-grid .products .product figure {
		height: 0 !important;
		padding-top: 100% !important;
	}
}

body .tsl-product-grid .products .product .woocommerce-loop-product__title,
body .tsl-product-grid .products .product h3.product-name {
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 4px;
}
body .tsl-product-grid .products .product .price {
	font-size: 12px;
	color: #777;
}

/* Pagination (WooCommerce default markup, lightly themed) */
.tsl-shop-main nav.woocommerce-pagination {
	margin-top: 28px;
	text-align: center;
}
.tsl-shop-main nav.woocommerce-pagination ul {
	display: inline-flex !important;
	gap: 6px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
}
.tsl-shop-main nav.woocommerce-pagination ul li {
	border: none !important;
	list-style: none !important;
}
.tsl-shop-main nav.woocommerce-pagination ul li a,
.tsl-shop-main nav.woocommerce-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	font-size: 13px;
	color: #555;
	text-decoration: none;
}
.tsl-shop-main nav.woocommerce-pagination ul li span.current,
.tsl-shop-main nav.woocommerce-pagination ul li a:hover {
	border-color: var(--tsl-brand, #19c3f3);
	color: var(--tsl-brand-dark, #0e8eb6);
}

@media (max-width: 768px) {
	.tsl-shop-body {
		flex-direction: column;
		padding: 24px;
	}

	/* On mobile the off-canvas drawer (below) takes over Categories/
	   Filter/Sort, so the inline desktop sidebar is hidden here. It is
	   NOT removed from the page — its content is also rendered a
	   second time inside #tsl-mobile-drawer via the same shop-sidebar
	   partial, so nothing about the desktop sidebar itself changes. */
	.tsl-shop-sidebar {
		display: none;
	}

	.tsl-shop-main {
		padding-left: 0;
	}
	body .tsl-product-grid .products {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.tsl-shop-toolbar {
		flex-wrap: wrap;
		gap: 10px;
	}

	.tsl-toolbar-right {
		margin-left: 0;
		flex-wrap: wrap;
		order: 2;
		width: 100%;
		justify-content: flex-start;
	}

	.tsl-quick-links {
		order: 1;
	}

	.tsl-mobile-drawer-trigger {
		display: flex;
		align-items: center;
		gap: 8px;
		background: #fff;
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		padding: 8px 12px;
		font-size: 12px;
		font-weight: 500;
		color: #333;
		cursor: pointer;
		order: 1;
	}
	.tsl-mobile-drawer-trigger:hover,
	.tsl-mobile-drawer-trigger[aria-expanded="true"] {
		border-color: var(--tsl-brand, #19c3f3);
		color: var(--tsl-brand-dark, #0e8eb6);
	}
	.tsl-hamburger-icon {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 3px;
		width: 14px;
		flex-shrink: 0;
	}
	.tsl-hamburger-icon span {
		display: block;
		height: 2px;
		width: 100%;
		background: currentColor;
		border-radius: 1px;
	}

	.tsl-result-count {
		order: 2;
	}

	/* Off-canvas drawer: mobile-only Categories/Filter/Sort panel */
	.tsl-mobile-drawer-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		opacity: 0;
		transition: opacity 0.25s ease;
		z-index: 1000;
	}
	.tsl-mobile-drawer-overlay.tsl-mobile-drawer-overlay-open {
		opacity: 1;
	}
	.tsl-mobile-drawer {
		position: fixed;
		top: 0;
		left: 0;
		height: 100%;
		width: 280px;
		max-width: 85vw;
		background: #fff;
		box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		z-index: 1001;
		display: flex;
		flex-direction: column;
	}
	.tsl-mobile-drawer.tsl-mobile-drawer-open {
		transform: translateX(0);
	}
	.tsl-mobile-drawer-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px 18px;
		border-bottom: 1px solid #eee;
		flex-shrink: 0;
	}
	.tsl-mobile-drawer-title {
		margin: 0;
		font-size: 14px;
		font-weight: 600;
		color: #222;
	}
	.tsl-mobile-drawer-close {
		background: none;
		border: none;
		font-size: 22px;
		line-height: 1;
		color: #777;
		cursor: pointer;
		padding: 0 4px;
	}
	.tsl-mobile-drawer-close:hover {
		color: #222;
	}
	.tsl-mobile-drawer-content {
		padding: 18px;
		overflow-y: auto;
		flex: 1;
	}
	.tsl-mobile-drawer-sort-block .tsl-sort select.orderby {
		width: 100%;
		padding: 8px 10px;
		font-size: 13px;
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		background: #fff;
		color: #333;
	}

	body.tsl-mobile-drawer-locked {
		overflow: hidden;
	}
}

/* Trust bar */
.tsl-trust-bar {
	display: flex;
	justify-content: space-around;
	padding: 16px 24px;
	border-top: 1px solid #e5e5e5;
	background: #fff;
}
.tsl-trust-bar span {
	font-size: 12px;
	color: #777;
	display: flex;
	align-items: center;
	gap: 6px;
}
.tsl-icon {
	font-style: normal;
}
