/*
Theme Name: Tagaby
Theme URI: https://tagaby.com/
Author: Tagaby
Author URI: https://tagaby.com/
Description: WooCommerce-ready block theme for Tagaby shop. Matches main site look and feel (Tagaby yellow, black, white).
Requires at least: 6.5
Requires PHP: 7.4
Version: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tagaby
Tags: block-patterns, block-styles, full-site-editing, woocommerce, e-commerce, wide-blocks, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready

*/

/* Tagaby design tokens (align with frontend) */
:root {
	--tagaby-yellow: #FFC300;
	--tagaby-black: #000000;
	--tagaby-white: #FFFFFF;
	--tagaby-gray: #737373;
}

html {
	scroll-behavior: smooth;
}

/* Remove default block spacing that adds whitespace between header and content */
:where(.wp-site-blocks) > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

body {
	background: var(--tagaby-white);
	color: var(--tagaby-black);
	font-weight: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* WooCommerce body classes – keep content area light, never full‑page black */
body.woocommerce,
body.woocommerce-page,
body.woocommerce-cart,
body.woocommerce-checkout {
	background: var(--tagaby-white) !important;
}

.wp-site-blocks > *:not(.tagaby-header):not(.tagaby-footer) {
	background: var(--tagaby-white);
	/*padding-left: 1.5rem;
	padding-right: 1.5rem;*/
}

/* Primary button: yellow bg, black text, pill shape (frontend .btn-primary) */
.wp-block-button.is-style-primary .wp-block-button__link,
.tagaby-btn-primary {
	background-color: var(--tagaby-yellow) !important;
	color: var(--tagaby-black) !important;
	font-weight: 700;
	border-radius: 50px;
	padding: 0.75rem 2rem;
	border: none;
}

.wp-block-button.is-style-primary .wp-block-button__link:hover,
.tagaby-btn-primary:hover {
	background-color: #facc15 !important;
	color: var(--tagaby-black) !important;
}

/* Outline button: black border, black text (frontend .btn-outline) */
.wp-block-button.is-style-outline .wp-block-button__link,
.tagaby-btn-outline {
	background-color: transparent !important;
	color: var(--tagaby-black) !important;
	border: 2px solid var(--tagaby-black);
	font-weight: 700;
	border-radius: 50px;
	padding: 0.75rem 2rem;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.tagaby-btn-outline:hover {
	background-color: var(--tagaby-black) !important;
	color: var(--tagaby-white) !important;
}

/* Card / section rounded corners (frontend rounded-80) */
.tagaby-rounded-80 {
	border-radius: 80px;
}

.tagaby-rounded-50 {
	border-radius: 50px;
}

/* Shadow matching frontend .card-shadow */
.tagaby-card-shadow {
	box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.15);
}

/* Header: full rectangle, no radius, no gap below (match frontend nav) */
/* Sticky header: apply to template part wrapper (parent of .tagaby-header) so it sticks */
.wp-site-blocks > *:first-child:has(.tagaby-header),
.wp-site-blocks > .wp-block-template-part:has(.tagaby-header),
.wp-site-blocks > header:has(.tagaby-header) {
	position: sticky !important;
	top: 0 !important;
	z-index: 100 !important;
}

.tagaby-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-radius: 0 !important;
	box-shadow: none !important;
	margin-bottom: 0 !important;
}

