/* Prontox Plugin Site Custom Styles */
/* Design aligned with WordPress Block Editor / Global Styles (theme.json) */
/* Variation Swatches + Product Add-ons – Marino Pizza reference style */

/* ============================================================
   WooCommerce Product Add-ons Container
   ============================================================ */
.product-addon {
	background-color: color-mix(in srgb, var(--wp--preset--color--surface) 70%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--wp--preset--color--border, rgba(255, 255, 255, 0.05));
	border-radius: var(--wp--preset--spacing--30, 16px);
	padding: var(--wp--preset--spacing--40, 1.5rem);
	margin-bottom: var(--wp--preset--spacing--50, 2rem);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-addon h3.addon-name {
	display: block;
	grid-column: 1 / -1;
	margin: 0 0 4px 0;
	font-family: var(--wp--preset--font-family--outfit, sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--contrast, #171717);
}

.product-addon .addon-description {
	grid-column: 1 / -1;
	margin: 0 0 8px 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	color: var(--wp--preset--color--muted, #6b7280);
}

/* Option Row Pills styling */
.product-addon p.form-row.form-row-wide {
	margin: 0;
	padding: 0;
	display: flex;
}

.product-addon p.form-row.form-row-wide label {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 10px 14px;
	background: var(--wp--preset--color--surface, #1a1a1a);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--contrast, #e5e5e5);
	box-sizing: border-box;
	user-select: none;
	min-height: 42px;
}

/* Hide native checkbox/radio — the pill itself acts as the visual indicator */
.product-addon p.form-row.form-row-wide label input[type="checkbox"],
.product-addon p.form-row.form-row-wide label input[type="radio"] {
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--wp--preset--color--primary, #f68363);
	cursor: pointer;
}

/* Option label name — grows to fill available space */
.product-addon p.form-row.form-row-wide label .addon-option-name {
	flex: 1 1 auto;
	line-height: 1.2;
}

/* Option price — pinned to the right, muted by default */
.product-addon p.form-row.form-row-wide label .addon-price {
	flex-shrink: 0;
	margin-left: auto;
	padding-left: 6px;
	font-weight: 700;
	color: var(--wp--preset--color--muted, #6b7280);
	font-size: 0.8rem;
	white-space: nowrap;
}

/* Checked state: active card surface + primary color border */
.product-addon p.form-row.form-row-wide label:has(input:checked) {
	background: rgba(255, 49, 49, 0.1) !important;
	border-color: var(--wp--preset--color--primary, #ff3131) !important;
	box-shadow: 0 4px 15px rgba(255, 49, 49, 0.2);
}

/* Checked — price turns primary */
.product-addon p.form-row.form-row-wide label:has(input:checked) .addon-price {
	color: var(--wp--preset--color--primary, #f68363);
}

/* Hover state pill interaction */
.product-addon p.form-row.form-row-wide label:hover {
	border-color: rgba(255, 49, 49, 0.5);
}

.product-addon p.form-row.form-row-wide label:has(input:checked):hover {
	border-color: var(--wp--preset--color--primary, #f68363);
}

/* Limit message helper text */
.prontox-addon-limit-message {
	grid-column: 1 / -1;
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted, #6b7280);
	margin-top: 4px;
}

/* Text and textarea addons standard fields */
.product-addon input[type="text"],
.product-addon textarea,
.product-addon select {
	width: 100%;
	grid-column: 1 / -1;
	padding: 10px 14px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: var(--wp--style--block-custom-border-radius, 4px);
	background: var(--wp--preset--color--surface, #f5f5f2);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	color: var(--wp--preset--color--contrast, #171717);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.product-addon input[type="text"]:focus,
.product-addon textarea:focus,
.product-addon select:focus {
	border-color: var(--wp--preset--color--primary, #f68363);
	background: var(--wp--preset--color--base, #ffffff);
	outline: none;
}

/* Totals Summary Wrapper and Grid */
#product-addons-total {
	background: rgba(26, 26, 26, 0.6);
	border-radius: var(--wp--style--block-custom-border-radius, 8px);
	padding: var(--wp--preset--spacing--30, 1.25rem);
	margin-top: var(--wp--preset--spacing--30, 1.25rem);
	margin-bottom: var(--wp--preset--spacing--40, 1.5rem);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-addon-totals {
	display: grid;
	grid-template-columns: 1fr auto;
	row-gap: 8px;
	column-gap: 16px;
	margin: 0;
}

.product-addon-totals dt {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--contrast, #171717);
	margin: 0;
}

.product-addon-totals dd {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	font-weight: 800;
	color: var(--wp--preset--color--primary, #f68363);
	margin: 0;
	text-align: right;
}

.product-addon-totals dd strong {
	font-weight: 800;
}

.product-addon-totals dd small {
	display: block;
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	color: var(--wp--preset--color--muted, #6b7280);
	font-weight: normal;
}

/* ============================================================
   Single Product — Add to Cart Form Layout
   Button visual styles are inherited from .wp-element-button
   defined by theme.json (styles.elements.button). No duplication.
   ============================================================ */
form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30, 0.75rem);
	margin-top: var(--wp--preset--spacing--40, 1.5rem);
	margin-bottom: var(--wp--preset--spacing--40, 1.5rem);
}

form.cart .quantity {
	display: inline-flex;
	align-items: center;
	background: var(--wp--preset--color--surface, #f5f5f2);
	border-radius: 4px;
	overflow: hidden;
	height: 48px;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

form.cart .quantity input.qty {
	width: 60px;
	height: 100%;
	border: none;
	background: transparent;
	text-align: center;
	font-size: var(--wp--preset--font-size--medium, 1rem);
	font-weight: 700;
	color: var(--wp--preset--color--contrast, #171717);
	padding: 0;
}

form.cart .quantity input.qty:focus {
	outline: none;
}

/* Add-to-cart: sizing only — colors/font/radius come from wp-element-button */
form.cart .single_add_to_cart_button {
	height: 48px;
	padding: 0 var(--wp--preset--spacing--40, 1.5rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

form.cart .single_add_to_cart_button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(246, 131, 99, 0.25);
}

form.cart .single_add_to_cart_button:active {
	transform: translateY(0);
}

/* Responsiveness breakpoints for grid cards */
@media screen and (max-width: 500px) {
	.product-addon {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

/* ============================================================
   Variation Selectors — Card Container
   Matches .product-addon card design: same border, background,
   padding, and radius. Pills are rendered via prontox-plugin-swatches.css
   ============================================================ */
.variations_form .variations {
	background: rgba(26, 26, 26, 0.6);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--30, 0.75rem);
	margin-bottom: var(--wp--preset--spacing--40, 1rem);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.variations_form .variations td.label label {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--wp--preset--color--contrast, #171717);
	margin-bottom: 8px;
	display: block;
}

/* ============================================================
   Combo Product Summaries — Card Container
   Each combined_product_summary block gets the same card
   treatment as product-addon and variation sections.
   ============================================================ */
.combo_form .combined_product_summary {
	background: var(--wp--preset--color--base, #ffffff) !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
	border-radius: 4px;
	padding: var(--wp--preset--spacing--30, 0.75rem);
	margin-bottom: var(--wp--preset--spacing--30, 0.75rem) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

h4.combined_product_title {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: var(--wp--preset--font-size--medium, 1rem) !important;
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--20, 0.5rem);
	color: var(--wp--preset--color--contrast, #171717);
}

/* Combo variation table — flat, no table chrome */
.combo_form .combined_product .cart .variations,
.combo_form .combined_product .cart .variations tr,
.combo_form .combined_product .cart .variations td {
	border: 0 !important;
	background: transparent !important;
}

.combo_form table.variations td,
.combo_form table.variations th {
	padding: 4px 0 !important;
}

.combo_form .combined_product .cart .variations td.label {
	padding-top: 0 !important;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	color: var(--wp--preset--color--muted, #6b7280);
}

/* Combo optional checkbox row */
.combined_product_summary .combined_product_optional_checkbox {
	padding: var(--wp--preset--spacing--20, 0.5rem) 0;
	margin-bottom: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
}

/* Combo price display */
.combined_item_cart_details span.price,
.combined_item_cart_details .single_variation .price {
	color: var(--wp--preset--color--primary, #f68363);
	font-weight: 700;
}

.prontox-quick-view-lightbox.mfp-bg,
.prontox-quick-view-lightbox.mfp-wrap {
	height: 70%;
	left: 20%;
	position: fixed;
	top: 20%;
	width: 70%;
	z-index: 1043;
	border-radius: var(--wp--style--block-custom-border-radius, 12px);
	overflow: hidden;
}

.prontox-quick-view-lightbox.mfp-bg.mfp-fade.mfp-ready {
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	height: 100%;
	left: 0;
	top: 0;
	width: 100%;
}

p.woocommerce-mini-cart__total.total {
	margin-bottom: var(--wp--preset--spacing--50, 1.5rem);
}

/* Custom Scrollbar Styles using Theme Palettes */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--wp--preset--color--surface, #f5f5f2);
}

::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--primary, #f68363);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--wp--preset--color--accent, #eab308);
}

ul.woocommerce-error {
	list-style: none;
	padding-left: 0;
}

ul.woocommerce-error li .woocommerce-Price-amount.amount {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 700;
}

ul.woocommerce-error li .woocommerce-Price-amount.amount:first-child {
	color: #dc2626; /* Kept semantic red for validation error pricing */
}

ul.woocommerce-error li .woocommerce-Price-amount.amount:last-child {
	color: #10b981; /* Kept semantic green for success pricing */
}

.woocommerce-MyAccount-navigation-link--downloads {
	display: none !important;
}

.product-category.product a:hover .woocommerce-loop-category__title {
	background: var(--wp--preset--color--contrast, #171717) !important;
	color: var(--wp--preset--color--base, #ffffff) !important;
	padding: var(--wp--preset--spacing--20, 0.5rem) 0;
	border-radius: var(--wp--style--block-custom-border-radius, 4px);
}

.woocommerce-info.csp-shipping-rate-notice,
.woocommerce-info.csp-payment-gateway-notice {
	background: var(--wp--preset--color--primary, #f68363);
	color: var(--wp--preset--color--base, #ffffff);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	font-weight: 600;
	padding: var(--wp--preset--spacing--30, 0.75rem);
	border-radius: var(--wp--style--block-custom-border-radius, 4px);
	border: none;
}

.remove_btn {
	display: none !important;
	pointer-events: none !important;
}

.prontox-closed-store-message {
	align-items: center;
	display: flex;
}

@media screen and (max-width: 450px) {
	.prontox-quick-view-lightbox .prontox-quickview-images,
	.prontox-quick-view-lightbox .summary.entry-summary {
		padding: var(--wp--preset--spacing--20, 0.5rem);
	}

	.prontox-quick-view-lightbox.mfp-bg,
	.prontox-quick-view-lightbox.mfp-wrap {
		left: 5%;
		width: 90%;
	}
}

/* Contact form ajax spinner (replaces former loader image). */
.prontox-contacts-loading {
	display: inline-block;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: var(--wp--preset--color--primary, #ff3131);
	border-radius: 50%;
	animation: prontox-contacts-spin 0.7s linear infinite;
}

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

/* Food-menu "no image" placeholder (replaces former cat_not_found image). */
.prontox-foodmenu-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	min-height: 100px;
	color: var(--wp--preset--color--contrast, #999);
	background: var(--wp--preset--color--surface, #f3f3f3);
	opacity: 0.4;
}

.prontox-foodmenu-placeholder svg {
	width: 40%;
	max-width: 64px;
	height: auto;
}

/* WooCommerce's blocktheme stylesheet caps the classic cart/checkout containers at 1000px.
   The body-prefixed selectors outrank that rule so the pages use the theme's content width. */
body.woocommerce-cart .wp-block-post-title,
body.woocommerce-cart main .woocommerce,
body.woocommerce-checkout .wp-block-post-title,
body.woocommerce-checkout main .woocommerce {
	max-width: none;
}
