/* === GRIGLIA CARD === */
.imaco-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* === CARD CATEGORIA === */
.imaco-card {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* centro verticale */
    align-items: center;      /* centro orizzontale */
    padding: 1rem;
    min-height: 160px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    text-align: center;
}

.imaco-card:hover {
    transform: scale(1.03);
    border-color: #999;
}

.imaco-card-icona {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;  /* distanza dal testo */
    line-height: 1;
}

.imaco-card-descrizione {
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    text-transform: uppercase;
    line-height: 1.3;
}

/* === DESCRIZIONE CATEGORIA === */
.imaco-card-descrizione {
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    text-transform: uppercase;
    line-height: 1.3;
    padding: 0 0.5rem;
}

/* === MODALE === */
.imaco-modale-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.imaco-modale {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.imaco-modale-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.no-scroll {
    overflow: hidden;
}

/* === RICERCA === */
#imaco-search-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

#imaco-search-label {
    font-weight: 400;
    font-size: 1rem;
    color: #333;
}

#imaco-search {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 1rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: border 0.2s, box-shadow 0.2s;
}

#imaco-search:focus {
    outline: none;
    border-color: #6495ed;
    box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.2);
}

/* === SELECT PER-PAGE === */
#imaco-per-page-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #444;
}

#imaco-per-page-label {
    font-size: 1rem;
    font-weight: 400;
    color: #444;
}

#imaco-per-page {
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.6rem;
    padding-right: 1.6rem;
}

/* === PAGINAZIONE === */
#imaco-categorie-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.pagina-btn {
    padding: 0.5rem 0.9rem;
    border: 1px solid #ccc;
    border-radius: 999px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    color: #333;
    font-weight: 400;
    min-width: 38px;
    text-align: center;
}

.pagina-btn:hover {
    background-color: #f2f2f2;
    transform: scale(1.05);
}

/* === WRAPPER GENERALE === */
#imaco-categorie-container {
    margin-bottom: 3rem;
}

/* === FORM PRODOTTI (Contact Form 7) === */
#imaco-prodotti-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    font-family: 'Segoe UI', sans-serif;
    background-color: #fff;
}

#imaco-prodotti-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#imaco-prodotti-container a {
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
}

#imaco-prodotti-container label {
    font-weight: bold;
    display: block;
    margin-top: 1rem;
}

#imaco-prodotti-container select,
#imaco-prodotti-container input,
#imaco-prodotti-container textarea {
    width: 100%;
    padding: 10px;
    margin-top: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#imaco-prodotti-container .wpcf7-form {
    margin-top: 2rem;
}

#imaco-prodotti-container .wpcf7-submit {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

#imaco-prodotti-container .wpcf7-submit:hover {
    background-color: #005f8d;
}

#imaco-prodotti-container .wpcf7-response-output {
    margin-top: 1rem;
}


