/*
 * Modern Gallery Showcase Pro — Frontend Styles
 * ===============================================
 * Premium photography portfolio aesthetic.
 * Pure CSS: no framework, no preprocessor.
 * Loaded ONLY on pages containing [gallery_showcase].
 *
 * Design language:
 *  - Large white space
 *  - Premium typography (system sans-serif stack)
 *  - Rounded images, soft shadows
 *  - Smooth, purposeful motion
 *  - Apple / Adobe Portfolio aesthetic
 *
 * Table of Contents:
 *  1.  CSS Custom Properties (updated by PHP via inline style)
 *  2.  Reset & Base
 *  3.  Gallery Wrap
 *  4.  Toolbar (Search + Sort)
 *  5.  Gallery Grid
 *  6.  Gallery Card
 *  7.  Card Hover Animations
 *  8.  Empty / No-Results States
 *  9.  Single Category Page
 *  10. Story Section
 *  11. Viewer Layout
 *  12. Main Image
 *  13. Image Navigation (Prev/Next)
 *  14. Image Info Panel
 *  15. Thumbnail Carousel
 *  16. Virtual Page Wrapper
 *  17. Responsive Breakpoints
 *  18. Accessibility
 *  19. Animations & Keyframes
 */

/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   (Defaults — overridden by PHP inline style block from settings)
═══════════════════════════════════════════════════════════════════════════ */

