/* =========================================================================
   Regnum × Hrvatska priča – blok proizvoda s blagajnom
   Grimiz iz Hrvatske priče, krem iz Regnuma.
   Tipografija se namjerno nasljeđuje iz teme.
   ====================================================================== */

.rhv-product {
	--rhv-crimson: #941c1c;
	--rhv-crimson-dark: #6e1313;
	--rhv-cream: #fff4d7;
	--rhv-cream-deep: #f5e6bd;
	--rhv-ink: #1b1512;
	--rhv-muted: #6b6058;
	--rhv-line: rgba(27, 21, 18, 0.14);
	--rhv-gold: #c19239;
	--rhv-radius: 4px;

	display: grid;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
	color: var(--rhv-ink);
}

@media (min-width: 860px) {
	.rhv-product.is-layout-split {
		grid-template-columns: 1fr 1fr;
	}

	.rhv-product.has-sticky-media .rhv-product__media {
		position: sticky;
		top: 2rem;
	}
}

.rhv-product :where(h2, h3, p, ul, ol) {
	margin: 0;
}

.rhv-setup {
	padding: 1.5rem;
	border: 2px dashed #941c1c;
	border-radius: 4px;
}

.rhv-product :where(button, a, input, select):focus-visible {
	outline: 3px solid var(--rhv-gold);
	outline-offset: 2px;
}

/* ---------- Slika ---------- */

.rhv-product__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--rhv-radius);
	background: #fff;
}

.rhv-thumbs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem;
	margin-top: 0.6rem;
	padding: 0;
	list-style: none;
}

/* ---------- Tekst ---------- */

.rhv-product__body {
	display: grid;
	gap: 1.6rem;
}

.rhv-product__title {
	font-size: clamp(1.6rem, 3.4vw, 2.3rem);
	line-height: 1.15;
}

.rhv-shortdesc {
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--rhv-muted);
}

.rhv-shortdesc p + p {
	margin-top: 0.8em;
}

/* ---------- Cijena i humanitarna nota ---------- */

.rhv-split {
	padding: 1.4rem 1.5rem 1.6rem;
	background: #fff;
	border: 1px solid var(--rhv-line);
	border-left: 4px solid var(--rhv-crimson);
	border-radius: var(--rhv-radius);
}

.rhv-split__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6rem;
	font-size: clamp(1.8rem, 4vw, 2.4rem);
	font-weight: 700;
	line-height: 1;
}

.rhv-split__price span {
	font-size: 0.82rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--rhv-muted);
}

.rhv-split__bar {
	display: flex;
	gap: 3px;
	height: 10px;
	margin: 1.1rem 0 0.9rem;
}

.rhv-split__bar > span {
	border-radius: 2px;
}

.rhv-split__shirt {
	background: var(--rhv-ink);
}

.rhv-split__gift {
	background: var(--rhv-crimson);
}

.rhv-split__legend {
	display: grid;
	gap: 0.45rem;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--rhv-muted);
}

.rhv-split__legend li {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
}

.rhv-split__legend i {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	transform: translateY(1px);
}

.rhv-split__legend .is-shirt { background: var(--rhv-ink); }
.rhv-split__legend .is-gift  { background: var(--rhv-crimson); }
.rhv-split__legend strong    { color: var(--rhv-ink); }

.rhv-split__promise {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rhv-line);
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--rhv-muted);
}

.rhv-split__promise strong {
	color: var(--rhv-ink);
}

/* ---------- Odabir veličina ---------- */

.rhv-picker {
	display: grid;
	gap: 1.2rem;
}

.rhv-picker[aria-busy="true"] {
	opacity: 0.55;
	pointer-events: none;
}

.rhv-field {
	display: grid;
	gap: 0.65rem;
}

