/* ==========================================================================
   MAW Cards & Gallery Grid Styles
   ========================================================================== */

.details-page {
	width: 100%;
	box-sizing: border-box;
}

/* Hero card with year heading, stepper and progress */
.details-hero-card {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 243, 232, 0.94) 100%);
	border: 1px solid rgba(141, 116, 64, 0.28);
	border-radius: 18px;
	padding: 20px 24px 18px;
	margin-bottom: 16px;
	box-shadow: 0 10px 24px rgba(36, 29, 17, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.details-hero-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.details-hero-center {
	text-align: center;
	flex: 1;
}

.details-year-heading {
	margin: 0;
	font-family: 'Lora', Georgia, serif;
	font-size: clamp(1.4rem, 2.8vw, 1.95rem);
	font-weight: 700;
	color: #382414;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.details-year-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(141, 116, 64, 0.32);
	color: #553e24;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	min-width: 76px;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(36, 29, 17, 0.04);
}

.details-year-nav-link:hover:not(.disabled) {
	background: #ffffff;
	border-color: rgba(141, 116, 64, 0.65);
	color: #2b1d10;
	box-shadow: 0 4px 12px rgba(36, 29, 17, 0.1);
	transform: translateY(-1px);
}

.details-year-nav-link.disabled {
	visibility: hidden;
	pointer-events: none;
	width: 76px;
}

.details-hero-stats {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(141, 116, 64, 0.2);
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
}

.details-stats-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 7px;
	font-size: 0.92rem;
	color: #55412b;
	font-weight: 600;
}

.details-stats-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 10px;
	background: rgba(184, 134, 11, 0.16);
	color: #7b5810;
	font-weight: 700;
	font-size: 0.84rem;
	border: 1px solid rgba(184, 134, 11, 0.25);
}

.details-stats-track {
	width: 100%;
	height: 8px;
	background: rgba(141, 116, 64, 0.15);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.details-stats-progress {
	height: 100%;
	background: linear-gradient(90deg, #996515 0%, #c4962c 50%, #d4af37 100%);
	border-radius: 10px;
	transition: width 0.4s ease;
}

/* Filter toolbar */
.details-filter-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 14px 0 24px;
	padding: 12px 18px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(249, 244, 235, 0.88) 100%);
	border: 1px solid rgba(141, 116, 64, 0.24);
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(36, 29, 17, 0.04);
}

.details-filter-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 0.88rem;
	color: #6e4f2b;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.details-filter-chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

.filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(141, 116, 64, 0.32);
	border-radius: 20px;
	cursor: pointer;
	font-size: 0.88rem;
	font-weight: 500;
	color: #4a3825;
	transition: all 0.2s ease;
	user-select: none;
}

.filter-chip input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.filter-chip-box {
	width: 16px;
	height: 16px;
	border-radius: 4px;
	border: 1.5px solid rgba(141, 116, 64, 0.55);
	background: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	transition: all 0.18s ease;
	flex-shrink: 0;
}

.filter-chip-box svg {
	display: none;
}

.filter-chip:hover {
	background: #ffffff;
	border-color: rgba(141, 116, 64, 0.65);
	box-shadow: 0 3px 8px rgba(36, 29, 17, 0.08);
	transform: translateY(-1px);
}

.filter-chip:has(input:checked),
.filter-chip.is-active {
	background: linear-gradient(135deg, #8c6932 0%, #705326 100%);
	border-color: #705326;
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(112, 83, 38, 0.25);
}

.filter-chip:has(input:checked) .filter-chip-box,
.filter-chip.is-active .filter-chip-box {
	background: #ffffff;
	border-color: #ffffff;
	color: #80602e;
}

.filter-chip:has(input:checked) .filter-chip-box svg,
.filter-chip.is-active .filter-chip-box svg {
	display: block;
}

.gallery2.details-cards,
.search-results-grid .gallery2.details-cards,
.search-page .gallery2.details-cards,
#search-results .gallery2.details-cards {
	display: flex !important;
	flex-wrap: wrap !important;
	justify-content: center !important;
	align-items: stretch !important;
	gap: 20px !important;
	text-align: center !important;
	margin: 16px auto 0 !important;
	padding: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.gallery2.details-cards figure,
.search-results-grid .gallery2.details-cards figure,
.search-page .gallery2.details-cards figure,
#search-results .gallery2.details-cards figure {
	margin: 0 !important;
	flex: 0 0 calc((100% - 3 * 20px) / 4) !important;
	max-width: calc((100% - 3 * 20px) / 4) !important;
	width: calc((100% - 3 * 20px) / 4) !important;
	min-width: 0 !important;
	height: auto !important;
	display: flex !important;
	justify-content: center !important;
	box-sizing: border-box !important;
}
.gallery2.details-cards .details-card-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
	background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,244,232,0.95) 100%);
	border: 1px solid rgba(141, 116, 64, 0.26);
	border-radius: 16px;
	overflow: hidden;
	padding: 0;
	box-shadow: 0 8px 22px rgba(36, 29, 17, 0.07), inset 0 1px 0 rgba(255,255,255,0.95);
	transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.24s ease;
}

