/* ==========================================================================
   Building Books Australia — Main Stylesheet
   ========================================================================== */

/* ── DESIGN TOKENS ──────────────────────────────────────────────────────── */

:root {
	--navy:        #1c2b4a;
	--navy-light:  #263557;
	--gold:        #c98a12;
	--gold-bg:     #f5a623;
	--green:       #2d7a47;
	--green-hover: #236039;
	--off-white:   #f4f3f0;
	--light-grey:  #e8e7e3;
	--mid-grey:    #888;
	--text:        #1a1a1a;
	--text-light:  #555;
	--white:       #ffffff;
	--red:         #c0392b;

	--font-heading: 'Playfair Display', Georgia, serif;
	--font-body:    'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;

	--radius:  4px;
	--radius-lg: 8px;
	--shadow:  0 1px 6px rgba(0,0,0,0.07);
	--shadow-card: 0 4px 16px rgba(0,0,0,0.09);
	--shadow-hover: 0 8px 28px rgba(0,0,0,0.13);

	--max-width: 1140px;
	--container-pad: 24px;
}

/* ── RESET & BASE ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body,
body.woocommerce,
body.woocommerce-page,
body.single-product,
body.woocommerce-shop,
body.tax-product_cat,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--text);
	background: var(--white) !important;
	-webkit-font-smoothing: antialiased;
}

/* Ensure chrome elements are always full viewport width */
.site-header,
.primary-nav,
.shipping-bar,
.trust-bar,
.site-footer {
	width: 100%;
	max-width: 100%;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--green); }

ul { list-style: none; }

input, select, textarea, button { font-family: inherit; }

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */

.container {
	max-width: var(--max-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.page-main { padding: 40px 0 72px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--navy);
	line-height: 1.25;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 24px;
	border-radius: var(--radius);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
	white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary  { background: var(--green);  color: var(--white); border-color: var(--green); }
.btn--primary:hover  { background: var(--green-hover); border-color: var(--green-hover); color: var(--white); }

.btn--navy  { background: var(--navy);  color: var(--white); border-color: var(--navy); }
.btn--navy:hover  { background: var(--navy-light); border-color: var(--navy-light); color: var(--white); }

.btn--gold  { background: var(--gold-bg); color: var(--navy); border-color: var(--gold-bg); }
.btn--gold:hover  { filter: brightness(1.05); color: var(--navy); }

.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn--outline:hover { background: rgba(255,255,255,0.12); color: var(--white); border-color: var(--white); }

.btn--atc {
	background: var(--green);
	color: var(--white);
	border: none;
	border-radius: var(--radius);
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	transition: background 0.15s;
}
.btn--atc:hover { background: var(--green-hover); }
.btn--atc svg { width: 14px; height: 14px; }

/* ── TOP BAR ────────────────────────────────────────────────────────────── */

.top-bar {
	background: var(--navy);
	color: rgba(255,255,255,0.72);
	font-size: 13px;
	padding: 8px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.top-bar a { color: rgba(255,255,255,0.85); text-decoration: none; }
.top-bar a:hover { color: var(--white); }

/* ── SITE HEADER ────────────────────────────────────────────────────────── */

.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--light-grey);
	padding: 16px 0;
	box-shadow: var(--shadow);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header .container {
	display: flex;
	align-items: center;
	gap: 28px;
}

.site-logo img { height: 60px; width: auto; }

/* Search form */
.header-search { flex: 1; max-width: 460px; }

.header-search .search-field,
.header-search input[type="search"] {
	width: 100%;
	border: 1.5px solid var(--light-grey);
	border-radius: var(--radius);
	padding: 10px 40px 10px 14px;
	font-family: inherit;
	font-size: 14px;
	outline: none;
	color: var(--text);
	background: var(--white);
	transition: border-color 0.15s;
}
.header-search .search-field:focus,
.header-search input[type="search"]:focus { border-color: var(--navy); }

.search-form { position: relative; }
.search-submit {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--mid-grey);
	padding: 0;
	display: flex;
	align-items: center;
}
.search-submit svg { width: 18px; height: 18px; }

/* Header actions (account, cart) */
.header-actions {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-left: auto;
}
.header-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 12px;
	color: var(--text-light);
	text-decoration: none;
	gap: 2px;
	position: relative;
}
.header-action svg { width: 22px; height: 22px; color: var(--navy); }
.header-action:hover { color: var(--navy); }

