/**
 * DinEden Carousel Variations
 * Styles for per-variation prices and floating add-to-cart panel
 */

/* ========================================
   0. SALE BADGE PER VARIATION
   ======================================== */
.dineden-sale-badge {
	line-height: 1.3 !important;
}

/* ========================================
   1. HIDE DEFAULT PRICE RANGE
   ======================================== */
.wd-product .dineden-hidden-range {
	display: none !important;
}

/* ========================================
   2. SWATCHES WITH PRICES LAYOUT
   ======================================== */
.dineden-swatches-with-prices {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	width: 100%;
}

.dineden-swatches-with-prices .wd-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	position: relative;
	flex: 1 1 0;
	min-width: 0;
}

/* Swatch box - unselected */
.dineden-swatches-with-prices .wd-swatch {
	border-radius: 10px;
	background: #F2F2F2;
	border: 2px solid transparent;
	padding: 8px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background 0.15s ease;
}

/* Swatch text */
.dineden-swatches-with-prices .wd-swatch .wd-swatch-text {
	font-size: 16px;
	font-weight: 500;
	color: #2B2B2B;
	width: 100%;
	text-align: center;
	border: none !important;
	background: transparent !important;
	border-radius: 0 !important;
}

/* Price label under each swatch */
.dineden-swatch-price {
	display: block;
	font-size: 16px;
	font-weight: 500;
	color: #595959;
	line-height: 1.2;
	white-space: nowrap;
	margin-top: 2px;
}

/* Sale price in swatch - new price */
.dineden-swatch-price ins {
	text-decoration: none;
	color: #379A3B;
	font-weight: 600;
}

/* Sale price in swatch - old price on sale bg */
.dineden-swatches-with-prices .wd-swatch.dineden-selected .dineden-swatch-price del {
	color: #b3b3b3;
}

/* Sale price in swatch - old price */
.dineden-swatch-price del {
	font-size: 0.85em;
	color: #999;
	font-weight: 400;
	margin-right: 2px;
}

/* Sale price in inline cart button - old price */
.dineden-btn-price del {
	font-weight: 400;
	opacity: 0.7;
	margin-right: 2px;
}

/* Sale price in inline cart button - new price (inherits white from button) */
.dineden-btn-price ins {
	text-decoration: none;
	font-weight: 600;
	color: inherit;
}

/* Selected swatch styling */
.dineden-swatches-with-prices .wd-swatch.dineden-selected {
	border-color: #F5B783;
	background: #FCECDD !important;
}

.dineden-swatches-with-prices .wd-swatch.dineden-selected .wd-swatch-text {
	background: transparent !important;
}

.dineden-swatches-with-prices .wd-swatch.dineden-selected .dineden-swatch-price {
	color: #595959;
	font-weight: 500;
}

/* ========================================
   3. INLINE CART (single-variation products)
   ======================================== */
.dineden-inline-cart {
	padding: 10px 0 0;
	width: 100%;
}

/* ========================================
   4. FLOATING ADD-TO-CART PANEL
   ======================================== */
#dineden-floating-cart {
	position: absolute;
	z-index: 10000;
	padding: 10px 12px;
	background: #fff;
	border-top: 1px solid #eee;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
	border-radius: 0 0 8px 8px;
	box-sizing: border-box;
	animation: dineden-fadeIn 0.25s ease;
}

.dineden-expand-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: 100%;
}

/* Quantity wrapper */
.dineden-qty-wrap {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	flex-shrink: 0;
	height: 36px;
}

.dineden-qty-wrap .dineden-qty-btn {
	--btn-padding: 0 !important;
	--btn-height: 36px !important;
	--btn-brd-radius: 0px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	min-width: 28px;
	height: 36px;
	min-height: 36px;
	border: none;
	background: #f5f5f5;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	cursor: pointer;
	transition: background 0.15s ease;
	line-height: 1;
	padding: 0 !important;
}

.dineden-qty-btn:hover {
	background: #e8e8e8;
}

.dineden-qty-wrap .dineden-qty-input {
	width: 36px;
	min-width: 36px;
	height: 36px;
	border: none;
	border-left: 1px solid #ddd;
	border-right: 1px solid #ddd;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	background: #fff;
	-moz-appearance: textfield;
	padding: 0 !important;
	margin: 0;
}

