* { box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body { margin: 0; padding: 20px; background-color: #f8f9fa; color: #333; }
.container { display: flex; gap: 20px; max-width: 1600px; margin: 0 auto; }
.spacer{min-height:10px}
/* Sidebar Filtri & Sticky */
.sidebar { width: 300px; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 20px; align-self: flex-start; max-height: calc(100vh - 40px); overflow-y: auto; }
.sidebar-logo { text-align: center; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #eee; }
.sidebar-logo img { max-width: 100%; height: auto; max-height: 60px; object-fit: contain; }
.filter-group { margin-bottom: 10px; border-bottom: 0px solid #eee; padding-bottom: 4px; }
.filter-group:last-child { border-bottom: none; }
.filter-group h3 { margin-top: 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: #555; }

.checkbox-grid,
.checkbox-group { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* Cambiato a 4 colonne */
    gap: 6px; 
    margin-top: 8px; 
}

.checkbox-btn { display: none; }
.checkbox-label { display: block; text-align: center; border: 1px solid #ccc; padding: 6px 4px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600; user-select: none; transition: all 0.2s; }
.checkbox-label:hover { border-color: #000; }
.checkbox-btn:checked + .checkbox-label { background: #08303a; color: #fff; border-color: #08303a; }
.range-inputs { display: flex; gap: 10px; }
.range-inputs input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }

/* Header e Switcher */
.main-content { flex: 1; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; background: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.results-header h2 { margin: 0; font-size: 18px; }
.view-switcher { display: flex; gap: 5px; }
.view-btn { padding: 6px 14px; border: 1px solid #ccc; background: #fff; cursor: pointer; border-radius: 4px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.view-btn.active { background: #08303a; color: #fff; border-color: #08303a; }

/* Vista Griglia (nascosta di default) */
.grid { display: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center; padding: 15px; transition: transform 0.2s; display: flex; flex-direction: column; justify-content: space-between; }
.card:hover { transform: translateY(-3px); }
.card img { width: 100%; height: 180px; object-fit: contain; margin-bottom: 10px; background: #fafafa; border-radius: 4px; }
.card .title { font-weight: bold; font-size: 18px; margin-bottom: 5px; color: #111; }
.card .specs { color: #666; font-size: 13px; margin-bottom: 6px; }
.card .price { font-size: 20px; font-weight: bold; color: #1a1a1a; margin: 10px 0; }
.card-actions { display: flex; gap: 8px; justify-content: center; margin-top: auto; }

/* Vista Tabella */
.table-container { background: #fff; border-radius: 8px; overflow-x: auto; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: block; }
.diamonds-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.82rem;}
.diamonds-table th { background: #f1f3f5; font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6; font-size: 12px; padding: 6px 4px;  vertical-align: middle !important;  white-space: nowrap;  }
.diamonds-table td { padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: middle; font-size: 12px; padding: 6px 4px;  vertical-align: middle !important;  white-space: nowrap;}
.diamonds-table tr:hover { background-color: #f8f9fa; }
.diamonds-table .table-img { width: 38px; height: 38px; object-fit: contain; border-radius: 4px; background: #fafafa; }
.diamonds-table .price-col { font-weight: bold; color: #1a1a1a; text-align: right; }
.diamonds-table .btn { padding: 4px 8px; font-size: 11px; }
.diamonds-table td:last-child .btn { padding: 2px 6px; font-size: 0.75rem;}
.measures {font-size: 0.56rem;}
/* Bottoni generali e varianti */
.btn { text-decoration: none; padding: 6px 10px; font-size: 12px; font-weight: 600; border-radius: 4px; border: 1px solid #333; color: #333; text-align: center; display: inline-block; }
.btn-primary { background-color: #0f4c5c; color: #ffffff; border: 1px solid #0f4c5c; transition: all 0.2s ease-in-out; }
.btn-primary:hover { background-color: #08303a; border-color: #08303a; }
.btn-whatsapp { background-color: #25d366; color: #ffffff; border: 1px solid #25d366; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; font-size: 1.1rem; border-radius: 4px; text-decoration: none; transition: background-color 0.2s ease; }
.btn-whatsapp:hover { background-color: #1da851; border-color: #1da851; }

/* Paginazione */
.pagination-container { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 25px; flex-wrap: wrap; }
.pagination-btn { padding: 6px 12px; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pagination-btn:hover:not(:disabled) { border-color: #000; background: #f8f9fa; }
.pagination-btn.active { background: #08303a; color: #fff; border-color: #08303a; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-admin-link { display: inline-block; font-size: 13px; color: #2c3e50; background-color: #f1f5f9; padding: 4px 10px; border-radius: 4px; text-decoration: none; border: 1px solid #cbd5e1; font-weight: 500; transition: background 0.2s ease; }
.btn-admin-link:hover { background-color: #e2e8f0; color: #0f172a; }

/* Contenitore informazioni utente */
.user-info { display: flex; flex-direction: column; gap: 8px; }

/* Contenitore dei pulsanti d'azione (Importa e Logout) */
.btn-action { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: #2c3e50; background-color: #f1f5f9; padding: 5px 12px; border-radius: 4px; text-decoration: none; border: 1px solid #cbd5e1; transition: all 0.2s ease-in-out; }
.btn-action:hover { background-color: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
.btn-action.btn-logout:hover { background-color: #fef2f2; color: #991b1b; border-color: #fca5a5; }

.btn-action .icon { font-size: 14px; line-height: 1; }
.user-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; }
.user-actions .btn-action { width: 100%; max-width: 200px; justify-content: flex-start; }

/* Titoli delle sezioni filtri */
.filter-title { display: block; font-weight: bold; font-size: 0.85rem; color: #333; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Contenitore pulsanti in riga */
.btn-group-toggle { display: flex; gap: 8px; }

/* Nasconde il radio button nativo */
.toggle-btn input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* Stile del pulsante */
.toggle-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; color: #333; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-align: center; user-select: none; transition: all 0.2s ease-in-out; }
.toggle-btn:hover { border-color: #888; background-color: #f8f9fa; }
.toggle-btn:has(input[type="radio"]:checked),
.toggle-btn input[type="radio"]:checked + span { background-color: #0f4c5c; color: #fff; border-color: #0f4c5c; }

.carat-inputs { display: flex; gap: 10px; margin-bottom: 15px; }
.carat-inputs input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; text-align: center; }

/* Container dello Slider */
.range-slider-container { position: relative; width: 100%; height: 20px; }

/* Traccia dello Slider */
.slider-track { position: absolute; top: 50%; transform: translateY(-50%); height: 4px; width: 100%; background-color: #e0e0e0; border-radius: 2px; z-index: 1; }

/* Sovrapposizione dei due Range Input */
.range-slider-container input[type="range"] { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 100%; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; margin: 0; z-index: 2; }

/* Cursore del Range (Thumb) */
.range-slider-container input[type="range"]::-webkit-slider-thumb { height: 18px; width: 18px; border-radius: 50%; background: #000; border: 2px solid #fff; cursor: pointer; pointer-events: auto; box-shadow: 0 1px 4px rgba(0,0,0,0.3); -webkit-appearance: none; }
.range-slider-container input[type="range"]::-moz-range-thumb { height: 18px; width: 18px; border-radius: 50%; background: #000; border: 2px solid #fff; cursor: pointer; pointer-events: auto; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* Nasconde l'input checkbox nativo */
.checkbox-btn input[type="checkbox"] { display: none; }

/* Aspetto del pulsante */
.checkbox-btn span { display: flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; color: #333; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-align: center; user-select: none; transition: all 0.2s ease-in-out; }

/* Stato selezionato e hover */
.checkbox-btn input[type="checkbox"]:checked + span { background-color: #000; color: #fff; border-color: #000; }
.checkbox-btn:hover span { border-color: #888; }

/* --- BOTTONI FILTRI UNIFORMATI (COLOR, CUT, POLISH, SYMMETRY, FLUOR, LAB) --- */
.filter-btn,
.fluor-btn {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: all 0.2s ease-in-out;
}

.filter-btn:hover,
.fluor-btn:hover {
    border-color: #000;
}

.filter-btn.active,
.fluor-btn.active {
    background-color: #08303a;
    color: #fff;
    border-color: #08303a;
}


.sottotitolo {display:block!important;padding: 0px 20px!important}

.dual-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dual-range-inputs input {
    width: 50%;
}