/*
Theme Name: Appliance Store Child
Theme URI: https://example.com
Description: Black-and-gold catalogue design for Northline Commerce, an appliance store (New, Used and Open Box). Child theme of Twenty Twenty-Five, built for WooCommerce in catalogue mode.
Author: Sarath Peethambaran
Template: twentytwentyfive
Version: 0.5.2
Requires at least: 6.5
Text Domain: appliance-store-child
*/

:root {
	--asc-black: #111111;
	--asc-gold: #c9a13b;
	--asc-gold-light: #e6c66e;
	--asc-gold-dark: #8a6a1f;
	--asc-blue: #1d5fd0;
	--asc-green: #157a3c;
	--asc-amber: #f2a900;
	--asc-ink: #1b1b1b;
	--asc-muted: #66625a;
	--asc-light: #f7f5f0;
	--asc-line: #e8e3d8;
}

body {
	color: var(--asc-ink);
}

/* ---------- Spacing for sections ---------- */
.asc-header { padding: 1rem 2rem; }
.asc-hero { padding: 4.5rem 2rem; }
.asc-trust { padding: 1.5rem 2rem; }
.asc-featured { padding: 2.5rem 1rem; }
.asc-card { padding: 2rem; }
.asc-help { padding: 1.5rem 2rem; margin: 2rem auto; }
.asc-footer { padding: 2.5rem 2rem; margin-top: 2rem; }

