/**
 * Yerba Mate Commerce - Interactive Bundle Builder Styles
 * Design: Warm Parchment, Deep Forest Green, Honey Amber CTA, Mobile-Optimized
 */

.yerba-bundle-wrapper {
	--y-pergamin: #f8f6f0;
	--y-white: #ffffff;
	--y-charcoal: #231e1b;
	--y-charcoal-muted: #66605a;
	--y-border: #e2dcd4;
	--y-border-light: #ece7e0;
	--y-forest: #1b4332;
	--y-forest-light: #2d6a4f;
	--y-ochre: #c88218;
	--y-ochre-hover: #b07111;
	--y-terracotta: #b84a28;
	--y-ice-bg: #e0f2fe;
	--y-ice-text: #0369a1;
	--y-ice-border: #7dd3fc;
	--y-radius: 10px;

	background: var(--y-pergamin);
	border: 1px solid var(--y-border);
	border-radius: var(--y-radius);
	padding: 30px 24px 100px 24px; /* bottom padding for sticky bar */
	margin: 30px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
	color: var(--y-charcoal);
	position: relative;
	box-shadow: 0 4px 20px rgba(35, 30, 27, 0.05);
}

/* ==========================================================================
   1. HEADER & STEP NAVIGATION
   ========================================================================== */

.yerba-bundle-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 30px auto;
}

.yerba-bundle-discount-badge {
	display: inline-block;
	background: var(--y-terracotta);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.5px;
	padding: 5px 14px;
	border-radius: 20px;
	margin-bottom: 12px;
	box-shadow: 0 2px 6px rgba(184, 74, 40, 0.25);
}

.yerba-bundle-title {
	font-family: "Merriweather", "Playfair Display", Georgia, serif;
	font-size: 28px;
	color: var(--y-forest);
	margin: 0 0 10px 0;
	font-weight: 700;
	line-height: 1.25;
}

.yerba-bundle-subtitle {
	font-size: 15px;
	color: var(--y-charcoal-muted);
	margin: 0 0 24px 0;
	line-height: 1.5;
}

/* Steps Stepper */
.yerba-bundle-steps-nav {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.yerba-step-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	border: 1px solid var(--y-border);
	border-radius: 30px;
	padding: 8px 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--y-charcoal);
	cursor: pointer;
	transition: all 0.2s ease;
}

.yerba-step-tab:hover {
	border-color: var(--y-forest);
	color: var(--y-forest);
}

.yerba-step-tab.active {
	background: var(--y-forest);
	border-color: var(--y-forest);
	color: #ffffff;
	box-shadow: 0 3px 10px rgba(27, 67, 50, 0.2);
}

.yerba-step-tab.completed {
	border-color: #2b7a4b;
	color: #2b7a4b;
	background: #f0fdf4;
}

.yerba-step-indicator {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
}

.yerba-step-tab.active .yerba-step-indicator {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

.yerba-step-tab.completed .yerba-step-indicator {
	background: #2b7a4b;
	color: #ffffff;
}

/* ==========================================================================
   2. STEP PANELS & PRODUCT GRIDS
   ========================================================================== */

.yerba-step-panel {
	display: none;
	animation: yerbaFadeIn 0.3s ease;
}

.yerba-step-panel.active {
	display: block;
}

@keyframes yerbaFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.yerba-step-heading {
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--y-border);
}

.yerba-step-heading h3 {
	font-size: 18px;
	color: var(--y-forest);
	margin: 0 0 6px 0;
	font-weight: 700;
}

.yerba-step-heading p {
	font-size: 13.5px;
	color: var(--y-charcoal-muted);
	margin: 0;
}

.yerba-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}

/* Product Card */
.yerba-card-item {
	background: var(--y-white);
	border: 2px solid var(--y-border);
	border-radius: var(--y-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: all 0.25s ease;
	position: relative;
	cursor: pointer;
}

.yerba-card-item:hover {
	border-color: #cbd5e1;
	transform: translateY(-3px);
	box-shadow: 0 8px 18px rgba(35, 30, 27, 0.08);
}

.yerba-card-item.selected {
	border-color: var(--y-forest);
	background: #f7fcf8;
	box-shadow: 0 6px 16px rgba(27, 67, 50, 0.15);
}

.yerba-card-thumb-wrap {
	position: relative;
	width: 100%;
	padding-top: 85%;
	background: #fdfcfa;
	overflow: hidden;
}

.yerba-card-thumb-wrap img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.yerba-card-item:hover .yerba-card-thumb-wrap img {
	transform: scale(1.05);
}

.yerba-card-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 12px;
	z-index: 2;
}

