/* BS Album Matrimonio — stili frontend
 * Usa le variabili del brand definite nel tema (main.css). Se il plugin viene
 * attivato su un sito senza queste variabili, i fallback qui sotto entrano in gioco.
 */

.bs-album-grid,
.bs-album-single,
.bs-album-lightbox {
    --bs-album-cream:  var(--cream, #F5F0EA);
    --bs-album-ivory:  var(--ivory, #FAF7F3);
    --bs-album-gold:   var(--gold, #B8975A);
    --bs-album-gold-lt:var(--gold-lt, #D4B47A);
    --bs-album-dark:   var(--dark, #1C1814);
    --bs-album-mid:    var(--mid, #4A4440);
    --bs-album-light:  var(--light, #8A817A);
    --bs-album-white:  var(--white, #FFFFFF);
    --bs-album-serif:  var(--serif, 'Cormorant Garamond', Georgia, serif);
    --bs-album-sans:   var(--sans, 'Montserrat', Arial, sans-serif);
}

/* -------------------------------------------------------------
 * Stato vuoto
 * ----------------------------------------------------------- */
.bs-album-empty {
    text-align: center;
    color: var(--bs-album-light);
    font-family: var(--bs-album-sans);
    padding: 40px 20px;
}

/* -------------------------------------------------------------
 * Griglia album
 * ----------------------------------------------------------- */
.bs-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin: 32px 0;
}

.bs-album-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bs-album-ivory);
    border: 1px solid rgba(28, 24, 20, 0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bs-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(28, 24, 20, 0.12);
}

.bs-album-card-cover {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bs-album-cream);
}

.bs-album-card-cover img,
.bs-album-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.bs-album-card:hover .bs-album-card-cover img {
    transform: scale(1.05);
}

.bs-album-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-album-light);
    font-size: 32px;
}

.bs-album-card-cta {
    position: absolute;
    left: 20px;
    bottom: 20px;
    color: var(--bs-album-white);
    font-family: var(--bs-album-sans);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bs-album-card:hover .bs-album-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.bs-album-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 24, 20, 0.55), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bs-album-card:hover .bs-album-card-cover::after {
    opacity: 1;
}

.bs-album-card-body {
    padding: 22px 24px 26px;
}

.bs-album-card-title {
    font-family: var(--bs-album-serif);
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 6px;
    color: var(--bs-album-dark);
}

.bs-album-card-subtitle {
    font-family: var(--bs-album-sans);
    font-size: 14px;
    color: var(--bs-album-mid);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* -------------------------------------------------------------
 * Badge tipologie (materiali / stampa / consegna)
 * ----------------------------------------------------------- */
.bs-album-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0;
}

.bs-album-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: var(--bs-album-cream);
    border: 1px solid rgba(184, 151, 90, 0.35);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: var(--bs-album-sans);
    font-size: 12px;
    line-height: 1.4;
}

.bs-album-badge-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    color: var(--bs-album-gold);
    font-weight: 600;
}

.bs-album-badge-value {
    color: var(--bs-album-mid);
}

/* -------------------------------------------------------------
 * Pagina singolo album
 * ----------------------------------------------------------- */
.bs-album-single {
    max-width: 1100px;
    margin: 0 auto;
}

.bs-album-single-cover {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 32px;
    background: var(--bs-album-cream);
}

.bs-album-single-cover .bs-album-cover-img {
    width: 100%;
    max-height: 640px;
    object-fit: cover;
}

.bs-album-single-intro {
    margin-bottom: 36px;
}

.bs-album-specs {
    list-style: none;
    margin: 16px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    font-family: var(--bs-album-sans);
}

.bs-album-specs li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bs-album-specs-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-album-light);
}

.bs-album-specs-value {
    font-size: 16px;
    color: var(--bs-album-dark);
    font-weight: 600;
}

.bs-album-description {
    font-family: var(--bs-album-serif);
    font-size: 19px;
    line-height: 1.7;
    color: var(--bs-album-mid);
    margin-top: 18px;
    max-width: 760px;
}

/* Gallerie tematiche */
.bs-album-galleries {
    margin-top: 48px;
}

.bs-album-gallery-block {
    margin-bottom: 48px;
}

.bs-album-gallery-title {
    font-family: var(--bs-album-serif);
    font-size: 28px;
    color: var(--bs-album-dark);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(184, 151, 90, 0.3);
}

.bs-album-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.bs-album-gallery-grid a {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 3px;
    background: var(--bs-album-cream);
}

.bs-album-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.bs-album-gallery-grid a:hover img {
    transform: scale(1.06);
}

.bs-album-back {
    margin-top: 40px;
    font-family: var(--bs-album-sans);
}

.bs-album-back a {
    color: var(--bs-album-gold);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bs-album-back a:hover {
    color: var(--bs-album-dark);
}

/* -------------------------------------------------------------
 * Lightbox
 * ----------------------------------------------------------- */
.bs-album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(28, 24, 20, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-album-lightbox[hidden] {
    display: none;
}

.bs-album-lightbox-figure {
    margin: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    padding: 24px;
}

.bs-album-lightbox-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    box-shadow: none;
    border-radius: 0;
}

.bs-album-lightbox-figure figcaption {
    margin-top: 14px;
    color: var(--bs-album-cream);
    font-family: var(--bs-album-serif);
    font-size: 18px;
    letter-spacing: 0.02em;
}

.bs-album-lightbox-figure figcaption:empty {
    display: none;
}

.bs-album-lightbox-close,
.bs-album-lightbox-prev,
.bs-album-lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: var(--bs-album-cream);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    padding: 12px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.bs-album-lightbox-close:hover,
.bs-album-lightbox-prev:hover,
.bs-album-lightbox-next:hover {
    color: var(--bs-album-gold-lt);
}

.bs-album-lightbox-close {
    top: 18px;
    right: 24px;
    font-size: 30px;
}

.bs-album-lightbox-prev {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
}

.bs-album-lightbox-next {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
}

@media (max-width: 640px) {
    .bs-album-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .bs-album-card-title {
        font-size: 22px;
    }

    .bs-album-gallery-title {
        font-size: 22px;
    }

    .bs-album-lightbox-prev,
    .bs-album-lightbox-next {
        font-size: 34px;
        padding: 8px;
    }
}
