/*
 * Twisted Fork Studios — theme layer.
 *
 * app.css carries the compiled source stylesheet and every class the markup
 * uses. This file only adds rules for markup that has no source equivalent
 * (WooCommerce, WordPress output) plus functional hooks.
 */

:root {
	--logo-height: 56px;
	--theme-header-height: 148px;
}

[hidden] {
	display: none !important;
}

html {
	scroll-behavior: smooth;
}

section[id] {
	scroll-margin-top: 148px;
}

/* The source sets the logo box with its own width/height utilities; the
   Customizer height only caps an oversized upload so no page overflows. */
.site-logo-img {
	display: block;
	max-width: none;
	max-height: var(--logo-height);
	object-fit: contain;
}

.site-logo-text {
	font-family: 'Gambarino', Georgia, serif;
	font-size: 1.5rem;
	line-height: var(--logo-height);
	display: block;
	white-space: nowrap;
}

.site-header .site-logo-text {
	color: #fff;
}

/* ---------- Header state (scroll + inner pages) ---------- */

.site-header [data-header-bar].is-solid {
	background-color: hsl(var(--header));
	border-bottom-color: hsl(var(--ivory) / 0.15);
}

/* ---------- Hero video ---------- */

@media (prefers-reduced-motion: reduce) {
	[data-hero-video] {
		display: none;
	}
}

/* ---------- Reveal fallbacks ---------- */

body.is-customizer [data-reveal],
body.is-customizer .reveal,
body.is-customizer .scale-in-item {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

.no-js [data-reveal] {
	opacity: 1 !important;
	transform: none !important;
}

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

/* ---------- Craft carousel ---------- */

[data-craft-track] {
	will-change: transform;
}

[data-craft-viewport] {
	overflow: hidden;
}

.theme-attr-pill.is-active {
	background-color: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.theme-product-thumb {
	display: block;
	overflow: hidden;
}

.theme-product-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

#product-main-img {
	display: block;
}

/* ---------- Cart drawer ---------- */

#theme-cart-drawer {
	opacity: 0;
	transform: translateY(20px);
	visibility: hidden;
	transition: opacity 0.7s ease-out, transform 0.7s ease-out, visibility 0.7s ease-out;
}

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

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 45;
	background-color: hsl(var(--foreground) / 0.3);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

body.cart-open {
	overflow: hidden;
}

.theme-cart-count:empty {
	display: none;
}

/* Keep the drawer animated only via body.cart-open (fragments replace nodes) */
#theme-cart-drawer.animate-slide-in-bottom {
	animation: none;
}

/* ---------- Dialog ---------- */

body.theme-dialog-open {
	overflow: hidden;
}

[data-dialog-panel] {
	animation: fade-in 0.2s ease-out both;
}

[data-dialog-overlay] {
	animation: fade-in 0.2s ease-out both;
}

/* ---------- Add to cart ---------- */

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

body a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
.woocommerce-page a.added_to_cart.wc-forward {
	display: none !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;
}

.ajax_add_to_cart.loading,
.ajax_add_to_cart.added {
	background-image: none !important;
}

/* ---------- Quantity control ---------- */

.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 44px;
	min-width: 44px;
	border: 0;
	background: transparent;
	text-align: center;
}

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

.theme-quantity-wrapper {
	max-width: 100%;
}

/* ---------- Product page layout ---------- */

.single-product .theme-product-layout {
	min-width: 0;
}

.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: 0.75rem;
}

.single-product .theme-add-to-cart-area .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
}

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

/* Variations table: label above control, native select hidden */
.theme-attr-select-hidden {
	display: none !important;
}

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

.single-product .variations {
	border-collapse: collapse;
	margin: 0 0 1rem;
}

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

.single-product .variations tbody td.label label {
	font-size: 0.875rem;
	line-height: 1.4;
	color: hsl(var(--foreground) / 0.75);
}

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

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

.single-product .woocommerce-variation-price {
	font-size: 1.25rem;
	font-weight: 500;
	margin-bottom: 1rem;
}

.single-product .woocommerce-variation-availability {
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

/* ---------- Product cards inside WooCommerce loops ---------- */

.theme-product-grid {
	align-items: stretch;
}

.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
}

.theme-product-card__media {
	position: relative;
}

.theme-product-card__media .theme-photo-gallery {
	position: absolute;
	inset: 0;
}

.theme-product-card-wrap > a.theme-product-card__info {
	display: block;
}

.theme-product-card-wrap > a.theme-card-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin-top: 1.25rem;
	box-sizing: border-box;
}

.theme-product-card-wrap > a.theme-card-cta svg {
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
}

/* ---------- WooCommerce notices ---------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	border-radius: 0.5rem;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	line-height: 1.6;
	border: 1px solid hsl(var(--border));
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground));
}

.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.4);
	background-color: hsl(var(--destructive) / 0.08);
}

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

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

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

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

/* ---------- Shop archive ---------- */

.theme-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.9rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--foreground) / 0.25);
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--foreground));
}