:root {
    --gsp-radius:        12px;
    --gsp-gap:           24px;
    --gsp-speed:         400ms;
    --gsp-thumb-h:       80px;
    --gsp-main-h:        600px;
    --gsp-cols-desktop:  3;
    --gsp-cols-tablet:   2;
    --gsp-cols-mobile:   1;

    /* Light theme (default) */
    --gsp-bg:        #f8fafc;
    --gsp-surface:   #ffffff;
    --gsp-text:      #0f172a;
    --gsp-text-sub:  #64748b;
    --gsp-border:    #e2e8f0;
    --gsp-overlay:   rgba(0, 0, 0, 0.7);

    /* Accent */
    --gsp-accent:    #6366f1;
    --gsp-accent-bg: rgba(99, 102, 241, 0.08);

    /* Card */
    --gsp-card-shadow:     0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -1px rgba(0,0,0,.04);
    --gsp-card-shadow-hover: 0 20px 40px -8px rgba(0,0,0,.18), 0 8px 20px -4px rgba(0,0,0,.12);
    --gsp-card-scale-hover: 1.025;

    /* Font */
    --gsp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Dark theme overrides (applied by PHP class or user preference) */
.gsp-theme-dark,
.gsp-theme-dark * {
    --gsp-bg:      #0f0f0f;
    --gsp-surface: #1a1a1a;
    --gsp-text:    #f5f5f5;
    --gsp-text-sub:#999;
    --gsp-border:  #333;
    --gsp-overlay: rgba(0,0,0,.88);
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-wrap *,
.gsp-gallery-wrap *::before,
.gsp-gallery-wrap *::after {
    box-sizing: border-box;
}

.gsp-gallery-wrap {
    font-family: var(--gsp-font);
    color: var(--gsp-text);
    background: transparent;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.gsp-gallery-wrap a {
    text-decoration: none;
    color: inherit;
}

.gsp-gallery-wrap img {
    display: block;
    max-width: 100%;
}

.gsp-gallery-wrap h1,
.gsp-gallery-wrap h2,
.gsp-gallery-wrap h3 {
    margin: 0;
    line-height: 1.2;
}

.gsp-gallery-wrap p {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. GALLERY WRAP
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-wrap {
    padding: 0;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. TOOLBAR (SEARCH + SORT)
═══════════════════════════════════════════════════════════════════════════ */

.gsp-toolbar {
    margin-bottom: 40px;
}

.gsp-toolbar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gsp-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 440px;
}

.gsp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gsp-text-sub);
    pointer-events: none;
    display: flex;
}

.gsp-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1.5px solid var(--gsp-border);
    border-radius: 100px;
    font-size: 14px;
    font-family: var(--gsp-font);
    color: var(--gsp-text);
    background: var(--gsp-surface);
    outline: none;
    transition: border-color var(--gsp-speed) ease, box-shadow var(--gsp-speed) ease;
    -webkit-appearance: none;
    appearance: none;
}

.gsp-search-input:focus {
    border-color: var(--gsp-accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.gsp-search-input::placeholder {
    color: var(--gsp-text-sub);
}

.gsp-sort-select {
    padding: 11px 36px 11px 16px;
    border: 1.5px solid var(--gsp-border);
    border-radius: 100px;
    font-size: 14px;
    font-family: var(--gsp-font);
    color: var(--gsp-text);
    background: var(--gsp-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color var(--gsp-speed) ease;
}

.gsp-sort-select:focus {
    border-color: var(--gsp-accent);
}

.gsp-results-count {
    font-size: 13px;
    color: var(--gsp-text-sub);
    margin-left: auto;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. GALLERY GRID
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-grid {
    display: grid;
    grid-template-columns: repeat( var(--gsp-cols-desktop), 1fr );
    gap: var(--gsp-gap);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. GALLERY CARD
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-card {
    position: relative;
    border-radius: var(--gsp-radius);
    overflow: hidden;
    background: var(--gsp-surface);
    box-shadow: var(--gsp-card-shadow);
    transition:
        transform var(--gsp-speed) cubic-bezier(.34, 1.56, .64, 1),
        box-shadow var(--gsp-speed) ease;
    will-change: transform;
}

.gsp-gallery-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Cover image container */
.gsp-gallery-card__image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8e8e8;
}

/* Hover caption reveal — slides up from the bottom of the image */
.gsp-gallery-card__image-wrap::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px 10px;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1px;
    transform: translateY(100%);
    transition: transform calc(var(--gsp-speed) * .8) cubic-bezier(.34,1.2,.64,1);
    z-index: 2;
    pointer-events: none;
}

@media (hover: hover) {
    .gsp-gallery-card:hover .gsp-gallery-card__image-wrap::after {
        transform: translateY(0);
    }
}

.gsp-gallery-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform calc(var(--gsp-speed) * 1.8) cubic-bezier(.25, .46, .45, .94);
    will-change: transform;
    backface-visibility: hidden;
}

/* Dark gradient overlay — richer, more dramatic */
.gsp-gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 20%,
        rgba(0, 0, 0, .08) 45%,
        rgba(0, 0, 0, .65) 100%
    );
    opacity: 0;
    transition: opacity calc(var(--gsp-speed) * 0.8) ease;
}

/* Featured badge */
.gsp-gallery-card__featured {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #111;
    z-index: 2;
}

/* Card content (bottom half) */
.gsp-gallery-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gsp-gallery-card__title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--gsp-text);
    transition: color var(--gsp-speed) ease;
    line-height: 1.3;
}

.gsp-gallery-card__desc {
    font-size: 13px;
    color: var(--gsp-text-sub);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gsp-gallery-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.gsp-gallery-card__count,
.gsp-gallery-card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gsp-text-sub);
    font-weight: 500;
}

.gsp-gallery-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gsp-accent);
    margin-top: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity var(--gsp-speed) ease,
        transform var(--gsp-speed) ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. CARD HOVER ANIMATIONS
═══════════════════════════════════════════════════════════════════════════ */

@media (hover: hover) {
    .gsp-gallery-card:hover {
        transform: translateY(-8px) scale(var(--gsp-card-scale-hover));
        box-shadow: var(--gsp-card-shadow-hover);
    }

    .gsp-gallery-card:hover .gsp-gallery-card__image {
        transform: scale(1.1);
    }

    .gsp-gallery-card:hover .gsp-gallery-card__overlay {
        opacity: 1;
    }

    .gsp-gallery-card:hover .gsp-gallery-card__title {
        color: var(--gsp-accent);
    }

    .gsp-gallery-card:hover .gsp-gallery-card__cta {
        opacity: 1;
        transform: translateY(0);
    }

    /* Shimmer shine sweep on hover */
    .gsp-gallery-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.18) 50%, transparent 100%);
        transition: left 0.55s ease;
        pointer-events: none;
        z-index: 1;
    }

    .gsp-gallery-card:hover::after {
        left: 150%;
    }
}