.cart-count {
	position: absolute;
	top: -4px;
	right: -8px;
	background: var(--gold-bg);
	color: var(--navy);
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Mobile hamburger */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	margin-left: auto;
}
.mobile-menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--navy);
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PRIMARY NAV ────────────────────────────────────────────────────────── */

.primary-nav { background: var(--navy); }
.primary-nav .container { display: flex; }

.primary-nav__menu { display: flex; list-style: none; }
.primary-nav__menu a {
	display: block;
	color: rgba(255,255,255,0.82);
	font-size: 14px;
	font-weight: 500;
	padding: 14px 18px;
	transition: background 0.15s, color 0.15s;
	text-decoration: none;
}
.primary-nav__menu a:hover,
.primary-nav__menu .current-menu-item a,
.primary-nav__menu .current-page-ancestor a {
	background: var(--navy-light);
	color: var(--white);
}

/* ── SHIPPING BAR ───────────────────────────────────────────────────────── */

.shipping-bar {
	background: var(--gold-bg);
	color: var(--navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 9px 0;
	text-align: center;
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */

.breadcrumb {
	border-bottom: 1px solid var(--light-grey);
	padding: 13px 0;
	font-size: 13px;
	color: var(--mid-grey);
}
.breadcrumb a { color: var(--mid-grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .sep { margin: 0 7px; }
.breadcrumb .breadcrumb_last { color: var(--text); }

/* Rank Math breadcrumb compat */
.rank-math-breadcrumb p { margin: 0; }
.rank-math-breadcrumb a { color: var(--mid-grey); text-decoration: none; }
.rank-math-breadcrumb a:hover { color: var(--navy); }
.rank-math-breadcrumb .separator { margin: 0 7px; color: var(--mid-grey); }

/* ── ARCHIVE TOOLBAR ────────────────────────────────────────────────────── */

.archive-section { padding: 36px 0 72px; }
.archive-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 20px; }
.archive-desc { font-size: 15px; color: var(--text-light); margin-bottom: 24px; max-width: 640px; }

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: var(--off-white);
	border: 1px solid var(--light-grey);
	border-radius: var(--radius);
	margin-bottom: 28px;
	flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

.result-count { font-size: 14px; color: var(--text-light); white-space: nowrap; }

.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
	background: var(--white);
	border: 1.5px solid var(--light-grey);
	border-radius: 20px;
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-light);
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
	text-decoration: none;
}
.filter-pill:hover, .filter-pill.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.sort-select {
	border: 1.5px solid var(--light-grey);
	border-radius: var(--radius);
	padding: 7px 12px;
	font-family: inherit;
	font-size: 13px;
	color: var(--text);
	background: var(--white);
	cursor: pointer;
	outline: none;
}

/* View toggle */
.view-toggle { display: flex; border: 1.5px solid var(--light-grey); border-radius: var(--radius); overflow: hidden; }
.view-btn {
	background: var(--white);
	border: none;
	padding: 7px 10px;
	cursor: pointer;
	color: var(--mid-grey);
	display: flex;
	align-items: center;
	transition: all 0.15s;
}
.view-btn svg { width: 16px; height: 16px; }
.view-btn:hover { background: var(--off-white); }
.view-btn.active { background: var(--navy); color: var(--white); }
.view-btn + .view-btn { border-left: 1.5px solid var(--light-grey); }

/* ── PRODUCT BADGES ─────────────────────────────────────────────────────── */

.p-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 3px 9px;
	border-radius: var(--radius);
	z-index: 2;
	line-height: 1.4;
}
.badge-popular { background: var(--gold-bg); color: var(--navy); }
.badge-bundle  { background: var(--navy); color: var(--white); }
.badge-value   { background: var(--green); color: var(--white); }
.badge-sale    { background: var(--red);   color: var(--white); }

