/* ==========================================================================
   Gallery Page Styles
   ========================================================================== */

/* Hero — gallery-specific overrides (base from otb26.css HeroSplit)
   ========================================================================== */
@media (min-width: 992px) {
    .otb26-gallery-hero {
        min-height: 0;
        overflow: hidden;
    }
    .otb26-gallery-hero .otb26-hero-image {
        min-height: 0;
    }
    .otb26-gallery-hero .otb26-hero-content {
        padding-left: calc((100vw - 960px) / 2 + 0.75rem);
    }
}
@media (min-width: 1200px) {
    .otb26-gallery-hero .otb26-hero-content {
        padding-left: calc((100vw - 1140px) / 2 + 0.75rem);
    }
}
@media (min-width: 1400px) {
    .otb26-gallery-hero .otb26-hero-content {
        padding-left: calc((100vw - 1320px) / 2 + 0.75rem);
    }
}
@media (min-width: 1440px) {
    .otb26-gallery-hero .otb26-hero-content {
        padding-left: calc((1440px - 1320px) / 2 + 0.75rem);
    }
}

/* Stats — inline inside hero content */
.otb26-gallery-stat {
    text-align: center;
}

.otb26-gallery-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--otb26-primary, #e63462);
    line-height: 1.2;
}

.otb26-gallery-stat span {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999;
}

/* Gallery jump nav background */
#gallery-jump-nav {
    background: #f0f0f0;
}

/* Section headers
   ========================================================================== */
.otb26-gallery-section {
    scroll-margin-top: 140px;
    padding: 2.5rem 0 1rem;
}

.otb26-gallery-section-header {
    margin-bottom: 1.5rem;
}

.otb26-gallery-section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.otb26-gallery-section-header p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.otb26-gallery-count {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    font-weight: 600;
}

/* Grouped gallery grid (4 col)
   ========================================================================== */
.otb26-gallery-grouped-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.otb26-gallery-grouped-grid .otb26-gallery-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* Simple grid (4 col)
   ========================================================================== */
.otb26-gallery-simple-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.otb26-gallery-simple-item:nth-child(1),
.otb26-gallery-simple-item:nth-child(2) {
    grid-column: span 2;
}

/* Cards (shared)
   ========================================================================== */
.otb26-gallery-card,
.otb26-gallery-simple-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.otb26-gallery-card img,
.otb26-gallery-simple-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.otb26-gallery-card:hover img,
.otb26-gallery-simple-item:hover img {
    transform: scale(1.05);
}

/* Card overlay */
.otb26-gallery-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    pointer-events: none;
}

.otb26-gallery-card-overlay span {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}

/* Count badge */
.otb26-gallery-card-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    pointer-events: none;
}

/* Simple grid captions (hover reveal) */
.otb26-gallery-simple-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.otb26-gallery-simple-caption span {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
}

.otb26-gallery-simple-item:hover .otb26-gallery-simple-caption {
    opacity: 1;
}

/* Tab pills
   ========================================================================== */
.otb26-gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.otb26-gallery-tab-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.otb26-gallery-tab-btn:hover {
    border-color: #999;
    color: #333;
}

.otb26-gallery-tab-btn[aria-selected="true"] {
    background-color: #e8e8e8;
    border-color: #bbb;
    color: #333;
}

/* Tab panels grid */
.otb26-gallery-tab-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

/* Lightbox
   ========================================================================== */
.otb26-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: none;
    flex-direction: column;
}

.otb26-lightbox.active {
    display: flex;
}

/* Top bar — counter left, close right */
.otb26-lightbox-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.otb26-lightbox-counter {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 500;
}

.otb26-lightbox-close {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.otb26-lightbox-close:hover,
.otb26-lightbox-close:focus {
    opacity: 1;
    outline: none;
    box-shadow: none;
}

/* Prev / next arrows */
.otb26-lightbox-prev,
.otb26-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}

.otb26-lightbox-prev:hover,
.otb26-lightbox-next:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.otb26-lightbox-prev {
    left: 16px;
}

.otb26-lightbox-next {
    right: 16px;
}

/* Body: image + caption + thumbs, image fills remaining space */
.otb26-lightbox-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
}

.otb26-lightbox-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 80px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.otb26-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border-radius: 4px;
}

/* Caption — sits directly under the image */
.otb26-lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 14px 20px 6px;
    flex-shrink: 0;
}