/* Active / touch press */
.gsp-gallery-card:active {
    transform: translateY(-2px) scale(1.01);
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. EMPTY / NO-RESULTS STATES
═══════════════════════════════════════════════════════════════════════════ */

.gsp-grid-empty,
.gsp-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    gap: 20px;
}

.gsp-gallery-wrap [hidden],
.gsp-no-results[hidden],
[hidden] {
    display: none !important;
}

/* SVG camera illustration */
.gsp-grid-empty__camera {
    width: 80px;
    height: 80px;
    animation: gspBobble 3s ease-in-out infinite;
}

@keyframes gspBobble {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.gsp-grid-empty__icon {
    font-size: 56px;
    opacity: .25;
    line-height: 1;
}

.gsp-grid-empty__heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--gsp-text);
    letter-spacing: -0.3px;
    margin: 0;
}

.gsp-grid-empty__text {
    font-size: 15px;
    color: var(--gsp-text-sub);
    max-width: 380px;
    line-height: 1.65;
    margin: 0;
}

.gsp-no-results {
    animation: gspFadeIn .25s ease;
}

/* ── Page header (virtual /gallery/ page) ─────────────────────────────── */
.gsp-page {
    padding: 0 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.gsp-page-header {
    padding: 48px 0 32px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 40px;
}

.gsp-page-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.2;
}

.gsp-page-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. SINGLE CATEGORY PAGE
═══════════════════════════════════════════════════════════════════════════ */

.gsp-single-wrap {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Banner image at top of category page */
.gsp-category-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--gsp-radius);
    margin-bottom: 40px;
    position: relative;
}

.gsp-category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gsp-category-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.6) 100%);
}

.gsp-category-banner__title {
    position: absolute;
    bottom: 28px;
    left: 32px;
    right: 32px;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. STORY SECTION
═══════════════════════════════════════════════════════════════════════════ */

.gsp-story {
    padding: 48px 0;
    border-bottom: 1px solid var(--gsp-border);
    margin-bottom: 48px;
}

.gsp-story__inner {
    max-width: 720px;
}

.gsp-story__title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--gsp-text);
    margin-bottom: 16px;
}

.gsp-story__body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gsp-text-sub);
}

.gsp-story__body p {
    margin-bottom: 16px;
}

.gsp-story__body p:last-child {
    margin-bottom: 0;
}

.gsp-story__links {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gsp-story__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--gsp-speed) ease;
    text-decoration: none;
}

.gsp-story__link--primary {
    background: var(--gsp-accent);
    color: #fff;
}

.gsp-story__link--primary:hover {
    background: #4f46e5;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
}

.gsp-story__link--secondary {
    background: var(--gsp-surface);
    color: var(--gsp-text);
    border: 1.5px solid var(--gsp-border);
}

.gsp-story__link--secondary:hover {
    border-color: var(--gsp-accent);
    color: var(--gsp-accent);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. VIEWER LAYOUT
═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   11. VIEWER LAYOUT & CINEMATIC STAGE
═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   11. VIEWER LAYOUT & LIGHT GRAY STAGE
═══════════════════════════════════════════════════════════════════════════ */

.gsp-viewer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    user-select: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   12. MAIN IMAGE FRAME
═══════════════════════════════════════════════════════════════════════════ */

.gsp-main-image-wrap {
    position: relative;
    width: 100%;
    background: #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gsp-main-image-wrap[data-has-portrait="true"] {
    aspect-ratio: unset;
    height: var(--gsp-main-h, 560px);
}

.gsp-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: opacity calc(var(--gsp-speed) * .6) ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gsp-main-image.gsp-loading {
    opacity: 0;
}

/* Skeleton pulse animation */
.gsp-main-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: gspSkeleton 1.4s infinite;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    z-index: 0;
}

