/* ============================================
   13 HOMES — Home Designs Catalog & Detail Pages
   Rawson-style: filterable grid + detailed design pages
   ============================================ */

/* =========================================================
   PAGE HERO (catalog landing)
   ========================================================= */
.hd-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 160px 0 90px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(201, 168, 76, 0.18), transparent 60%);
    pointer-events: none;
}

.hd-hero-content {
    max-width: 760px;
    position: relative;
}

.hd-hero .section-tag {
    color: var(--accent);
    margin-bottom: 20px;
    display: inline-block;
}

.hd-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

.hd-hero h1 em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}

.hd-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 300;
    max-width: 620px;
    margin: 0;
}

/* Quick stats row inside hero */
.hd-hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hd-hero-stat {
    display: flex;
    flex-direction: column;
}

.hd-hero-stat-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.hd-hero-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 8px;
    font-weight: 500;
}

/* =========================================================
   FILTER BAR (sticky)
   ========================================================= */
.hd-filter-bar {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 18px 0;
    transition: box-shadow 0.3s ease;
}

.hd-filter-bar.stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hd-filter-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.hd-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hd-filter-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    font-weight: 600;
}

.hd-filter-select {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 9px 30px 9px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease;
    min-width: 140px;
}

.hd-filter-select:hover,
.hd-filter-select:focus {
    border-color: var(--accent);
    outline: none;
}

.hd-filter-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hd-filter-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.hd-filter-count strong {
    color: var(--primary);
    font-weight: 600;
}

.hd-filter-clear {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    padding: 8px 0;
}

.hd-filter-clear:hover {
    text-decoration: underline;
}

/* Range filter chips (instead of dropdown for visual emphasis) */
.hd-range-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hd-chip {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    padding: 9px 22px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}

.hd-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hd-chip.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* =========================================================
   DESIGN CATALOG GRID
   ========================================================= */
.hd-catalog {
    background: var(--off-white);
    padding: 60px 0 100px;
    min-height: 60vh;
}

.hd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Loading skeleton */
.hd-skeleton {
    background: var(--gray-100);
    border-radius: 12px;
    height: 460px;
    overflow: hidden;
    position: relative;
}

.hd-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: hdShimmer 1.6s infinite;
}

@keyframes hdShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =========================================================
   DESIGN CARD
   ========================================================= */
.hd-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.hd-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12);
}

.hd-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gray-100);
}

.hd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hd-card:hover .hd-card-image img {
    transform: scale(1.06);
}

/* Range badge */
.hd-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 7px 14px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

.hd-card-badge.elite     { background: var(--accent); color: #000; }
.hd-card-badge.master    { background: var(--primary); color: var(--accent); border: 1px solid rgba(201,168,76,0.4); }
.hd-card-badge.essential { background: rgba(255,255,255,0.96); color: var(--primary); }

.hd-card-storeys {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
}

.hd-card-body {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hd-card-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.hd-card-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

.hd-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 18px;
}

.hd-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hd-card-stat-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.hd-card-stat-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.hd-card-stat-num {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

.hd-card-stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 500;
}

.hd-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.hd-card-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hd-card-area-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 500;
}

.hd-card-area-value {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
}

.hd-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: gap 0.3s ease;
}

.hd-card:hover .hd-card-cta {
    gap: 14px;
}

/* Empty state */
.hd-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 30px;
    color: var(--text-muted);
}

.hd-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary);
    margin: 0 0 12px;
}

.hd-empty p {
    color: var(--text-light);
    margin: 0 0 24px;
    font-size: 0.95rem;
}

/* WP source indicator */
.hd-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.hd-source-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.hd-source.fallback .hd-source-dot {
    background: #f5a623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

/* =========================================================
   CUSTOM DESIGN CTA (bottom of catalog)
   ========================================================= */
.hd-custom-cta {
    background: var(--primary);
    padding: 100px 0;
    color: #fff;
    text-align: center;
}

.hd-custom-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    margin: 0 0 16px;
    color: #fff;
    line-height: 1.2;
}

