/*
 * SiteSetter - pagine di sistema (carrello, cassa, account, prodotti, contatti, articoli...)
 * ------------------------------------------------------------------
 * Stile neutro: font e colori arrivano dal tema attivo (si carica PRIMA del CSS del tema, che vince)
 * e dalle variabili --ssb-* di builder-base.css. Header e footer qui sotto si vedono solo finché
 * non ci sono quelli comuni (Pagine › Header e footer).
 */
.ss-sys-header, .ss-sys-footer { font: inherit; }
.ss-sys-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.ss-sys-header-inner, .ss-sys-footer-inner { max-width: var(--ssb-max, 1160px); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 20px; }
.ss-sys-logo { font-weight: 700; font-size: 1.2rem; color: inherit; text-decoration: none; margin-right: auto; }
.ss-sys-logo img { display: block; max-height: 44px; width: auto; }
.ss-sys-nav { display: flex; align-items: center; gap: 18px; }
.ss-sys-nav .ssb-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.ss-sys-nav .ssb-submenu { display: none; }
.ss-sys-nav a { color: inherit; text-decoration: none; }
.ss-sys-nav a:hover, .ss-sys-nav .is-active > a { color: var(--ssb-primary, #1f4fd8); }
.ss-sys-icon { position: relative; }
.ss-sys-badge { position: absolute; top: -8px; right: -12px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #d32f2f; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ss-sys-langs { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ss-sys-langs a.active { font-weight: 700; }
.ss-sys-burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.ss-sys-burger span { display: block; width: 22px; height: 2px; margin: 5px 0; background: currentColor; }
@media (max-width: 860px) {
    .ss-sys-burger { display: block; }
    .ss-sys-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
    .ss-sys-nav.is-open { display: flex; }
    .ss-sys-nav .ssb-menu { flex-direction: column; }
}
.ss-sys-footer { margin-top: 60px; border-top: 1px solid rgba(0, 0, 0, .08); font-size: .9rem; }
.ss-sys-footer a { color: inherit; }
.ss-sys-footer-inner { justify-content: space-between; flex-wrap: wrap; }
.ss-sys-footer-links { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }

/* Elementi comuni */
.checkbox, .filter-checkbox { width: 20px; height: 20px; accent-color: var(--ssb-primary, #1f4fd8); }
.row { height: auto; border: none; margin: auto; padding: 0; display: flex; flex-direction: row; justify-content: space-evenly; }
.hidden { display: none; }

/*** Begin Contact ***/
.contact-section {
    margin-top: 100px;
}
.contact-container {
    height: auto;
    border: none;
    margin: auto;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 80%;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 45%;
    justify-content: space-between;
}
.contact-block {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    position: relative;
    max-width: 100%;
    flex-direction: column;
}
.contact-item {
    width: 45%;
}
.contact-item-title {
    margin-bottom: 10px;
    color: var(--ssb-text, #1e2430);
}
.contact-item-text {
    color: var(--ssb-text, #1e2430);
    margin-bottom: 10px;
    line-height: 1.6;
}
.map-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.map-iframe {
    width: 100%;
    height: 100%;
}
.form-section {
    padding: 50px 0;
    text-align: center;
    background-color: #fff;
    margin-top: 50px;
}
.contact-form-container {
    border-radius: 15px;
    max-width: 80%;
    width: 100%;
}
.contact-form {
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}
.double-contact-input {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}
.contact-form h2 {
    color: var(--ssb-primary, #1f4fd8);
    margin-bottom: 20px;
    text-align: center;
}
.input {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
.input-textarea {
    height: 100px;
    width:100%;
    resize: vertical;
}
.contact-form .btn-submit {
    background: var(--ssb-primary, #1f4fd8);
    color: var(--ssb-text, #1e2430);
    border: none;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.3s ease-in-out;
}
.privacy-text-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 20px;
}
.privacy-text {
    color: var(--ssb-text, #1e2430);
}
.contact-form .btn-submit:hover {
    background: var(--ssb-text, #1e2430);
    color: var(--ssb-primary, #1f4fd8);
}
.social-list {
	width: 100%;
	display: flex;
	flex-direction: row;
	padding-inline-start: 0;
	margin-block-start: 0;
	margin-block-end: 0;
	justify-content: flex-start;
}
.social-list-item {
	margin-right: 20px;
}
.social-link {
	color: black
}
@media all and (max-width: 768px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1070px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min-resolution: 192dpi) and (max-width: 1070px), only screen and (min-resolution: 2dppx) and (max-width: 1070px) {
    .contact-container {
        flex-direction: column;
    }
    .contact-info {
        width: 100%;
    }
    .map-container {
        margin-top: 20px;
        height: 300px;
    }
}
/*** End Contact ***/



/*** Begin Products ***/
.products-category-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.products-category {
    width: 100%;
    display: flex;
    flex-direction: row;
}
.invert {
    flex-direction: row-reverse;
}
.products-category-description-container {
    width: 55%;
    display: flex;
    flex-direction: column;
}
.products-category-description {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    align-items: center;
}
.products-category-description-text {
    width: 50%;
    text-align: justify;
    word-wrap: break-word;
}
.products-category-description-title {
    font-size: 2.5em;
    color: var(--ssb-text, #1e2430);
    margin-block-start: 0em;
    margin-block-end: 0em;
}
.products-category-button-container {
    width: 100%;
    height: 20%;
    background-color: var(--ssb-primary, #1f4fd8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.products-category-button {
    border: none;
    padding: 15px;
    margin: 0;
    background-color: #fff;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    font-weight: 700;
    color: var(--ssb-primary, #1f4fd8);
    text-decoration: none;
}
.products-category-photo {
    width: 45%;
    min-height: 500px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.products-section{
    width: 100%;
    background-color: #fff;
    margin-top: 100px;
}
.product-filters-column {
    width: 20%;
}
.filters-container {
    box-sizing: border-box;
    max-width: 90%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #d9d9d9;
    position: sticky;
    top: 20px;
}
.filters-container-title {
    color: var(--ssb-text, #1e2430);
}
.filters-container-text {
    color: var(--ssb-text, #1e2430);
}
.products-list-column {
    width: 80%;
    background-color: #fff;
}
.grid-container {
    max-width: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne di dimensioni uguali */
    gap: 20px; /* Spaziatura tra gli elementi */
}
.product-card {
    background: #fff;
    color: var(--ssb-text, #1e2430);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    flex-basis: 33.33%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.product-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 4px solid var(--ssb-primary, #1f4fd8);
}

.product-card h3 {
    padding: 10px;
}

.product-card p {
    padding: 0 10px 10px;
}
.product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    color: var(--ssb-text, #1e2430);
}
.btn-details {
    display: inline-block;
    padding: 10px 20px;
    background: var(--ssb-text, #1e2430);
    color: var(--ssb-primary, #1f4fd8);
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}
@media all and (max-width: 768px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1070px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min-resolution: 192dpi) and (max-width: 1070px), only screen and (min-resolution: 2dppx) and (max-width: 1070px) {
    .products-category {
        flex-direction: column;
    }
    .invert {
        flex-direction: row;
    }
    .products-category-description-container {
        width: 100%;
    }
    .products-category-description-text {
        width: 80%;
    }
    .products-category-photo {
        width: 100%;
    }
    .row {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .product-filters-column {
        width: 100%;
    }
    .filters-container {
        max-width: 100%;
        position: relative;
        top: 0;
    }
    .products-list-column {
        width: 100%;
    }
    .product-card {
        max-width: 100%;
    }
    @media (max-width: 1070px) {
        .grid-container {
            padding-top: 20px;
            grid-template-columns: repeat(2, 1fr); /* 2 colonne su schermi medi */
        }
    }
    @media (max-width: 768px) {
        .grid-container {
            padding-top: 20px;
            grid-template-columns: 1fr; /* 1 colonna su schermi piccoli */
        }
    }
}
/*** End Products ***/



/*** Begin Single Product ***/
.single-product {
    padding: 100px 0 0 0;
    background-color: #fff;
}
.single-product-container {
    padding: 50px;
}
.product-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}
.product-images {
    width: 50%;
    position: sticky;
    top: 10px;
}
.main-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.thumbnail-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
    flex-wrap: wrap;
}
.thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    margin: 10px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}
.thumbnail:hover {
    transform: scale(1.1);
}
.product-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
}
.product-description {
    margin-bottom: 20px;
}
.product-specs {
    list-style: none;
    padding: 0;
    margin-block-start: 0;
    margin-block-end: 0;
}
.product-specs li {
    margin-bottom: 10px;
}
.related-products {
    text-align: center;
    background: #fff;
    color: var(--ssb-text, #1e2430);
    padding: 50px 20px;
}
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
/*.related-product-grid {
    display: flex;
    overflow: hidden;
    width: 70%;
    scroll-behavior: smooth;
    position: relative;
    justify-content: center;
}*/
.related-product-grid {
    display: flex;
    overflow-x: scroll;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    max-width: 90%;
    width: 90%; /* Imposta la larghezza a 100% per riempire correttamente lo spazio */
    scroll-behavior: smooth;
    position: relative;
    justify-content: flex-start; /* Allinea gli elementi all'inizio */
    padding: 20px;
}
/*.related-product-card {
    flex: 0 0 30%;
    margin: 0 10px;
    background: #fff;
    color: var(--ssb-text, #1e2430);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    margin: 10px;
    box-sizing: border-box;
}*/
.related-product-card {
    flex: 0 0 25%;
    margin: 0 10px; /* Mantieni solo un margine */
    background: #fff;
    color: var(--ssb-text, #1e2430);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
.related-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 4px solid var(--ssb-primary, #1f4fd8);
}
.related-product-card h3 {
    padding: 10px;
}
.related-product-card p {
    padding: 0 10px 10px;
}
/*.carousel-btn-container {
    position: absolute;
    width: 100%;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    visibility: hidden;
}*/
.carousel-btn-container {
    position: absolute;
    width: calc(100% + 40px); /* Espandi la larghezza per evitare sovrapposizioni */
    left: -20px; /* Aggiungi uno spostamento negativo se necessario */
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.carousel-container:hover .carousel-btn-container {
    visibility: visible;
}
.carousel-btn {
    background-color: var(--ssb-primary, #1f4fd8);
    border: none;
    color: var(--ssb-text, #1e2430);
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.3s ease;
    opacity: 0.7;
}
.carousel-btn:hover {
    background-color: var(--ssb-text, #1e2430);
    color: var(--ssb-primary, #1f4fd8);
    opacity: 1;
}
/*@media (max-width: 768px) {
    .related-product-card {
        flex: 0 0 80%;
        /*margin: 10px 10%;*/
/*    }
    .related-product-grid {
        width: 80%;
    }
    .carousel-btn-container {
        visibility: visible;
    }
}*/
@media all and (max-width: 768px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1070px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1070px), only screen and (min-resolution: 192dpi) and (max-width: 1070px), only screen and (min-resolution: 2dppx) and (max-width: 1070px) {
    .product-details {
        flex-direction: column;
    }
    .product-images {
        width: 100%;
        position: relative;
        top: 0;
    }
}
/* Media query per schermi piccoli, come smartphone in verticale */
@media (max-width: 480px) {
    .related-product-card {
        flex: 0 0 100%; /* Ogni prodotto occupa tutta la larghezza */
        margin: 10px 0;
    }
    .related-product-grid {
        width: 100%; /* Adatta la larghezza al dispositivo */
    }
    .carousel-btn-container {
        visibility: visible; /* I pulsanti restano sempre visibili */
    }
}

/* Media query per schermi medi, come smartphone più grandi o piccoli tablet */
@media (max-width: 768px) {
    .related-product-card {
        flex: 0 0 80%; /* Ogni prodotto occupa il 80% della larghezza */
        margin: 10px 10%; /* Margini per centrare il prodotto */
    }
    .related-product-grid {
        width: 80%; /* Riduci la larghezza per un aspetto migliore */
    }
    .carousel-btn-container {
        visibility: visible;
    }
}

/* Media query per schermi larghi, come tablet in orizzontale */
@media (max-width: 1024px) {
    .related-product-card {
        flex: 0 0 90%; /* Ogni prodotto occupa il 45% della larghezza */
        margin: 10px 2.5%; /* Margini per allineamento */
    }
    .related-product-grid {
        width: 90%; /* Adatta la larghezza al layout */
    }
}

/* Media query per schermi molto larghi, come desktop */
@media (min-width: 1025px) {
    .related-product-card {
        flex: 0 0 30%; /* Ogni prodotto occupa il 30% della larghezza */
        margin: 0 10px;
    }
    .related-product-grid {
        width: 70%; /* Mantieni la larghezza al 70% */
    }
    .carousel-btn-container {
        visibility: hidden; /* I pulsanti appaiono solo al passaggio del mouse */
    }
}

/*** End Single Product ***/

/* Homepage di riserva (it/index.php) */
.ss-sys-home { max-width: 760px; margin: 0 auto; padding: 120px 20px; text-align: center; }
.ss-sys-home h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; }

/* tabelle (carrello, ordini, indirizzi, liste, area clienti): sul telefono scorre la tabella, non la pagina */
.ss-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ss-table-scroll > table { margin-bottom: 0; }
.ss-table-scroll:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
