/* Raven's Whisk Cottage Bakery — functional styles and WordPress/WooCommerce markup. */

figure {
	margin: revert-layer;
}

/* Logged-in admin bar offset (desktop only). */
@media (min-width: 783px) {
	body.admin-bar .site-nav {
		top: 32px;
	}

	body.admin-bar:not(.home) .site-main {
		padding-top: 116px;
	}

	body.admin-bar #about,
	body.admin-bar #menu,
	body.admin-bar #gallery,
	body.admin-bar #custom,
	body.admin-bar #team,
	body.admin-bar #contact {
		scroll-margin-top: 128px;
	}
}

/* -------------------------------------------------------------------------
   Functional basics
   ---------------------------------------------------------------------- */
[hidden] {
	display: none !important;
}

.site-logo-img {
	height: var(--logo-height, 52px) !important;
	width: auto !important;
	display: block;
	border-radius: 999px;
	object-fit: cover;
}

.site-logo-text {
	line-height: var(--logo-height, 52px);
	display: block;
}

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

/* Inner pages sit below the fixed header. The homepage hero starts at top 0. */
body:not(.home) .site-main {
	padding-top: 84px;
}

@media (max-width: 767px) {
	body:not(.home) .site-main {
		padding-top: 76px;
	}
}

/* Product and checkout: avoid section-band top padding on top of header offset. */
body.single-product .single-product-page.section-band,
body.woocommerce-checkout .site-main > .section-band {
	padding-top: 0;
}

@media (max-width: 767px) {
	body.single-product .single-product-page.section-band,
	body.woocommerce-checkout .site-main > .section-band {
		padding-top: 0;
	}
}

/* Page reveals — fallbacks so content is never stuck hidden. */
body.is-customizer .page-reveal,
body.is-customizer .reveal-pending,
body.is-customizer .theme-card-enter {
	opacity: 1 !important;
	translate: none !important;
	animation: none !important;
}

html.no-js .reveal-pending {
	opacity: 1;
	translate: none;
}

@keyframes theme-card-in {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.theme-card-enter {
	animation: theme-card-in 400ms cubic-bezier(.22, 1, .36, 1) both;
}

/* -------------------------------------------------------------------------
   Product cards
   ---------------------------------------------------------------------- */
.theme-product-card-wrap {
	height: 100%;
}

.theme-product-card-wrap .woocommerce-Price-amount {
	color: inherit;
	font: inherit;
}

/* -------------------------------------------------------------------------
   Shop "view all" toggle
   ---------------------------------------------------------------------- */
[data-shop-toggle] svg {
	transition: transform 350ms var(--motion-ease);
}

[data-shop-toggle].is-open svg {
	transform: rotate(180deg);
}

/* -------------------------------------------------------------------------
   Cart drawer and overlay
   ---------------------------------------------------------------------- */
#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgb(0 0 0 / 0.6);
	opacity: 0;
	visibility: hidden;
	cursor: default;
	transition: opacity 400ms var(--motion-ease), visibility 400ms;
}

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

#theme-cart-drawer {
	position: fixed;
	right: 0;
	top: 0;
	z-index: 61;
	display: flex;
	height: 100%;
	width: 100%;
	max-width: 28rem;
	flex-direction: column;
	border-left: 1px solid var(--color-border);
	background: var(--color-card);
	transform: translateX(100%);
	transition: transform 400ms var(--motion-ease);
}

body.admin-bar #theme-cart-drawer {
	top: 32px;
	height: calc(100% - 32px);
}

@media (max-width: 782px) {
	body.admin-bar #theme-cart-drawer {
		top: 46px;
		height: calc(100% - 46px);
	}
}

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

.product-card-add-wrap {
	position: relative;
	z-index: 2;
}

/* -------------------------------------------------------------------------
   Quantity controls and product page layout
   ---------------------------------------------------------------------- */
.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	border: 0;
	background: transparent;
	outline: none;
}

.theme-attr-label {
	margin-bottom: 0.5rem;
}

.theme-attr-pill {
	min-height: 2.5rem;
}

.theme-cart-item-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.theme-404 {
	min-height: 60vh;
}

.related-products-section {
	margin-top: 5rem;
}

