/* Elegant — enhancements: sticky header, lightbox, quick-view, wishlist,
   predictive search, currency switcher, breadcrumbs. */

/* ============================================================
   1) STICKY HEADER
   ============================================================ */
body.header-sticky .shopify-section.page-header {
	position: sticky; top: 0; z-index: 5600;
}
/* Homepage: transparent over hero, then fixed + solid once scrolled past it. */
body.template-index.header-stuck .theme__header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 5600;
	background: var(--COLOR-BG, #fbfbf9);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 24px rgba(0, 0, 0, .05);
	animation: elegant-header-drop .38s cubic-bezier(.22, .61, .36, 1);
}
@keyframes elegant-header-drop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
body.header-sticky .shopify-section.page-header .theme__header { box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }

/* ============================================================
   2) GALLERY LIGHTBOX
   ============================================================ */
.elegant-lightbox {
	position: fixed; inset: 0; z-index: 7000; display: none;
	align-items: center; justify-content: center; gap: 8px;
	background: rgba(14, 13, 11, .92); padding: 5vh 4vw;
}
.elegant-lightbox.is-open { display: flex; }
.elegant-lightbox__figure { margin: 0; max-width: 88vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.elegant-lightbox__figure img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.elegant-lightbox__close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; opacity: .85; }
.elegant-lightbox__close:hover { opacity: 1; }
.elegant-lightbox__nav { background: none; border: 0; color: #fff; font-size: 46px; line-height: 1; cursor: pointer; opacity: .7; padding: 0 10px; flex: 0 0 auto; }
.elegant-lightbox__nav:hover { opacity: 1; }
.elegant-lightbox__count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-family: "Jost", sans-serif; font-size: 12px; letter-spacing: .1em; }
body.elegant-modal-open { overflow: hidden; }
@media (max-width: 749px) { .elegant-lightbox__nav { font-size: 34px; padding: 0 2px; } .elegant-lightbox { padding: 8vh 2vw; } }

/* ============================================================
   3) QUICK VIEW MODAL
   ============================================================ */
