/* ==========================================================================
   Rivora: woocommerce-global.css
   Small layer that every page needs: header bag button, mini-cart drawer,
   loop "Add to bag" buttons (home chapters use woocommerce/product-button).
   Page-specific Woo styles (incl. notices) live in woocommerce.css.
   Colours and fonts read theme.json presets with safe fallbacks, so the
   Styles panel in the Site Editor keeps working.
   ========================================================================== */

:root {
	--rw-ink: var(--wp--preset--color--plum-ink, #1c0618);
	--rw-plum: var(--wp--preset--color--plum, #641164);
	--rw-cream: var(--wp--preset--color--cream, #f3e9dc);
	--rw-gold: var(--wp--preset--color--gold, #d9b25f);
	--rw-gold-hover: color-mix(in srgb, var(--rw-gold) 82%, #fff);
	--rw-muted: color-mix(in srgb, var(--rw-cream) 70%, var(--rw-ink));
	--rw-line: color-mix(in srgb, var(--rw-cream) 16%, transparent);
	--rw-line-strong: color-mix(in srgb, var(--rw-cream) 30%, transparent);
	--rw-line-gold: color-mix(in srgb, var(--rw-gold) 55%, transparent);
	--rw-raise: color-mix(in srgb, var(--rw-cream) 4%, var(--rw-ink));
	--rw-display: var(--wp--preset--font-family--display, "Cormorant Garamond", "Cormorant", Georgia, serif);
	--rw-sans: var(--wp--preset--font-family--sans, "Jost", system-ui, -apple-system, "Segoe UI", sans-serif);
	--rw-radius: 2px;
	--rw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Primary button: flat gold rectangle, 2px radius, sentence case.
   -------------------------------------------------------------------------- */
.wp-block-woocommerce-product-button .wp-block-button__link,
.wc-block-components-product-button .wc-block-components-product-button__button,
.wc-block-mini-cart__footer-checkout,
.wc-block-mini-cart__shopping-button,
.wc-block-mini-cart__empty-cart-wrapper .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0.8rem 1.6rem;
	border: 1px solid var(--rw-gold) !important;
	border-radius: var(--rw-radius) !important;
	background: var(--rw-gold) !important;
	color: var(--rw-ink) !important;
	font-family: var(--rw-sans) !important;
	font-size: 0.9375rem !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	line-height: 1.2;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background-color 0.2s var(--rw-ease), border-color 0.2s var(--rw-ease);
}
.wp-block-woocommerce-product-button .wp-block-button__link:hover,
.wc-block-components-product-button .wc-block-components-product-button__button:hover,
.wc-block-mini-cart__footer-checkout:hover,
.wc-block-mini-cart__shopping-button:hover,
.wc-block-mini-cart__empty-cart-wrapper .wp-block-button__link:hover {
	background: var(--rw-gold-hover) !important;
	border-color: var(--rw-gold-hover) !important;
	color: var(--rw-ink) !important;
}
.wc-block-components-product-button .wc-block-components-product-button__button .wc-block-components-button__text,
.wc-block-mini-cart__footer-checkout .wc-block-components-button__text {
	color: inherit !important;
}
.wc-block-components-product-button .wc-block-components-product-button__button.loading {
	opacity: 0.75;
}
.wc-block-components-product-button .wc-block-components-product-button__button[aria-disabled="true"] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* "View bag" link that Woo adds after an add: a quiet text link. */
.wc-block-components-product-button a.added_to_cart,
.wp-block-woocommerce-product-button a.added_to_cart {
	display: inline-block;
	margin-top: 0.75rem;
	color: var(--rw-cream);
	font-family: var(--rw-sans);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: var(--rw-line-gold);
	text-underline-offset: 0.3em;
}

/* --------------------------------------------------------------------------
   Header bag button
   -------------------------------------------------------------------------- */
.wc-block-mini-cart__button {
	padding: 0.5rem !important;
	border-radius: var(--rw-radius);
	color: inherit;
	background: transparent;
}
.wc-block-mini-cart__button:hover:not([disabled]) {
	opacity: 1;
	color: var(--rw-gold);
}
.wc-block-mini-cart__quantity-badge {
	align-items: center;
}
.wc-block-mini-cart__badge {
	min-width: 1.15rem !important;
	height: 1.15rem !important;
	padding: 0 0.25rem !important;
	border: 0 !important;
	border-radius: var(--rw-radius) !important;
	background: var(--rw-gold) !important;
	color: var(--rw-ink) !important;
	font-family: var(--rw-sans);
	font-size: 0.6875rem !important;
	font-weight: 500;
	box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Mini-cart drawer
   -------------------------------------------------------------------------- */
.wc-block-components-drawer__screen-overlay {
	background-color: color-mix(in srgb, var(--rw-ink) 70%, transparent) !important;
}
.wc-block-components-drawer {
	background: var(--rw-ink) !important;
	color: var(--rw-cream) !important;
	border-left: 1px solid var(--rw-line-gold);
	box-shadow: none !important;
	font-family: var(--rw-sans);
}
.wc-block-mini-cart__drawer .wc-block-components-drawer__content,
.wc-block-mini-cart__drawer .wp-block-woocommerce-mini-cart-contents {
	background: transparent !important;
	color: inherit !important;
}
.wc-block-mini-cart__title,
.wp-block-woocommerce-mini-cart-title-block {
	margin: 1.5rem 1.5rem 0 !important;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--rw-line);
	font-family: var(--rw-display) !important;
	font-size: 2rem !important;
	font-weight: 300 !important;
	letter-spacing: -0.01em;
	line-height: 1.05;
	text-transform: none !important;
	mask-image: none !important;
}
.wc-block-mini-cart__title .wp-block-woocommerce-mini-cart-title-items-counter-block,
.wc-block-mini-cart__title span:last-child {
	color: var(--rw-muted);
	font-family: var(--rw-sans);
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: 0;
}
.wc-block-components-drawer__close,
.wc-block-components-button.wc-block-components-drawer__close {
	top: 1.25rem !important;
	right: 1rem !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: var(--rw-radius) !important;
	background: transparent !important;
	color: var(--rw-cream) !important;
	opacity: 1 !important;
	display: inline-grid !important;
	place-items: center;
}
.wc-block-components-drawer__close:hover {
	color: var(--rw-gold) !important;
}
.wc-block-mini-cart__items {
	padding: 0.5rem 1.5rem 1rem !important;
}
.wc-block-mini-cart__products-table .wc-block-cart-items__row {
	padding: 1.25rem 0 !important;
	border-bottom: 1px solid var(--rw-line);
}
.wc-block-mini-cart__products-table .wc-block-cart-item__image img {
	border-radius: 0;
	background: var(--rw-raise);
}
.wc-block-components-drawer .wc-block-components-product-name {
	color: var(--rw-cream);
	font-family: var(--rw-display);
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.1;
	text-decoration: none;
}
.wc-block-components-drawer .wc-block-components-product-metadata,
.wc-block-components-drawer .wc-block-components-product-details {
	color: var(--rw-muted);
	font-size: 0.8125rem;
}
.wc-block-mini-cart__footer {
	padding: 1.25rem 1.5rem 1.5rem !important;
	border-top: 1px solid var(--rw-line-gold);
	box-shadow: none !important;
}
.wc-block-mini-cart__footer::after {
	display: none !important;
}
.wc-block-mini-cart__footer .wc-block-components-totals-item__label {
	font-family: var(--rw-sans);
	font-weight: 500;
	text-transform: none;
}
.wc-block-mini-cart__footer .wc-block-components-totals-item__value {
	font-family: var(--rw-display);
	font-size: 1.75rem;
	font-weight: 400;
	font-variant-numeric: lining-nums;
}
.wc-block-mini-cart__footer .wc-block-components-totals-item__description {
	color: var(--rw-muted);
}
.wc-block-mini-cart__footer-actions {
	gap: 1.25rem !important;
	align-items: center;
}
/* Secondary: a text link with an animated underline, not a second box. */
.wc-block-mini-cart__footer-cart.wc-block-components-button,
.wc-block-components-button.wc-block-mini-cart__footer-cart {
	flex: 0 0 auto !important;
	min-height: 48px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	color: var(--rw-cream) !important;
	box-shadow: none !important;
	font-family: var(--rw-sans) !important;
	font-size: 0.9375rem !important;
	font-weight: 500 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.wc-block-mini-cart__footer-cart .wc-block-components-button__text {
	background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
	padding-bottom: 2px;
	transition: background-size 0.3s var(--rw-ease);
}
.wc-block-mini-cart__footer-cart:hover .wc-block-components-button__text {
	background-size: 0 1px;
	background-position: right bottom;
}
.wc-block-mini-cart__footer-checkout {
	flex: 1 1 auto !important;
}
.wc-block-mini-cart__empty-cart-wrapper {
	padding: 2rem 1.5rem !important;
	text-align: left !important;
}
.wc-block-mini-cart__empty-cart-wrapper p,
.wc-block-mini-cart__empty-cart-wrapper .wc-block-mini-cart__empty-cart-message {
	font-family: var(--rw-display);
	font-size: 1.75rem;
	font-weight: 300;
	line-height: 1.1;
	text-align: left !important;
}
.wc-block-mini-cart__empty-cart-wrapper .wp-block-buttons {
	justify-content: flex-start !important;
}
.wc-block-components-drawer .wc-block-components-quantity-selector {
	border: 1px solid var(--rw-line-strong) !important;
	border-radius: var(--rw-radius) !important;
	background: transparent !important;
}
.wc-block-components-drawer .wc-block-components-quantity-selector::after {
	display: none !important;
}
.wc-block-components-drawer .wc-block-components-quantity-selector input,
.wc-block-components-drawer .wc-block-components-quantity-selector__button {
	color: var(--rw-cream) !important;
	background: transparent !important;
}
.wc-block-components-drawer .wc-block-cart-item__remove-link {
	color: var(--rw-muted) !important;
	font-size: 0.8125rem !important;
	text-transform: none !important;
}

/* --------------------------------------------------------------------------
   v3 drawer craft: jali canopy, grain, a star rule under the title and the
   bottles in small mehrab arches. Ornaments are inline SVG data URIs.
   -------------------------------------------------------------------------- */
:root {
	--rw-d-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' preserveAspectRatio='none'%3E%3Cpath d='M0 500V200C0 112 66 56 158 24C181 16 194 9 200 0C206 9 219 16 242 24C334 56 400 112 400 200V500Z'/%3E%3C/svg%3E");
	--rw-d-jali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d9b25f' stroke-width='.7'%3E%3Cpath d='M28 7L49 28 28 49 7 28Z'/%3E%3Cpath d='M13 13H43V43H13Z'/%3E%3Ccircle cx='28' cy='28' r='6'/%3E%3Cpath d='M28 0V7M28 49V56M0 28H7M49 28H56M0 0L13 13M56 0L43 13M0 56L13 43M56 56L43 43'/%3E%3C/g%3E%3C/svg%3E");
	--rw-d-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20' viewBox='0 0 120 20'%3E%3Cg fill='none' stroke='%23d9b25f' stroke-width='.8'%3E%3Cpath d='M30 10L36 4 42 10 36 16Z M78 10L84 4 90 10 84 16Z'/%3E%3Cpath d='M0 10H30M42 10H50M70 10H78M90 10H120'/%3E%3C/g%3E%3Cpath fill='%23d9b25f' d='M60 1Q61.2 8.8 69 10Q61.2 11.2 60 19Q58.8 11.2 51 10Q58.8 8.8 60 1Z'/%3E%3C/svg%3E");
}
.wc-block-components-drawer {
	isolation: isolate;
	background:
		radial-gradient(90% 40% at 100% 0%, color-mix(in srgb, var(--rw-plum) 40%, transparent), transparent 75%),
		linear-gradient(180deg, #1c0618, #120410) !important;
}
.wc-block-components-drawer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 260px;
	z-index: -1;
	pointer-events: none;
	background: var(--rw-d-jali) right top / 56px 56px repeat;
	-webkit-mask: radial-gradient(90% 100% at 100% 0%, rgb(0 0 0 / 0.28), transparent 75%);
	mask: radial-gradient(90% 100% at 100% 0%, rgb(0 0 0 / 0.28), transparent 75%);
}
.wc-block-mini-cart__title,
.wp-block-woocommerce-mini-cart-title-block {
	padding-bottom: 1.75rem !important;
	border-bottom: 0 !important;
	background:
		var(--rw-d-rule) 0 100% / 120px 20px no-repeat,
		linear-gradient(90deg, var(--rw-line-gold), transparent) 120px calc(100% - 9.5px) / calc(100% - 120px) 1px no-repeat;
	font-size: 2.25rem !important;
}
.wc-block-mini-cart__products-table .wc-block-cart-item__image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: color-mix(in srgb, var(--rw-plum) 30%, var(--rw-ink)) !important;
	-webkit-mask: var(--rw-d-arch) center / 100% 100% no-repeat;
	mask: var(--rw-d-arch) center / 100% 100% no-repeat;
}
.wc-block-mini-cart__products-table .wc-block-cart-items__row {
	border-bottom-color: color-mix(in srgb, var(--rw-gold) 18%, transparent) !important;
}
.wc-block-mini-cart__footer {
	border-top: 0 !important;
	background:
		linear-gradient(var(--rw-line-gold), var(--rw-line-gold)) 0 0 / 100% 1px no-repeat,
		linear-gradient(color-mix(in srgb, var(--rw-gold) 20%, transparent), color-mix(in srgb, var(--rw-gold) 20%, transparent)) 0 5px / 100% 1px no-repeat,
		color-mix(in srgb, var(--rw-plum) 14%, #120410) !important;
}
.wc-block-mini-cart__empty-cart-wrapper {
	position: relative;
	padding-top: 9rem !important;
}
.wc-block-mini-cart__empty-cart-wrapper::before {
	content: "";
	position: absolute;
	left: 1.5rem;
	top: 2rem;
	width: 4.5rem;
	aspect-ratio: 4 / 5;
	background:
		radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--rw-plum) 70%, transparent), transparent 75%),
		color-mix(in srgb, var(--rw-plum) 25%, #120410);
	-webkit-mask: var(--rw-d-arch) center / 100% 100% no-repeat;
	mask: var(--rw-d-arch) center / 100% 100% no-repeat;
}

@media (prefers-reduced-motion: reduce) {
	.wc-block-components-drawer,
	.wc-block-components-drawer__screen-overlay,
	.wc-block-mini-cart__footer-cart .wc-block-components-button__text {
		transition: none !important;
		animation: none !important;
	}
}
