/*
 * Tulianbox storefront styles: header, footer, homepage additions,
 * product cards, category pages and the single product page.
 * Loaded after style.css. Colours and fonts come from theme.json tokens.
 */

:root {
	--tb-plum: var(--wp--preset--color--contrast);
	--tb-magenta: var(--wp--preset--color--accent-1);
	--tb-blush: var(--wp--preset--color--accent-2);
	--tb-wine: var(--wp--preset--color--wine);
	--tb-gold: var(--wp--preset--color--gold);
	--tb-cream: var(--wp--preset--color--base);
	--tb-cream-deep: var(--wp--preset--color--cream-deep);
	--tb-muted: #5f5368;
	--tb-card: #fffbf8;
	--tb-line: color-mix(in srgb, var(--tb-plum) 12%, transparent);
	--tb-display: var(--wp--preset--font-family--fraunces);
	--tb-body: var(--wp--preset--font-family--manrope);
}

html { scroll-padding-top: 6rem; }

/* Remove the default gaps WordPress puts between header, main and footer. */
body .wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 3px solid var(--tb-gold);
	outline-offset: 2px;
}

.tb-wrap { width: min(1180px, 92vw); margin-inline: auto; }

/* Homepage text was using a low-contrast grey; use the darker muted tone. */
.th { --ink-soft: var(--tb-muted); }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.tb-topbar {
	background: var(--tb-plum);
	color: var(--tb-cream);
	font: 600 0.78rem/1.2 var(--tb-body);
	letter-spacing: 0.04em;
	padding: 0.55rem 4vw;
	text-align: center;
}
.tb-topbar .sep { opacity: 0.5; margin: 0 0.7rem; }
@media (max-width: 600px) { .tb-topbar .tb-topbar-extra { display: none; } }

.tb-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--tb-cream) 94%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--tb-line);
}
.admin-bar .tb-header { top: 32px; }
.tb-header-inner {
	width: min(1180px, 92vw);
	margin-inline: auto;
	padding: 0.55rem 0;
	gap: 1.2rem;
}
.tb-header-inner .wp-block-site-logo { margin: 0; line-height: 0; }
.tb-header-inner .wp-block-site-logo img { height: auto; }
.tb-nav { font: 600 0.95rem var(--tb-body); }
.tb-nav .wp-block-navigation__container { gap: clamp(0.9rem, 2vw, 2rem); }
.tb-nav a { color: var(--tb-plum); text-decoration: none; }
.tb-nav a:hover { color: var(--tb-magenta); }
.tb-header-tools { gap: 0.3rem; }

/* ---------------------------------------------------------
   Buttons used outside the homepage wrapper
   --------------------------------------------------------- */
.tb-chip,
.tb-btn {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	font-family: var(--tb-body);
}

/* ---------------------------------------------------------
   Homepage additions
   --------------------------------------------------------- */
.tb-bouquets { padding-top: clamp(2.5rem, 5vw, 4rem); }
.tb-more { text-align: center; margin: 2rem 0 0; }

.th-flower-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1.1rem;
	overflow: visible;
	padding-bottom: 0;
}
.th-flower-tile { width: auto; flex: initial; }
.th-flower-tile img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; border-radius: 12px; }
.th-flower-tile .price { color: var(--tb-muted); }

.th-occasion-item { display: flex; justify-content: space-between; align-items: center; }
.th-occasion-item::after { content: "\2192"; opacity: 0.45; margin-right: 0.9rem; transition: transform 0.15s ease, opacity 0.15s ease; }
.th-occasion-item:hover::after { opacity: 1; transform: translateX(4px); }

/* ---------------------------------------------------------
   Product cards (homepage grid, category pages, related products)
   --------------------------------------------------------- */
.wp-block-woocommerce-product-collection .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: clamp(1rem, 2vw, 1.6rem);
	list-style: none;
	margin: 0;
	padding: 0;
}
.wp-block-woocommerce-product-collection .wc-block-product-template > li {
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	background: var(--tb-card);
	border: 1px solid var(--tb-line);
	border-radius: 22px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}
