/* Combo Offer Builder Styles */
:root {
	--combo-primary: var(--theme-palette-color-1, #2271b1);
	--combo-primary-dark: var(--theme-palette-color-1, #2271b1);
	--combo-text: #1a1a1a;
	--combo-border: #e0e0e0;
	--combo-bg-light: #f9f9f9;
}

.combo-offers-page,
.combo-builder-page {
	max-width: 1290px;
	margin: 0 auto;
	padding: 20px;
}

/* Add bottom padding so sticky nav doesn't cover content */
.combo-builder-page {
	padding-bottom: 80px;
}

/* Listing page */
.combo-offers-header {
	text-align: center;
	margin-bottom: 30px;
}

.combo-offers-title {
	font-size: 2em;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.combo-offers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	align-items: start;
}

.combo-offer-card {
	border: 1px solid #e0e0e0;
	border-radius: 0;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	display: flex;
	flex-direction: column;
}

.combo-offer-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

.combo-offer-card-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f5f5f5;
	position: relative;
}

.combo-offer-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.combo-offer-card:hover .combo-offer-card-image img {
	transform: scale(1.05);
}


.combo-offer-card-body {
	padding: 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.combo-offer-card-name {
	font-size: 1.3em;
	margin: 0 0 4px;
}

.combo-offer-card-included {
	font-size: 13px;
	color: #888;
	margin: 0 0 12px;
}

.combo-offer-card-price-block {
	margin-bottom: 16px;
}

.combo-offer-card-price {
	font-size: 1.6em;
	font-weight: 800;
	color: var(--combo-primary);
	display: block;
	line-height: 1.2;
}

.combo-offer-card-price-note {
	font-size: 13px;
	color: #888;
	display: block;
	margin-top: 2px;
}

.combo-offer-card-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-decoration: none;
	box-sizing: border-box !important;
	min-height: 40px !important;
	height: auto !important;
	line-height: 1.2 !important;
	padding: 8px 24px !important;
	background: var(--combo-primary);
	color: #fff !important;
	border-radius: 0;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 14px;
	margin-top: auto;
	width: 100%;
	text-align: center;
	transition: background 0.2s ease;
}

.combo-offer-card-button:hover {
	background: var(--combo-primary-dark);
	color: #fff !important;
}

/* Builder */
.combo-builder {
	max-width: 1290px;
	margin: 0 auto;
}

/* Compact header card */
.combo-builder-header-card {
	background: #fff;
	border: 1px solid var(--combo-border);
	margin-bottom: 16px;
}

.combo-builder-header-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 16px 20px;
	flex-wrap: wrap;
}

.combo-builder-header-left {
	flex: 1;
	min-width: 200px;
}

