/*
Theme Name: Toad Traders
Theme URI: https://toadtraders.com/
Description: Toad Traders' own theme: a child of Twenty Twenty-Five in the shop's brown, terracotta and gold, with WooCommerce blocks. No page builder or premium plugins needed.
Author: NXT
Template: twentytwentyfive
Version: 1.0.5
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toadtraders
*/

/* ---------- Header ---------- */
.tt-header {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
}
.tt-header a { color: inherit; }
.tt-topbar,
.tt-mainbar,
.tt-searchbar {
	max-width: var(--wp--style--global--wide-size);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--style--root--padding-left, 1rem);
	padding-right: var(--wp--style--root--padding-right, 1rem);
}
.tt-topbar {
	font-size: 0.875rem;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.tt-topbar p { margin: 0; }
.tt-mainbar { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.tt-mainbar .wp-block-site-logo img { height: auto; }
.tt-nav {
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.9rem;
}
.tt-nav .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 0 !important;
	box-shadow: 0 8px 24px rgba(43, 33, 28, 0.18);
	padding: 0.4rem 0;
	min-width: 15rem;
}
.tt-nav .wp-block-navigation__submenu-container a { padding: 0.45rem 1rem; }
.tt-nav .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--accent-5); }
.tt-searchbar { padding-top: 0; padding-bottom: 1rem; }
.tt-search .wp-block-search__input {
	border: 0;
	border-radius: 999px 0 0 999px;
	padding: 0.65rem 1.1rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.tt-search .wp-block-search__button {
	border-radius: 0 999px 999px 0;
	margin-left: 0;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
}
.tt-header .wc-block-mini-cart__button,
.tt-header .wp-block-woocommerce-customer-account a { color: var(--wp--preset--color--base); }

/* Phones: the gold menu bar people know from today's site */
@media (max-width: 599px) {
	.tt-mainbar { flex-wrap: wrap; }
	.tt-mainbar .wp-block-navigation__responsive-container-open {
		background: var(--wp--preset--color--accent-1);
		color: var(--wp--preset--color--contrast);
		border-radius: 4px;
		padding: 0.5rem 0.7rem;
	}
}

/* ---------- Page content on the terracotta background ---------- */
.tt-section-title {
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 0.02em;
}
.wp-block-details {
	background: var(--wp--preset--color--accent-5);
	border-radius: 6px;
	padding: 0.9rem 1.1rem;
}
.wp-block-details summary { font-weight: 600; cursor: pointer; }
.tt-note {
	background: var(--wp--preset--color--accent-5);
	border-left: 4px solid var(--wp--preset--color--accent-1);
	padding: 0.8rem 1rem;
}

/* Category tiles on the home page: round photos, as today */
.tt-tiles { gap: 1.5rem; }
.tt-tiles .wp-block-image { margin: 0; }
.tt-tiles .wp-block-image img {
	aspect-ratio: 1;
	width: 100%;
	object-fit: cover;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-3);
}
.tt-tiles p { text-align: center; font-weight: 600; margin-top: 0.6rem; }
.tt-tiles p a { color: var(--wp--preset--color--contrast); text-decoration: none; }

/* Product cards: white cards on the terracotta page */
.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-template > li {
	background: var(--wp--preset--color--base);
	border-radius: 8px;
	padding: 0.9rem 0.9rem 1.1rem;
}
.wc-block-product-template .wp-block-post-title,
.wp-block-woocommerce-product-template .wp-block-post-title { font-size: 1rem; font-weight: 600; }
.wc-block-product-template .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }

/* ---------- Footer ---------- */
.tt-footer {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent-4);
	font-size: 0.95rem;
	padding: 3rem var(--wp--style--root--padding-right, 1rem) 1.5rem var(--wp--style--root--padding-left, 1rem);
}
.tt-footer .wp-block-columns { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto; }
.tt-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--wp--preset--color--contrast); }
.tt-links { list-style: none; padding-left: 0; }
.tt-links li { margin: 0.3rem 0; }
.tt-footer a { color: var(--wp--preset--color--accent-3); }
.tt-copyright {
	max-width: var(--wp--style--global--wide-size);
	margin: 2rem auto 0;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--accent-5);
	font-size: 0.85rem;
}

