/* BDE Tweaks: shopper-facing styles. */

/* Product page gallery: thumbnails down the left on computers, along the bottom on phones */
.bde-gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start; }
.bde-gallery.is-single { grid-template-columns: minmax(0, 1fr); }
.bde-gallery__stage { grid-column: 2; grid-row: 1; position: relative; border-radius: 14px; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; }
.bde-gallery.is-single .bde-gallery__stage { grid-column: 1; }
.bde-gallery__slide { margin: 0; position: absolute; inset: 0; }
.bde-gallery__slide[hidden] { display: none; }
.bde-gallery__slide img,
.bde-gallery__video { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.bde-gallery__zoom { display: block; height: 100%; cursor: zoom-in; }
.bde-gallery__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255, 255, 255, .92); color: #2f2a28; font-size: 28px; line-height: 40px;
	box-shadow: 0 2px 8px rgba(47, 42, 40, .18);
}
.bde-gallery__nav--prev { left: 12px; }
.bde-gallery__nav--next { right: 12px; }
.bde-gallery__nav:hover { background: #fff; color: #b9837d; }
.bde-gallery__thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; }
.bde-gallery__thumb {
	position: relative; flex: 0 0 auto; width: 70px; height: 70px; padding: 0; border: 2px solid transparent;
	border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; opacity: .75;
}
.bde-gallery__thumb img, .bde-gallery__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bde-gallery__thumb.is-active { border-color: #2f2a28; opacity: 1; }
.bde-gallery__thumb:hover, .bde-gallery__thumb:focus-visible { opacity: 1; }
.bde-gallery__thumb.is-video::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
	border-radius: 50%; background: rgba(255, 255, 255, .92)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%232f2a28'/%3E%3C/svg%3E") center / 16px no-repeat;
}
@media (max-width: 781px) {
	.bde-gallery { grid-template-columns: minmax(0, 1fr); }
	.bde-gallery__stage { grid-column: 1; }
	.bde-gallery__thumbs { grid-row: 2; flex-direction: row; max-height: none; overflow-x: auto; }
	.bde-gallery__thumb { width: 62px; height: 62px; }
}
.bde-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(20, 16, 15, .9); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.bde-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.bde-lightbox__close { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 36px; cursor: pointer; }

/* Sale labels */
.bde-pct-off { color: #1e7b34; font-weight: 700; font-size: .9em; white-space: nowrap; }

/* "Adjust thumbnail" framing in product grids */
.bde-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: inherit; }
.bde-thumb img { width: 100% !important; height: 100% !important; }
.wc-block-components-product-image { overflow: hidden; }

/* Multiple pricing table on product pages */
.bde-tier-table { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #e6dad0; border-radius: 12px; background: #fff; max-width: 360px; }
.bde-tier-table__title { margin: 0 0 8px; font-weight: 700; color: #2f2a28; }
.bde-tier-table table { width: 100%; border-collapse: collapse; }
.bde-tier-table td { padding: 5px 0; border-top: 1px solid #f3e3de; }
.bde-tier-table tr:first-child td { border-top: 0; }
.bde-tier-table td:last-child { text-align: right; }
.bde-tier-price { color: #1e7b34; background: #ddf3df; padding: 1px 6px; border-radius: 4px; font-weight: 700; }

/* Shop and category pages: left-hand category list */
.bde-catnav { font-size: 15px; position: sticky; top: 24px; }
.bde-catnav ul { list-style: none; margin: 0; padding: 0; }
.bde-catnav li { margin: 0; }
.bde-catnav a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; border-radius: 8px; text-decoration: none; color: #2f2a28; }
.bde-catnav a:hover { background: #f3e3de; }
.bde-catnav a.is-active { background: #2f2a28; color: #fff; font-weight: 700; }
.bde-catnav a.is-active .bde-catnav__count { color: #f3e3de; }
.bde-catnav__count { color: #8a7f79; font-size: 13px; }
.bde-catnav__title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; margin: 0 0 8px 12px; color: #2f2a28; }
.bde-catnav__back { margin: 0 0 14px; }
.bde-catnav__back a { display: inline; padding: 0 12px; color: #b9837d; font-weight: 600; }
.bde-catnav__sub { margin-left: 12px !important; border-left: 2px solid #f3e3de; }
.bde-catnav__sub a { font-size: 14px; padding: 5px 12px; }
@media (max-width: 781px) {
	.bde-catnav { position: static; }
	.bde-catnav > ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
	.bde-catnav > ul > li > a { white-space: nowrap; border: 1px solid #e6dad0; background: #fff; }
	.bde-catnav__sub { display: none; }
	.bde-catnav__title { margin-left: 0; font-size: 19px; }
}

/* Product page: buying details + "Goes well with" */
.bde-buy-info { list-style: none; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: #f3e3de; max-width: 460px; }
.bde-buy-info__item { position: relative; padding: 4px 0 4px 26px; font-size: 15px; color: #4a403c; }
.bde-buy-info__item::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; background: center / 16px no-repeat; }
.bde-buy-info__item--ship::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2a28' stroke-width='2'%3E%3Cpath d='M3 6h11v9H3zM14 9h4l3 3v3h-7z'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/svg%3E"); }
.bde-buy-info__item--made::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2a28' stroke-width='2'%3E%3Cpath d='M12 21s-7-4.5-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 11c0 5.5-7 10-7 10z'/%3E%3C/svg%3E"); }
.bde-buy-info__item--download::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2a28' stroke-width='2'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.bde-buy-info__item--care::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2a28' stroke-width='2'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E"); }
.bde-buy-info a { color: #2f2a28; font-weight: 700; }
.bde-money-inline { color: #1e7b34; background: #ddf3df; padding: 0 5px; border-radius: 4px; font-weight: 700; }
.bde-goes { margin: 22px 0 0; max-width: 460px; }
.bde-goes__title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: #2f2a28; margin: 0 0 10px; }
.bde-goes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bde-goes__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid #e6dad0; border-radius: 12px; background: #fff; }
.bde-goes__img img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.bde-goes__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bde-goes__name { font-size: 14px; font-weight: 600; color: #2f2a28; text-decoration: none; line-height: 1.3; }
.bde-goes__name:hover { color: #9a5f58; }
.bde-goes__price { font-size: 14px; }
.bde-goes__price .bde-pct-off { display: none; }
.bde-goes__add { white-space: nowrap; font-size: 13px; font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 8px; background: #2f2a28; color: #fff !important; }
.bde-goes__add:hover { background: #9a5f58; }
