/* ==========================================================================
   Keepsake Korner — theme stylesheet

   app.css ships the complete design system: tokens, the Tailwind utility
   layer, the reveal/marquee animations and the cart drawer transitions.
   This file only adds what the design has no markup for: WordPress core
   output, WooCommerce markup, and the functional state rules the theme's
   own JavaScript drives.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Functional rules
   -------------------------------------------------------------------------- */

[hidden] {
	display: none !important;
}

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

.skip-link.screen-reader-text:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	overflow: visible;
	clip: auto;
	border-radius: 9999px;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

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

.site-logo-text {
	line-height: var(--logo-height, 72px);
	display: block;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.5rem;
	letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   2. Scroll reveal fallbacks — content must never stay hidden
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   3. Site shell spacing
   -------------------------------------------------------------------------- */

.site-main {
	padding-top: 96px;
}

body.home .site-main,
body.single-product .site-main {
	padding-top: 0;
}

/* --------------------------------------------------------------------------
   4. Cart drawer states
   -------------------------------------------------------------------------- */

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 45;
	background: hsl(var(--foreground) / 0.35);
	backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 450ms cubic-bezier(0.32, 0.72, 0, 1), visibility 450ms;
}

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

#theme-cart-drawer {
	z-index: 50;
	transform: translate3d(calc(100% + 2px), 0, 0);
	transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

#theme-cart-drawer .cart-drawer-close:hover svg {
	transform: rotate(90deg);
	transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   5. 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 {
	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,
.ajax_add_to_cart.added::after {
	display: none !important;
}

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

/* --------------------------------------------------------------------------
   6. Product card interaction layers
   -------------------------------------------------------------------------- */

.theme-product-card-wrap {
	position: relative;
}

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

.theme-card-add,
.theme-quick-view {
	pointer-events: auto;
}

.theme-product-card-wrap:hover .theme-product-card {
	height: 100%;
}

/* --------------------------------------------------------------------------
   7. Single product: layout, variations, gallery
   -------------------------------------------------------------------------- */

.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 .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 {
	overflow-wrap: break-word;
	word-break: break-word;
}

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

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

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

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

.theme-quantity-wrapper {
	color: hsl(var(--foreground));
}

.theme-qty-input,
.theme-quantity-wrapper input.qty {
	display: inline-block !important;
	width: 3.25rem;
	min-width: 2.75rem;
	height: auto;
	margin: 0;
	padding: 0.625rem 0.25rem;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: hsl(var(--foreground));
	-webkit-text-fill-color: hsl(var(--foreground));
	caret-color: hsl(var(--foreground));
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	line-height: 1.25rem;
	opacity: 1;
	-moz-appearance: textfield;
}

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

.single-product [data-variation-pills] {
	position: relative;
}

.single-product table.variations {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	border: 0 !important;
}

.single-product .single_variation_wrap {
	display: block !important;
	margin-top: 0;
	height: auto !important;
	overflow: visible !important;
}

.single-product .woocommerce-variation-price {
	margin-bottom: 1.25rem;
	font-size: 20px;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.9);
}

/* --------------------------------------------------------------------------
   8. Notices
   -------------------------------------------------------------------------- */

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

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

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--ivory));
	color: hsl(var(--foreground));
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-message {
	border-left: 3px solid hsl(var(--primary));
}

.woocommerce-info {
	border-left: 3px solid hsl(var(--secondary));
}

.woocommerce-error {
	border-left: 3px solid hsl(var(--destructive));
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

.woocommerce-message .button,
.woocommerce-info .button {
	margin-left: 0.75rem;
	font-size: 13px;
	color: hsl(var(--primary));
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Archive, breadcrumbs and pagination
   -------------------------------------------------------------------------- */

.woocommerce-breadcrumb {
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
	margin-bottom: 1.5rem;
}

.woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: hsl(var(--primary));
}

.woocommerce-result-count,
.woocommerce-ordering {
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--foreground) / 0.7);
}

.woocommerce-ordering select {
	height: 44px;
	padding: 0 1rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--foreground) / 0.15);
	background: hsl(var(--ivory));
	color: hsl(var(--foreground));
	font-size: 14px;
}

.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--foreground) / 0.25);
	font-size: 14px;
	color: hsl(var(--foreground));
	text-decoration: none;
}

