/* ==========================================================================
   WPS WooCommerce Offers — Frontend
   ========================================================================== */

/* ── Option selector ─────────────────────────────────────────────────────── */

.wps-option-selector {
	margin: 20px 0 16px;
}

.wps-option-label-heading {
	font-weight: 700;
	margin: 0 0 10px;
	font-size: 15px;
}

.wps-option-label-heading .required {
	color: #e00;
	margin-left: 3px;
}

/* ── Visual option cards (image + label) ─────────────────────────────────── */

.wps-option-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wps-option-card {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.wps-option-card:hover {
	border-color: #bbb;
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.wps-option-card.wps-option-active {
	border-color: #f5a623;
	background-color: #fff9ef;
}

.wps-option-card-img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wps-option-card-label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	line-height: 1.3;
}

/* Legacy text-only buttons (kept for backwards compatibility) */
.wps-option-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wps-option-btn {
	flex: 1 1 auto;
	min-width: 160px;
	padding: 14px 18px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	line-height: 1.3;
	transition: border-color 0.2s, background-color 0.2s;
	color: #333;
}

.wps-option-btn:hover {
	border-color: #aaa;
}

.wps-option-btn.wps-option-active {
	border-color: #f5a623;
	background-color: #fff9ef;
	color: #111;
}

/* ── Offer group container ───────────────────────────────────────────────── */

.wps-offer-groups-wrap {
	margin-top: 16px;
}

.wps-offers-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
	border-top: 1px solid #eee;
	padding-top: 16px;
}

.wps-no-offers {
	color: #999;
	font-size: 13px;
	padding: 10px 0;
}

/* ── Mandatory base product row ─────────────────────────────────────────── */

.wps-base-product {
	border-color: #f5a623;
	background-color: #fff9ef;
	cursor: default;
}

.wps-base-product:hover {
	border-color: #f5a623;
}

.wps-base-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: #f5a623;
	color: #fff;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

/* ── Offer card ──────────────────────────────────────────────────────────── */

.wps-offer-item {
	border: 2px solid #e5e5e5;
	border-radius: 6px;
	margin-bottom: 10px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wps-offer-item:hover {
	border-color: #ccc;
}

.wps-offer-item.wps-offer-selected {
	border-color: #f5a623;
	background-color: #fffbf0;
}

.wps-offer-label {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	cursor: pointer;
	margin: 0;
	gap: 12px;
}

.wps-offer-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	cursor: pointer;
	accent-color: #f5a623;
}

.wps-offer-content {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 12px;
}

.wps-offer-thumb {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.wps-offer-info {
	flex: 1;
}

.wps-offer-heading {
	display: block;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	margin-bottom: 3px;
}

.wps-offer-product-name {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 4px;
}

/* Pricing */
.wps-offer-price {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wps-offer-price del {
	color: #aaa;
	font-size: 13px;
}

.wps-offer-price ins {
	color: #e04040;
	font-weight: 700;
	text-decoration: none;
	font-size: 14px;
}

/* ── Price summary ───────────────────────────────────────────────────────── */

.wps-price-summary {
	margin-top: 20px;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
	font-size: 14px;
}

.wps-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 16px;
	border-bottom: 1px solid #f0f0f0;
}

.wps-summary-row:last-child {
	border-bottom: none;
}

.wps-summary-unit {
	background: #f9f9f9;
}

.wps-summary-offer {
	background: #fff;
}

.wps-summary-total {
	background: #fff9ef;
	border-top: 2px solid #f5a623;
}

.wps-summary-name {
	font-weight: 600;
	color: #333;
}

.wps-summary-total .wps-summary-name,
.wps-summary-total .wps-summary-prices {
	font-size: 15px;
	color: #111;
}

.wps-summary-prices {
	text-align: right;
}

.wps-summary-prices del {
	color: #aaa;
	font-weight: 400;
	margin-right: 4px;
}

.wps-summary-prices strong {
	color: #111;
}

.wps-summary-saved {
	color: #2a9d3a;
	font-size: 12px;
	font-weight: 600;
}

/* ── Cart badges ─────────────────────────────────────────────────────────── */

.wps-offer-badge {
	display: inline-block;
	background: #f5a623;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 3px;
	vertical-align: middle;
	margin-left: 4px;
}

.wps-option-badge {
	display: inline-block;
	background: #444;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 3px;
	vertical-align: middle;
	margin-left: 4px;
}