.gallery2.details-cards .details-card-link:hover {
	transform: translateY(-5px);
	border-color: rgba(141, 116, 64, 0.55);
	box-shadow: 0 18px 36px rgba(36, 29, 17, 0.14), inset 0 1px 0 rgba(255,255,255,1);
}

.gallery2.details-cards .details-card-image {
	position: relative;
	background: #ffffff;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 220px;
	min-height: 220px;
	width: 100%;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(141, 116, 64, 0.18);
	box-shadow: inset 0 0 0 1px rgba(141, 116, 64, 0.06);
}

.gallery2.details-cards .details-card-image img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center center;
	flex: 0 0 auto;
	margin: auto;
	background: transparent;
	filter: saturate(1.04) contrast(1.02);
	transition: transform 0.24s ease;
}

.gallery2.details-cards .details-card-link:hover .details-card-image img {
	transform: scale(1.03);
}

.gallery2.details-cards .details-card-image.is-missing img {
	opacity: 0.65;
	filter: grayscale(40%) contrast(0.95);
}

/* Card badges */
.card-badges {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
	z-index: 2;
}

.card-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	box-shadow: 0 2px 6px rgba(0,0,0,0.18);
	line-height: 1.2;
}

.card-badge.badge-na {
	background: rgba(115, 105, 95, 0.92);
	color: #ffffff;
}

.card-badge.badge-special {
	background: rgba(141, 116, 64, 0.95);
	color: #ffffff;
}

.card-badge.badge-franco {
	background: rgba(184, 134, 11, 0.95);
	color: #ffffff;
}

/* Card zoom hint icon */
.details-card-zoom-hint {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(43, 31, 20, 0.75);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.gallery2.details-cards .details-card-link:hover .details-card-zoom-hint {
	opacity: 1;
	transform: scale(1);
}

/* Card body typography */
.gallery2.details-cards .details-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	flex: 1;
	font-size: 0.94rem;
	line-height: 1.45;
	color: #4c402d;
	text-align: center;
	background: linear-gradient(180deg, rgba(248,241,227,0.92) 0%, rgba(242,233,216,0.96) 100%);
}

.gallery2.details-cards .details-card-caption {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	width: 100%;
}

.details-card-title {
	font-family: 'Lora', Georgia, serif;
	font-weight: 700;
	font-size: 0.98rem;
	line-height: 1.35;
	color: #2b1e13;
	text-align: center;
}

.details-card-post {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
	color: #72522c;
	font-size: 0.88rem;
	font-weight: 600;
}

.details-card-usage {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
	width: 100%;
	margin-top: auto;
	padding-top: 8px;
	border-top: 1px solid rgba(141, 116, 64, 0.2);
	font-size: 0.84rem;
	line-height: 1.35;
	color: #554432;
}

.card-icon {
	flex-shrink: 0;
	margin-top: 2px;
	color: #8d7440;
}
.gallery figcaption,
.gallery2 figcaption {
	padding: 5px;
	background: #e9d7ab;
	color: #2f2318;
}

.gallery2 img {
	width: 220px;
	height: 220px;
	cursor: pointer;
	object-fit: scale-down;
	flex: 0 0 220px;
	margin: 0;
	background: #ffffff;
	animation: fadeIn 0.3s ease-in;
}

.gallery2 img[loading="lazy"] {
	background: #ffffff;
}

@keyframes fadeIn {
	from { opacity: 0.8; }
	to { opacity: 1; }
}

/* Cards Responsive Styling - EXACT 4 COLUMNS down to 768px */
@media screen and (max-width: 768px) {
    .gallery2.details-cards,
    .search-results-grid .gallery2.details-cards,
    .search-page .gallery2.details-cards,
    #search-results .gallery2.details-cards {
        gap: 14px !important;
    }
    .gallery2.details-cards figure,
    .search-results-grid .gallery2.details-cards figure,
    .search-page .gallery2.details-cards figure,
    #search-results .gallery2.details-cards figure {
        flex: 0 0 calc((100% - 14px) / 2) !important;
        max-width: calc((100% - 14px) / 2) !important;
        width: calc((100% - 14px) / 2) !important;
    }
    .gallery2.details-cards .details-card-image {
        height: 180px !important;
        min-height: 180px !important;
    }
}

