/*──────────────────────────────────────────────────────────────
  BEFORE & AFTER GALLERY – PUBLIC STYLES
  ----------------------------------------------------------------
  Change --bag-accent below to update every gold highlight.
  ──────────────────────────────────────────────────────────────*/
:root {
	--bag-accent: #fcca64;
}


/* ═════════════════════ Layout ═════════════════════ */
.bag-wrapper {
	display: flex;
	gap: 40px;
	margin-top: 20px;
}
.bag-filters {
	width: 240px;
	flex-shrink: 0;
}
@media (max-width: 768px) {
	.bag-wrapper {
		flex-direction: column;
	}
	.bag-filters {
		width: 100%;
	}
}


/* ═════════════════════ Gallery grid ═════════════════════ */
.bag-grid {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
	grid-auto-flow: dense;
	height: 0;
}

/* thumbs ------------------------------------------------- */
.bag-thumb {
	position: relative;
	display: block;
	width: 100%!important;
}
.bag-thumb .bag-arrow {
	display: none;
}
.bag-thumb__pair {
	display: flex;
	width: 100%;
	aspect-ratio: 3/2;
	overflow: hidden;
	border-radius: 25px;
	cursor: pointer;
}
.bag-img {
	flex: 0 0 50%;
	width: 50%;
	min-width: 0;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.bag-img--before {
	border-right: 2px solid #fff;
}
@media (max-width: 380px) {
	.bag-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.bag-thumb {
		width: 100%;
	}
	.bag-thumb__pair {
		flex-direction: column;
		aspect-ratio: auto;
	}
	.bag-img {
		flex: 0 0 auto;
		width: 100%;
		height: auto;
	}
	.bag-img--before {
		border-right: 0;
		border-bottom: 2px solid #fff;
	}
}


/* ═════════════════════ Filter cards (plugin output) ═════════════════════ */
.bag-card {
	border: 1px solid #ddd;
	border-radius: 6px;
	margin-bottom: 20px;
}
.bag-card-toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 12px 16px;
	font-weight: 600;
	background: #fff;
	border: 0;
	cursor: pointer;
}
.bag-card-body {
	padding: 0 16px 12px;
}
.bag-card:not(.open) .bag-card-body {
	display: none;
}


/* ═════════════════════ Pagination ═════════════════════ */
.bag-wrapper .pagination,
.bag-wrapper ul.page-numbers {
	margin: 30px auto 0;
	text-align: center
}
.bag-wrapper .page-numbers li {
	display: inline-block;
	margin: 0 4px;
}
.bag-wrapper .page-numbers a,
.bag-wrapper .page-numbers span {
	display: inline-block;
	padding: 4px 9px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
}
.bag-wrapper .current {
	background: #000;
	color: #fff;
	border-color: #000;
}