.elegant-quickview { position: fixed; inset: 0; z-index: 7000; display: none; }
.elegant-quickview.is-open { display: block; }
.elegant-quickview__overlay { position: absolute; inset: 0; background: rgba(20, 18, 14, .45); }
.elegant-quickview__dialog {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: min(860px, 92vw); max-height: 88vh; overflow: auto;
	background: var(--COLOR-BG, #fbfbf9); box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
.elegant-quickview__close { position: absolute; top: 12px; right: 14px; z-index: 2; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: inherit; opacity: .7; }
.elegant-quickview__close:hover { opacity: 1; }
.elegant-quickview__body { display: grid; grid-template-columns: 1fr 1fr; min-height: 320px; }
.elegant-quickview__loading { grid-column: 1 / -1; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.elegant-quickview__loading::after { content: ""; width: 28px; height: 28px; border: 2px solid rgba(0,0,0,.15); border-top-color: #1a1a1a; border-radius: 50%; animation: elegant-spin .6s linear infinite; }
.quickview__media { background: #f1efe9; }
.quickview__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quickview__info { padding: 40px 38px; display: flex; flex-direction: column; }
.quickview__title { font-family: "EB Garamond", serif; font-size: 26px; font-weight: 400; margin: 0 0 .3em; }
.quickview__title a { color: inherit; text-decoration: none; }
.quickview__price { font-family: "Jost", sans-serif; font-size: 18px; margin-bottom: 16px; }
.quickview__desc { font-size: 14px; line-height: 1.6; opacity: .85; margin-bottom: 22px; }
.quickview__actions { display: flex; align-items: stretch; gap: 12px; margin-top: auto; }
.quickview__qty { display: inline-flex; align-items: center; border: 1px solid rgba(0,0,0,.22); }
.quickview__qty .qty-btn { width: 36px; height: 50px; background: none; border: 0; cursor: pointer; font-size: 16px; }
.quickview__qty [data-qv-qty] { min-width: 34px; text-align: center; font-family: "Jost", sans-serif; }
.quickview__add { flex: 1 1 auto; background: var(--BTN-PRIMARY-BG, #000); color: var(--BTN-PRIMARY-TEXT, #fff); border: 0; min-height: 50px; padding: 0 22px; cursor: pointer;
	font-family: "EB Garamond", serif; font-style: italic; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.quickview__add:hover { opacity: .88; }
.quickview__add.loading { opacity: .6; pointer-events: none; }
.quickview__full-link { margin-top: 16px; font-family: "Jost", sans-serif; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: 3px; }
@media (max-width: 749px) {
	.elegant-quickview__body { grid-template-columns: 1fr; }
	.quickview__media { aspect-ratio: 4/3; }
	.quickview__info { padding: 26px 22px 30px; }
}

/* ============================================================
   4) WISHLIST
   ============================================================ */
.product-item__image { position: relative; }
.elegant-wishlist-btn {
	position: absolute; top: 12px; right: 12px; z-index: 3;
	width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255, 255, 255, .82); color: #1a1a1a; backdrop-filter: blur(2px);
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
	transition: background .2s ease, transform .2s ease;
}
.elegant-wishlist-btn:hover { background: #fff; transform: scale(1.06); }
.elegant-wishlist-btn svg { width: 19px; height: 19px; }
/* generic filled/outline toggle for any wishlist button (card + PDP) */
[data-wishlist-toggle] .elegant-wishlist-btn__o,
[data-wishlist-toggle] .elegant-wishlist-btn__f { display: inline-flex; line-height: 0; }
[data-wishlist-toggle] .elegant-wishlist-btn__f { display: none; color: var(--BTN-SECONDARY-BG, #ab8c52); }
[data-wishlist-toggle].is-active .elegant-wishlist-btn__o { display: none; }
[data-wishlist-toggle].is-active .elegant-wishlist-btn__f { display: inline-flex; }

/* PDP "Add to wishlist" text button */
.elegant-pdp-wishlist {
	display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer;
	padding: 14px 0 0; margin: 6px 0 0; color: inherit;
	font-family: "Jost", sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.elegant-pdp-wishlist svg { width: 18px; height: 18px; }
.elegant-pdp-wishlist:hover { opacity: .75; }

/* Quick-view button: revealed on card hover, centered over the image */
.elegant-quickview-btn {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) translateY(8px); z-index: 3;
	background: rgba(255, 255, 255, .94); color: #1a1a1a; border: 0; cursor: pointer;
	font-family: "Jost", sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
	padding: 12px 22px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; white-space: nowrap;
}
.product-item:hover .elegant-quickview-btn { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
@media (hover: none) { .elegant-quickview-btn { display: none; } } /* touch: tap card instead */

/* Header wishlist link + count */
.navlink--wishlist { position: relative; display: inline-flex; align-items: center; }
.navlink--wishlist svg { width: 22px; height: 22px; }
.wishlist-count {
	position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--BTN-SECONDARY-BG, #ab8c52); color: #fff; border-radius: 50%;
	font-family: "Jost", sans-serif; font-size: 10px; line-height: 1;
}
.wishlist-count.is-empty { display: none; }

/* Wishlist page */
.elegant-wishlist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; margin-top: 20px; }
.elegant-wishlist-card { position: relative; }
.elegant-wishlist-card__media { display: block; aspect-ratio: 5/6; overflow: hidden; background: #f1efe9; }
.elegant-wishlist-card__media img { width: 100%; height: 100%; object-fit: cover; }
.elegant-wishlist-card__remove { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); cursor: pointer; font-size: 18px; line-height: 1; }
.elegant-wishlist-card__title { display: block; margin-top: 12px; font-family: "EB Garamond", serif; font-size: 16px; color: inherit; text-decoration: none; }
.elegant-wishlist-card__price { font-family: "Jost", sans-serif; font-size: 14px; opacity: .8; margin-top: 4px; }
.elegant-wishlist-empty { padding: 40px 0; font-family: "EB Garamond", serif; font-size: 18px; }
@media (max-width: 989px) { .elegant-wishlist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 749px)  { .elegant-wishlist-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }

/* ============================================================
   5) PREDICTIVE SEARCH RESULTS (inside search drawer)
   ============================================================ */
.search-drawer__results { max-width: 1100px; margin: 0 auto; padding: 0 28px; max-height: 60vh; overflow-y: auto; display: none; }
.search-drawer__results.is-open { display: block; padding-bottom: 24px; }
.search-drawer__list { list-style: none; margin: 0; padding: 0; }
.search-drawer__result { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.07); text-decoration: none; color: inherit; }
.search-drawer__result-img { flex: 0 0 54px; width: 54px; height: 66px; background: #f1efe9; overflow: hidden; }
.search-drawer__result-img img { width: 100%; height: 100%; object-fit: cover; }
.search-drawer__result-title { display: block; font-family: "EB Garamond", serif; font-size: 17px; }
.search-drawer__result-price { display: block; font-family: "Jost", sans-serif; font-size: 13px; opacity: .7; margin-top: 2px; }
.search-drawer__all { display: inline-block; margin-top: 16px; font-family: "Jost", sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
.search-drawer__empty { padding: 18px 0; font-family: "Jost", sans-serif; opacity: .6; }
@media (max-width: 749px) { .search-drawer__results { padding: 0 18px; } }

/* ============================================================
   6) CURRENCY SWITCHER
   ============================================================ */
.elegant-currency { display: inline-flex; align-items: center; }
.elegant-currency__select {
	border: 0; background: transparent; color: inherit; cursor: pointer;
	font-family: var(--FONT-STACK-NAV, "EB Garamond", serif); font-size: 15px;
	-webkit-appearance: none; appearance: none; padding: 0 16px 0 0; line-height: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right center;
}
.elegant-currency__select:focus { outline: none; }

/* ============================================================
   7) BREADCRUMBS
   ============================================================ */
.elegant-breadcrumb { font-family: "Jost", sans-serif; font-size: 12.5px; letter-spacing: .02em; padding: 18px 0 0; }
.elegant-breadcrumb a { color: inherit; opacity: .6; text-decoration: none; }
.elegant-breadcrumb a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.elegant-breadcrumb__sep { margin: 0 8px; opacity: .4; }
/* PDP breadcrumb sits inside the summary column, above the title (no gallery gap). */
.elegant-breadcrumb--pdp { padding: 0; margin: 0 0 18px; }
@media (max-width: 749px) { .elegant-breadcrumb--pdp { margin: 0 0 12px; } }

/* ============================================================
   8) SHOP FILTER DRAWER (left slide-out)
   ============================================================ */
.collection-toolbar__filter-btn { position: relative; }
.collection-toolbar__filter-count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; margin-left: 7px; padding: 0 5px; box-sizing: border-box;
	background: #000; color: #fff; border-radius: 50%; font-family: "Jost", sans-serif; font-size: 11px; line-height: 1;
}
.filter-drawer-overlay {
	position: fixed; inset: 0; background: rgba(20, 18, 14, .38);
	opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; z-index: 5990;
}
.filter-drawer-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.filter-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; width: 380px; max-width: 90vw; z-index: 5991;
	background: var(--COLOR-BG, #fbfbf9); color: var(--COLOR-TEXT, #1a1a1a);
	display: flex; flex-direction: column; transform: translateX(-100%);
	transition: transform .4s cubic-bezier(.22, .61, .36, 1); box-shadow: 18px 0 50px rgba(0, 0, 0, .12);
}
.filter-drawer.is-open { transform: translateX(0); }
.filter-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 22px 26px; border-bottom: 1px solid rgba(0, 0, 0, .1); flex: 0 0 auto;
}
.filter-drawer__title { font-family: "EB Garamond", serif; font-size: 21px; letter-spacing: .02em; }
.filter-drawer__close { background: none; border: 0; cursor: pointer; color: inherit; padding: 4px; margin: -4px; line-height: 0; }
.filter-drawer__close svg { width: 22px; height: 22px; stroke-width: 1; }
.filter-drawer__form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

.filter-group { border-bottom: 1px solid rgba(0, 0, 0, .08); }
.filter-group:first-of-type { border-top: 0; }
.filter-group__title {
	display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
	padding: 20px 26px; font-family: "EB Garamond", serif; font-size: 17px;
}
.filter-group__title::-webkit-details-marker { display: none; }
.filter-group__title svg { transition: transform .25s ease; opacity: .6; }
.filter-group[open] .filter-group__title svg { transform: rotate(180deg); }
.filter-group__body { padding: 0 26px 22px; }
.filter-group:not([open]) .filter-group__body { display: none; }

.filter-check { display: flex; align-items: center; gap: 11px; padding: 7px 0; cursor: pointer; font-family: "Jost", sans-serif; font-size: 14px; }
.filter-check input { width: 17px; height: 17px; accent-color: var(--BTN-SECONDARY-BG, #ab8c52); flex: 0 0 auto; }
.filter-check em { font-style: normal; opacity: .45; }

.filter-price { display: flex; align-items: flex-end; gap: 10px; }
.filter-price__field { flex: 0 0 140px; width: 140px; display: flex; flex-direction: column; gap: 5px; font-family: "Jost", sans-serif; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.filter-price__field input { border: 1px solid rgba(0, 0, 0, .22); background: #fff; padding: 11px 12px; font-size: 14px; font-family: "Jost", sans-serif; border-radius: 0; -moz-appearance: textfield; }
.filter-price__field input::-webkit-outer-spin-button, .filter-price__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-price__dash { padding-bottom: 12px; opacity: .5; }

.filter-drawer__foot { margin-top: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 16px; padding: 18px 26px 26px; border-top: 1px solid rgba(0, 0, 0, .1); }
.filter-clear { font-family: "Jost", sans-serif; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; color: inherit; }
.filter-apply {
	flex: 1 1 auto; background: var(--BTN-PRIMARY-BG, #000); color: var(--BTN-PRIMARY-TEXT, #fff); border: 0; cursor: pointer; min-height: 52px; padding: 0 22px;
	font-family: "EB Garamond", serif; font-style: italic; font-size: 16px; transition: opacity .2s ease;
}
.filter-apply:hover { opacity: .88; }

/* ============================================================
   MOBILE PRODUCT CARD — clean like the live storefront
   (image + badge + title + price; no hover/overlay clutter)
   ============================================================ */
@media (max-width: 749px) {
	/* hide overlays that don't work on touch — keep quick-add (shown as "+" below image) */
	.product-item .elegant-quickview-btn,
	.product-item .elegant-wishlist-btn { display: none !important; }
}

/* ============================================================
   QUICK VIEW — real WC add-to-cart form (variations + qty + add)
   ============================================================ */
.quickview__form { margin-top: 4px; }
.quickview__form .variations { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 14px; }
.quickview__form .variations tr { display: block; margin-bottom: 12px; }
.quickview__form .variations td, .quickview__form .variations th { display: block; padding: 0; border: 0; text-align: left; }
.quickview__form .variations th.label { font-family: "EB Garamond", serif; font-weight: 500; font-size: 14px; margin: 0 0 6px; }
.quickview__form .variations select { width: 100%; padding: 11px 12px; border: 1px solid rgba(0,0,0,.22); background: #fff; border-radius: 0; font-size: 14px; font-family: "Jost", sans-serif; }
.quickview__form .reset_variations { display: inline-block; font-size: 12px; opacity: .7; margin-top: 4px; }
.quickview__form .woocommerce-variation-price { margin: 4px 0 12px; font-size: 16px; }
.quickview__form .woocommerce-variation-availability { margin-bottom: 8px; font-size: 13px; }
.quickview__form form.cart:not(.variations_form),
.quickview__form .woocommerce-variation-add-to-cart { display: flex; gap: 10px; align-items: stretch; flex-wrap: nowrap; width: 100%; }
.quickview__form .quantity { display: inline-flex; align-items: stretch; border: 1px solid rgba(0,0,0,.22); flex: 0 0 auto; }
.quickview__form .quantity .qty { width: 46px; text-align: center; border: 0; background: transparent; font-size: 14px; -moz-appearance: textfield; }
.quickview__form .quantity .qty::-webkit-outer-spin-button, .quickview__form .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quickview__form .single_add_to_cart_button,
.quickview__form button.button.alt {
	flex: 1 1 0%; min-width: 0; white-space: nowrap; background: var(--BTN-PRIMARY-BG, #000) !important; color: var(--BTN-PRIMARY-TEXT, #fff) !important;
	border: 0 !important; border-radius: 0 !important; min-height: 48px; padding: 0 18px !important; cursor: pointer;
	font-family: "EB Garamond", serif; font-style: italic; font-size: 15px !important; text-transform: none !important; box-shadow: none !important;
}
.quickview__form .single_add_to_cart_button.loading { opacity: .6; pointer-events: none; }
.quickview__form .single_add_to_cart_button.disabled, .quickview__form .single_add_to_cart_button.wc-variation-selection-needed { opacity: .45; }
.quickview__oos { color: #c0392b; font-family: "Jost", sans-serif; font-size: 13px; margin: 0 0 12px; }
/* swatch pills inside the modal inherit swatches.css; just ensure spacing */
.quickview__form .elegant-swatches { margin-top: 2px; }
