/*
Theme Name: TapHoaThongTin Premium
Theme URI: https://taphoathongtin.com
Author: Web3S
Description: Giao diện cao cấp cho nền tảng Tạp Hoá Thông Tin – tương thích 100% với plugin Web3S AIO. SEO Microdata, Dark Mode, Responsive, Mobile-first.
Version: 2.0.0
Text Domain: taphoathongtin
*/

/* ============================================================
   1. DESIGN SYSTEM – CSS Custom Properties
   ============================================================ */
:root {
    /* Brand Colors */
    --primary:       #ff5722;
    --primary-d:     #e64a19;
    --primary-light: #fff3f0;
    --secondary:     #1565c0;
    --secondary-d:   #0d47a1;
    --accent:        #00bcd4;
    --gold:          #ff9800;
    --success:       #2e7d32;
    --danger:        #c62828;

    /* Text */
    --text:          #1a1a2e;
    --text-mid:      #4a5568;
    --text-light:    #94a3b8;

    /* Backgrounds */
    --bg:            #f8f9fa;
    --bg-white:      #ffffff;
    --bg-dark:       #1a1a2e;

    /* UI */
    --border:        #e2e8f0;
    --radius:        12px;
    --radius-lg:     20px;
    --shadow:        0 4px 20px rgba(0,0,0,.07);
    --shadow-md:     0 8px 32px rgba(0,0,0,.12);
    --shadow-lg:     0 16px 48px rgba(0,0,0,.16);

    /* Layout */
    --container:     1240px;
    --header-h:      72px;
    --sidebar-w:     300px;

    /* Typography */
    --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    margin: 0; line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-d); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; margin: 0 0 .75em; }
p { margin: 0 0 1em; }
ul,ol { padding-left: 1.5em; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container      { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-wrap      { display: flex; flex-direction: column; min-height: 100vh; }
.site-main      { flex: 1; }
.site-content-padding { padding-top: 32px; padding-bottom: 60px; }
.content-area   { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 32px; padding: 40px 0 60px; }
.content-area.full { grid-template-columns: 1fr; }
@media(max-width:900px) { .content-area { grid-template-columns: 1fr; } }

/* ============================================================
   4. HEADER
   ============================================================ */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border), 0 4px 15px rgba(0,0,0,.03);
    position: sticky; top: 0; z-index: 9999;
    height: var(--header-h);
}
.header-inner {
    display: flex; align-items: center; gap: 24px;
    height: var(--header-h);
}
.site-branding a { display: flex; align-items: center; gap: 10px; }
.site-branding img { height: 44px; width: auto; }
.site-branding .brand-text {
    font-size: 1.2rem; font-weight: 800; color: var(--text);
    line-height: 1;
}
.site-branding .brand-sub { font-size: .7rem; color: var(--text-light); font-weight: 400; }

/* Search bar in header */
.header-search { flex: 1; max-width: 440px; position: relative; }
.header-search input {
    width: 100%; padding: 10px 44px 10px 16px;
    border: 2px solid var(--border); border-radius: 100px;
    font-size: .9rem; transition: border-color .2s; font-family: var(--font);
    background: var(--bg);
}
.header-search input:focus { border-color: var(--primary); outline: none; background: #fff; }
.header-search button {
    position: absolute; right: 0; top: 0; height: 100%;
    width: 42px; background: none; border: none; cursor: pointer;
    color: var(--text-light); font-size: 1.1rem;
}

/* Primary Nav */
.main-navigation { margin-left: auto; }
.main-navigation ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-navigation a {
    padding: 8px 14px; border-radius: 8px;
    font-weight: 600; font-size: .9rem; color: var(--text-mid);
    transition: background .2s, color .2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: var(--primary-light); color: var(--primary);
}
.main-navigation .menu-item-has-children { position: relative; }
.main-navigation .sub-menu {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-md); min-width: 200px;
    display: none; padding: 8px; z-index: 100;
    border: 1px solid var(--border);
}
/* JS adds .is-visible – no CSS :hover needed (fixes diagonal mouse bug) */
.main-navigation .sub-menu.is-visible { display: block; animation: fadeDown .15s ease; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.main-navigation .sub-menu a { display: block; padding: 9px 14px; border-radius: 8px; font-weight: 500; color: var(--text); }
.main-navigation .sub-menu a:hover { background: var(--bg); color: var(--primary); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-post-ad {
    padding: 9px 18px; background: var(--primary); color: #fff !important;
    border-radius: 100px; font-weight: 700; font-size: .85rem;
    transition: background .2s, transform .1s;
}
.btn-post-ad:hover { background: var(--primary-d) !important; transform: scale(.97); }
.btn-login-header {
    padding: 9px 18px; border: 2px solid var(--border);
    border-radius: 100px; font-weight: 600; font-size: .85rem; color: var(--text);
    transition: border-color .2s;
}
.btn-login-header:hover { border-color: var(--primary); color: var(--primary); }
.user-avatar-wrap { position: relative; cursor: pointer; }
.user-avatar-wrap img { border-radius: 50%; width: 38px; height: 38px; object-fit: cover; border: 2px solid var(--primary); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px);
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
    min-width: 200px; padding: 8px; display: none;
    border: 1px solid var(--border); z-index: 100;
}
/* JS toggles .dd-open on click – more reliable than :hover */
.user-dropdown.dd-open { display: block; animation: fadeDown .15s ease; }
/* Keep hover as fallback for non-JS */
@media (hover: hover) { .user-avatar-wrap:focus-within .user-dropdown { display: block; } }
.user-dropdown a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: .9rem; }
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }

