/* /assets/css/search-grid.css */
/* (NEW Version - professional grid WITH description) */

:root {
    --sbs-blue: #022279;
    --sbs-green: #16a34a; /* Green from 'Call Now' */
    --sbs-border: #e2e8f0;
    --sbs-text-dark: #334155;
    --sbs-text-light: #64748b;
    --sbs-bg-light: #f8fafc; /* Light grey for stats box */
    --sbs-primary-font: 'Arial', sans-serif;
}

.sbs-grid-wrapper {
    display: grid;
    gap: 1.5em;
    margin-top: 2em; /* Gap from "Found..." text */
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .sbs-grid-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .sbs-grid-wrapper { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
    .sbs-grid-wrapper { grid-template-columns: repeat(4, 1fr); }
}

/* --- The Service Card --- */
.sbs-grid-card {
    background: #fff;
    border: 1px solid var(--sbs-border);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sbs-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* 1. Header (Image + Title) */
.sbs-card-header {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
}
.sbs-card-image-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--sbs-bg-light);
}
.sbs-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sbs-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    color: var(--sbs-blue);
    opacity: 0.2;
}
.sbs-card-title-group {
    flex-grow: 1;
}
.sbs-card-title {
    font-size: 1.1em;
    color: var(--sbs-text-dark);
    margin: 0 0 0.1em 0;
    font-weight: 600;
}
.sbs-card-provider {
    font-size: 0.85em;
    color: var(--sbs-text-light);
}
.sbs-card-rating {
    font-size: 0.85em;
    color: var(--sbs-text-light);
    margin-top: 0.25em;
}
.sbs-card-rating span {
    color: #f59e0b;
    font-weight: 600;
}

/* 2. Content (Description, Stats, Price) */
.sbs-card-content {
    padding: 1.25em;
    padding-top: 1em;
    border-top: 1px solid var(--sbs-border);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes all cards same height */
}

/* NEW: Description Style */
.sbs-card-description {
    color: var(--sbs-text-light);
    font-size: 0.9em;
    line-height: 1.5;
    flex-grow: 1; /* This is the spacer that pushes stats down */
    min-height: 10px;
}

/* UPDATED: Stats Style */
.sbs-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr; /* <-- 2 columns */
    text-align: center;
    
    /* NEW styles for grey box */
    background: var(--sbs-bg-light);
    border-radius: 8px;
    padding: 1em;
    margin-top: 1em; /* Space above stats */
}
.sbs-stat-item label {
    display: block;
    font-size: 0.75em;
    color: var(--sbs-text-light);
    text-transform: uppercase;
}
.sbs-stat-item span {
    font-weight: 600;
    color: var(--sbs-text-dark);
    font-size: 1em; /* <-- Made larger */
}

/* NEW: Centered Price Style */
.sbs-card-price-center {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--sbs-text-dark);
    text-align: center;
    padding: 0.75em 0 0.25em 0; /* Space around price */
}

/* 3. Footer (Buttons) */
.sbs-card-footer {
    display: grid; /* <-- UPDATED */
    grid-template-columns: 1fr 1fr; /* <-- NEW */
    padding: 0; /* <-- UPDATED */
    border-top: 1px solid var(--sbs-border);
    overflow: hidden; /* <-- NEW */
    border-radius: 0 0 12px 12px; /* <-- NEW */
}
.sbs-card-footer .sbs-btn {
    padding: 1em 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1em;
    white-space: nowrap;
    text-align: center;
    border-radius: 0;
}
.sbs-btn-call {
    background: var(--sbs-green);
    color: #fff;
    border-right: 1px solid rgba(0,0,0,0.1);
}
.sbs-btn-call:hover { 
    background: #15803d;
    color: #fff !important;
}
.sbs-btn-book {
    background: var(--sbs-blue);
    color: #fff;
}
.sbs-btn-book:hover { 
    background: #011a61;
    color: #fff !important;
}


/* --- Review Link & Modal (Unchanged) --- */
.sbs-review-link {
    color: var(--sbs-text-light);
    text-decoration: underline;
    cursor: pointer;
}
.sbs-review-link:hover {
    color: var(--sbs-blue);
}
#sbs-review-modal-backdrop {
    display: none;
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}
#sbs-review-modal-backdrop.visible {
    display: flex;
}
#sbs-review-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
#sbs-review-modal-content h2 {
    padding: 1em 1.5em;
    margin: 0;
    font-size: 1.5em;
    border-bottom: 1px solid var(--sbs-border);
}
#sbs-review-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5em;
    font-weight: 300;
    line-height: 1;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
}
#sbs-review-modal-close:hover {
    color: #333;
}
#sbs-review-modal-body {
    padding: 1.5em;
    overflow-y: auto;
}
.sbs-review-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}
.sbs-review-item {
    border-bottom: 1px solid var(--sbs-border);
    padding-bottom: 1.5em;
}
.sbs-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sbs-review-header {
    display: flex;
    gap: 1em;
    align-items: center;
}
.sbs-review-header img {
    border-radius: 50%;
}
.sbs-review-author {
    font-weight: 600;
    color: var(--sbs-text-dark);
}
.sbs-review-rating {
    font-size: 0.9em;
    color: #f59e0b;
    font-weight: 600;
}
.sbs-review-content {
    margin-top: 1em;
    color: #555;
    line-height: 1.6;
}