/**
 * Haven Teak Common Styling & Architectural Design System
 * Shared across DoorHaven Teak templates (Home, About, Contact, Materials, Wholesale, Showroom, Single, Portfolio, Catalog).
 *
 * @package DoorTheme
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --haven-primary: #7a3e1d;
    --haven-primary-hover: #5d2f16;
    --haven-dark: #1b0a03;
    --haven-body: #2b1b14;
    --haven-bg: #faf3f5;
    --haven-surface: #ffffff;
    --haven-border: rgba(27, 10, 3, 0.09);
    --haven-border-light: rgba(255, 255, 255, 0.12);
    --haven-accent: #c88a42;
    --haven-footer-bg: #1b0a03;
    --haven-radius: 12px;
}

/* Base Body & Reset for Haven Pages */
body, .haven-page {
    background-color: #faf3f5 !important;
    color: var(--haven-body, #2b1b14);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.haven-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

.haven-section {
    padding: 85px 0;
}

/* Typography */
.haven-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--haven-dark, #1b0a03);
    margin: 0 0 16px;
    line-height: 1.25;
}

.haven-lead {
    font-size: clamp(15px, 1.6vw, 17.5px);
    color: #55443b;
    max-width: 740px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.haven-lead-left {
    margin: 0 0 36px 0;
    text-align: left;
}

.haven-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--haven-primary, #7a3e1d);
    margin-bottom: 12px;
}

.haven-text-highlight {
    color: var(--haven-primary, #7a3e1d);
    font-style: italic;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Buttons */
.haven-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.4;
    box-sizing: border-box;
}

.haven-btn-primary {
    background: var(--haven-primary, #7a3e1d);
    color: #ffffff !important;
    border: 1px solid var(--haven-primary, #7a3e1d);
}

.haven-btn-primary:hover {
    background: var(--haven-primary-hover, #5d2f16);
    border-color: var(--haven-primary-hover, #5d2f16);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(122, 62, 29, 0.25);
}

.haven-btn-outline-dark {
    background: transparent;
    color: var(--haven-dark, #1b0a03) !important;
    border: 1.5px solid var(--haven-dark, #1b0a03);
}

.haven-btn-outline-dark:hover {
    background: var(--haven-dark, #1b0a03);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.haven-btn-outline-light {
    background: transparent;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.haven-btn-outline-light:hover {
    background: #ffffff;
    color: var(--haven-dark, #1b0a03) !important;
    transform: translateY(-2px);
}

.haven-btn-block {
    width: 100%;
}

.haven-btn-wa {
    background: #25d366;
    color: #ffffff !important;
    border: 1px solid #25d366;
}

.haven-btn-wa:hover {
    background: #1eb956;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}

.haven-btn-email {
    background: var(--haven-primary, #7a3e1d);
    color: #ffffff !important;
    border: 1px solid var(--haven-primary, #7a3e1d);
}

.haven-btn-email:hover {
    background: var(--haven-primary-hover, #5d2f16);
    transform: translateY(-2px);
}

/* Dual Logo Rules */
.dt-logo-transparent {
    display: none !important;
    max-height: 55px;
    width: auto;
    object-fit: contain;
}
.dt-logo-default {
    max-height: 55px;
    width: auto;
    object-fit: contain;
}

body.dt-header-transparent:not(.dt-header-scrolled) .dt-logo-transparent {
    display: block !important;
}
body.dt-header-transparent:not(.dt-header-scrolled) .dt-logo-default {
    display: none !important;
}

body.dt-header-transparent.dt-header-scrolled .dt-logo-transparent {
    display: none !important;
}
body.dt-header-transparent.dt-header-scrolled .dt-logo-default {
    display: block !important;
}

body:not(.dt-header-transparent) .dt-logo-transparent {
    display: none !important;
}
body:not(.dt-header-transparent) .dt-logo-default {
    display: block !important;
}

/* Header Enforcements for Haven */
.dt-site-header {
    background-color: #faf3f5 !important;
    border-bottom: 1px solid var(--haven-border, rgba(27,10,3,0.09));
}

body.dt-header-transparent .dt-site-header {
    background-color: transparent !important;
    border-bottom: none !important;
}

body.dt-header-transparent #page,
body.dt-header-transparent .haven-page {
    padding-top: 0 !important;
}

body.dt-header-transparent.dt-header-scrolled .dt-site-header {
    background-color: #faf3f5 !important;
    border-bottom: 1px solid var(--haven-border, rgba(27,10,3,0.09)) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dt-header-transparent.dt-header-scrolled .dt-nav-list li a,
body.dt-header-transparent.dt-header-scrolled .site-title,
body.dt-header-transparent.dt-header-scrolled .dt-action-btn {
    color: #1b0a03 !important;
}

/* Footer Enforcements */
.site-footer, .dt-site-footer {
    background-color: #1b0a03 !important;
    color: #dcd7d0 !important;
    border-top: none !important;
}
.site-footer a, .dt-site-footer a {
    color: #dcd7d0 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.site-footer a:hover, .dt-site-footer a:hover {
    color: #ffffff !important;
}
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4,
.dt-site-footer h1, .dt-site-footer h2, .dt-site-footer h3, .dt-site-footer h4,
.dt-site-footer .widget-title, .dt-site-footer .dt-footer-col-title {
    color: #ffffff !important;
}
.dt-site-footer .dt-footer-bottom {
    border-top: 1px solid rgba(220, 215, 208, 0.15) !important;
    color: #a89f91 !important;
}

/* Common CTA Section & Card */
.haven-cta-section {
    padding: 80px 0 100px;
    background-color: var(--haven-bg, #faf3f5);
}
.haven-cta-card {
    background: linear-gradient(135deg, #1b0a03 0%, #2b1307 100%);
    color: #faf3f5;
    padding: 70px 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(27, 10, 3, 0.25);
    border: 1px solid rgba(200, 138, 66, 0.2);
}
.haven-cta-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--haven-accent, #c88a42);
    margin-bottom: 16px;
}
.haven-cta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 18px;
    line-height: 1.25;
}
.haven-cta-desc {
    font-size: clamp(15px, 1.8vw, 17px);
    color: rgba(250, 243, 245, 0.88);
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.haven-cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .haven-cta-card {
        padding: 40px 20px;
    }
    .haven-cta-actions {
        flex-direction: column;
    }
    .haven-cta-actions .haven-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .haven-container {
        padding: 0 16px;
    }
    .haven-section {
        padding: 55px 0;
    }
}

/* =========================================================================
   SHARED CATALOG & SHOWCASE COMPONENTS (Hero Banner, Filter Bar, Pagination)
   ========================================================================= */

/* 1. Full-Width Photo Hero Banner */
.haven-cat-hero-banner {
    position: relative;
    width: 100%;
    min-height: 380px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 85px 24px;
    box-sizing: border-box;
    margin: 0 !important;
    margin-top: 0 !important;
}

.haven-cat-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(27, 10, 3, 0.68) 0%, rgba(27, 10, 3, 0.82) 100%);
    z-index: 1;
}

.haven-cat-hero-content {
    position: relative;
    z-index: 2;
    max-width: 840px;
    margin: 0 auto;
}

.haven-cat-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f7e6d0;
    font-size: 11px;
    letter-spacing: 0.18em;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 18px;
    backdrop-filter: blur(6px);
}

.haven-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c88a42;
    box-shadow: 0 0 8px #c88a42;
}

.haven-cat-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(32px, 4.5vw, 46px);
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.haven-cat-hero-lead {
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto;
    max-width: 720px;
}

/* 2. Filter Bar & Category Pills */
.haven-catalog-filter-bar {
    background: #faf3f5;
    border-bottom: 1px solid var(--haven-border);
    padding: 22px 0;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.haven-fbar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #887870;
    margin-right: 14px;
    white-space: nowrap;
}

.haven-main-cats-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.haven-pill-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.haven-pill-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--haven-border);
    color: var(--haven-dark);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(27, 10, 3, 0.03);
}
.haven-pill-btn:hover {
    border-color: var(--haven-primary);
    color: var(--haven-primary);
    transform: translateY(-1px);
}
.haven-pill-btn.is-active {
    background: var(--haven-primary) !important;
    border-color: var(--haven-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(122, 62, 29, 0.25);
}

/* 3. Meta Count & Section Spacing */
.haven-catalog-grid-section {
    padding: 50px 0 80px;
}
.haven-catalog-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.haven-meta-count {
    font-size: 13.5px;
    color: #776a62;
    margin: 0;
}
.haven-meta-count strong {
    color: var(--haven-dark);
}

/* 4. Portfolio 3-Column Showcase Grid */
.haven-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.haven-proj-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--haven-border, rgba(27, 10, 3, 0.09));
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(27, 10, 3, 0.04);
}
.haven-proj-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(27, 10, 3, 0.1);
}
.haven-proj-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #ebdcd6;
}
.haven-proj-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}
.haven-proj-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.haven-proj-card:hover .haven-proj-thumb-img {
    transform: scale(1.05);
}
.haven-proj-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(27, 10, 3, 0.85);
    color: #f7e6d0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.haven-proj-cat-tag {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--haven-dark, #1b0a03);
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.haven-proj-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.haven-proj-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #887870;
    margin-bottom: 10px;
    font-weight: 500;
}
.haven-proj-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18.5px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--haven-dark, #1b0a03);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px;
}
.haven-proj-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.haven-proj-title a:hover {
    color: var(--haven-primary, #7a3e1d) !important;
}
.haven-proj-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #665a54;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}
.haven-proj-pill-scope {
    display: block;
    font-size: 11.5px;
    color: #5a4f48;
    background: #fdf8f5;
    border: 1px solid rgba(27, 10, 3, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 20px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.haven-proj-pill-scope strong {
    color: var(--haven-dark, #1b0a03);
}
.haven-proj-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}
.haven-proj-actions .haven-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

/* 5. Pagination Styling (Compact Sliding Window Pill) */
.haven-pagination-wrap {
    margin-top: 50px;
    text-align: center;
}
.haven-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--haven-border);
    box-shadow: 0 4px 16px rgba(27, 10, 3, 0.05);
}
.haven-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--haven-dark);
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.haven-page-num:hover {
    background: rgba(122, 62, 29, 0.08);
    color: var(--haven-primary);
}
.haven-page-num.is-active {
    background: var(--haven-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(122, 62, 29, 0.25);
}
.haven-page-arrow {
    font-weight: 700;
    font-size: 14px;
    padding: 0 10px;
    letter-spacing: -0.05em;
}
.haven-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    font-size: 14px;
    font-weight: 700;
    color: #887a72;
    user-select: none;
}

/* 6. Header Navigation Active Line Indicator */
.dt-nav-list li.current-menu-item > a,
.dt-nav-list li.current_page_item > a {
    color: var(--haven-primary, #7a3e1d) !important;
    position: relative;
}
.dt-nav-list li.current-menu-item > a::after,
.dt-nav-list li.current_page_item > a::after {
    content: '' !important;
    position: absolute !important;
    bottom: -4px !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background-color: var(--haven-primary, #7a3e1d) !important;
    border-radius: 2px !important;
}

/* Responsive adjustments for 3-col grids */
@media (max-width: 1024px) {
    .haven-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}
@media (max-width: 640px) {
    .haven-portfolio-grid {
        grid-template-columns: 1fr;
    }
    .haven-proj-actions {
        flex-direction: column;
    }
    .haven-proj-actions .haven-btn {
        width: 100%;
    }
}