/* ── GRID VIEW ──────────────────────────────────────────────────────────── */

.product-container.view-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* Hide list-only elements in grid view */
.product-container.view-grid .list-visual,
.product-container.view-grid .list-details,
.product-container.view-grid .list-action { display: none !important; }

/* Card shell */
.product-container.view-grid .product-item {
	border: 1px solid var(--light-grey);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--white);
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.22s, transform 0.22s;
}
.product-container.view-grid .product-item:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-3px);
}

/* Grid image area */
.grid-visual {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--off-white);
	border-bottom: 1px solid var(--light-grey);
	display: flex;
	align-items: center;
	justify-content: center;
}
.grid-visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.product-item:hover .grid-visual img { transform: scale(1.04); }

/* Add to cart overlay */
.cart-overlay {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	background: var(--navy);
	color: var(--white);
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 11px;
	transform: translateY(100%);
	transition: transform 0.22s ease;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	width: 100%;
}
.cart-overlay svg { width: 15px; height: 15px; }
.product-item:hover .cart-overlay { transform: translateY(0); }
@media (hover: none) { .cart-overlay { transform: translateY(0) !important; } }

/* Grid product info */
.grid-info {
	padding: 14px 16px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.grid-cat   { font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--mid-grey); }
.grid-name  { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.45; flex: 1; font-family: var(--font-body); }
.grid-price { font-size: 18px; font-weight: 700; color: var(--navy); margin-top: 6px; }

/* ── LIST VIEW ──────────────────────────────────────────────────────────── */

.product-container.view-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--light-grey);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

/* Hide grid-only elements in list view */
.product-container.view-list .grid-visual,
.product-container.view-list .grid-info { display: none !important; }

/* List row */
.product-container.view-list .product-item {
	display: flex;
	align-items: stretch;
	background: var(--white);
	border-bottom: 1px solid var(--light-grey);
	text-decoration: none;
	color: inherit;
	transition: background 0.15s;
}
.product-container.view-list .product-item:last-child { border-bottom: none; }
.product-container.view-list .product-item:hover { background: #f9f9f7; }

/* List image cell */
.list-visual {
	width: 110px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--off-white);
	border-right: 1px solid var(--light-grey);
	position: relative;
	overflow: hidden;
	padding: 12px;
}
.list-visual img {
	width: 72px;
	height: 90px;
	object-fit: cover;
	border-radius: 3px;
	box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
}

/* List details */
.list-details {
	flex: 1;
	padding: 14px 20px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}
.list-cat   { font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--mid-grey); }
.list-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; font-family: var(--font-body); }
.list-desc  {
	font-size: 13px;
	color: var(--text-light);
	line-height: 1.55;
	margin-top: 3px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* List action cell */
.list-action {
	flex-shrink: 0;
	width: 180px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 10px;
	border-left: 1px solid var(--light-grey);
}
.list-price { font-size: 22px; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* List badge (smaller) */
.product-container.view-list .p-badge { font-size: 9px; padding: 2px 6px; top: 6px; left: 6px; }

/* ── PAGINATION ─────────────────────────────────────────────────────────── */

/* Our custom pagination.php template outputs flat <a> tags inside .bba-pagination
   with no ul/li — zero conflict with WooCommerce list styles */

.bba-pagination {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 48px;
}
.bba-pagination a.page-numbers,
.bba-pagination span.page-numbers {
	width: 38px;
	height: 38px;
	border: 1.5px solid var(--light-grey);
	border-radius: var(--radius);
	background: var(--white);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-light);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
	flex-shrink: 0;
}
.bba-pagination a.page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.bba-pagination span.page-numbers.current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.bba-pagination .dots { border-color: transparent; background: none; width: auto; padding: 0 4px; }
.bba-pagination .prev,
.bba-pagination .next { font-size: 20px; line-height: 1; }


/* ── SINGLE PRODUCT ─────────────────────────────────────────────────────── */

.product-single { padding: 40px 0 72px; }

.product-single__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: start;
}

