/* MyUrvija Product Bundles — matches screenshot design, theme color #6D4223 */

/* === Bundle wrapper === */
.mub-bundle {
	margin: 20px 0;
	font-family: inherit;
}

.mub-heading {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 4px;
	color: #111;
}

.mub-help {
	font-size: 13px;
	color: #777;
	margin: 0 0 16px;
}

/* === Item list === */
.mub-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* === Individual item card === */
.mub-item {
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s;
}

.mub-item.mub-item-active {
	border-color: #6D4223;
}

.mub-item.mub-item-oos {
	opacity: 0.6;
}

/* === Top section: image left, info right === */
.mub-item-top {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 16px 12px;
}

.mub-item-thumb {
	width: 80px;
	height: 80px;
	flex: 0 0 80px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f0eb;
}

.mub-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mub-item-info {
	flex: 1 1 auto;
	min-width: 0;
}

.mub-item-name {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	line-height: 1.35;
	margin: 0 0 5px;
}

.mub-item-desc {
	font-size: 13px;
	color: #555;
	line-height: 1.5;
	margin: 0 0 8px;
}

.mub-item-oos-label {
	font-size: 12px;
	font-weight: 600;
	color: #c0392b;
	margin: 0 0 6px;
}

/* View Details link — matches design exactly */
.mub-view-details-link,
a.mub-view-details-link,
.mub-item .mub-view-details-link {
	display: inline-block !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #6D4223 !important;
	text-decoration: none !important;
	cursor: pointer !important;
	border: none !important;
	background: none !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1.4 !important;
	transition: opacity 0.15s !important;
}

.mub-view-details-link:hover,
a.mub-view-details-link:hover {
	opacity: 0.75 !important;
	text-decoration: none !important;
	color: #6D4223 !important;
}

/* === Bottom stepper — full width with border top === */
.mub-item-bottom {
	border-top: 1px solid #ebebeb;
	padding: 0;
}

.mub-stepper {
	display: flex !important;
	align-items: stretch !important;
	width: 100% !important;
	height: 48px !important;
	background: #fafafa !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
}

button.mub-minus,
button.mub-plus,
.mub-stepper button.mub-minus,
.mub-stepper button.mub-plus {
	flex: 0 0 52px !important;
	width: 52px !important;
	height: 48px !important;
	min-width: 52px !important;
	max-width: 52px !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #333 !important;
	font-size: 22px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	transition: background-color 0.15s !important;
}

button.mub-minus:hover:not(:disabled),
button.mub-plus:hover:not(:disabled),
.mub-stepper button.mub-minus:hover:not(:disabled),
.mub-stepper button.mub-plus:hover:not(:disabled) {
	background: #f0f0f0 !important;
}

button.mub-minus:disabled,
button.mub-plus:disabled,
.mub-stepper button.mub-minus:disabled,
.mub-stepper button.mub-plus:disabled {
	opacity: 0.3 !important;
	cursor: not-allowed !important;
}

.mub-qty-display {
	flex: 1 1 auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #111 !important;
	background: transparent !important;
	user-select: none !important;
	border-left: 1px solid #e4e4e4 !important;
	border-right: 1px solid #e4e4e4 !important;
}

/* Hidden real input — keeps form submission working */
input.mub-qty-input {
	display: none !important;
}

/* === Status bar at bottom — matches screenshot === */
.mub-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
}

.mub-bag-icon {
	color: #6D4223;
	flex: 0 0 auto;
}

.mub-status-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mub-status-text strong {
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

.mub-status-hint {
	font-size: 12.5px;
	color: #777;
}

.mub-error {
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #c0392b;
	min-height: 0;
}

form.cart .single_add_to_cart_button.mub-not-ready {
	opacity: 0.55;
	cursor: not-allowed;
}

form.cart .single_add_to_cart_button.mub-selection-complete::before {
	content: "\2713 ";
}

/* =====================================================
   QUICK VIEW MODAL
   Always appended to <body> by JS so Woodmart theme
   overflow/z-index on form containers doesn't trap it
   ===================================================== */
#mub-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

#mub-modal-overlay.mub-open {
	opacity: 1;
	visibility: visible;
}

.mub-modal-box {
	position: relative;
	width: 100%;
	max-width: 800px;
	max-height: 92vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow-y: auto;
	transform: translateY(14px) scale(0.98);
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#mub-modal-overlay.mub-open .mub-modal-box {
	transform: translateY(0) scale(1);
}