/* ═════════════════════ Modal ═════════════════════ */
.bag-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .6);
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
}
.bag-modal[aria-hidden="false"] {
	opacity: 1;
	pointer-events: auto;
}
.bag-modal__overlay {
	position: fixed;
	inset: 0;
	z-index: 1;
}
.bag-modal__dialog {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 8px;
	width: 90vw;
	max-width: 900px;
	max-height: 90vh;
	padding: 24px;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.bag-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	color: #000;
}
.bag-modal__title {
	margin: 0 0 10px;
	text-align: center;
	font-weight: 600;
	font-size: clamp(18px, 4vw, 28px);
	line-height: 1.25;
	overflow-wrap: anywhere;
	word-wrap: break-word;
}
.bag-modal__images,
.bag-modal__image-pair {
	display: flex;
	gap: 12px;
	padding: 12px;
	overflow: visible;
	box-sizing: border-box;
}
.bag-modal__images figure,
.bag-modal__image-pair figure {
	flex: 1;
	margin: 0;
	position: relative;
}
.bag-modal__images figcaption,
.bag-modal__image-pair figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	padding: 4px 0;
	text-align: center;
	font-size: 14px;
}
/* Style for the MAIN before/after images in the modal */
.bag-modal__images img {
	max-width: 100%;
	max-height: 60vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	display: block;
	margin: 0 auto;
}
/* Style for the ADDITIONAL images in the pairs below */
.bag-modal__image-pair img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}
.bag-modal__prev,
.bag-modal__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	font-size: 60px;
	line-height: 1;
	color: var(--bag-accent);
	cursor: pointer;
	padding: 10px;
}
.bag-modal__prev {
	left: 5px;
}
.bag-modal__next {
	right: 5px;
}
/* Meta block inside modal */
.bag-modal__meta {
	margin: 0.5rem 0 1rem;
	font-size: 15px;
	text-align: center;
	line-height: 1.4
}
.bag-modal__meta p {
	margin: 0;
}
/* Styles for Additional Images in Modal */
.bag-modal__extra-images {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ═════════════════════ Mobile & Landscape Modal Styles ═════════════════════ */
@media (max-width: 600px) {
	.bag-modal__dialog {
		width: 94vw;
		padding: 12px;
	}
	.bag-modal__title {
		font-size: 18px;
	}
	.bag-modal__images,
	.bag-modal__image-pair {
		flex-direction: column;
		align-items: center;
	}
	.bag-modal__meta {
		font-size: 13px;
	}
	.bag-modal__prev,
	.bag-modal__next {
		display: none;
	}
	
}
@media (max-height: 500px) and (orientation: landscape) {
	.bag-modal__images,
	.bag-modal__image-pair {
		flex-direction: row;
	}
	.bag-modal__dialog {
		width: 95vw;
		max-width: 1200px;
	}
	.bag-modal__prev,
	.bag-modal__next {
		font-size: 35px;
		transform: translateY(-70%);
	}
}


/* ═════════════════════ Filter Buttons ═════════════════════ */
.bag-sex-buttons,
.bag-age-buttons,
.bag-proc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
}
.bag-age-buttons {
	gap: 18px;
}
.bag-sex-btn,
.bag-age-btn,
.bag-proc-btn {
	position: relative;
	display: inline-flex;
}
.bag-sex-btn input,
.bag-age-btn input,
.bag-proc-btn input {
	position: absolute;
	clip: rect(0 0 0 0);
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.bag-sex-btn span,
.bag-proc-btn span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	min-width: 90px;
	border: 2px solid #000;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	background: #fff;
	color: #000;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s;
}
.bag-age-btn span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 55px;
	height: 55px;
	border: 3px solid #000;
	border-radius: 50%;
	font-weight: 700;
	background: #fff;
	color: #000;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.bag-sex-btn:hover span,
.bag-age-btn:hover span,
.bag-proc-btn:hover span {
	background: var(--bag-accent);
	border-color: var(--bag-accent);
	color: #000;
}
.bag-sex-btn.is-active span,
.bag-age-btn.is-active span,
.bag-proc-btn.is-active span {
	background: #000;
	border-color: #000;
	color: #fff;
}
.bag-sex-btn.is-active:hover span,
.bag-age-btn.is-active:hover span,
.bag-proc-btn.is-active:hover span {
	background: var(--bag-accent);
	border-color: var(--bag-accent);
	color: #000;
}


/* ═════════════════════ Share Button & Other ═════════════════════ */
/* ═════════════════════ Modal Action Buttons ═════════════════════ */

/* Container to hold both buttons */
.bag-modal__actions {
	display: flex;
	justify-content: space-between; /* This pushes the buttons to opposite ends */
	align-items: center;
	margin-top: 24px;
}

/* Styles for BOTH buttons */
.bag-modal__share,
.bag-modal__learn-more {
	display: inline-block;
	width: auto; /* Let button be as wide as its text */
	border: 2px solid var(--bag-accent);
	padding: 10px 25px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s;
	background-color: var(--bag-accent);
	color: #000;
	text-decoration: none; /* In case it's a link */
	width:50%;
	margin:10px;
}

/* Hover style for BOTH buttons */
.bag-modal__share:hover,
.bag-modal__learn-more:hover {
	background-color: #000;
	border-color: #000;
	color: #fff;
}

/* ═════════════════════ Single Case Page Layout ═════════════════════ */

/* This creates the main two-column wrapper */
.bag-single-case-wrapper {
	display: flex;
	gap: 40px; /* Space between sidebar and gallery */
	margin-top: 30px;
	align-items: flex-start;
}

