/* ============================================================
   Mtl Finest Dining — theme layer.

   app.css is the compiled stylesheet of the design and already carries
   every utility class used by the templates. This file only adds:
   - functional state rules (drawer, header state, reveals)
   - styling for markup WordPress and WooCommerce generate themselves
   ============================================================ */

[hidden] {
	display: none !important;
}

:root {
	--header-height: 112px;
	--color-surface: hsl(var(--card));
	--card-radius: 0.75rem;
	--section-padding: 2rem;
	--checkout-gap: 3rem;
}

/* ------------------------------------------------------------
   Header states
   ------------------------------------------------------------ */
.site-header {
	background-color: transparent;
}

.site-header.is-solid {
	background-color: hsl(var(--background) / 0.95);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border-bottom: 1px solid hsl(var(--border));
}

.site-header .theme-header-gradient {
	display: block;
}

.site-header.is-solid .theme-header-gradient {
	display: none;
}

.site-logo-img {
	height: var(--logo-height, 128px) !important;
	width: auto !important;
	display: block;
}

.site-header.is-solid .site-logo-img,
.site-logo-img.theme-logo-compact {
	height: calc(var(--logo-height, 128px) * 0.78) !important;
}

@media (max-width: 1023px) {
	.site-logo-img {
		height: calc(var(--logo-height, 128px) * 0.78) !important;
	}
}

.theme-logo-white {
	filter: brightness(0) invert(1);
}

.site-logo-text {
	font-size: 1.75rem;
	line-height: 1;
	display: block;
}

/* Inner pages keep clear of the fixed header; the home hero sits beneath it. */
.theme-no-hero-main {
	padding-top: var(--header-height);
}

.home main,
body.home .theme-page {
	padding-top: 0;
}

/* ------------------------------------------------------------
   Footer nav menus assigned in Appearance -> Menus
   ------------------------------------------------------------ */
.theme-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

footer .menu,
footer .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

footer .menu a {
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 300;
	color: hsl(var(--cream) / 0.7);
	text-decoration: none;
	transition: color 0.3s ease;
}

footer .menu a:hover {
	color: hsl(var(--cream));
}

.theme-nav-link {
	text-decoration: none;
}

/* ------------------------------------------------------------
   Cart drawer + overlay
   ------------------------------------------------------------ */
#theme-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	max-width: 28rem;
	z-index: 60;
	display: flex;
	flex-direction: column;
	background-color: hsl(var(--background));
	box-shadow: var(--shadow-elevated);
	transform: translateX(100%);
	transition: transform 0.4s var(--transition-smooth);
	visibility: hidden;
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
	visibility: visible;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 55;
	background-color: hsl(var(--foreground) / 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--transition-smooth), visibility 0.3s linear;
	cursor: pointer;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	visibility: visible;
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

/* ------------------------------------------------------------
   Product cards (shared wrapper in every listing context)
   ------------------------------------------------------------ */
.theme-product-card-wrap {
	height: 100%;
	min-width: 0;
}

.theme-product-card-wrap .theme-product-image-link {
	display: block;
}

.theme-product-card-wrap img {
	display: block;
}

.theme-product-card-wrap .theme-card-price {
	white-space: nowrap;
}

/* ------------------------------------------------------------
   Reveal animations (mirrors the design motion inventory)
   ------------------------------------------------------------ */
[data-reveal],
[data-reveal-media],
[data-reveal-badge] {
	opacity: 0;
	will-change: opacity, transform;
}

[data-reveal] {
	transform: translateY(32px);
	filter: blur(8px);
	transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
		filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-media] {
	transform: translateY(42px) scale(0.97);
	filter: blur(10px);
	transition: opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1),
		transform 1.05s cubic-bezier(0.16, 1, 0.3, 1),
		filter 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-badge] {
	transform: translateY(-10px) scale(0.92);
	transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s,
		transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s;
}

[data-reveal].is-visible,
[data-reveal-media].is-visible,
[data-reveal-badge].is-visible {
	opacity: 1;
	transform: none;
	filter: blur(0);
}

/* Hero entrance: eyebrow, headline words, copy and buttons.
   Pure CSS animation with fill-mode both so the stagger runs on load and
   stays readable when scripts are unavailable. */
