/*
  ============================================================
  STYLESHEET: galerie_style.css
  Stick With Sam — Art Gallery Page
  /public/galerie/galerie_style.css
  ============================================================
  Loaded after global_style.css via $pageCSS in header.php.

  global_style.css already handles:
    - CSS variables, reset, background, nav, buttons, footer
    - .filter-tabs, .tab, .search-wrap, .reveal
    - .toast-wrap, .toast

  This file ONLY contains styles unique to the gallery page.

  CONTENTS:
  1.  Page hero            — headline and intro
  2.  Featured strip       — top 3 featured pieces
  3.  Controls             — category filter tabs
  4.  Masonry grid         — Pinterest-style variable height grid
  5.  Gallery card         — individual artwork cards
  6.  Lightbox modal       — full detail overlay
  7.  Modal image          — large artwork display
  8.  Modal info           — title, tags, description, buttons
  9.  Request similar btn  — CTA to commission form
  10. Responsive           — tablet and mobile
  ============================================================
*/


/* ============================================================
   1. PAGE HERO
   ============================================================ */
.gallery-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 8rem 1.5rem 2.5rem;
}

.gallery-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.gallery-hero h1 em {
    font-style: italic;
    color: var(--purple-light);
}

.gallery-hero p {
    font-size: 0.92rem;
    color: var(--text-soft);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.75;
    font-weight: 300;
}


/* ============================================================
   2. FEATURED STRIP
   Top 3 pieces marked featured in the data array.
   Asymmetric grid: one large card left, two smaller right.
   ============================================================ */
.featured-wrap {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.featured-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.featured-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 1rem;
}

.featured-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(90, 26, 138, 0.45), rgba(212, 95, 186, 0.25));
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(155, 63, 212, 0.2);
    border-color: rgba(155, 63, 212, 0.4);
}

.featured-card .art {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-card:nth-child(1) .art { height: 280px; font-size: 7rem; }
.featured-card:nth-child(2) .art { height: 135px; font-size: 4rem; }
.featured-card:nth-child(3) .art { height: 135px; font-size: 4rem; }

.featured-card .art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark gradient overlay on hover */
.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 5, 38, 0.82) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.28s;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
}

.featured-card:hover .featured-overlay { opacity: 1; }

.featured-overlay-text .f-cat {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-bottom: 3px;
}

.featured-overlay-text .f-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: #fff;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gold);
    color: var(--purple-deep);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 99px;
    padding: 3px 10px;
}


/* ============================================================
   3. CONTROLS
   Category filter tabs above the masonry grid.
   ============================================================ */
.gallery-controls {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    flex-wrap: wrap;
}


/* ============================================================
   4. MASONRY GRID
   CSS columns — browser distributes cards vertically.
   Cards are added to the shortest column automatically.
   ============================================================ */
.gallery-wrap {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
}

.masonry {
    columns: 4 220px; /* 4 columns, min 220px each */
    column-gap: 1rem;
}

/* Empty state */
.gallery-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    column-span: all;
}


/* ============================================================
   5. GALLERY CARD
   Each artwork piece — variable height based on .art-h-* class.
   ============================================================ */
.gallery-card {
    break-inside: avoid;       /* never split a card across columns   */
    margin-bottom: 1rem;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    animation: fadeUp 0.5s ease both;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(155, 63, 212, 0.2);
    border-color: rgba(155, 63, 212, 0.4);
}

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

/* Artwork area — height varies per piece */
.card-art {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
    rgba(90, 26, 138, 0.45),
    rgba(212, 95, 186, 0.25)
    );
    position: relative;
    font-size: 3.5rem;
}

.card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "Request similar" hover overlay */
.card-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
    rgba(20, 5, 38, 0.75) 0%,
    rgba(20, 5, 38, 0.1) 60%,
    transparent 100%
    );
    opacity: 0;
    transition: opacity 0.25s;
    display: flex;
    align-items: flex-end;
    padding: 0.85rem;
}

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

.hover-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 99px;
    padding: 5px 12px;
}

