/* CD Location Pages — Frontend CSS v2.3
   3-column desktop / 2-column tablet / 1-column mobile
   No sidebar. Applied to both real location pages and virtual pages.
   ================================================================== */

/* ── Page wrapper ────────────────────────────────────────────── */
.cdlp-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.cdlp-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}
.cdlp-breadcrumb a { color: #2271b1; text-decoration: none; }
.cdlp-breadcrumb a:hover { text-decoration: underline; }

/* ── Hero ────────────────────────────────────────────────────── */
.cdlp-hero {
    background: linear-gradient(135deg, #1a3a6b 0%, #2a5fa8 100%);
    border-radius: 8px;
    padding: 30px 36px;
    margin-bottom: 22px;
    color: #fff;
}
.cdlp-hero h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.25;
}
.cdlp-intro {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 700px;
}

/* ── Category pills ──────────────────────────────────────────── */
.cdlp-cats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e4e8ee;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 22px;
}
.cdlp-cat-pill {
    display: inline-block;
    background: #fff;
    border: 1px solid #d0daea;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.cdlp-cat-pill:hover, .cdlp-cat-pill.cdlp-cat-active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ── Listings section ────────────────────────────────────────── */
.cdlp-listings-section { margin-bottom: 28px; }
.cdlp-listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.cdlp-listings-header h2 {
    font-size: 20px;
    margin: 0;
    color: #1e1e1e;
}
.cdlp-count {
    background: #e7f3ff;
    color: #2271b1;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ── 3-column grid — the core fix ───────────────────────────── */
.cdlp-3col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* ── Card ────────────────────────────────────────────────────── */
.cdlp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}
.cdlp-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.cdlp-card-inner {
    text-decoration: none;
    color: inherit;
    display: block;
}
.cdlp-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f4f8;
}
.cdlp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.cdlp-card:hover .cdlp-card-img img { transform: scale(1.04); }
.cdlp-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #bbb;
}
.cdlp-card-body { padding: 12px 14px 14px; }
.cdlp-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a3a;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cdlp-card-price {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a7a2e;
    margin-bottom: 4px;
}
.cdlp-card-age { font-size: 11px; color: #999; }

/* ── No ads ──────────────────────────────────────────────────── */
.cdlp-no-ads {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border: 1px dashed #d0daea;
    border-radius: 8px;
    color: #666;
    font-size: 15px;
}

/* ── SEO block ───────────────────────────────────────────────── */
.cdlp-seo-block {
    background: #f8f9fa;
    border-left: 4px solid #2271b1;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.75;
    color: #444;
}
.cdlp-seo-block h2 { margin-top: 0; font-size: 16px; }
.cdlp-seo-block p { margin: 0 0 8px; }
.cdlp-seo-block p:last-child { margin-bottom: 0; }

/* ── Alts / Related ──────────────────────────────────────────── */
.cdlp-alts, .cdlp-related { margin-bottom: 24px; }
.cdlp-alts h2, .cdlp-related h2 { font-size: 16px; margin-bottom: 12px; color: #333; }
.cdlp-related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cdlp-related-chip {
    background: #fff;
    border: 1px solid #d0daea;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.15s;
}
.cdlp-related-chip:hover { background: #e7f3ff; border-color: #2271b1; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
/* Tablet: 2 columns */
@media (max-width: 900px) {
    .cdlp-3col-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .cdlp-hero { padding: 22px 20px; }
    .cdlp-hero h1 { font-size: 22px; }
}

/* Mobile: 1 column */
@media (max-width: 560px) {
    .cdlp-3col-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cdlp-page { padding: 12px 12px 32px; }
    .cdlp-hero { padding: 18px 16px; border-radius: 6px; }
    .cdlp-hero h1 { font-size: 19px; }
    .cdlp-intro { font-size: 14px; }
    .cdlp-listings-header h2 { font-size: 17px; }
    .cdlp-cat-pill { font-size: 12px; padding: 4px 10px; }
}

/* Remove sidebar shell on our pages */
.cdlp-no-sidebar .site-content,
.cdlp-no-sidebar #content {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    float: none !important;
}
.cdlp-no-sidebar .sidebar-widget-area,
.cdlp-no-sidebar #sidebar,
.cdlp-no-sidebar .widget-area {
    display: none !important;
}

/* ── Fallback notice ─────────────────────────────────────────── */
.cdlp-fallback-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #555;
}
.cdlp-fallback-notice p { margin: 0; }
