/* Espressimo Commerce — Side Cart (floating right button + slide-out drawer). RTL. */

:root { --esp-sc-brown: #6f4e37; --esp-sc-dark: #4a3325; --esp-sc-accent: #8b3a00; }

/* ---- floating cart button (its own entity, LEFT edge — client 2026-07-07) ---- */
.esp-sc__fab {
	position: fixed;
	left: 0;
	right: auto;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99998;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 54px;
	padding: 12px 0;
	border: 0;
	border-radius: 0 12px 12px 0;
	background: #8b3a00 !important; /* force brand color over the theme's button styling */
	color: #fff !important;
	cursor: pointer;
	box-shadow: 4px 4px 16px rgba(74, 51, 37, .28);
	transition: background .15s, transform .15s;
}
.esp-sc__fab:hover { background: #6f4e37 !important; }
.esp-sc__fab svg { width: 24px; height: 24px; }
.esp-sc__fab-count {
	min-width: 20px;
	height: 20px;
	line-height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: #fff;
	color: var(--esp-sc-accent);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

/* ---- overlay ---- */
.esp-sc__overlay {
	position: fixed;
	inset: 0;
	background: rgba(43, 35, 32, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s;
	z-index: 99998;
}
body.esp-sc-open .esp-sc__overlay { opacity: 1; visibility: visible; }

/* ---- drawer (slides in from the LEFT — client 2026-07-07) ---- */
.esp-sc__drawer {
	position: fixed;
	top: 0;
	left: 0;
	right: auto;
	height: 100%;
	width: 380px;
	max-width: 90vw;
	background: #fff; /* solid white, not transparent */
	box-shadow: 12px 0 40px rgba(74, 51, 37, .22);
	transform: translateX(-100%);
	transition: transform .28s ease;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	font-family: 'Dialect PM', sans-serif; /* site standard font */
	color: #2b2320;
}
.esp-sc__drawer, .esp-sc__drawer * { font-family: 'Dialect PM', sans-serif; }
body.esp-sc-open .esp-sc__drawer { transform: translateX(0); }

.esp-sc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border-bottom: 1px solid #e7ded6;
}
.esp-sc__title { font-size: 1.4rem; font-weight: 400; }
.esp-sc__close {
	display: flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; padding: 0;
	background: none !important; border: 0 !important; box-shadow: none !important;
	border-radius: 50%;
	font-size: 34px; line-height: 1;
	color: #6f4e37 !important;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.esp-sc__close:hover {
	background: #8b3a00 !important;
	color: #fff !important;
}
.esp-sc__close:hover { color: var(--esp-sc-accent); }

.esp-sc__list { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px; }
.esp-sc__empty { text-align: center; color: #8a7d75; padding: 48px 0; }

.esp-sc__item { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #efe6dd; }
.esp-sc__thumb { flex: 0 0 auto; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #eaded4; }
.esp-sc__thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.esp-sc__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.esp-sc__name { font-weight: 400; color: #2b2320; text-decoration: none; font-size: 1.06rem; }
.esp-sc__name:hover { color: var(--esp-sc-accent); }
.esp-sc__price { color: var(--esp-sc-accent); font-weight: 400; direction: ltr; text-align: right; font-size: 1.04rem; }

.esp-sc__qty { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.esp-sc__qty button {
	width: 26px; height: 26px; border: 1px solid #d9cbbf !important; background: #fff !important; border-radius: 6px;
	cursor: pointer; font-size: 15px; line-height: 1; color: #4a3325 !important; box-shadow: none !important;
}
.esp-sc__qty button:hover { border-color: var(--esp-sc-accent); color: var(--esp-sc-accent); }
.esp-sc__qty span { min-width: 22px; text-align: center; font-weight: 400; font-size: 1rem; }
.esp-sc__rm { margin-inline-start: auto; width: auto !important; padding: 0 10px; font-size: 12px !important; color: #a12a2a !important; border-color: #eccccc !important; }

.esp-sc__foot { border-top: 1px solid #e7ded6; padding: 18px 22px; background: #fff; }
.esp-sc__total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.2rem; font-weight: 400; margin-bottom: 14px; }
.esp-sc__total { color: var(--esp-sc-accent); direction: ltr; }
.esp-sc__checkout {
	display: block; text-align: center; background: #8b3a00; color: #fff;
	padding: 14px; border-radius: 10px; font-weight: 400; font-size: 1.08rem; text-decoration: none; transition: background .15s;
}
.esp-sc__checkout:hover { background: #6f4e37; color: #fff; }
.esp-sc__price, .esp-sc__total { color: #8b3a00; }
.esp-sc__name:hover, .esp-sc__continue:hover { color: #8b3a00; }
.esp-sc__continue {
	display: block; width: 100%; margin-top: 8px; background: none !important; border: 0 !important;
	color: #6b615b; cursor: pointer; padding: 8px; font-family: 'Dialect PM', sans-serif; box-shadow: none !important;
}
.esp-sc__continue:hover { color: var(--esp-sc-accent); }

@media (max-width: 480px) {
	.esp-sc__fab { width: 46px; top: auto; bottom: 90px; transform: none; }
	.esp-sc__drawer { width: 100%; max-width: 100%; }
}

/* ---- added-to-cart toast (bottom-right) ---- */
.esp-sc__toast {
	position: fixed; bottom: 24px; right: 24px; z-index: 100001;
	display: flex; align-items: center; gap: 10px; max-width: 340px;
	padding: 13px 16px; background: #fff; border-radius: 12px;
	box-shadow: 0 12px 40px rgba(74, 51, 37, .28);
	font-family: 'Dialect PM', sans-serif; color: #2b2320;
	transform: translateY(20px); opacity: 0; visibility: hidden;
	transition: opacity .25s, transform .25s, visibility .25s;
}
.esp-sc__toast--show { opacity: 1; visibility: visible; transform: translateY(0); }
.esp-sc__toast-ic { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; background: #2e7d32; color: #fff; border-radius: 50%; }
.esp-sc__toast-ic svg { width: 15px; height: 15px; }
.esp-sc__toast-msg { flex: 1 1 auto; font-weight: 700; font-size: .92rem; }
.esp-sc__toast-view { flex: 0 0 auto; background: none !important; border: 0 !important; box-shadow: none !important; color: #8b3a00 !important; font-family: 'Dialect PM', sans-serif; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0 2px; }
.esp-sc__toast-view:hover { color: #6f4e37 !important; }

/* ============================================================================
   WooCommerce-native drawer: custom markup (esp_sidecart_body_html) fed by the Woo
   cart, so it reuses the .esp-sc__* item/foot styles above. Extras only. RTL.
   ============================================================================ */
.esp-sc__body { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
/* the Woo-formatted prices sit inside .esp-sc__price / .esp-sc__total */
.esp-sc__price .woocommerce-Price-amount,
.esp-sc__total .woocommerce-Price-amount { color: var(--esp-sc-accent); direction: ltr; }
/* the remove link sits at the end of the qty row */
a.esp-sc__rm { text-decoration: none; }
.esp-sc__viewcart {
	display: block; text-align: center; margin-top: 8px; padding: 8px;
	color: #6b615b; text-decoration: none; font-size: .98rem;
}
.esp-sc__viewcart:hover { color: var(--esp-sc-accent); }

/* Suppress Woo's auto-injected "View cart" link next to the card add-buttons (drawer opens instead). */
a.added_to_cart { display: none !important; }
/* icon add-buttons keep their look while they are Woo ajax buttons */
.esp-cprod__cart.loading, .esp-addcart-btn.loading, .esp-grec__cart.loading, .esp-mzrec__cart.loading { opacity: .5; pointer-events: none; }
@media (max-width: 480px) {
	.esp-sc__toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

/* ---- Larger fonts in the side cart (client: "still very small", 2026-07-08) ---- */
.esp-sc__title { font-size: 1.75rem !important; }
.esp-sc__name { font-size: 1.32rem !important; }
.esp-sc__price, .esp-sc__price .woocommerce-Price-amount { font-size: 1.3rem !important; }
.esp-sc__qty span { font-size: 1.22rem !important; }
.esp-sc__qty button { font-size: 19px !important; }
.esp-sc__rm { font-size: 14px !important; }
.esp-sc__total-row, .esp-sc__total .woocommerce-Price-amount { font-size: 1.55rem !important; }
.esp-sc__checkout { font-size: 1.32rem !important; }
.esp-sc__viewcart { font-size: 1.14rem !important; }
.esp-sc__empty { font-size: 1.2rem !important; }


/* 2026-10-13: the header already has a cart icon below 1200px, so no floating button there;
   and the closed drawer no longer casts its shadow onto the page edge. */
@media (max-width: 1200px) { .esp-sc__fab { display: none !important; } }
.esp-sc__drawer { box-shadow: none; }
body.esp-sc-open .esp-sc__drawer { box-shadow: 12px 0 40px rgba(74, 51, 37, .22); }

/* 50px below mid-screen so it clears the home banner arrows (client 2026-10-19). */
@media (min-width: 481px) { .esp-sc__fab { top: calc(50% + 120px); } } /* +50 then +70 more (client 2026-10-19) */

/* Floating cart: no theme-pink border from the Hello button default (2026-10-19). */
.esp-sc__fab, .esp-sc__fab:hover, .esp-sc__fab:focus { border-color: #8B3A00 !important; }
