/*
Theme Name:   Echoed
Theme URI:    https://echoed.local
Description:  Child theme for the Echoed storefront. Blocksy handles the storefront chrome (mega menu, quick view, variation swatches, off-canvas cart); this layer carries Echoed's own type, design tokens and template overrides so nothing is lost when Blocksy updates.
Author:       Growtify — Development Dept (Humax Global Ltd t/a Echoed)
Template:     blocksy
Version:      0.1.0
Text Domain:  echoed
Tags:         e-commerce, woocommerce
*/

/* Design tokens live in theme.json, not here — nine palette slugs plus a fluid
   type scale. This file carries only what tokens cannot express: overrides
   against Blocksy's defaults, and front-page layout decisions.

   Palette adopted from the reference site by CEO decision, 2026-09-04.
   Type: Jost, self-hosted variable font, loaded via assets/css/fonts.css. */

/* ---------------------------------------------------------------------------
   Front page
   The homepage carries its own hero, so Blocksy's generic page-title band is
   redundant there — it pushed a bare "Home" heading above the hero.
   --------------------------------------------------------------------------- */
.home .hero-section {
	display: none;
}

/* ---------------------------------------------------------------------------
   Links
   Blocksy's defaults land on its own blue. Echoed's palette reserves colour for
   product and price, so navigation and body links sit in ink and pick up bronze
   on hover.
   --------------------------------------------------------------------------- */
.ct-menu-link,
.entry-content a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--ink);
}

.ct-menu-link:hover,
.entry-content a:not(.wp-block-button__link):hover {
	color: var(--wp--preset--color--bronze);
}

/* ---------------------------------------------------------------------------
   Product sections on the homepage
   --------------------------------------------------------------------------- */
.wp-block-woocommerce-product-category,
.wp-block-woocommerce-product-best-sellers,
.wp-block-woocommerce-product-categories {
	margin-block: 0;
}

.entry-content > h2 {
	margin-block-end: 2rem;
}

/* Sale badge is the one place the hot accent is allowed. */
.woocommerce span.onsale {
	background-color: var(--wp--preset--color--sale);
	color: var(--wp--preset--color--ground);
}

/* ---------------------------------------------------------------------------
   Category buying guides
   Placed below the product grid: shoppers want products first, the guide is
   for the ones still deciding (and for search engines).
   --------------------------------------------------------------------------- */
.echoed-category-copy {
	max-width: 760px;
	margin: 4rem auto 0;
	padding-top: 3rem;
	border-top: 1px solid var(--wp--preset--color--surface);
}

.echoed-category-copy h3 {
	margin-top: 2rem;
	font-size: 1.25rem;
}

.echoed-category-copy p {
	line-height: 1.7;
}

.echoed-category-intro {
	max-width: 680px;
	margin: 0 auto 2.5rem;
	text-align: center;
}

/* ---------------------------------------------------------------------------
   Legal bar
   --------------------------------------------------------------------------- */
.echoed-legal-bar {
	border-top: 1px solid var(--wp--preset--color--surface);
	padding: 1.5rem 1rem;
	background: var(--wp--preset--color--ground);
}

.echoed-legal-bar ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.echoed-legal-bar a {
	color: var(--wp--preset--color--ink-muted);
	font-size: 0.8125rem;
	text-decoration: none;
}

.echoed-legal-bar a:hover {
	color: var(--wp--preset--color--ink);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Consumer-rights notices
   --------------------------------------------------------------------------- */
.echoed-engraving-notice {
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border-left: 3px solid var(--wp--preset--color--bronze);
	background: var(--wp--preset--color--surface);
	font-size: 0.8125rem;
	line-height: 1.55;
}

.echoed-engraving-notice p { margin: 0; }

.echoed-withdrawal-button {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--ink-muted);
	border-radius: 3px;
	color: var(--wp--preset--color--ink);
	font-size: 0.8125rem;
	text-decoration: none;
}

.echoed-withdrawal-button:hover {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--surface);
}

.echoed-withdrawal-form { max-width: 520px; }
.echoed-withdrawal-form .echoed-field { margin-bottom: 1.1rem; }
.echoed-withdrawal-form label { display: block; margin-bottom: 0.3rem; font-weight: 500; }
.echoed-withdrawal-form input,
.echoed-withdrawal-form textarea { width: 100%; padding: 0.55rem 0.7rem; }
.echoed-withdrawal-form .echoed-note {
	padding: 0.85rem 1rem;
	background: var(--wp--preset--color--surface);
	font-size: 0.8125rem;
}

/* Honeypot — hidden from people, reachable by bots. */
.echoed-hp {
	position: absolute !important;
	left: -9999px !important;
}

.echoed-withdraw-confirm {
	padding: 0.75rem 1.5rem;
	border: 0;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ground);
	cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Header logo
   The logo already carries the ECHOED wordmark, so the site title beside it
   said the name twice. Hide the text and let the mark do the work.
   --------------------------------------------------------------------------- */
.site-title,
.ct-header [data-id="logo"] .site-title {
	display: none !important;
}

.ct-header [data-id="logo"] img,
img.default-logo,
img.custom-logo {
	max-height: 104px;
	width: auto;
}

@media (max-width: 768px) {
	.ct-header [data-id="logo"] img,
	img.default-logo,
	img.custom-logo {
		max-height: 68px;
	}
}

/* ---------------------------------------------------------------------------
   Product thumbnails
   Blocksy applies aspect-ratio 4/3 to product images. Every Echoed photograph
   is square, so a landscape box with object-fit: cover was slicing the top and
   bottom off each product. The files themselves are fine — 300x300 and 600x600
   — so this is a framing fix, not a regeneration.
   --------------------------------------------------------------------------- */
.products .ct-media-container,
.products .ct-media-container img,
.wc-block-grid__product-image img,
.wp-block-woocommerce-product-category img,
ul.products li.product img {
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
	object-fit: cover;
}

/* The single-product gallery is square too. */
.woocommerce-product-gallery__image img {
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
}

/* ---------------------------------------------------------------------------
   Logo sizing, properly
   Blocksy fixes .site-logo-container to 50px and the image takes height:inherit
   from it, so a max-height on the image alone never applied. The container is
   what has to grow. The mark is portrait, so height drives everything.
   --------------------------------------------------------------------------- */
.site-logo-container {
	height: 92px !important;
}

.site-logo-container img,
.site-logo-container svg,
.site-logo-container picture {
	height: 100% !important;
	max-height: none !important;
	width: auto !important;
	object-fit: contain;
}

@media (max-width: 768px) {
	.site-logo-container {
		height: 58px !important;
	}
}

/* ---------------------------------------------------------------------------
   Single-product gallery
   Blocksy renders it as figure.ct-media-container at aspect-ratio 3/4 with
   overflow:hidden and object-fit:cover — a portrait box. The earlier rule
   targeted .woocommerce-product-gallery__image img, which is WooCommerce's
   markup, not Blocksy's, so it never applied and square photographs were still
   being cropped top and bottom.
   --------------------------------------------------------------------------- */
.single-product .ct-media-container,
.single-product .ct-media-container img,
.ct-product-gallery-container .ct-media-container,
.ct-product-gallery-container .ct-media-container img,
.flexy-container .ct-media-container,
.flexy-container .ct-media-container img {
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
}

.single-product .ct-media-container img {
	object-fit: contain;
	background: var(--wp--preset--color--surface, #edeef2);
}