.theme-form-status {
	display: contents;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 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-product-thumbnail {
	border: 1px solid var(--color-border);
	border-radius: calc(var(--radius) - 2px);
	overflow: hidden;
	line-height: 0;
	cursor: pointer;
}

.single-product .theme-product-thumbnail.is-active {
	border-color: var(--color-accent);
}

.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 .theme-quantity-wrapper {
	flex: 0 0 auto;
}

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

/* Disabled add-to-cart buttons (variable products and out of stock). */
.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;
}

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

/* Button lock while an AJAX add is in flight. */
.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;
}

/* -------------------------------------------------------------------------
   Variable product pills
   ---------------------------------------------------------------------- */
.theme-attr-select-hidden {
	display: none !important;
}

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

.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 {
	padding-bottom: 0.25rem;
}

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

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

/* -------------------------------------------------------------------------
   WooCommerce notices (only hidden where the drawer already gives feedback)
   ---------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-card);
	color: var(--color-foreground);
	list-style: none;
}

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

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

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

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

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

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: inline-flex;
	min-height: 44px;
	min-width: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-lavender);
	font-weight: 700;
}

.woocommerce-pagination ul li span.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-primary-foreground);
}

/* -------------------------------------------------------------------------
   Checkout block
   ---------------------------------------------------------------------- */
body.woocommerce-checkout .site-main,
body.theme-cart-page .site-main,
body.theme-account-page .site-main {
	padding-bottom: 4rem;
}

body.woocommerce-checkout .page-title,
body.theme-cart-page .page-title,
body.theme-account-page .page-title {
	max-width: none;
}

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

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

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-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(--color-card);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 2rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
	color: var(--color-foreground);
}

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

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
	color: var(--color-foreground);
}

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 .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,
body.woocommerce-checkout .wc-block-components-address-form input,
body.woocommerce-checkout .wc-block-components-address-form 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: 1px solid var(--color-input) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	background-color: var(--color-muted) !important;
	color: var(--color-foreground) !important;
	font-family: var(--font-body) !important;
	font-size: 16px !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-block-components-select select:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus {
	border-color: var(--color-ring) !important;
	box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-ring) 15%, transparent) !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-order-summary-item__description,
body.woocommerce-checkout .wc-block-components-totals-item__label {
	color: var(--color-muted-foreground) !important;
	font-family: var(--font-body) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	background-color: var(--color-primary) !important;
	border: 1px solid var(--color-primary) !important;
	border-radius: 999px !important;
	color: var(--color-primary-foreground) !important;
	font-family: var(--font-body) !important;
	font-weight: 700 !important;
	min-height: 48px;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wc-block-components-button:not(.is-link):hover {
	background-color: color-mix(in oklab, var(--color-primary) 90%, transparent) !important;
	color: var(--color-primary-foreground) !important;
}

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

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

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

/* -------------------------------------------------------------------------
   Order received
   ---------------------------------------------------------------------- */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	color: var(--color-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: var(--font-display);
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.2;
	padding: 0 0 1rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 1.5rem;
	list-style: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-card);
}

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

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

body.theme-thankyou-page .woocommerce-thankyou-order-received {
	margin: 0 0 1.5rem;
	color: var(--color-accent);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
}

body.theme-thankyou-page .woocommerce-thankyou-order-failed {
	margin: 0 0 1.5rem;
	color: var(--color-destructive);
}

body.theme-thankyou-page .woocommerce-order-details,
body.theme-thankyou-page .woocommerce-customer-details {
	margin-top: 2rem;
}

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.75rem 0;
	border-bottom: 1px solid var(--color-border);
	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 address {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-card);
	padding: 1.25rem;
	min-width: 0;
	overflow-wrap: break-word;
	font-style: normal;
}

@media (min-width: 768px) {
	body.theme-thankyou-page .woocommerce-customer-details {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

/* -------------------------------------------------------------------------
   Entry content and WordPress blocks
   ---------------------------------------------------------------------- */
.entry-content > * + * {
	margin-top: 1.25rem;
}

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

.entry-content .wp-block-buttons .wp-block-button__link {
	border-radius: 999px;
	background: var(--color-primary);
	color: var(--color-primary-foreground);
	font-weight: 700;
}

/* -------------------------------------------------------------------------
   Customizer preview helper
   ---------------------------------------------------------------------- */
.theme-media-preview-video {
	max-width: 100%;
	height: auto;
	display: block;
}