.rhv-field__label {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.rhv-grid__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.45rem 0.5rem 0.45rem 0.9rem;
	background: #fff;
	border: 1.5px solid var(--rhv-line);
	border-radius: var(--rhv-radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rhv-grid__row.is-chosen {
	border-color: var(--rhv-crimson);
	box-shadow: inset 3px 0 0 var(--rhv-crimson);
}

.rhv-grid__row.is-gone {
	background: transparent;
	opacity: 0.5;
}

.rhv-grid__label {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.rhv-grid__row.is-gone .rhv-grid__label {
	text-decoration: line-through;
}

.rhv-grid__gone {
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-qty {
	display: inline-flex;
	align-items: stretch;
	background: #fff;
	border: 1.5px solid var(--rhv-line);
	border-radius: var(--rhv-radius);
	overflow: hidden;
}

.rhv-product .rhv-qty__btn {
	width: 2.4rem;
	font-size: 1.05rem;
	color: var(--rhv-ink);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.rhv-product .rhv-qty__btn:hover {
	background: var(--rhv-cream-deep);
}

.rhv-product .rhv-qty__input {
	width: 3rem;
	padding: 0.6rem 0;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	background: transparent;
	border: 0;
	border-inline: 1.5px solid var(--rhv-line);
	-moz-appearance: textfield;
	appearance: textfield;
}

.rhv-qty__input::-webkit-outer-spin-button,
.rhv-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rhv-tally {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 0.9rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rhv-line);
}

.rhv-tally__count {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-tally__sum {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
}

.rhv-picker__status {
	min-height: 1.2em;
	font-size: 0.88rem;
	color: var(--rhv-muted);
}

.rhv-picker__status.is-error {
	color: var(--rhv-crimson);
	font-weight: 600;
}

/* ---------- Blagajna ---------- */

.rhv-checkout {
	scroll-margin-top: 90px;
}

.rhv-checkout__heading {
	margin-bottom: 1rem;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-checkout__placeholder {
	padding: 2rem;
	text-align: center;
	color: var(--rhv-muted);
	background: var(--rhv-cream);
	border: 1px dashed var(--rhv-line);
	border-radius: var(--rhv-radius);
}

.rhv-checkout__lock {
	margin-bottom: 1rem;
	padding: 0.9rem 1.1rem;
	font-size: 0.92rem;
	color: var(--rhv-ink);
	background: var(--rhv-cream);
	border-left: 4px solid var(--rhv-crimson);
	border-radius: var(--rhv-radius);
}

.rhv-checkout.is-locked .rhv-checkout__form {
	opacity: 0.35;
	pointer-events: none;
	filter: grayscale(1);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.rhv-checkout .col2-set,
.rhv-checkout #customer_details,
.rhv-checkout #order_review,
.rhv-checkout .woocommerce-checkout-review-order {
	display: block;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin-inline: 0 !important;
}

.rhv-checkout #customer_details .col-1,
.rhv-checkout #customer_details .col-2 {
	width: 100% !important;
	float: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.rhv-checkout .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem 1rem;
}

@media (max-width: 620px) {
	.rhv-checkout .woocommerce-billing-fields__field-wrapper {
		grid-template-columns: 1fr;
	}
}

.rhv-checkout .form-row {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.rhv-checkout .form-row-wide,
.rhv-checkout #billing_address_1_field,
.rhv-checkout #billing_email_field {
	grid-column: 1 / -1;
}

.rhv-checkout .form-row label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-checkout .form-row .required {
	color: var(--rhv-crimson);
	text-decoration: none;
}

.rhv-checkout :where(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea, .select2-selection) {
	width: 100%;
	padding: 0.8rem 0.9rem !important;
	font-size: 1rem;
	color: var(--rhv-ink);
	background: #fff;
	border: 1.5px solid var(--rhv-line) !important;
	border-radius: var(--rhv-radius) !important;
	box-shadow: none;
}

.rhv-checkout :where(input, select, textarea):focus {
	border-color: var(--rhv-crimson) !important;
}

.rhv-checkout .description {
	margin-top: 0.3rem;
	font-size: 0.82rem;
	color: var(--rhv-muted);
}

.rhv-checkout #order_review_heading {
	margin-top: 1.8rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--rhv-line);
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rhv-muted);
}

.rhv-checkout .shop_table {
	width: 100%;
	margin-bottom: 1.4rem;
	padding: 0.4rem 1rem;
	background: #fff;
	border: 1px solid var(--rhv-line);
	border-radius: var(--rhv-radius);
	border-collapse: collapse;
}

.rhv-checkout .shop_table th,
.rhv-checkout .shop_table td {
	padding: 0.7rem 0;
	font-size: 0.95rem;
	text-align: left;
	border-bottom: 1px solid var(--rhv-line);
}

.rhv-checkout .shop_table td:last-child,
.rhv-checkout .shop_table th:last-child {
	text-align: right;
}

.rhv-checkout .order-total :where(th, td) {
	padding-top: 0.9rem;
	font-size: 1.15rem;
	font-weight: 700;
	border-bottom: 0;
}

.rhv-checkout .wc_payment_methods {
	margin: 0 0 1.4rem;
	padding: 0;
	list-style: none;
}

.rhv-checkout .wc_payment_method {
	padding: 0.85rem 1rem;
	background: #fff;
	border: 1.5px solid var(--rhv-line);
	border-radius: var(--rhv-radius);
}

.rhv-checkout .wc_payment_method + .wc_payment_method {
	margin-top: 0.6rem;
}

.rhv-checkout .wc_payment_method label {
	display: inline;
	font-weight: 600;
	cursor: pointer;
}

.rhv-checkout .payment_box {
	margin-top: 0.7rem;
	padding: 0.85rem 1rem;
	font-size: 0.9rem;
	background: var(--rhv-cream);
	border-radius: var(--rhv-radius);
}

.rhv-checkout .payment_box p:last-child {
	margin-bottom: 0;
}

.rhv-checkout #place_order {
	width: 100%;
	padding: 1.05rem 1.5rem !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--rhv-cream) !important;
	background: var(--rhv-crimson) !important;
	border: 0 !important;
	border-radius: var(--rhv-radius) !important;
	cursor: pointer;
}

.rhv-checkout #place_order:hover {
	background: var(--rhv-crimson-dark) !important;
}

.rhv-checkout .woocommerce-privacy-policy-text,
.rhv-checkout .woocommerce-terms-and-conditions-wrapper {
	font-size: 0.85rem;
	color: var(--rhv-muted);
}

.rhv-checkout :where(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
	margin: 0 0 1.2rem;
	padding: 0.9rem 1rem;
	font-size: 0.92rem;
	list-style: none;
	background: #fff;
	border-left: 4px solid var(--rhv-crimson);
	border-radius: var(--rhv-radius);
}

.rhv-checkout :where(.woocommerce-error, .woocommerce-message, .woocommerce-info, .woocommerce-NoticeGroup):empty {
	display: none !important;
}

/* ---------- Zahvala i dijagnostika ---------- */

.rhv-thankyou {
	padding: 1rem 1.2rem;
	background: #fff4d7;
	border-left: 4px solid #941c1c;
	border-radius: 4px;
}

.rhv-diag {
	padding: 0.9rem 1.1rem;
	font-size: 0.85rem;
	line-height: 1.5;
	background: #fffbe8;
	border: 1px dashed var(--rhv-crimson);
	border-radius: var(--rhv-radius);
}

.rhv-diag strong {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.74rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rhv-crimson);
}

.rhv-diag ul {
	margin: 0;
	padding-left: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
	.rhv-product * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
