/*
Theme Name: AVM Child
Template: storefront
Description: Custom child theme for the vape store build.
Version: 1.0.0
Text Domain: avm-child
*/

/* Storefront renders a second "handheld" nav (wp_nav_menu with no menu
 * assigned to that location falls back to listing every page) — meant to
 * be hidden on desktop and shown only on mobile via JS/breakpoint. Forcing
 * it explicitly since it was rendering visibly on all screen sizes. */
.handheld-navigation {
	display: none;
}

@media (max-width: 921px) {
	.handheld-navigation {
		display: block;
	}
}

:root {
	--avm-primary: #0f57fb;
	--avm-primary-dark: #243673;
	--avm-primary-light: #f3f7ff;
	--avm-text: #21252f;
	--avm-muted: #484c50;
	--avm-bg: #ffffff;
	--avm-border: #e2e2e2;
}

body {
	color: var(--avm-text);
	font-family: 'Work Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.avm-hero-content h1,
.avm-section-heading h2 {
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
}

.main-navigation ul li a,
a.button,
button.button,
input.button {
	font-family: 'Poppins', sans-serif;
}

a {
	color: var(--avm-primary);
}

a:hover {
	color: var(--avm-primary-dark);
}

/* Top announcement bar — dark, matching the reference site's actual header
 * treatment (confirmed via screenshot, not just parsed CSS). */
.avm-announce-bar {
	background: #0a0e14;
	color: #fff;
	text-align: center;
	font-size: 0.85rem;
	padding: 8px 12px;
	letter-spacing: 0.02em;
}

/* Header — solid dark bar site-wide, white text/logo/nav, matching the
 * reference site (their header is not white, and not transparent-over-hero
 * — it's a permanent dark bar on every page). */
.site-header {
	background: #0a0e14;
	border-bottom: none;
}

.main-navigation,
.storefront-primary-navigation {
	background: #0a0e14;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.storefront-primary-navigation::after {
	content: "";
	display: table;
	clear: both;
}

#masthead .storefront-primary-navigation,
#masthead .storefront-primary-navigation .col-full,
#masthead #site-header-cart {
	background-color: #0a0e14 !important;
}

#masthead.site-header a,
#masthead .main-navigation ul li a,
#masthead .site-title a,
#masthead .site-title,
#masthead .site-description,
#masthead .site-header-cart a {
	color: #ffffff !important;
}

#masthead .main-navigation ul li a:hover {
	color: var(--avm-primary) !important;
}

.storefront-primary-navigation {
	background: #fff;
	border-top: 1px solid var(--avm-border);
}

.main-navigation ul li a {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.85rem;
}

.site-header-cart .cart-contents,
a.cart-contents {
	color: var(--avm-text);
}

.site-header-cart .amount {
	color: var(--avm-primary);
}

/* Buttons */
a.button,
button.button,
input.button,
a.button.avm-btn {
	background-color: var(--avm-primary);
	color: #fff;
	border-radius: 4px;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.03em;
	padding: 0.9em 1.6em;
	border: none;
}

a.button:hover,
button.button:hover,
input.button:hover {
	background-color: var(--avm-primary-dark);
	color: #fff;
}

/* Hero - full-bleed background image with color overlay */
.avm-hero {
	position: relative;
	min-height: 80vh;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 60px 5%;
}

.avm-hero-overlay {
	position: absolute;
	inset: 0;
	background-color: #2550a1;
	opacity: 0.72;
}

.avm-hero-content {
	position: relative;
	z-index: 1;
	max-width: 640px;
	color: #ffffff;
}

.avm-hero-content h1 {
	font-size: 2.8rem;
	line-height: 1.15;
	margin-bottom: 1rem;
	color: #ffffff;
}

.avm-hero-content p {
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 1.5rem;
	font-size: 1.1rem;
}

/* Section headings */
.avm-section {
	padding: 50px 5%;
}

.avm-section-heading {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 36px;
}

.avm-why-us-heading {
	max-width: 900px;
}

/* Supporting SEO/body-copy blocks between product sections — smaller,
 * quieter than a real section heading since there's no <h2> here. */
.avm-text-block {
	padding: 24px 5%;
}

.avm-text-block .avm-section-heading p {
	font-size: 0.92rem;
	line-height: 1.7;
}

.avm-section-heading h2 {
	font-size: 1.8rem;
	margin-bottom: 0.5rem;
}

.avm-section-heading p {
	color: var(--avm-muted);
}

/* Why choose us */
.avm-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
}

.avm-feature {
	text-align: center;
	padding: 24px;
}

.avm-feature-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--avm-primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--avm-primary);
	font-size: 1.5rem;
}

/* Category grid — explicit mobile-first breakpoints: 2 cols mobile,
 * 3 cols tablet, 4 cols desktop. Not left to auto-fit guesswork. */
.avm-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.avm-category-grid > * {
	min-width: 0;
}

@media (min-width: 700px) {
	.avm-category-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (min-width: 1024px) {
	.avm-category-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 24px;
	}
}

