/* ND369 — Single khu vực */
/* --- CSS CHO TRANG SINGLE KHU V?C --- */

/* Header khu v?c */
.nd369-area-header {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.nd369-breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}
.nd369-breadcrumb a {
    color: #333;
    text-decoration: none;
}
.nd369-breadcrumb a:hover {
    color: #0088ff;
    text-decoration: underline;
}

.area-meta span {
    background: #e6f7ff;
    color: #0088ff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin: 0 5px;
    font-size: 14px;
    display: inline-block;
}

/* N?i dung b?i vi?t (Ch?a b?n ??) */
.nd369-area-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 40px;
}

.area-description {
    line-height: 1.8;
    color: #333;
}

/* H?p k?u g?i h?nh ??ng (CTA) */
.area-cta-box {
    background: #fff5f5;
    border: 1px dashed #cc0000;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
    border-radius: 8px;
}
.area-cta-box p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}
.area-cta-box strong {
    color: #cc0000;
    font-weight: bold;
}
.btn-call-area {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff !important; /* Force m?u tr?ng */
    padding: 12px 25px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    margin-top: 10px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(204, 51, 0, 0.3);
    transition: 0.3s;
}
.btn-call-area:hover {
    transform: scale(1.05);
    background: var(--accent-color);
    color: #fff !important;
}

/* Ti?u ?? ph?n s?n ph?m */
.section-title-area {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #333;
    text-transform: uppercase;
    font-weight: bold;
}

/* Grid s?n ph?m (d?ng l?i class c?a trang ch? ho?c Woocommerce m?c ??nh) */
.related-products-area .nd369-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none !important; /* X?a d?u ch?m ??u d?ng */
    margin: 0;
    padding: 0;
}

