/**
 * Frontend Styles
 */
.bundlerbx-offers-widget {
	margin: 30px 0;
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.bundlerbx-offer-header {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.bundlerbx-options {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 20px;
}

.bundlerbx-option {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 15px;
	padding: 20px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	box-sizing: border-box;
	width: 100%;
}

.bundlerbx-option:hover {
	border-color: #565add;
	box-shadow: 0 2px 8px rgba(86, 90, 221, 0.1);
}

.bundlerbx-option-selected {
	border-color: #565add;
	background: #e8e9f5;
	box-shadow: 0 4px 12px rgba(86, 90, 221, 0.15);
}

.bundlerbx-option-radio {
	flex-shrink: 0;
	margin-top: 5px;
}

.bundlerbx-option-radio input[type="radio"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: #565add;
}

.bundlerbx-option-content {
	flex: 1;
	width: 100%;
	position: relative;
	z-index: 1;
	overflow: visible;
}

.bundlerbx-option-header {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
	gap: 10px;
	position: relative;
	z-index: 2;
	line-height: 1.4;
}

.bundlerbx-option-header-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
}

.bundlerbx-option-header-left {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.bundlerbx-option-header-right {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.bundlerbx-badges-container {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
}

.bundlerbx-option-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
	display: inline;
}

.bundlerbx-option-badge {
	display: inline-block;
	padding: 4px 12px;
	background: #e0e0e0;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
	color: #666;
}

.bundlerbx-option-selected .bundlerbx-option-badge {
	background: #c8c9f0;
	color: #2a2a7a;
}

.bundlerbx-option-header-left {
	position: relative;
}

.bundlerbx-badges-container {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 4px;
	margin-bottom: 4px;
}

.bundlerbx-discount-banner {
	padding: 6px 15px;
	background: #4545c0;
	color: #fff;
	border-radius: 0 8px 0 8px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	transform: skewX(-10deg);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bundlerbx-discount-banner > * {
	display: inline-block;
	transform: skewX(10deg);
}

.bundlerbx-free-shipping-banner {
	padding: 6px 15px;
	background: #4caf50;
	color: #fff;
	border-radius: 0 8px 0 8px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	transform: skewX(-10deg);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bundlerbx-free-shipping-banner > * {
	display: inline-block;
	transform: skewX(10deg);
}

.bundlerbx-option-image {
	margin: 10px 0;
}

.bundlerbx-option-image img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.bundlerbx-option-pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	margin: 0;
	flex-wrap: wrap;
	text-align: right;
}

.bundlerbx-original-price {
	font-size: 16px;
	color: #999;
	text-decoration: line-through;
}

.bundlerbx-current-price {
	font-size: 24px;
	font-weight: 700;
	color: #333;
}

.bundlerbx-unit-price {
	font-size: 14px;
	color: #666;
}

.bundlerbx-variant-selector {
	margin: 0;
	padding: 15px 0 0 0;
	background: transparent;
	border-radius: 0;
	width: 100%;
	box-sizing: border-box;
	flex: 0 0 100%;
	max-width: 100%;
	order: 10;
}

.bundlerbx-variant-title {
	font-size: 14px;
	font-weight: 500;
	color: #666;
	margin-bottom: 10px;
}

.bundlerbx-variant-item {
	margin-bottom: 10px;
	padding: 0;
	background: transparent;
	border-radius: 0;
	border: none;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

.bundlerbx-variant-item:last-child {
	margin-bottom: 0;
}

.bundlerbx-variant-item > label {
	font-weight: 600;
	display: block;
	margin-bottom: 0;
	color: #333;
	font-size: 14px;
	flex-shrink: 0;
	white-space: nowrap;
	padding: 0;
}

.bundlerbx-variant-item > .bundlerbx-attributes-container {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.bundlerbx-attribute-selector {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
}

.bundlerbx-attribute-selector label {
	display: none;
}

.bundlerbx-variant-select {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	width: 100%;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bundlerbx-variant-select:hover {
	border-color: #565add;
}

.bundlerbx-variant-select:focus {
	outline: none;
	border-color: #565add;
	box-shadow: 0 0 0 2px rgba(86, 90, 221, 0.1);
}

/* Handle different attribute counts - PC: 3 columns max */
.bundlerbx-attributes-container.bundlerbx-attr-1 {
	grid-template-columns: 1fr;
}

.bundlerbx-attributes-container.bundlerbx-attr-2 {
	grid-template-columns: repeat(2, 1fr);
}

.bundlerbx-attributes-container.bundlerbx-attr-3 {
	grid-template-columns: repeat(3, 1fr);
}

.bundlerbx-attributes-container.bundlerbx-attr-4 {
	grid-template-columns: repeat(3, 1fr);
}

.bundlerbx-attributes-container.bundlerbx-attr-4 .bundlerbx-attribute-selector:nth-child(4),
.bundlerbx-attribute-selector.bundlerbx-attr-full-width {
	grid-column: 1 / -1;
}

.bundlerbx-attributes-container.bundlerbx-attr-5plus {
	grid-template-columns: repeat(3, 1fr);
}

/* Mobile: 2 columns max */
@media (max-width: 768px) {
	.bundlerbx-variant-item > .bundlerbx-attributes-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	
	/* Override for mobile */
	.bundlerbx-attributes-container.bundlerbx-attr-1 {
		grid-template-columns: 1fr;
	}
	
	.bundlerbx-attributes-container.bundlerbx-attr-2 {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.bundlerbx-attributes-container.bundlerbx-attr-3 {
		grid-template-columns: repeat(2, 1fr);
	}
	
	/* Make 3rd selector full width on mobile when there are exactly 3 */
	.bundlerbx-attributes-container.bundlerbx-attr-3 .bundlerbx-attribute-selector:nth-child(3) {
		grid-column: 1 / -1;
	}
	
	/* For 4 attributes on mobile: 2x2 grid (no full width needed) */
	.bundlerbx-attributes-container.bundlerbx-attr-4 {
		grid-template-columns: repeat(2, 1fr);
	}
	
	/* For 5+ attributes on mobile: 2 columns with wrapping */
	.bundlerbx-attributes-container.bundlerbx-attr-5plus {
		grid-template-columns: repeat(2, 1fr);
	}
	
	
	.bundlerbx-variant-item {
		padding: 12px;
	}
	
	.bundlerbx-variant-item > label {
		font-size: 13px;
		margin-bottom: 10px;
	}
	
	.bundlerbx-attribute-selector label {
		font-size: 12px;
		margin-bottom: 5px;
	}
	
	.bundlerbx-variant-select {
		padding: 8px 10px;
		font-size: 13px;
	}
}

.bundlerbx-marketing-messages {
	margin-top: 10px;
}

.bundlerbx-message {
	font-size: 13px;
	color: #666;
	margin: 5px 0;
}

.bundlerbx-add-to-cart-wrapper {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.bundlerbx-add-to-cart-button {
	width: 100%;
	padding: 15px 20px;
	background: #565add;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: background 0.3s ease;
}

.bundlerbx-add-to-cart-button:hover:not(:disabled) {
	background: #4545c0;
}

.bundlerbx-add-to-cart-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.bundlerbx-cart-icon {
	font-size: 18px;
}

.bundlerbx-button-text {
	display: flex;
	align-items: center;
	gap: 5px;
}

.bundlerbx-button-price {
	font-weight: 700;
}

/* Responsive - Mobile Styles */
@media (max-width: 768px) {
	.bundlerbx-offers-widget {
		margin: 20px 0;
		padding: 12px;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}
	
	.bundlerbx-offer-header {
		font-size: 20px;
		margin-bottom: 15px;
		padding: 0;
	}
	
	.bundlerbx-options {
		gap: 12px;
		margin-bottom: 15px;
		width: 100%;
	}
	
	.bundlerbx-option {
		width: 100%;
		padding: 12px;
		flex-direction: row;
		align-items: flex-start;
		gap: 12px;
		margin: 0;
		box-sizing: border-box;
	}
	
	.bundlerbx-option-radio {
		flex-shrink: 0;
		margin-top: 2px;
	}
	
	.bundlerbx-option-radio input[type="radio"] {
		width: 18px;
		height: 18px;
	}
	
	.bundlerbx-option-content {
		flex: 1;
		width: 100%;
		min-width: 0;
	}
	
	.bundlerbx-option-header {
		display: flex;
		flex-direction: column;
		margin-bottom: 6px;
		gap: 6px;
		line-height: 1.2;
	}
	
	.bundlerbx-option-header-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 6px;
		width: 100%;
	}
	
	.bundlerbx-option-title {
		font-size: 16px;
		margin: 0;
		line-height: 1.2;
		font-weight: 600;
		display: inline;
	}
	
	.bundlerbx-option-badge {
		font-size: 11px;
		padding: 3px 8px;
		line-height: 1.2;
		white-space: nowrap;
	}
	
	.bundlerbx-badges-container {
		display: flex;
		flex-wrap: wrap;
		flex-direction: row;
		justify-content: flex-end;
		align-items: flex-start;
		gap: 3px;
		width: 100%;
	}
	
	.bundlerbx-discount-banner {
		padding: 5px 12px;
		background: #4545c0;
		color: #fff;
		border-radius: 0 8px 0 8px;
		font-size: 10px;
		line-height: 1.3;
		font-weight: 500;
		white-space: nowrap;
		transform: skewX(-10deg);
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}
	
	.bundlerbx-discount-banner > * {
		display: inline-block;
		transform: skewX(10deg);
	}
	
	.bundlerbx-free-shipping-banner {
		padding: 5px 12px;
		background: #4caf50;
		color: #fff;
		border-radius: 0 8px 0 8px;
		font-size: 10px;
		line-height: 1.3;
		font-weight: 500;
		white-space: nowrap;
		transform: skewX(-10deg);
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}
	
	.bundlerbx-free-shipping-banner > * {
		display: inline-block;
		transform: skewX(10deg);
	}
	
	.bundlerbx-option-pricing {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 4px;
		margin: 0;
		flex-wrap: wrap;
		text-align: right;
		line-height: 1.2;
	}
	
	.bundlerbx-original-price {
		font-size: 14px;
		color: #999;
		text-decoration: line-through;
		order: 1;
		margin-right: 4px;
		line-height: 1.2;
	}
	
	.bundlerbx-current-price {
		font-size: 20px;
		font-weight: 700;
		color: #333;
		order: 2;
		line-height: 1.2;
		margin-left: 0;
	}
	
	.bundlerbx-unit-price {
		font-size: 12px;
		color: #666;
		order: 3;
		width: 100%;
		margin-top: 4px;
		line-height: 1.3;
	}
	
	.bundlerbx-variant-selector {
		margin: 0;
		padding: 10px 0 0 0;
		background: transparent;
		border-radius: 0;
		width: 100%;
		box-sizing: border-box;
		flex: 0 0 100%;
		max-width: 100%;
		order: 10;
	}
	
	.bundlerbx-variant-item {
		margin-bottom: 10px;
		padding: 10px;
		flex-direction: row;
		align-items: flex-start;
		gap: 10px;
	}
	
	.bundlerbx-variant-item:last-child {
		margin-bottom: 0;
	}
	
	.bundlerbx-variant-item > label {
		font-size: 13px;
		margin-bottom: 0;
		padding-top: 8px;
		flex-shrink: 0;
		white-space: nowrap;
	}
	
	.bundlerbx-variant-item > .bundlerbx-attributes-container {
		flex: 1;
		min-width: 0;
	}
	
	.bundlerbx-marketing-messages {
		margin-top: 8px;
	}
	
	.bundlerbx-message {
		font-size: 12px;
		margin: 3px 0;
		line-height: 1.4;
	}
	
	.bundlerbx-add-to-cart-wrapper {
		margin-top: 15px;
		padding-top: 15px;
		width: 100%;
	}
	
	.bundlerbx-add-to-cart-button {
		width: 100%;
		padding: 14px 16px;
		font-size: 15px;
		border-radius: 6px;
		box-sizing: border-box;
	}
	
	.bundlerbx-cart-icon {
		font-size: 16px;
	}
	
	.bundlerbx-button-text {
		gap: 4px;
		font-size: 15px;
	}
	
	.bundlerbx-button-price {
		font-weight: 700;
	}
}