[data-hero-item] {
	animation: themeFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
	animation-delay: var(--hero-delay, 0.55s);
}

[data-hero-item]:nth-of-type(1) {
	--hero-delay: 0.55s;
}

[data-hero-item]:nth-of-type(2) {
	--hero-delay: 0.7s;
}

[data-hero-item]:nth-of-type(3) {
	--hero-delay: 0.94s;
}

[data-hero-item]:nth-of-type(4) {
	--hero-delay: 1.06s;
}

.theme-split-words .theme-word {
	animation: themeWordIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
	animation-delay: var(--word-delay, 0.05s);
}

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

@keyframes themeWordIn {
	from {
		opacity: 0;
		transform: translateY(0.6em);
		filter: blur(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
		filter: blur(0);
	}
}

/* Customizer preview and no-JS fallbacks: never hide editable content. */
body.is-customizer [data-reveal],
body.is-customizer [data-reveal-media],
body.is-customizer [data-reveal-badge],
body.is-customizer .theme-word,
body.is-customizer [data-hero-item] {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

body.is-customizer [data-hero-item],
body.is-customizer .theme-split-words .theme-word {
	animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal],
	[data-reveal-media],
	[data-reveal-badge],
	[data-hero-item],
	.theme-split-words .theme-word {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
		animation: none !important;
		transition: none !important;
	}

	#theme-cart-drawer,
	#theme-cart-overlay {
		transition: none !important;
	}
}

/* Category cards use a button or a link depending on the filter setting. */
.theme-category-card {
	display: block;
	height: 100%;
	width: 100%;
	text-align: left;
}

a.theme-category-card {
	text-align: inherit;
}

/* ------------------------------------------------------------
   Add to cart: disabled / loading states
   ------------------------------------------------------------ */
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
	cursor: not-allowed !important;
	opacity: 0.4 !important;
	pointer-events: none !important;
}

.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
	opacity: 0.4 !important;
}

.ajax_add_to_cart.theme-btn-loading {
	opacity: 0.6 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

.single-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
	display: none !important;
}

/* "View cart" injected by WooCommerce after an AJAX add is not in the design. */
.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward {
	display: none !important;
}

/* ------------------------------------------------------------
   Single product: responsive layout
   ------------------------------------------------------------ */
.single-product .theme-product-layout,
.single-product .theme-product-gallery,
.single-product .theme-product-info {
	min-width: 0;
	max-width: 100%;
}

.single-product .theme-product-thumbnails {
	flex-wrap: wrap;
	max-width: 100%;
}

.single-product .theme-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 1rem;
}

.single-product .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
}

.single-product .theme-quantity-wrapper {
	flex: 0 0 auto;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in,
.single-product .theme-product-info {
	overflow-wrap: break-word;
	word-break: break-word;
}

.single-product .theme-qty-input {
	width: 4.5rem;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

/* Thumbnails */
.theme-thumb-btn.is-active {
	border-color: hsl(var(--primary));
}

.theme-thumb-btn {
	cursor: pointer;
	background: transparent;
}

/* Variation pills + the native select kept for WooCommerce. */
.theme-attr-select-hidden {
	display: none !important;
}

.single-product .variations {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}

.single-product .variations tbody td.label {
	padding-bottom: 0.25rem;
}

.single-product .variations tbody td.value {
	padding-top: 0;
}

.single-product .variations td.label label {
	display: none;
}

.single-product .single_variation_wrap {
	margin-top: 1rem;
}

.single-product .woocommerce-variation-price {
	margin-bottom: 1rem;
	font-family: var(--font-body);
	font-weight: 600;
	color: hsl(var(--foreground));
}

.single-product .woocommerce-variation-availability p {
	color: hsl(var(--muted-foreground));
	font-family: var(--font-body);
}

.woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: stretch;
}

/* ------------------------------------------------------------
   WooCommerce generated markup
   ------------------------------------------------------------ */
.woocommerce .theme-product-card-wrap .price,
.theme-product-card-wrap .price {
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--foreground));
}

.theme-product-card-wrap .price del {
	opacity: 0.55;
	margin-right: 0.35rem;
}

.theme-product-card-wrap .price ins {
	text-decoration: none;
}