.hd-custom-cta h2 em {
    font-style: italic;
    color: var(--accent);
}

.hd-custom-cta p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
    font-weight: 300;
}

/* =========================================================
   ============================================================
   DESIGN DETAIL PAGE
   ============================================================
   ========================================================= */

/* Detail hero */
.hdd-hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--gray-100);
}

.hdd-hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s ease;
}

.hdd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
}

.hdd-hero-content {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 5;
    color: #fff;
}

.hdd-breadcrumb {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
}

.hdd-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.hdd-breadcrumb a:hover {
    color: var(--accent);
}

.hdd-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}

.hdd-title-block {
    flex: 1;
    min-width: 280px;
}

.hdd-range-pill {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.hdd-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hdd-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 300;
}

.hdd-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hdd-actions .btn {
    background: var(--white);
    color: var(--primary);
    border-radius: 100px;
    padding: 14px 28px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hdd-actions .btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}

.hdd-actions .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

/* Stats strip */
.hdd-stats-strip {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 30px 0;
    position: sticky;
    top: 80px;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.96);
}

.hdd-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    align-items: center;
}

.hdd-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hdd-stat-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    flex-shrink: 0;
}

.hdd-stat-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.4;
}

.hdd-stat-text {
    display: flex;
    flex-direction: column;
}

.hdd-stat-num {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

.hdd-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* Detail sections */
.hdd-section {
    padding: 100px 0;
    background: var(--white);
}

.hdd-section.alt {
    background: var(--off-white);
}

.hdd-section-header {
    margin-bottom: 50px;
    max-width: 720px;
}

.hdd-section-header.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hdd-section-header .section-tag {
    color: var(--accent);
    margin-bottom: 16px;
}

.hdd-section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hdd-section-header p {
    font-size: 1.02rem;
    color: var(--text-light);
    line-height: 1.75;
    margin: 0;
    font-weight: 300;
}

/* Floor plan */
.hdd-floorplan-wrap {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    text-align: center;
    cursor: zoom-in;
    transition: box-shadow 0.3s ease;
}

.hdd-floorplan-wrap:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.hdd-floorplan-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.hdd-floorplan-zoom-hint {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* Facade variants */
.hdd-facades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.hdd-facade {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transition: transform 0.4s ease;
    cursor: pointer;
}

.hdd-facade:hover {
    transform: translateY(-4px);
}

.hdd-facade img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hdd-facade-name {
    padding: 16px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

/* Inclusions list */
.hdd-inclusions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 40px;
}

.hdd-inclusion {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
}

.hdd-inclusion-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.hdd-inclusion-check svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
}

.hdd-inclusion-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text);
}

/* Lot suitability */
.hdd-lot-card {
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hdd-lot-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hdd-lot-stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    display: block;
}

.hdd-lot-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
    font-weight: 500;
    display: block;
}

.hdd-lot-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0 0 12px;
    color: #fff;
}

.hdd-lot-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0;
}

/* Lightbox */
.hdd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hdd-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.hdd-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
}

.hdd-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.hdd-lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .hd-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hdd-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .hdd-lot-card {
        grid-template-columns: 1fr;
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .hd-hero { padding: 130px 0 60px; }

    .hd-filter-bar {
        position: relative;
        top: 0;
    }

    .hd-filter-row {
        gap: 12px;
    }

    .hd-filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .hd-filter-select {
        min-width: 0;
        flex: 1;
    }

    .hd-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hdd-hero {
        height: 60vh;
        min-height: 420px;
    }

    .hdd-hero-content {
        bottom: 40px;
    }

    .hdd-stats-strip {
        position: relative;
        top: 0;
    }

    .hdd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hdd-section {
        padding: 70px 0;
    }

    .hdd-inclusions {
        grid-template-columns: 1fr;
    }
}