@media screen and (max-width: 480px) {
    .gallery2.details-cards,
    .search-results-grid .gallery2.details-cards,
    .search-page .gallery2.details-cards,
    #search-results .gallery2.details-cards {
        gap: 12px !important;
    }
    .gallery2.details-cards figure,
    .search-results-grid .gallery2.details-cards figure,
    .search-page .gallery2.details-cards figure,
    #search-results .gallery2.details-cards figure {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .gallery2.details-cards .details-card-image {
        height: 170px !important;
        min-height: 170px !important;
    }
}


/* ==========================================================================
   4. Centered Exhibition & Postmark Archival Modal (PEW-style)
   ========================================================================== */
.pew-card-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

.pew-card-modal.is-active {
    display: flex !important;
}

body.pew-modal-open {
    overflow: hidden !important;
}

/* Dark Backdrop with Blur */
.pew-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 20, 14, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.pew-card-modal.is-active .pew-modal-backdrop {
    opacity: 1;
}

/* Floating Navigation Arrows */
.pew-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(141, 116, 64, 0.28);
    color: #2b1d10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.18s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pew-modal-nav.prev {
    left: max(14px, calc((100vw - 1200px) / 2 - 62px));
}

.pew-modal-nav.next {
    right: max(14px, calc((100vw - 1200px) / 2 - 62px));
}

.pew-modal-nav:hover {
    background: #80602e;
    border-color: #5d4421;
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 24px rgba(128, 96, 46, 0.35);
}

/* Center Magnified Card - Responsive Window Fitting & Bottom Carousel */
.pew-modal-card {
    position: relative;
    z-index: 5;
    width: min(1200px, calc(100vw - 36px));
    height: min(88vh, 760px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    box-sizing: border-box;
}

.pew-card-modal.is-active .pew-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Topbar */
.pew-modal-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    flex: 0 0 48px;
    padding: 0 16px;
    background: linear-gradient(180deg, #fdfbf7 0%, #f7f3ec 100%);
    border-bottom: 1px solid rgba(141, 116, 64, 0.18);
    box-sizing: border-box;
}

.pew-modal-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pew-modal-badge {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #80602e;
    background: rgba(141, 116, 64, 0.12);
    border: 1px solid rgba(141, 116, 64, 0.28);
    border-radius: 9999px;
    padding: 2px 8px;
}

.pew-modal-id {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2b1d10;
}

.pew-modal-counter {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #2b1d10;
    background: rgba(141, 116, 64, 0.1);
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(141, 116, 64, 0.18);
}

.pew-modal-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pew-modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(141, 116, 64, 0.22);
    color: #2b1d10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pew-modal-close-btn:hover {
    background: #80602e;
    border-color: #5d4421;
    color: #ffffff;
}

/* Card Body: 2 Columns (Image + Info) */
.pew-modal-card-body {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    height: calc(100% - 48px - 84px);
    min-height: 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Left Image Column - Fits exactly in window, no zoom */
.pew-modal-image-col {
    flex: 1 1 56%;
    width: 56%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(circle at center, #ffffff 40%, #fbf7f0 100%);
    border-right: 1px solid rgba(141, 116, 64, 0.15);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.pew-modal-image-viewport {
    flex: 1 1 auto;
    width: 100%;
    height: calc(100% - 28px);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    cursor: default;
}

.pew-modal-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
}

.pew-modal-image-caption {
    font-size: 13px;
    font-weight: 700;
    color: #2b1d10;
    margin-top: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95%;
    flex: 0 0 auto;
}

/* Right Details Column */
.pew-modal-details-col {
    flex: 0 0 44%;
    width: 44%;
    height: 100%;
    padding: 18px 20px;
    background: #ffffff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.pew-modal-details-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.pew-modal-details-list dl {
    margin: 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px 10px;
    font-size: 13px;
    line-height: 1.45;
}

.pew-modal-details-list dt {
    font-weight: 700;
    color: #80602e;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.pew-modal-details-list dd {
    margin: 0;
    color: #2c241d;
    font-weight: 500;
    word-break: break-word;
}

.pew-modal-details-list p {
    margin: 6px 0;
    font-size: 13px;
    color: #4a3825;
}

.pew-modal-details-list .fb-pic-name {
    font-weight: 700;
    color: #80602e;
    margin-top: 8px;
}

.pew-modal-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: #faf8f5;
    border: 1px solid rgba(141, 116, 64, 0.12);
    border-radius: 6px;
    transition: background 0.12s ease;
}

.pew-modal-meta-row:hover {
    background: #f4ede0;
}

.pew-modal-meta-row .meta-label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #80602e;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.pew-modal-meta-row .meta-value {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2b1d10;
    text-align: right;
    word-break: break-word;
}