/* Remove whitespace between header and main content */
.tagaby-header + * {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Header inner: single row, no wrapping (fix squished fullscreen layout) */
.tagaby-header-inner {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

.tagaby-header-inner .tagaby-header-logo {
	flex-shrink: 0;
}

.tagaby-header-inner .tagaby-header-nav {
	flex-shrink: 0;
}

.tagaby-header-inner .wp-block-buttons {
	flex-shrink: 0;
}

/* Contact button: prevent text wrap */
.tagaby-header .wp-block-button__link {
	white-space: nowrap !important;
}

/* Nav: stay in one row */
.tagaby-header-nav.wp-block-navigation .wp-block-navigation__container,
.tagaby-header-nav.wp-block-navigation ul {
	display: flex !important;
	flex-wrap: nowrap !important;
}

/* Header logo: icon + "Tagaby Shop" – same centering and spacing as frontend (gap-3 = 0.75rem) */
.tagaby-header-logo {
	align-items: center;
	gap: 0.75rem;
}

.tagaby-header-icon {
	margin: 0;
}

.tagaby-header-icon img {
	width: 32px;
	height: 32px;
	display: block;
}

.tagaby-header-title,
.tagaby-header p.has-tagaby-white-color a {
	color: var(--tagaby-white) !important;
	text-decoration: none;
	font-size: 24px;
	font-weight: 700;
	transition: color 0.2s ease;
}

.tagaby-header-title:hover,
.tagaby-header p.has-tagaby-white-color a:hover {
	color: var(--tagaby-yellow) !important;
}

/* Header nav: reduced gaps (was 3/2/5/6rem) */
.tagaby-header-nav.wp-block-navigation {
	gap: 2rem;
}

@media (min-width: 1024px) and (max-width: 1499px) {
	.tagaby-header-nav.wp-block-navigation {
		gap: 1.5rem;
	}
}

@media (min-width: 1500px) {
	.tagaby-header-nav.wp-block-navigation {
		gap: 2.5rem;
	}
}

@media (min-width: 1920px) {
	.tagaby-header-nav.wp-block-navigation {
		gap: 3rem;
	}
}

/* Header padding: frontend px-6 lg:px-25 (1.5rem, 6.25rem) */
@media (min-width: 1024px) {
	.tagaby-header {
		padding-left: 6.25rem !important;
		padding-right: 6.25rem !important;
	}
}

/* Header: white nav links, yellow hover (match frontend .nav-link) */
.tagaby-header a,
.tagaby-header .wp-block-navigation-item__content {
	color: var(--tagaby-white) !important;
	font-size: 18px;
	transition: color 0.2s ease;
}

.tagaby-header a:hover,
.tagaby-header .wp-block-navigation-item__content:hover {
	color: var(--tagaby-yellow) !important;
}

/* ==========================================================================
   Footer: match frontend exactly (pt-96, pb-16, px-6 lg:px-25, rounded-t-80px,
   grid 4 cols, gap-8 lg:gap-12, icon 64px, headings 24px bold mb-6, etc.)
   ========================================================================== */
.tagaby-footer {
	position: relative;
	z-index: 1;
	color: var(--tagaby-white);
}

.tagaby-footer,
.tagaby-footer p,
.tagaby-footer h3 {
	color: var(--tagaby-white);
}

.tagaby-footer a {
	color: var(--tagaby-white) !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tagaby-footer a:hover {
	color: var(--tagaby-yellow) !important;
}

/* Footer padding: frontend px-6 lg:px-25 */
@media (min-width: 1024px) {
	.tagaby-footer {
		padding-left: 6.25rem !important;
		padding-right: 6.25rem !important;
	}
}

/* Footer grid: max-w-7xl, grid-cols-1 md:2 xl:4, gap-8 lg:gap-12 */
.tagaby-footer-grid.wp-block-columns {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 768px) {
	.tagaby-footer-grid.wp-block-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1280px) {
	.tagaby-footer-grid.wp-block-columns {
		grid-template-columns: repeat(4, 1fr);
		gap: 3rem;
	}
}

/* Brand column: text-center md:text-left, icon 64px mb-6 */
.tagaby-footer-brand {
	text-align: center;
}

@media (min-width: 768px) {
	.tagaby-footer-brand {
		text-align: left;
	}
}

.tagaby-footer-logo-wrap {
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (min-width: 768px) {
	.tagaby-footer-logo-wrap {
		justify-content: flex-start;
	}
}

.tagaby-footer-icon {
	margin: 0 !important;
}

.tagaby-footer-icon img {
	width: 64px;
	height: 64px;
	display: block;
}

.tagaby-footer-brand > p {
	font-size: 16px;
	line-height: 1.75;
}

/* Quick links & other columns: text-center md:text-left */
.tagaby-footer-links,
.tagaby-footer-connected,
.tagaby-footer-newsletter {
	text-align: center;
}

@media (min-width: 768px) {
	.tagaby-footer-links,
	.tagaby-footer-connected,
	.tagaby-footer-newsletter {
		text-align: left;
	}
}

.tagaby-footer h3 {
	font-size: 24px !important;
	font-weight: 700 !important;
	margin-bottom: 1.5rem !important;
}

/* Footer list: no bullet points */
.tagaby-footer-list,
.tagaby-footer-list ul {
	list-style: none !important;
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.tagaby-footer-list li {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	list-style: none !important;
}

.tagaby-footer-list li::marker {
	content: none;
}

.tagaby-footer-list a {
	font-size: 16px;
}

.tagaby-footer-contact {
	font-size: 16px;
	margin-top: 1rem !important;
	margin-bottom: 1rem !important;
}

.tagaby-footer-dashicon {
	color: var(--tagaby-yellow);
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin-right: 0.5rem;
	vertical-align: middle;
	display: inline-block;
}

/* Divider: full width, border-t tagaby-yellow, mt-16 pt-8 */
.tagaby-footer-divider {
	height: 2px !important;
	background: var(--tagaby-yellow) !important;
	border: none !important;
	margin-top: 4rem !important;
	margin-bottom: 2rem !important;
	padding: 0 !important;
	opacity: 1 !important;
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* Bottom bar: flex justify-between items-center */
.tagaby-footer-bottom {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	display: flex !important;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.tagaby-footer-bottom p {
	margin: 0;
	font-size: 16px;
}

.tagaby-footer-highlight {
	color: var(--tagaby-yellow) !important;
	font-weight: 700;
}

/* CTA overflow into footer (like frontend SharedCTA -mb-72, mx-6 lg:mx-25) – on top of footer */
.tagaby-cta-overflow {
	position: relative;
	z-index: 30;
	isolation: isolate;
	margin-bottom: -18rem !important;
	margin-left: 1.5rem;
	margin-right: 1.5rem;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
	.tagaby-cta-overflow {
		margin-left: 6.25rem;
		margin-right: 6.25rem;
	}
}

/* Hero on black: white outline button (frontend .btn-secondary) */
.tagaby-hero .wp-block-button.is-style-hero-outline .wp-block-button__link,
.tagaby-hero .wp-block-button.is-style-hero-outline .wp-block-button__link:hover {
	background-color: transparent !important;
	color: var(--tagaby-white) !important;
	border: 2px solid var(--tagaby-white);
	font-weight: 700;
	border-radius: 50px;
}

.tagaby-hero .wp-block-button.is-style-hero-outline .wp-block-button__link:hover {
	background-color: var(--tagaby-white) !important;
	color: var(--tagaby-black) !important;
}

/* ==========================================================================
   Main content area – light background so pages never feel like a black void
   ========================================================================== */
.wp-block-group:not(.tagaby-hero):not(.tagaby-header):not(.tagaby-footer) {
	--tagaby-content-bg: #fafafa;
}

main .wp-block-group,
.wp-block-post-content,
.entry-content,
.wc-block-components-main {
	background: var(--tagaby-white);
	min-height: 40vh;
}

/* Content area padding is set in .wp-site-blocks rule above */

/* ==========================================================================
   WooCommerce – shop, cart, checkout, products, empty state
   ========================================================================== */

/* WooCommerce primary buttons (Add to cart, Place order, etc.) */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button,
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
	background-color: var(--tagaby-yellow) !important;
	color: var(--tagaby-black) !important;
	border: none !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
	padding: 0.75rem 2rem !important;
	transition: background-color 0.2s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:hover {
	background-color: #facc15 !important;
	color: var(--tagaby-black) !important;
}

/* WooCommerce secondary/alt buttons */
.woocommerce a.button.alt,
.woocommerce .cart .button {
	background-color: var(--tagaby-black) !important;
	color: var(--tagaby-white) !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
}

.woocommerce a.button.alt:hover {
	background-color: #333 !important;
	color: var(--tagaby-white) !important;
}

/* Product grid cards */
.woocommerce ul.products li.product,
.wc-block-grid__product {
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.woocommerce ul.products li.product:hover,
.wc-block-grid__product:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
	border-color: var(--tagaby-yellow);
}

.woocommerce ul.products li.product .button,
.wc-block-grid__product .wp-block-button__link {
	border-radius: 50px !important;
	font-weight: 700 !important;
}

/* Cart table */
.woocommerce-cart-form .shop_table,
.woocommerce table.shop_table {
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.woocommerce-cart-form .shop_table th,
.woocommerce table.shop_table th {
	background: var(--tagaby-black);
	color: var(--tagaby-white);
	font-weight: 700;
	padding: 1rem 1.25rem;
}

.woocommerce-cart-form .shop_table td,
.woocommerce table.shop_table td {
	padding: 1rem 1.25rem;
	border-color: rgba(0, 0, 0, 0.06);
}

.woocommerce-cart-form .shop_table tbody tr:nth-child(even),
.woocommerce table.shop_table tbody tr:nth-child(even) {
	background: rgba(0, 0, 0, 0.02);
}

/* Cart totals / checkout sidebar */
.woocommerce .cart_totals,
.woocommerce-checkout-review-order,
.wc-block-components-totals-wrapper {
	border-radius: 24px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.woocommerce .cart_totals h2,
.woocommerce-checkout-review-order-table thead th {
	background: var(--tagaby-black);
	color: var(--tagaby-white);
	padding: 1rem 1.25rem;
	font-weight: 700;
	margin: 0;
}

/* Notices (success, error, info) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	border-radius: 16px;
	padding: 1rem 1.25rem;
	border-left-width: 4px;
	font-weight: 500;
}

.woocommerce-message,
.wc-block-components-notice-banner.is-success {
	background: rgba(255, 195, 0, 0.15);
	border-left-color: var(--tagaby-yellow);
	color: var(--tagaby-black);
}

.woocommerce-info,
.wc-block-components-notice-banner.is-info {
	background: rgba(0, 0, 0, 0.04);
	border-left-color: var(--tagaby-gray);
	color: var(--tagaby-black);
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
	background: rgba(0, 0, 0, 0.04);
	border-left-color: #b91c1c;
	color: var(--tagaby-black);
}

/* Empty state – “no products” / “clearing filters” / “store’s home” */
.woocommerce-info--no-products,
.wc-block-product-results__no-results,
.wc-block-all-products,
.woocommerce .woocommerce-info,
.woocommerce-info,
p.woocommerce-info,
.wp-block-woocommerce-product-results .wc-block-product-results__no-results {
	text-align: center !important;
	max-width: 36rem !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 2.5rem 2rem !important;
	border-radius: 24px !important;
	background: var(--tagaby-white) !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
	color: var(--tagaby-black) !important;
}

.woocommerce-info a,
.wc-block-product-results__no-results a,
.wc-block-all-products a,
p.woocommerce-info a,
.wp-block-woocommerce-product-results a {
	color: var(--tagaby-yellow) !important;
	font-weight: 700 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
}

.woocommerce-info a:hover,
.wc-block-product-results__no-results a:hover,
.wp-block-woocommerce-product-results a:hover {
	color: var(--tagaby-black) !important;
}

/* Checkout form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.wc-block-components-text-input input {
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	padding: 0.75rem 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.wc-block-components-text-input input:focus {
	border-color: var(--tagaby-yellow);
	box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.2);
	outline: none;
}

/* Breadcrumbs */
.woocommerce-breadcrumb {
	color: var(--tagaby-gray);
	font-size: 0.9rem;
	padding: 0.75rem 0;
}

.woocommerce-breadcrumb a {
	color: var(--tagaby-black);
	font-weight: 500;
}

.woocommerce-breadcrumb a:hover {
	color: var(--tagaby-yellow);
}

/* Prices */
.woocommerce .amount,
.wc-block-components-product-price__value {
	font-weight: 700;
	color: var(--tagaby-black);
}

/* Pagination */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border-radius: 12px;
	padding: 0.5rem 1rem;
	font-weight: 600;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--tagaby-yellow);
	color: var(--tagaby-black);
	border-color: var(--tagaby-yellow);
}

/* Global links outside header/footer – accent color */
body a:not(.wp-block-button__link):not(.tagaby-header a):not(.tagaby-footer a) {
	color: var(--tagaby-black);
	transition: color 0.2s ease;
}

body a:not(.wp-block-button__link):not(.tagaby-header a):not(.tagaby-footer a):hover {
	color: var(--tagaby-yellow);
}

/* Block editor / FSE: ensure empty state messages look like content, not raw black */
.wc-block-product-results__no-results,
.wp-block-woocommerce-product-results {
	background: var(--tagaby-white);
	padding: 3rem 2rem;
	border-radius: 24px;
	margin: 2rem auto;
	max-width: 1280px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   WooCommerce Product Collection block (shop archive)

   The theme has no archive-product.html, so /shop/ renders WooCommerce's stock
   block template. That markup is ul.wc-block-product-template > li.wc-block-product
   and is NOT matched by the classic `ul.products li.product` or the legacy
   `.wc-block-grid__product` selectors above, which is why the shop archive was
   showing unstyled default cards. Selectors below match the live markup.
   ========================================================================== */

/* Reclaim the top of the shop page.
   The stock template stacks a breadcrumb, a huge "Shop" title, a result count and
   a sorting dropdown above the products. The logo already says "Tagaby Shop" and
   the page is reached from a Shop link, so all of it is redundant chrome. */
body.post-type-archive-product .woocommerce-breadcrumb,
body.post-type-archive-product .wp-block-woocommerce-breadcrumbs,
body.post-type-archive-product .wc-block-product-results-count,
body.post-type-archive-product .woocommerce-result-count,
body.post-type-archive-product .wc-block-catalog-sorting,
body.post-type-archive-product .woocommerce-ordering {
	display: none !important;
}

/* Keep a page title so the grid does not start mid-air, but at a sane size:
   the stock one rendered ~75px with a large reserved band beneath it. */
body.post-type-archive-product .wp-block-query-title,
body.post-type-archive-product h1.wp-block-post-title {
	display: block !important;
	font-size: clamp(2rem, 4vw, 2.75rem) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	color: var(--tagaby-black) !important;
	/* Centred, matching tagaby.com's centred page headings */
	text-align: center !important;
	margin: 3rem auto 0 !important;
	padding: 0 0 0.75rem !important;
	min-height: 0 !important;
}

/* Yellow rule under the title, echoing the brand accent */
body.post-type-archive-product .wp-block-query-title::after,
body.post-type-archive-product h1.wp-block-post-title::after {
	content: '';
	display: block;
	width: 64px;
	height: 4px;
	margin: 0.75rem auto 0;
	border-radius: 2px;
	background: var(--tagaby-yellow);
}

/* ==========================================================================
   Space between content and footer

   .tagaby-footer carries padding-top: 24rem so the front page's yellow CTA card
   can overflow into it. Shop pages have no CTA, so that padding renders as a
   huge empty black band while the listing itself sits flush against the footer.
   Give the content breathing room and drop the footer padding to a normal value
   on pages that have no overflowing CTA.
   ========================================================================== */
body.post-type-archive-product main,
body.single-product main,
body.woocommerce-cart main,
body.woocommerce-checkout main {
	padding-bottom: 6rem !important;
}

body.post-type-archive-product .tagaby-footer,
body.single-product .tagaby-footer,
body.woocommerce-cart .tagaby-footer,
body.woocommerce-checkout .tagaby-footer {
	padding-top: 5rem !important;
}

/* Footer wordmark, sized like tagaby.com's (h-20 = 5rem) */
.tagaby-footer .tagaby-footer-logo img {
	height: 5rem !important;
	width: auto !important;
	max-width: 100% !important;
}

/* Tighten what is left at the top of the archive */
body.post-type-archive-product .wp-block-woocommerce-store-notices:empty {
	display: none !important;
}

/* The result-count/sorting row is a flex group carrying an editor-set
   min-height of ~445px. Hiding its children left a tall empty band, so drop the
   row itself. :has() targets only the group that actually held that toolbar. */
body.post-type-archive-product main > .wp-block-group:has(.wc-block-catalog-sorting),
body.post-type-archive-product main > .wp-block-group:has(.wc-block-product-results-count),
body.post-type-archive-product main > .wp-block-group:has(.woocommerce-ordering) {
	display: none !important;
}

/* Fallback for engines without :has() - collapse the reserved height at least. */
body.post-type-archive-product main > .wp-block-group.is-content-justification-space-between {
	min-height: 0 !important;
}

/* Pull the product grid up under the header */
body.post-type-archive-product .wp-block-woocommerce-product-collection {
	margin-top: 2.5rem !important;
}

/* Product grid: smaller, denser cards instead of one huge listing */
ul.wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
	gap: 1.75rem !important;
	padding: 0 !important;
	margin: 1.5rem 0 0 !important;
	list-style: none !important;
}

/* Product card */
li.wc-block-product {
	background: var(--tagaby-white);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 24px;
	overflow: hidden;
	padding: 0 0 1.5rem !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

li.wc-block-product:hover {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
	border-color: var(--tagaby-yellow);
	transform: translateY(-4px);
}

/* Product image: flush to the card's top corners */
li.wc-block-product .wc-block-components-product-image,
li.wc-block-product .wp-block-woocommerce-product-image {
	margin: 0 0 1.25rem !important;
}

li.wc-block-product .wc-block-components-product-image img,
li.wc-block-product .wp-block-woocommerce-product-image img {
	width: 100% !important;
	height: auto !important;
	max-height: 240px !important;
	border-radius: 0 !important;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: rgba(0, 0, 0, 0.03);
}

/* Product title */
li.wc-block-product .wp-block-post-title {
	padding: 0 1.25rem !important;
	margin: 0 0 0.5rem !important;
	font-weight: 700 !important;
	color: var(--tagaby-black) !important;
	line-height: 1.35 !important;
}

li.wc-block-product .wp-block-post-title a {
	color: var(--tagaby-black) !important;
	text-decoration: none !important;
}

li.wc-block-product .wp-block-post-title a:hover {
	color: var(--tagaby-yellow) !important;
}

/* Price */
li.wc-block-product .wc-block-components-product-price {
	display: block;
	padding: 0 1.25rem !important;
	margin: 0 0 1.25rem !important;
	font-weight: 700 !important;
	color: var(--tagaby-black) !important;
}

/* Add to cart button inside a card */
li.wc-block-product .wp-block-button__link,
li.wc-block-product a.add_to_cart_button,
li.wc-block-product .wc-block-components-product-button__button {
	display: inline-block !important;
	margin: 0 1.25rem !important;
	background-color: var(--tagaby-yellow) !important;
	color: var(--tagaby-black) !important;
	border: none !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
	padding: 0.7rem 1.75rem !important;
	transition: background-color 0.2s ease;
}

li.wc-block-product .wp-block-button__link:hover,
li.wc-block-product a.add_to_cart_button:hover,
li.wc-block-product .wc-block-components-product-button__button:hover {
	background-color: #facc15 !important;
	color: var(--tagaby-black) !important;
}

/* Sale badge */
li.wc-block-product .wc-block-components-product-sale-badge {
	background: var(--tagaby-black) !important;
	color: var(--tagaby-yellow) !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
	border: none !important;
}

/* ==========================================================================
   Header cart

   The cart icon renders its SVG with fill="currentColor", which resolved to a
   dark colour inside the black header and left it effectively invisible.
   ========================================================================== */

/* No customer accounts on this store. The block is removed from header.html,
   but the live header can also be served from a template part stored in the
   database, so hide it here too rather than relying on the file alone. */
.wp-block-woocommerce-customer-account,
.tagaby-header .wp-block-woocommerce-customer-account,
.tagaby-header .wc-block-customer-account {
	display: none !important;
}

/* Cart = the yellow pill, matching tagaby.com's yellow CTA slot. */
.tagaby-header .wc-block-mini-cart__button,
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__button {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.4rem !important;
	background-color: var(--tagaby-yellow) !important;
	color: var(--tagaby-black) !important;
	fill: currentColor !important;
	border: none !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
	/* Matches tagaby.com's yellow CTA (text-sm px-4 py-2) */
	padding: 0.5rem 0.9rem !important;
	line-height: 1 !important;
	opacity: 1 !important;
	transition: background-color 0.2s ease;
}

.tagaby-header .wc-block-mini-cart__button:hover,
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__button:hover {
	background-color: #facc15 !important;
	color: var(--tagaby-black) !important;
}

.tagaby-header .wc-block-mini-cart__icon {
	color: inherit !important;
	fill: currentColor !important;
}

.tagaby-header .wc-block-mini-cart__icon {
	width: 20px !important;
	height: 20px !important;
	flex: 0 0 auto !important;
}

/* Lay the icon and the count out as a row inside the pill. */
.tagaby-header .wc-block-mini-cart__quantity-badge {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.45rem !important;
	position: static !important;
	overflow: visible !important;
	width: auto !important;
	height: auto !important;
}

/* Item count.
   WooCommerce floats this absolutely at right: -8.5px with a translateY(-10px),
   which hangs it off the pill's rounded corner and over the cart icon. Pull it
   back into normal flow so it reads as "cart 2" inside the pill. */
.tagaby-header .wc-block-mini-cart__badge,
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__badge {
	position: static !important;
	inset: auto !important;
	transform: none !important;
	margin: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 1.15rem !important;
	height: 1.15rem !important;
	padding: 0 0.35rem !important;
	border-radius: 999px !important;
	background: var(--tagaby-black) !important;
	color: var(--tagaby-yellow) !important;
	font-size: 0.72rem !important;
	line-height: 1 !important;
	font-weight: 700 !important;
	border: none !important;
}

/* WooCommerce hides the badge on an empty cart via the [hidden] attribute. The
   !important display above would otherwise override that and show a "0". */
.tagaby-header .wc-block-mini-cart__badge[hidden],
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__badge[hidden] {
	display: none !important;
}

/* Keep the cart from being squashed by the nowrap header row */
.tagaby-header .wp-block-woocommerce-mini-cart {
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center !important;
}

/* ==========================================================================
   Mobile header

   The nav is set to overlayMenu:"mobile" so WordPress collapses the links into
   its own hamburger + overlay below 600px. Previously it was "never", which kept
   all seven links in a nowrap row; the header could not compress below ~1043px,
   so phones zoomed the whole page out to fit. These rules brand the hamburger
   and overlay, and make sure nothing else re-inflates the layout width.
   ========================================================================== */
@media (max-width: 781px) {
	/* Nothing in the header may force the page wider than the screen. */
	.tagaby-header-inner {
		flex-wrap: nowrap !important;
		gap: 0.5rem !important;
		max-width: 100% !important;
	}

	/* Order to match tagaby.com: logo … cart, then the menu button last.
	   Done with flex order rather than moving the nav in header.html, so the
	   desktop layout (logo, links centred, cart right) is untouched. */
	.tagaby-header-inner .tagaby-header-logo {
		order: 1 !important;
	}

	.tagaby-header-inner .wp-block-woocommerce-mini-cart {
		order: 2 !important;
		margin-left: auto !important;
	}

	.tagaby-header-inner .tagaby-header-nav {
		order: 3 !important;
		flex: 0 0 auto !important;
	}

	.tagaby-header {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* Shrink the wordmark so logo + hamburger + cart fit a narrow screen. */
	.tagaby-header-title {
		font-size: 18px !important;
	}

	.tagaby-header-icon img {
		width: 26px !important;
		height: 26px !important;
	}

	/* The off-canvas cart drawer must not contribute to document width. */
	.wc-block-mini-cart__drawer,
	.wc-block-components-drawer {
		max-width: 100vw !important;
	}
}

/* Hamburger button: white on the black header */
.tagaby-header .wp-block-navigation__responsive-container-open,
.tagaby-header .wp-block-navigation__responsive-container-close {
	color: var(--tagaby-white) !important;
	fill: currentColor !important;
	background-color: transparent !important;
	padding: 0.25rem !important;
}

/* Three-bar icon.
   WordPress ships a two-line menu glyph; tagaby.com uses a three-bar icon
   (heroicons Bars3Icon). Hide the built-in SVG and draw three bars so the two
   headers match. */
.tagaby-header .wp-block-navigation__responsive-container-open svg {
	display: none !important;
}

.tagaby-header .wp-block-navigation__responsive-container-open {
	width: 26px !important;
	height: 18px !important;
	box-sizing: content-box !important;
	background-image:
		linear-gradient(currentColor, currentColor),
		linear-gradient(currentColor, currentColor),
		linear-gradient(currentColor, currentColor) !important;
	background-size: 100% 2.5px !important;
	background-position: left top, left center, left bottom !important;
	background-repeat: no-repeat !important;
}

.tagaby-header .wp-block-navigation__responsive-container-open:hover,
.tagaby-header .wp-block-navigation__responsive-container-close:hover {
	color: var(--tagaby-yellow) !important;
}

.tagaby-header .wp-block-navigation__responsive-container-open svg,
.tagaby-header .wp-block-navigation__responsive-container-close svg {
	width: 26px !important;
	height: 26px !important;
	fill: currentColor !important;
}

/* Open overlay: black sheet, centred white links, yellow on hover */
.tagaby-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--tagaby-black) !important;
	color: var(--tagaby-white) !important;
	padding: 1.5rem !important;
}

.tagaby-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	justify-content: center !important;
	align-items: center !important;
}

.tagaby-header .wp-block-navigation__responsive-container.is-menu-open ul {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 1.5rem !important;
}

.tagaby-header .wp-block-navigation__responsive-container.is-menu-open a {
	color: var(--tagaby-white) !important;
	font-size: 20px !important;
}

.tagaby-header .wp-block-navigation__responsive-container.is-menu-open a:hover {
	color: var(--tagaby-yellow) !important;
}

/* Product Collection pagination */
.wp-block-query-pagination a,
.wc-block-product-collection-pagination a,
.wp-block-query-pagination .page-numbers {
	border-radius: 12px;
	padding: 0.5rem 1rem;
	font-weight: 600;
	color: var(--tagaby-black);
	text-decoration: none;
}

.wp-block-query-pagination a:hover,
.wc-block-product-collection-pagination a:hover,
.wp-block-query-pagination .page-numbers.current {
	background: var(--tagaby-yellow);
	color: var(--tagaby-black);
}