.yerba-card-badge-terere {
	background: var(--y-ice-bg);
	color: var(--y-ice-text);
	border: 1px solid var(--y-ice-border);
}

.yerba-card-badge-country {
	background: rgba(255, 255, 255, 0.95);
	color: var(--y-charcoal);
	border: 1px solid var(--y-border);
}

.yerba-card-content {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.yerba-card-title {
	font-size: 14.5px;
	font-weight: 600;
	margin: 0 0 10px 0;
	line-height: 1.35;
	color: var(--y-charcoal);
	flex: 1;
}

.yerba-card-mini-sensory {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11.5px;
	color: var(--y-charcoal-muted);
	margin-bottom: 12px;
	background: #f9f8f6;
	padding: 4px 8px;
	border-radius: 4px;
}

.yerba-mini-dots {
	display: flex;
	gap: 4px;
}

.yerba-mini-dots .yerba-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--y-border);
}

.yerba-mini-dots .yerba-dot.active {
	background: var(--y-forest);
}

.yerba-card-price {
	font-size: 16px;
	font-weight: 700;
	color: var(--y-forest);
	margin-bottom: 14px;
}

.yerba-card-price del {
	font-size: 13px;
	color: #999;
	margin-right: 6px;
}

.yerba-btn-select-item {
	width: 100%;
	padding: 9px;
	border-radius: 6px;
	border: 1px solid var(--y-border);
	background: #fdfbf7;
	color: var(--y-charcoal);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.yerba-btn-select-item .yerba-btn-label-selected {
	display: none;
}

.yerba-card-item.selected .yerba-btn-select-item {
	background: var(--y-forest);
	border-color: var(--y-forest);
	color: #ffffff;
}

.yerba-card-item.selected .yerba-btn-select-item .yerba-btn-label-select {
	display: none;
}

.yerba-card-item.selected .yerba-btn-select-item .yerba-btn-label-selected {
	display: inline-block;
}

/* ==========================================================================
   3. STICKY SUMMARY BAR & CHECKOUT ACTIONS
   ========================================================================== */

.yerba-bundle-summary-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-top: 1px solid var(--y-border);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
	z-index: 9999;
	padding: 12px 20px;
}

.yerba-summary-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.yerba-summary-selection-preview {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.yerba-summary-item {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--y-pergamin);
	border: 1px solid var(--y-border);
	padding: 6px 12px;
	border-radius: 6px;
	min-width: 140px;
}

.yerba-summary-item.chosen {
	background: #f0fdf4;
	border-color: #86efac;
}

.yerba-slot-icon {
	font-size: 18px;
}

.yerba-slot-info {
	display: flex;
	flex-direction: column;
}

.yerba-slot-label {
	font-size: 10px;
	text-transform: uppercase;
	color: var(--y-charcoal-muted);
	font-weight: 700;
}

.yerba-slot-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--y-charcoal);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 130px;
}

.yerba-summary-pricing-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.yerba-summary-pricing {
	text-align: right;
}

.yerba-regular-price {
	font-size: 11.5px;
	color: #888;
	text-decoration: line-through;
}

.yerba-discount-saving {
	font-size: 11px;
	font-weight: 700;
	color: var(--y-terracotta);
}

.yerba-final-price {
	font-size: 20px;
	font-weight: 800;
	color: var(--y-forest);
	line-height: 1;
}

.yerba-btn-add-bundle {
	background: var(--y-ochre);
	color: #ffffff;
	border: none;
	border-radius: 30px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 12px rgba(200, 130, 24, 0.35);
	transition: all 0.2s ease;
}

.yerba-btn-add-bundle:hover:not(:disabled) {
	background: var(--y-ochre-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(200, 130, 24, 0.45);
}

.yerba-btn-add-bundle:disabled {
	background: #cbd5e1;
	color: #64748b;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

/* Mobile Responsive */
@media (max-width: 860px) {
	.yerba-summary-container {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.yerba-summary-selection-preview {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.yerba-summary-item {
		min-width: 0;
	}

	.yerba-summary-pricing-actions {
		justify-content: space-between;
	}

	.yerba-products-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 12px;
	}

	.yerba-bundle-wrapper {
		padding: 20px 14px 140px 14px;
	}
}