.otb26-lightbox-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.otb26-lightbox-category {
    font-size: 0.8rem;
    color: #aaa;
}

.otb26-lightbox-cs-link {
    display: inline-block;
    font-size: 0.8rem;
    color: #8bb8e8;
    text-decoration: underline;
    margin-top: 4px;
}

.otb26-lightbox-cs-link:hover {
    color: #aed0f5;
}

/* Thumbnail strip — directly under caption */
.otb26-lightbox-thumbs {
    display: flex;
    gap: 5px;
    padding: 10px 20px 20px;
    overflow-x: auto;
    max-width: 80%;
    flex-shrink: 0;
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/Edge */
}

.otb26-lightbox-thumbs::-webkit-scrollbar {
    display: none;                   /* Chrome/Safari */
}

.otb26-lightbox-thumb {
    width: 80px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.otb26-lightbox-thumb:hover {
    opacity: 0.7;
}

.otb26-lightbox-thumb.active {
    opacity: 1;
    border-color: #fff;
}

/* Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .otb26-gallery-grouped-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .otb26-gallery-grouped-grid .otb26-gallery-card:first-child {
        grid-row: span 1;
    }

    .otb26-gallery-simple-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .otb26-gallery-simple-item:nth-child(1),
    .otb26-gallery-simple-item:nth-child(2) {
        grid-column: span 1;
    }

    .otb26-gallery-tab-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .otb26-lightbox-main {
        padding: 0 50px;
    }

    .otb26-lightbox-prev { left: 6px; }
    .otb26-lightbox-next { right: 6px; }
}

@media (max-width: 575px) {
    .otb26-gallery-stat strong {
        font-size: 1.2rem;
    }

    .otb26-gallery-grouped-grid,
    .otb26-gallery-simple-grid,
    .otb26-gallery-tab-grid {
        grid-template-columns: 1fr;
    }

    .otb26-gallery-grouped-grid .otb26-gallery-card:first-child {
        grid-column: span 1;
        grid-row: span 1;
    }

    .otb26-gallery-simple-item:nth-child(1),
    .otb26-gallery-simple-item:nth-child(2) {
        grid-column: span 1;
    }

    .otb26-lightbox-main {
        padding: 0 10px;
    }

    .otb26-lightbox-img {
        max-height: calc(100vh - 170px);
    }

    .otb26-lightbox-prev,
    .otb26-lightbox-next {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .otb26-lightbox-prev { left: 4px; }
    .otb26-lightbox-next { right: 4px; }

    .otb26-lightbox-thumbs {
        padding: 8px 10px 12px;
        max-width: 100%;
    }

    .otb26-lightbox-thumb {
        width: 60px;
        height: 42px;
    }

    .otb26-gallery-section-header h2 {
        font-size: 1.3rem;
    }
}

/* Image Card Grid
   ========================================================================== */
/* Gallery index — wraps toolbar + grid/list views */
.otb26-gallery-index {
    background: #fff;
    padding: 2rem 0 2.5rem;
}

.otb26-gallery-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 303px;
    grid-auto-flow: dense;
    gap: 3px;
}

/* Big cards on LEFT — items 1, 9, 17… */
.otb26-gallery-card-item:nth-child(8n+1) {
    grid-column: 1 / span 2;
    grid-row: span 2;
}

/* Big cards on RIGHT — items 5, 13, 21… */
.otb26-gallery-card-item:nth-child(8n+5) {
    grid-column: 3 / span 2;
    grid-row: span 2;
}

/* Wide cards — items 4, 8, 12… */
.otb26-gallery-card-item:nth-child(4n) {
    grid-column: span 2;
}

/* Card base */
.otb26-gallery-card-item {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

/* Background image */
.otb26-gallery-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.otb26-gallery-card-item:hover .otb26-gallery-card-bg {
    transform: scale(1.06);
}

/* Gradient overlay — hidden, tint is on content instead */
.otb26-gallery-card-gradient {
    display: none;
}

/* Stats badge — top-right pill */
.otb26-gallery-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 3;
    pointer-events: none;
    transition: background 0.3s;
}

.otb26-gallery-card-item:hover .otb26-gallery-card-badge {
    background: var(--otb26-primary, #e63462);
}

/* Content — bottom-left with white background */
.otb26-gallery-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1.1rem;
    z-index: 2;
    pointer-events: none;
    background: rgba(255,255,255,0.82);
}

