/*
Theme Name: cpadvance
Theme URI: https://cpadvance.com
Description: Child theme for Hello Biz used by cpadvance.
Author: cpadvance
Template: hello-biz
Version: 1.0.0
Text Domain: cpadvance
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
	--cpa-green: #288537;
	--cpa-green-dark: #1f6b2b;
	--cpa-mint-bg: #eef6ef;
	--cpa-border: #e2e2e2;
	--cpa-text: #333333;
	--cpa-muted: #6b6b6b;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.woocommerce-breadcrumb {
	font-size: 0.9rem;
	color: var(--cpa-muted);
	margin-bottom: 24px;
}

.woocommerce-breadcrumb a {
	color: var(--cpa-green);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Product layout
   ========================================================================== */

/*.single-product div.product {
	display: grid;
	grid-template-columns: minmax(280px, 460px) 1fr;
	gap: 48px;
	align-items: start;
}*/

.single-product div.product > .cpadvance-product-info,
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .up-sells,
.single-product div.product > .related.products {
	grid-column: 1 / -1;
}

@media (max-width: 900px) {
	.single-product div.product {
		grid-template-columns: 1fr;
	}
}

.woocommerce-product-gallery__wrapper img {
	border-radius: 8px;
	width: 100%;
	height: auto;
}

/* ==========================================================================
   Product summary
   ========================================================================== */

.summary.entry-summary .product_title {
	color: var(--cpa-green);
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 8px;
}

.summary.entry-summary .price {
	font-size: 1.6rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 16px;
}

.woocommerce-product-details__short-description > p:first-child {
	color: #444;
	line-height: 1.6;
	margin-bottom: 16px;
}

/* Hand-authored quantity/discount table inside the short description */
.woocommerce-product-details__short-description table {
	width: 100% !important;
	max-width: 420px;
	height: auto !important;
	border-collapse: collapse;
	margin: 16px 0 24px;
	font-size: 0.95rem;
}

.woocommerce-product-details__short-description table td {
	border: 1px solid var(--cpa-border);
	padding: 10px 14px;
	text-align: left;
	width: auto !important;
	height: auto !important;
}

.woocommerce-product-details__short-description table tr:first-child td {
	background: #f4f4f4;
	font-weight: 700;
	color: #333;
}

form.cart {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

form.cart .quantity {
	margin: 0;
}

form.cart .qty {
	width: 70px;
	padding: 10px 12px;
	border: 1px solid var(--cpa-border);
	border-radius: 4px;
}

.single_add_to_cart_button.button {
	background: var(--cpa-green);
	border-color: var(--cpa-green);
	color: #fff;
	border-radius: 24px;
	padding: 12px 28px;
	font-weight: 700;
}

.single_add_to_cart_button.button:hover,
.single_add_to_cart_button.button:focus {
	background: var(--cpa-green-dark);
	border-color: var(--cpa-green-dark);
	color: #fff;
}

.product_meta {
	font-size: 0.9rem;
	color: #444;
}

.product_meta a {
	color: var(--cpa-green);
	font-weight: 600;
	text-decoration: none;
}

.product_meta a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Tabs + CPD sidebar
   ========================================================================== */

.cpadvance-product-info {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	margin-top: 8px;
}

.cpadvance-product-info .woocommerce-tabs {
	flex: 1 1 auto;
	min-width: 0;
}

@media (max-width: 900px) {
	.cpadvance-product-info {
		flex-direction: column;
	}
}

.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0 0 -1px;
	padding: 0;
	border-bottom: 2px solid var(--cpa-border);
}

.woocommerce-tabs ul.tabs li {
	margin: 0;
}

.woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 12px 20px;
	font-weight: 600;
	color: #666;
	text-decoration: none;
	border: 2px solid transparent;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
}

.woocommerce-tabs .panel {
	padding-top: 28px;
	border: none;
}

.woocommerce-Tabs-panel--description > h2:first-child {
	display: none;
}

.woocommerce-tabs .panel table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}

.woocommerce-tabs .panel table td {
	border: 1px solid var(--cpa-border);
	padding: 14px 16px;
	vertical-align: top;
}

.woocommerce-tabs .panel table tr:nth-child(odd) {
	background: #fafafa;
}

