/*
 * Executive Cars — Directory Styles
 * Option B: dark header/hero + warm white body
 *
 * Enqueue in functions.php:
 *   wp_enqueue_style( 'ecd-directory', get_template_directory_uri() . '/css/directory.css', [], '1.1.0' );
 *
 * Fonts loaded via theme (Cormorant Garamond + Barlow) — no import needed here.
 *
 * Colour tokens:
 *   --ecd-dark       #0e0e0e
 *   --ecd-gold       #c9a84c
 *   --ecd-gold-light #e8d5a0
 *   --ecd-warm-white #f7f5f0
 *   --ecd-white      #ffffff
 *   --ecd-border     #e8e2d6
 *   --ecd-text       #1a1a1a
 *   --ecd-muted      #777777
 */

/* ── Reset / base ─────────────────────────────────────────── */
.ecd-wrap *,
.ecd-wrap *::before,
.ecd-wrap *::after { box-sizing: border-box; }

.ecd-wrap {
    background: #f7f5f0;
    min-height: 60vh;
}

/* ── Hero strip ───────────────────────────────────────────── */
.ecd-hero {
    background: #0e0e0e;
    border-bottom: 3px solid #c9a84c;
}

.ecd-hero__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px 0;
}

.ecd-hero__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 400;
    color: #c9a84c;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
}