.otb26-gallery-card-theme {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.45);
    margin-bottom: 2px;
}

.otb26-gallery-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    color: #1a1a1a;
}

/* Big cards — larger text */
.otb26-gallery-card-item:nth-child(8n+1) .otb26-gallery-card-title,
.otb26-gallery-card-item:nth-child(8n+5) .otb26-gallery-card-title {
    font-size: 1.75rem;
}

.otb26-gallery-card-item:nth-child(8n+1) .otb26-gallery-card-content,
.otb26-gallery-card-item:nth-child(8n+5) .otb26-gallery-card-content {
    padding: 1.5rem 1.5rem;
}

/* Description + link — hidden by default, revealed on hover */
.otb26-gallery-card-desc {
    font-size: 0.8rem;
    color: rgba(0,0,0,0.6);
    margin: 6px 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
}

.otb26-gallery-card-item:hover .otb26-gallery-card-desc {
    max-height: 5em;
    opacity: 1;
    margin: 8px 0 0;
}

.otb26-gallery-card-link {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1a1a;
    border-top: 2px solid #1a1a1a;
    padding-top: 4px;
    margin-top: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.otb26-gallery-card-item:hover .otb26-gallery-card-link {
    max-height: 2em;
    opacity: 1;
}

/* Hover: pink bottom border on the card */
.otb26-gallery-card-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--otb26-primary, #e63462);
    z-index: 4;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.otb26-gallery-card-item:hover::before {
    transform: scaleX(1);
}

/* Card grid responsive */
@media (max-width: 991px) {
    .otb26-gallery-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .otb26-gallery-card-item:nth-child(8n+1),
    .otb26-gallery-card-item:nth-child(8n+5) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .otb26-gallery-card-item:nth-child(4n) {
        grid-column: span 1;
    }

    .otb26-gallery-card-item:nth-child(8n+1) .otb26-gallery-card-title,
    .otb26-gallery-card-item:nth-child(8n+5) .otb26-gallery-card-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 575px) {
    .otb26-gallery-cards-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 2px;
    }

    .otb26-gallery-card-item,
    .otb26-gallery-card-item:nth-child(8n+1),
    .otb26-gallery-card-item:nth-child(8n+5),
    .otb26-gallery-card-item:nth-child(4n) {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 3 / 4;
    }

    .otb26-gallery-card-item:nth-child(8n+1) .otb26-gallery-card-title,
    .otb26-gallery-card-item:nth-child(8n+5) .otb26-gallery-card-title {
        font-size: 1.2rem;
    }

    .otb26-gallery-card-title {
        font-size: 1rem;
    }

    /* Always show desc + link on mobile (no hover) */
    .otb26-gallery-card-desc {
        max-height: 5em;
        opacity: 1;
        margin: 6px 0 0;
    }

    .otb26-gallery-card-link {
        max-height: 2em;
        opacity: 1;
    }

    .otb26-gallery-card-item::before {
        transform: scaleX(1);
    }
}

/* Gallery List
   ========================================================================== */
.otb26-gallery-list {
    background: #fff;
    padding: 2rem 0 2.5rem;
}

.otb26-gallery-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.otb26-gallery-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

/* Vertical divider between columns */
.otb26-gallery-list-item:nth-child(odd) {
    border-right: 1px solid #eee;
}

.otb26-gallery-list-item:hover {
    background: #fafafa;
}

/* Thumbnail stack: 1 large + strip of smaller */
.otb26-gallery-list-thumbs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
    flex-shrink: 0;
}

.otb26-gallery-list-thumb-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.otb26-gallery-list-thumb-strip {
    display: flex;
    gap: 4px;
}

.otb26-gallery-list-thumb-strip img {
    flex: 1;
    min-width: 0;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.otb26-gallery-list-thumb-empty {
    width: 100%;
    background: #e9e9e9;
    border-radius: 6px;
}

/* Text content */
.otb26-gallery-list-info {
    flex: 1;
    min-width: 0;
    padding-top: 0.25rem;
}

.otb26-gallery-list-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.otb26-gallery-list-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 6px;
    line-height: 1.45;
}