/* Product image */
.product-single__gallery {
	position: sticky;
	top: 100px;
}
.product-single__main-image {
	border: 1px solid var(--light-grey);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--off-white);
}
.product-single__main-image img {
	width: 100%;
	height: auto;
}
.woocommerce-product-gallery { margin: 0 !important; }

/* Main image */
.woocommerce-product-gallery .woocommerce-product-gallery__image:first-child a {
	border: 1px solid var(--light-grey);
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: block;
}
.woocommerce-product-gallery .woocommerce-product-gallery__image:first-child img {
	width: 100%;
	height: auto;
	display: block;
}

/* Thumbnail strip — WooCommerce outputs .flex-control-thumbs as an ol */
.flex-control-thumbs {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none !important;
	padding: 10px 0 0 !important;
	margin: 0 !important;
	counter-reset: none !important;
}
.flex-control-thumbs li {
	display: block !important;
	width: calc(25% - 6px) !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}
.flex-control-thumbs li::before,
.flex-control-thumbs li::marker {
	content: none !important;
	display: none !important;
}
.flex-control-thumbs img {
	border: 2px solid var(--light-grey);
	border-radius: var(--radius);
	cursor: pointer;
	transition: border-color 0.15s;
	width: 100%;
	height: auto;
	display: block;
}
.flex-control-thumbs img.flex-active,
.flex-control-thumbs img:hover {
	border-color: var(--navy);
}

/* ── PRODUCT VARIATIONS ─────────────────────────────────────────────────── */

.variations {
	width: 100%;
	border: none !important;
	margin-bottom: 20px;
}
.variations tbody,
.variations tr,
.variations td,
.variations th {
	display: block;
	width: 100%;
	border: none !important;
	padding: 0 !important;
}
.variations tr { margin-bottom: 14px; }

.variations .label label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 6px;
	display: block;
}
.variations .value {
	display: flex;
	align-items: center;
	gap: 10px;
}
.variations select {
	flex: 1;
	border: 1.5px solid var(--light-grey);
	border-radius: var(--radius);
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	color: var(--text);
	background: var(--white);
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s;
	appearance: auto;
}
.variations select:focus { border-color: var(--navy); }

.reset_variations {
	font-size: 12px;
	color: var(--mid-grey);
	text-decoration: none;
	white-space: nowrap;
}
.reset_variations:hover { color: var(--navy); }

.woocommerce-variation-price { margin-bottom: 12px; }
.woocommerce-variation-price .price {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--navy);
}

.single_variation_wrap { margin-top: 4px; }

/* Product summary */
.product-single__summary {}

.product-single__cat {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--mid-grey);
	margin-bottom: 8px;
}
.product-single__title {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-family: var(--font-heading);
	color: var(--navy);
	line-height: 1.25;
	margin-bottom: 16px;
}
.product-single__price,
.product-single__price .woocommerce-Price-amount {
	font-size: 2rem;
	font-weight: 700;
	color: var(--navy);
}
.product-single__price { margin-bottom: 20px; }

.product-single__short-desc {
	font-size: 15px;
	color: var(--text-light);
	line-height: 1.7;
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--light-grey);
}

/* Book details meta */
.book-details {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--light-grey);
}
.book-details__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 24px;
}
.book-detail { display: flex; flex-direction: column; gap: 1px; }
.book-detail__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid-grey); }
.book-detail__value { font-size: 14px; font-weight: 600; color: var(--text); }

