/**
 * WooRest Product Modal Styles
 *
 * @package WooRest_Core
 */

/* Modal Base Styles */
:root {
    --background-color: #f7f7f7;
    --primary-color: #c9386f;
    --primary-hover: #b92a61;
    --text-color: #323232;
    --text-hover: #313131;
    --secondary-text: #6b6b6b;
    --button-bg: #c9386f;
    --button-text-color: #ffffff;
    --button-on-hover: #b92a61;
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --border-color: #f4f4f4;
}



.woorest-allergy-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #000000;
	background: transparent;
	color: #000000;
	margin-left: 10px;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.woorest-allergy-trigger:focus-visible {
	outline: 2px solid rgba(0, 0, 0, 0.45);
	outline-offset: 2px;
}

.woorest-allergy-trigger__icon {
	font-size: 12px;
	font-weight: 700;
	color: #000000;
	line-height: 1;
	display: inline-block;
	transform: scaleY(0.9);
}

.woorest-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	display: none;
}

/* Visibility helper classes */
.woorest-modal.visible {
	display: block;
}

.woorest-modal-product-content.visible {
	display: block;
}

.woorest-modal.hidden,
.woorest-modal-loading.hidden,
.woorest-modal-product-content.hidden {
	display: none;
}

.woorest-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	box-sizing: border-box;
	overflow-x: hidden;
	max-width: 100vw;
}

.woorest-modal-container {
	position: relative;
	width: 100%;
	max-width: 540px;
	pointer-events: auto;
}