.gsp-main-image-wrap.gsp-loading::after {
    opacity: 1;
}

/* Watermark overlay */
.gsp-watermark {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    letter-spacing: .4px;
    pointer-events: none;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   13. SIDE NAVIGATION ARROWS (HIGH CONTRAST GLASSMORPHIC)
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-wrap .gsp-nav,
.gsp-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: rgba(15, 23, 42, 0.82) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gsp-gallery-wrap .gsp-main-image-wrap:hover .gsp-nav,
.gsp-main-image-wrap:hover .gsp-nav {
    opacity: 1 !important;
}

.gsp-gallery-wrap .gsp-nav:hover,
.gsp-nav:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    border-color: #818cf8 !important;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5) !important;
    transform: translateY(-50%) scale(1.12) !important;
}

.gsp-nav:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.gsp-nav--prev { left: 16px !important; }
.gsp-nav--next { right: 16px !important; }

.gsp-gallery-wrap .gsp-nav svg,
.gsp-nav svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    stroke: #ffffff !important;
    fill: none !important;
}

.gsp-gallery-wrap .gsp-nav svg path,
.gsp-nav svg path {
    stroke: #ffffff !important;
    fill: none !important;
    stroke-width: 2.5px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.gsp-nav--disabled {
    opacity: .2 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   14. IMAGE INFO & CONTROLS
═══════════════════════════════════════════════════════════════════════════ */

.gsp-image-info {
    padding: 18px 4px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 60px;
    border-bottom: 1px solid #e2e8f0;
}

.gsp-image-info__left {
    flex: 1;
    min-width: 0;
}

.gsp-image-info__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--gsp-speed) ease;
}

.gsp-image-info__title.gsp-fade {
    opacity: 0;
}

.gsp-image-info__caption {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.5;
    transition: opacity var(--gsp-speed) ease;
}

.gsp-image-info__caption.gsp-fade {
    opacity: 0;
}

.gsp-image-info__meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.gsp-image-info__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    background: #ffffff;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid #cbd5e1;
}

.gsp-image-info__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gsp-image-counter {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid #cbd5e1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* High Contrast Icon Action Buttons */
.gsp-gallery-wrap .gsp-icon-btn,
.gsp-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    cursor: pointer !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gsp-gallery-wrap .gsp-icon-btn:hover,
.gsp-icon-btn:hover {
    border-color: #6366f1 !important;
    color: #ffffff !important;
    background: #6366f1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45) !important;
}

.gsp-gallery-wrap .gsp-icon-btn svg,
.gsp-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    stroke: #334155 !important;
    fill: none !important;
}

.gsp-gallery-wrap .gsp-icon-btn:hover svg,
.gsp-icon-btn:hover svg {
    stroke: #ffffff !important;
}

.gsp-gallery-wrap .gsp-icon-btn svg path,
.gsp-icon-btn svg path {
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   15. THUMBNAIL FILMSTRIP CAROUSEL
═══════════════════════════════════════════════════════════════════════════ */

.gsp-carousel-wrap {
    position: relative;
    margin-top: 18px;
    padding: 0;
}

.gsp-carousel-track-wrap {
    overflow: hidden;
    border-radius: 10px;
    cursor: grab;
}

.gsp-carousel-track-wrap:active {
    cursor: grabbing;
}

.gsp-carousel-track {
    display: flex;
    gap: 10px;
    transition: transform var(--gsp-speed) cubic-bezier(.25, .46, .45, .94);
    will-change: transform;
}

/* Filmstrip thumbnails */
.gsp-thumb {
    flex-shrink: 0;
    height: var(--gsp-thumb-h, 72px);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #e2e8f0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.65;
    border: 2px solid transparent;
}

.gsp-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.gsp-thumb.gsp-thumb--active {
    opacity: 1;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35), 0 4px 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.gsp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.gsp-thumb:hover img {
    transform: scale(1.06);
}

/* Carousel side navigation buttons — completely hidden as requested */
.gsp-carousel-btn {
    display: none !important;
}

.gsp-carousel-btn[disabled] {
    opacity: .25;
    cursor: not-allowed;
    pointer-events: none;
}

.gsp-carousel-btn svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   16. VIRTUAL PAGE WRAPPER
   (Used when the plugin renders as a full page via /gallery/ URL)
═══════════════════════════════════════════════════════════════════════════ */

.gsp-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.gsp-page-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gsp-border);
}