/* Bundle includes */
.bundle-includes {
	background: var(--off-white);
	border: 1px solid var(--light-grey);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin-bottom: 24px;
}
.bundle-includes h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid-grey); margin-bottom: 10px; font-family: var(--font-body); }
.bundle-includes ul { list-style: none; }
.bundle-includes ul li {
	font-size: 14px;
	padding: 5px 0 5px 22px;
	position: relative;
	color: var(--text);
	border-bottom: 1px solid var(--light-grey);
}
.bundle-includes ul li:last-child { border-bottom: none; }
.bundle-includes ul li::before {
	content: '';
	position: absolute;
	left: 0; top: 12px;
	width: 12px; height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232d7a47'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Add to cart */
.product-single__cart .quantity { display: none; } /* hide qty for books */
.product-single__cart .single_add_to_cart_button {
	background: var(--green) !important;
	color: var(--white) !important;
	border: none !important;
	border-radius: var(--radius) !important;
	padding: 14px 28px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	width: 100% !important;
	transition: background 0.15s !important;
}
.product-single__cart .single_add_to_cart_button:hover { background: var(--green-hover) !important; }

/* Product trust signals */
.product-trust {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 20px;
}
.product-trust__item {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--text-light);
}
.product-trust__item svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

/* Product tabs */
.woocommerce-tabs { margin-top: 56px; }
.woocommerce-tabs ul.tabs {
	display: flex;
	border-bottom: 2px solid var(--light-grey);
	list-style: none;
	margin-bottom: 0;
	padding: 0;
}
.woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
}
.woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-light);
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s;
}
.woocommerce-tabs ul.tabs li.active a {
	color: var(--navy);
	border-bottom-color: var(--navy);
}
.woocommerce-tabs .panel { padding: 28px 0; }
.woocommerce-tabs .panel h2 { display: none; }
.woocommerce-tabs .panel p { font-size: 15px; color: var(--text-light); line-height: 1.7; }

/* Related products */
.related.products { margin-top: 56px; }
.related.products h2 {
	font-size: 1.4rem;
	margin-bottom: 24px;
}
.related.products ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	list-style: none;
}

/* ── HOMEPAGE ────────────────────────────────────────────────────────────── */

/* Hero */
.hero {
	background: var(--navy);
	padding: 80px 0 88px;
	position: relative;
	overflow: hidden;
}
.hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; z-index: 1; }
.hero__content { max-width: 660px; }

/* Two-column layout when a hero image is set */
.hero--has-image {
	padding: 0;
	overflow: hidden;
}
.hero--has-image .container {
	max-width: none;
	padding: 0;
	display: flex;
	align-items: stretch;
	min-height: 480px;
}
.hero--has-image .hero__inner {
	display: contents;
}
.hero--has-image .hero__content {
	flex: 1 1 58%;
	min-width: 0;
	max-width: none;
	padding: 72px 56px 80px max(24px, calc((100vw - 1140px) / 2 + 24px));
	box-sizing: border-box;
}
.hero__image {
	flex: 0 0 42%;
	max-width: 42%;
	overflow: hidden;
}
.hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.hero__badge {
	display: inline-block;
	background: rgba(245,166,35,0.2);
	color: var(--gold-bg);
	border: 1px solid rgba(245,166,35,0.35);
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 5px 14px;
	margin-bottom: 20px;
}
.hero__headline {
	font-family: var(--font-heading);
	font-size: clamp(2rem, 5vw, 3rem);
	color: var(--white);
	line-height: 1.15;
	margin-bottom: 20px;
}
.hero__sub {
	font-size: clamp(1rem, 2vw, 1.15rem);
	color: rgba(255,255,255,0.72);
	line-height: 1.7;
	margin-bottom: 32px;
	max-width: 540px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero__trust {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	font-size: 13px;
	color: rgba(255,255,255,0.6);
}
.hero__trust span { display: flex; align-items: center; gap: 6px; }
.hero__trust svg { width: 14px; height: 14px; color: var(--gold-bg); flex-shrink: 0; }

/* Section headers */
.section-header { text-align: center; margin-bottom: 36px; }
.section-title { margin-bottom: 10px; }
.section-sub { font-size: 15px; color: var(--text-light); max-width: 540px; margin-inline: auto; }

/* Featured products */
.home-featured { padding: 72px 0; }
.section-cta { text-align: center; margin-top: 36px; }

/* Home product grid (3 col, matches archive) */
.home-product-grid { margin: 0; }

/* Value bundles callout */
.home-bundles { background: var(--off-white); padding: 72px 0; border-top: 1px solid var(--light-grey); border-bottom: 1px solid var(--light-grey); }
.bundles-callout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 64px;
	align-items: center;
}
.bundles-callout__badge {
	display: inline-block;
	background: var(--gold-bg);
	color: var(--navy);
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 14px;
	margin-bottom: 16px;
}
.bundles-callout__content h2 { margin-bottom: 14px; }
.bundles-callout__content p { font-size: 15px; color: var(--text-light); line-height: 1.7; margin-bottom: 24px; }