.woorest-modal-content {
	position: relative;
	width: 100%;
	max-height:90vh;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	overflow-x: hidden;
	transform: translateY(30px);
	opacity: 0;
	transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.woorest-modal[aria-hidden="false"] .woorest-modal-content {
	transform: translateY(0);
	opacity: 1;
}

/* Modal Close Button */
.woorest-modal-close {
	position: absolute;
	top: 7px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: all 0.2s ease;
	outline: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.woorest-modal-close:hover {
	background: #ffffff;
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.woorest-modal-close svg {
	width: 20px;
	height: 20px;
}

/* Modal Body */
.woorest-modal-body {
	position: relative;
	max-height: calc(90vh - 40px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

/* Loading State */
.woorest-modal-loading {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 40px;
	text-align: center;
}

.woorest-modal-loading.visible {
	display: flex;
}

.woorest-loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #c9386f;
	border-radius: 50%;
	animation: woorest-spin 1s linear infinite;
	margin-bottom: 20px;
}

@keyframes woorest-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.woorest-modal-loading p {
	margin: 0;
}

/* Error State */
.woorest-modal-error {
	padding: 40px;
	text-align: center;
}

.woorest-modal-error p {
	margin-bottom: 20px;
}

.woorest-modal-error .button {
	background: #c9386f;
	border: none;
	padding: 12px 24px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.woorest-modal-error .button:hover {
	background: #b92a61;
}

/* Product Content Styles */
.woorest-modal-product-content {
	display: none;
}

/* Variation form inside modal */
.woorest-product-purchase .variations_form {
	margin: 10px 0 0 0;
}

/* Hide WooCommerce variation reset link and default add-to-cart button inside modal */
.woorest-product-purchase .reset_variations,
.woorest-product-purchase .single_add_to_cart_button,
.woorest-product-modal-wrapper .reset_variations,
.woorest-modal-body .reset_variations,
.woorest-modal .reset_variations,
.variations_form .reset_variations,
.woorest-product-purchase .variations .reset_variations,
.woorest-product-purchase .variations .value .reset_variations {
	display: none;
	visibility: hidden;
	opacity: 0;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Hide entire variation add-to-cart container in modal */
.woorest-product-purchase .woocommerce-variation-add-to-cart.variations_button,
.woorest-product-purchase .woocommerce-variation-add-to-cart.woocommerce-variation-add-to-cart-enabled {
	display: none;
}

/* Convert WooCommerce variations table to class-based layout */
.woorest-product-purchase .variations {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	border-collapse: initial;
}

.woorest-product-purchase .variations tbody {
	display: block;
}

.woorest-product-purchase .variations tr {
	display: block;
	margin-bottom: 8px;
}

.woorest-product-purchase .variations th.label {
	display: none;
}

.woorest-product-purchase .variations td.value {
	display: block;
	width: 100%;
	padding: 0;
}

.woorest-product-purchase .variations td.value select {
	display: none;
}

.woorest-product-purchase .single_variation_wrap {
	margin-top: 10px;
}

.woorest-product-purchase .single_add_to_cart_button {
	width: 100%;
}

.woorest-attr-wrapper > select {
	display: none;
}

.woorest-attr-wrapper {
	border: none;
	background: rgba(248, 249, 250, 0.6);
	padding: 16px 16px 16px 16px;
}

.woorest-attr-radio {
	display: block;
}

.woorest-attr-legend {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	gap: 8px;
	margin-bottom: 8px;
	padding: 0 16px;
	position: relative;
}

.woorest-attr-legend-title {
	margin: 0;
	display: block;
	flex: 1;
	order: -1;
	font-weight: 600;
}

.woorest-product-toppings {
	margin: 10px 0 0 0;
}

.woorest-attr-legend .woorest-product-toppings__badge {
	flex-shrink: 0;
	order: 1;
}

.woorest-attr-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 0;
}

.woorest-attr-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	cursor: pointer;
	user-select: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background-color: #ffffff;
	margin: 0;
}

.woorest-attr-option:hover {
	border-color: var(--primary-color, #c9386f);
	background-color: color-mix(in srgb, var(--primary-color, #c9386f), white 90%);
}

.woorest-attr-option.is-selected {
	border-color: var(--primary-color, #c9386f);
	background-color: color-mix(in srgb, var(--primary-color, #c9386f), white 90%);
}

.woorest-attr-option.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.woorest-attr-wrapper.has-variation-error {
	background-color: rgba(201, 56, 111, 0.1);
	border-color: rgba(201, 56, 111, 0.4);
	animation: toppings-shake 0.5s ease-in-out;
}

.woorest-attr-wrapper.has-variation-error .woorest-attr-option {
	border-color: rgba(201, 56, 111, 0.4);
}

/* Left side - radio and label */
.woorest-attr-option-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.woorest-attr-input {
	appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--primary-color, #c9386f);
	border-radius: 50%;
	position: relative;
	flex-shrink: 0;
}

.woorest-attr-input:checked::after {
	content: '';
	position: absolute;
	inset: 3px;
	background: var(--primary-color, #c9386f);
	border-radius: 50%;
}

.woorest-attr-input:focus-visible {
	outline: 2px solid #c9386f;
	outline-offset: 2px;
}/* Right side - price display */
.woorest-attr-price {
	white-space: nowrap;
	margin-left: auto;
}

.woorest-product-modal-wrapper {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto;
	padding: 0;
}

/* Add top spacing when there are no images */
.woorest-product-modal-wrapper:not(:has(.woorest-product-images)) .woorest-product-details {
	padding-top: 20px;
}

/* Alternative selector for older browsers that don't support :has() */
@supports not (selector(:has(.woorest-product-images))) {
	.woorest-product-modal-wrapper > .woorest-product-details:first-child {
		padding-top: 20px;
	}
}

.woorest-product-images {
	position: relative;
	width: 100%;
}

.woorest-product-main-image {
	position: relative;
	aspect-ratio: 16/9;
	margin-bottom: 1rem;
	overflow: hidden;
	background: #f8f9fa;
	width: 100%;
	max-height: 300px;
}

.woorest-product-main-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.woorest-product-thumbnails {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0 40px 4px 40px;
}

.woorest-product-thumbnail {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.2s ease;
}

.woorest-product-thumbnail:hover,
.woorest-product-thumbnail.active {
	border-color: #c9386f;
}

.woorest-product-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.woorest-product-title-row {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 14px;
	margin-bottom: 0.5rem;
	position: sticky;
	top: 0;
	z-index: 5;
}

.woorest-product-title {
	font-size: 16px;
	margin: 0;
	flex: 0 1 auto;
	min-width: 0;
}

.woorest-product-title-row.sticky-active {
	background-color: #ffffff;
	padding: 10px 1.2rem 15px 2.4rem;
	margin: 10px -1.2rem 0 -1.2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-bottom-color: #e5e5e5;
}

.woorest-product-price {
	padding: 0 1rem;
	margin-bottom: 0.5rem;
}.woorest-product-description {
	border-bottom: 1px solid #ebebeb;
	padding: 0 1rem;
	padding-bottom: 20px;
}

.woorest-product-toppings__set {
	border: none;
	background: rgba(248, 249, 250, 0.6);
	padding: 16px 16px 16px 16px;
	margin: 0 0 8px 0;
}

.woorest-product-toppings__set-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	gap: 8px;
	margin-bottom: 8px;
	padding: 0 16px;
	position: relative;
}

.woorest-product-toppings__set-title {
	padding-bottom: 0;
	margin: 0;
	display: block;
	flex: 1;
	order: -1;
	font-weight: 600;
}

/* Required Badge */
.woorest-product-toppings__badge {
	display: inline-flex;
	align-items: center;
	padding: 4px;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	color: crimson;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-right: 2rem;
}

.woorest-product-toppings__badge--optional {
	color: var(--secondary-text, #6b6b6b);
}

.woorest-product-toppings__description {
	margin: 0 0 14px;
}

/* Options Container */
.woorest-product-toppings__control,
.woorest-product-toppings__options {
	margin: 0;
	padding: 0;
}

/* Dropdown Style */
.woorest-product-toppings__select {
	width: 100%;
	padding: 14px;
	border: 1.5px solid #dedede;
	border-radius: 8px;
	background: #ffffff;
	transition: all 0.2s ease;
	appearance: none;
	font-size: 13px;
	color: var(--text-color);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b6b6b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 16px;
	padding-right: 40px;
}

.woorest-product-toppings__select:focus {
	outline: none;
	border-color: var(--primary-color, #c9386f);
	box-shadow: 0 0 0 2px rgba(201, 56, 111, 0.12);
}

.woorest-product-toppings__select:hover {
	border-color: #d0d0d0;
}

/* Error States */
.woorest-product-toppings__set.has-error {
	background-color: rgba(201, 56, 111, 0.1);
	border-color: rgba(201, 56, 111, 0.4);
	animation: toppings-shake 0.5s ease-in-out;
}

.woorest-product-toppings__set.has-error .woorest-product-toppings__select {
	border-color: rgba(201, 56, 111, 0.7);
}

.woorest-product-toppings__set.has-error .woorest-product-toppings__option {
	border-color: rgba(201, 56, 111, 0.4);
}


/* Animation enhancements */
@keyframes toppings-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-2px); }
	75% { transform: translateX(2px); }
}

/* Radio/Checkbox Options */
.woorest-product-toppings__options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.woorest-product-toppings__option.is-hidden-by-toggle {
	display: none;
}

.woorest-product-toppings__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	margin: 0;
}

.woorest-modal .woorest-product-toppings__toggle,
.woorest-modal button.woorest-product-toppings__toggle,
.woorest-product-toppings .woorest-product-toppings__toggle,
.woorest-product-toppings button.woorest-product-toppings__toggle {
	margin-top: 20px;
	border: none;
	background: none;
	letter-spacing: 0.02em;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	cursor: pointer;
}

.woorest-modal .woorest-product-toppings__toggle .woorest-product-toppings__toggle-text,
.woorest-modal .woorest-product-toppings__toggle .woorest-product-toppings__toggle-icon,
.woorest-product-toppings .woorest-product-toppings__toggle .woorest-product-toppings__toggle-text,
.woorest-product-toppings .woorest-product-toppings__toggle .woorest-product-toppings__toggle-icon {
	color: #3147ad;
	font-size: 0.75rem;
	font-weight: 400;
}

.woorest-modal .woorest-product-toppings__toggle:focus-visible,
.woorest-product-toppings .woorest-product-toppings__toggle:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--primary-color, #c9386f), white 60%);
	outline-offset: 2px;
}

.woorest-modal .woorest-product-toppings__toggle:hover,
.woorest-product-toppings .woorest-product-toppings__toggle:hover {
	color: var(--primary-hover, #b92a61);
	text-decoration: underline;
	text-decoration-color: #3147ad;
}
.woorest-product-toppings__toggle-icon {
	width: 0.5em;
	height: 0.5em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	display: inline-block;
	transform: rotate(45deg) translateY(-0.2em);
	transform-origin: center;
	transition: transform 0.2s ease;
}

.woorest-product-toppings__toggle.is-expanded .woorest-product-toppings__toggle-icon {
	transform: rotate(-135deg) translateY(-0.2em);
	margin-left: 2px;
}

.woorest-product-toppings__option:hover {
	border-color: var(--primary-color, #c9386f);
	background-color: color-mix(in srgb, var(--primary-color, #c9386f), white 90%);
}

.woorest-product-toppings__option.is-checked {
	border-color: var(--primary-color, #c9386f);
	background-color: color-mix(in srgb, var(--primary-color, #c9386f), white 90%);
}

/* Option Content */
.woorest-product-toppings__option-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.woorest-product-toppings__input {
	position: relative;
	width: 18px;
	height: 18px;
	border: 2px solid var(--primary-color, #c9386f);
	background: #ffffff;
	transition: all 0.2s ease;
	cursor: pointer;
	margin: 0;
	flex-shrink: 0;
	appearance: none;
}

.woorest-product-toppings__input[type="radio"] {
	border-radius: 50%;
}

.woorest-product-toppings__input[type="checkbox"] {
	border-radius: 4px;
}

.woorest-product-toppings__input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	inset: 3px;
	background: var(--primary-color, #c9386f);
	border-radius: 50%;
}

.woorest-product-toppings__input[type="checkbox"]:checked {
	border-color: var(--primary-color, #c9386f);
	background: var(--primary-color, #c9386f);
}

.woorest-product-toppings__input[type="checkbox"]::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 4px;
	border: 2px solid #ffffff;
	border-top: 0;
	border-right: 0;
	transform: translate(-50%, -60%) rotate(-45deg) scale(0.6);
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.woorest-product-toppings__input[type="checkbox"]:checked::after {
	opacity: 1;
	transform: translate(-50%, -60%) rotate(-45deg) scale(1);
}

.woorest-product-toppings__option-label {
	cursor: pointer;
	flex: 1;
}

.woorest-product-toppings__option-price {
	white-space: nowrap;
	margin-left: 8px;
}

/* Disabled checkbox states */
.woorest-product-toppings__input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.woorest-product-toppings__option:has(.woorest-product-toppings__input:disabled) {
	opacity: 0.6;
	cursor: not-allowed;
}

.woorest-product-toppings__option:has(.woorest-product-toppings__input:disabled):hover {
	border-color: #e2e2e2;
	background: #ffffff;
}


.woorest-product-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.woorest-add-to-cart-btn {
	background: var(--button-bg);
	border: none;
	padding: 16px 32px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.woorest-modal-footer .woorest-add-to-cart-btn {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 45px;
	border-radius: 5px;
	justify-content: space-between;
	padding: 0 12px;
	text-align: left;
}

/* Match card CTA structure inside modal */
.woorest-modal-footer .woorest-add-to-cart-left {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.woorest-modal-footer .woorest-add-to-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.6);
}

.woorest-modal-footer .woorest-add-to-cart-label {
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
}

.woorest-modal-footer .woorest-add-to-cart-total {
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	font-weight: 600;

}

.woorest-modal-footer .woorest-add-to-cart-btn .loading-text {
	color: #ffffff;
}

.woorest-add-to-cart-btn:hover {
	background: var(--button-on-hover);
	box-shadow: 0 4px 12px rgba(201, 56, 111, 0.25);
}

.woorest-view-product-btn {
	background: transparent;
	border: 2px solid #c9386f;
	padding: 14px 28px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.woorest-view-product-btn:hover {
	background: #c9386f;
	transform: translateY(-1px);
}

/* Modal Footer */
.woorest-modal-footer {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	background: #ffffff;
	border-top: 1px solid #e5e5e5;
	padding: 10px 0;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
	z-index: 10;
}

.woorest-modal-footer .woorest-product-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 0 10px;
	gap: 0.7rem;
}

/* Quantity Controls */
.woorest-quantity-controls {
	display: flex;
	align-items: center;
	gap: 5px;
	border-radius: 8px;
	padding: 4px;
}

.woorest-quantity-btn {
    position: relative;
    width: 36px;
    height: 36px;
	background: rgb(240, 240, 240);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
    line-height: 1;
}

.woorest-quantity-btn::before,
.woorest-quantity-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: currentColor;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.woorest-quantity-btn::before {
    width: 14px;
    height: 2px;
}

#woorest-quantity-plus::after {
    width: 2px;
    height: 14px;
}

#woorest-quantity-minus::after {
    display: none;
}

.woorest-quantity-btn:hover {
	background: var(--button-bg);
	color: #ffffff;
}

.woorest-quantity-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.woorest-quantity-btn:disabled:hover {
	background: #ffffff;
	transform: none;
}

.woorest-quantity-input {
	width: 40px;
	height: 36px;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	font-size: 13px;
	text-align: center;
	background: #ffffff;
	margin: 0 4px;
	appearance: textfield;
}

.woorest-quantity-input:focus {
	outline: 2px solid #c9386f;
	outline-offset: 1px;
}

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

/* Body Modal Open State */
body.woorest-modal-open {
	overflow: hidden;
}

body.woorest-allergy-info-open {
	overflow: hidden;
}

/* Small Desktop and Tablet Styles - 786px and below */
@media (max-width: 786px) {
	.woorest-modal-content {
		max-height: 95vh;
		border-radius: 8px;
		margin: 0;
		width: 100%;
	}

	.woorest-modal-body {
		max-height: calc(95vh - 60px);
		padding: 0;
	}

	.woorest-product-modal-wrapper {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 0;
	}

	.woorest-product-main-image {
		max-height: 250px;
		margin-bottom: 0.5rem;
	}

	.woorest-product-thumbnails {
		padding: 0 16px 4px 16px;
		gap: 8px;
		margin-top: 12px;
	}

	.woorest-product-thumbnail {
		width: 60px;
		height: 60px;
	}

	.woorest-product-title-row {
		padding: 0 14px;
		margin-bottom: 0.3rem;
		gap: 4px;
	}

	.woorest-product-title-row.sticky-active {
		padding: 16px 16px 12px 30px;
		margin: 8px -16px 0 -16px;
	}

	.woorest-product-price {
		padding: 0 16px;
		margin-bottom: 0.3rem;
	}

	.woorest-product-description {
		padding: 0 16px 16px 16px;
	}

	/* Attribute/Variation sections */
	.woorest-attr-wrapper {
		padding: 12px 12px 12px 12px;
		margin: 0 0 16px 0;
	}

	.woorest-attr-legend {
		margin-bottom: 8px;
		padding-bottom: 0;
	}.woorest-attr-option {
		padding: 10px 12px;
	}/* Toppings sections */
	.woorest-product-toppings__set {
		margin: 0 0 16px 0;
		padding: 6px 16px 12px 16px;
	}

	.woorest-product-toppings__set-header {
		padding: 0 16px;
	}.woorest-product-toppings__option {
		padding: 10px 12px;
	}.woorest-product-toppings__select {
		padding: 8px 12px;
		padding-right: 36px;
	}

	/* Modal footer adjustments */
	.woorest-modal-footer {
		padding: 12px 16px;
		position: sticky;
		bottom: 0;
	}

	.woorest-modal-footer .woorest-product-actions {
		flex-direction: row;
		gap: 8px;
		padding: 0;
		align-items: center;
	}

	.woorest-modal-footer .woorest-add-to-cart-btn {
		padding: 10px 12px;
		height: 50px;
	}

	.woorest-quantity-controls {
		gap: 3px;
		padding: 2px;
	}

	.woorest-quantity-btn {
		width: 36px;
		height: 36px;
	}

	.woorest-quantity-input {
		width: 36px;
		height: 28px;
		margin: 0 2px;
	}

	/* Close button adjustments */
	.woorest-modal-close {
		top: 10px;
		right: 12px;
		width: 28px;
		height: 28px;
	}

	.woorest-modal-close svg {
		width: 16px;
		height: 16px;
	}
}

/* Tablet Styles - 768px and below */
@media (max-width: 768px) {

	.woorest-product-main-image {
		max-height: 220px;
	}

	.woorest-product-thumbnails {
		padding: 0 12px 4px 12px;
	}}

/* Toppings Responsive Styles - 786px and below */
@media (max-width: 786px) {
	.woorest-product-toppings__set {
		padding: 12px 12px 12px 12px;
		margin: 0 0 16px 0;
	}

	.woorest-product-toppings__set-header {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		margin-bottom: 8px;
		padding: 0 16px;
	}

	.woorest-product-toppings__option {
		padding: 8px 12px;
	}

	.woorest-product-toppings__option-content {
		gap: 8px;
	}

	.woorest-product-toppings__select {
		padding: 12px;
		padding-right: 32px;
	}
}

/* Additional Toppings Styles for smaller tablets */
@media (max-width: 768px) {
	.woorest-product-toppings__set {
		padding: 10px 10px 10px 10px;
		margin: 0 0 16px 0;
	}

	.woorest-product-toppings__set-header {
		padding: 0 10px;
		margin-bottom: 8px;
	}
}

/* Mobile Styles - 480px and below */
@media (max-width: 480px) {
	.woorest-modal-container {
		padding: 8px;
		max-width: 100vw;
	}

	.woorest-modal-content {
		max-height: calc(var(--woorest-vh, 1vh) * 90);
		border-radius: 6px;
		margin: 0;
		width: 100%;
	}

	.woorest-modal-body {
		max-height: calc(var(--woorest-vh, 1vh) * 90 - 50px);
		padding: 0;
	}

	.woorest-product-modal-wrapper {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 0;
	}

	.woorest-product-main-image {
		max-height: 200px;
		margin-bottom: 0.25rem;
	}

	.woorest-product-thumbnails {
		padding: 0 12px 4px 12px;
		gap: 6px;
		margin-top: 8px;
	}

	.woorest-product-thumbnail {
		width: 50px;
		height: 50px;
	}

	.woorest-product-title-row {
		padding: 0 12px;
		margin-bottom: 0.5rem;
		gap: 4px;
	}

	.woorest-product-title-row.sticky-active {
		padding: 11px 10px 8px 22px;
		margin: 6px -12px 0 -12px;
	}

	.woorest-product-price {
		padding: 0 12px;
		margin-bottom: 0.5rem;
	}

	.woorest-product-description {
		padding: 0 12px 12px 12px;
	}

	/* Attribute/Variation sections */
	.woorest-attr-wrapper {
		margin: 0 0 12px 0;
		padding: 12px 12px 12px 12px;
	}

	.woorest-attr-legend {
		margin-bottom: 8px;
		padding-bottom: 0;
	}.woorest-attr-option {
		padding: 8px 10px;
	}/* Toppings sections */
	.woorest-product-toppings__set {
		margin: 0 0 12px 0;
		padding: 12px 12px 12px 12px;
	}

	.woorest-product-toppings__set-header {
		padding: 0 12px;
		margin-bottom: 8px;
	}.woorest-product-toppings__badge {
		min-width: 50px;
	}.woorest-product-toppings__select {
		padding: 12px 10px;
		padding-right: 30px;
	}

	/* Modal footer adjustments */
	.woorest-modal-footer {
		padding: 8px 12px;
		position: sticky;
		bottom: 0;
	}

	.woorest-modal-footer .woorest-product-actions {
		flex-direction: row;
		gap: 6px;
		padding: 0;
		align-items: center;
	}

	.woorest-modal-footer .woorest-add-to-cart-btn {
		padding: 10px;
		height: 50px;
	}

	.woorest-quantity-controls {
		gap: 2px;
		padding: 1px;
	}

	.woorest-quantity-btn {
		width: 32px;
		height: 32px;
	}

	.woorest-quantity-input {
		width: 30px;
		height: 24px;
		margin: 0 5px;
	}

	/* Close button adjustments */
	.woorest-modal-close {
		top: 6px;
		right: 10px;
		width: 28px;
		height: 28px;
	}

	.woorest-modal-close svg {
		width: 14px;
		height: 14px;
	}

	/* Loading state */
	.woorest-modal-loading {
		padding: 30px 15px;
	}.woorest-loading-spinner {
		width: 28px;
		height: 28px;
	}
}

.woorest-allergy-info-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.woorest-allergy-info-modal.is-open {
	display: flex;
}

.woorest-allergy-info-modal__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
}

.woorest-allergy-info-modal__dialog {
	position: relative;
	background: #ffffff;
	border-radius: 14px;
	width: 100%;
	max-width: 390px;
	max-height: min(80vh, 560px);
	box-shadow: 0 20px 35px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 1;
	box-sizing: border-box;
	margin: 0 auto;
	align-self: center;
}

.woorest-allergy-info-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.woorest-allergy-info-modal__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #2b2b2b;
}

.woorest-allergy-info-modal__close {
	position: relative;
	background: none;
	border: none;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	border-radius: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: color 0.2s ease;
}

.woorest-allergy-info-modal__close:hover,
.woorest-allergy-info-modal__close:focus {
	outline: none;
}

.woorest-allergy-info-modal__close::before {
	content: '\00d7';
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	color: #555555;
	transition: color 0.2s ease;
	position: static;
}

.woorest-allergy-info-modal__close:hover::before,
.woorest-allergy-info-modal__close:focus-visible::before {
	color: #c9386f;
}

.woorest-allergy-info-modal__content {
	padding: 16px 24px 24px;
	overflow-y: auto;
	color: #4c4c4c;
	font-size: 15px;
	line-height: 1.6;
}

@media (max-width: 480px) {
	.woorest-allergy-info-modal {
		padding: 0;
		align-items: center;
		justify-content: center;
	}

	.woorest-allergy-info-modal__dialog {
		width: auto;
		max-width: 100%;
		margin: 16px;
		border-radius: 12px;
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
	}

	.woorest-allergy-info-modal__header {
		padding: 16px 18px 8px;
	}

	.woorest-allergy-info-modal__content {
		padding: 14px 18px 18px;
	}

	.woorest-allergy-info-modal__icon {
		margin: 0 0 16px;
	}
}

.woorest-allergy-info-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 4px 0 18px;
}

.woorest-allergy-info-modal__icon img {
	display: block;
	width: 64px;
	height: auto;
}

.woorest-allergy-info-modal__content p {
	margin: 0 0 12px;
}

.woorest-allergy-info-modal__content p:last-child {
	margin-bottom: 0;
}

/* Animation for modal entrance */
@media (prefers-reduced-motion: no-preference) {
	.woorest-modal-content {
		animation: woorest-modal-enter 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	}
}

@keyframes woorest-modal-enter {
	0% {
		transform: translateY(30px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.woorest-modal-overlay {
		background: rgba(0, 0, 0, 0.8);
	}

	.woorest-modal-content {
		border: 2px solid #000000;
	}

}

/* Product Modal Toast Notification */
.woorest-toast-container {
	position: absolute;
	bottom: 85px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	z-index: 100;
	pointer-events: none;
}

@media (max-width: 786px) {
	.woorest-toast-container {
		bottom: 75px;
		width: 100%;
		padding: 0 20px;
		box-sizing: border-box;
	}
}

.woorest-toast {
	min-width: 220px;
	max-width: min(400px, 90vw);
	padding: 10px 14px;
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.18);
	background: #323232;
	color: #ffffff;
	font-size: 12px;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: auto;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.woorest-toast--error {
	background: #323232;
}

.woorest-toast--success {
	background: rgba(32, 148, 84, 0.95);
}

.woorest-toast--info {
	background: rgba(51, 51, 51, 0.95);
}

.woorest-toast.is-hiding {
	opacity: 0;
	transform: translateY(-6px);
}