.woocommerce-tabs .panel table td:first-child {
	width: 30%;
	font-weight: 600;
}

.woocommerce-tabs .panel table ul {
	margin: 0;
	padding-left: 18px;
}

.cpadvance-cpd-box {
	flex: 0 0 300px;
	background: var(--cpa-mint-bg);
	border-radius: 10px;
	padding: 24px;
}

@media (max-width: 900px) {
	.cpadvance-cpd-box {
		flex-basis: auto;
		width: 100%;
	}
}

.cpadvance-cpd-box h4 {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a1a;
}

.cpadvance-cpd-box .cpd-hours {
	font-size: 0.95rem;
	color: #444;
	margin: 0 0 20px;
}

.cpadvance-cpd-box ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cpadvance-cpd-box li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	font-size: 0.9rem;
	color: #333;
	line-height: 1.4;
}

.cpadvance-cpd-box li:last-child {
	margin-bottom: 0;
}

.cpadvance-cpd-box li svg {
	flex: 0 0 40px;
	color: var(--cpa-green);
	margin-top: 2px;
}

/* ==========================================================================
   Related products
   ========================================================================== */

.related.products {
	margin-top: 60px;
}

.related.products > h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 20px;
}

.related.products ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.related.products ul.products:before{
	display:none;
}

.related.products ul.products li.product {
	border: 1px solid var(--cpa-border);
	border-radius: 8px;
	padding: 16px;
	text-align: left;
	position: relative;
	width:100%;
}

.related.products ul.products li.product img {
	border-radius: 6px;
	margin-bottom: 12px;
}

.related.products ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--cpa-green);
	margin: 0 0 6px;
}

.related.products ul.products li.product .price {
	font-size: 0.95rem;
	color: #333;
}

.related.products ul.products li.product .button {
	display: inline-block;
	margin-top: 10px;
	background: var(--cpa-green);
	color: #fff;
	border-radius: 20px;
	padding: 8px 18px;
	font-weight: 600;
	text-decoration: none;
	font-size: 0.85rem;
}

.related.products ul.products li.product .button:hover {
	background: var(--cpa-green-dark);
	color: #fff;
}

.related.products ul.products li.product .onsale {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--cpa-green);
	color: #fff;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
}

/* ==========================================================================
   Post cards (Post Grid / Latest Posts Elementor widgets)
   ========================================================================== */

.cpadvance-post-grid {
	display: grid;
	grid-template-columns: repeat(var(--cpadvance-grid-columns, 3), 1fr);
	gap: 32px;
}

@media (max-width: 900px) {
	.cpadvance-post-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.cpadvance-post-grid {
		grid-template-columns: 1fr;
	}
}

.cpadvance-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	color: inherit;
	text-decoration: none;
}

.cpadvance-post-card:hover .cpadvance-post-card__title {
	text-decoration: underline;
}

.cpadvance-post-card__image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.cpadvance-post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cpadvance-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px;
}

.cpadvance-post-card__category {
	display: inline-block;
	color: var(--cpa-green);
	font-weight: 700;
	font-size: 0.85rem;
	margin-bottom: 8px;
}

.cpadvance-post-card__title {
	font-size: 1.2rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
	margin: 0 0 12px;
}

.cpadvance-post-card__excerpt {
	flex: 1;
	color: #555;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 16px;
}

.cpadvance-post-card__date {
	color: var(--cpa-muted);
	font-size: 0.85rem;
	margin-top: auto;
}

/* ==========================================================================
   Post grid pagination
   ========================================================================== */

.cpadvance-pagination {
	margin-top: 40px;
}

.cpadvance-pagination ul.page-numbers {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cpadvance-pagination .page-numbers li {
	margin: 0;
}

.cpadvance-pagination .page-numbers a,
.cpadvance-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--cpa-border);
	border-radius: 6px;
	color: #333;
	font-weight: 600;
	text-decoration: none;
}

.cpadvance-pagination .page-numbers a:hover {
	border-color: var(--cpa-green);
	color: var(--cpa-green);
}

.cpadvance-pagination .page-numbers .current {
	background: var(--cpa-green);
	border-color: var(--cpa-green);
	color: #fff;
}

.cpadvance-pagination .page-numbers .dots {
	border: none;
}
