/* ==========================================================================
   FILE: assets/css/product-gallery.css
   PURPOSE: Styling for the custom single-product gallery
   (template-parts/product/gallery.php).
   FIX: side padding added around .dc-pg on mobile so the image doesn't
   touch the screen edges.
   FIX: arrow buttons (.dc-pg__arrow) no longer have a circle/border —
   plain arrow glyph only, with a soft white text-shadow so it stays
   visible over any part of the photo.
   FIX: zoom button icon now renders properly (standard magnifying-glass
   path) instead of showing as a blank circle.
   Added: .dc-pg__wish — wishlist heart button, top-right of the main
   image (site-wide wishlist look: white circle, black border/heart,
   filled black when active via the ".is-active" class the global
   wishlist script adds).
   White background / black text / black borders, no colour anywhere.
   HTML: template-parts/product/gallery.php | JS: assets/js/product-gallery.js
   ========================================================================== */

.dc-pg {
	width: 100%;
	padding: 0 14px;
	box-sizing: border-box;
}

.dc-pg__main {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	background: #fff;
	border: 1px solid #000;
	border-radius: 6px;
	overflow: hidden;
}

.dc-pg__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.dc-pg__slide.is-active { opacity: 1; visibility: visible; }

/* FIX: image now ALWAYS fills the whole box (no white side/bottom gaps).
   WooCommerce / GeneratePress have "img { height:auto; max-width:100% }" rules
   with higher specificity that were overriding the plain .dc-pg__img rule —
   the longer selector + !important below win over them. */
.dc-pg__img,
.dc-pg .dc-pg__slide img,
.woocommerce div.product .dc-pg__slide img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* ---------- arrows: plain glyph only, no circle/box ---------- */
.dc-pg__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #000;
	font-size: 34px;
	line-height: 1;
	padding: 6px 8px;
	cursor: pointer;
	z-index: 2;
	text-shadow: 0 0 5px #fff, 0 0 10px #fff;
}
.dc-pg__arrow--prev { left: 4px; }
.dc-pg__arrow--next { right: 4px; }
.dc-pg__arrow:active { transform: translateY(-50%) scale(.88); }

/* ---------- wishlist heart, top-right ---------- */
.dc-pg__wish {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #000;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	padding: 0;
}
.dc-pg__wish svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #000;
	stroke-width: 1.6;
}
.dc-pg__wish.is-active svg { fill: #000; stroke: #000; }

/* ---------- zoom button, bottom-right ---------- */
.dc-pg__zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #000;
	background: #fff;
	color: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.dc-pg__zoom svg { width: 18px; height: 18px; fill: currentColor; }

.dc-pg__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.dc-pg__thumbs::-webkit-scrollbar { display: none; }

.dc-pg__thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 80px;
	padding: 0;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
}
.dc-pg__thumb.is-active { border-color: #000; border-width: 2px; }
.dc-pg__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- full-screen lightbox ---------- */
.dc-pg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.dc-pg-lightbox[hidden] { display: none; }

.dc-pg-lightbox__img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
}



.dc-pg-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #000;
	background: #fff;
	color: #000;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}


.dc-pg-lightbox__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #000;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
	text-shadow: 0 0 5px #fff, 0 0 10px #fff;
}
.dc-pg-lightbox__arrow--prev { left: 16px; }
.dc-pg-lightbox__arrow--next { right: 16px; }

@media (min-width: 900px) {
	.dc-pg { padding: 0; }
	.dc-pg__thumbs { margin-top: 14px; }
	.dc-pg__thumb { flex: 0 0 76px; width: 76px; height: 94px; }
}