/* Catalogo Markon - aggiunte leggere per filtri, card e gallery */
.catalogo-wrap {
    width: 100%;
    box-sizing: border-box;
    padding-left: 5%;
    padding-right: 5%;
}

.catalogo-hero {
    max-width: 980px;
    padding: 40px 0 20px;
}

.catalogo-hero h1,
.product-copy h1 {
    margin: 0 0 12px;
    line-height: 1;
}

.catalogo-hero p {
    max-width: 760px;
}

.filters-block {
    display: grid;
    gap: 24px;
    margin: 10px 0 38px;
}

.filter-group {
    display: grid;
    gap: 10px;
}

.filter-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #323e48;
}

.filter-masonry {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}


/*
    FILTRI A MENU A TENDINA
    Qui modifichi graficamente i due select dei filtri.
*/
.filters-block-select {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    max-width: 900px;
}

.filter-select {
    width: 100%;
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    padding: 16px 48px 16px 18px;
    background-color: #f0f0f0;
    color: #323e48;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    background-image: linear-gradient(45deg, transparent 50%, #323e48 50%), linear-gradient(135deg, #323e48 50%, transparent 50%);
    background-position: calc(100% - 24px) 50%, calc(100% - 17px) 50%;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

.filter-select:focus {
    outline: 3px solid rgba(231,57,80,.25);
}

.filter-select:hover {
    background-color: #e8e8e8;
}

/*
    QUI MODIFICHI I BOTTONI DEI FILTRI / "MASONRY"
    - background: colore bottone normale
    - color: colore testo
    - border-radius: forma
    - padding: dimensione bottone
    - .filter-btn.active: bottone selezionato
*/
.filter-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    padding: 12px 18px;
    background: #f0f0f0;
    color: #323e48;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    transition: transform .2s ease, opacity .2s ease;
}

.filter-btn:nth-child(2n) { padding-top: 20px; padding-bottom: 20px; }
.filter-btn:nth-child(3n) { border-radius: 18px; }
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active { background: #E73950; color: #fff; }

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.product-card {
    position: relative;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.product-card.hidden { display: none; }

.card-gallery {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #f4f4f4;
}

.card-gallery-image {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.card-gallery-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/*
    QUI MODIFICHI LE FRECCE DELLE GALLERY NELLE CARD
    - width/height: grandezza cerchio
    - background: sfondo freccia
    - color: colore freccia
    - font-size: grandezza simbolo ‹ ›
*/
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    color: #323e48;
    cursor: pointer;
    font-size: 28px;
    line-height: 30px;
    z-index: 2;
}

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

.card-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 0;
}

.card-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: #c7c7c7;
    cursor: pointer;
}

.card-dot.active { background: #E73950; }

.product-card h2,
.product-card h3,
.product-card h4,
.product-card p {
    margin-left: 0;
    margin-right: 0;
}

.product-card h2 { margin-top: 18px; }

.product-card-cta {
    display: block;
    text-decoration: none;
    margin-top: 18px;
}

.product-card-cta div {
    border-radius: 999px;
    padding: 11px 15px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: start;
    padding: 40px 0 70px;
}

.product-eyebrow {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .06em;
    color: #E73950;
}

.product-subtitle { margin-bottom: 25px; }

.product-info-list {
    display: grid;
    gap: 18px;
    margin-top: 30px;
}

.product-back {
    display: inline-block;
    margin-top: 30px;
    color: #323e48;
    font-weight: 700;
    text-decoration: none;
}

.product-gallery {
    display: grid;
    gap: 14px;
}

.product-main-image {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #f4f4f4;
    cursor: zoom-in;
}

.product-main-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.product-thumb {
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    background: #f4f4f4;
    cursor: pointer;
}

.product-thumb.active { border-color: #E73950; }
.product-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 7%;
    background: rgba(0,0,0,.82);
    z-index: 99999;
    box-sizing: border-box;
}

.image-lightbox.open { display: flex; }
.image-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/*
    QUI MODIFICHI LE FRECCE DELL'IMMAGINE INGRANDITA / LIGHTBOX
*/
.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.9);
    color: #323e48;
    cursor: pointer;
}

.lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 40px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    border-radius: 999px;
    font-size: 48px;
    line-height: 50px;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }


/* Palette colori richiamata dal campo Colori di Google Sheets
   - URL completo: viene mostrato direttamente
   - nome file: viene cercato in img/colori/
   - campo vuoto: prova img/colori/Codice_Prodotto.png
*/
.product-color-palette {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin-top: 8px;
    border-radius: 12px;
}

.muted { opacity: .55; }

@media (max-width: 1050px) {
    .catalogo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .catalogo-wrap { padding-left: 6%; padding-right: 6%; }
    .catalogo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .product-detail { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
    .catalogo-grid { grid-template-columns: 1fr; }
    .filter-btn { width: auto; font-size: 13px; padding: 10px 14px; }
    .filter-btn:nth-child(2n) { padding-top: 14px; padding-bottom: 14px; }
    .product-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lightbox-nav { width: 40px; height: 54px; font-size: 38px; }
}


.catalogo-status {
    grid-column: 1 / -1;
    padding: 40px 20px;
    font-size: 18px;
}