/* Book stack visual */
.bundles-callout__visual { display: flex; align-items: center; justify-content: center; height: 240px; }
.bundles-callout__visual img { max-height: 240px; width: auto; max-width: 100%; display: block; border-radius: 4px; }
.book-stack { position: relative; width: 120px; height: 180px; }
.book-stack__book {
	position: absolute;
	inset: 0;
	background: var(--bg);
	border-radius: 4px;
	box-shadow: 6px 6px 20px rgba(0,0,0,0.25);
	transform: rotate(var(--rot)) translateZ(0);
	z-index: var(--z);
	transition: transform 0.3s ease;
}
.bundles-callout:hover .book-stack__book { transform: rotate(calc(var(--rot) * 1.5)) translateY(-4px); }

/* Why choose us */
.home-why { padding: 72px 0; }
.why-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}
.why-item { text-align: center; }
.why-item__icon {
	width: 56px;
	height: 56px;
	background: var(--off-white);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	color: var(--navy);
}
.why-item__icon svg { width: 26px; height: 26px; }
.why-item h3 { font-size: 1rem; margin-bottom: 8px; }
.why-item p { font-size: 14px; color: var(--text-light); line-height: 1.65; }

/* ── TRUST BAR ──────────────────────────────────────────────────────────── */

.trust-bar {
	background: var(--off-white);
	border-top: 1px solid var(--light-grey);
	padding: 24px 0;
}
.trust-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.trust-item {
	display: flex;
	align-items: center;
	gap: 14px;
}
.trust-item svg { width: 28px; height: 28px; color: var(--navy); flex-shrink: 0; }
.trust-item h5 { font-size: 14px; font-weight: 700; color: var(--navy); font-family: var(--font-body); margin-bottom: 2px; }
.trust-item p  { font-size: 13px; color: var(--text-light); margin: 0; }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */

.site-footer {
	background: var(--navy);
	padding: 56px 0 28px;
	color: rgba(255,255,255,0.55);
}
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 56px;
	margin-bottom: 40px;
}
.footer-logo {
	display: inline-block;
	background: #ffffff;
	border-radius: 8px;
	padding: 10px 16px;
	margin-bottom: 16px;
}
.footer-logo img { height: 44px; width: auto; display: block; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; color: rgba(255,255,255,0.45); }
.footer-col h6 {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255,255,255,0.32);
	margin-bottom: 16px;
	font-family: var(--font-body);
}
.footer-col a {
	display: block;
	font-size: 14px;
	color: rgba(255,255,255,0.6);
	text-decoration: none;
	margin-bottom: 10px;
	transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 20px;
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: rgba(255,255,255,0.28);
	flex-wrap: wrap;
	gap: 8px;
}

