/*
Theme Name: Claire Cat Gear Child
Description: Independent hardware metrology, acoustic testing, and small-space cat tech reviews.
Author: Claire Bennett
Template: flatsome
Version: 1.1.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) {
    .header-main {
        height: 105px !important;
        min-height: 105px !important;
    }

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

    .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;
    }

    .header-main #logo img,
    .header-main .header-logo img {
        max-height: 75px !important;
        height: auto !important;
        width: auto !important;
        display: block !important;
    }

    .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;
    }

    .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;
    }

    .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;
    }

    .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;
    }
}

.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 (MAIN NAVIGATION & DROPDOWNS) ***************/
.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: #c2410c !important;
    background-color: #fff7ed;
}

.header-bottom .nav > li.current-menu-item > a,
.header-bottom .nav > li.current-category-ancestor > a,
.header-bottom .nav > li.current-menu-ancestor > a,
.header-bottom .nav > li.active > a {
    color: #c2410c !important;
    font-weight: 700 !important;
    position: relative;
}

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

/*************** 5. TÌM KIẾM & TIÊU ĐỀ ARCHIVE (WARM TERRACOTTA) ***************/
.button.primary,
button[type="submit"],
input[type="submit"],
.searchform button {
    background-color: #c2410c !important;
    border-color: #c2410c !important;
    color: #ffffff !important;
}

.button.primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.searchform button:hover {
    background-color: #9a3412 !important;
    border-color: #9a3412 !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: #c2410c;
}

.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, GEO TABLES & TRUST BOXES (E-E-A-T) ***************/
.safety-note, .answer-box, article blockquote {
    background-color: #fff7ed;
    border-left: 4px solid #c2410c;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.65;
    color: #1e293b;
}

.entry-content table,
article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14.5px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.entry-content table th,
article table th {
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 12px 14px;
    white-space: nowrap;
}

.entry-content table td,
article table td {
    padding: 11px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
}

.entry-content table tr:nth-child(even) td,
article table tr:nth-child(even) td {
    background-color: #fafaf9;
}

/* Nút Amazon CTA chuẩn Deep Slate sang trọng */
a.btn-amazon-cta,
.btn-amazon-cta {
    background-color: #0f172a !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(15, 23, 42, 0.22) !important;
    transition: all 0.2s ease-in-out !important;
}

a.btn-amazon-cta:hover,
.btn-amazon-cta:hover {
    background-color: #c2410c !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.3) !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 (CLAIRECATGEAR) ***************/
article a:not(.button):not(.btn-amazon-cta),
.entry-content a:not(.button):not(.btn-amazon-cta),
.post-content a:not(.button):not(.btn-amazon-cta),
#main p a:not(.button):not(.btn-amazon-cta),
#main li a:not(.button):not(.btn-amazon-cta),
#main td a:not(.button):not(.btn-amazon-cta) {
    color: #c2410c !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s ease-in-out !important;
}

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

article a[href^="http"]:not([href*="clairecatgear.com"]):not(.button):not(.btn-amazon-cta):not(:has(img))::after,
.entry-content a[href^="http"]:not([href*="clairecatgear.com"]):not(.button):not(.btn-amazon-cta):not(:has(img))::after,
#main p a[href^="http"]:not([href*="clairecatgear.com"]):not(.button):not(.btn-amazon-cta):not(:has(img))::after,
#main li a[href^="http"]:not([href*="clairecatgear.com"]):not(.button):not(.btn-amazon-cta):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='%23c2410c'%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 {
    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: #fdba74 !important;
    text-decoration: underline !important;
}

/*************** 12. KHUNG BÀI REVIEW CHUYÊN GIA (CLAIRECATGEAR) ***************/
.ccg-review-article {
    max-width: 860px;
    margin: 0 auto;
    color: #1e293b;
}

/* Header & Meta tác giả */
.ccg-article-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 26px;
}

.ccg-article-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 12px 0;
}

.ccg-meta {
    display: inline-block;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin: 0;
}

/* Tiêu đề H2 có vạch nhấn Terracotta */
.ccg-review-article h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 40px 0 16px 0;
    padding: 0 0 10px 14px;
    border-left: 4px solid #c2410c;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.35;
}

.ccg-review-article h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 10px 0;
}

/* Khung ảnh kỹ thuật & chú thích */
.ccg-review-article figure {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin: 28px 0;
    text-align: center;
}

.ccg-review-article figure img {
    border-radius: 6px;
    margin: 0 auto 10px auto;
    display: block;
}

.ccg-review-article figcaption {
    font-size: 13.5px;
    color: #64748b;
    font-style: italic;
    margin: 0;
}

/* Khối 2 cột Buy It If / Skip It If */
.ccg-verdict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 24px 0 28px 0;
}

.ccg-buy-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-top: 4px solid #15803d;
    border-radius: 8px;
    padding: 20px 22px;
}

.ccg-skip-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-top: 4px solid #b91c1c;
    border-radius: 8px;
    padding: 20px 22px;
}

.ccg-buy-box h3 {
    color: #166534;
    margin-top: 0;
}

.ccg-skip-box h3 {
    color: #991b1b;
    margin-top: 0;
}

/* Khối 4 Lỗi thực tế (Trade-offs) */
.ccg-flaws-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #c2410c;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
}

/* Khối thẻ FAQ */
.ccg-faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.ccg-faq-item h3 {
    margin: 0 0 8px 0;
    font-size: 16.5px;
    color: #0f172a;
}

.ccg-faq-item p {
    margin: 0;
    font-size: 14.5px;
    color: #475569;
}