/* ---------- Sliders (assets/carousel.js): home category photos and featured galleries ---------- */
.tt-slider { position: relative; }
.tt-is-slider {
	display: flex !important;
	flex-wrap: nowrap !important;
	grid-template-columns: none !important;
	gap: 1.5rem !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 0.25rem;
}
.tt-is-slider::-webkit-scrollbar { display: none; }
.tt-is-slider > * {
	flex: 0 0 calc((100% - 3rem) / 3) !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	scroll-snap-align: start;
}
@media (max-width: 781px) {
	.tt-is-slider > * { flex-basis: calc((100% - 1.5rem) / 2) !important; }
}
@media (max-width: 480px) {
	.tt-is-slider > * { flex-basis: 100% !important; }
}
.tt-slider-btn {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(43, 33, 28, 0.25);
}
.tt-slider-btn.prev { left: 0.25rem; }
.tt-slider-btn.next { right: 0.25rem; }
.tt-slider-btn:hover { background: var(--wp--preset--color--accent-3); color: var(--wp--preset--color--base); }
.tt-slider-btn:focus-visible { outline: 3px solid var(--wp--preset--color--base); outline-offset: 2px; }

/* ---------- 1.0.2: readability and a tidier shop (21 Oct 2026) ---------- */

/* Round category photos: smaller, more at a time (5 on a computer, 4 on a tablet, 3, then 2 on a phone) */
.tt-tiles.tt-is-slider > * { flex-basis: calc((100% - 6rem) / 5) !important; }
@media (max-width: 1099px) { .tt-tiles.tt-is-slider > * { flex-basis: calc((100% - 4.5rem) / 4) !important; } }
@media (max-width: 781px) { .tt-tiles.tt-is-slider > * { flex-basis: calc((100% - 3rem) / 3) !important; } }
@media (max-width: 480px) { .tt-tiles.tt-is-slider > * { flex-basis: calc((100% - 1.5rem) / 2) !important; } }
.tt-tiles p { font-size: 0.95rem; }

/* Home welcome */
.tt-hero-title { text-align: center; margin-top: 0.5rem; margin-bottom: 0.25rem; }
.tt-hero-sub { text-align: center; font-size: 1.1rem; max-width: 40rem; margin-left: auto; margin-right: auto; }

/* Four shop facts under the photos */
.tt-trust { gap: 1rem; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.tt-trust { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 781px) { .tt-trust { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.tt-trust p {
	margin: 0;
	background: var(--wp--preset--color--accent-5);
	border-top: 4px solid var(--wp--preset--color--accent-1);
	border-radius: 6px;
	padding: 0.9rem 1rem;
	font-size: 0.95rem;
	line-height: 1.45;
}
.tt-trust strong { display: block; font-size: 1.02rem; margin-bottom: 0.15rem; }

/* Section titles: a little smaller, with a gold line under them */
.tt-section-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 2rem; }
.tt-section-title::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin: 0.6rem auto 0;
	border-radius: 2px;
	background: var(--wp--preset--color--accent-1);
}

/* Page titles centred, like the headings under them */
.page:not(.home) main .wp-block-post-title { text-align: center; }

/* Product cards: same height in a row, two-line titles, button at the bottom */
.wc-block-product-template .wc-block-product {
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wc-block-product-template .wc-block-product:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43, 33, 28, 0.18); }
.wc-block-product-template .wc-block-components-product-image { position: relative; }
.wc-block-product-template .wc-block-components-product-image img { aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.wc-block-product-template .wp-block-post-title {
	line-height: 1.3;
	min-height: 2.6em;
	margin: 0.7rem 0 0.3rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wc-block-product-template .wp-block-woocommerce-product-button { margin-top: auto; }
.wc-block-product-template .wp-block-button__link { width: 100%; }
.wc-block-product-template .wc-block-product.outofstock .wc-block-components-product-image::after {
	content: "Sold out";
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-6);
	color: var(--wp--preset--color--base);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.wc-block-product-template .wc-block-product.outofstock .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--accent-4);
	color: var(--wp--preset--color--accent-4);
}
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--accent-3) !important;
	color: var(--wp--preset--color--base) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-size: 0.72rem !important;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Header: a narrower search bar on computers */
.tt-search { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Phones: two products per row and a shorter header */
@media (max-width: 600px) {
	.wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
	.wc-block-product-template .wc-block-product { padding: 0.6rem 0.6rem 0.8rem; }
	.wc-block-product-template .wp-block-post-title { font-size: 0.9rem; }
	.wc-block-product-template .wp-block-button__link { font-size: 0.85rem; padding: 0.5rem 0.6rem; }
	.tt-welcome { display: none; }
	.tt-topbar { justify-content: flex-end !important; padding-top: 0.3rem; padding-bottom: 0.3rem; }
	.tt-mainbar { padding-top: 0.6rem; padding-bottom: 0.6rem; }
	.tt-mainbar .wp-block-site-logo img { width: 180px !important; }
	.tt-searchbar { padding-bottom: 0.7rem; }
	.tt-hero-sub { font-size: 1rem; }
}