/* ── WOOCOMMERCE CART & CHECKOUT — FULL WIDTH ────────────────────────────── */

/* page.php now outputs .woo-page-main (no inner .container) for cart/checkout.
   WooCommerce renders its own inner wrapper — we constrain that to max-width. */

.woo-page-main {
	width: 100%;
	padding: 40px 0 72px;
}

/* Classic WooCommerce shortcode pages wrap content in .woocommerce */
.woo-page-main .woocommerce {
	max-width: var(--max-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

/* WooCommerce Blocks cart/checkout */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	max-width: var(--max-width) !important;
	margin-inline: auto !important;
	padding: 40px var(--container-pad) 72px !important;
}


table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
table.shop_table th {
	padding: 10px 16px;
	background: var(--off-white);
	border-bottom: 2px solid var(--light-grey);
	font-weight: 600;
	color: var(--navy);
	text-align: left;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
table.shop_table td {
	padding: 16px;
	border-bottom: 1px solid var(--light-grey);
	vertical-align: middle;
}
table.shop_table .product-name a { color: var(--text); font-weight: 600; }
table.shop_table .product-name a:hover { color: var(--navy); }

.cart-collaterals { margin-top: 32px; }
.cart_totals h2 { font-size: 1.2rem; margin-bottom: 16px; }
.cart_totals table th { background: none; border: none; padding: 10px 0; }
.cart_totals table td { border: none; padding: 10px 0; }

/* Checkout */
.woocommerce-checkout form.checkout h3 { font-size: 1.1rem; margin-bottom: 20px; }
.woocommerce-checkout .form-row label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: block; }
.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
	border: 1.5px solid var(--light-grey);
	border-radius: var(--radius);
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	width: 100%;
	transition: border-color 0.15s;
	outline: none;
}
.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus { border-color: var(--navy); }

#place_order,
.woocommerce-checkout #place_order {
	background: var(--green) !important;
	color: var(--white) !important;
	border: none !important;
	border-radius: var(--radius) !important;
	padding: 14px 28px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	width: 100% !important;
	transition: background 0.15s !important;
}
#place_order:hover { background: var(--green-hover) !important; }

