/* ============================================================
   Jewelry Lookbook – Frontend Styles
   ============================================================ */

/* ── Grid Layout ────────────────────────────────────────────── */
.jlb-lookbook {
    display: grid;
    gap: 28px;
    padding: 20px 0;
    font-family: inherit;
}

.jlb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.jlb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.jlb-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .jlb-cols-3,
    .jlb-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .jlb-cols-2,
    .jlb-cols-3,
    .jlb-cols-4 { grid-template-columns: 1fr; }
    .jlb-lookbook { gap: 20px; }
}

/* ── Card Base ──────────────────────────────────────────────── */
.jlb-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.jlb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.13);
}

.jlb-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* ── Image Area ─────────────────────────────────────────────── */
.jlb-card-image {
    position: relative;
    width: 100%;
    padding-top: var(--jlb-img-ratio, 75%);
    overflow: hidden;
    background: #f5f0eb;
}

.jlb-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.jlb-card:hover .jlb-card-image img {
    transform: scale(1.05);
}
.jlb-no-zoom .jlb-card:hover .jlb-card-image img {
    transform: none;
}

.jlb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8dfd6 100%);
    color: #999;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Badge ──────────────────────────────────────────────────── */
.jlb-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

/* ── Card Body (card style) ─────────────────────────────────── */
.jlb-style-card .jlb-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jlb-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.jlb-card-subtitle {
    margin: 0;
    font-size: 13px;
    color: #888;
    font-style: italic;
    line-height: 1.4;
}

.jlb-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.jlb-meta-year,
.jlb-meta-pieces {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaa;
}

.jlb-meta-year::after {
    content: '·';
    margin-left: 12px;
    color: #ddd;
}

.jlb-view-btn {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
    border-bottom: 1.5px solid #1a1a1a;
    padding-bottom: 1px;
    transition: opacity 0.2s;
    align-self: flex-start;
}

.jlb-card:hover .jlb-view-btn {
    opacity: 0.5;
}

/* ── Overlay Style ──────────────────────────────────────────── */
.jlb-style-overlay .jlb-card-image {
    padding-top: 120%;   /* portrait ratio for overlay */
}

.jlb-style-overlay .jlb-card-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px 22px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.18) 50%,
        transparent 100%
    );
    color: #fff;
    opacity: 0;
    transition: opacity 0.32s ease;
}

.jlb-style-overlay .jlb-card:hover .jlb-card-body {
    opacity: 1;
}

.jlb-style-overlay .jlb-card-title { color: #fff; }
.jlb-style-overlay .jlb-card-subtitle { color: rgba(255,255,255,0.75); }
.jlb-style-overlay .jlb-meta-year,
.jlb-style-overlay .jlb-meta-pieces { color: rgba(255,255,255,0.55); }
.jlb-style-overlay .jlb-view-btn {
    color: #fff;
    border-color: #fff;
}

/* ── Empty State ────────────────────────────────────────────── */
.jlb-empty {
    padding: 40px;
    text-align: center;
    background: #faf8f6;
    border: 2px dashed #e0d8d0;
    border-radius: 12px;
    color: #888;
    font-size: 15px;
}

.jlb-empty a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: underline;
}
