/* ShapedCart storefront styles. Colors/sizes come from CSS custom properties
   set per-request in Frontend\Assets — see class-assets.php. */

/* Stale page-cache safety net — remove in the cleanup release. HTML cached
   before the RenoCart → ShapedCart rename still carries the old markup but
   loads this (new) stylesheet. Hide the old drawer and bubble rather than let
   them render unstyled, and keep the old menu cart as a plain link to the cart
   page with a sanely sized icon. */
#reno-cart,
#reno-cart-bubble{ display: none !important; }
.reno-cart-menu-trigger svg{ width: 20px; height: 20px; }

.shaped-cart,
.shaped-cart *{ box-sizing: border-box; }

.shaped-cart{
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .28s;
}
.shaped-cart.is-open{
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

.shaped-cart__overlay{
	position: absolute;
	inset: 0;
	background: rgba(20,22,24,.45);
	opacity: 0;
	transition: opacity .2s ease;
}
.shaped-cart.is-open .shaped-cart__overlay{ opacity: 1; }

.shaped-cart__panel{
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--shaped-cart-width, 440px);
	max-width: 100vw;
	background: var(--shaped-cart-bg, #fff);
	color: var(--shaped-cart-text, #141618);
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 32px rgba(0,0,0,.16);
	transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s ease;
}

.shaped-cart--right .shaped-cart__panel{ right: 0; transform: translateX(100%); }
.shaped-cart--right.is-open .shaped-cart__panel{ transform: translateX(0); }
.shaped-cart--left .shaped-cart__panel{ left: 0; transform: translateX(-100%); }
.shaped-cart--left.is-open .shaped-cart__panel{ transform: translateX(0); }

.shaped-cart--modal .shaped-cart__panel{
	left: 50%;
	top: 50%;
	right: auto;
	bottom: auto;
	max-height: 85vh;
	border-radius: var(--shaped-cart-radius, 8px);
	transform: translate(-50%,-48%) scale(.98);
	opacity: 0;
}
.shaped-cart--modal.is-open .shaped-cart__panel{
	transform: translate(-50%,-50%) scale(1);
	opacity: 1;
}

@media (max-width: 1024px){
	.shaped-cart__panel{ width: var(--shaped-cart-width-tablet, 400px); }
}
@media (max-width: 600px){
	.shaped-cart__panel{ width: var(--shaped-cart-width-mobile, 360px); max-width: 100vw; }
}

.shaped-cart__header{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--shaped-cart-border, #eef0f2);
	flex: 0 0 auto;
}
.shaped-cart__header .shaped-cart__heading{
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	/* Explicit: themes color h2 directly, which beats inheriting the panel's color. */
	color: var(--shaped-cart-text, #141618);
	font-size: 17px;
	font-weight: 700;
}
.shaped-cart__heading-icon{ width: 20px; height: 20px; }
.shaped-cart__count{ font-weight: 700; color: inherit; }
.shaped-cart__close{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border: none;
	background: transparent;
	color: var(--shaped-cart-text, #141618);
	cursor: pointer;
	border-radius: 50%;
}
.shaped-cart__close:hover{ background: var(--shaped-cart-border, #eef0f2); }
.shaped-cart__close:focus-visible{
	outline: 2px solid var(--shaped-cart-accent, #1f7a5a);
	outline-offset: 2px;
}

.shaped-cart__body{
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 20px;
}
.shaped-cart__body[hidden]{ display: none; }
.shaped-cart__body--empty{ display: flex; align-items: center; justify-content: center; }

.shaped-cart__items{ list-style: none; margin: 0; padding: 0; }
/* Filled by other plugins through the shaped_cart_after_items action.
   Collapsed, margin and all, unless a child element is showing: stray
   whitespace or a consumer's own `hidden` element must not leave a gap. */
.shaped-cart__after-items{ margin-top: 16px; }
.shaped-cart__after-items:not(:has(> :not([hidden]))){ display: none; }
/* Browsers without :has() drop the rule above. Nothing hooked prints nothing
   at all, so this still collapses the area on stores with no consumer. */
.shaped-cart__after-items:empty{ display: none; }
.shaped-cart__item{
	display: flex;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid var(--shaped-cart-border, #eef0f2);
}
.shaped-cart__item:last-child{ border-bottom: none; }
.shaped-cart__item-media{ position: relative; flex: 0 0 auto; }
.shaped-cart__item-media a{ display: block; }
.shaped-cart__item-media img{
	width: 64px; height: 64px; object-fit: cover; border-radius: var(--shaped-cart-radius, 8px);
}
button.shaped-cart__item-remove{
	position: absolute;
	top: -6px;
	left: -6px;
	width: 18px;
	height: 18px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #f0f0f1;
	color: var(--shaped-cart-text-muted, #8c8f94);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
button.shaped-cart__item-remove:hover{ color: var(--shaped-cart-regular-color, #d94f2b); }
.shaped-cart__item-body{ flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.shaped-cart__item-title{
	color: var(--shaped-cart-text, #141618);
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
}
.shaped-cart__item-meta{ font-size: 12.5px; color: var(--shaped-cart-text-muted, #8c8f94); }
.shaped-cart__item-data{ display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.45; }
.shaped-cart__item-data-row{
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	overflow-wrap: anywhere;
	color: var(--shaped-cart-text-muted, #8c8f94);
}
.shaped-cart__item-data-key{ color: var(--shaped-cart-text, #141618); }
.shaped-cart__item-data-row a{ color: inherit; text-decoration: underline; }
.shaped-cart__item-price{
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	padding-top: 2px;
	text-align: right;
}
.shaped-cart__item-price-row{ display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.shaped-cart__item-price-current{ font-weight: 700; font-size: 15px; color: var(--shaped-cart-text, #141618); }
.shaped-cart__item-price-regular{
	text-decoration: line-through;
	color: var(--shaped-cart-regular-color, #d94f2b);
	font-size: 13px;
}
.shaped-cart__item-savings{ font-size: 12px; font-weight: 600; color: var(--shaped-cart-save-color, #2f8f4e); }
.shaped-cart__item-stock{
	font-size: 12px;
	color: #8c3a1f;
	background: #fdf0e8;
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	width: fit-content;
}
.shaped-cart__item-controls{ display: flex; align-items: center; margin-top: 2px; }
.shaped-cart__qty{
	display: flex;
	align-items: center;
	height: 24px;
	border: 1px solid var(--shaped-cart-border, #eef0f2);
	border-radius: var(--shaped-cart-radius, 8px);
	overflow: hidden;
}
.shaped-cart__qty .shaped-cart__qty-btn{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 24px;
	min-width: 25px;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--shaped-cart-text, #141618);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}
.shaped-cart__qty .shaped-cart__qty-btn:disabled{ cursor: not-allowed; opacity: .35; }
.shaped-cart__qty .shaped-cart__qty-input{
	width: 30px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: none;
	border-left: 1px solid var(--shaped-cart-border, #eef0f2);
	border-right: 1px solid var(--shaped-cart-border, #eef0f2);
	border-radius: 0;
	background: transparent;
	color: var(--shaped-cart-text, #141618);
	text-align: center;
	font-size: 13px;
	-moz-appearance: textfield;
	appearance: textfield;
}
.shaped-cart__qty .shaped-cart__qty-input::-webkit-inner-spin-button,
.shaped-cart__qty .shaped-cart__qty-input::-webkit-outer-spin-button{
	-webkit-appearance: none;
	margin: 0;
}

.shaped-cart__empty{ text-align: center; padding: 48px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.shaped-cart__empty-icon{ display: flex; align-items: center; justify-content: center; color: var(--shaped-cart-text-muted, #8c8f94); }
.shaped-cart__empty-icon-svg{ width: 32px; height: 32px; }
.shaped-cart .shaped-cart__empty h3{ margin: 0; color: var(--shaped-cart-text, #141618); font-size: 18px; font-weight: 700; }
.shaped-cart__empty p{ margin: 0; color: var(--shaped-cart-text-muted, #8c8f94); font-size: 13.5px; }
.shaped-cart__empty .shaped-cart__empty-button{
	margin-top: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	border-radius: var(--shaped-cart-radius, 8px);
	background: var(--shaped-cart-accent, #1f7a5a);
	color: var(--shaped-cart-accent-text, #fff);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}

.shaped-cart__footer{
	flex: 0 0 auto;
	padding: 16px 20px 20px;
	border-top: 1px solid var(--shaped-cart-border, #eef0f2);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.shaped-cart__footer[hidden]{ display: none; }
.shaped-cart__row{ display: flex; align-items: center; justify-content: space-between; font-size: 14px; gap: 8px; }
.shaped-cart__row--subtotal{ font-weight: 700; }
.shaped-cart__row--total{ font-weight: 700; }
.shaped-cart__row-price{ display: flex; align-items: baseline; gap: 6px; }

/* Discount row: a "Coupon" label + the applied code shown as a dashed
   pill chip, with the saved amount on the right — matching the design. */
.shaped-cart__coupon-chip-wrap{ display: flex; align-items: center; gap: 10px; }
.shaped-cart__coupon-static-label{ font-size: 14px; color: var(--shaped-cart-text, #141618); }
.shaped-cart__coupon-chip{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px dashed #7ac77a;
	background: #eefaee;
	border-radius: 14px;
	padding: 3px 4px 3px 10px;
	font-size: 12px;
	color: var(--shaped-cart-text, #141618);
}
.shaped-cart__coupon-remove{
	width: 18px;
	height: 18px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #c3c4c7;
	color: #fff;
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.shaped-cart__discount-amount{ font-size: 14px; font-weight: 600; color: #43a047; }
.shaped-cart__note{ margin: 0; font-size: 12px; color: var(--shaped-cart-text-muted, #8c8f94); }

/* Free shipping bar. "Under header" placement is its own strip between the
   header and the scrolling items; "Under subtotal" is one more block in the
   footer's column, running edge to edge so the reached tint does. Spacing,
   sizes and colors are measured from the design (true-scale screenshot). */
.shaped-cart__fsb{ display: flex; flex-direction: column; gap: 14px; }
.shaped-cart__fsb[hidden]{ display: none; }
.shaped-cart__fsb--header{
	flex: 0 0 auto;
	padding: 16px 20px 22px;
	border-bottom: 1px solid var(--shaped-cart-border, #eef0f2);
}
.shaped-cart__fsb--subtotal{ margin: 0 -20px; padding: 10px 20px 18px; }
.shaped-cart .shaped-cart__fsb-text{
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--shaped-cart-text, #141618);
}
.shaped-cart__fsb-text strong,
.shaped-cart__fsb-text b{ font-weight: 700; color: inherit; }
.shaped-cart__fsb-track{
	display: block;
	height: var(--shaped-cart-fsb-height, 8px);
	border-radius: 999px;
	background: var(--shaped-cart-fsb-track, #dddddd);
	overflow: hidden;
}
/* Stripes lean "/" and repeat every 20px, as in the design. */
.shaped-cart__fsb-fill{
	display: block;
	height: 100%;
	max-width: 100%;
	border-radius: inherit;
	background-color: var(--shaped-cart-fsb-fill, #4a9d5b);
	background-image: linear-gradient(-45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%, transparent);
	background-size: 20px 20px;
	animation: shaped-cart-fsb-stripes 1s linear infinite;
	transition: width .4s ease;
}
@keyframes shaped-cart-fsb-stripes{
	from{ background-position: 0 0; }
	to{ background-position: 20px 0; }
}
/* No repainting stripes nobody can see. */
.shaped-cart:not(.is-open) .shaped-cart__fsb-fill{ animation-play-state: paused; }
@media (prefers-reduced-motion: reduce){
	.shaped-cart__fsb-fill{ animation: none; transition: none; }
}

.shaped-cart__fsb-label{ display: flex; align-items: center; gap: 12px; }
.shaped-cart__fsb-icon{ display: none; }

/* Reached: every color comes from the Progress Fill Color setting, as in the
   design — a light tint of it behind the strip, the fill in a ringed check
   circle, a darker shade for the text, and a solid (unstriped) full bar.
   Browsers without color-mix() drop those declarations and keep the plain
   in-progress look, plus the check. */
.shaped-cart__fsb.is-reached{ background: color-mix(in srgb, var(--shaped-cart-fsb-fill, #4a9d5b) 9%, transparent); }
.shaped-cart__fsb.is-reached .shaped-cart__fsb-icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--shaped-cart-fsb-fill, #4a9d5b);
	color: #fff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--shaped-cart-fsb-fill, #4a9d5b) 12%, transparent);
}
.shaped-cart__fsb-icon svg{ display: block; width: 14px; height: 14px; }
.shaped-cart .shaped-cart__fsb.is-reached .shaped-cart__fsb-text{
	font-weight: 600;
	color: color-mix(in srgb, var(--shaped-cart-fsb-fill, #4a9d5b) 62%, #000);
}
.shaped-cart__fsb.is-reached .shaped-cart__fsb-fill{ background-image: none; animation: none; }

.shaped-cart__coupon{
	display: flex;
	flex-direction: column;
	margin: 0 -20px;
	padding: 0 20px 12px;
	border-bottom: 1px solid var(--shaped-cart-border, #eef0f2);
}
.shaped-cart__coupon-toggle{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	color: var(--shaped-cart-text, #141618);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	min-height: 25px;
}
.shaped-cart__coupon-toggle:focus-visible{
	outline: 2px solid var(--shaped-cart-accent, #1f7a5a);
	outline-offset: 2px;
}
.shaped-cart__coupon-caret{
	display: flex;
	align-items: center;
	color: var(--shaped-cart-text-muted, #8c8f94);
	transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.shaped-cart__coupon.is-expanded .shaped-cart__coupon-caret{ transform: rotate(180deg); }
.shaped-cart__coupon-body{
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
}
.shaped-cart__coupon.is-expanded .shaped-cart__coupon-body{ max-height: 80px; opacity: 1; }
.shaped-cart__coupon-form{ display: flex; gap: 8px; padding-top: 10px; }
.shaped-cart__coupon-body .shaped-cart__coupon-form .shaped-cart__coupon-input{
	flex: 1 1 auto;
	height: 40px;
	border: 1px solid var(--shaped-cart-border, #eef0f2);
	border-radius: var(--shaped-cart-radius, 8px);
	padding: 0 12px;
	font-size: 13px;
	/* Transparent so it sits on any drawer background; text color set
	   explicitly, or the theme's own input color wins (Astra: #808285). */
	background: transparent;
	color: var(--shaped-cart-text, #141618);
}
.shaped-cart__coupon-body .shaped-cart__coupon-form .shaped-cart__coupon-input::placeholder{
	color: var(--shaped-cart-text-muted, #8c8f94);
	opacity: 1;
}
.shaped-cart__coupon-form .shaped-cart__coupon-apply{
	height: 40px;
	padding: 0 16px;
	border: none;
	border-radius: var(--shaped-cart-radius, 8px);
	background: var(--shaped-cart-accent, #1f7a5a);
	color: var(--shaped-cart-accent-text, #fff);
	cursor: pointer;
	font-weight: 600;
}
.shaped-cart__coupon-error{ margin: 0; font-size: 12px; color: #b3261e; }

.shaped-cart__actions{ display: flex; flex-direction: column; gap: 10px; }
a.shaped-cart__checkout-btn{
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	border-radius: var(--shaped-cart-radius, 8px);
	background: var(--shaped-cart-accent, #1f7a5a);
	color: var(--shaped-cart-accent-text, #fff);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
}
.shaped-cart__secondary-actions{ display: flex; align-items: center; gap: 10px; }
.shaped-cart__continue,
.shaped-cart__view-cart{
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	height: 46px;
	padding: 0 10px;
	border: 1px solid var(--shaped-cart-field-border, #e3e5e8);
	border-radius: var(--shaped-cart-radius, 8px);
	background: #f0f0f1;
	color: var(--shaped-cart-text, #141618);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

body.shaped-cart-locked{ overflow: hidden; }

body.shaped-cart-locked .shaped-cart-bubble{ display: none; }

/* Floating bubble trigger */
.shaped-cart-bubble{
	position: fixed;
	z-index: 99999;
	width: var(--shaped-cart-bubble-size, 56px);
	height: var(--shaped-cart-bubble-size, 56px);
	border-radius: var(--shaped-cart-bubble-radius, 28px);
	background: var(--shaped-cart-bubble-bg, #1f7a5a);
	color: var(--shaped-cart-bubble-icon, #fff);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.shaped-cart-bubble:focus-visible{
	outline: 2px solid var(--shaped-cart-bubble-bg, #1f7a5a);
	outline-offset: 3px;
}
.shaped-cart-bubble--br{ right: var(--shaped-cart-bubble-x, 24px); bottom: var(--shaped-cart-bubble-y, 24px); }
.shaped-cart-bubble--bl{ left: var(--shaped-cart-bubble-x, 24px); bottom: var(--shaped-cart-bubble-y, 24px); }
.shaped-cart-bubble--mr{ right: var(--shaped-cart-bubble-x, 24px); top: 50%; transform: translateY(-50%); }
.shaped-cart-bubble--ml{ left: var(--shaped-cart-bubble-x, 24px); top: 50%; transform: translateY(-50%); }
.shaped-cart-bubble__icon{ width: 55%; height: 55%; }
.shaped-cart-bubble__count{
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 1px;
	border-radius: 50%;
	background: var(--shaped-cart-bubble-badge, #d94f2b);
	color: var(--shaped-cart-bubble-count, #fff);
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (min-width: 1025px){ .shaped-cart-hide-desktop{ display: none !important; } }
@media (min-width: 601px) and (max-width: 1024px){ .shaped-cart-hide-tablet{ display: none !important; } }
@media (max-width: 600px){ .shaped-cart-hide-mobile{ display: none !important; } }

/* Menu cart trigger, used both inline via the shortcode and injected into a
   nav menu item. */
.shaped-cart-menu-trigger{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--shaped-cart-menu-icon, #1d2327);
	text-decoration: none;
}
.shaped-cart-menu-trigger:focus{ outline: none; }
.shaped-cart-menu-trigger__icon-wrap{ position: relative; line-height: normal; }
.shaped-cart-menu-trigger__icon{ width: var(--shaped-cart-menu-icon-size, 20px); height: var(--shaped-cart-menu-icon-size, 20px); }
.shaped-cart-menu-trigger__count{
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 16px;
	height: 16px;
	padding: 1px;
	border-radius: 50%;
	background: var(--shaped-cart-menu-badge, #d94f2b);
	color: var(--shaped-cart-menu-count, #fff);
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
.shaped-cart-menu-trigger__total{ font-size: 13px; }

.screen-reader-text{
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px; overflow: hidden;
}