/* Mobile hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; z-index: 10000; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; transform-origin: center; }

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media(max-width:900px) {
    .hamburger { display: flex; }
    .main-navigation { position: fixed; top: var(--header-h); left: -100%; width: 280px; height: 100vh; background: #fff; box-shadow: var(--shadow-lg); transition: left .3s; padding: 20px; z-index: 9998; overflow-y: auto; margin: 0; }
    .main-navigation.open { left: 0; }
    .main-navigation ul { flex-direction: column; gap: 0; }
    .main-navigation a { display: block; padding: 12px 16px; border-radius: 8px; }
    .header-search { display: none; }
}

/* ============================================================
   5. HERO / FRONT PAGE
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 50%, #0f3460 100%);
    color: #fff; padding: 80px 0 100px; text-align: center; position: relative; overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: .5em; }
.hero-title span { color: var(--primary); }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,.75); max-width: 520px; margin: 0 auto 32px; }
.hero-search {
    display: flex; max-width: 600px; margin: 0 auto 48px;
    background: #fff; border-radius: 100px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.3); border: 3px solid rgba(255,255,255,.15);
}
.hero-search input {
    flex: 1; padding: 16px 24px; border: none; outline: none;
    font-size: 1rem; font-family: var(--font); color: var(--text);
}
.hero-search button {
    padding: 16px 28px; background: var(--primary); color: #fff; border: none;
    font-weight: 700; cursor: pointer; font-size: 1rem; transition: background .2s; white-space: nowrap;
}
.hero-search button:hover { background: var(--primary-d); }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.hero-stat .num { font-size: 2.2rem; font-weight: 800; color: var(--primary); display: block; }
.hero-stat .label { font-size: .85rem; color: rgba(255,255,255,.6); }

/* Category chips */
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.cat-chip {
    padding: 8px 18px; background: rgba(255,255,255,.12); border-radius: 100px;
    color: #fff; font-size: .85rem; font-weight: 600; border: 1px solid rgba(255,255,255,.2);
    transition: background .2s;
}
.cat-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   6. SECTION LAYOUTS
   ============================================================ */