.theme-pagination .page-numbers.current {
	background-color: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.theme-pagination ul {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.theme-shop-main .entry-content {
	max-width: none;
}

/* ---------- Page shell / checkout ---------- */

body .entry-content {
	max-width: none;
}

body.woocommerce-checkout .theme-page-main {
	padding-top: var(--theme-header-height);
	padding-bottom: 4rem;
	background-color: hsl(var(--background));
}

body.woocommerce-checkout .page-title {
	font-family: 'Gambarino', Georgia, serif;
	font-weight: 400;
	letter-spacing: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.1;
	margin-bottom: 2.5rem;
	color: hsl(var(--foreground));
}

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

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large,
	body.woocommerce-checkout .wc-block-checkout.wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem;
		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-components-notice-banner {
	grid-column: 1 / -1;
	border-radius: 0.5rem;
	border: 1px solid hsl(var(--border));
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground));
	font-size: 0.875rem;
}

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,
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 {
	font-family: Helvetica, 'Geist', system-ui, -apple-system, sans-serif;
	font-size: 0.875rem;
	color: hsl(var(--foreground));
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: 0.375rem !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: 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 {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
}

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

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	font-family: Helvetica, 'Geist', system-ui, -apple-system, sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 9999px !important;
	height: 3rem;
	padding: 0 1.75rem;
	transition: background-color 0.2s ease;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--primary) / 0.9) !important;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 0.5rem;
	padding: 1.75rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar h2,
body.woocommerce-checkout .wc-block-checkout__main h2,
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: 'Gambarino', Georgia, serif;
	font-weight: 400;
	letter-spacing: 0;
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-order-summary {
	font-size: 0.875rem;
}

body.woocommerce-checkout .wc-block-cart-item__image img {
	border-radius: 0.375rem;
}

body.woocommerce-checkout a,
body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	font-family: Helvetica, 'Geist', system-ui, -apple-system, sans-serif;
}

/* ---------- Cart / account / thank you alignment ---------- */

body.woocommerce-cart .theme-page-main,
body.woocommerce-account .theme-page-main,
body.theme-thankyou-page .theme-page-main {
	padding-top: var(--theme-header-height);
	padding-bottom: 4rem;
}

body.woocommerce-cart .page-title,
body.woocommerce-account .page-title,
body.theme-thankyou-page .page-title {
	font-family: 'Gambarino', Georgia, serif;
	font-weight: 400;
	letter-spacing: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.1;
	margin-bottom: 2.5rem;
	color: hsl(var(--foreground));
}

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

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

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

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

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 1.5rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	background-color: hsl(var(--linen));
}

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: hsl(var(--muted-foreground));
}

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

body.theme-thankyou-page h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'Gambarino', Georgia, serif;
	font-weight: 400;
	padding: 0 0 1rem;
	font-size: 1.75rem;
	color: hsl(var(--foreground));
}

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

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.85rem 0;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
	vertical-align: top;
	overflow-wrap: break-word;
}

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: 2.5rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	font-style: normal;
	font-size: 0.9375rem;
	line-height: 1.7;
}

/* ---------- Forms without a source equivalent ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

[data-inquiry-form] input[type="text"],
[data-inquiry-form] input[type="email"],
[data-inquiry-form] input[type="tel"],
[data-inquiry-form] select,
[data-inquiry-form] textarea {
	font-family: Helvetica, 'Geist', system-ui, -apple-system, sans-serif;
}

[data-inquiry-form] [data-form-submit][disabled] {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------- Footer nav menu (WordPress menu output) ---------- */

.theme-footer-links,
.theme-footer-menu {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	list-style: none;
	margin: 0;
	padding: 0;
}

.theme-footer-links > a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: auto;
	height: 2.5rem;
	padding-left: 0;
	padding-right: 0;
	white-space: nowrap;
}

.theme-footer-menu li {
	margin: 0;
}

.theme-footer-menu a {
	display: flex;
	align-items: center;
	height: 2.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--ivory));
	transition: color 0.2s ease;
}

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

/* Header WP menu output matches the fallback nav styling */
.site-header .menu {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header .menu > li > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.75rem;
	padding: 0 1.5rem;
	border: 1px solid transparent;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	color: hsl(var(--ivory));
	transition: color 0.3s ease, background-color 0.3s ease;
}

.site-header .menu > li > a:hover {
	background-color: hsl(var(--ivory) / 0.1);
}

.site-header [data-mobile-panel] .menu {
	display: flex;
	flex-direction: column;
}

.site-header [data-mobile-panel] .menu > li {
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
}

.site-header [data-mobile-panel] .menu > li > a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	height: auto;
	padding: 1.25rem 0;
	border: 0;
	border-radius: 0;
	font-family: 'Gambarino', Georgia, serif;
	font-size: 2.25rem;
	line-height: 1;
	color: hsl(var(--foreground));
}

/* ---------- WordPress core alignment classes ---------- */

.alignwide {
	max-width: 1400px;
}

.alignfull {
	width: 100%;
	max-width: none;
}