.mub-modal-close-btn {
	position: absolute !important;
	top: 12px !important;
	right: 12px !important;
	z-index: 5 !important;
	width: 32px !important;
	height: 32px !important;
	border-radius: 50% !important;
	border: 1px solid #ddd !important;
	background: #fff !important;
	color: #555 !important;
	font-size: 20px !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	line-height: 1 !important;
	box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
	transition: background 0.15s !important;
}

.mub-modal-close-btn:hover {
	background: #6D4223 !important;
	color: #fff !important;
	border-color: #6D4223 !important;
}

.mub-modal-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	padding: 28px;
}

/* Gallery */
.mub-modal-gallery {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mub-modal-main-img-wrap {
	position: relative;
	aspect-ratio: 1;
	border-radius: 10px;
	overflow: hidden;
	background: #f5f0eb;
	border: 1px solid #eee;
}

.mub-modal-main-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.mub-gal-prev,
.mub-gal-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.92);
	color: #6D4223;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.14);
}

.mub-gal-prev { left: 8px; }
.mub-gal-next { right: 8px; }

.mub-modal-thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
}

.mub-modal-thumb {
	width: 54px;
	height: 54px;
	flex: 0 0 54px;
	border-radius: 6px;
	border: 2px solid #eee;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.65;
	transition: border-color 0.15s, opacity 0.15s;
}

.mub-modal-thumb.active,
.mub-modal-thumb:hover {
	border-color: #6D4223;
	opacity: 1;
}

.mub-modal-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Modal details panel */
.mub-modal-details {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mub-modal-title {
	font-size: 21px;
	font-weight: 700;
	color: #111;
	margin: 0;
	line-height: 1.3;
}

.mub-modal-price-row {
	font-size: 19px;
	font-weight: 700;
	color: #6D4223;
}

.mub-modal-price-row del {
	color: #aaa;
	font-weight: 400;
	font-size: 15px;
	margin-right: 6px;
}

.mub-modal-price-row ins {
	text-decoration: none;
}

.mub-modal-stock-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	background: #f0e8e1;
	color: #6D4223;
}

.mub-modal-stock-badge.oos {
	background: #fde8e8;
	color: #c0392b;
}

.mub-modal-desc {
	font-size: 14px;
	color: #444;
	line-height: 1.65;
	max-height: 160px;
	overflow-y: auto;
	padding-right: 4px;
	flex: 1;
}

.mub-modal-desc p { margin: 0 0 8px; }

.mub-modal-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-top: 14px;
	border-top: 1px solid #eee;
	margin-top: auto;
}

.mub-modal-qty-label {
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

/* Stepper inside modal — same full-width bar style but constrained */
.mub-modal-stepper {
	display: flex;
	align-items: stretch;
	height: 40px;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	overflow: hidden;
	background: #fafafa;
}

.mub-modal-stepper button {
	flex: 0 0 40px;
	width: 40px;
	border: none;
	background: transparent;
	color: #333;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.mub-modal-stepper button:hover:not(:disabled) {
	background: #f0ebe6;
}

.mub-modal-stepper button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.mub-modal-qty-val {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 700;
	color: #111;
	border-left: 1px solid #e4e4e4;
	border-right: 1px solid #e4e4e4;
	min-width: 50px;
}

/* === Mobile bar === */
#mub-mobile-bar {
	display: none;
	position: fixed;
	bottom: 0; left: 0; right: 0;
	z-index: 99999;
	background: #fff;
	border-top: 1px solid #e4e4e4;
	padding: 10px 16px;
	box-shadow: 0 -3px 12px rgba(0,0,0,0.1);
}

#mub-mobile-bar.mub-bar-visible { display: block; }

#mub-mobile-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#mub-mobile-bar-count { font-size: 14px; font-weight: 700; color: #6D4223; }
#mub-mobile-bar-error { font-size: 13px; font-weight: 600; color: #c0392b; }

@media (max-width: 640px) {
	.mub-modal-inner {
		grid-template-columns: 1fr;
		padding: 18px;
		gap: 18px;
	}
	.mub-modal-title { font-size: 18px; }
}

@media (max-width: 768px) {
	body.mub-bar-active { padding-bottom: 60px; }
}
