/* Agroroof Commerce Suite — accessory product page (loaded only on
   products that have a Selling unit; PET calculator pages never load it). */

.agr-acc-page {
	--agr-u-forest: var(--ag-forest, #14532d);
	--agr-u-green: var(--ag-green, #4aa529);
	--agr-u-ink: var(--ag-ink, #17251c);
	--agr-u-muted: #5c6b61;
	--agr-u-line: #dfe7e1;
	--agr-u-soft: #eef6ef;
}

/* The site-wide Elementor "Hide title" setting also hides product names.
   Show the name on accessory pages — customers need to see what they buy. */
.agr-acc-page .summary h1.product_title {
	display: block !important;
	font-size: clamp(22px, 2.6vw, 30px);
	line-height: 1.2;
	margin: 0 0 10px;
	color: var(--agr-u-ink);
}

/* If the theme ever prints its own price / Add-to-cart again, keep only ours. */
.agr-acc-page .summary > .price,
.agr-acc-page .summary > form.cart,
.agr-acc-page .summary > .woocommerce-product-details__short-description,
.agr-acc-page .ast-sticky-add-to-cart {
	display: none !important;
}

.agr-buy {
	box-sizing: border-box;
	max-width: 520px;
	margin: 4px 0 24px;
	color: var(--agr-u-ink);
	font-size: 15px;
}
.agr-buy *, .agr-buy *::before, .agr-buy *::after { box-sizing: border-box; }

.agr-buy__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}
.agr-buy__now {
	font-size: clamp(28px, 3.4vw, 36px);
	font-weight: 800;
	color: var(--agr-u-forest);
	letter-spacing: -0.01em;
}
.agr-buy__unit { font-size: 17px; font-weight: 600; color: var(--agr-u-muted); }
.agr-buy__was { color: var(--agr-u-muted); font-size: 16px; }
.agr-buy__save {
	background: #fff1d6;
	color: #8a5300;
	font-size: 13px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 10px;
}
.agr-buy__tax { margin: 4px 0 16px; color: var(--agr-u-muted); font-size: 13.5px; }

.agr-buy__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--agr-u-muted); margin-bottom: 8px; }

.agr-buy__packs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
	gap: 8px;
	margin-bottom: 14px;
}
.agr-buy .agr-buy__pack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	background: #fff;
	color: var(--agr-u-ink);
	border: 1.5px solid var(--agr-u-line);
	border-radius: 12px;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.agr-buy .agr-buy__pack strong { font-size: 15px; font-weight: 800; }
.agr-buy .agr-buy__pack span { font-size: 13px; color: var(--agr-u-muted); }
.agr-buy .agr-buy__pack:hover { border-color: var(--agr-u-green); background: #fff; color: var(--agr-u-ink); }
.agr-buy .agr-buy__pack.is-on {
	border-color: var(--agr-u-forest);
	background: var(--agr-u-soft);
	box-shadow: inset 0 0 0 1px var(--agr-u-forest);
}

.agr-buy__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
	background: #f6f8f6;
	border-radius: 14px;
	margin-bottom: 12px;
}
.agr-buy__qty { display: flex; align-items: center; gap: 6px; }
.agr-buy .agr-buy__step {
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--agr-u-line);
	border-radius: 10px;
	background: #fff;
	color: var(--agr-u-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.agr-buy .agr-buy__step:hover { border-color: var(--agr-u-forest); background: #fff; color: var(--agr-u-forest); }
.agr-buy__qty input[type="number"] {
	width: 84px;
	height: 42px;
	margin: 0;
	padding: 0 6px;
	border: 1.5px solid var(--agr-u-line);
	border-radius: 10px;
	background: #fff;
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	-moz-appearance: textfield;
}
.agr-buy__qty input::-webkit-outer-spin-button,
.agr-buy__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.agr-buy__qtyunit { font-weight: 700; color: var(--agr-u-muted); margin-left: 2px; }
.agr-buy__total { text-align: right; line-height: 1.2; }
.agr-buy__total span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--agr-u-muted); }
.agr-buy__total strong { font-size: 22px; font-weight: 800; color: var(--agr-u-forest); }

.agr-buy__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agr-buy .agr-buy__btn {
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 16px;
	border-radius: 12px;
	font: inherit;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	transition: filter .15s, background .15s;
}
.agr-buy .agr-buy__btn--cart { background: #fff; color: var(--agr-u-forest); border: 2px solid var(--agr-u-forest); }
.agr-buy .agr-buy__btn--cart:hover { background: var(--agr-u-soft); color: var(--agr-u-forest); }
.agr-buy .agr-buy__btn--now { background: var(--agr-u-green); color: #fff; border: 2px solid var(--agr-u-green); }
.agr-buy .agr-buy__btn--now:hover { filter: brightness(.94); background: var(--agr-u-green); color: #fff; }

.agr-buy__wa {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	font-weight: 700;
	color: #128c4b;
	text-decoration: none;
}
.agr-buy__wa::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #25d366; }
.agr-buy__wa:hover { text-decoration: underline; }

.agr-buy__oos { padding: 12px 14px; border-radius: 12px; background: #fff4e5; color: #8a5300; font-weight: 600; }
.agr-buy__desc { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--agr-u-line); color: var(--agr-u-ink); }
.agr-buy__desc p:last-child { margin-bottom: 0; }

.agr-per { font-size: .85em; font-weight: 600; color: var(--agr-u-muted, #5c6b61); }

@media (max-width: 544px) {
	.agr-buy__total { text-align: left; }
	.agr-buy__row { flex-direction: column; align-items: stretch; }
	.agr-buy__qty { justify-content: space-between; }
	.agr-buy__qty input[type="number"] { flex: 1; }
}

/* ---------- Added-to-cart confirmation (inside the buy box) ---------- */
/* The plain WooCommerce success bar is replaced by the card below on
   accessory pages; error notices (e.g. minimum quantity) still show. */
.agr-acc-page .woocommerce-notices-wrapper .woocommerce-message { display: none !important; }

.agr-added {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 14px;
	margin: 0 0 16px;
	padding: 12px 14px;
	background: var(--agr-u-soft);
	border: 1.5px solid #bfdcc6;
	border-radius: 14px;
	animation: agr-added-in .35s ease;
}
.agr-added__text { display: flex; align-items: center; gap: 10px; }
.agr-added__text strong { display: block; font-size: 15px; color: var(--agr-u-forest); }
.agr-added__text span:not(.agr-added__tick) { display: block; font-size: 13px; color: var(--agr-u-muted); }
.agr-added__tick {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--agr-u-green);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
}
.agr-added__links { display: flex; gap: 8px; }
.agr-added__links a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 0 14px;
	border-radius: 10px;
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
}
.agr-added__cart { background: #fff; color: var(--agr-u-forest); border: 1.5px solid var(--agr-u-forest); }
.agr-added__checkout { background: var(--agr-u-forest); color: #fff; border: 1.5px solid var(--agr-u-forest); }
.agr-added__cart:hover { color: var(--agr-u-forest); background: #fff; }
.agr-added__checkout:hover { color: #fff; filter: brightness(1.1); }
@keyframes agr-added-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 544px) {
	.agr-added__links { width: 100%; }
	.agr-added__links a { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .agr-added { animation: none; } }

.agr-err { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fdecea; border: 1.5px solid #f3b9b2; color: #8a1c12; font-weight: 600; font-size: 14px; }
.agr-buy .agr-buy__btn.is-busy { opacity: .7; cursor: progress; }
