/* ==========================================================================
   Joe Palermo — theme additions
   Only functional rules and styling for markup that has no source equivalent.
   Layout, typography and colours of source elements come from app.css.
   ========================================================================== */

[hidden] {
	display: none !important;
}

html {
	scroll-behavior: smooth;
}

/* WordPress admin bar: keep the fixed header and mobile menu below it. */
body.admin-bar .site-header {
	top: 32px;
}

body.admin-bar #theme-mobile-menu {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}

	body.admin-bar #theme-mobile-menu {
		top: 46px;
	}
}

/* Pointer on interactive elements (matches Lovable UX). */
a[href],
button:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="reset"]:not(:disabled),
label[for],
select,
summary,
.pop-btn,
.theme-attr-pill,
.theme-product-thumb,
[data-cart-open],
[data-menu-toggle],
[data-video-title],
[data-cat-slug],
.theme-qty-plus,
.theme-qty-minus,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	cursor: pointer;
}

button:disabled,
input:disabled,
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled {
	cursor: not-allowed;
}

html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

.lenis.lenis-smooth iframe {
	pointer-events: none;
}

/* Header state -------------------------------------------------------------
   The scroll handler swaps the source class strings, exactly like the source.
   is-solid is kept as a state hook only. */

.site-header {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* Mobile menu -------------------------------------------------------------- */

#theme-mobile-menu {
	transform: translateY(-100%);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#theme-mobile-menu.is-open {
	transform: translateY(0);
}

/* Hero entrance motion (framer-motion variants from the source) ------------ */

@keyframes theme-fade-up {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes theme-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes theme-portrait {
	from {
		opacity: 0;
		transform: rotate(0deg);
	}
	to {
		opacity: 1;
		transform: rotate(2deg);
	}
}

.hero-anim {
	animation: theme-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-brand-logo {
	display: block;
	width: auto;
	object-fit: contain;
}

.theme-brand-logo-header {
	height: 2.25rem;
	max-width: 220px;
}

.theme-brand-logo-footer {
	height: 2.75rem;
	max-width: 280px;
}

#video-modal [data-video-player] {
	display: block;
	width: 100%;
}

/* Huge display heading overflows its box; keep clicks on the booking line. */
.hero-title {
	pointer-events: none;
	z-index: 0;
}

.hero-booking-line {
	position: relative;
	z-index: 10;
}

.hero-anim-1 {
	animation-duration: 0.5s;
}

.hero-anim-2 {
	animation-delay: 0.1s;
}

.hero-anim-3 {
	animation-name: theme-fade;
	animation-duration: 0.6s;
	animation-delay: 0.35s;
}

.hero-anim-4 {
	animation-name: theme-fade;
	animation-duration: 0.6s;
	animation-delay: 0.5s;
}

.hero-portrait-anim {
	animation: theme-portrait 0.6s ease both;
	animation-delay: 0.3s;
}

/* Scroll reveal (source Reveal component: y 32px, 0.9s, once, -80px margin) */

[data-reveal] {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

body.is-customizer [data-reveal] {
	opacity: 1 !important;
	transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.hero-anim,
	.hero-portrait-anim {
		animation: none;
	}

	.marquee-track {
		animation: none;
	}
}

/* Video modal -------------------------------------------------------------- */

#video-modal {
	opacity: 0;
	transition: opacity 0.2s ease;
}

#video-modal.is-open {
	opacity: 1;
}

/* Cart drawer + overlay ---------------------------------------------------- */

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: color-mix(in srgb, var(--ink) 50%, transparent);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

#theme-cart-drawer {
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

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

body.cart-open {
	overflow: hidden;
}

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

/* The source renders no badge at all when the cart is empty. */
.theme-cart-count:empty {
	display: none;
}

/* Contact form ------------------------------------------------------------- */

[data-contact-message].is-error {
	color: var(--pop);
}

/* Shop filters ------------------------------------------------------------- */

.theme-product-card-wrap.is-hidden {
	display: none;
}

/* Quantity inputs ---------------------------------------------------------- */

.theme-qty-input {
	width: 1.5rem;
	border: 0;
	background: transparent;
	padding: 0;
	text-align: center;
	font-weight: 700;
	appearance: textfield;
	-moz-appearance: textfield;
}

.theme-stock-badge {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
}

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

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

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

