/*
Theme Name: SPN — Đại lý sơn
Theme URI: https://demo.sonphucnguyen.com
Description: Block theme FSE độc lập cho đại lý sơn ô tô. Classic đen-đỏ-trắng, font Varela Round + Be Vietnam Pro (hỗ trợ tiếng Việt).
Author: SPN
Author URI: https://demo.sonphucnguyen.com
Version: 1.2.3
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spn-dai-ly-son
Tags: block-templates, full-site-editing, one-column, wide-blocks
*/

/* Product card --------------------------------------------------------- */
.spn-product-card {
	transition: transform .2s ease, box-shadow .2s ease;
	border: 1px solid var(--wp--preset--color--surface);
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
}
.spn-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(17, 17, 17, 0.08);
	border-color: var(--wp--preset--color--accent);
}
.spn-product-card .wp-block-post-featured-image {
	overflow: hidden;
}
.spn-product-card .wp-block-post-featured-image img {
	transition: transform .35s ease;
	width: 100%;
	height: auto;
	display: block;
}
.spn-product-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* Category card (homepage / categories-showcase pattern) --------------- */
.spn-cat-card {
	display: block;
	padding: 1.5rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--surface);
	border-radius: 8px;
	text-align: center;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.spn-cat-card:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
	text-decoration: none;
}

/* Single product price + SKU ------------------------------------------ */
.spn-price {
	font-family: var(--wp--preset--font-family--varela-round);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--wp--preset--color--accent);
	margin: 0;
	line-height: 1.2;
}
.spn-sku {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--neutral);
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}

/* Header search compact ------------------------------------------------ */
.spn-header-search .wp-block-search__inside-wrapper {
	border: 1px solid #E5E7EB;
	border-radius: 999px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.spn-header-search .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}
.spn-header-search .wp-block-search__input,
.spn-header-search .wp-block-search__input:focus {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	padding: 0.5rem 0.875rem;
	font-size: 0.875rem;
	min-width: 180px;
	background: transparent;
}
.spn-header-search .wp-block-search__button {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 0;
	padding: 0.5rem 0.875rem;
	transition: background-color .15s ease;
}
.spn-header-search .wp-block-search__button:hover,
.spn-header-search .wp-block-search__button:focus-visible {
	background: var(--wp--preset--color--accent);
	outline: 0;
}
.spn-header-search .wp-block-search__button:focus-visible {
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--base);
}

/* Header actions ------------------------------------------------------- */
.spn-actions { gap: 0.75rem; }

/* Sticky header: CSS đã chuyển sang global styles (Site Editor → Styles
   → CSS bổ sung) để không bị Cloudflare cache theo file. */

/* Phone CTA icon ------------------------------------------------------- */
.wp-block-button__link[href^="tel:"]::before {
	content: "☎";
	color: #FFD700;
	margin-right: 0.4em;
	font-weight: 400;
	font-size: 1.1em;
	vertical-align: -0.05em;
}
