/*
Theme Name: Vertical Cat Home Child
Description: Independent research, structural safety guides, and space-saving layouts for vertical cat furniture.
Author: Emily Carter
Template: flatsome
Version: 1.0.0
*/

/*************** 1. CORE LAYOUT & ANTI-COLLAPSE ***************/
#main {
    min-height: 70vh !important;
    background-color: #ffffff !important;
    position: relative;
    z-index: 1;
}

#masthead {
    position: relative !important;
    background-color: #ffffff !important;
}

/*************** 2. MỞ RỘNG HEADER DESKTOP (>= 850PX) ***************/
@media (min-width: 850px) {
    /* Khóa cứng chiều cao Header Desktop triệt tiêu CLS */
    .header-main {
        height: 105px !important;
        min-height: 105px !important;
    }

    .header-main .flex-row {
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Đưa Logo bám lề trái cân đối */
    .header-main .flex-col.flex-center,
    .header-main .flex-col.flex-left {
        position: static !important;
        transform: none !important;
        left: auto !important;
        margin-right: auto !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
        text-align: left !important;
        flex: initial !important;
    }

    /* Kích thước Logo to bản, sắc nét */
    .header-main #logo img,
    .header-main .header-logo img {
        max-height: 75px !important;
        height: auto !important;
        width: auto !important;
        display: block !important;
    }

    /* Thanh tìm kiếm cân xứng */
    .header-main .searchform input[type="search"] {
        height: 44px !important;
        font-size: 15px !important;
        border-radius: 6px 0 0 6px !important;
    }

    .header-main .searchform button {
        height: 44px !important;
        min-width: 46px !important;
        border-radius: 0 6px 6px 0 !important;
    }
}

/*************** 3. HEADER MOBILE & TRIỆT TIÊU CLS (< 850PX) ***************/
@media (max-width: 849px) {
    #masthead,
    .header-wrapper,
    .header-mobile,
    .header-main {
        height: 80px !important;
        min-height: 80px !important;
        position: relative !important;
    }

    .header-mobile .container,
    .header-main .container {
        position: relative !important;
        height: 100% !important;
    }

    /* Nút Menu và Search nhạy bấm */
    .header-mobile .flex-col.flex-left,
    .header-mobile .flex-col.flex-right,
    .header-main .flex-col.flex-left,
    .header-main .flex-col.flex-right {
        position: relative !important;
        z-index: 101 !important;
    }

    /* Khóa tâm Logo cân đối chính giữa */
    .header-mobile .flex-col.flex-center,
    .header-main .flex-col.flex-center {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        width: max-content !important;
        max-width: 70% !important;
        z-index: 99 !important;
        pointer-events: none;
    }

    .header-mobile #logo a,
    .header-mobile .header-logo a,
    .header-main #logo a,
    .header-main .header-logo a {
        pointer-events: auto !important;
        display: inline-block !important;
    }

    /* Logo Mobile cao 60px rõ nét */
    .header-mobile #logo a img:first-of-type,
    .header-mobile .header-logo a img:first-of-type,
    .header-main #logo a img:first-of-type,
    .header-main .header-logo a img:first-of-type {
        height: 60px !important;
        max-height: 60px !important;
        width: auto !important;
        max-width: 100% !important;
        display: block !important;
        object-fit: contain;
    }

    .hero-section h1 {
        font-size: 32px !important;
        line-height: 1.3 !important;
    }
}

/* Triệt tiêu logo phụ thứ 2 */
.header-logo-dark,
img.header-logo-dark,
#logo .header-logo-dark,
#logo a img:nth-of-type(n+2),
.header-logo a img:nth-of-type(n+2) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}

/*************** 4. HEADER BOTTOM (MENU 6 SILOS CHÍNH) ***************/
.header-bottom {
    min-height: 52px !important;
    background-color: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.header-bottom .nav > li > a {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    padding: 14px 16px !important;
    letter-spacing: -0.2px;
    transition: all 0.2s ease-in-out;
}

.header-bottom .nav > li > a:hover {
    color: #0284c7 !important;
    background-color: #f8fafc;
}

/* Tab chuyên mục đang đứng (Active) */
.header-bottom .nav > li.current-menu-item > a,
.header-bottom .nav > li.current-category-ancestor > a,
.header-bottom .nav > li.active > a {
    color: #0284c7 !important;
    font-weight: 700 !important;
    position: relative;
}

.header-bottom .nav > li.current-menu-item > a:after,
.header-bottom .nav > li.active > a:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 3px;
    background-color: #0284c7;
    border-radius: 2px 2px 0 0;
}