/* This styles the left sidebar */
.bag-single-case__sidebar {
	width: 300px;
	flex-shrink: 0;
	/* Sticky position to keep sidebar in view on scroll */
	position: -webkit-sticky;
	position: sticky;
	top: 50px; /* Adjust this value based on your theme's header height */
}

/* This styles the right-side gallery container */
.bag-single-case__gallery {
	flex: 1; /* Allows the gallery to take up the remaining space */
	display: flex;
	flex-direction: column;
	gap: 30px; /* Space between each before/after image pair */
}

/* Style for the main title */
.bag-single-case__title {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: clamp(28px, 4vw, 36px);
	line-height: 1.2;
}

/* Style for the container of the meta details */
.bag-single-case__meta {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.bag-single-case__meta p {
	margin: 0.6em 0;
	font-size: 16px;
	color: #555;
	line-height: 1.5;
}
.bag-single-case__meta p strong {
    color: #111;
}

/* Style for the share button on this page */
.bag-single-case__share-btn {
	display: inline-block;
	width: auto;
	background-color: var(--bag-accent);
	color: #000;
	border: 2px solid var(--bag-accent);
	padding: 10px 25px;
	margin-top: 20px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s;
}
.bag-single-case__share-btn:hover {
	background-color: #000;
	border-color: #000;
	color: #fff;
}

/* Responsive styles to stack the columns on smaller screens */
@media (max-width: 900px) {
	.bag-single-case-wrapper {
		flex-direction: column;
	}
	.bag-single-case__sidebar {
		width: 100%;
		text-align: center;
		position: static; /* Un-stick the sidebar on mobile */
		margin-bottom: 30px;
	}
}

/* Styling for Single Case Story Section */
.bag-single-case__story {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.bag-story__title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}
.bag-story__content p {
    margin: 0 0 1em;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}
.bag-story__content p:last-child {
    margin-bottom: 0;
}

/* ═════════════════════ Case Slider Styles ═════════════════════ */

/* This is the main slider container */
.bag-case-slider {
    width: 100%;
    /* Apply negative margin to counteract the slide padding */
    margin: 0 -10px;
}

/* This is each individual slide in the carousel */
.bag-slider-item {
    width: 33.33%; /* Show 3 slides at a time on desktop */
    box-sizing: border-box;
    /* Use padding for spacing instead of margin */
    padding: 0 10px;
}

/* Style for the link and title within each slide */
.bag-slider-item a {
    display: block;
    text-decoration: none;
}
.bag-slider-item-title {
    color: #111;
    font-size: 16px;
    margin: 10px 0 0;
    text-align: center;
}

/* Responsive styles for tablets and mobile */
@media (max-width: 900px) {
    .bag-slider-item {
        width: 50%; /* Show 2 slides at a time */
    }
}

@media (max-width: 600px) {
    .bag-slider-item {
        width: 100%; /* Show 1 slide at a time */
        margin-right: 10px;
    }
}

/* Style for Flickity's navigation buttons and dots */
.bag-case-slider .flickity-prev-next-button {
    width: 44px;
    height: 44px;
    background: var(--bag-accent);
}
.bag-case-slider .flickity-prev-next-button:hover {
    background: #000;
}
.bag-case-slider .flickity-prev-next-button .flickity-button-icon {
    fill: #000;
}
.bag-case-slider .flickity-prev-next-button:hover .flickity-button-icon {
    fill: #fff;
}
.bag-case-slider .flickity-page-dots .dot {
    background: #ccc;
}
.bag-case-slider .flickity-page-dots .dot.is-selected {
    background: var(--bag-accent);
}

/* ------------------------------------------------------------------------
   FIX for Centering Slider Items
   ------------------------------------------------------------------------ */

/*
 * This makes the track that holds the slides a flex container.
 * `justify-content: center` is the key property that centers the group
 * of slides when there are fewer items than can fit in the view.
*/
.bag-case-slider .flickity-slider {
    display: flex;
    justify-content: center;
    width: 100%;
}

/*
 * This ensures that on smaller screens, when slides become full-width,
 * they revert to the default alignment to avoid any centering issues.
*/
@media (max-width: 600px) {
    .bag-case-slider .flickity-slider {
        justify-content: flex-start;
    }
}