/*
Theme Name: toshop.click CL!CK
Theme URI: https://click.toshop.click
Author: toshop.click
Description: A clean, fast block theme for click.toshop.click. Edit everything in Appearance → Editor.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toshop-click
Tags: block-theme, full-site-editing, e-commerce, one-column, custom-colors
*/

/* Small refinements on top of theme.json */
a { text-underline-offset: 0.15em; }

.wp-block-button__link { transition: transform .15s ease, background-color .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

.tsc-card {
	transition: transform .2s ease, box-shadow .2s ease;
}
.tsc-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(20, 18, 31, .10);
}

.tsc-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(180%) blur(8px);
}
.admin-bar .tsc-site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .tsc-site-header { top: 46px; }
}

:where(.wp-site-blocks) > * { margin-block-start: 0; }

/* ---------- Entry page (homepage) ---------- */
.tsc-splash {
	min-height: 100vh;
	min-height: 100svh;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FFFFFF;
	padding: 24px;
	box-sizing: border-box;
}
.tsc-logo-wrap {
	position: relative;
	/* Fill the window: 88% of the width, or as wide as the height allows
	   (logo is 3.053 times wider than tall; 120px kept clear for the copyright). */
	width: min(88vw, calc((100vh - 120px) * 3.053));
	width: min(88vw, calc((100svh - 120px) * 3.053));
	line-height: 0;
}
.tsc-logo-body {
	width: 100%;
	height: auto;
	display: block;
}
/* Dot position measured from the logo file */
.tsc-dot {
	position: absolute;
	left: 44.933%;
	top: 68.501%;
	width: 9.067%;
	height: 28.11%;
	display: block;
	border-radius: 50%;
	animation: tsc-pulse 1.6s ease-in-out infinite;
	transform-origin: 50% 50%;
}
.tsc-dot img {
	width: 100%;
	height: 100%;
	display: block;
}
.tsc-dot:hover,
.tsc-dot:focus-visible {
	animation-play-state: paused;
	transform: scale(1.05);
}
.tsc-dot:focus-visible {
	outline: 3px solid #FF5A1F;
	outline-offset: 4px;
}
/* 5% grow with a soft glow */
@keyframes tsc-pulse {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
	}
	50% {
		transform: scale(1.05);
		filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.45));
	}
}
@media (prefers-reduced-motion: reduce) {
	.tsc-dot { animation: none; }
}

/* ---------- Header logo ---------- */
.tsc-header-logo img {
	height: 36px;
	width: auto;
	display: block;
}


/* (c) CL!CK year: bottom right on every page, same as the other CL!CK sites */
.tsc-foot {
	position: fixed;
	right: clamp(16px, 3vw, 40px);
	bottom: clamp(12px, 2.5vh, 28px);
	z-index: 100;
	line-height: 1;
	color: #FFFFFF;
	mix-blend-mode: difference; /* black on light backgrounds, white on the dark footer */
	pointer-events: none;
}
.tsc-foot svg { height: 12px; width: auto; display: block; }

/* Logged-in admin bar: keep the logo centred in the space below it */
.admin-bar .tsc-splash { min-height: calc(100vh - 32px); min-height: calc(100svh - 32px); }
@media (max-width: 782px) {
	.admin-bar .tsc-splash { min-height: calc(100vh - 46px); min-height: calc(100svh - 46px); }
}

/* ---------- Shop (Menu) pages ---------- */
.tsc-site-header { position: sticky; top: 0; z-index: 50; }
.tsc-header-row { gap: var(--wp--preset--spacing--40); }
.tsc-search { flex: 1 1 auto; max-width: 560px; margin: 0 !important; }
.tsc-search .wp-block-search__inside-wrapper {
	border: 1px solid #D6D6D6 !important;
	border-radius: 999px;
	padding: 2px 4px 2px 16px !important;
	background: #FFFFFF;
}
.tsc-search .wp-block-search__input { border: 0 !important; font-size: 0.95rem; background: transparent; }
.tsc-search .wp-block-search__button {
	background: #000000 !important;
	color: #FFFFFF !important;
	border-radius: 999px !important;
	padding: 8px 12px !important;
	margin: 0 !important;
}
.tsc-search .wp-block-search__button svg { fill: currentColor; }
.tsc-header-icons { flex: 0 0 auto; }

.tsc-cat-row {
	gap: var(--wp--preset--spacing--40);
	overflow-x: auto;
	scrollbar-width: none;
	padding: 10px 0;
	white-space: nowrap;
}
.tsc-cat-row::-webkit-scrollbar { display: none; }
.tsc-cat-all,
.tsc-cats .wc-block-product-categories-list-item a {
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	color: #000000;
}
.tsc-cat-all:hover,
.tsc-cats a:hover { text-decoration: underline; }
.tsc-cats { margin: 0 !important; }
.tsc-cats .wc-block-product-categories-list {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	list-style: none;
	margin: 0;
	padding: 0;
}
.tsc-cats .wc-block-product-categories-list-item { margin: 0; }

.tsc-shop { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--60); }
.tsc-shop .wp-block-query-title { font-size: var(--wp--preset--font-size--x-large); margin-top: var(--wp--preset--spacing--30); }
.tsc-shop .wc-block-product-template { row-gap: var(--wp--preset--spacing--50) !important; }
.tsc-shop .wc-block-components-product-image img { background: #F2F2F2; border-radius: 12px; }
.tsc-shop .wc-block-components-product-button .wp-block-button__link,
.tsc-shop .wc-block-components-product-button__button { width: 100%; }
.tsc-shop .wp-block-post-title { margin-top: 0.75rem !important; margin-bottom: 0.25rem !important; }

.tsc-footer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}
.tsc-footer-links { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--40); font-size: 0.9rem; }
.tsc-footer-links a { text-decoration: none; color: #000000; }
.tsc-footer-links a:hover { text-decoration: underline; }

@media (max-width: 700px) {
	.tsc-header-row { flex-wrap: wrap !important; }
	.tsc-search { order: 3; flex-basis: 100%; max-width: none; }
}

/* Header spacing */
.tsc-site-header > *,
.tsc-site-header .tsc-cat-bar { margin-block-start: 0 !important; }
.tsc-cat-row { padding: 4px 0 12px; }
.tsc-site-header.has-background { padding: 0 !important; }

/* Shop pages scroll, so the copyright sits at the bottom right of the page
   instead of floating over products. The entry page keeps it fixed in the corner. */
body:not(.home) .tsc-foot {
	position: static;
	mix-blend-mode: normal;
	color: #000000;
	display: flex;
	justify-content: flex-end;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--wp--preset--spacing--40) clamp(12px, 2.5vh, 28px);
	box-sizing: content-box;
}