/* WooCommerce notices */
.woocommerce-notices-wrapper {
	max-width: var(--max-width);
	margin-left: auto;
	margin-right: auto;
	padding: 0 24px;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--radius);
	padding: 14px 20px;
	margin-bottom: 20px;
	font-size: 14px;
}
.woocommerce-message { background: #d4edda; border-left: 4px solid var(--green); }
.woocommerce-info    { background: #d1ecf1; border-left: 4px solid #0c5460; }
.woocommerce-error   { background: #f8d7da; border-left: 4px solid var(--red); }

/* ── PAGE CONTENT ────────────────────────────────────────────────────────── */

.page-title { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--light-grey); }
.page-body { font-size: 15px; line-height: 1.75; color: var(--text-light); max-width: 100%; }
.page-body h2, .page-body h3 { color: var(--navy); margin: 28px 0 12px; }
.page-body ul, .page-body ol { padding-left: 20px; margin-bottom: 16px; }
.page-body li { margin-bottom: 6px; }
.page-body a { color: var(--green); text-decoration: underline; }

/* 404 */
.error-404 { text-align: center; padding: 72px 0; }
.error-404__code { font-size: 8rem; font-weight: 700; color: var(--light-grey); line-height: 1; margin-bottom: 16px; font-family: var(--font-heading); }
.error-404 h1 { margin-bottom: 14px; }
.error-404 p  { color: var(--text-light); margin-bottom: 32px; }
.error-404__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* No results */
.no-results { text-align: center; padding: 48px 0; }
.no-results p { color: var(--text-light); margin-bottom: 24px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.product-container.view-grid { grid-template-columns: repeat(2, 1fr); }
	.why-grid { grid-template-columns: repeat(2, 1fr); }
	.trust-grid { grid-template-columns: repeat(2, 1fr); }
	.bundles-callout { grid-template-columns: 1fr; }
	.bundles-callout__visual { display: none; }
	.product-single__layout { grid-template-columns: 1fr; gap: 36px; }
	.product-single__gallery { position: static; }
}

@media (max-width: 768px) {
	:root { --container-pad: 16px; }

    .top-bar .top-bar__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; font-size: 12px; }
    .top-bar__sep { display: none; }
	.site-header .container { flex-wrap: wrap; gap: 12px; }
	.header-search { order: 3; flex: 0 0 100%; max-width: 100%; }
	.site-logo img { height: 48px; }
	.header-actions { gap: 16px; }
	.mobile-menu-toggle { display: flex; }

	.primary-nav { display: none; }
	.primary-nav.is-open {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		z-index: 99;
		box-shadow: 0 4px 12px rgba(0,0,0,0.2);
		max-height: calc(100vh - 80px);
		overflow-y: auto;
	}
	.primary-nav .container { flex-direction: column; padding: 0; }
	.primary-nav__menu { flex-direction: column; }
	.primary-nav__menu a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }

	.product-container.view-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

	.list-action { width: 140px; padding: 12px; }
	.list-price { font-size: 18px; }

	.footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.footer-bottom { flex-direction: column; gap: 4px; }

	.hero { padding: 56px 0 64px; }
	.hero__actions { flex-direction: column; }
	.hero__actions .btn { width: 100%; justify-content: center; }
	.hero--has-image { padding: 0; }
	.hero--has-image .container { flex-direction: column; min-height: auto; }
	.hero--has-image .hero__content { padding: 48px 24px 32px; flex: none; }
	.hero__image { display: none; }
	.why-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
	.trust-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

	.related.products ul.products { grid-template-columns: 1fr 1fr; }

	.toolbar { flex-direction: column; align-items: flex-start; }
	.toolbar-right { width: 100%; justify-content: space-between; }
	.filter-pills { display: none; } /* hidden on mobile, use category links instead */
}

@media (max-width: 480px) {
	.product-container.view-grid { grid-template-columns: 1fr; }
	.list-visual { width: 80px; }
	.list-details { padding: 12px 14px; }
	.list-desc { display: none; }
	.why-grid { grid-template-columns: 1fr; }
	.trust-grid { grid-template-columns: 1fr; }
	.related.products ul.products { grid-template-columns: 1fr; }
}

/* ── CONTACT PAGE ────────────────────────────────────────────────────────── */

.contact-faq-jumplink { margin-bottom: 32px; }
.contact-faq-jumplink a { color: var(--green); font-weight: 600; text-decoration: none; }
.contact-faq-jumplink a:hover { text-decoration: underline; }

/* On desktop: form is second in markup but displays on the right (order:2).
   FAQ is first in markup but displays on the left (order:1). */
@media (min-width: 782px) {
	.contact-columns { align-items: flex-start; gap: 48px !important; }
	.contact-col-faq  { order: 1; }
	.contact-col-form { order: 2; }
	.contact-faq-jumplink { display: none; }
}

/* FAQ accordion styling */
.contact-col-faq .wp-block-details {
	border-bottom: 1px solid var(--light-grey);
	padding: 14px 0;
}
.contact-col-faq .wp-block-details summary {
	font-weight: 600;
	font-size: 15px;
	color: var(--navy);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.contact-col-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.contact-col-faq .wp-block-details summary::after {
	content: '+';
	font-size: 20px;
	font-weight: 400;
	color: var(--gold);
	flex-shrink: 0;
	transition: transform 0.2s;
}
.contact-col-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.contact-col-faq .wp-block-details p {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--text-light);
}
