/* ─────────────────────────────────────────────────────────────────────────
 * Product Pricing UI
 * Single-product price + subscription block.
 * Source of truth — overrides any leftover rules in style.css / plugin CSS.
 * ──────────────────────────────────────────────────────────────────────── */


/* ── Wrapper around the form ─────────────────────────────────────────── */
.senshop-atc-wrapper:has(.senshop-subscription-tabs) {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	border: 1px solid #ECEFF1;
	padding: 16px;
	background: #FFFFFF;
}

form.cart {
	gap: 0;
}


/* ── Default-price fallback (when tier config is off) ────────────────── */
.senshop-atc-wrapper__default-price {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	font-size: 32px;
}

.senshop-atc-wrapper__regular-price {
	font-size: 24px;
	opacity: 0.8;
}


/* ── Subscription tabs (Enkraten nakup / Naročnina) ──────────────────── */
.senshop-subscription-tabs {
	display: flex;
	margin: -12px -12px 22px;
	border-bottom: 1px solid #ECEFF1;
}

@media (min-width: 992px) {
	.senshop-subscription-tabs {
		margin: -16px -16px 26px;
	}
}

.senshop-subscription-tabs__button {
	flex: 1;
	display: flex;
	margin: 0;
	justify-content: center;
	align-items: center;
	padding: 16px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
	text-transform: none;
	line-height: 16px;
	background: transparent;
	border: 0;
}

.senshop-subscription-tabs__button::before {
	content: "";
	display: block;
	width: 15px;
	height: 15px;
	margin-right: 8px;
	background-color: #F6F6F6;
	border: 2px solid #ECEFF1;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.senshop-subscription-tabs__button + .senshop-subscription-tabs__button {
	border-left: 1px solid #ECEFF1;
}

.senshop-subscription-tabs__button.is-active {
	background-color: #F6F6F6;
}

.senshop-subscription-tabs__button.is-active::before {
	background-color: #415F70;
	border-color: #C6D0D4;
}


/* ── Stock + pakiranje meta row ──────────────────────────────────────── */
.senshop-atc-meta {
	display: flex;
	margin: 12px 0 12px !important;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-size: 14px;
}

.senshop-atc-meta .senshop-atc-stock-status {
	display: flex;
	align-items: center;
	gap: 8px;
	text-transform: uppercase;
}