.gsp-page-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--gsp-text);
    margin-bottom: 8px;
}

.gsp-page-subtitle {
    font-size: 16px;
    color: var(--gsp-text-sub);
}

/* ═══════════════════════════════════════════════════════════════════════════
   17. RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════════════════════════════ */

/* Laptop */
@media (max-width: 1200px) {
    .gsp-gallery-grid {
        grid-template-columns: repeat(var(--gsp-cols-desktop), 1fr);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .gsp-gallery-grid {
        grid-template-columns: repeat(var(--gsp-cols-tablet), 1fr);
    }

    .gsp-page-title {
        font-size: 28px;
    }

    .gsp-category-banner {
        height: 220px;
    }

    .gsp-carousel-btn--prev { left: 0; }
    .gsp-carousel-btn--next { right: 0; }
}

/* Mobile */
@media (max-width: 600px) {
    .gsp-gallery-grid {
        grid-template-columns: repeat(var(--gsp-cols-mobile), 1fr);
    }

    .gsp-toolbar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .gsp-search-wrap {
        max-width: none;
    }

    .gsp-results-count {
        margin-left: 0;
    }

    .gsp-page {
        padding: 24px 16px;
    }

    .gsp-gallery-card__content {
        padding: 16px;
    }

    .gsp-gallery-card__title {
        font-size: 16px;
    }

    .gsp-story__title {
        font-size: 22px;
    }

    .gsp-image-info {
        flex-direction: column;
        gap: 10px;
    }

    .gsp-carousel-btn--prev { left: 0; }
    .gsp-carousel-btn--next { right: 0; }

    .gsp-nav {
        width: 36px;
        height: 36px;
        opacity: 1;  /* Always visible on mobile (no hover state). */
    }

    .gsp-nav--prev { left: 8px; }
    .gsp-nav--next { right: 8px; }
}

/* Landscape mobile */
@media (max-width: 600px) and (orientation: landscape) {
    .gsp-main-image-wrap {
        aspect-ratio: 16/9;
        height: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   18. ACCESSIBILITY
═══════════════════════════════════════════════════════════════════════════ */

.gsp-gallery-wrap :focus-visible {
    outline: 2px solid var(--gsp-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.gsp-gallery-card__link:focus-visible {
    outline-offset: 4px;
    border-radius: var(--gsp-radius);
}

/* Skip link (for keyboard users) */
.gsp-skip-link {
    position: absolute;
    top: -9999px;
    left: 8px;
    z-index: 999;
    padding: 8px 16px;
    background: var(--gsp-accent);
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.gsp-skip-link:focus {
    top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   19. ANIMATIONS & KEYFRAMES
═══════════════════════════════════════════════════════════════════════════ */

@keyframes gspFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes gspFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

@keyframes gspSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes gspScaleIn {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* Card entrance animation */
.gsp-gallery-card {
    animation: gspScaleIn calc(var(--gsp-speed) * .8) ease both;
}

/* Stagger cards: nth-child animation delay. Only for small sets. */
.gsp-gallery-card:nth-child(1) { animation-delay:   0ms; }
.gsp-gallery-card:nth-child(2) { animation-delay:  60ms; }
.gsp-gallery-card:nth-child(3) { animation-delay: 120ms; }
.gsp-gallery-card:nth-child(4) { animation-delay: 180ms; }
.gsp-gallery-card:nth-child(5) { animation-delay: 240ms; }
.gsp-gallery-card:nth-child(6) { animation-delay: 300ms; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .gsp-gallery-wrap *,
    .gsp-gallery-wrap *::before,
    .gsp-gallery-wrap *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