/* Mobile responsive cho trang khu v?c */
@media (max-width: 768px) {
    .related-products-area .nd369-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nd369-area-header .entry-title {
        font-size: 22px; /* Ch? nh? l?i tr?n mobile */
    }
    .section-title-area {
        font-size: 18px;
    }
    .area-meta span {
        display: block;
        margin: 5px 0;
    }
}
@media (max-width: 480px) {
    .related-products-area .nd369-product-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   CSS L?M ??P TRANG KHU V?C (Landing Page - Full Page)
   ========================================= */

/* Full Page Layout - Lo?i b? gi?i h?n container v? sidebar */
body.single-khu_vuc #primary {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

body.single-khu_vuc .site-main {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ?n sidebar tr?n trang khu v?c */
body.single-khu_vuc .site-content {
    display: block !important;
}

body.single-khu_vuc #secondary,
body.single-khu_vuc aside,
body.single-khu_vuc .sidebar {
    display: none !important;
}

body.single-khu_vuc .content-area {
    width: 100% !important;
    float: none !important;
}

/* 1. Hero header khu v?c ? x?p d?c, c?n gi?a (tr?nh Astra .ast-container flex-row) */
.nd369-area-header-wrap {
    background: linear-gradient(135deg, var(--primary-color, #004d99) 0%, #003366 100%);
    border-bottom: none;
    padding: 48px 20px;
    margin: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.nd369-area-header-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>');
    opacity: 0.35;
    pointer-events: none;
}

.nd369-area-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.nd369-area-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.nd369-area-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nd369-area-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.nd369-area-bc-sep {
    color: rgba(255, 255, 255, 0.45);
    user-select: none;
}

.nd369-area-bc-current {
    color: #fff;
    font-weight: 700;
}

.nd369-area-title {
    color: #fff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 18px;
    font-size: clamp(1.45rem, 3.5vw, 2.35rem);
    line-height: 1.25;
    text-align: center !important;
    width: 100%;
    text-shadow: none;
}

.nd369-area-badge,
.area-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color, #cc3300) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    box-shadow: none;
    animation: none;
}

/* 2. Content Area - Full Width nh? Header */
.nd369-area-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff;
}

/* Container b?n trong content area */
.nd369-area-content .ast-container,
.nd369-area-content > .ast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

/* Wrapper cho content */
.nd369-area-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

.area-description {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #2d3748 !important;
    margin: 0 auto 50px !important;
    text-align: justify !important;
    max-width: 900px;
    padding: 0;
}

/* Typography cho n?i dung b?i vi?t */
.area-description p {
    margin-bottom: 20px !important;
    text-align: justify !important;
    color: #2d3748 !important;
    line-height: 1.8;
}

.area-description img,
.area-description figure,
.area-description .wp-block-image,
.area-description .alignnone,
.area-description .aligncenter,
.area-description .size-full,
.area-description .size-large {
    display: block !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100%;
    height: auto;
}

.area-description figure {
    text-align: center;
}

.area-description figure img {
    margin-left: auto !important;
    margin-right: auto !important;
}

.area-description p:has(> img:only-child),
.area-description p:has(> a > img:only-child) {
    text-align: center !important;
}

.area-description strong {
    color: #1a202c !important;
    font-weight: 700 !important;
}

.area-description h2,
.area-description h3,
.area-description h4 {
    color: #003366 !important;
    font-weight: 800 !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.area-description h3 {
    font-size: 22px !important;
}

.area-description ul {
    margin: 20px 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.area-description li {
    margin-bottom: 15px !important;
    padding-left: 30px !important;
    position: relative;
    line-height: 1.7;
    color: #4a5568 !important;
}

.area-description li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
}

.area-description li strong {
    color: #1a202c !important;
    font-weight: 700 !important;
    display: block;
    margin-bottom: 5px;
}

/* Style cho em/italic text (Call to action) */
.area-description em {
    font-style: italic;
    color: #667eea !important;
    font-weight: 500;
    display: block;
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: #f7fafc;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

/* Style cho br tags */
.area-description br {
    line-height: 1.8;
}

/* 3. Khung CTA (K?u g?i h?nh ??ng) - Full Width Section */
.area-cta-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 20px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.area-cta-box {
    background: #fff !important;
    border: 2px solid var(--secondary-color) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 20px rgba(204, 51, 0, 0.1) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 50px 40px !important;
    margin: 0 auto !important;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.area-cta-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(204, 51, 0, 0.2) !important;
}

.area-cta-box h3 {
    color: var(--secondary-color) !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* N?t G?i ?i?n - Premium Design */
.area-cta-box a[href^="tel"] {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)) !important;
    border-radius: 50px !important;
    padding: 18px 50px !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 25px rgba(204, 51, 0, 0.4) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none !important;
}

.area-cta-box a[href^="tel"]:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(204, 51, 0, 0.5) !important;
}

.area-cta-box p {
    margin-top: 15px !important;
    font-size: 15px !important;
    color: #718096 !important;
    font-style: italic;
}

/* Badge "G?P" */
.area-cta-box::before {
    content: "?? G?P";
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #d63031;
    padding: 8px 15px;
    font-weight: 900;
    font-size: 13px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 4. Khu v?c l?n c?n ? l??i card ??ng b? /khu-vuc/ */
.kv-nearby-section {
    width: 100%;
    padding: 48px 0;
    margin: 0;
    background: var(--bg-light, #f4f8ff);
}

.kv-nearby-section .kv-archive-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.kv-nearby-section .kv-archive-section-header {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .kv-nearby-section {
        padding: 36px 0;
    }
}

/* Legacy nearby chips (n?u c?n markup c?) */
.nd369-area-content h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #2d3748 !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 3px solid #e2e8f0 !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.nd369-area-content > div[style*="display:flex"] {
    gap: 15px !important;
    margin-bottom: 60px !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.nd369-area-content > div[style*="display:flex"] a {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%) !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: #2d3748 !important;
    font-weight: 600 !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
    font-size: 15px !important;
}

.nd369-area-content > div[style*="display:flex"] a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border-color: #667eea !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 5. L??i S?n ph?m (WooCommerce Shortcode) - Full Width nh? Header */
.related-products-area {
    margin-top: 0 !important;
    padding: 80px 0 !important;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    width: 100% !important;
    max-width: 100% !important;
}

.related-products-area h2 {
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 20px;
    font-size: 32px !important;
    font-weight: 900 !important;
    color: #2d3748 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 50px !important;
}

/* K? g?ch ch?n d??i ti?u ?? s?n ph?m */
.related-products-area h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Container cho s?n ph?m - Full Width v?i Container b?n trong */
.related-products-area .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Tinh ch?nh l??i s?n ph?m WooCommerce */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
}

.woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: 100% !important;
    border: 1px solid #e4ebf3 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    background: #fff !important;
    overflow: hidden;
    position: relative;
    box-sizing: border-box !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product::before {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 22px rgba(0, 51, 102, 0.1) !important;
    transform: translateY(-3px);
    border-color: rgba(0, 77, 153, 0.35) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product .ast-loop-product__link {
    display: block;
}

.woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 12px !important;
}

.woocommerce ul.products li.product .ast-woo-product-category {
    color: #888 !important;
    font-size: 13px !important;
    margin: 0 0 6px !important;
    line-height: 1.3;
}

/* Ti?u ?? c? ??nh 2 d?ng ? n?t/gi? kh?ng l?ch h?ng */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem !important;
    color: var(--primary-color, #004d99) !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: calc(1.4em * 2) !important;
    max-height: calc(1.4em * 2) !important;
    height: calc(1.4em * 2) !important;
}

.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price.contact-price {
    color: var(--secondary-color, #cc3300) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    margin: auto 0 12px 0 !important;
    line-height: 1.35 !important;
    min-height: 1.35em;
}

.woocommerce ul.products li.product .price del {
    color: #a0aec0 !important;
    font-size: 0.85rem;
}

.woocommerce ul.products li.product .button.view-product,
.woocommerce ul.products li.product a.button.view-product,
.woocommerce ul.products li.product .view-product,
.woocommerce ul.products li.product .button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: var(--bg-light, #f4f8ff) !important;
    color: var(--primary-color, #004d99) !important;
    border: 1px solid #e4ebf3 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 11px 14px !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button.view-product:hover,
.woocommerce ul.products li.product a.button.view-product:hover,
.woocommerce ul.products li.product .view-product:hover,
.woocommerce ul.products li.product .button:hover {
    background: var(--secondary-color, #cc3300) !important;
    border-color: var(--secondary-color, #cc3300) !important;
    color: #fff !important;
}

/* =========================================
   RESPONSIVE MOBILE (QUAN TR?NG NH?T)
   ========================================= */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .nd369-area-header-wrap {
        padding: 36px 16px !important;
    }

    .nd369-area-title {
        font-size: 1.45rem !important;
        margin-bottom: 14px;
    }

    .nd369-area-breadcrumb {
        font-size: 11px;
        margin-bottom: 14px;
    }

    .nd369-area-badge,
    .area-badge {
        font-size: 12px !important;
        padding: 7px 14px !important;
    }

    .nd369-area-content-wrapper {
        padding: 40px 15px !important;
    }

    .area-cta-wrapper {
        padding: 50px 15px !important;
    }

    .area-description {
        font-size: 15px !important;
        text-align: justify !important;
    }

    .area-description h3 {
        font-size: 20px !important;
        margin-top: 30px !important;
        text-align: center !important;
    }
    
    .area-description li {
        font-size: 15px !important;
        margin-bottom: 12px !important;
    }
    
    .area-description em {
        font-size: 14px !important;
        padding: 12px !important;
    }

    .area-cta-box {
        padding: 30px 20px !important;
        margin: 40px auto !important;
    }

    .area-cta-box h3 {
        font-size: 20px !important;
    }

    .area-cta-box a[href^="tel"] {
        width: 100%;
        justify-content: center;
        font-size: 18px !important;
        padding: 16px 30px !important;
    }

    .related-products-area {
        padding: 40px 15px !important;
        margin-top: 50px;
    }

    .related-products-area h2 {
        font-size: 24px !important;
        margin-bottom: 30px !important;
    }

    /* Ch?nh l??i s?n ph?m th?nh 2 c?t tr?n mobile */
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .woocommerce ul.products li.product {
        padding: 15px !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.95rem !important;
        min-height: calc(1.4em * 2) !important;
        max-height: calc(1.4em * 2) !important;
        height: calc(1.4em * 2) !important;
    }

    .woocommerce ul.products li.product .price {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .nd369-area-title {
        font-size: 1.25rem !important;
    }

    .area-cta-box a[href^="tel"] {
        font-size: 16px !important;
        padding: 14px 25px !important;
    }

    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .nd369-area-content > div[style*="display:flex"] {
        flex-direction: column !important;
    }

    .nd369-area-content > div[style*="display:flex"] a {
        width: 100%;
        text-align: center;
    }
}
