/* ============================================================
   Chin Team Listings - Frontend Styles
   ============================================================ */

/* Grid Layout */
.ctl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px 0;
}

@media (max-width: 960px) {
    .ctl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .ctl-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Card Base */
.ctl-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ctl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   Property Cards (Listings & Sales)
   ============================================================ */

.ctl-card-photo {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.ctl-card-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ctl-card:hover .ctl-card-photo img {
    transform: scale(1.05);
}

.ctl-no-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    background: #f5f5f5;
}

/* Status Badges */
.ctl-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.ctl-badge-active {
    background: #22c55e;
    color: #fff;
}

.ctl-badge-sold {
    background: #ef4444;
    color: #fff;
}

.ctl-badge-pending {
    background: #f59e0b;
    color: #fff;
}

.ctl-badge-reduced {
    background: #3b82f6;
    color: #fff;
}

/* Card Body */
.ctl-card-body {
    padding: 16px 20px 20px;
}

.ctl-price {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.ctl-address {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    line-height: 1.4;
}

a.ctl-address:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

.ctl-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.ctl-detail strong {
    color: #1a1a1a;
    font-weight: 600;
}

.ctl-sep {
    color: #ddd;
    font-size: 12px;
}

.ctl-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #888;
}

.ctl-agent {
    font-weight: 500;
    color: #666;
}

.ctl-mls {
    color: #aaa;
}

/* ============================================================
   Agent Cards
   ============================================================ */

.ctl-agents {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
}

@media (max-width: 600px) {
    .ctl-agents {
        grid-template-columns: 1fr;
    }
}

.ctl-agent-card {
    text-align: center;
    padding: 0;
}

.ctl-agent-photo {
    width: 100%;
    padding-top: 100%; /* 1:1 square */
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.ctl-agent-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ctl-agent-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ctl-agent-info {
    padding: 20px;
}

.ctl-agent-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.ctl-agent-name a {
    color: inherit;
    text-decoration: none;
}

.ctl-agent-name a:hover {
    color: #4a5568;
    text-decoration: underline;
}

.ctl-agent-title {
    font-size: 13px;
    color: #888;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ctl-agent-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ctl-agent-phone,
.ctl-agent-email {
    font-size: 13px;
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s;
}

.ctl-agent-phone:hover,
.ctl-agent-email:hover {
    color: #1a1a1a;
}

.ctl-agent-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 12px;
    text-align: left;
}

.ctl-agent-languages {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    text-align: left;
}

.ctl-agent-languages strong {
    color: #333;
}

/* ============================================================
   Review Cards
   ============================================================ */

.ctl-reviews-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.ctl-review-card {
    padding: 28px 32px;
    margin-bottom: 20px;
    border-left: 4px solid #0e3a32;
}

.ctl-stars {
    margin-bottom: 12px;
}

.ctl-star {
    font-size: 18px;
    margin-right: 2px;
}

.ctl-star-filled {
    color: #f59e0b;
}

.ctl-star-empty {
    color: #e0e0e0;
}

.ctl-review-text {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 16px;
}

.ctl-review-text p {
    margin: 0;
    font-style: italic;
}

.ctl-review-attribution {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.ctl-reviewer-name {
    font-weight: 600;
    color: #1a1a1a;
}

.ctl-review-date {
    color: #999;
}

/* ============================================================
   Sales Pagination & Stats
   ============================================================ */

.ctl-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ctl-stats-count {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ctl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 0;
}

.ctl-page-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ctl-page-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #bbb;
}

.ctl-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ctl-page-info {
    font-size: 14px;
    color: #666;
}

/* ============================================================
   Error & Empty States
   ============================================================ */

.ctl-error {
    padding: 24px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.ctl-error a {
    color: #c53030;
    font-weight: 600;
}

.ctl-empty {
    padding: 40px 24px;
    text-align: center;
    color: #999;
    font-size: 16px;
    max-width: 600px;
    margin: 40px auto;
}