.pew-modal-meta-empty {
    padding: 12px;
    color: #8c7853;
    text-align: center;
    font-style: italic;
    font-size: 12px;
}

/* Collector Actions Bar in Details Column */
.pew-modal-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(141, 116, 64, 0.25);
    flex-shrink: 0;
}

.pew-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 7px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pew-action-btn.primary {
    background: linear-gradient(135deg, #c78323 0%, #a86b12 100%);
    color: #ffffff;
    border: 1px solid #8c570a;
    box-shadow: 0 2px 5px rgba(168, 107, 18, 0.25);
}

.pew-action-btn.primary:hover {
    background: linear-gradient(135deg, #d6902e 0%, #b87719 100%);
    box-shadow: 0 3px 8px rgba(168, 107, 18, 0.35);
}

.pew-action-btn.secondary {
    background: rgba(153, 101, 21, 0.1);
    color: #6a440e;
    border: 1px solid rgba(153, 101, 21, 0.28);
}

.pew-action-btn.secondary:hover {
    background: rgba(153, 101, 21, 0.18);
    color: #3b2203;
    border-color: rgba(153, 101, 21, 0.45);
}

/* Bottom Thumbnail Carousel */
.pew-modal-carousel-wrap {
    flex: 0 0 84px;
    height: 84px;
    background: #fdfaf5;
    border-top: 1px solid rgba(141, 116, 64, 0.2);
    padding: 8px 14px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.pew-modal-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 116, 64, 0.35) transparent;
    padding-bottom: 2px;
}

.pew-modal-carousel::-webkit-scrollbar {
    height: 4px;
}
.pew-modal-carousel::-webkit-scrollbar-thumb {
    background: rgba(141, 116, 64, 0.35);
    border-radius: 3px;
}

.pew-carousel-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 7px;
    padding: 3px;
    background: #ffffff;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.16s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pew-carousel-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.pew-carousel-thumb:hover {
    border-color: rgba(153, 101, 21, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.pew-carousel-thumb.is-active {
    border-color: #c78323;
    background: #fffcf8;
    box-shadow: 0 0 0 2px rgba(199, 131, 35, 0.45), 0 3px 8px rgba(0, 0, 0, 0.18);
    transform: scale(1.05);
}

/* Mobile & Tablet Responsive Adjustments */
@media screen and (max-width: 768px) {
    .pew-modal-nav.prev {
        left: 6px;
        width: 36px;
        height: 36px;
    }

    .pew-modal-nav.next {
        right: 6px;
        width: 36px;
        height: 36px;
    }

    .pew-modal-card {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .pew-modal-card-body {
        flex-direction: column;
        height: calc(100% - 46px - 72px);
    }

    .pew-modal-image-col {
        flex: 0 0 45%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(141, 116, 64, 0.15);
        padding: 10px;
    }

    .pew-modal-details-col {
        flex: 1 1 55%;
        width: 100%;
        padding: 10px 12px;
    }

    .pew-modal-carousel-wrap {
        flex: 0 0 72px;
        height: 72px;
        padding: 6px 8px;
    }

    .pew-carousel-thumb {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
    }
}

/* Ensure filtered-out or hidden postmark cards are completely hidden against display:flex !important */
figure.is-filtered-out,
figure[hidden],
figure[style*="display: none"],
figure[style*="display:none"],
.gallery2.details-cards figure.is-filtered-out,
.gallery2.details-cards figure[hidden],
.gallery2.details-cards figure[style*="display: none"],
.gallery2.details-cards figure[style*="display:none"],
.search-results-grid .gallery2.details-cards figure.is-filtered-out,
.search-results-grid .gallery2.details-cards figure[hidden],
.search-results-grid .gallery2.details-cards figure[style*="display: none"],
.search-results-grid .gallery2.details-cards figure[style*="display:none"] {
	display: none !important;
}

.gallery-empty-notice {
	width: 100% !important;
	flex: 1 1 100% !important;
	grid-column: 1 / -1;
	text-align: center;
	padding: 35px 20px;
	background: #fdfaf6;
	border: 1.5px dashed rgba(153, 101, 21, 0.3);
	border-radius: 12px;
	margin: 20px 0;
	color: #614828;
	box-sizing: border-box;
}
.gallery-empty-notice p {
	margin: 0 0 6px 0;
	font-size: 1rem;
}
.gallery-empty-notice .sub {
	font-size: 0.85rem;
	color: #8c6a34;
}