/* Card footer */
.card-footer {
    padding: 0.75rem 0.9rem 0.85rem;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.card-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.card-cat {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 99px;
    padding: 2px 8px;
}

/* Category colours */
.cat-banner    { background: rgba(245,200,66,0.18);  color: var(--gold); }
.cat-emote     { background: rgba(155,63,212,0.2);   color: var(--purple-light); }
.cat-wallpaper { background: rgba(130,200,240,0.18); color: #88c8f0; }
.cat-logo      { background: rgba(232,144,212,0.2);  color: var(--pink-light); }
.cat-other     { background: rgba(200,180,230,0.15); color: var(--muted); }

.card-style-tag {
    font-size: 0.65rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    padding: 2px 8px;
}


/* ============================================================
   6. LIGHTBOX MODAL
   Full detail overlay — opens on card click.
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(10, 2, 22, 0.78);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.open { display: flex; }

.modal {
    background: rgba(30, 10, 55, 0.88);
    backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(155, 63, 212, 0.3);
    animation: modalIn 0.3s ease;
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.93) translateY(18px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.2); }


/* ============================================================
   7. MODAL IMAGE COLUMN
   ============================================================ */
.modal-art-col { padding: 2rem; }

.modal-main-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(135deg,
    rgba(90, 26, 138, 0.5),
    rgba(212, 95, 186, 0.3)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    overflow: hidden;
}

.modal-main-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}


/* ============================================================
   8. MODAL INFO COLUMN
   ============================================================ */
.modal-info-col {
    padding: 2rem 2rem 2rem 0.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;      /* makes the right column scrollable */
    max-height: 90vh;      /* caps it at viewport height        */
}

.modal-cat-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.modal-style-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.modal-style-tag {
    font-size: 0.7rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    padding: 3px 10px;
}

.modal-desc {
    font-size: 0.80rem;
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.modal-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.65rem 0;
}

/* Meta info row */
.modal-meta-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.meta-item { }

.meta-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.meta-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-soft);
}


/* ============================================================
   9. REQUEST SIMILAR BUTTON
   ============================================================ */
.btn-request {
    width: 100%;
    padding: 0.82rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--purple-bright), var(--pink));
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 6px 20px rgba(155, 63, 212, 0.4);
    margin-bottom: 0.6rem;
    margin-top: 3rem;
}

.btn-request:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.request-hint {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}


/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .featured-card:nth-child(1) .art { height: 200px; font-size: 5rem; }
    .masonry { columns: 3 180px; }
    .modal { grid-template-columns: 1fr; }
    .modal-info-col { padding: 0 1.5rem 1.5rem; }
    .modal-art-col  { padding-bottom: 0.5rem; }
}

@media (max-width: 580px) {
    .masonry        { columns: 2 150px; }
    .featured-grid  { grid-template-columns: 1fr; }
    .gallery-hero   { padding-top: 6rem; }
}


/* ============================================================
   EMOTE COLLECTION CARD & LIGHTBOX
   Styles for the cycling emote set card and its modal.
   Added below the main gallery styles.
   ============================================================ */

/* ── COLLECTION CARD ── */

/* The emoji display inside the cycling card */
.collection-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-emote-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* The emoji itself — transitions smoothly when cycling */
.collection-emoji {
    font-size: 5rem;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

/* Dot indicators at the bottom of the card
   One dot per emote — active dot is gold */
.col-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80%;
}

.col-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.3s, transform 0.3s;
    flex-shrink: 0;
}

.col-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}


/* ── COLLECTION LIGHTBOX ── */

/* Overlay — same as the main gallery modal */
.collection-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 700;             /* above the regular gallery modal     */
    background: rgba(10, 2, 22, 0.82);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.collection-modal-overlay.open { display: flex; }

/* Modal box — inherits .modal structure from galerie_style.css */
.collection-modal {
    background: rgba(30, 10, 55, 0.90);
    backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(155, 63, 212, 0.3);
    animation: modalIn 0.3s ease;
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

/* Main emote display — large, centred */
.collection-main-art {
    font-size: 6rem !important;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.collection-main-art span {
    font-size: 6rem;
    display: block;
    line-height: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Emote name below the main display */
.col-modal-name {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 0.6rem;
    letter-spacing: 0.04em;
}

/* Thumbnail strip — scrollable row below the main image */
.col-thumb-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

/* Individual thumbnail */
.col-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    flex-shrink: 0;
    overflow: hidden;
}

.col-thumb:hover {
    border-color: var(--purple-light);
    background: rgba(155, 63, 212, 0.15);
    transform: scale(1.08);
}

/* Active/selected thumbnail — gold border */
.col-thumb.active {
    border-color: var(--gold);
    background: var(--gold-dim);
    transform: scale(1.1);
}

.col-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Responsive — stack modal on mobile */
@media (max-width: 680px) {
    .collection-modal {
        grid-template-columns: 1fr;
    }

    .col-thumb-strip {
        gap: 0.4rem;
    }

    .col-thumb {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .collection-main-art span { font-size: 5rem; }
}

/* Collection modal review card */
.col-review {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-top: 1rem;
}

.client-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--purple-light);
    text-decoration: none;
    background: rgba(155, 63, 212, 0.12);
    border: 1px solid rgba(155, 63, 212, 0.3);
    border-radius: 99px;
    padding: 4px 12px;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;    /* ← stops the text wrapping inside the pill */
}

.social-link img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;         /* ← stops the icon shrinking */
}

.social-link:hover {
    background: rgba(155, 63, 212, 0.25);
    border-color: rgba(155, 63, 212, 0.5);
    color: #fff;
}