/* ==========================================================
   Stabilimenti Balneari - Frontend Styles
   ========================================================== */

.sb-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 768px) {
    .sb-wrapper { grid-template-columns: 1fr; }
}

/* ----- FILTRI ----- */
.sb-filters {
    background: #f7f9fc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e4e8f0;
    align-self: start;
    position: sticky;
    top: 20px;
}

.sb-filter-group { margin-bottom: 16px; }

.sb-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.sb-filter-group input[type="text"],
.sb-filter-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.sb-filter-group input[type="text"]:focus,
.sb-filter-group select:focus {
    outline: none;
    border-color: #0077b6;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.sb-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    padding: 8px 10px;
}

.sb-chk {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-weight: normal !important;
    font-size: 13px !important;
    margin: 4px 0;
    cursor: pointer;
}

.sb-chk input { margin: 0; }

.sb-filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.sb-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
}

.sb-btn-primary {
    background: #0077b6;
    color: #fff;
}
.sb-btn-primary:hover { background: #005f92; }

.sb-btn-ghost {
    background: #fff;
    color: #555;
    border: 1px solid #cbd2d9;
}
.sb-btn-ghost:hover { background: #f0f3f7; }

/* ----- MAPPA + RISULTATI ----- */
.sb-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#sb-map {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e4e8f0;
    z-index: 1;
}

.sb-results {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.sb-results-header {
    background: #f7f9fc;
    padding: 12px 16px;
    border-bottom: 1px solid #e4e8f0;
    font-size: 14px;
    color: #555;
}

.sb-results-header #sb-count {
    font-weight: 700;
    color: #0077b6;
}

.sb-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 14px;
    max-height: 500px;
    overflow-y: auto;
}

.sb-list-item {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.sb-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.sb-list-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.sb-list-item-body { padding: 10px 12px; }

.sb-list-item-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.sb-list-item-meta {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
}

.sb-list-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #0077b6;
    margin-top: 6px;
}

.sb-popup-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.sb-popup-link {
    display: inline-block;
    margin-top: 6px;
    color: #0077b6;
    text-decoration: none;
    font-weight: 600;
}

/* ----- SCHEDA SINGOLA ----- */
.sb-single { max-width: 1100px; margin: 30px auto; padding: 0 20px; }

.sb-single-header { margin-bottom: 24px; }

.sb-single-cover {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    max-height: 420px;
}

.sb-single-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-single-title {
    font-size: 32px;
    margin: 0 0 8px;
}

.sb-single-zone {
    color: #666;
    font-size: 15px;
    margin: 0;
}

.sb-single-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .sb-single-grid { grid-template-columns: 1fr; }
}

.sb-services-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}

.sb-services-list li {
    background: #f0f7ff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.sb-info-card {
    background: #f7f9fc;
    border: 1px solid #e4e8f0;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.sb-info-card h3 {
    margin: 0 0 12px;
    font-size: 17px;
}

.sb-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-info-card li {
    padding: 6px 0;
    border-bottom: 1px solid #e4e8f0;
    font-size: 14px;
}

.sb-info-card li:last-child { border-bottom: none; }

/* ----- ARCHIVIO ----- */
.sb-archive { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.sb-archive-header { margin-bottom: 24px; }

.sb-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sb-card {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.sb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.sb-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sb-card-thumb {
    height: 180px;
    overflow: hidden;
}

.sb-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-card-thumb-empty {
    background: linear-gradient(135deg, #74c0fc, #0077b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.sb-card-body { padding: 14px 16px; }

.sb-card-title {
    font-size: 18px;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.sb-card-zone, .sb-card-address {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
}

.sb-card-excerpt {
    font-size: 14px;
    color: #444;
    margin: 8px 0;
}

.sb-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #0077b6;
    margin: 8px 0 0;
}

.sb-pagination {
    margin-top: 30px;
    text-align: center;
}
