/**
 * RDW Product Gallery Slider — styling.
 * Everything is driven by CSS variables on .rdw-gallery so the Elementor
 * controls can retheme it fully (size, colours, borders, arrows, dots).
 */

.rdw-gallery{
	position:relative;
	width:100%;
	max-width:var(--rdw-max-width,560px);
	margin:var(--rdw-align,0);
}
.rdw-gallery--outside-full{ padding:0 calc(var(--rdw-arrow-size,44px) + 12px); }

/* ---- Main image ---- */
.rdw-gallery__main{
	position:relative;
	border:var(--rdw-border-width,2px) solid var(--rdw-border-color,#1c3d5a);
	border-radius:var(--rdw-radius,10px);
	overflow:hidden;
	background:var(--rdw-main-bg,#fff);
	aspect-ratio:var(--rdw-aspect,4 / 3);
	box-shadow:var(--rdw-main-shadow,none);
}
.rdw-gallery__track{
	display:flex;
	height:100%;
	transition:transform var(--rdw-speed,.35s) ease;
}
.rdw-gallery__slide{
	min-width:100%;
	height:100%;
	display:flex;
	align-items:center;
	justify-content:center;
	background:var(--rdw-main-bg,#fff);
}
.rdw-gallery__slide img{
	width:100%;
	height:100%;
	object-fit:var(--rdw-fit,cover);
	padding:var(--rdw-img-pad,0);
}

/* ---- Thumbnails ---- */
.rdw-gallery__thumbs{
	display:flex;
	gap:var(--rdw-thumb-gap,10px);
	margin-top:var(--rdw-thumb-margin,12px);
	overflow-x:auto;
	padding-bottom:4px;
}
.rdw-gallery__thumb{
	flex:0 0 auto;
	width:var(--rdw-thumb-w,74px);
	height:var(--rdw-thumb-h,74px);
	border-radius:var(--rdw-thumb-radius,8px);
	border:var(--rdw-thumb-border-w,2px) solid var(--rdw-thumb-border,#d8dde1);
	overflow:hidden;
	cursor:pointer;
	padding:0;
	background:#fff;
	transition:border-color .2s ease, transform .15s ease;
}
.rdw-gallery__thumb:hover{ transform:translateY(-2px); }
.rdw-gallery__thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.rdw-gallery__thumb.is-active{ border-color:var(--rdw-thumb-active,#1c3d5a); }

/* ---- Dots ---- */
.rdw-gallery__dots{
	display:flex;
	justify-content:center;
	gap:var(--rdw-dot-gap,8px);
	margin-top:var(--rdw-dot-margin,12px);
}
.rdw-gallery__dot{
	width:var(--rdw-dot-size,10px);
	height:var(--rdw-dot-size,10px);
	border-radius:50%;
	border:none;
	padding:0;
	cursor:pointer;
	background:var(--rdw-dot-color,#d8dde1);
	transition:background .2s ease, transform .2s ease;
}
.rdw-gallery__dot.is-active{ background:var(--rdw-dot-active,#1c3d5a); transform:scale(1.25); }

/* ---- Arrows (base, themeable across all layouts) ---- */
.rdw-arrow{
	border:none;
	background:var(--rdw-arrow-bg,transparent);
	cursor:pointer;
	color:var(--rdw-arrow-color,#1c3d5a);
	display:flex;
	align-items:center;
	justify-content:center;
	padding:0;
	border-radius:var(--rdw-arrow-radius,0);
	transition:opacity .2s ease, transform .15s ease, background .2s ease, color .2s ease;
	opacity:.85;
}
.rdw-arrow:hover{
	opacity:1;
	transform:scale(1.08);
	background:var(--rdw-arrow-hover-bg,var(--rdw-arrow-bg,transparent));
	color:var(--rdw-arrow-hover,var(--rdw-arrow-color,#1c3d5a));
}
/* Mouse users: no lingering focus background/outline on the nav controls after
   a click (the JS also blurs them). Keyboard focus keeps a ring for a11y. */
.rdw-gallery .rdw-arrow:focus:not(:focus-visible),
.rdw-gallery .rdw-gallery__thumb:focus:not(:focus-visible),
.rdw-gallery .rdw-gallery__dot:focus:not(:focus-visible){
	outline:none;
	box-shadow:none;
	background:var(--rdw-arrow-bg,transparent);
}
.rdw-gallery .rdw-gallery__thumb:focus:not(:focus-visible),
.rdw-gallery .rdw-gallery__dot:focus:not(:focus-visible){ background:transparent; }
.rdw-arrow svg{ width:62%; height:62%; }

/* Layout: outside-full */
.rdw-gallery--outside-full .rdw-arrow{
	position:absolute;
	top:0; bottom:0; margin:auto;
	width:var(--rdw-arrow-size,44px);
	height:var(--rdw-arrow-size,44px);
}
.rdw-gallery--outside-full .rdw-arrow--prev{ left:0; }
.rdw-gallery--outside-full .rdw-arrow--next{ right:0; }

/* Layout: overlay */
.rdw-gallery--overlay .rdw-arrow{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:var(--rdw-arrow-size,38px);
	height:var(--rdw-arrow-size,38px);
	border-radius:var(--rdw-arrow-radius,50%);
	background:var(--rdw-arrow-bg,rgba(255,255,255,.9));
	box-shadow:0 2px 6px rgba(0,0,0,.15);
	opacity:1;
}
.rdw-gallery--overlay .rdw-arrow:hover{ background:var(--rdw-arrow-hover-bg,#fff); transform:translateY(-50%) scale(1.05); }
.rdw-gallery--overlay .rdw-arrow--prev{ left:10px; }
.rdw-gallery--overlay .rdw-arrow--next{ right:10px; }
.rdw-gallery--overlay .rdw-arrow svg{ width:16px; height:16px; margin:auto; }

/* Layout: thumb-row */
.rdw-gallery--thumbrow .rdw-thumbrow-wrap{
	display:flex;
	align-items:center;
	gap:10px;
	margin-top:12px;
}
.rdw-gallery--thumbrow .rdw-gallery__thumbs{ margin-top:0; flex:1; }
.rdw-gallery--thumbrow .rdw-arrow{
	width:var(--rdw-arrow-size,28px);
	height:var(--rdw-arrow-size,28px);
	flex:0 0 auto;
}

/* ================= Hover magnify ================= */
.rdw-gallery--zoom .rdw-gallery__main{ cursor:zoom-in; }
.rdw-gallery--zoom .rdw-gallery__slide img{
	transition:transform .12s ease-out;
	will-change:transform;
}

/* ================= Lightbox (click to zoom) ================= */
.rdw-gallery__main--zoomable{ cursor:zoom-in; }

body.rdw-lightbox-open{ overflow:hidden; }

.rdw-lightbox{
	position:fixed;
	inset:0;
	z-index:99999;
	display:none;
	align-items:center;
	justify-content:center;
}
.rdw-lightbox.is-open{ display:flex; }
.rdw-lightbox__backdrop{
	position:absolute;
	inset:0;
	background:rgba(12,18,26,.9);
	cursor:zoom-out;
	animation:rdwLbFade .18s ease;
}
@keyframes rdwLbFade{ from{ opacity:0; } to{ opacity:1; } }

.rdw-lightbox__figure{
	position:relative;
	margin:0;
	max-width:92vw;
	max-height:90vh;
	z-index:1;
	display:flex;
	animation:rdwLbZoom .2s ease;
}
@keyframes rdwLbZoom{ from{ transform:scale(.96); opacity:0; } to{ transform:scale(1); opacity:1; } }
.rdw-lightbox__img{
	max-width:92vw;
	max-height:90vh;
	width:auto;
	height:auto;
	object-fit:contain;
	border-radius:6px;
	box-shadow:0 12px 40px rgba(0,0,0,.5);
}

.rdw-lightbox__close{
	position:absolute;
	top:18px;
	right:22px;
	z-index:2;
	width:44px;
	height:44px;
	border:0;
	border-radius:50%;
	background:rgba(255,255,255,.12);
	color:#fff;
	font-size:30px;
	line-height:1;
	cursor:pointer;
	transition:background .15s ease;
}
.rdw-lightbox__close:hover{ background:rgba(255,255,255,.28); }

.rdw-lightbox__nav{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	z-index:2;
	width:52px;
	height:52px;
	border:0;
	border-radius:50%;
	background:rgba(255,255,255,.12);
	color:#fff;
	cursor:pointer;
	display:flex;
	align-items:center;
	justify-content:center;
	transition:background .15s ease;
}
.rdw-lightbox__nav:hover{ background:rgba(255,255,255,.28); }
.rdw-lightbox__nav svg{ width:24px; height:24px; }
.rdw-lightbox__nav--prev{ left:20px; }
.rdw-lightbox__nav--next{ right:20px; }

.rdw-lightbox__counter{
	position:absolute;
	bottom:22px;
	left:50%;
	transform:translateX(-50%);
	z-index:2;
	color:#fff;
	font-size:14px;
	letter-spacing:.03em;
	background:rgba(0,0,0,.35);
	padding:4px 12px;
	border-radius:20px;
}

/* Single-image lightbox: no arrows or counter */
.rdw-lightbox--single .rdw-lightbox__nav,
.rdw-lightbox--single .rdw-lightbox__counter{ display:none; }

@media (max-width:600px){
	.rdw-lightbox__nav{ width:42px; height:42px; }
	.rdw-lightbox__nav--prev{ left:8px; }
	.rdw-lightbox__nav--next{ right:8px; }
	.rdw-lightbox__close{ top:10px; right:12px; }
}