.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-gallery .pop-card {
	height: 100%;
}

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

.single-product .theme-product-thumb.is-active {
	border-color: var(--pop);
	box-shadow: 2px 2px 0 0 var(--ink);
}

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

/* Variation markup (WooCommerce generated) -------------------------------- */

.theme-attr-select-hidden {
	display: none !important;
}

.single-product .variations {
	display: none !important;
}

/* The source always shows the quantity + add-to-cart row (disabled until a
   variation is chosen). WooCommerce hides this wrap via inline style until a
   variation is selected, so keep it in the layout. */
.single-product .single_variation_wrap {
	display: block !important;
}

.single-product .single_variation_wrap .woocommerce-variation-price {
	display: none;
}

.single-product .single_variation_wrap .woocommerce-variation-price .price {
	font-family: var(--font-display);
	font-size: 1.5rem;
	color: var(--pop);
}

.single-product .single_variation_wrap .woocommerce-variation-availability p {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--pop);
}

.single-product .woocommerce-variation-add-to-cart {
	margin-top: 0;
}

/* Add to cart button 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,
.single_add_to_cart_button.button.wc-variation-is-unavailable {
	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;
}

/* Hide "View cart" injected by WooCommerce after AJAX add-to-cart */
.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;
}

/* Suppress WooCommerce's own loading spinner: the theme owns the state */
.single-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
	display: none !important;
}

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

/* WooCommerce generated prices inherit the source typography ---------------- */

.woocommerce-Price-amount,
.woocommerce-Price-currencySymbol {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* Notices ------------------------------------------------------------------ */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	font-family: var(--font-sans);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: var(--card);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	list-style: none;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce-error {
	border-color: var(--pop);
}

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

/* Cart / account / thank you shared width ---------------------------------- */

body.theme-cart-page .entry-content,
body.woocommerce-account .entry-content,
body.theme-thankyou-page .entry-content {
	min-width: 0;
	max-width: none;
}

.page-title {
	margin-bottom: 2rem;
}

/* Checkout block ----------------------------------------------------------- */

body.woocommerce-checkout .entry-content {
	min-width: 0;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	width: 100%;
	max-width: none;
	font-family: var(--font-sans);
	color: var(--foreground);
}

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

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

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: var(--card);
	border: 3px solid var(--ink);
	border-radius: var(--radius);
	box-shadow: 6px 6px 0 0 var(--ink);
	padding: 1.5rem;
}

body.woocommerce-checkout .wc-block-checkout__main h2,
body.woocommerce-checkout .wc-block-checkout__sidebar h2,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 0.95;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .woocommerce-checkout .form-row select {
	width: 100% !important;
	max-width: none !important;
	border: 2px solid var(--ink) !important;
	border-radius: 0.5rem !important;
	background-color: #fff !important;
	font-family: var(--font-sans) !important;
	font-size: 1rem !important;
	color: var(--foreground) !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-textarea textarea:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus {
	outline: 3px solid var(--royal) !important;
	outline-offset: 1px !important;
}

body.woocommerce-checkout .wc-block-components-text-input input::placeholder,
body.woocommerce-checkout .wc-block-components-textarea textarea::placeholder {
	color: var(--muted-foreground);
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 3px solid var(--ink) !important;
	border-radius: 999px !important;
	background-color: var(--pop) !important;
	color: var(--cream) !important;
	padding: 0.8rem 1.4rem !important;
	font-weight: 700 !important;
	font-size: 0.875rem !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	box-shadow: 4px 4px 0 0 var(--ink);
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--foreground);
}

body.woocommerce-checkout .wc-block-cart-items {
	border-color: var(--ink);
}

/* Thank you page ----------------------------------------------------------- */

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

body.theme-thankyou-page .woocommerce-order {
	max-width: 56rem;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
	font-family: var(--font-display);
	padding: 0 0 1rem 0;
}

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

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: var(--card);
	padding: 0.75rem 1rem;
	font-weight: 700;
}

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

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;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
}

/* My account / cart plain WooCommerce markup ------------------------------- */

.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
	padding: 0.75rem;
	text-align: left;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--sun);
	color: var(--ink);
	padding: 0.8rem 1.4rem;
	font-weight: 700;
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	box-shadow: 4px 4px 0 0 var(--ink);
}

/* Entry content links in WordPress-rendered copy --------------------------- */

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 4px;
}