.section { padding: 60px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; border-bottom: 2px solid var(--primary-light); padding-bottom: 12px; }
.section-title { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.section-title::before { content: ''; display: block; width: 6px; height: 32px; background: var(--primary); border-radius: 4px; }
.section-title.center { justify-content: center; text-align: center; }
.section-title.center::before { display: none; }
.view-all { font-size: .85rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; }

/* ============================================================
   7. AD CARDS – Premium Grid
   ============================================================ */
.thtt-ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.thtt-ad-card {
    background: var(--bg-white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s;
    position: relative; display: flex; flex-direction: column;
}
.thtt-ad-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.thtt-ad-card.is-vip { border-color: var(--gold); border-width: 2px; }
.thtt-ad-card.is-vip::before {
    content: '⭐ VIP'; position: absolute; top: 10px; right: 10px;
    background: var(--gold); color: #fff; font-size: .7rem; font-weight: 800;
    padding: 3px 10px; border-radius: 100px;
}
.card-thumb { overflow: hidden; position: relative; height: 175px; background: #f0f0f0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.thtt-ad-card:hover .card-thumb img { transform: scale(1.05); }
.card-category-tag {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: 3px 10px; border-radius: 100px;
    backdrop-filter: blur(4px);
}
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.35; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }
.card-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.card-location { font-size: .78rem; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.card-meta { display: flex; gap: 12px; font-size: .75rem; color: var(--text-light); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.card-actions { padding: 0 16px 14px; display: flex; gap: 8px; }
.card-btn { flex: 1; padding: 8px; border-radius: 8px; font-size: .82rem; font-weight: 700; text-align: center; cursor: pointer; border: none; transition: .2s; }
.card-btn-primary { background: var(--primary); color: #fff; }
.card-btn-primary:hover { background: var(--primary-d); }
.card-btn-secondary { background: var(--bg); border: 1.5px solid var(--border); color: var(--text-mid); }
.card-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   8. SINGLE AD – Detail Page
   ============================================================ */
.ad-detail-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 32px; padding: 40px 0 60px; }
@media(max-width:900px) { .ad-detail-wrap { grid-template-columns: 1fr; } }

/* Image Gallery */
.ad-gallery { margin-bottom: 24px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: #f0f0f0; aspect-ratio: 16/10; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--primary); }

/* Info card */
.ad-info-card {
    background: var(--bg-white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); padding: 28px;
    position: sticky; top: calc(var(--header-h) + 16px);
}
.ad-price-block { padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.ad-price-label { font-size: .8rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ad-price-value { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; margin-top: 4px; }
.ad-price-value.negotiate { font-size: 1.3rem; color: var(--text-mid); }

.ad-contact-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.btn-call-big {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px; background: var(--success); color: #fff; border-radius: var(--radius);
    font-size: 1.1rem; font-weight: 800; border: none; cursor: pointer; transition: background .2s;
}
.btn-call-big:hover { background: #1b5e20; color: #fff; }
.btn-zalo-big {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px; background: #0068ff; color: #fff; border-radius: var(--radius);
    font-size: 1rem; font-weight: 700; transition: background .2s;
}
.btn-zalo-big:hover { background: #0051cc; color: #fff; }
.btn-share-big {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px; background: var(--bg); border: 1.5px solid var(--border);
    color: var(--text-mid); border-radius: var(--radius);
    font-size: .9rem; font-weight: 600; cursor: pointer; transition: .2s;
}
.btn-share-big:hover { border-color: var(--secondary); color: var(--secondary); }

.ad-meta-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 12px; }
.ad-meta-list li { display: flex; gap: 10px; font-size: .9rem; }
.ad-meta-list .icon { width: 36px; height: 36px; background: var(--bg); border-radius: 8px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.ad-meta-list .label { font-size: .75rem; color: var(--text-light); }
.ad-meta-list .value { font-weight: 600; }

.ad-seller-card { background: var(--bg); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.seller-avatar { border-radius: 50%; width: 48px; height: 48px; object-fit: cover; }
.seller-name { font-weight: 700; font-size: .95rem; }
.seller-code { font-size: .75rem; color: var(--text-light); }

/* ============================================================
   9. BREADCRUMB
   ============================================================ */
.thtt-breadcrumb { padding: 14px 0; font-size: .85rem; color: var(--text-light); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.thtt-breadcrumb a { color: var(--text-light); }
.thtt-breadcrumb a:hover { color: var(--primary); }
.thtt-breadcrumb .sep { color: var(--border); }

/* ============================================================
   10. SIDEBAR
   ============================================================ */
.thtt-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget { background: var(--bg-white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.widget-title { font-size: 1rem; font-weight: 700; color: var(--text); padding-bottom: 12px; border-bottom: 2px solid var(--primary); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ============================================================
   11. FOOTER
   ============================================================ */
.footer-main {
    background: var(--bg-dark); color: rgba(255,255,255,.8);
    padding: 60px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; }
@media(max-width:900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media(max-width:560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 280px; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
    width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.1);
    display: grid; place-items: center; font-size: 1.1rem; color: #fff; transition: background .2s;
}
.social-btn:hover { background: var(--primary); color: #fff; }
.footer-col h4 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { background: #0d1117; padding: 16px 0; text-align: center; font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ============================================================
   12. UTILITY CLASSES
   ============================================================ */
.text-center  { text-align: center; }
.text-primary { color: var(--primary); }
.font-bold    { font-weight: 700; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.d-flex { display: flex; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 100px;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-gold    { background: #fff8e1; color: var(--gold); }
.badge-success { background: #e8f5e9; color: var(--success); }

/* ============================================================
   13. BACK-TO-TOP
   ============================================================ */
#back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 9000;
    width: 48px; height: 48px; background: var(--primary); color: #fff;
    border-radius: 50%; display: none; place-items: center; font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(255,87,34,.4); border: none; cursor: pointer;
    transition: background .2s, transform .2s;
}
#back-to-top:hover { background: var(--primary-d); transform: translateY(-2px); }
#back-to-top.visible { display: grid; }

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media(max-width:600px) {
    .hero-section { padding: 50px 0 60px; }
    .hero-stats { gap: 24px; }
    .section { padding: 40px 0; }
    .section-header { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
    .section-title { font-size: 1.3rem; }
    .thtt-ads-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media(max-width:400px) {
    .thtt-ads-grid { grid-template-columns: 1fr; }
}

/* Global Headings Spacing for Sticky Header */
h1, h2, h3, .section, .site-content-padding {
    scroll-margin-top: calc(var(--header-h) + 20px);
}

/* Centering entry-title */
.entry-title { text-align: center; margin-bottom: 1.5rem !important; position: relative; padding-bottom: 15px; }
.entry-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--primary); border-radius: 2px; }

/* ============================================================
   15. COMMENTS – Premium Design
   ============================================================ */

/* ── Wrapper ── */
.comments-area {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* ── Title ── */
.comments-title {
    font-size: 1.4rem; font-weight: 800; margin: 0 0 32px;
    color: var(--text); display: flex; align-items: center; gap: 12px;
    padding-bottom: 16px; border-bottom: 2px solid var(--primary-light);
}
.comments-title::before {
    content: '💬'; font-size: 1.3rem;
}

/* ── Comment List ── */
.comment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.comment-list > li { border-bottom: 1px solid var(--border); }
.comment-list > li:last-child { border-bottom: none; }

/* ── Nested children ── */
.comment-list .children {
    list-style: none;
    margin: 0 0 0 60px;
    padding: 0;
    border-left: 3px solid var(--primary-light);
}

/* ── Single comment body ── */
.comment-body {
    padding: 24px 0;
    transition: all .25s ease;
    position: relative;
}
.comment-list .children .comment-body { padding: 20px 0 20px 20px; }
.comment-body:hover { background: transparent; }

/* ── Admin highlight ── */
.admin-comment {
    background: linear-gradient(135deg, #fff8f5 0%, #fff3f0 100%) !important;
    border-radius: var(--radius) !important;
    padding: 20px !important;
    border: 1.5px solid rgba(255,87,34,.15) !important;
    box-shadow: 0 4px 20px rgba(255,87,34,.06) !important;
    margin: 4px 0;
}
.admin-comment::before {
    content: '';
    position: absolute; left: 0; top: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--gold));
    border-radius: 4px;
}

/* ── Avatar + Author row ── */
.comment-meta {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.comment-author {
    display: flex; align-items: center; gap: 12px;
}
.comment-author img {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    object-fit: cover; flex-shrink: 0;
}
.comment-author .fn {
    font-weight: 700; font-size: 1rem; color: var(--text);
}
.comment-author .fn a { color: inherit; }
.comment-author .fn a:hover { color: var(--primary); }

/* ── Admin badge ── */
.admin-label {
    font-size: .65rem; font-weight: 800; padding: 3px 9px;
    letter-spacing: .04em; border-radius: 100px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff !important; border: none !important;
    vertical-align: middle; margin-left: 6px;
    box-shadow: 0 2px 8px rgba(255,87,34,.3);
}

/* ── Timestamp ── */
.comment-metadata {
    font-size: .78rem; color: var(--text-light);
    display: flex; align-items: center; gap: 6px;
}
.comment-metadata a { color: var(--text-light); }
.comment-metadata a:hover { color: var(--primary); }
.comment-metadata time::before { content: '🕐 '; }

/* ── Comment text ── */
.comment-content {
    font-size: .97rem; line-height: 1.75; color: var(--text-mid);
    padding-left: 58px; /* align with author name (avatar 46px + gap 12px) */
}
.comment-list .children .comment-content { padding-left: 0; }

/* ── Reply button ── */
.reply { margin-top: 12px; text-align: right; }
.comment-reply-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .8rem; font-weight: 700; color: var(--text-mid);
    padding: 5px 14px; border-radius: 100px;
    border: 1.5px solid var(--border);
    transition: all .2s; background: transparent;
}
.comment-reply-link:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,87,34,.25);
}
.comment-reply-link::before { content: '↩'; }

/* ── No comments ── */
.no-comments {
    text-align: center; color: var(--text-light); padding: 24px 0;
    font-style: italic;
}

/* ============================================================
   COMMENT FORM – Premium
   ============================================================ */
.comment-respond {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid var(--primary-light);
}
#reply-title {
    font-size: 1.3rem; font-weight: 800; margin: 0 0 28px;
    display: flex; align-items: center; gap: 10px; color: var(--text);
}
#reply-title::before { content: '✍️'; }
#reply-title small { font-size: .75rem; font-weight: 500; }
#reply-title small a {
    color: var(--primary); font-weight: 700;
    padding: 2px 10px; background: var(--primary-light);
    border-radius: 100px; margin-left: 8px;
}

/* Input fields */
.comment-form .comment-form-comment,
.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url {
    margin-bottom: 18px;
}
.comment-form label {
    display: block; font-size: .85rem; font-weight: 700;
    color: var(--text-mid); margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: all .2s;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,87,34,.08);
}

/* Textarea */
.comment-form-comment textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    font-family: var(--font);
    font-size: .97rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: all .2s;
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}
.comment-form-comment textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,87,34,.08);
}
.comment-form-comment textarea::placeholder { color: var(--text-light); }

/* Name / Email row */
.comment-form .comment-form-fields-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* Submit button */
.form-submit { margin-top: 8px; }
.form-submit .submit,
.comment-form #submit {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff; font-family: var(--font);
    font-weight: 800; font-size: 1rem;
    border: none; border-radius: 100px;
    cursor: pointer; transition: all .25s;
    box-shadow: 0 6px 20px rgba(255,87,34,.3);
}
.form-submit .submit:hover,
.comment-form #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255,87,34,.4);
}
.form-submit .submit::before { content: '✉️'; }

/* Logged in as */
.comment-form .logged-in-as {
    font-size: .85rem; color: var(--text-light); margin-bottom: 18px;
    padding: 10px 16px; background: var(--bg); border-radius: 8px;
}
.comment-form .logged-in-as a { color: var(--primary); font-weight: 600; }

/* Comment form notes */
.comment-form .comment-notes {
    font-size: .82rem; color: var(--text-light);
    margin-bottom: 16px; line-height: 1.6;
}

/* Responsive */
@media(max-width:700px) {
    .comments-area { padding: 24px 18px; }
    .comment-list .children { margin-left: 24px; }
    .comment-content { padding-left: 0; margin-top: 10px; }
    .comment-meta { flex-direction: column; gap: 4px; }
    .comment-metadata { font-size: .72rem; }
    .comment-form .comment-form-fields-row { grid-template-columns: 1fr; }
    .form-submit .submit { width: 100%; justify-content: center; }
}

/* ============================================================
   16. QR CODE & UTILITIES
   ============================================================ */
.ad-qr-box {
    text-align: center; padding: 20px; background: #fff;
    border-radius: var(--radius); border: 2px dashed var(--border); margin-top: 24px;
}
.ad-qr-box img { margin: 0 auto 10px; border: 1px solid var(--border); padding: 5px; background: #fff; }
.ad-qr-box p { font-size: .8rem; color: var(--text-light); margin: 0; }

/* ============================================================
   17. WEB3S-AIO PLUGIN OVERRIDES (compatibility layer)
   ============================================================ */
/* Align plugin card styles with theme variables */
.w3aio-ad-card { border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; }
.w3aio-btn { font-family: var(--font) !important; }
.w3aio-form-container { box-shadow: var(--shadow-md) !important; border-radius: var(--radius-lg) !important; }
.w3aio-dashboard { max-width: var(--container); }
/* Quick view panel sits inside theme layout gracefully */
#w3aio-quick-view-panel { border-radius: var(--radius-lg) !important; }
