/* Cart drawer. Palette matches assets/product-page.css. */
:root {
	--ebrx-dark: #160c06;
	--ebrx-gold: #be9667;
	--ebrx-text: #757575;
	--ebrx-ink: #2b2723;
	--ebrx-line: #e6e1da;
	--ebrx-sand: #f6f2ec;
	--ebrx-white: #ffffff;
}

/* The theme's hover dropdown is replaced by the drawer. */
.sc_layouts_cart .sc_layouts_cart_widget { display: none !important; }
.sc_layouts_cart { cursor: pointer; }

.ebrx-drawer { position: fixed; inset: 0; z-index: 100001; }
.ebrx-drawer[hidden] { display: none; }
.ebrx-drawer-backdrop { position: absolute; inset: 0; background: rgba(22, 12, 6, .55); }
.ebrx-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 100%);
	display: flex;
	flex-direction: column;
	background: var(--ebrx-white);
	box-shadow: -20px 0 60px rgba(0, 0, 0, .25);
	outline: none;
	font-family: "Raleway", sans-serif;
	color: var(--ebrx-ink);
	animation: ebrx-drawer-in .22s ease-out;
}
@keyframes ebrx-drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.ebrx-drawer-open { overflow: hidden; }

.ebrx-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--ebrx-line);
}
.ebrx-drawer-header h2 {
	margin: 0;
	font-family: "Butler", Georgia, serif;
	font-size: 22px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ebrx-ink);
}
.ebrx-drawer-count { font-family: "Raleway", sans-serif; font-size: 14px; letter-spacing: 0; color: var(--ebrx-text); }
.ebrx-drawer-count::before { content: "("; }
.ebrx-drawer-count::after { content: ")"; }
/* The theme paints every button white-on-dark (.scheme_default button), which made the
   close icon white on the white drawer. Outrank it and give the button a visible ring. */
.scheme_default .ebrx-drawer .ebrx-drawer-close,
.ebrx-drawer .ebrx-drawer-close {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--ebrx-ink) !important;
	background: var(--ebrx-white) !important;
	border: 1px solid var(--ebrx-line);
	border-radius: 0;
	cursor: pointer;
}
.scheme_default .ebrx-drawer .ebrx-drawer-close:hover,
.ebrx-drawer .ebrx-drawer-close:hover { border-color: var(--ebrx-dark); }
.ebrx-drawer-close .ebrx-icon { width: 22px; height: 22px; display: block; stroke: currentColor; }

.ebrx-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px 20px; }

/* ---------- WooCommerce mini-cart inside the drawer ---------- */
.ebrx-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
.ebrx-drawer .woocommerce-mini-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: 14px;
	padding: 16px 28px 16px 0;
	margin: 0;
	border-bottom: 1px solid var(--ebrx-line);
}
.ebrx-drawer .woocommerce-mini-cart-item > a:not(.remove) { display: contents; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ebrx-ink); text-decoration: none; }
.ebrx-drawer .woocommerce-mini-cart-item img {
	grid-row: 1 / span 3;
	width: 80px;
	height: 96px;
	object-fit: cover;
	float: none;
	margin: 0;
	border: 1px solid var(--ebrx-line);
}
.ebrx-drawer .woocommerce-mini-cart-item .ebrx-item-title,
.ebrx-drawer .woocommerce-mini-cart-item .ebrx-item-variant { grid-column: 2; }
.ebrx-drawer .woocommerce-mini-cart-item .ebrx-item-variant { font-weight: 400; }
.ebrx-drawer .woocommerce-mini-cart-item dl.variation { grid-column: 2; margin: 2px 0 0; font-size: 12px; color: var(--ebrx-text); }
.ebrx-drawer .woocommerce-mini-cart-item dl.variation dt,
.ebrx-drawer .woocommerce-mini-cart-item dl.variation dd { display: inline; margin: 0; float: none; }
.ebrx-drawer .woocommerce-mini-cart-item dl.variation dd p { display: inline; margin: 0; }
.ebrx-drawer .woocommerce-mini-cart-item .quantity { grid-column: 2; margin-top: 4px; font-size: 14px; color: var(--ebrx-ink); }
.ebrx-drawer .woocommerce-mini-cart-item .quantity .amount { font-weight: 700; }
.ebrx-drawer .woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 14px;
	right: 0;
	width: 24px;
	height: 24px;
	line-height: 22px;
	font-size: 20px;
	text-align: center;
	color: var(--ebrx-text) !important;
	background: transparent !important;
	border: 1px solid var(--ebrx-line);
	border-radius: 0;
	text-decoration: none;
}
.ebrx-drawer .woocommerce-mini-cart-item a.remove:hover { color: var(--ebrx-dark) !important; border-color: var(--ebrx-dark); }

.ebrx-drawer .woocommerce-mini-cart__empty-message { margin: 40px 0; text-align: center; font-size: 15px; color: var(--ebrx-text); }

.ebrx-drawer .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	margin: 18px 0 4px;
	padding: 0;
	font-size: 16px;
	border: 0;
}
.ebrx-drawer .woocommerce-mini-cart__total strong { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.ebrx-drawer .woocommerce-mini-cart__total .amount { font-weight: 700; color: var(--ebrx-ink); }
.ebrx-drawer-body .ebrx-drawer-note { margin: 0 0 14px; font-size: 12px; color: var(--ebrx-text); }

.ebrx-drawer .woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }
.ebrx-drawer .woocommerce-mini-cart__buttons a.button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 18px 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 0;
	box-sizing: border-box;
}
/* Checkout is the primary action; View cart is secondary. The order in the markup is view cart, checkout. */
.ebrx-drawer .woocommerce-mini-cart__buttons a.button.checkout { order: -1; color: var(--ebrx-white) !important; background: var(--ebrx-dark) !important; border: 1px solid var(--ebrx-dark); }
.ebrx-drawer .woocommerce-mini-cart__buttons a.button.checkout:hover { background: var(--ebrx-gold) !important; border-color: var(--ebrx-gold); }
.ebrx-drawer .woocommerce-mini-cart__buttons a.button:not(.checkout) { color: var(--ebrx-dark) !important; background: transparent !important; border: 1px solid var(--ebrx-dark); }
.ebrx-drawer .woocommerce-mini-cart__buttons a.button:not(.checkout):hover { background: var(--ebrx-sand) !important; }

.ebrx-drawer-footer { padding: 14px 20px 18px; background: var(--ebrx-sand); border-top: 1px solid var(--ebrx-line); }
.ebrx-drawer-footer p { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 12px; line-height: 1.4; color: var(--ebrx-ink); }
.ebrx-drawer-footer p:last-child { margin-bottom: 0; }
.ebrx-drawer-footer .ebrx-icon { width: 20px; height: 20px; flex: none; color: var(--ebrx-gold); }

@media (max-width: 767px) {
	.ebrx-drawer-panel { width: 100%; }
	.ebrx-drawer .woocommerce-mini-cart-item { grid-template-columns: 68px minmax(0, 1fr); }
	.ebrx-drawer .woocommerce-mini-cart-item img { width: 68px; height: 82px; }
}
