/* ---------- Structural wrapper ----------
 * Everything below the top image/summary row (Product Details, COA, Reviews,
 * Related Products) is echoed inside this ONE wrapper element. Forcing it to
 * span the full width defeats any CSS grid/flexbox the theme applies to the
 * product's image+summary row — without this, a theme that lays gallery+
 * summary out as CSS grid columns can pull our sections into that same grid
 * and misplace/narrow them instead of stacking them full-width underneath.
 */
.wc-coa-sections-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	flex: 0 0 100%;         /* full row if the parent is a flexbox */
	grid-column: 1 / -1;    /* full span if the parent is a CSS grid */
	clear: both;            /* full row if the parent uses floated columns */
	box-sizing: border-box;
}
.wc-coa-sections-wrap > * {
	box-sizing: border-box;
}

/* ---------- Page background ----------
 * The brand's page background (#FDF4EE) behind the whole single-product
 * page, so the white-on-white default gives way to the warmer palette used
 * by the cards/buttons below. Scoped to the single-product body only —
 * doesn't touch any other page type. Override in your theme if you'd
 * rather keep the page background as-is and only use the cream on cards. */
body.single-product {
	background-color: #FDF4EE;
}

/* ---------- Fonts ----------
 * Saira for headings (section titles, the lookup page's labels/result
 * heading, report dates); Manrope for everything else, including form
 * controls (select, buttons) which don't inherit font-family by default in
 * most browsers so they're set explicitly. Both load via Google Fonts —
 * enqueued in class-wc-coa-frontend.php wherever this stylesheet is used. */
.wc-coa-sections-wrap,
.wc-coa-lookup,
.wc-coa-summary-card {
	font-family: 'Manrope', Arial, sans-serif;
}
.wc-coa-section-title,
.wc-coa-lookup-label,
.wc-coa-lookup-result-heading,
.wc-coa-report-date,
.wc-coa-summary-card .product_title,
.wc-coa-summary-card .price {
	font-family: 'Saira', Arial, sans-serif;
}
.wc-coa-lookup-select,
.wc-coa-lookup-btn,
a.wc-coa-download-btn.button,
a.wc-coa-report-download.button,
a.wc-coa-visit-btn.button,
.wc-coa-summary-card .single_add_to_cart_button,
.wc-coa-summary-card .variations select,
.wc-coa-summary-card .quantity .qty {
	font-family: 'Manrope', Arial, sans-serif;
}

/* ---------- Section titles (shared) ---------- */
.wc-coa-section-title {
	font-size: 1.5em;
	margin: 0 0 1em;
	padding-bottom: 0.4em;
	color: #2c2620;
	border-bottom: 1px solid rgba(44, 38, 32, 0.1);
}

/* ---------- "Visit COA" button ----------
 * Styled as the secondary action (outline, brand green) so it reads as a
 * companion to the primary solid-green "Add to cart" button above it,
 * rather than competing with it. */