.woocommerce-pagination a:hover,
.woocommerce-pagination .current {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------------------------------
   10. Checkout block (the one page allowed to differ from the design)
   -------------------------------------------------------------------------- */

body.woocommerce-checkout .site-main,
body.woocommerce-cart .site-main,
body.woocommerce-account .site-main,
body.theme-thankyou-page .site-main {
	padding-top: 112px;
	padding-bottom: 4rem;
}

body.woocommerce-checkout .site-main {
	padding-top: 8.75rem;
}

body.woocommerce-checkout .theme-page > .container-wide {
	padding-top: 3.5rem;
}

body.woocommerce-checkout .page-title {
	margin-top: 1.25rem;
}

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

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

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

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
		grid-template-columns: 1fr 1fr !important;
	}
}

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,
body.woocommerce-checkout .wc-block-components-notices {
	grid-column: 1 / -1;
}

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

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 {
	width: 100% !important;
	max-width: none !important;
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: 0.375rem !important;
	color: hsl(var(--foreground)) !important;
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif !important;
	font-size: 14px !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: none !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,
body.woocommerce-checkout .wc-block-components-radio-control__label,
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif !important;
	color: hsl(var(--foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title {
	font-family: 'Newsreader', Georgia, serif !important;
	font-size: 24px !important;
	font-weight: 400 !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 9999px !important;
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	height: 48px !important;
}

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

body.woocommerce-checkout .wc-block-cart-items__row,
body.woocommerce-checkout .wc-block-components-order-summary-item {
	border-color: hsl(var(--foreground) / 0.1) !important;
}

body.woocommerce-checkout .wc-block-components-totals-item,
body.woocommerce-checkout .wc-block-components-product-name {
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif !important;
	color: hsl(var(--foreground)) !important;
}

/* --------------------------------------------------------------------------
   11. Cart, account and order-received pages
   -------------------------------------------------------------------------- */

body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif;
}

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

body.theme-thankyou-page .woocommerce-order {
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 24px;
	font-weight: 400;
	padding: 0 0 1rem 0;
}

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

body.theme-thankyou-page .woocommerce-order-overview li {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: hsl(var(--foreground) / 0.6);
	border: 0;
	padding: 0;
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-size: 15px;
	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;
	font-size: 14px;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	text-align: left;
	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: 2rem;
}

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

/* --------------------------------------------------------------------------
   12. WordPress core output the design has no equivalent for
   -------------------------------------------------------------------------- */

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

.screen-reader-text:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	overflow: visible;
	clip: auto;
	border-radius: 9999px;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-size: 14px;
	z-index: 100;
}

.alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin: 0 auto 1rem;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	margin-top: 0.5rem;
	font-size: 13px;
	color: hsl(var(--muted-foreground));
}

.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5rem;
	line-height: 1.8;
	color: hsl(var(--foreground) / 0.8);
}

.entry-content blockquote {
	border-left: 2px solid hsl(var(--secondary));
	padding-left: 1.25rem;
	font-family: 'Newsreader', Georgia, serif;
	font-style: italic;
	font-size: 20px;
	line-height: 1.5;
	color: hsl(var(--foreground) / 0.85);
}

/* --------------------------------------------------------------------------
   13. Pagination of blog lists and comments (fallbacks)
   -------------------------------------------------------------------------- */

.pagination,
.page-links {
	margin-top: 2rem;
	font-size: 14px;
	color: hsl(var(--foreground) / 0.7);
}

.pagination a,
.page-links a {
	color: hsl(var(--primary));
}

@media (prefers-reduced-motion: reduce) {
	#theme-cart-drawer,
	#theme-cart-overlay {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   14. WordPress menu output inside the header nav
   -------------------------------------------------------------------------- */

.site-header nav > ul {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header nav > ul > li {
	position: relative;
	list-style: none;
}

.site-header nav > ul > li > a {
	position: relative;
	display: inline-block;
	font-family: 'Helvetica Neue', Helvetica, 'Geist', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
	transition: color 300ms ease;
	color: hsl(var(--foreground) / 0.75);
}

.site-header nav > ul > li > a:hover,
.site-header nav > ul > li.current-menu-item > a {
	color: hsl(var(--primary));
}

.site-header .site-header-bar.is-transparent nav > ul > li > a,
.site-header nav > ul > li > a.is-header-transparent {
	color: hsl(var(--background) / 0.85);
}

.site-header .site-header-bar.is-transparent nav > ul > li > a:hover {
	color: hsl(var(--background));
}

/* Badge hides while the cart is empty, matching the design. */
.theme-cart-count:empty {
	display: none;
}
