/* =====================================================================================================================
   Overlays: the cart panel (the header's Menu Cart widget, "Side Cart") and the quick-add "Choose your options" window.
   Cart panel: its colours, type, dividers, buttons and the close icon are the widget's own Style settings (Templates >
   Theme Builder > Header > the cart icon > Style); its words are in Content > Cart Panel Words (inc/pro/overlays.php).
   This file only lays it out: a title row, the pieces (scrolling when there are many), the subtotal, a note and the two
   buttons pinned to the bottom, an empty state, the whole page dimmed behind it (the header too).
   ===================================================================================================================== */

:root {
	--bj-i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M4 6.5h16M9.5 6.5V4.75h5V6.5M6.5 6.5l.9 12.6a1.6 1.6 0 0 0 1.6 1.4h6a1.6 1.6 0 0 0 1.6-1.4l.9-12.6M10.25 10.5v6M13.75 10.5v6'/%3E%3C/svg%3E");
	--bj-i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2'/%3E%3Cpath d='M8.5 10.5V7.75a3.5 3.5 0 0 1 7 0v2.75'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the dimmed page: over everything, the header too */
/* the panel lives inside the header's main row (z-index 40): while it is open that row goes above the whole page */
.e-con.bj-hd__main:has(.elementor-menu-cart--shown), html.bj-mc-open .e-con.bj-hd__main { z-index: 100000 !important; }
/* the page behind stays still while the panel is open (only where scrollbars float over the page: phones, Macs; a
   classic Windows scrollbar is left alone so nothing jumps sideways) */
html.bj-mc-lock { overflow: hidden; }
/* the "added to your cart" note steps aside while the panel is open */
html.bj-mc-open .bj-toast { opacity: 0 !important; visibility: hidden !important; }
.bj-hd__cart .elementor-menu-cart__container { background-color: rgba(16, 18, 14, .62); }

/* ---------------------------------------------------------------- the panel */
.bj-hd__cart .elementor-menu-cart__main {
	--bj-mc-pad: 28px;
	top: 0; bottom: 0;
	width: min(420px, 100vw); max-width: 100%;
	height: 100vh; height: 100dvh; min-height: 0;
	display: flex; flex-direction: column; align-items: stretch;
	overflow: hidden;
	font-family: var(--bj-sans); font-size: 15px; line-height: 1.4; color: #e6e2dc;
	box-shadow: -30px 0 70px -30px rgba(0, 0, 0, .8);
	transition: transform .45s var(--bj-ease), opacity .3s ease;
}
@media (max-width: 480px) { .bj-hd__cart .elementor-menu-cart__main { --bj-mc-pad: 20px; width: 100%; border-left-width: 0 !important; } }
/* WooCommerce refreshes this part (pieces, subtotal, buttons); "contents" lets its parts take their places in the panel */
.bj-hd__cart .elementor-menu-cart__main .widget_shopping_cart_content { display: contents; }

/* title row: "Your Cart" (serif, gold italic tail), the number of pieces, the round close button */
.bj-mc-head { order: 0; flex: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 28px calc(var(--bj-mc-pad) + 54px) 20px var(--bj-mc-pad); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bj-mc-title { margin: 0 !important; font-family: var(--bj-serif); font-size: 2rem; font-weight: 500; line-height: 1; letter-spacing: .005em; color: #fff; }
.bj-mc-title em { font-style: italic; color: var(--bj-gold); }
.bj-mc-count { font-family: var(--bj-caps); font-size: 11.5px; font-weight: 500; letter-spacing: .22em; line-height: 1; text-transform: uppercase; white-space: nowrap; color: #a9a39e; }
.bj-mc-count[data-count="0"] { display: none; }
.bj-hd__cart .elementor-menu-cart__close-button-custom, .bj-hd__cart .elementor-menu-cart__close-button {
	position: absolute !important; top: 20px; right: calc(var(--bj-mc-pad) - 8px); z-index: 3;
	display: grid !important; place-items: center; width: 44px !important; height: 44px !important; margin: 0 !important;
	border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; cursor: pointer;
	transition: border-color .2s var(--bj-ease), background-color .2s var(--bj-ease);
}
.bj-hd__cart .elementor-menu-cart__close-button-custom svg { width: var(--cart-close-icon-size, 14px) !important; height: var(--cart-close-icon-size, 14px) !important; fill: none !important; color: var(--cart-close-button-color, #f4f3f1); transition: color .2s var(--bj-ease); }
.bj-hd__cart .elementor-menu-cart__close-button-custom:hover, .bj-hd__cart .elementor-menu-cart__close-button-custom:focus-visible { border-color: var(--bj-gold); background: rgba(203, 167, 103, .1); }
.bj-hd__cart .elementor-menu-cart__close-button-custom:hover svg, .bj-hd__cart .elementor-menu-cart__close-button-custom:focus-visible svg { color: var(--cart-close-button-hover-color, var(--bj-gold)); }
.bj-hd__cart .elementor-menu-cart__close-button-custom:focus-visible { outline: 2px solid var(--bj-gold); outline-offset: 2px; }

/* the pieces: they scroll when there are many, the subtotal and buttons stay at the bottom */
.bj-hd__cart .elementor-menu-cart__products { order: 1; flex: 1 1 auto; min-height: 0; max-height: none !important; margin: 0 !important; padding: 0 var(--bj-mc-pad) 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.bj-hd__cart .elementor-menu-cart__product { display: grid !important; grid-template-columns: 72px minmax(0, 1fr) auto !important; grid-template-rows: auto 1fr !important; column-gap: 16px; row-gap: 10px; align-items: start; padding-inline: 0 !important; }
.bj-hd__cart .elementor-menu-cart__product:first-of-type { padding-top: var(--product-divider-gap, 20px); }
.bj-hd__cart .elementor-menu-cart__product-image { grid-column: 1; grid-row: 1 / 3; width: 72px !important; }
.bj-hd__cart .elementor-menu-cart__product-image a { display: block; border-radius: 4px; overflow: hidden; }
.bj-hd__cart .elementor-menu-cart__product-image img { display: block; width: 72px !important; height: 72px !important; max-width: none; object-fit: cover; border-radius: 4px; background: #fff; transition: opacity .2s var(--bj-ease); }
.bj-hd__cart .elementor-menu-cart__product-image a:hover img { opacity: .85; }
.bj-hd__cart .elementor-menu-cart__product-name { grid-column: 2 !important; grid-row: 1; min-width: 0; margin: 0 !important; padding: 2px 0 0 !important; }
.bj-hd__cart .elementor-menu-cart__product-name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; transition: color .2s var(--bj-ease); }
/* the chosen options, one per line ("Bead Size: 8mm") */
.bj-hd__cart .elementor-menu-cart__product .variation { gap: 2px 5px; margin: 6px 0 0 !important; padding: 0; line-height: 1.35; }
.bj-hd__cart .elementor-menu-cart__product .variation dt { margin: 0; font-weight: 400; }
.bj-hd__cart .elementor-menu-cart__product .variation dd { margin: 0 !important; }
.bj-hd__cart .elementor-menu-cart__product .variation dd p { margin: 0; }
/* "Qty 2 × $34.95" on the left, the line's total on the right */
.bj-hd__cart .elementor-menu-cart__product-price { grid-column: 2 / 4 !important; grid-row: 2; align-self: end !important; margin: 0; padding: 0 !important; }
.bj-hd__cart .bj-mc-qty { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bj-hd__cart .bj-mc-qty .product-quantity { font-size: 13.5px; font-weight: 400; color: #c9c4bd; }
.bj-hd__cart .bj-mc-each { white-space: nowrap; }
.bj-hd__cart .bj-mc-each del, .bj-hd__cart .bj-mc-line del { margin-right: 4px; opacity: .6; font-weight: 400; }
.bj-hd__cart .bj-mc-each ins, .bj-hd__cart .bj-mc-line ins { text-decoration: none; }
.bj-hd__cart .bj-mc-line { flex: none; white-space: nowrap; }
/* remove: a small bin, top right of the line */
.bj-hd__cart .elementor-menu-cart__product-remove { position: relative !important; inset: auto !important; grid-column: 3; grid-row: 1; justify-self: end; align-self: start; display: grid; place-items: center; width: 34px !important; height: 34px !important; margin: -6px -8px 0 0; border: 0 !important; border-radius: 50% !important; transform: none !important; transition: background-color .2s var(--bj-ease); }
.bj-hd__cart .elementor-menu-cart__product-remove::before { content: ""; position: static !important; display: block; width: 17px !important; height: 17px !important; margin: 0 !important; transform: none !important; border-radius: 0; background: var(--remove-item-button-color, #a9a39e) !important; -webkit-mask: var(--bj-i-trash) center / contain no-repeat; mask: var(--bj-i-trash) center / contain no-repeat; }
.bj-hd__cart .elementor-menu-cart__product-remove::after { display: none !important; }
.bj-hd__cart .elementor-menu-cart__product-remove:hover, .bj-hd__cart .elementor-menu-cart__product-remove:focus-within { border: 0 !important; background: rgba(255, 255, 255, .08); }
.bj-hd__cart .elementor-menu-cart__product-remove:hover::before, .bj-hd__cart .elementor-menu-cart__product-remove:focus-within::before { background: var(--remove-item-button-hover-color, var(--bj-gold)) !important; }
.bj-hd__cart .elementor-menu-cart__product-remove:focus-within { outline: 2px solid var(--bj-gold); outline-offset: 0; }
.bj-hd__cart .elementor-menu-cart__product-remove > a { inset: 0; }

/* subtotal, the note, the buttons */
.bj-hd__cart .elementor-menu-cart__subtotal { order: 2; flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 !important; padding: 18px var(--bj-mc-pad) 4px !important; }
.bj-hd__cart .elementor-menu-cart__subtotal strong { font-weight: 500; }
.bj-hd__cart .elementor-menu-cart__subtotal .amount { font-size: 1.25rem; font-weight: 700; color: #fff; }
.bj-mc-note { order: 3; flex: none; display: none; margin: 0 !important; padding: 0 var(--bj-mc-pad); font-size: 13px; line-height: 1.45; color: #a9a39e; }
.elementor-menu-cart__main:has(.elementor-menu-cart__subtotal) .bj-mc-note { display: block; }
.bj-hd__cart .elementor-menu-cart__footer-buttons { order: 4; flex: none; margin: 0 !important; padding: 18px var(--bj-mc-pad) calc(26px + env(safe-area-inset-bottom, 0px)) !important; }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button { display: flex !important; align-items: center; justify-content: center; gap: 9px; height: 52px; margin: 0 !important; padding: 0 14px !important; line-height: 1 !important; letter-spacing: 0; text-transform: none; white-space: nowrap; border-radius: var(--cart-footer-buttons-border-radius, 4px) !important; box-shadow: none; transition: background-color .2s var(--bj-ease), color .2s var(--bj-ease), border-color .2s var(--bj-ease); }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button--view-cart { color: var(--view-cart-button-text-color, #fff); background-color: var(--view-cart-button-background-color, transparent); }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button--view-cart:hover { color: var(--view-cart-button-hover-text-color, var(--bj-charcoal)); background-color: var(--view-cart-button-hover-background-color, #fff); }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button--checkout { color: var(--checkout-button-text-color, var(--bj-charcoal)); background-color: var(--checkout-button-background-color, var(--bj-gold)); }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button--checkout:hover { color: var(--checkout-button-hover-text-color, var(--bj-charcoal)); background-color: var(--checkout-button-hover-background-color, var(--bj-gold-hover)); }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button--checkout::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--bj-i-lock) center / contain no-repeat; mask: var(--bj-i-lock) center / contain no-repeat; }
.bj-hd__cart .elementor-menu-cart__footer-buttons .elementor-button:focus-visible { outline: 2px solid var(--bj-gold); outline-offset: 2px; }
@media (max-width: 360px) { .bj-hd__cart .elementor-menu-cart__footer-buttons { grid-template-columns: 1fr !important; } }

/* the empty cart: a gold lotus, a serif title, a line and a gold button (instead of "No products in the cart.") */
.bj-mc-empty { order: 1; flex: 1 1 auto; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 32px var(--bj-mc-pad) 72px; text-align: center; }
.elementor-menu-cart__main:has(.woocommerce-mini-cart__empty-message) .bj-mc-empty { display: flex; }
.elementor-menu-cart__main:has(.woocommerce-mini-cart__empty-message) .woocommerce-mini-cart__empty-message { display: none !important; }
.bj-mc-empty__icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 0 24px; border: 1px solid rgba(203, 167, 103, .45); border-radius: 50%; }
.bj-mc-empty__icon::before { content: ""; width: 44px; height: 32px; background: var(--bj-gold); -webkit-mask: var(--bj-i-lotus) center / contain no-repeat; mask: var(--bj-i-lotus) center / contain no-repeat; }
.bj-mc-empty__title { margin: 0 0 10px !important; font-family: var(--bj-serif); font-size: 1.85rem; font-weight: 500; line-height: 1.1; color: #fff; }
.bj-mc-empty__title em { font-style: italic; color: var(--bj-gold); }
.bj-mc-empty__text { max-width: 290px; margin: 0 0 28px !important; font-size: 15px; line-height: 1.5; color: #b5afa8; }
.bj-mc-empty__text:empty { display: none; }
a.bj-mc-empty__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 30px; font-family: var(--bj-sans); font-size: 16px; font-weight: 600; line-height: 1; color: var(--bj-charcoal) !important; background: var(--bj-gold); border-radius: 4px; text-decoration: none !important; transition: background-color .2s var(--bj-ease); }
a.bj-mc-empty__btn::after { content: "\2192"; transition: transform .3s var(--bj-ease); }
a.bj-mc-empty__btn:hover { background: var(--bj-gold-hover); }
a.bj-mc-empty__btn:hover::after { transform: translateX(3px); }
a.bj-mc-empty__btn:focus-visible { outline: 2px solid var(--bj-gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.bj-hd__cart .elementor-menu-cart__main, .bj-hd__cart .elementor-menu-cart__container { transition: none !important; }
}

/* =====================================================================================================================
   Quick-add "Choose your options" window (inc/quick-add.php; base look in site.css). Customer point 9: on a Windows
   desktop the photo was cut off and the window scrolled sideways. Causes: the hidden option drop-down took the window's
   full width (a stronger rule undid its 1px size), the photo filled a tall box with object-fit: cover, and the whole
   window scrolled in both directions. Now: never sideways, the whole photo shown, only the words scroll when needed.
   ===================================================================================================================== */
.bj-qa table.variations select.bj-swatch-select { width: 1px !important; min-width: 0 !important; height: 1px !important; padding: 0 !important; }
.bj-qa table.variations td { position: relative; }
.bj-qa table.variations, .bj-qa table.variations tbody { display: block; width: 100%; max-width: 100%; }
.bj-qa .bj-swatches { max-width: 100%; }
.bj-qa .bj-swatch { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; text-align: center; }
/* "Quantity", then "− 1 +" and Add to Cart on one line; on a narrow window the two drop below the word together */
.bj-qa .woocommerce-variation-add-to-cart { flex-wrap: wrap; align-items: center; }
.bj-qa .woocommerce-variation-add-to-cart .ct-cart-actions { flex: 1 1 260px; min-width: 0; flex-wrap: nowrap; }
.bj-qa button.single_add_to_cart_button { flex: 1 1 auto !important; min-width: 0; white-space: nowrap; }
.bj-qa__body { min-width: 0; }
.bj-qa__body > *, .bj-qa__form, .bj-qa form.variations_form { max-width: 100%; }
.bj-qa__media img { max-width: 100%; aspect-ratio: auto; object-fit: contain !important; }
@media (min-width: 690px) {
	.bj-qa__panel { display: flex !important; align-items: stretch; width: min(860px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden !important; }
	.bj-qa__media { flex: 0 0 clamp(220px, 40%, 360px); min-width: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; border-right: 1px solid var(--bj-line); }
	.bj-qa__media img { width: 100%; height: auto !important; min-height: 0 !important; max-height: min(100%, 460px); }
	.bj-qa__body { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 689.98px) {
	.bj-qa__panel { max-height: 88vh; max-height: 88dvh; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
	.bj-qa__media { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--bj-line); }
	.bj-qa__media img { width: 100%; height: 100%; min-height: 0; }
	/* the name stays beside the small photo instead of running under it */
	.bj-qa__eyebrow, .bj-qa__title { display: flow-root; }
	/* "− 1 +" and Add to Cart get the whole width under "Quantity" */
	.bj-qa .woocommerce-variation-add-to-cart .ct-cart-actions { flex-basis: 100%; }
}