.senshop-atc-meta .senshop-atc-stock-status::before {
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.senshop-atc-meta .senshop-atc-stock-status--instock::before  { background-color: #97AF8F; }
.senshop-atc-meta .senshop-atc-stock-status--outofstock::before { background-color: #b84e63; }
.senshop-atc-meta .senshop-atc-stock-status--backorder::before { background-color: #d4b74e; }

.senshop-atc-meta .pakiranje-opis p {
	margin: 0;
	font-size: 14px;
}


/* ── Quantity tier cards (1x / 2x / 3x) ──────────────────────────────── */
.product-quantity-container {
	margin-top: 16px;
}

.product-quantity-buttons {
	display: flex;
	gap: 14px;
	margin: 0;
}

.quantity-buttons__button-single {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 18px 8px;
	border: 1px solid rgba(65, 95, 112, 0.3);
	border-radius: 10px;
	background: #FFFFFF;
	cursor: pointer;
	position: relative;
	text-align: center;
	line-height: normal;
}

.quantity-buttons__button-single.selected {
	background-color: #F6F6F6;
	border-color: #F38A3A;
}

.quantity-buttons__product-quantity {
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.quantity-buttons__product-price {
	margin-top: 4px;
	font-size: 13px;
}

.quantity-buttons__product-price small {
	font-size: 100%;
}


/* ── Top badge (-20 %, PRILJUBLJENO, BREZPLAČNA DOSTAVA…) ─────────────── */
.quantity-buttons__top-content {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 96%;
	background: #415F70;
	border-radius: 4px;
	color: #FFFFFF;
	text-transform: uppercase;
	padding: 4px 12px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.quantity-buttons__button-single.selected .quantity-buttons__top-content {
	background: #F38A3A;
}


/* ── Bottom subtitle ribbon (PRILJUBLJENO, BREZPLAČNA DOSTAVA…) ──────── */
.quantity-buttons__subtitle {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 6px 8px;
	min-height: 42px;
	background: #415F70;
	color: #FFFFFF;
	text-transform: uppercase;
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.2;
	border-radius: 0 0 9px 9px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quantity-buttons__button-single:has(.quantity-buttons__subtitle) {
	padding-bottom: 52px;
}


/* ── Delivery interval radios (30 / 60 / 90 dni) ─────────────────────── */
.senshop-subscription-options {
	display: none;
	margin: 16px 0 0;
}

@media (min-width: 992px) {
	.senshop-subscription-options {
		margin: 20px 0 0;
	}
}

.senshop-subscription-options__label {
	margin-bottom: 8px;
	text-align: center;
	font-size: 12px;
}

@media (min-width: 992px) {
	.senshop-subscription-options__label {
		font-size: 14px;
	}

}

.senshop-subscription-options__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 14px;
}

.senshop-subscription-options__item {
	flex: 1;
	display: flex;
	margin: 0 !important;
}

.senshop-subscription-options__item label {
	display: flex;
	height: 50px;
	width: 100%;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(65, 95, 112, 0.3);
	border-radius: 8px;
	margin: 0;
	padding: 12px;
	background: #FFFFFF;
	font-size: 14px;
	cursor: pointer;
	text-align: center;
	font-weight: 400;
}

.senshop-subscription-options__item input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.senshop-subscription-options__item label:has(input:checked) {
	background-color: #F6F6F6;
	border-color: #F38A3A;
}


/* ── Bottom price summary (Redna / Prihranek / Končna) ───────────────── */
.product-price-wrapper {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0px 0 0px !important;
	align-items: stretch !important;
}

.price-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.price-summary-row .price-label {
	font-size: 16px;
	color: #7F7F7F;
	font-weight: 400;
}

.regular-price-row .regular-price-wrapper {
	text-decoration: line-through;
	color: #7F7F7F;
	font-size: 16px;
	font-weight: 400;
}

.savings-row .price-label,
.savings-row .savings-wrapper {
	color: #B84E63;
	font-size: 16px;
}

.savings-row .savings-percent {
	font-weight: 400;
}

.final-price-row {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px solid #ECEFF1;
	align-items: center;
}

.final-price-row .price-label {
	font-size: 20px;
	color: #000000;
	font-weight: 400;
}

.final-price-row .sale-price-wrapper {
	font-size: 20px;
	font-weight: 900;
	color: #000000;
	line-height: 1;
}


/* ── Hide legacy WooCommerce qty input + stock note ──────────────────── */
.cart .ux-quantity,
.add-to-cart-container > .stock {
	display: none;
}

.add-to-cart-container .quantity {
	margin: 0;
	display: none!important;
}


/* ── Best-price note ─────────────────────────────────────────────────── */
.best-price-wrapper {
	margin-top: 8px !important;
	text-align: center;
	color: #7F7F7F;
	font-size: 10px;
}


/* ── Legacy "Količina:" label emitted before the (hidden) qty input ──── */
form > div.qty {
	display: none;
}


/* ── Landing-page template colour override (page-template-Landing-page) */
.page-template-Landing-page .quantity-buttons__top-content {
	background: #9E2C52 !important;
}

.page-template-Landing-page .selected.quantity-buttons__button-single {
	background: #FFF;
	border-color: #9E2C52;
}

.page-template-Landing-page .quantity-buttons__button-single {
	border-color: #FFF;
}


/* ── Desktop badge size bump ─────────────────────────────────────────── */
@media (min-width: 850px) {
	.quantity-buttons__top-content {
		font-size: 12px;
	}
}


/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 992px) {
	.product-quantity-buttons {
		gap: 10px;
	}

	.quantity-buttons__button-single:has(.quantity-buttons__subtitle) {
		padding-bottom: 46px;
	}

	.quantity-buttons__button-single {
		padding: 16px 4px;
		min-height: 100px;
	}

	.quantity-buttons__product-quantity {
		font-size: 20px;
	}

	.quantity-buttons__subtitle {
		font-size: 10px;
		min-height: 36px;
	}
}

@media (max-width: 549px) {
	.single-product h1.product-title {
		font-size: 32px;
		line-height: 28px;
		margin-top: 12px;
		margin-bottom: 10px;
	}

	.price-summary-row .price-label,
	.regular-price-row .regular-price-wrapper,
	.savings-row .savings-wrapper {
		font-size: 16px;
	}

	.final-price-row .price-label {
		font-size: 22px;
	}

	.final-price-row .sale-price-wrapper {
		font-size: 24px;
	}
}