/*************** 5. TÌM KIẾM & TIÊU ĐỀ ARCHIVE THEO BRAND BLUE ***************/
.button.primary,
button[type="submit"],
input[type="submit"],
.searchform button {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

.button.primary:hover,
button[type="submit"]:hover,
.searchform button:hover {
    background-color: #0369a1 !important;
}

.search-field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px 0 0 6px !important;
    background-color: #f8fafc !important;
}

.archive .page-title h1,
.archive .page-title span {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.5px;
    text-transform: capitalize !important;
}

/*************** 6. UI POLISH & CARDS ***************/
.box, .card, .post-item, .button:not(.circle), .badge {
    border-radius: 8px !important;
}

.post-item, .box-shadow {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #f1f5f9;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1) !important;
}

/*************** 7. SIDEBAR WIDGETS ***************/
span.widget-title {
    position: relative;
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

span.widget-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 45px;
    height: 2px;
    background-color: #0284c7;
}

.widget_categories ul, .flatsome_recent_posts ul {
    list-style: none;
    padding-left: 0;
}

.widget_categories li, .flatsome_recent_posts li {
    padding: 8px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 14px;
}

/*************** 8. AFFILIATE & TRUST BOXES (E-E-A-T) ***************/
.safety-note, .answer-box {
    background-color: #f8fafc;
    border-left: 4px solid #0284c7;
    padding: 16px 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.btn-amazon-cta {
    background-color: #d97706 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 12px 28px !important;
    border: none !important;
    display: inline-block;
    text-align: center;
    text-decoration: none !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-amazon-cta:hover {
    background-color: #b45309 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35) !important;
}

/*************** 9. READABILITY & TYPOGRAPHY ***************/
body {
    line-height: 1.7;
    color: #334155;
}

@media only screen and (max-width: 48em) {
    body {
        font-size: 16px;
    }
    .post-item {
        margin-bottom: 20px;
    }
}

/*************** 10. EDITORIAL LINKS & OUTLINKS (VERTICALCATHOME) ***************/
article a,
.entry-content a,
.post-content a,
.single-post .content a:not(.button):not(.btn-amazon-cta),
#main p a,
#main li a,
#main td a {
    color: #0284c7 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s ease-in-out !important;
}

article a:hover,
.entry-content a:hover,
.post-content a:hover,
.single-post .content a:not(.button):not(.btn-amazon-cta):hover,
#main p a:hover,
#main li a:hover,
#main td a:hover {
    color: #0369a1 !important;
    text-decoration: none !important;
    background-color: #f0f9ff !important;
    border-radius: 2px;
}

/* Icon nhận diện outlink ra ngoài VerticalCatHome */
article a[href^="http"]:not([href*="verticalcathome.com"]):not(.button):not(:has(img))::after,
.entry-content a[href^="http"]:not([href*="verticalcathome.com"]):not(.button):not(:has(img))::after,
#main p a[href^="http"]:not([href*="verticalcathome.com"]):not(.button):not(:has(img))::after,
#main li a[href^="http"]:not([href*="verticalcathome.com"]):not(.button):not(:has(img))::after {
    content: "" !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    margin-left: 4px !important;
    vertical-align: baseline !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230284c7'%3E%3Cpath d='M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z'/%3E%3Cpath d='M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
}

article a:has(img),
.entry-content a:has(img),
article a img,
.entry-content a img,
a.button,
a.btn-amazon-cta {
    text-decoration: none !important;
    background-color: transparent !important;
    border: none !important;
}

/*************** 11. KHÓA CỨNG FOOTER ACCESSIBILITY 100 ***************/
#footer .absolute-footer,
.footer-wrapper .absolute-footer,
.absolute-footer {
    background-color: #0f172a !important;
}

.absolute-footer,
.absolute-footer .copyright-footer,
.absolute-footer p,
.absolute-footer span {
    color: #ffffff !important;
    opacity: 1 !important;
}

.absolute-footer a {
    color: #93c5fd !important;
    text-decoration: underline !important;
}