.ecd-hero__subtitle {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #666;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Tab nav ──────────────────────────────────────────────── */
.ecd-tabs {
    max-width: 1280px;
    margin: 20px auto 0;
    padding: 0 24px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ecd-tabs::-webkit-scrollbar { display: none; }

.ecd-tabs__item {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    text-decoration: none;
    padding: 12px 18px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.ecd-tabs__item:hover {
    color: #c9a84c;
}

.ecd-tabs__item.is-active {
    color: #c9a84c;
    border-bottom-color: #c9a84c;
}

/* ── Layout ───────────────────────────────────────────────── */
.ecd-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .ecd-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Filter sidebar ───────────────────────────────────────── */
.ecd-filters {
    background: #fff;
    border: 1px solid #e8e2d6;
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 24px;
}

.ecd-filters__form { padding: 0; }

.ecd-filters__search {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e8e2d6;
    padding: 0 14px;
}

.ecd-filters__search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: transparent;
}

.ecd-filters__search-input::placeholder { color: #aaa; }

.ecd-filters__search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.ecd-filters__search-btn:hover { color: #c9a84c; }

.ecd-filters__group {
    border-bottom: 1px solid #e8e2d6;
    padding: 16px 0 8px;
}

.ecd-filters__heading {
    font-family: 'Barlow', sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 600;
    padding: 0 14px 8px;
    margin: 0;
}

.ecd-filters__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ecd-filters__item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}

.ecd-filters__item a:hover {
    background: #faf8f3;
    color: #1a1a1a;
}

.ecd-filters__item.is-active a {
    color: #1a1a1a;
    font-weight: 600;
}

.ecd-filters__count {
    font-size: 11px;
    color: #c9a84c;
    font-weight: 600;
}

.ecd-filters__clear {
    display: block;
    padding: 12px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
}

.ecd-filters__clear:hover { color: #c9a84c; }

/* ── Results info ─────────────────────────────────────────── */
.ecd-results-info {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #777;
    margin: 0 0 20px;
}

/* ── Listing grid ─────────────────────────────────────────── */
.ecd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

@media (max-width: 640px) {
    .ecd-grid { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────────────── */
.ecd-card {
    background: #fff;
    border: 1px solid #e8e2d6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ecd-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ecd-card--featured {
    border-color: #c9a84c;
    box-shadow: 0 0 0 1px #c9a84c;
}

.ecd-card__thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0ece4;
    text-decoration: none;
}

.ecd-card__thumb--placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.ecd-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ecd-card:hover .ecd-card__img { transform: scale(1.03); }

.ecd-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 600;
}

.ecd-card__badge--featured {
    background: #c9a84c;
    color: #0e0e0e;
}

.ecd-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecd-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ecd-card__tag {
    font-family: 'Barlow', sans-serif;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: #f7f5f0;
    border: 1px solid #e8e2d6;
    border-radius: 3px;
    color: #777;
}

.ecd-card__tag--brand {
    background: #0e0e0e;
    border-color: #0e0e0e;
    color: #c9a84c;
}

.ecd-card__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.ecd-card__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s;
}

.ecd-card__title a:hover { color: #c9a84c; }

.ecd-card__detail {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.ecd-card__spec {
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    color: #777;
}

.ecd-card__spec::after {
    content: '·';
    margin-left: 6px;
    color: #ccc;
}

.ecd-card__spec:last-child::after { content: ''; }

.ecd-card__spec--date {
    color: #c9a84c;
    font-weight: 600;
}

.ecd-card__price {
    font-family: 'Barlow', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    width: 100%;
}

.ecd-card__price small {
    font-size: 12px;
    font-weight: 400;
    color: #777;
}

.ecd-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0ece4;
    margin-top: auto;
    flex-wrap: wrap;
}

.ecd-card__location {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 100%;
    margin-bottom: 4px;
}

.ecd-card__contact-btn {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ecd-card__contact-btn--call {
    background: #f7f5f0;
    color: #555;
    border: 1px solid #e8e2d6;
}

.ecd-card__contact-btn--call:hover { background: #e8e2d6; }

.ecd-card__contact-btn--wa {
    background: #25d366;
    color: #fff;
}

.ecd-card__contact-btn--wa:hover { background: #1da851; }

.ecd-card__contact-btn--view {
    background: #0e0e0e;
    color: #c9a84c;
    margin-left: auto;
}

.ecd-card__contact-btn--view:hover { background: #1a1a1a; }

/* ── Pagination ───────────────────────────────────────────── */
.ecd-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.ecd-pagination .page-numbers {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    padding: 8px 14px;
    border: 1px solid #e8e2d6;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s, color 0.15s;
}

.ecd-pagination .page-numbers:hover { background: #f7f5f0; }
.ecd-pagination .page-numbers.current {
    background: #0e0e0e;
    color: #c9a84c;
    border-color: #0e0e0e;
}

/* ── No results ───────────────────────────────────────────── */
.ecd-no-results {
    padding: 60px 24px;
    text-align: center;
    color: #777;
    font-family: 'Barlow', sans-serif;
}

.ecd-no-results a {
    color: #c9a84c;
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════
   SINGLE PAGE
══════════════════════════════════════════════════════════ */

.ecd-single {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.ecd-single__grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .ecd-single__grid {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb */
.ecd-breadcrumb {
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ecd-breadcrumb a { color: #aaa; text-decoration: none; }
.ecd-breadcrumb a:hover { color: #c9a84c; }
.ecd-breadcrumb span { color: #ddd; }

/* Hero image */
.ecd-single__hero-img {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 32px;
    background: #1a1a1a;
}

.ecd-single__featured-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* Tags + title */
.ecd-single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ecd-single__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 400;
    color: #1a1a1a;
    margin: 0 0 24px;
    line-height: 1.2;
}

/* Price */
.ecd-single__price {
    font-family: 'Barlow', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
}

/* Ticket button */
.ecd-single__ticket-btn {
    display: inline-block;
    background: #c9a84c;
    color: #0e0e0e;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 28px;
    transition: background 0.15s;
}

.ecd-single__ticket-btn:hover { background: #e8d5a0; }

/* Spec table */
.ecd-single__specs {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
}

.ecd-single__specs th,
.ecd-single__specs td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0ece4;
}

.ecd-single__specs th {
    width: 38%;
    color: #999;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.ecd-single__specs td {
    color: #1a1a1a;
    font-weight: 500;
}

.ecd-single__specs tr:last-child th,
.ecd-single__specs tr:last-child td { border-bottom: none; }

/* Body content */
.ecd-single__body {
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Trading hours */
.ecd-single__hours {
    background: #f7f5f0;
    border-left: 3px solid #c9a84c;
    border-radius: 0 6px 6px 0;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.ecd-single__hours h3 {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c9a84c;
    font-weight: 600;
    margin: 0 0 10px;
}

.ecd-single__hours pre {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #555;
    white-space: pre-wrap;
    margin: 0;
}

/* Map */
.ecd-single__map {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e2d6;
    margin-top: 8px;
}

/* ── Contact sidebar card ─────────────────────────────────── */
.ecd-single__sidebar {
    position: sticky;
    top: 24px;
}

.ecd-single__contact-card {
    background: #fff;
    border: 1px solid #e8e2d6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ecd-single__contact-heading {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #0e0e0e;
    padding: 14px 18px;
    margin: 0;
    font-weight: 600;
    border-bottom: 2px solid #c9a84c;
}

.ecd-single__contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0ece4;
    transition: background 0.1s;
}

.ecd-single__contact-row:last-child { border-bottom: none; }
.ecd-single__contact-row:hover { background: #faf8f3; }

.ecd-single__contact-row--wa {
    color: #128c42;
    font-weight: 600;
}

.ecd-single__contact-row--address {
    color: #777;
    font-size: 13px;
    cursor: default;
    align-items: flex-start;
}

.ecd-single__back-link {
    display: block;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.15s;
}

.ecd-single__back-link:hover { color: #c9a84c; }