.dineden-qty-input::-webkit-outer-spin-button,
.dineden-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Add to cart button */
.dineden-add-to-cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex: 1;
	height: 36px;
	border: none;
	border-radius: 6px;
	background: #3e8914;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
	padding: 0 8px;
	white-space: nowrap;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dineden-add-to-cart-btn:hover {
	background: #357512;
}

.dineden-add-to-cart-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.dineden-add-to-cart-btn svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.dineden-btn-price {
	font-weight: 700;
}

.dineden-btn-gramaj {
	font-weight: 400;
	font-size: 11px;
	opacity: 0.85;
}

/* Loading state */
.dineden-add-to-cart-btn.dineden-loading {
	opacity: 0.7;
	pointer-events: none;
}

.dineden-add-to-cart-btn.dineden-loading::after {
	content: '';
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: dineden-spin 0.6s linear infinite;
	margin-left: 6px;
	flex-shrink: 0;
}

/* Added state */
.dineden-add-to-cart-btn.dineden-added {
	background: #2e7d32;
}

@keyframes dineden-spin {
	to {
		transform: rotate(360deg);
	}
}

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

/* ========================================
   4. EXPANDED PRODUCT Z-INDEX
   ======================================== */
.wd-product.dineden-expanded {
	z-index: 15;
	position: relative;
}

/* ========================================
   5. RESPONSIVE - 1250px to 1150px
   ======================================== */
@media (max-width: 1250px) and (min-width: 1150px) {
	.dineden-swatches-with-prices .wd-swatch.wd-text .wd-swatch-text {
		font-size: 14px !important;
	}

	.dineden-swatch-price {
		font-size: 14px !important;
	}

	.wd-swatches-product .wd-swatch {
		padding: 5px !important;
	}
}

/* ========================================
   6. RESPONSIVE - TABLET (sub 1150px)
   ======================================== */
@media (max-width: 1150px) and (min-width: 768px) {
	.dineden-expand-inner {
		gap: 4px;
	}

	.dineden-qty-wrap {
		height: 32px;
	}

	.dineden-qty-wrap .dineden-qty-btn {
		--btn-padding: 0 !important;
		--btn-height: 32px !important;
		--btn-brd-radius: 0px !important;
		width: 24px;
		min-width: 24px;
		height: 32px;
		min-height: 32px;
		font-size: 14px;
		padding: 0 !important;
	}

	.dineden-qty-wrap .dineden-qty-input {
		width: 28px;
		min-width: 28px;
		height: 32px;
		padding: 0 !important;
		font-size: 13px;
	}

	.dineden-add-to-cart-btn {
		font-size: 11px;
		padding: 0 6px;
		height: 32px;
		gap: 3px;
	}

	.dineden-add-to-cart-btn svg {
		width: 13px;
		height: 13px;
	}
}

/* ========================================
   7. RESPONSIVE - MOBILE (<558px)
   ======================================== */
@media (max-width: 558px) {
	/* Floating + inline: add-to-cart pe rand separat 100% */
	.dineden-expand-inner {
		flex-wrap: wrap;
		gap: 6px;
	}

	.dineden-expand-inner .dineden-add-to-cart-btn {
		flex: 0 0 100%;
	}

	.dineden-qty-wrap {
		height: 30px;
	}

	.dineden-qty-wrap .dineden-qty-btn {
		--btn-padding: 0 !important;
		--btn-height: 30px !important;
		--btn-brd-radius: 0px !important;
		width: 22px;
		min-width: 22px;
		height: 30px;
		min-height: 30px;
		font-size: 13px;
		padding: 0 !important;
	}

	.dineden-qty-wrap .dineden-qty-input {
		width: 24px;
		min-width: 24px;
		height: 30px;
		font-size: 12px;
		padding: 0 !important;
	}

	.dineden-add-to-cart-btn {
		height: 30px;
		font-size: 11px;
		padding: 0 6px;
		gap: 3px;
	}

	.dineden-add-to-cart-btn svg {
		width: 12px;
		height: 12px;
	}

	.dineden-btn-gramaj {
		font-size: 9px;
	}

	.dineden-swatches-with-prices {
		gap: 6px;
	}

	.wd-swatches-product .wd-swatch {
		padding: 4px !important;
	}

	.dineden-swatches-with-prices .wd-swatch.wd-text .wd-swatch-text {
		font-size: 13px !important;
	}

	.dineden-swatch-price {
		font-size: 13px !important;
	}
}