.combo-builder-title {
	font-size: 1.25em;
	margin: 0 0 8px;
	color: var(--combo-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.3;
}

.combo-builder-progress-info {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 6px;
}

.combo-builder-progress-count {
	font-size: 1.1em;
	font-weight: 800;
	color: var(--combo-primary);
}

.combo-builder-progress-label {
	font-size: 12px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.combo-builder-progress-bar {
	width: 100%;
	max-width: 250px;
	height: 4px;
	background: #e8e8e8;
	overflow: hidden;
}

.combo-builder-progress-fill {
	height: 100%;
	background: var(--combo-primary);
	transition: width 0.3s ease;
}

.combo-builder-header-right {
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.combo-builder-price-label {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 2px;
}

.combo-builder-price-value {
	font-size: 1.5em;
	font-weight: 800;
	color: var(--combo-primary);
}

/* Step indicators inside header */
.combo-builder-indicator {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	padding: 0 20px 14px;
	font-family: 'Poppins', sans-serif !important;
}

.combo-builder-indicator-step {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: transparent;
	color: #999;
	position: relative;
	flex: 1;
	min-width: 0;
}

.combo-builder-indicator-step::after {
	content: "";
	flex: 1;
	height: 2px;
	background: #e0e0e0;
	margin-left: 8px;
}

.combo-builder-indicator-step:last-child::after {
	display: none;
}

.combo-builder-indicator-step.active {
	color: var(--combo-primary);
	font-weight: 700;
}

.combo-builder-indicator-step.done {
	color: var(--combo-primary);
}

.combo-builder-indicator-step.active::after,
.combo-builder-indicator-step.done::after {
	background: var(--combo-primary);
}

.combo-builder-indicator-number {
	width: 24px;
	height: 24px;
	line-height: 24px;
	border-radius: 50%;
	background: #e8e8e8;
	text-align: center;
	font-weight: 700;
	font-size: 13px;
	flex-shrink: 0;
}

.combo-builder-indicator-step.active .combo-builder-indicator-number {
	background: var(--combo-primary);
	color: #fff;
}

.combo-builder-indicator-step.done .combo-builder-indicator-number {
	background: var(--combo-primary);
	color: #fff;
}

.combo-builder-indicator-label {
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Step instruction */
.combo-builder-step-instruction {
	padding: 10px 20px;
	background: var(--combo-bg-light);
	border: 1px solid var(--combo-border);
	margin-bottom: 16px;
}

#combo-step-instruction-text {
	margin: 0;
	font-size: 14px;
	color: #555;
	font-weight: 600;
}

/* Step content */
.combo-builder-step-title {
	font-size: 1.3em;
	margin: 0 0 4px;
}

.combo-builder-step-subtitle {
	color: #666;
	margin: 0 0 16px;
}

.combo-builder-selection-count {
	font-weight: 600;
	margin-bottom: 16px;
	padding: 8px 12px;
	background: #f0f7ff;
	border-radius: 4px;
	display: inline-block;
}

/* Product grid */
.combo-builder-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.combo-product-card {
	border: 1px solid #e0e0e0;
	border-radius: 0;
	background: #fff;
	padding: 12px;
	text-align: left;
	display: flex;
	flex-direction: column;
}

.combo-product-card.selected {
	border-color: var(--combo-primary);
	box-shadow: 0 0 0 2px var(--combo-primary);
}

.combo-product-card.out-of-stock {
	opacity: 0.55;
}

.combo-product-card-image {
	width: 100%;
	height: 240px;
	object-fit: cover;
	border-radius: 0;
	margin-bottom: 8px;
	background: #f5f5f5;
}

.combo-product-card-image-placeholder {
	width: 100%;
	height: 240px;
	background: #f5f5f5;
	border-radius: 0;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
}

.combo-product-card-name {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 6px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	max-height: 2.6em;
	text-align: left;
}

.combo-product-card-meta {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	margin-bottom: 8px;
	flex-wrap: wrap;
	text-align: left;
}

.combo-product-card-meta .combo-product-card-price::after {
	content: "\2022";
	margin-left: 6px;
	color: #ccc;
}

.combo-product-card-meta .combo-product-card-stock:last-child .combo-product-card-price::after,
.combo-product-card-meta > .combo-product-card-price:last-child::after {
	display: none;
}

.combo-product-card-price {
	color: #555;
	font-size: 14px;
	font-weight: 600;
}

.combo-product-card-stock {
	font-size: 12px;
}

.combo-product-card-stock.in {
	color: var(--combo-primary);
}

.combo-product-card-stock.out {
	color: #c00;
}

/* Variation attributes */
.combo-product-attributes {
	margin-bottom: 12px;
	text-align: left;
}

.combo-product-attribute {
	margin-bottom: 8px;
}

.combo-product-attribute-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
}

.combo-product-attribute-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.combo-attribute-option {
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
}

.combo-attribute-option:hover {
	border-color: #888;
}

.combo-attribute-option.selected {
	background: var(--combo-primary);
	color: #fff;
	border-color: var(--combo-primary);
}

.combo-attribute-option.disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

.combo-product-card .combo-product-select {
	margin-top: auto;
	box-sizing: border-box !important;
	min-height: 40px !important;
	height: auto !important;
	line-height: 1.2 !important;
	padding: 8px 16px !important;
	background: var(--combo-primary);
	color: #fff;
	border: none;
	border-radius: 0;
	cursor: pointer;
	width: 100%;
}

.combo-product-card .combo-product-select:disabled {
	background: #aaa;
	cursor: not-allowed;
}

/* Card greyed out when step quantity is already fulfilled */
.combo-product-card.limit-disabled {
	opacity: 0.5;
}

.combo-product-card.limit-disabled .combo-product-select {
	background: #aaa !important;
}

.combo-product-card .combo-product-select.selected {
	background: var(--combo-primary-dark);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Pagination */
.combo-builder-pagination {
	margin-top: 24px;
	text-align: center;
}

.combo-builder-pagination a,
.combo-builder-pagination span {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
}

.combo-builder-pagination a:hover {
	background: #f5f5f5;
}

.combo-builder-pagination .current {
	background: var(--combo-primary);
	color: #fff;
	border-color: var(--combo-primary);
}

/* Navigation - Sticky bottom bar */
.combo-builder-sticky-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	border-top: 1px solid var(--combo-border);
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
	padding: 12px 20px;
}

.combo-builder-sticky-nav-inner {
	max-width: 1290px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.combo-builder-next,
.combo-builder-back {
	box-sizing: border-box !important;
	min-height: 40px !important;
	height: auto !important;
	line-height: 1.2 !important;
	padding: 8px 32px !important;
	border-radius: 0;
	font-size: 15px;
	font-weight: 600;
}

.combo-builder-next {
	background: var(--combo-primary);
	color: #fff;
	border: 1px solid var(--combo-primary);
}

.combo-builder-next:hover {
	background: var(--combo-primary-dark);
}

.combo-builder-back {
	background: transparent;
	color: var(--combo-primary);
	border: 1px solid var(--combo-primary);
}

.combo-builder-back:hover {
	background: var(--combo-primary);
	color: #fff;
}

.combo-builder-next:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Review */
.combo-review {
	background: #fff;
	border: 1px solid var(--combo-border);
	border-radius: 0;
	padding: 24px;
	max-width: 700px;
	margin: 0 auto;
}

.combo-review-title {
	font-size: 1.4em;
	margin: 0 0 16px;
}

.combo-review-items {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}

.combo-review-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}

.combo-review-item:last-child {
	border-bottom: none;
}

.combo-review-item-name {
	font-weight: 600;
}

.combo-review-item-detail {
	color: #666;
	font-size: 13px;
}

.combo-review-total {
	display: flex;
	justify-content: space-between;
	font-size: 1.3em;
	font-weight: 700;
	padding-top: 16px;
	border-top: 2px solid var(--combo-primary);
}

.combo-review-add {
	width: 100%;
	padding: 14px;
	background: var(--combo-primary);
	color: #fff;
	border: none;
	border-radius: 0;
	font-size: 1.1em;
	cursor: pointer;
	margin-top: 16px;
}

.combo-review-add:disabled {
	background: #aaa;
	cursor: not-allowed;
}

/* Errors / loading / success */
.combo-toast-container {
	position: fixed !important;
	top: 16px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	z-index: 999999 !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 8px !important;
	width: calc(100% - 32px) !important;
	max-width: 480px !important;
	pointer-events: none !important;
}

.combo-toast {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
	width: 100% !important;
	padding: 12px 16px !important;
	border-radius: 4px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
	pointer-events: auto !important;
	opacity: 0 !important;
	transform: translateY(-16px) !important;
	transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.combo-toast-visible {
	opacity: 1 !important;
	transform: translateY(0) !important;
}

.combo-toast-error {
	background: #f8d7da !important;
	color: #721c24 !important;
	border: 1px solid #f5c6cb !important;
}

.combo-toast-success {
	background: #d4edda !important;
	color: #155724 !important;
	border: 1px solid #c3e6cb !important;
}

.combo-toast-message {
	flex: 1 !important;
}

.combo-toast-close {
	background: none !important;
	border: none !important;
	color: inherit !important;
	font-size: 20px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	padding: 0 4px !important;
	opacity: 0.7 !important;
}

.combo-toast-close:hover {
	opacity: 1 !important;
}

.combo-builder-loading,
.combo-offers-empty {
	text-align: center;
	padding: 40px;
	color: #888;
}

.combo-builder-success {
	text-align: center;
	padding: 40px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 0;
}

.combo-builder-success .button {
	margin: 0 8px;
}

.combo-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.combo-notice-error {
	background: #f8d7da;
	color: #721c24;
}

@media (max-width: 600px) {
	.combo-builder-products {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.combo-offers-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
	}
	.combo-offer-card-body {
		padding: 12px !important;
	}
	.combo-offer-card-name {
		font-size: 1em !important;
	}
	.combo-offer-card-price {
		font-size: 1.2em !important;
	}
	.combo-offers-title {
		font-size: 25px !important;
	}
	.combo-builder-header-top {
		flex-direction: row;
		align-items: flex-start;
		gap: 12px;
		padding: 12px 16px;
	}
	.combo-builder-header-right {
		align-items: flex-end;
		text-align: right;
	}
	.combo-builder-title {
		font-size: 1.05em;
	}
	.combo-builder-price-value {
		font-size: 1.3em;
	}
	.combo-builder-indicator {
		padding: 0 12px 12px;
		gap: 0;
	}
	.combo-builder-indicator-label {
		display: inline;
		font-size: 10px;
	}
	.combo-builder-indicator-step {
		padding: 4px 6px;
		gap: 4px;
	}
	.combo-builder-indicator-number {
		width: 22px;
		height: 22px;
		line-height: 22px;
		font-size: 12px;
	}
	.combo-product-card {
		padding: 8px;
	}
	.combo-product-card-image {
		height: 160px;
	}
	.combo-product-card-image-placeholder {
		height: 160px;
	}
	.combo-product-card-name {
		font-size: 13px;
	}
	.combo-builder-step-instruction {
		padding: 12px;
	}
	#combo-step-instruction-text {
		font-size: 13px;
	}
	.combo-builder-sticky-nav-inner {
		gap: 8px;
	}
	.combo-builder-next,
	.combo-builder-back {
		padding: 8px 20px !important;
		font-size: 14px;
	}
}
