/* RS Product Page: the "Added to cart" card (product page) and the cart card opened from the
 * header's cart icon (whole site). Both share one look. */
/* ---------- "Added to cart" card ---------- */
.rspp-toast {
	--rspp-ink: #101020; --rspp-muted: #6c6c7a; --rspp-line: #e4e4ea;
	position: fixed; z-index: 10000000; top: 96px; /* above the WhatsApp button (9999999) */ right: 24px; width: 360px; max-width: calc(100vw - 32px);
	background: #fff; color: var(--rspp-ink); border: 1px solid var(--rspp-line); border-radius: 14px;
	box-shadow: 0 18px 48px rgba(16, 16, 32, .16), 0 2px 6px rgba(16, 16, 32, .06);
	overflow: hidden; opacity: 0; transform: translateY(-10px) scale(.98);
	transition: opacity .22s ease, transform .22s ease;
}
.admin-bar .rspp-toast { top: 128px; }
.rspp-toast.is-open { opacity: 1; transform: none; }
.rspp-toast-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.rspp-toast-head strong { flex: 1; font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.rspp-toast-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e7f5ec; color: #1f8a4c; }
/* !important: the theme paints every <button> as a dark filled button. */
.rspp-toast .rspp-toast-close {
	width: 28px !important; height: 28px !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important;
	color: var(--rspp-muted) !important; font-size: 20px !important; font-weight: 400 !important; line-height: 1 !important; letter-spacing: 0 !important; cursor: pointer;
}
.rspp-toast .rspp-toast-close:hover, .rspp-toast .rspp-toast-close:focus-visible { background: #f2f2f5 !important; color: var(--rspp-ink) !important; }
.rspp-toast-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px; }
.rspp-toast-img { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #f4f4f7; border: 1px solid var(--rspp-line); }
.rspp-toast-img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.rspp-toast-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rspp-toast-name { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rspp-toast-meta { font-size: 12px; color: var(--rspp-muted); }
.rspp-toast-promo { font-size: 12px; color: #1f8a4c; }
.rspp-toast-price { flex: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.rspp-toast-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; }
.rspp-toast-btn {
	display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 8px;
	background: var(--rspp-ink); color: #fff !important; border: 1px solid var(--rspp-ink);
	font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none !important;
}
.rspp-toast-btn:hover { background: #262640; }
.rspp-toast-btn-ghost { background: #fff; color: var(--rspp-ink) !important; border-color: #d3d3dc; }
.rspp-toast-btn-ghost:hover { background: #f4f4f7; }
.rspp-toast-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--rspp-ink); opacity: .18; transform-origin: left; }
.rspp-toast.is-counting .rspp-toast-timer { animation: rspp-toast-time var(--rspp-toast-ms, 7000ms) linear forwards; }
.rspp-toast:hover .rspp-toast-timer { animation-play-state: paused; }
@keyframes rspp-toast-time { to { transform: scaleX(0); } }

@media (max-width: 600px) {
	.rspp-toast, .admin-bar .rspp-toast {
		top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; border-bottom: 0;
		transform: translateY(24px); padding-bottom: env(safe-area-inset-bottom);
	}
	.rspp-toast.is-open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.rspp-toast { transition: none; }
	.rspp-toast.is-counting .rspp-toast-timer { animation: none; }
}

/* ---------- Cart icon in the header ---------- */
.rspp-cartwrap[hidden] { display: none !important; }
.rspp-cartwrap { display: inline-flex; align-items: center; }
.rspp-cartwrap a.rspp-cartbtn {
	position: relative !important; display: inline-grid !important; place-items: center; width: 38px !important; height: 38px !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50%; background: transparent; box-shadow: none !important;
	color: inherit !important; font-size: 0 !important; line-height: 1 !important; letter-spacing: 0 !important; text-decoration: none !important;
	cursor: pointer; transition: background-color .2s ease;
}
.rspp-cartwrap a.rspp-cartbtn::before, .rspp-cartwrap a.rspp-cartbtn::after { display: none !important; content: none !important; }
.rspp-cartwrap a.rspp-cartbtn:hover, .rspp-cartwrap a.rspp-cartbtn[aria-expanded="true"] { background: color-mix(in srgb, currentColor 10%, transparent); }
.rspp-cartwrap a.rspp-cartbtn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.rspp-cartbtn svg { display: block; }
.rspp-cart-count {
	position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
	background: #101020; color: #fff; font-family: Raleway, sans-serif; font-size: 10px; font-weight: 700; line-height: 17px;
	letter-spacing: 0; text-align: center; text-transform: none;
}
.rspp-cart-count[data-count="0"] { display: none; }
.rspp-cartwrap.is-light .rspp-cart-count { background: #fff; color: #101020; }
.rspp-cart-count.is-bump { animation: rspp-cart-bump .5s ease; }
@keyframes rspp-cart-bump { 30% { transform: scale(1.35); } 60% { transform: scale(.92); } }

/* Desktop: right of the last menu item, out of the menu's flow so the logo stays centred. The
 * menu keeps room for it on the right, so it ends as far from the edge as "About" starts. */
#site-navigation .primary-menu.rspp-cart-room { padding-right: 52px !important; box-sizing: border-box; }
li.rspp-has-cart { position: relative; z-index: 5; }
li.rspp-has-cart > .rspp-cartwrap { position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); }
/* Phones: next to the search icon. */
#header-responsive .header-right { display: flex; align-items: center; gap: 10px; }
#header-responsive .header-right > .rspp-cartwrap { order: -1; }

/* ---------- Cart card ---------- */
.rspp-minicart .rspp-mc-head-added { display: none; }
.rspp-minicart.is-added .rspp-mc-head-added { display: flex; }
.rspp-minicart.is-added .rspp-mc-head-cart { display: none; }
.rspp-mc-count { font-weight: 400; color: var(--rspp-muted); }
.rspp-mc-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: min(44vh, 330px); overflow-y: auto; overscroll-behavior: contain; }
.rspp-minicart .rspp-mc-list .rspp-toast-item { margin: 0; padding: 10px 16px; transition: background-color .4s ease; }
.rspp-minicart .rspp-mc-list .rspp-toast-item + .rspp-toast-item { border-top: 1px solid var(--rspp-line); }
.rspp-minicart .rspp-mc-list .rspp-toast-item.is-new { background: #f3f9f5; }
.rspp-minicart .rspp-toast-img { width: 52px; height: 52px; }
.rspp-mc-sum { margin-top: 2px; padding: 12px 16px 14px; border-top: 1px solid var(--rspp-line); }
.rspp-mc-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.rspp-mc-row strong { font-size: 14px; font-weight: 600; }
.rspp-mc-free { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--rspp-muted); }
.rspp-mc-free.is-done { color: #1f8a4c; }
.rspp-mc-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: #ececf1; overflow: hidden; }
.rspp-mc-bar span { display: block; height: 100%; border-radius: 4px; background: #1f8a4c; }
.rspp-mc-empty { margin: 0; padding: 22px 16px 16px; font-size: 13px; color: var(--rspp-muted); text-align: center; }
.rspp-mc-foot-1 { grid-template-columns: 1fr; }
@media (max-width: 600px) {
	.rspp-mc-list { max-height: 46vh; }
}

/* Grid cards: the cart card replaces WooCommerce's "View cart" link under the button. */
body.rspp-has-minicart ul.products li.product .added_to_cart,
body.rspp-has-minicart .wc-block-grid__product .added_to_cart { display: none !important; }
.rspp-toast-name a { color: inherit !important; text-decoration: none !important; }
.rspp-toast-name a:hover { text-decoration: underline !important; text-underline-offset: 2px; }

/* - / + / Remove on each line. !important: the theme paints every <button> as a dark filled button. */
.rspp-mc-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.rspp-mc-qty { display: inline-flex; align-items: center; height: 28px; border: 1px solid #d3d3dc; border-radius: 999px; overflow: hidden; }
.rspp-minicart .rspp-mc-step {
	display: grid !important; place-items: center; width: 28px !important; height: 26px !important; min-width: 0 !important; min-height: 0 !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
	color: var(--rspp-ink) !important; font-size: 15px !important; font-weight: 500 !important; line-height: 1 !important; letter-spacing: 0 !important; cursor: pointer;
}
.rspp-minicart .rspp-mc-step:hover:not(:disabled) { background: #f2f2f5 !important; }
.rspp-minicart .rspp-mc-step:disabled { color: #c3c3cc !important; cursor: default; }
.rspp-mc-n { min-width: 22px; font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.rspp-minicart .rspp-mc-remove {
	display: inline !important; width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
	margin: 0 !important; padding: 2px 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
	color: var(--rspp-muted) !important; font-size: 12px !important; font-weight: 400 !important; line-height: 1.2 !important; letter-spacing: 0 !important;
	text-transform: none !important; text-decoration: underline !important; text-underline-offset: 2px; cursor: pointer;
}
.rspp-minicart .rspp-mc-remove:hover { color: #b3261e !important; }
.rspp-minicart .rspp-toast-item.is-busy { opacity: .45; pointer-events: none; transition: opacity .15s ease; }
.rspp-minicart .rspp-mc-body.is-busy .rspp-mc-sum, .rspp-minicart .rspp-mc-body.is-busy .rspp-toast-foot { opacity: .6; }
.rspp-mc-note { margin: 0; padding: 8px 16px 0; font-size: 12px; color: #9a5b00; }
@media (max-width: 600px) {
	.rspp-mc-qty { height: 34px; }
	.rspp-minicart .rspp-mc-step { width: 36px !important; height: 32px !important; font-size: 17px !important; }
	.rspp-minicart .rspp-mc-remove { padding: 8px 0 !important; }
}
