/* QT WooCommerce Product Bundles – front end. Uses logical properties so RTL works automatically. */

.qtpb-form {
	display: block;
	margin-block: 1em 1.5em;
}

.qtpb-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-block-end: 1em;
}

.qtpb-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.6);
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.qtpb-item--unselected {
	opacity: 0.6;
}

.qtpb-item__thumb {
	flex: 0 0 80px;
	max-width: 80px;
}

.qtpb-item__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.qtpb-item__details {
	flex: 1 1 auto;
	min-width: 0;
}

.qtpb-item__title {
	margin: 0 0 4px;
	font-size: 1em;
	line-height: 1.35;
}

.qtpb-item__title a {
	text-decoration: none;
}

.qtpb-item__qty-label {
	font-weight: 600;
	margin-inline-end: 2px;
}

.qtpb-item__badge {
	display: inline-block;
	margin-inline-start: 6px;
	padding: 1px 8px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.07);
	vertical-align: middle;
}

.qtpb-item__desc {
	font-size: 0.9em;
	opacity: 0.85;
}

.qtpb-item__desc p {
	margin: 0 0 4px;
}

.qtpb-item__price {
	margin-block: 2px 6px;
	font-size: 0.95em;
}

.qtpb-item__price del {
	opacity: 0.6;
	margin-inline-end: 4px;
}

.qtpb-item__price ins {
	text-decoration: none;
	font-weight: 600;
}

.qtpb-included {
	font-weight: 600;
	color: #2e7d32;
}

.qtpb-item__optional {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: 600;
	margin-block-end: 6px;
}

.qtpb-item__config {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: flex-end;
}

.qtpb-item__variations {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.qtpb-item__attribute,
.qtpb-item__quantity {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.qtpb-item__attribute label,
.qtpb-item__quantity label {
	font-size: 0.8em;
	font-weight: 600;
	opacity: 0.8;
}

.qtpb-item__attribute select {
	min-width: 140px;
	max-width: 100%;
}

.qtpb-item__locked-value {
	font-weight: 600;
}

/* Quantity box: WooCommerce-standard markup; the theme styles it. When the theme adds no
   +/- buttons of its own, the plugin adds them and the .qtpb-has-stepper styles below apply. */
.qtpb-form .qtpb-quantity {
	margin: 0;
	float: none;
}

.qtpb-form .qtpb-quantity input.qtpb-item__qty {
	width: 4.5em;
	text-align: center;
}

.qtpb-form .qtpb-quantity.qtpb-has-stepper {
	display: inline-flex !important;
	align-items: stretch;
	flex-wrap: nowrap;
	width: auto;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	color: #222;
}

.qtpb-form .qtpb-quantity.qtpb-has-stepper input.qtpb-item__qty {
	display: block !important;
	visibility: visible !important;
	width: 3.2em !important;
	min-width: 0;
	height: auto;
	margin: 0 !important;
	padding: 6px 2px;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: inherit;
	font-size: 1em;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.qtpb-form .qtpb-quantity.qtpb-has-stepper input.qtpb-item__qty::-webkit-outer-spin-button,
.qtpb-form .qtpb-quantity.qtpb-has-stepper input.qtpb-item__qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.qtpb-form .qtpb-quantity .qtpb-qty__btn,
.qtpb-form .qtpb-quantity .qtpb-qty__btn:hover,
.qtpb-form .qtpb-quantity .qtpb-qty__btn:focus,
.qtpb-form .qtpb-quantity .qtpb-qty__btn:active {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	min-width: 2.4em;
	min-height: 2.4em;
	margin: 0 !important;
	padding: 0 8px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #f2f2f2 !important;
	color: #222 !important;
	font-size: 1.1em !important;
	font-weight: 600;
	line-height: 1 !important;
	text-decoration: none;
	text-indent: 0 !important;
	cursor: pointer;
	box-shadow: none !important;
	outline: none;
}

.qtpb-form .qtpb-quantity .qtpb-qty__btn:hover:not(:disabled) {
	background: #e2e2e2 !important;
}

.qtpb-form .qtpb-quantity .qtpb-qty__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.qtpb-form .qtpb-quantity .qtpb-qty__btn:focus-visible {
	outline: 2px solid #222;
	outline-offset: -3px;
}

.qtpb-item__availability .stock {
	margin: 4px 0 0;
	font-size: 0.85em;
}

/* Grid layout */
.qtpb-layout-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.qtpb-layout-grid .qtpb-item {
	flex-direction: column;
}

.qtpb-layout-grid .qtpb-item__thumb {
	flex: none;
	max-width: 100%;
	width: 100%;
}

/* Summary */
.qtpb-summary {
	margin-block-end: 1em;
}

.qtpb-total {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: baseline;
	font-size: 1.15em;
}

.qtpb-total__label {
	font-weight: 600;
}

.qtpb-total__price del {
	opacity: 0.6;
	margin-inline-end: 4px;
}

.qtpb-total__price ins {
	text-decoration: none;
}

.qtpb-errors ul.woocommerce-error {
	margin: 0.75em 0 0;
}

.qtpb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.qtpb-form .single_add_to_cart_button.disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Cart / checkout / orders grouping */
.qtpb-bundled-cart-item .product-name,
.qtpb-bundled-order-item .product-name,
.qtpb-bundled-order-item td:first-child {
	padding-inline-start: 2em !important;
}

.qtpb-bundled-cart-item .product-thumbnail img {
	max-width: 40px;
	opacity: 0.9;
}

.qtpb-bundled-cart-item td,
.qtpb-bundled-order-item td {
	font-size: 0.92em;
	border-block-start-style: dashed;
}

.qtpb-bundled-cart-item .product-remove a {
	display: none;
}

.qtpb-bundled-cart-item .qtpb-child-price {
	opacity: 0.7;
}

.qtpb-bundle-part-of {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
}

/* Cart & checkout blocks */
.wc-block-cart-items__row.qtpb-bundled-cart-item .wc-block-cart-item__product,
.wc-block-components-order-summary-item.qtpb-bundled-cart-item {
	padding-inline-start: 1.5em;
}

.wc-block-cart-items__row.qtpb-bundled-cart-item .wc-block-cart-item__image img {
	max-width: 48px;
}

.qtpb-hide-price .wc-block-cart-item__prices,
.qtpb-hide-price .wc-block-cart-item__total .wc-block-components-product-price,
.qtpb-hide-price .wc-block-components-order-summary-item__individual-prices,
.qtpb-hide-price .wc-block-components-order-summary-item__total-price {
	visibility: hidden;
}

.qtpb-bundled-cart-item .wc-block-cart-item__remove-link {
	display: none !important;
}

@media (max-width: 600px) {
	.qtpb-item__thumb {
		flex-basis: 60px;
		max-width: 60px;
	}

	.qtpb-item__attribute select {
		min-width: 0;
		width: 100%;
	}

	.qtpb-item__variations,
	.qtpb-item__attribute {
		width: 100%;
	}
}