/* Full-bleed image with a dark overlay text banner across the middle —
 * matches the reference site's category card pattern (not a bordered
 * card with a small circular thumbnail, which is what this used to be). */
.avm-category-card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	text-decoration: none;
	color: var(--avm-text);
	background: var(--avm-primary-light);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.avm-category-card:hover {
	box-shadow: 0 12px 28px rgba(15, 87, 251, 0.18);
	transform: translateY(-3px);
	color: var(--avm-text);
}

.avm-category-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	margin: 0;
	transition: transform 0.25s ease;
}

.avm-category-card:hover img {
	transform: scale(1.06);
}

.avm-category-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(10, 14, 20, 0.68);
	padding: 14px 10px;
	text-align: center;
}

.avm-category-card .name {
	display: block;
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	margin-bottom: 4px;
}

.avm-category-card .count {
	display: block;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.75rem;
}

/* Promo banner */
.avm-promo-banner {
	background: var(--avm-primary);
	color: #fff;
	text-align: center;
	padding: 60px 5%;
	border-radius: 8px;
}

.avm-promo-banner h2 {
	color: #fff;
	margin-bottom: 1rem;
}

.avm-promo-banner .avm-btn {
	background: #fff;
	color: var(--avm-primary);
}

/* Testimonials */
.avm-testimonials {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.avm-testimonial {
	border: 1px solid var(--avm-border);
	border-radius: 8px;
	padding: 24px;
}

.avm-testimonial .stars {
	color: #f5a623;
	margin-bottom: 8px;
}

.avm-testimonial .author {
	font-weight: 600;
	margin-top: 12px;
}

.avm-testimonial .author em {
	font-weight: 400;
	font-style: normal;
	font-size: 0.75rem;
	color: var(--avm-muted);
}

/* Footer */
.site-footer {
	background: #ffffff;
	color: #313c4d;
	border-top: 1px solid var(--avm-border);
}

.avm-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	padding: 50px 5%;
}

.avm-footer-widgets h3 {
	color: var(--avm-text);
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 16px;
}

.avm-footer-widgets ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.avm-footer-widgets ul li {
	margin-bottom: 10px;
}

.avm-footer-widgets a {
	color: #313c4d;
	text-decoration: none;
}

.avm-footer-widgets a:hover {
	color: var(--avm-primary);
}

.avm-footer-base {
	border-top: 1px solid var(--avm-border);
	text-align: center;
	padding: 18px 5%;
	font-size: 0.8rem;
	color: #484c50;
}

/* Single product page */
.single-product div.product {
	padding: 20px 0 40px;
}

.avm-single-product-category {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}

.avm-single-product-category a {
	color: var(--avm-primary);
}

.single-product div.product .woocommerce-product-gallery {
	border-radius: 8px;
	overflow: hidden;
}

.single-product div.product .price {
	color: var(--avm-primary);
	font-size: 1.6rem;
	font-weight: 700;
}

.single-product div.product .price ins {
	text-decoration: none;
}

.single-product div.product .price del {
	color: var(--avm-muted);
	opacity: 0.7;
}

.single-product div.product p.stock.in-stock {
	color: var(--avm-primary-dark);
	font-weight: 600;
}

.single-product div.product form.cart .quantity input.qty {
	border: 1px solid var(--avm-border);
	border-radius: 4px;
	height: 48px;
	text-align: center;
}

.woocommerce-tabs ul.tabs li a {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.85rem;
}

.woocommerce-tabs ul.tabs li.active a {
	color: var(--avm-primary);
}

.related.products,
.upsells.products {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--avm-border);
}

.related.products > h2,
.upsells.products > h2 {
	font-size: 1.4rem;
	margin-bottom: 20px;
}

/* Shop archive / category grid */
.avm-woo-product-category {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--avm-muted);
	margin-bottom: 4px;
}

/* Product grid — explicit mobile-first breakpoints: 2 cols mobile,
 * 3 cols tablet, 4 cols desktop. !important needed to beat WooCommerce's
 * own float-based .columns-N classes, which otherwise win on specificity. */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 20px !important;
	list-style: none;
	margin: 0 auto !important;
	padding: 0;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

/* WooCommerce core adds a float-era clearfix pseudo-element
 * (ul.products::before { content:" "; display:table }). Inside a grid
 * container that phantom box becomes a real (invisible) grid item and
 * occupies the first cell, pushing every actual product over by one
 * slot. Neutralise it. */
ul.products::before,
ul.products::after {
	content: none !important;
	display: none !important;
}