@media (prefers-reduced-motion: no-preference) {
	.wp-block-woocommerce-product-collection .wc-block-product-template > li { transition: box-shadow 0.2s ease, transform 0.2s ease; }
	.wp-block-woocommerce-product-collection .wc-block-product-template > li:hover { transform: translateY(-4px); }
}
.wp-block-woocommerce-product-collection .wc-block-product-template > li:hover {
	box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--tb-plum) 55%, transparent);
}
.wp-block-woocommerce-product-collection .wc-block-components-product-image {
	margin: 0;
	position: relative;
	background: var(--tb-cream-deep);
}
.wp-block-woocommerce-product-collection .wc-block-components-product-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	border-radius: 0;
}
.wp-block-woocommerce-product-collection .wc-block-components-product-sale-badge {
	position: absolute;
	top: 0.8rem;
	left: 0.8rem;
	right: auto;
	margin: 0;
	background: var(--tb-magenta);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.3em 0.85em;
	font: 700 0.72rem/1.2 var(--tb-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.wp-block-woocommerce-product-collection .wp-block-post-title {
	margin: 1rem 1.15rem 0.3rem;
	font: 500 1.15rem/1.25 var(--tb-display);
	text-align: left !important;
}
.wp-block-woocommerce-product-collection .wp-block-post-title a { color: var(--tb-plum); text-decoration: none; }
.wp-block-woocommerce-product-collection .wp-block-post-title a:hover { color: var(--tb-magenta); }
.wp-block-woocommerce-product-collection .wc-block-components-product-price {
	margin: 0 1.15rem 0.9rem !important;
	font: 700 0.98rem var(--tb-body);
	color: var(--tb-plum);
	text-align: left !important;
}
.wp-block-woocommerce-product-collection .wc-block-components-product-price ins { background: none; text-decoration: none; color: var(--tb-magenta); }
.wp-block-woocommerce-product-collection .wc-block-components-product-price del { color: var(--tb-muted); font-weight: 500; margin-right: 0.35rem; }
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-button {
	margin: auto 1.15rem 1.15rem !important;
	text-align: left !important;
}
.wp-block-woocommerce-product-collection .wp-block-button__link {
	width: 100%;
	border-radius: 999px;
	background: var(--tb-magenta);
	color: #fff;
	font: 700 0.9rem var(--tb-body);
	padding: 0.8em 1.2em;
	text-align: center;
	border: 0;
	transition: background 0.15s ease;
}
.wp-block-woocommerce-product-collection .wp-block-button__link:hover { background: var(--tb-wine); color: #fff; }

.wp-block-query-pagination { margin-top: 2rem; gap: 0.5rem; font: 600 0.9rem var(--tb-body); }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	padding: 0.45em 0.95em;
	border: 1px solid var(--tb-line);
	border-radius: 999px;
	text-decoration: none;
	color: var(--tb-plum);
	background: var(--tb-card);
}
.wp-block-query-pagination .page-numbers.current { background: var(--tb-plum); color: var(--tb-cream); border-color: var(--tb-plum); }

/* ---------------------------------------------------------
   Breadcrumbs (category names are long, so keep them on one line)
   --------------------------------------------------------- */
.tb-archive .wc-block-breadcrumbs,
.tb-product .wc-block-breadcrumbs {
	font: 500 0.82rem var(--tb-body);
	color: var(--tb-muted);
	margin: 0;
}
.tb-archive .woocommerce-breadcrumb,
.tb-product .woocommerce-breadcrumb {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}
.tb-archive .woocommerce-breadcrumb a,
.tb-product .woocommerce-breadcrumb a { color: var(--tb-muted); text-decoration: none; }
.tb-archive .woocommerce-breadcrumb a:hover,
.tb-product .woocommerce-breadcrumb a:hover { color: var(--tb-magenta); }

/* ---------------------------------------------------------
   Category and shop pages
   --------------------------------------------------------- */
.tb-archive { padding-bottom: clamp(3rem, 6vw, 5rem); }
.tb-archive-hero {
	background: linear-gradient(160deg, var(--tb-blush), var(--tb-cream) 72%);
	border-bottom: 1px solid var(--tb-line);
	padding: clamp(1.2rem, 3vw, 2rem) 0 clamp(1.8rem, 4vw, 3rem);
}
.tb-archive-hero h1 {
	font: 500 clamp(1.7rem, 3.6vw, 2.5rem)/1.15 var(--tb-display);
	max-width: 30ch;
	margin: 0.9rem 0 0.8rem;
	color: var(--tb-plum);
}
.tb-archive-hero .wp-block-term-description {
	max-width: 64ch;
	color: var(--tb-muted);
	font: 500 1rem/1.65 var(--tb-body);
	margin: 0;
}
.tb-archive-hero .wp-block-term-description p { margin: 0; }
.tb-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1.8rem auto 1.2rem;
	font: 600 0.9rem var(--tb-body);
	color: var(--tb-muted);
}
.tb-toolbar .woocommerce-result-count { margin: 0; }
.tb-toolbar .woocommerce-ordering { margin: 0; }
.tb-toolbar select {
	border: 1.5px solid color-mix(in srgb, var(--tb-plum) 25%, transparent);
	border-radius: 999px;
	padding: 0.5em 1em;
	background: #fff;
	font: 600 0.9rem var(--tb-body);
	color: var(--tb-plum);
}
.tb-archive .tb-grid-wrap { width: min(1180px, 92vw); margin-inline: auto; }

.tb-chips-section { width: min(1180px, 92vw); margin: clamp(2.5rem, 5vw, 4rem) auto 0; }
.tb-chips-section h2 { font: 500 1.4rem var(--tb-display); margin: 0 0 1rem; color: var(--tb-plum); }
.tb-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tb-chip {
	padding: 0.55em 1.1em;
	border: 1.5px solid color-mix(in srgb, var(--tb-plum) 22%, transparent);
	border-radius: 999px;
	color: var(--tb-plum);
	font-weight: 600;
	font-size: 0.9rem;
	background: var(--tb-card);
	transition: border-color 0.15s ease, color 0.15s ease;
}
.tb-chip:hover { border-color: var(--tb-magenta); color: var(--tb-magenta); }

/* ---------------------------------------------------------
   Single product page
   --------------------------------------------------------- */
.tb-product { padding: 1.2rem 0 clamp(3rem, 6vw, 5rem); }
.tb-product .tb-wrap > * { max-width: none; }
.tb-product-cols {
	gap: clamp(1.5rem, 4vw, 3.5rem);
	margin: 1.2rem 0 2.5rem;
	align-items: flex-start;
}
.tb-gallery-col { position: sticky; top: 7.5rem; }
@media (max-width: 781px) { .tb-gallery-col { position: static; } }
.tb-product .wp-block-woocommerce-product-image-gallery { position: relative; }
.tb-product .woocommerce-product-gallery { margin: 0; }
.tb-product .woocommerce-product-gallery__image img,
.tb-product .woocommerce-product-gallery img.wp-post-image {
	border-radius: 26px;
	width: 100%;
	height: auto;
}
.tb-product .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	gap: 0.6rem;
	list-style: none;
	margin: 0.8rem 0 0;
	padding: 0;
}
.tb-product .woocommerce-product-gallery .flex-control-thumbs li { width: 72px; }
.tb-product .woocommerce-product-gallery .flex-control-thumbs img { border-radius: 12px; }
.tb-product .onsale {
	top: 1rem;
	left: 1rem;
	right: auto;
	min-height: 0;
	min-width: 0;
	line-height: 1.2;
	padding: 0.4em 1em;
	border-radius: 999px;
	font: 700 0.75rem var(--tb-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	z-index: 2;
}
.tb-product h1.wp-block-post-title {
	font: 500 clamp(1.8rem, 3.4vw, 2.6rem)/1.12 var(--tb-display);
	margin: 0 0 0.6rem;
	color: var(--tb-plum);
}
.tb-product .wc-block-components-product-price {
	font: 600 1.8rem var(--tb-display);
	color: var(--tb-plum);
	margin: 0;
}
.tb-product .wc-block-components-product-price ins { background: none; text-decoration: none; color: var(--tb-wine); }
.tb-product .wc-block-components-product-price del { color: var(--tb-muted); font-size: 1.05rem; margin-right: 0.5rem; }
.tb-product .wp-block-post-excerpt__excerpt {
	color: var(--tb-muted);
	font: 500 1rem/1.65 var(--tb-body);
	margin: 0.9rem 0 1.5rem;
}
.tb-product form.cart {
	display: flex;
	gap: 0.8rem;
	align-items: stretch;
	flex-wrap: wrap;
	margin: 0 0 1.4rem;
}
.tb-product form.cart .quantity { margin: 0; }
.tb-product form.cart .qty {
	height: 100%;
	min-height: 52px;
	width: 5rem;
	border: 1.5px solid color-mix(in srgb, var(--tb-plum) 28%, transparent);
	border-radius: 999px;
	background: #fff;
	text-align: center;
	font: 700 1rem var(--tb-body);
	color: var(--tb-plum);
}
.tb-product .single_add_to_cart_button {
	flex: 1;
	min-height: 52px;
	border: 0;
	border-radius: 999px;
	background: var(--tb-magenta);
	color: #fff;
	font: 700 1rem var(--tb-body);
	padding: 0 2rem;
	cursor: pointer;
	transition: background 0.15s ease;
}
.tb-product .single_add_to_cart_button:hover { background: var(--tb-wine); color: #fff; }

.tb-assure {
	list-style: none;
	margin: 0 0 1.4rem;
	padding: 1.1rem 1.25rem;
	background: var(--tb-card);
	border: 1px solid var(--tb-line);
	border-radius: 18px;
	display: grid;
	gap: 0.95rem;
}
.tb-assure li { display: flex; gap: 0.85rem; align-items: flex-start; font: 500 0.9rem/1.4 var(--tb-body); color: var(--tb-muted); }
.tb-assure b { color: var(--tb-plum); font-weight: 700; }
.tb-assure svg { width: 24px; height: 24px; color: var(--tb-magenta); flex-shrink: 0; margin-top: 1px; }

/* Description and reviews tabs */
.tb-product .wp-block-woocommerce-product-details { margin: 0 0 2rem; }
.tb-product .wc-tabs {
	display: flex;
	gap: 1.6rem;
	list-style: none;
	margin: 0 0 1.6rem;
	padding: 0;
	border-bottom: 1px solid var(--tb-line);
}
.tb-product .wc-tabs li { margin: 0; padding: 0; border: 0; background: none; }
.tb-product .wc-tabs li a {
	display: block;
	padding: 0.8rem 0;
	font: 700 0.95rem var(--tb-body);
	color: var(--tb-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.tb-product .wc-tabs li.active a { color: var(--tb-magenta); border-bottom-color: var(--tb-magenta); }
.tb-product .woocommerce-Tabs-panel { max-width: 72ch; }
.tb-product .woocommerce-Tabs-panel--description > h2:first-child { display: none; }
.tb-product .woocommerce-Tabs-panel p { font: 500 1rem/1.7 var(--tb-body); color: var(--tb-plum); }
.tb-product .woocommerce-Tabs-panel h2 { font: 500 1.35rem var(--tb-display); margin: 1.8rem 0 0.7rem; color: var(--tb-plum); }
.tb-product .woocommerce-Tabs-panel ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; font: 500 0.98rem/1.55 var(--tb-body); color: var(--tb-plum); }
.tb-product .woocommerce-Tabs-panel li::marker { color: var(--tb-magenta); }

.tb-cats { margin: 0 0 2.5rem; font: 600 0.8rem var(--tb-body); color: var(--tb-muted); }
.tb-cats .wp-block-post-terms__prefix { display: block; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.tb-cats .wp-block-post-terms__separator { display: none; }
.tb-cats a {
	display: inline-block;
	max-width: min(100%, 22rem);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
	margin: 0.2rem 0.3rem 0.2rem 0;
	padding: 0.3em 0.85em;
	border: 1px solid var(--tb-line);
	border-radius: 999px;
	color: var(--tb-plum);
	text-decoration: none;
	background: var(--tb-card);
	font-size: 0.78rem;
}
.tb-cats a:hover { border-color: var(--tb-magenta); color: var(--tb-magenta); }
.tb-product h2.wp-block-heading { font: 500 1.6rem var(--tb-display); color: var(--tb-plum); margin: 0 0 1.2rem; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.tb-footer {
	background: var(--tb-cream-deep);
	border-top: 1px solid var(--tb-line);
	padding: clamp(2.5rem, 5vw, 4rem) 0 1.6rem;
	color: var(--tb-muted);
	font: 500 0.92rem/1.5 var(--tb-body);
}
.tb-footer-top {
	width: min(1180px, 92vw);
	margin-inline: auto;
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 2.2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--tb-line);
}
.tb-footer-top > * { margin: 0; }
@media (max-width: 760px) {
	.tb-footer-top { grid-template-columns: repeat(2, 1fr); }
	.tb-footer-brand { grid-column: 1 / -1; }
}
.tb-footer-brand p { max-width: 32ch; margin: 1rem 0 0; }
.tb-footer-brand .wp-block-site-logo { margin: 0; line-height: 0; }
.tb-foot-col h4 {
	font: 700 0.78rem var(--tb-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tb-plum);
	margin: 0 0 0.9rem;
}
.tb-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.tb-foot-col a { color: var(--tb-muted); text-decoration: none; }
.tb-foot-col a:hover { color: var(--tb-magenta); }
.tb-footer-bottom {
	width: min(1180px, 92vw);
	margin: 1.4rem auto 0;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.6rem;
	font-size: 0.8rem;
}
