@import url("https://fast.fonts.net/lt/1.css?apiType=css&c=71859412-59da-4517-b830-e1a8964abd25&fontids=1475500");
@font-face{
	font-family:"Avenir LT";
	src:url("../font/bfb11081-e571-43ad-bed9-8953cfd4133e.woff2") format("woff2"),url("../font/e35493b4-782b-41f0-b3f0-b7e5d0ceab0b.woff") format("woff");
}

:root {
    --primary-color: #3d3d3d;
    --secondary-color: #f5f5f5;
    --accent-color: #3c3c3c;
    --text-color: #333;
    --border-color: #ddd;
    --header-height: 80px;
    --header-compressed-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {    
	font-family: 'Avenir LT', Helvetica, arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: calc(var(--header-height) + 100px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.compressed {
    background-color: var(--secondary-color);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    transition: all 0.3s ease;
}

.header.compressed .header-content {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.logo-container {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    width: 200px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header.compressed .logo-container {
    margin-bottom: 0;
    width: 150px;
    height: 40px;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.header.compressed .logo {
    max-height: 100%;
}

.search-container {
    width: 100%;
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}


.search-filters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: end;
}

.header.compressed .search-filters {
    display: flex;
    gap: 0.5rem;
    margin: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Avenir LT', Helvetica, arial, sans-serif;
    background-color: white;
    width: 100%;
}
@media screen and (min-width: 1024px) {
.header.compressed .filter-group {
    margin: 0;
}

.header.compressed .filter-group label {
    display: none;
}

.header.compressed .filter-group select {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    width: auto;
    min-width: 120px;
}

.header.compressed .search-container {
    width: auto;
    background: none;
    padding: 0;
}
.search-toggle, .search-close, .active-filters {
    display: none;
}
}
.button-group {
    display: flex;
    gap: 0.5rem;
    align-self: flex-end;
}

.search-button, .reset-button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Avenir LT', Helvetica, arial, sans-serif;
    transition: all 0.3s ease;
    height: 38px;
}

.search-button {
    background-color: var(--accent-color);
    color: white;
}

a.search-button {
    margin: 1rem 0;
    display: inline-block;
    text-decoration: none;
}

.reset-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.search-button:hover {
    background-color: #111111;
}

.reset-button:hover {
    background-color: #e9ecef;
}

.header.compressed .button-group {
    margin: 0;
}

.header.compressed .search-button,
.header.compressed .reset-button {
    padding: 0.25rem 1rem;
    height: 30px;
    font-size: 0.85rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.pen-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    text-align: center;
}

.pen-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pen-image-container {
    position: relative;
    width: 100%;
    height: 7rem;
    overflow: hidden;
    cursor: pointer;
}

.pen-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pen-image.front {
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.pen-image.side {
    z-index: 1;
}

.pen-card:hover .pen-image.front {
    opacity: 0;
}

.pen-info {
    padding: 1rem;
}

.pen-model {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.pen-details {
    font-size: 0.9rem;
    color: #666;
}

.pen-details p {
    margin-bottom: 0.25rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Quando non ci sono risultati, modifica il layout della griglia */
.results-grid:has(.no-results) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Stili per il paging */
.pagination-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}
.contatti {
    background-color: var(--secondary-color);
    padding: 2rem;
    margin: 2rem 0;
    font-size:1.2rem;
    text-align: center;
    font-weight: bold;
    
}
.contatti a {
    color:var(--accent-color);
    display: inline-block;
    padding: 0.5rem 2rem;
    margin: 0 0.5rem;
    margin-top: 2rem;
    border:1px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.3s;
    background-color: #ffffff
}

.contatti a:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}


.contatti a.contatti_wa {
    padding-left: 3rem;
    background-image: url("../img/whatsapp.svg");
    background-repeat: no-repeat; 
    background-size: 1.3rem;
    background-position: 1rem 50%
}


/* Aggiungiamo padding al main per evitare che il contenuto venga nascosto dal paging fisso */
main {
    padding-bottom: 80px; /* Altezza del paging + margine */
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Avenir LT', Helvetica, arial, sans-serif;
}

.pagination-button:hover {
    background: var(--secondary-color);
}

.pagination-button.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-family: 'Avenir LT', Helvetica, arial, sans-serif;
}

.pagination-info {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Nascondiamo il paging quando non ci sono risultati */
.pagination-container:empty {
    transform: translateY(100%);
}

/* Aggiungiamo anche spazio al container principale */
main.container {
    padding-top: 3rem; /* Aggiunto padding-top */
    padding-bottom: 80px; /* Manteniamo il padding-bottom per il paging */
}

/* Stili per il layout mobile */
@media screen and (max-width: 1023px) {
    body {
        padding-top: 0px;
    }
    .container {
        padding: 10px 20px;
        transition: all 0.3s ease;
    }
    .header.compressed .container {
        padding: 0px 20px;
    }
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
    }

    .logo-container {
        margin: 0;
        width: 120px;
        height: 40px;
    }

    .header.compressed .logo-container {
        margin: 0;
        width: 75px;
        height: 40px;
    }

    .search-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1001;
        padding: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .search-container.active {
        transform: translateX(0);
    }

    .search-filters {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group label {
        display: block;
        margin-bottom: 0.5rem;
    }

    .filter-group select {
        width: 100%;
    }

    .button-group {
        width: 100%;
        justify-content: space-between;
    }

    .search-button,
    .reset-button {
        width: 48%;
    }

    .search-toggle {
        display: block;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        transition: all 0.3s ease;
    }

    .compressed .search-toggle {
        width: 30px;
        height: 30px;
    }

    .search-toggle img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .search-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .search-close img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .active-filters {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: 1rem;
        font-size: 0.9rem;
        color: var(--text-color);
    }

    .active-filters span {
        background: var(--secondary-color);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.8rem;
    }

    /* Stili per il paging mobile */
    .pagination-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }

    .per-page-selector {
        width: 100%;
        justify-content: center;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
    }
} 

/* Stili per il modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-overlay.closing .modal-content {
    transform: scale(0.8);
    opacity: 0;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: center center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 1;
}

.modal-overlay.active .modal-content {
    transform: none;
}

.modal-content .modal-image,
.modal-content .modal-info {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-content.animation-complete .modal-image,
.modal-content.animation-complete .modal-info {
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    line-height: 1;
    z-index: 1;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-nav::before {
    content: '';
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.modal-nav.prev::before {
    background-image: url('../img/chevron-left.svg');
}

.modal-nav.next::before {
    background-image: url('../img/chevron-right.svg');
}

.modal-nav:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.modal-info {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.modal-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.modal-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-info .search-button {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Stili specifici per il modale */
.modal-image-container {
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.modal-image {
    position: relative;
    width: 50%;
    height: 100%;
    object-fit: contain;
}

.modal-image:first-child {
    transform: translateX(50px);
    z-index: 1;
}

.modal-image:last-child {
    transform: translateX(-50px);
}

.modal-nav.prev {
    left: 1rem;
}

.modal-nav.next {
    right: 1rem;
} 
@media screen and (min-width: 1800px) {
    .container { max-width:90vw}
}