ul.products li.product {
	display: flex !important;
	flex-direction: column;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	background: #fff;
	border: 1px solid var(--avm-border);
	border-radius: 10px;
	padding: 16px;
	box-sizing: border-box !important;
	text-align: left !important;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

/* Nested flex-in-grid children (title, price, button) need explicit
 * min-width:0 too, or a grid item can refuse to shrink below its
 * content's default auto min-size, forcing text into the narrowest
 * possible column and triggering aggressive word-break on real devices. */
ul.products li.product > * {
	min-width: 0;
}

ul.products li.product .woocommerce-loop-product__title,
ul.products li.product a.add_to_cart_button,
ul.products li.product a.button,
ul.products li.product .avm-woo-product-category {
	word-break: normal !important;
	overflow-wrap: break-word !important;
	white-space: normal !important;
}

ul.products li.product:hover {
	box-shadow: 0 10px 24px rgba(15, 87, 251, 0.1);
	transform: translateY(-3px);
	border-color: #d5deee;
}

@media (min-width: 700px) {
	ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1024px) {
	ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}
}

ul.products li.product a.woocommerce-loop-product__link {
	display: block;
}

ul.products li.product img {
	border-radius: 6px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
	margin-bottom: 12px !important;
}

ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	margin-top: 0;
}

.avm-loop-excerpt {
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--avm-muted);
	margin: 0 0 8px;
}

ul.products li.product .price {
	color: var(--avm-primary);
	font-weight: 700;
	font-size: 1.05rem;
	margin-top: auto;
	padding-top: 4px;
}

ul.products li.product a.add_to_cart_button,
ul.products li.product a.button {
	width: 100%;
	margin-top: 10px;
	text-align: center;
	border-radius: 6px;
	font-size: 0.75rem;
}

nav.woocommerce-pagination ul li a,
nav.woocommerce-pagination ul li span {
	border-radius: 4px;
}

nav.woocommerce-pagination ul li a:hover,
nav.woocommerce-pagination ul li span.current {
	background: var(--avm-primary);
	color: #fff;
}

/* Cart page */
.woocommerce-cart table.cart td.actions .button {
	background: var(--avm-primary);
}

.woocommerce-cart .cart_totals h2 {
	font-size: 1.2rem;
	font-weight: 700;
}

.woocommerce-cart .cart_totals .order-total .amount {
	color: var(--avm-primary);
	font-weight: 700;
}

/* Checkout page uses WooCommerce Blocks (wc-block-checkout), same as the
 * reference site — styled via WooCommerce's own block classes, not the
 * legacy classic-checkout markup, so no custom overrides needed here. */
.wc-block-components-checkout-place-order-button {
	background-color: var(--avm-primary) !important;
}

.wc-block-components-checkout-place-order-button:hover {
	background-color: var(--avm-primary-dark) !important;
}

/* My account page */
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	list-style: none;
	border: 1px solid var(--avm-border);
	border-bottom-width: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
	border-bottom-width: 1px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 0.5em 1em;
	font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	background-color: #fbfbfb;
	color: var(--avm-primary);
}

/* Responsive */
@media (max-width: 700px) {
	.avm-hero-content h1 {
		font-size: 1.8rem;
	}

	.avm-hero {
		padding: 40px 5%;
		flex-direction: column;
		text-align: center;
	}

	.avm-hero-content {
		max-width: 100%;
	}

	.avm-section {
		padding: 36px 5%;
	}

	.avm-section-heading h2 {
		font-size: 1.4rem;
	}

	.avm-testimonials {
		grid-template-columns: 1fr;
	}

	.avm-promo-banner {
		padding: 40px 5%;
	}

	.woocommerce-checkout #order_review,
	.woocommerce-checkout-review-order {
		margin-top: 24px;
	}

	.avm-about-story-grid {
		grid-template-columns: 1fr;
	}
}

/* About Us page */
.avm-page-hero {
	background: var(--avm-header-bg, #0a0e14);
	background: #0a0e14;
	color: #fff;
	text-align: center;
	padding: 70px 5%;
}

.avm-page-hero h1 {
	color: #fff;
	font-size: 2.2rem;
	margin-bottom: 0.5rem;
}

.avm-page-hero p {
	color: rgba(255, 255, 255, 0.75);
	margin: 0;
}

.avm-about-story-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	max-width: 1100px;
	margin: 0 auto;
}

.avm-about-story-image img {
	width: 100%;
	height: 100%;
	max-height: 380px;
	object-fit: cover;
	border-radius: 12px;
}

.avm-about-story-text p {
	color: var(--avm-muted);
	line-height: 1.7;
	margin-bottom: 1em;
}

.avm-about-callout {
	max-width: 700px;
	margin: 0 auto;
	text-align: center;
	background: var(--avm-primary-light);
	border-radius: 12px;
	padding: 36px;
}

.avm-about-callout h2 {
	margin-bottom: 0.5rem;
}

.avm-about-callout p {
	color: var(--avm-muted);
	margin: 0;
}

.avm-about-notice {
	max-width: 700px;
	margin: 0 auto;
	background: #fff8e6;
	border: 1px solid #f5cf6d;
	border-radius: 10px;
	padding: 20px 24px;
}

.avm-about-notice strong {
	display: block;
	margin-bottom: 6px;
	font-family: 'Poppins', sans-serif;
}

.avm-about-notice p {
	margin: 0;
	color: #7a5b0a;
	font-size: 0.9rem;
}


