/* ============================================================
   Jewelry Lookbook — Collection Page Template Styles
   ============================================================ */

.jlb-collection-page { font-family: inherit; }

/* ── Back button ────────────────────────────────────────────── */
.jlb-back-bar { padding: 18px 0 0; }
.jlb-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: #888; text-decoration: none;
    transition: color 0.2s;
}
.jlb-back-btn:hover { color: #1a1a1a; }
.jlb-back-btn svg { transition: transform 0.2s; }
.jlb-back-btn:hover svg { transform: translateX(-3px); }

/* ── Hero ───────────────────────────────────────────────────── */
.jlb-hero {
    position: relative; width: 100%; min-height: 480px;
    display: flex; align-items: flex-end;
    overflow: hidden; border-radius: 16px;
    margin: 20px 0 48px; background: #1a1a1a;
}
.jlb-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transition: transform 0.6s ease;
}
.jlb-hero:hover .jlb-hero-bg { transform: scale(1.03); }
.jlb-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
}
.jlb-hero-content {
    position: relative; z-index: 2;
    padding: 40px 44px; color: #fff; width: 100%;
}
.jlb-hero-category {
    font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}
.jlb-hero-title {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 300; letter-spacing: -0.01em;
    line-height: 1.1; margin: 0 0 12px; color: #fff;
}
.jlb-hero-subtitle {
    font-size: 16px; color: rgba(255,255,255,0.75);
    font-style: italic; margin: 0;
}

/* No cover image fallback */
.jlb-hero.jlb-hero-no-image {
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    min-height: 320px;
}

/* ── Gallery section ────────────────────────────────────────── */
.jlb-gallery-section { margin-bottom: 60px; }
.jlb-section-header { margin-bottom: 28px; }
.jlb-section-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: #aaa; margin-bottom: 8px;
}
.jlb-section-title { font-size: 24px; font-weight: 400; color: #1a1a1a; margin: 0; }

/* Gallery grid */
.jlb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.jlb-gallery-grid.jlb-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.jlb-gallery-grid.jlb-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* First image spans 2 cols for visual interest */
.jlb-gallery-grid .jlb-gallery-item:first-child {
    grid-column: span 2;
}
.jlb-gallery-grid.jlb-gallery-cols-2 .jlb-gallery-item:first-child,
.jlb-gallery-grid.jlb-gallery-cols-4 .jlb-gallery-item:first-child {
    grid-column: span 1;
}

.jlb-gallery-item {
    position: relative; overflow: hidden;
    border-radius: 10px; cursor: pointer;
    background: #f5f0eb;
}
.jlb-gallery-item::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0); transition: background 0.25s;
}
.jlb-gallery-item:hover::after { background: rgba(0,0,0,0.12); }

.jlb-gallery-img-wrap { padding-top: 110%; position: relative; overflow: hidden; }
.jlb-gallery-grid .jlb-gallery-item:first-child .jlb-gallery-img-wrap { padding-top: 65%; }

.jlb-gallery-item img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.45s ease;
}
.jlb-gallery-item:hover img { transform: scale(1.05); }

.jlb-gallery-zoom-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 3; opacity: 0; transition: all 0.25s;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
}
.jlb-gallery-item:hover .jlb-gallery-zoom-icon {
    opacity: 1; transform: translate(-50%, -50%) scale(1);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.jlb-lightbox {
    display: none; position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.92);
    align-items: center; justify-content: center;
    padding: 20px;
}
.jlb-lightbox.open { display: flex; }
.jlb-lightbox-img {
    max-width: 90vw; max-height: 88vh;
    object-fit: contain; border-radius: 4px;
    user-select: none;
}
.jlb-lightbox-close {
    position: fixed; top: 20px; right: 24px;
    font-size: 28px; color: rgba(255,255,255,0.7);
    cursor: pointer; line-height: 1; background: none;
    border: none; padding: 0; transition: color 0.2s;
    z-index: 2;
}
.jlb-lightbox-close:hover { color: #fff; }
.jlb-lightbox-prev,
.jlb-lightbox-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    font-size: 22px; color: rgba(255,255,255,0.6);
    cursor: pointer; background: rgba(255,255,255,0.1);
    border: none; padding: 12px 16px; border-radius: 8px;
    transition: all 0.2s; z-index: 2;
}
.jlb-lightbox-prev { left: 16px; }
.jlb-lightbox-next { right: 16px; }
.jlb-lightbox-prev:hover,
.jlb-lightbox-next:hover {
    background: rgba(255,255,255,0.2); color: #fff;
}
.jlb-lightbox-counter {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    font-size: 12px; color: rgba(255,255,255,0.5);
    letter-spacing: 0.1em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .jlb-hero { min-height: 340px; border-radius: 10px; }
    .jlb-hero-content { padding: 28px 24px; }
    .jlb-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .jlb-gallery-grid .jlb-gallery-item:first-child { grid-column: span 2; }
}
@media (max-width: 480px) {
    .jlb-gallery-grid { grid-template-columns: 1fr; }
    .jlb-gallery-grid .jlb-gallery-item:first-child { grid-column: span 1; }
}

/* ── Full-width breakout ────────────────────────────────────── */
/* Forces hero + gallery to fill full viewport width even inside
   theme content wrappers that constrain width */
.jlb-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;  /* no radius when full-bleed */
}

.jlb-gallery-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 40px 60px;
    box-sizing: border-box;
}

.jlb-back-bar {
    padding: 18px 40px 0;
}

@media (max-width: 768px) {
    .jlb-gallery-section { padding: 0 16px 40px; }
    .jlb-back-bar { padding: 14px 16px 0; }
}