.otb26-gallery-list-stats {
    display: block;
    font-size: 0.8rem;
    color: var(--otb26-primary, #e63462);
    font-weight: 600;
    margin-bottom: 8px;
}

/* View button */
.otb26-gallery-list-view {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: var(--otb26-primary, #e63462);
    border-radius: 5px;
    transition: background 0.2s;
}

.otb26-gallery-list-item:hover .otb26-gallery-list-view {
    background: #c42550;
}

/* List responsive */
@media (max-width: 991px) {
    .otb26-gallery-list-grid {
        grid-template-columns: 1fr;
    }

    .otb26-gallery-list-item:nth-child(odd) {
        border-right: none;
    }

    .otb26-gallery-list-thumbs {
        width: 220px;
    }
}

@media (max-width: 575px) {
    .otb26-gallery-list-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 0.75rem;
    }

    .otb26-gallery-list-thumbs {
        width: 100%;
    }

    .otb26-gallery-list-title {
        font-size: 1.15rem;
    }
}

/* ==========================================================================
   Detail Grouped Gallery  (.otb26-gd-*)
   ========================================================================== */
.otb26-gd-section {
    padding: 1rem 0 2.5rem;
}

/* Toolbar — stats left, view toggle right */
.otb26-gd-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0 1.25rem;
    border-bottom: 2px solid var(--otb26-primary, #e63462);
    margin-bottom: 1.5rem;
}

.otb26-gd-toolbar-stats {
    font-size: 0.85rem;
    color: #666;
}

.otb26-gd-toolbar-stats strong {
    color: #333;
}

.otb26-gd-toolbar-views {
    display: flex;
    gap: 4px;
}

.otb26-gd-view-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.otb26-gd-view-btn:hover {
    border-color: #aaa;
    color: #555;
}

.otb26-gd-view-btn.active {
    background: var(--otb26-primary, #e63462);
    border-color: var(--otb26-primary, #e63462);
    color: #fff;
}

/* Simple detail variant — no view toggle, just stats + pink line */
.otb26-gd-toolbar--simple {
    justify-content: flex-start;
}

/* Library block */
.otb26-gd-library {
    margin-bottom: 2.5rem;
}

.otb26-gd-library-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.otb26-gd-library-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.otb26-gd-library-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.otb26-gd-library-count {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
}

.otb26-gd-cs-link {
    font-size: 0.8rem;
    color: var(--otb26-primary, #e63462);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.otb26-gd-cs-link:hover {
    color: #c42550;
    text-decoration: underline;
}

.otb26-gd-library-desc {
    font-size: 0.9rem;
    color: #666;
    margin: -0.25rem 0 0.75rem;
    line-height: 1.45;
}

/* Photo tiles (shared) */
.otb26-gd-photo {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.otb26-gd-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.otb26-gd-photo:hover img {
    transform: scale(1.05);
}

/* Simple row — for libraries with <= maxPreview photos */
.otb26-gd-photo-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

/* Wrapping row — for "more images" that can exceed 4 */
.otb26-gd-photo-row--wrap {
    grid-template-columns: repeat(4, 1fr);
    flex-wrap: wrap;
}

/* Rich grid — large first + 3 small in right column */
.otb26-gd-photo-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
}

.otb26-gd-photo--lead {
    grid-row: span 2;
}

/* "+N MORE" overlay */
.otb26-gd-more {
    position: relative;
}

.otb26-gd-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
    border-radius: 6px;
}

.otb26-gd-more-overlay strong {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.otb26-gd-more-overlay span {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Grid view — flat 4-column grid */
.otb26-gd-flat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

/* Responsive — detail grouped */
@media (max-width: 991px) {
    .otb26-gd-photo-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .otb26-gd-photo-grid {
        grid-template-columns: 1fr 1fr;
    }

    .otb26-gd-photo--lead {
        grid-column: span 2;
        grid-row: span 1;
    }

    .otb26-gd-flat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .otb26-gd-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .otb26-gd-library-header {
        flex-direction: column;
    }

    .otb26-gd-photo-row {
        grid-template-columns: 1fr 1fr;
    }

    .otb26-gd-photo-grid {
        grid-template-columns: 1fr 1fr;
    }

    .otb26-gd-photo--lead {
        grid-column: span 2;
    }

    .otb26-gd-flat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .otb26-gd-more-overlay strong {
        font-size: 1.1rem;
    }
}