/* Notices: styled where they must remain visible, hidden where the drawer
   already reports the outcome. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	font-family: var(--font-body);
	font-size: 0.875rem;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	border: 1px solid hsl(var(--border));
	border-left-width: 3px;
	background-color: hsl(var(--card));
	color: hsl(var(--foreground));
}

.woocommerce-message {
	border-left-color: hsl(var(--primary));
}

.woocommerce-info {
	border-left-color: hsl(var(--silver-deep));
}

.woocommerce-error {
	border-left-color: hsl(var(--destructive));
}

.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce-notices-wrapper:empty {
	display: none;
}

/* Forms WooCommerce renders itself (account, checkout fallbacks). */
.woocommerce form .form-row label,
.woocommerce-page form .form-row label {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(var(--foreground));
	margin-bottom: 0.35rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%;
	background-color: hsl(var(--background));
	border: 1px solid hsl(var(--border));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	border-radius: 0;
	transition: border-color 0.2s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	outline: none;
	border-color: hsl(var(--primary));
}

/* Shop loop / cart tables inside the archive context. */
.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid hsl(var(--border));
	font-family: var(--font-body);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
	font-size: 0.875rem;
}

.woocommerce table.shop_table th {
	font-weight: 600;
	color: hsl(var(--foreground));
}

.woocommerce table.shop_table td {
	color: hsl(var(--muted-foreground));
}

/* Screen reader text used by WooCommerce templates. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

/* ------------------------------------------------------------
   Cart / account / thank you: width and alignment parity
   ------------------------------------------------------------ */
.theme-page .entry-content > *,
body.woocommerce-cart .entry-content > *,
body.woocommerce-account .entry-content > * {
	max-width: 100%;
}

body.woocommerce-cart .page-title,
body.woocommerce-account .page-title,
body.theme-thankyou-page .page-title,
body.woocommerce-checkout .page-title {
	width: 100%;
}

body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
	display: block;
}

body.theme-thankyou-page .woocommerce-order-overview {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 0;
	margin: 0 0 2rem;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	border-top: 1px solid hsl(var(--border));
	padding-top: 0.75rem;
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.95rem;
	letter-spacing: 0;
	text-transform: none;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
	font-family: var(--font-body);
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-details tfoot th {
	text-align: left;
}

body.theme-thankyou-page .woocommerce-order-details tfoot td {
	text-align: right;
}

body.theme-thankyou-page .woocommerce-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.7;
	color: hsl(var(--muted-foreground));
	border: 1px solid hsl(var(--border));
	padding: 1.25rem;
	font-style: normal;
}

/* ------------------------------------------------------------
   Checkout block
   ------------------------------------------------------------ */
body.woocommerce-checkout .theme-checkout-container {
	width: 100%;
	max-width: 80rem;
	margin: 0 auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

@media (min-width: 1024px) {
	body.woocommerce-checkout .theme-checkout-container {
		padding-left: 2.5rem;
		padding-right: 2.5rem;
	}
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	min-width: 0;
	width: 100%;
	max-width: none;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-gap, 3rem);
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-checkout .wc-block-components-notices {
	grid-column: 1 / -1;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 0 !important;
	color: hsl(var(--foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	width: 100% !important;
	max-width: none !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-select select:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-textarea textarea:focus {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
	box-shadow: 0 0 0 2px hsl(var(--ring) / 0.35) !important;
}

body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-select label,
body.woocommerce-checkout .wc-block-components-checkbox label {
	color: hsl(var(--muted-foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.8125rem !important;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--card));
	border-radius: var(--card-radius);
	padding: var(--section-padding);
	border: 1px solid hsl(var(--border));
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border-radius: 0 !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	min-height: 3.5rem;
	letter-spacing: 0.02em;
}

body.woocommerce-checkout .wc-block-checkout__actions {
	margin-top: 1.5rem;
}

body.woocommerce-checkout .wc-block-cart-items__row {
	border-bottom: 1px solid hsl(var(--border));
}

body.woocommerce-checkout h1.page-title,
body.woocommerce-checkout h2,
body.woocommerce-checkout h3 {
	font-family: var(--font-display);
	color: hsl(var(--foreground));
}

/* ------------------------------------------------------------
   Customizer panel: media control
   ------------------------------------------------------------ */
.theme-media-control {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.theme-media-url-input {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.theme-media-preview {
	max-width: 100%;
	height: auto;
	display: block;
}