/* ---------- Header ---------- */
.asc-header {
	border-bottom: 1px solid var(--asc-line);
}
.asc-header .wp-block-site-title a {
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.asc-header .wp-block-navigation a {
	text-decoration: none;
	font-weight: 500;
}
.asc-header .wp-block-navigation a:hover {
	color: var(--asc-gold-light);
}

/* ---------- Hero ---------- */
.asc-hero {
	background: linear-gradient(120deg, var(--asc-black) 0%, #2a2620 100%);
	color: #fff;
}
.asc-hero h1,
.asc-hero p {
	color: #fff;
}

/* ---------- Coloured category buttons ---------- */
.asc-btn-new .wp-block-button__link { background: var(--asc-blue); color: #fff; }
.asc-btn-used .wp-block-button__link { background: var(--asc-green); color: #fff; }
.asc-btn-open .wp-block-button__link { background: var(--asc-amber); color: #1a1a1a; }
.asc-btn-light .wp-block-button__link { background: #fff; color: var(--asc-black); }
.wp-block-button__link {
	border-radius: 8px;
	font-weight: 600;
	padding: 0.75em 1.4em;
}

/* ---------- Trust strip ---------- */
.asc-trust {
	background: var(--asc-light);
}
.asc-trust p {
	margin: 0;
}

/* ---------- Category cards ---------- */
.asc-card {
	border-radius: 12px;
	color: #fff;
	min-height: 220px;
}
.asc-card h3,
.asc-card p {
	color: #fff;
}
.asc-card-new { background: linear-gradient(160deg, #1d5fd0, #0f3a85); }
.asc-card-used { background: linear-gradient(160deg, #157a3c, #0f5a2c); }
.asc-card-open { background: linear-gradient(160deg, #f2a900, #b87a00); }

/* ---------- Help band ---------- */
.asc-help {
	background: #f7f1e3;
	border-radius: 12px;
}

/* ---------- Product cards (shop, home) ---------- */
.wp-block-woocommerce-product-template li,
.woocommerce ul.products li.product {
	border: 1px solid var(--asc-line);
	border-radius: 12px;
	padding: 1rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.wc-block-components-product-image,
.wp-block-woocommerce-product-image {
	position: relative;
}
.asc-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 2px 10px;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.6;
}
.asc-badge-new { background: var(--asc-blue); }
.asc-badge-used { background: var(--asc-green); }
.asc-badge-open-box { background: var(--asc-amber); color: #1a1a1a; }
.asc-badge-sold {
	left: auto;
	right: 8px;
	background: #b3261e;
}
.asc-condition {
	margin: 0.75rem 0 0.5rem;
	font-weight: 600;
}
.asc-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 700;
	color: #fff;
}
.asc-pill.asc-badge-open-box { color: #1a1a1a; }
.asc-status {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0.25rem 0 0;
}
.asc-status-in { color: var(--asc-green); }
.asc-status-sold { color: #b3261e; }

/* ---------- Product page contact buttons (the .ask-buttons markup from the snippet) ---------- */
.ask-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1rem 0;
}
.ask-buttons a.button {
	display: inline-block;
	padding: 0.8em 1.4em;
	border-radius: 8px;
	background: var(--asc-blue);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.ask-buttons a.button:hover {
	opacity: 0.9;
}

/* ---------- Footer ---------- */
.asc-footer {
	background: var(--asc-black);
	color: #d9d4c8;
	border-top: 3px solid var(--asc-gold);
}
.asc-footer a { color: #fff; text-decoration: none; }
.asc-footer h4 { color: var(--asc-gold-light); }

/* ---------- Sticky contact bar (phones only) ---------- */
.asc-sticky {
	display: none;
}
@media (max-width: 781px) {
	.asc-sticky {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		gap: 0.5rem;
		padding: 0.5rem;
		background: #fff;
		border-top: 1px solid var(--asc-line);
	}
	.asc-sticky a {
		flex: 1;
		text-align: center;
		padding: 0.8em 0.5em;
		font-size: 0.95rem;
		white-space: nowrap;
		border-radius: 8px;
		color: #fff;
		font-weight: 600;
		text-decoration: none;
	}
	.asc-sticky a.asc-sticky-msgr { background: var(--asc-blue); }
	.asc-sticky a.asc-sticky-insta { background: linear-gradient(90deg, #c13584, #833ab4); }
	body { padding-bottom: 64px; }
}

/* ---------- Round 2 fixes ---------- */
/* Hide the page title on the home page (the hero is the title) */
.home .wp-block-post-title:not(.wc-block-product .wp-block-post-title) { display: none; }
.home main > .wp-block-group:first-child { padding-top: 0; }

/* Bolder headings */
h1, h2, h3, h4,
.wp-block-heading { font-weight: 700; letter-spacing: -0.01em; }
.asc-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; }
.asc-hero p { font-size: 1.2rem; opacity: 0.92; }

/* Trust strip: tidy and bold the first line */
.asc-trust .wp-block-columns { gap: 1.5rem; }
.asc-trust p { font-size: 0.95rem; line-height: 1.5; }
.asc-trust strong { font-weight: 700; font-size: 1.05rem; }

/* Equal-height category cards */
.wp-block-columns > .wp-block-column > .asc-card { height: 100%; box-sizing: border-box; }
.asc-card h3 { margin-top: 0; }
/* Category cards are Cover blocks (photo + colour overlay); keep the Shop buttons lined up along the bottom */
.asc-card.wp-block-cover { align-items: stretch; padding: 2rem; min-height: 260px; overflow: hidden; }
.asc-card .wp-block-cover__inner-container { display: flex; flex-direction: column; }
.asc-card .wp-block-cover__inner-container > .wp-block-buttons { margin-top: auto; padding-top: 1rem; }
.asc-card .wp-block-button__link { white-space: nowrap; }

/* Featured heading spacing */
.asc-featured h2 { margin-bottom: 1.25rem; }

/* Product titles: bold, not too large */
.wp-block-woocommerce-product-template .wp-block-post-title { font-size: 1.05rem; font-weight: 600; }
.wp-block-woocommerce-product-template .wp-block-post-title a { text-decoration: none; }

/* Round 3 (v2): remove the gap left by the hidden page title, without hiding the content */
.home .wp-block-group:has(> .wp-block-post-title) {
	padding-top: 0 !important;
	margin-top: 0 !important;
	row-gap: 0;
}
.home main { margin-top: 0 !important; }
.home .wp-block-post-content { margin-top: 0 !important; }
.home .wp-block-post-content > .asc-hero:first-child { margin-top: 0 !important; }

/* Footer text a bit smaller */
.asc-footer p { font-size: 1rem; line-height: 1.7; }
.asc-footer h4 { font-size: 1.1rem; font-weight: 700; }

/* Text pages (About, Contact, etc.): more room above section headings */
.wp-block-post-content > h2.wp-block-heading { margin-top: 2.5rem; }

/* ---------- Round 4: closer to the mockup ---------- */

/* Header: phone number + Message Us button (button hidden on phones, where the sticky bar does the job) */
.asc-header-contact { gap: 1rem; align-items: center; }
.asc-phone { margin: 0; font-weight: 600; }
.asc-phone a { color: #fff; text-decoration: none; }
.asc-header-btn .wp-block-button__link { padding: 0.55em 1.1em; font-size: 0.95rem; }
@media (max-width: 781px) {
	.asc-header-contact .asc-header-btn { display: none; }
	/* Even overlay on phones so the hero text stays readable */
	.asc-hero .wp-block-cover__background { background: rgba(17, 17, 17, 0.88) !important; }
}

/* Two product cards per row on phones */
@media (max-width: 600px) {
	.wc-block-product-template.wc-block-product-template__responsive { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem; }
	.wp-block-woocommerce-product-template li { padding: 0.6rem; }
	.wp-block-woocommerce-product-template .wp-block-post-title { font-size: 0.95rem; }
	.asc-ask { padding: 0.55em 0.4em; font-size: 0.85rem; }
}

/* Hero: Cover block with a photo behind a black overlay */
.asc-hero.wp-block-cover { min-height: 460px; }
.asc-hero .wp-block-cover__inner-container { max-width: 1100px; margin: 0 auto; }
.asc-hero h1,
.asc-hero p { max-width: 620px; }

/* Trust strip icons */
.asc-trust .wp-block-column { position: relative; padding-left: 52px; min-height: 40px; }
.asc-trust .wp-block-column::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #f3ead2;
}
.asc-trust .wp-block-column::after {
	content: "";
	position: absolute;
	left: 10px;
	top: 10px;
	width: 20px;
	height: 20px;
	background: var(--asc-gold-dark);
	-webkit-mask: var(--asc-icon) center / contain no-repeat;
	mask: var(--asc-icon) center / contain no-repeat;
}
.asc-trust .wp-block-column:nth-child(1) { --asc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.asc-trust .wp-block-column:nth-child(2) { --asc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1.1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }
.asc-trust .wp-block-column:nth-child(3) { --asc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h3l2-3h6l2 3h3a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E"); }
.asc-trust .wp-block-column:nth-child(4) { --asc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l2-5h14l2 5z'/%3E%3Cpath d='M5 9v11h14V9'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }

/* "Ask About This" button on product cards */
.asc-card-ask { margin: 0.75rem 0 0; }
.asc-ask {
	display: block;
	padding: 0.6em 0.8em;
	border-radius: 8px;
	background: var(--asc-black);
	color: #fff !important;
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.asc-ask:hover { opacity: 0.9; }

/* Instagram-style button (help band) */
.asc-btn-insta .wp-block-button__link { background: linear-gradient(90deg, #c13584, #833ab4); color: #fff; }

/* Footer social icons */
.asc-social { margin-top: 1rem; }

/* Shop and category pages: filter sidebar */
.asc-shop-layout { gap: 2rem; }
.asc-filters-col .wc-block-product-filters {
	border: 1px solid var(--asc-line);
	border-radius: 12px;
	padding: 1.25rem;
	background: #fff;
}
@media (min-width: 782px) {
	.asc-filters-col { position: sticky; top: 1rem; align-self: flex-start; }
}
@media (max-width: 781px) {
	.asc-filters-col .wc-block-product-filters { border: 0; padding: 0; }
}
.wp-block-woocommerce-product-template .asc-status { text-align: center; }

/* Brand and model line on the product page */
.asc-brand-model { margin: 0 0 0.5rem; color: var(--asc-muted); }
.asc-brand-model strong { color: var(--asc-ink); font-weight: 600; }
.asc-brand-model a { color: inherit; }

/* ---------- Northline Commerce branding: black header, gold accents ---------- */
.asc-header {
	background: var(--asc-black);
	border-bottom: 3px solid var(--asc-gold);
	color: #fff;
}
.asc-header .wp-block-site-title a,
.asc-footer .wp-block-site-title a {
	color: var(--asc-gold);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}
.asc-header .wp-block-site-title { font-size: 1.15rem; }
.asc-header .wp-block-navigation,
.asc-header .wp-block-navigation a,
.asc-header .wp-block-navigation__responsive-container-open,
.asc-header .wp-block-navigation__responsive-container-close { color: #fff; }
.asc-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--asc-black) !important; color: #fff !important; }
.asc-btn-gold .wp-block-button__link { background: var(--asc-gold); color: var(--asc-black); }
.asc-btn-gold .wp-block-button__link:hover { background: var(--asc-gold-light); }
.asc-ask:hover { background: var(--asc-gold-dark); opacity: 1; }

/* Product names stay dark; gold is for accents */
.wp-block-woocommerce-product-template .wp-block-post-title a { color: var(--asc-ink); }
.wp-block-woocommerce-product-template .wp-block-post-title a:hover { color: var(--asc-gold-dark); }

/* "Ask for price" shown for products without a price */
.asc-ask-price { font-weight: 600; color: var(--asc-gold-dark); }

/* Product cards: price, stock and Ask button sit at the bottom, so they line up across a row */
.wp-block-woocommerce-product-template li.wc-block-product { display: flex; flex-direction: column; }
.wp-block-woocommerce-product-template li.wc-block-product .wp-block-woocommerce-product-price { margin-top: auto; }
.asc-ask { white-space: nowrap; }

/* ---------- Branded "Coming soon" page (templates/coming-soon.html) ---------- */
body:has(.asc-coming-soon) { background: var(--asc-black); padding-bottom: 0; }
body:has(.asc-coming-soon) .asc-sticky { display: none !important; }
.asc-coming-soon {
	min-height: 100vh;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 3rem 1.5rem;
	background: radial-gradient(ellipse at center, #2a2620 0%, var(--asc-black) 70%);
	color: #d9d4c8;
}
.asc-coming-soon .asc-cs-logo img { max-width: 220px; height: auto; }
.asc-coming-soon .asc-cs-title {
	margin: 0;
	color: var(--asc-gold);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: clamp(2rem, 7vw, 3.6rem);
	font-weight: 700;
	line-height: 1.1;
}
.asc-coming-soon .asc-cs-tagline {
	margin: 0.75rem 0 0;
	color: var(--asc-gold-light);
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: clamp(0.8rem, 2.5vw, 1rem);
}
.asc-coming-soon .asc-cs-line {
	width: 80px;
	margin: 2rem auto !important;
	border: 0;
	border-top: 2px solid var(--asc-gold);
	opacity: 1;
}
.asc-coming-soon .asc-cs-heading { margin: 0; color: #fff; font-size: clamp(1.4rem, 4.5vw, 2.2rem); }
.asc-coming-soon .asc-cs-text { margin: 1rem auto 0; max-width: 520px; font-size: 1.05rem; }

/* ---------- Logo ---------- */
.asc-logo { margin: 0; line-height: 0; }
.asc-logo img { width: 190px; height: auto; display: block; }
.asc-logo-footer img { width: 170px; }
@media (max-width: 781px) {
	.asc-header .asc-logo img { width: 150px; }
}
.asc-coming-soon .asc-cs-logo { margin: 0 auto 0.5rem; line-height: 0; }
.asc-coming-soon .asc-cs-logo img { width: min(240px, 70vw); height: auto; }

/* ---------- WhatsApp ---------- */
.ask-buttons a.button.asc-btn-wa,
.asc-btn-whatsapp .wp-block-button__link { background: #25d366; color: #0b3d1f; }
.ask-buttons a.button.asc-btn-ig { background: linear-gradient(90deg, #c13584, #833ab4); color: #fff; }
@media (max-width: 781px) {
	.asc-sticky a.asc-sticky-wa { background: #25d366; color: #0b3d1f; }
}

/* ---------- Pre-staging test fixes (contrast, tap targets) ---------- */
/* Open Box card: dark text on amber for readable contrast */
.asc-card-open h3,
.asc-card-open p { color: #1a1a1a; }
/* "Filter products" button on phones: a comfortable 44px tap target */
.wc-block-product-filters__open-overlay { min-height: 44px; padding: 0.5rem 0.75rem; }



/* ---------- Mobile fixes found on the live site (0.5.1) ---------- */
/* Home: no gap between the header and the hero */
.home main .wp-block-group:has(> .wp-block-post-content) { padding-top: 0 !important; margin-top: 0 !important; }
/* Product page: SKU, category and tags wrap instead of squashing */
.wp-block-woocommerce-product-meta .wp-block-group { flex-wrap: wrap !important; row-gap: 0.25rem; }
.wp-block-woocommerce-product-meta .wp-block-group > * { flex: 0 1 auto !important; min-width: 0; }
.wp-block-woocommerce-product-meta .wc-block-components-product-sku { white-space: nowrap; }
/* Related products: two per row on phones */
@media (max-width: 600px) {
	.wc-block-product-template.is-flex-container { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem; }
	.wc-block-product-template.is-flex-container > li { width: auto !important; max-width: none !important; margin: 0 !important; }
}



/* ---------- Tidier phone layout (0.5.2) ---------- */
@media (max-width: 600px) {
	/* Hero and help buttons: all the same width */
	.asc-hero .wp-block-buttons,
	.asc-help .wp-block-buttons { flex-direction: column; align-items: stretch; gap: 0.6rem; }
	.asc-hero .wp-block-button,
	.asc-help .wp-block-button { width: 100%; }
	.asc-hero .wp-block-button__link,
	.asc-help .wp-block-button__link,
	.ask-buttons a.button { display: block; width: 100%; box-sizing: border-box; text-align: center; padding: 0.65em 1em; font-size: 1rem; }
	/* Category cards: shorter */
	.asc-card.wp-block-cover { min-height: 170px !important; padding: 1.25rem 1.5rem; }
	.asc-card h3 { margin-bottom: 0.25rem; }
	.asc-card p { margin: 0; }
	.asc-card .wp-block-button__link { padding: 0.55em 1.1em; font-size: 0.95rem; }
	/* Sticky bar: slimmer, still a comfortable 44px tap target */
	.asc-sticky { gap: 0.4rem; padding: 0.4rem; }
	.asc-sticky a { padding: 0.7em 0.4em; font-size: 0.9rem; min-height: 44px; box-sizing: border-box; }
}



/* Mobile menu: bigger tap rows, left-aligned, larger close button (0.5.2) */
.asc-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1rem 1.5rem !important; }
.asc-header .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch !important; padding-top: 3rem !important; }
.asc-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; }
.asc-header .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.asc-header .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 0.9rem 0 !important; font-size: 1.2rem; text-align: left; box-sizing: border-box; }
.asc-header .is-menu-open .wp-block-navigation-item__content:focus { outline: none; color: var(--asc-gold-light); }
.asc-header .wp-block-navigation__responsive-container-close { padding: 0.6rem; margin: -0.6rem; }
.asc-header .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