.wc-coa-visit-button-wrap {
	margin-top: 1.25em;
}
a.wc-coa-visit-btn.button {
	display: inline-block;
	background: transparent !important;
	color: #4d6b34 !important;
	border: 2px solid #6A8B48 !important;
	border-radius: 999px;
	padding: 0.6em 1.4em;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
a.wc-coa-visit-btn.button:hover {
	background: #6A8B48 !important;
	color: #FFF9F8 !important;
}

/* ---------- Section 1 polish: breadcrumb + summary "buy box" ----------
 * This plugin still doesn't rebuild the top image/summary row's markup —
 * it's standard WooCommerce output (or Elementor's WooCommerce widgets),
 * kept intact so gallery/zoom JS and Elementor's own controls keep working.
 * This block restyles that existing markup in place via WooCommerce's own
 * core classes, and wraps the whole summary column in a ".wc-coa-summary-card"
 * "buy box" card (opened/closed in class-wc-coa-frontend.php around the
 * woocommerce_single_product_summary hook) so title, price, short
 * description, variations, add to cart, meta and the Visit COA button all
 * sit inside one cohesive panel matching the rest of the page.
 */
nav.woocommerce-breadcrumb {
	font-family: 'Manrope', Arial, sans-serif;
	font-size: 0.9em;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: #a89c90;
	padding: 0 0 1em;
	margin: 0 0 1.5em;
	border-bottom: 1px solid rgba(44, 38, 32, 0.08);
}
nav.woocommerce-breadcrumb a {
	color: #6b6259;
	text-decoration: none;
}
nav.woocommerce-breadcrumb a:hover {
	color: #6A8B48;
	text-decoration: underline;
}

.wc-coa-summary-card {
	background: #F7EDE4;
	border-radius: 16px;
	padding: clamp(1.5em, 3vw, 2.5em);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}
.wc-coa-summary-card > * {
	box-sizing: border-box;
}

.wc-coa-summary-card .product_title {
	font-size: clamp(1.7em, 2.4vw, 2.2em);
	font-weight: 700;
	line-height: 1.2;
	color: #211d17;
	margin: 0 0 0.5em;
}
.wc-coa-summary-card .woocommerce-product-rating {
	margin: 0 0 0.75em;
}
.wc-coa-summary-card p.price,
.wc-coa-summary-card span.price {
	font-size: 1.6em;
	font-weight: 700;
	color: #4d6b34;
	margin: 0 0 1em;
	display: block;
}
.wc-coa-summary-card p.price del,
.wc-coa-summary-card span.price del {
	color: #a89c90;
	font-weight: 400;
	opacity: 1;
	margin-right: 0.5em;
}
.wc-coa-summary-card p.price ins,
.wc-coa-summary-card span.price ins {
	text-decoration: none;
}
.wc-coa-summary-card .woocommerce-product-details__short-description {
	color: #55504a;
	line-height: 1.7;
	margin: 0 0 1.5em;
}
.wc-coa-summary-card .woocommerce-product-details__short-description p {
	margin: 0 0 0.75em;
}

/* Variations table (variable products) */
.wc-coa-summary-card table.variations {
	width: 100%;
	margin: 0 0 1em;
}
.wc-coa-summary-card table.variations td.label {
	font-weight: 600;
	color: #2c2620;
	padding-bottom: 0.4em;
}
.wc-coa-summary-card .variations select {
	width: 100%;
	max-width: 320px;
	padding: 0.6em 0.8em;
	background: #fff;
	border: 1px solid #e6ddd4;
	border-radius: 10px;
	font-size: 1em;
}
.wc-coa-summary-card .woocommerce-variation-price .price {
	font-size: 1.3em;
	margin: 0.5em 0;
}
.wc-coa-summary-card a.reset_variations {
	display: inline-block;
	margin-top: 0.5em;
	font-size: 0.85em;
	color: #9a8f85;
}

/* Quantity + Add to cart row */
.wc-coa-summary-card form.cart {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75em;
	margin: 0 0 1.25em;
}
.wc-coa-summary-card .quantity {
	margin: 0;
}
.wc-coa-summary-card .quantity .qty {
	width: 70px;
	padding: 0.65em 0.6em;
	background: #fff;
	border: 1px solid #e6ddd4;
	border-radius: 10px;
	font-size: 1em;
	text-align: center;
}
.wc-coa-summary-card .single_add_to_cart_button.button {
	background: #6A8B48 !important;
	color: #FFF9F8 !important;
	border: none !important;
	border-radius: 999px;
	padding: 0.75em 1.8em;
	font-weight: 600;
	font-size: 1em;
	text-decoration: none;
	opacity: 1 !important;
	transition: background-color 0.15s ease;
}
.wc-coa-summary-card .single_add_to_cart_button.button:hover {
	background: #597639 !important;
	color: #FFF9F8 !important;
}
.wc-coa-summary-card .single_add_to_cart_button.button.disabled {
	background: #c9c2b8 !important;
	color: #fff !important;
	cursor: not-allowed;
}

/* SKU / categories meta row */
.wc-coa-summary-card .product_meta {
	font-size: 0.88em;
	color: #7a7168;
	padding-top: 1em;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.wc-coa-summary-card .product_meta > span {
	display: block;
	margin-bottom: 0.3em;
}
.wc-coa-summary-card .product_meta a {
	color: #6A8B48;
	text-decoration: none;
}
.wc-coa-summary-card .product_meta a:hover {
	text-decoration: underline;
}

/* ---------- Product Details section ---------- */
.wc-coa-detail-section {
	margin: 0 0 2.5em;
}
.wc-coa-detail-content {
	line-height: 1.7;
}

/* ---------- Card treatment: COA, Reviews & Related Products ----------
 * Brand palette: #FDF4EE page background, #F7EDE4 for every card (COA,
 * Reviews, Related Products, the lookup page, and the summary "buy box"),
 * #6A8B48 for buttons — so the whole product page reads as one system.
 */
.wc-coa-card {
	margin: 0 0 2em;
	padding: 2.5em clamp(1.25em, 4vw, 2.5em);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.wc-coa-card:last-child {
	margin-bottom: 0;
}
.wc-coa-card--coa,
.wc-coa-card--reviews,
.wc-coa-card--related {
	background: #F7EDE4;
}

/* ---------- COA section ---------- */
.wc-coa-section {
	scroll-margin-top: 90px; /* keeps a sticky header from covering the anchor target */
}
.wc-coa-latest-report {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 1em;
}
a.wc-coa-download-btn.button {
	display: inline-block;
	background: #6A8B48 !important;
	color: #FFF9F8 !important;
	border: none;
	border-radius: 999px;
	padding: 0.65em 1.3em;
	font-weight: 600;
	text-decoration: none;
}
a.wc-coa-download-btn.button:hover {
	background: #597639 !important;
	color: #FFF9F8 !important;
}
.wc-coa-latest-meta {
	color: #555;
	font-size: 0.95em;
}

.wc-coa-accordion {
	margin: 1em 0 1.5em;
	background: #fff;
	border: 1px solid #ecdfd2;
	border-radius: 10px;
	padding: 0.85em 1.1em;
}
.wc-coa-accordion summary {
	cursor: pointer;
	font-weight: 600;
	color: #2c2620;
	list-style: none;
}
.wc-coa-accordion summary::-webkit-details-marker {
	display: none;
}
.wc-coa-accordion summary::before {
	content: '▸';
	display: inline-block;
	margin-right: 0.5em;
	color: #6A8B48;
	transition: transform 0.15s ease;
}
.wc-coa-accordion[open] summary::before {
	transform: rotate(90deg);
}
.wc-coa-older-list {
	list-style: none;
	margin: 0.85em 0 0;
	padding: 0;
}
.wc-coa-older-list li {
	padding: 0.55em 0;
	border-top: 1px solid #f2e9df;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.wc-coa-older-list li:first-child {
	border-top: none;
}
.wc-coa-older-list a {
	color: #4d6b34;
}
.wc-coa-older-date {
	color: #9a8f85;
	font-size: 0.9em;
}

table.wc-coa-kv-table {
	width: 100%;
	max-width: 640px;
	border-collapse: collapse;
	margin-top: 1em;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
table.wc-coa-kv-table th,
table.wc-coa-kv-table td {
	text-align: left;
	padding: 0.7em 1em;
	border: 1px solid #f2e9df;
	color: #2c2620;
}
table.wc-coa-kv-table th {
	width: 40%;
	background: rgba(106, 139, 72, 0.12);
	color: #3f5a29;
	font-weight: 600;
}
table.wc-coa-kv-table tr:nth-child(even) td {
	background: #fbf6f0;
}

/* ---------- Reviews section ---------- */
.wc-coa-average-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 1em;
}
.wc-coa-rating-count {
	color: #777;
	font-size: 0.9em;
}
/* WooCommerce's native comments_template() prints its own "Reviews" title —
   we already show one above the average rating, so hide the duplicate. */
.wc-coa-reviews-section .woocommerce-Reviews-title {
	display: none;
}
.wc-coa-reviews-section #review_form_wrapper textarea,
.wc-coa-reviews-section #review_form_wrapper input[type="text"],
.wc-coa-reviews-section #review_form_wrapper input[type="email"] {
	background: #fff;
}

/* ---------- COA lookup page ( [wc_coa_lookup] ) ---------- */
.wc-coa-lookup {
	width: 80%;
	max-width: 1400px;
	margin: 0 auto;
}
@media (max-width: 600px) {
	.wc-coa-lookup {
		width: 100%;
	}
}
.wc-coa-card--lookup {
	background: #F7EDE4;
}
.wc-coa-lookup-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.6em;
	font-size: 1.05em;
}
.wc-coa-lookup-controls {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.wc-coa-lookup-select {
	flex: 1 1 280px;
	min-width: 220px;
	padding: 0.65em 0.8em;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e6ddd4;
	border-radius: 10px;
	font-size: 1.05em;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.wc-coa-lookup-select:focus {
	outline: none;
	border-color: #c9b8a6;
	box-shadow: 0 0 0 3px rgba(201, 184, 166, 0.25);
}
.wc-coa-lookup-btn {
	flex: 0 0 auto;
}
.wc-coa-lookup-btn.button {
	background: #6A8B48 !important;
	color: #FFF9F8 !important;
	border: none;
	border-radius: 999px;
	padding: 0.65em 1.3em;
	font-weight: 600;
}
.wc-coa-lookup-btn.button:hover {
	background: #597639 !important;
	color: #FFF9F8 !important;
}
.wc-coa-lookup-message {
	margin-top: 0.75em;
	color: #b32d2e;
	font-size: 0.95em;
}
.wc-coa-lookup-results {
	margin-top: 1.75em;
}
.wc-coa-lookup-empty,
.wc-coa-lookup-loading {
	color: #7a7168;
}
.wc-coa-lookup-result-heading {
	margin: 0 0 1em;
	font-weight: 600;
	font-size: 1.05em;
	color: #2c2620;
}

/* ---------- COA lookup results: grid of report cards ---------- */
.wc-coa-report-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1em;
}
.wc-coa-report-card {
	background: #fff;
	border: 1px solid #eee1d8;
	border-radius: 12px;
	padding: 1.25em;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.wc-coa-report-card--latest {
	border-color: #d8b98f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.wc-coa-report-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.wc-coa-report-index {
	font-size: 0.85em;
	color: #9a8f85;
	font-weight: 600;
}
.wc-coa-report-badge {
	background: #F1E7DE;
	color: #7a5a2e;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.25em 0.6em;
	border-radius: 999px;
}
.wc-coa-report-date {
	margin: 0;
	font-weight: 600;
	color: #2c2620;
}
.wc-coa-report-label {
	margin: 0;
	color: #6b6259;
	font-size: 0.92em;
	overflow-wrap: anywhere;
}
a.wc-coa-report-download.button {
	margin-top: auto;
	text-align: center;
	background: #6A8B48 !important;
	color: #FFF9F8 !important;
	border: none;
	border-radius: 999px;
	padding: 0.6em 1.1em;
	font-weight: 600;
	text-decoration: none;
}
a.wc-coa-report-download.button:hover {
	background: #597639 !important;
	color: #FFF9F8 !important;
}
