/*
Theme Name: KHODOCU Theme
Theme URI: https://khodocu.com.vn
Author: dev.com.vn
Author URI: https://dev.com.vn
Description: Giao diện marketplace KHODOCU.com.vn chuyển từ file HTML khodocu_chatgpt.html. Hỗ trợ WooCommerce, trang chủ động, người bán, sidebar, danh mục và responsive.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: khodocu
*/

:root{
      --green:#4f8b2f;
      --green-2:#6ca63e;
      --green-3:#2d641d;
      --yellow:#f2b52d;
      --dark:#101513;
      --ink:#17221c;
      --text:#4f5c54;
      --muted:#7f8b84;
      --line:#e4ebdf;
      --soft:#f6f9f3;
      --soft-green:#edf6e7;
      --white:#fff;
      --shadow:0 14px 32px rgba(35,68,30,.13);
      --shadow-soft:0 8px 20px rgba(35,68,30,.08);
      --radius:12px;
      --container:1130px;
    }
    *{box-sizing:border-box;margin:0;padding:0}
    html{scroll-behavior:smooth}
    body{font-family:Inter,Arial,sans-serif;background:#fff;color:var(--text);font-size:14px;line-height:1.62;overflow-x:hidden}
    a{text-decoration:none;color:inherit}
    button,input,select{font:inherit}
    img{display:block;width:100%;height:100%;object-fit:cover;background:#eef3ea}
    .container{max-width:var(--container);margin:0 auto;padding:0 18px}
    .section{padding:28px 0}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}.section-head h2{font-size:22px;line-height:1.25;color:var(--ink);font-weight:800;letter-spacing:-.25px}.view-all{font-size:12px;color:var(--green);font-weight:800;white-space:nowrap}.view-all:hover{color:var(--green-3)}

    .topbar{height:68px;background:#fff;border-bottom:1px solid #edf1eb}.top-inner{height:68px;display:grid;grid-template-columns:220px 1fr auto;gap:24px;align-items:center}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:44px;height:44px;border-radius:10px;background:linear-gradient(135deg,#2f7d26,#9ac352);position:relative;box-shadow:0 7px 16px rgba(79,139,47,.18)}.brand-mark::before{content:"";position:absolute;left:8px;right:8px;bottom:8px;height:21px;background:#fff7d6;border-radius:2px}.brand-mark::after{content:"";position:absolute;left:6px;top:9px;width:32px;height:22px;background:#fff;clip-path:polygon(50% 0,100% 45%,100% 100%,0 100%,0 45%);opacity:.9}.brand-text strong{display:block;font-size:22px;line-height:1;color:#1e2822;font-weight:900;letter-spacing:-.5px}.brand-text span{display:block;font-size:10px;color:#52625a;margin-top:2px;font-weight:700}.search{height:40px;border:1px solid var(--line);border-radius:6px;display:grid;grid-template-columns:42px 1fr 86px;overflow:hidden;background:#fff}.search i{display:grid;place-items:center;color:#9aa49e;font-style:normal}.search input{border:0;outline:none;color:#44554a}.search button{border:0;background:var(--green);color:#fff;font-weight:800}.top-actions{display:flex;align-items:center;gap:12px}.post-btn{height:38px;border:0;border-radius:7px;background:#f6ba27;color:#1c180d;font-weight:900;padding:0 18px}.login{height:38px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#2c3b32;font-weight:800;padding:0 16px}.cart{font-size:22px;color:var(--green)}
    .navline{height:44px;background:#fff;border-bottom:1px solid #edf1eb}.nav-inner{height:44px;display:flex;align-items:center;gap:28px}.menu-btn{height:44px;display:flex;align-items:center;gap:10px;color:#1f2f26;font-weight:800;min-width:190px}.nav{flex:1;display:flex;align-items:center;justify-content:space-between;gap:18px;height:100%}.nav a{height:44px;display:flex;align-items:center;font-size:13px;font-weight:800;color:#2c382f;position:relative;white-space:nowrap}.nav a.active,.nav a:hover{color:var(--green)}.nav a.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--green)}.badge-new{background:#4ba03b;color:#fff;border-radius:12px;padding:2px 7px;font-size:10px;margin-left:4px}.menu-toggle{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--green);font-size:22px;margin-left:auto}

    .hero{position:relative;background:#111;overflow:hidden;color:#fff}.hero-bg{position:absolute;inset:0;z-index:0}.hero-bg img{filter:brightness(.54) saturate(.85);object-position:center}.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.78) 0%,rgba(0,0,0,.55) 49%,rgba(0,0,0,.3) 100%);z-index:1}.hero-grid{position:relative;z-index:2;min-height:340px;display:grid;grid-template-columns:1fr 300px;gap:46px;align-items:center}.hero-copy{padding:42px 0}.hero h1{font-size:36px;line-height:1.18;color:#fff;font-weight:900;letter-spacing:-.55px;margin-bottom:14px}.hero h1 span{color:#f5c43b;font-size:42px}.hero p{font-size:15px;line-height:1.75;color:#e6e6e6;max-width:570px;margin-bottom:20px}.hero-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;max-width:690px;margin-bottom:24px}.hero-benefit{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center}.hero-benefit i{width:34px;height:34px;border-radius:50%;border:2px solid #98c75d;color:#b8dc7c;display:grid;place-items:center;font-style:normal}.hero-benefit strong{display:block;font-size:12px;color:#fff}.hero-benefit span{display:block;font-size:10px;color:#d5d5d5}.hero-search{background:#fff;border-radius:8px;box-shadow:var(--shadow);padding:12px;display:grid;grid-template-columns:1fr 1fr 90px;gap:10px;max-width:570px}.hero-search select{height:40px;border:1px solid var(--line);border-radius:6px;padding:0 12px;outline:none;color:#4f5c54}.hero-search button{border:0;border-radius:6px;background:var(--green);color:#fff;font-weight:800}.popular{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.popular span{height:26px;border-radius:13px;background:rgba(255,255,255,.12);display:inline-flex;align-items:center;padding:0 12px;font-size:11px}.hero-card{background:#fff;color:var(--ink);border-radius:12px;padding:24px;box-shadow:var(--shadow)}.hero-card h2{font-size:19px;font-weight:900;margin-bottom:16px}.card-stats{display:grid;gap:16px;margin-bottom:18px}.card-stat{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:center}.card-stat i{width:38px;height:38px;border-radius:50%;background:var(--soft-green);color:var(--green);display:grid;place-items:center;font-style:normal}.card-stat strong{display:block;font-size:20px;color:#1f3024;font-weight:900}.card-stat span{font-size:12px;color:#66736b}.card-btn{height:42px;border:0;border-radius:7px;background:var(--green);color:#fff;font-weight:900;width:100%}

    .cat-strip{background:#fff;position:relative;z-index:5}.cat-panel{margin-top:0;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow-soft);display:grid;grid-template-columns:repeat(8,1fr);overflow:hidden}.cat-card{text-align:center;padding:19px 8px 15px;border-right:1px solid var(--line);min-height:108px}.cat-card:last-child{border-right:0}.cat-card i{width:43px;height:43px;border-radius:50%;background:#f0f7eb;color:var(--green);display:grid;place-items:center;margin:0 auto 8px;font-size:24px;font-style:normal}.cat-card strong{display:block;color:#1f3024;font-size:12px;font-weight:900}.cat-card span{display:block;color:#7e8a83;font-size:11px;margin-top:2px}

    .filter-tabs{display:flex;gap:8px}.filter-tabs span{height:32px;display:inline-flex;align-items:center;padding:0 14px;border-radius:6px;background:#f2f5ef;color:#546257;font-size:12px;font-weight:800}.filter-tabs span.active{background:var(--green);color:#fff}.product-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:15px}.product-card{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden;box-shadow:var(--shadow-soft);position:relative}.product-img{height:132px;background:#eef3ea}.label{position:absolute;left:8px;top:8px;height:22px;border-radius:4px;background:var(--green);color:#fff;font-size:10px;font-weight:900;display:flex;align-items:center;padding:0 8px}.label.orange{background:#f3a825}.product-body{padding:10px}.product-body h3{font-size:12.5px;color:#1b2a20;font-weight:900;line-height:1.35;min-height:34px}.location{font-size:11px;color:#7e8a83;margin:5px 0}.price{font-size:14px;color:var(--green);font-weight:900}.old{font-size:11px;color:#9ba69e;text-decoration:line-through;margin-left:6px}.heart{float:right;color:#9da8a0}

    .category-products{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.category-box{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;box-shadow:var(--shadow-soft);display:grid;grid-template-columns:86px 1fr;gap:12px;min-height:145px}.category-img{border-radius:8px;overflow:hidden;background:#eef3ea}.category-box h3{font-size:14px;color:#1d2b21;font-weight:900;margin-bottom:6px}.category-box ul{list-style:none;display:grid;gap:3px}.category-box li{font-size:11px;color:#66736b}.category-box a{display:inline-block;margin-top:8px;font-size:12px;color:var(--green);font-weight:900}

    .info-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:18px}.info-panel{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-soft);padding:20px}.info-panel h2{font-size:19px;color:var(--ink);font-weight:900;margin-bottom:14px}.why-list,.steps{display:grid;gap:13px}.why-item{display:grid;grid-template-columns:42px 1fr;gap:11px;align-items:start}.why-item i{width:36px;height:36px;border-radius:50%;background:#edf6e7;color:var(--green);display:grid;place-items:center;font-style:normal}.why-item strong{display:block;font-size:13px;color:#1c2b20}.why-item span{font-size:12px;color:#66736b}.step{display:grid;grid-template-columns:32px 1fr;gap:12px}.step-num{width:28px;height:28px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;font-weight:900;font-size:12px}.seller{display:grid;grid-template-columns:46px 1fr 68px 75px;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.seller:last-child{border-bottom:0}.seller-logo{width:38px;height:38px;border-radius:8px;background:#edf6e7;color:var(--green);display:grid;place-items:center;font-weight:900}.seller strong{display:block;color:#1c2b20;font-size:13px}.seller span{font-size:11px;color:#7e8a83}.stars{color:#f5a900;font-size:12px}.count{text-align:right;font-size:11px;color:#7e8a83}

    .new-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}.new-card{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden;box-shadow:var(--shadow-soft)}.new-img{height:100px}.new-body{padding:9px}.new-body h3{font-size:12px;color:#1c2b20;font-weight:900;line-height:1.35}.new-price{color:var(--green);font-weight:900;font-size:13px;margin-top:6px}.time{float:right;color:#8d978f;font-size:10px;font-weight:500}

    .newsletter{background:#eef6e7;border-radius:10px;padding:18px 22px;display:grid;grid-template-columns:1fr 470px 300px;gap:22px;align-items:center;margin-bottom:26px}.newsletter h2{font-size:22px;color:var(--green-3);font-weight:900;margin-bottom:4px}.newsletter p{font-size:13px}.newsletter-form{height:40px;background:#fff;border:1px solid var(--line);border-radius:6px;display:grid;grid-template-columns:1fr 120px;overflow:hidden}.newsletter-form input{border:0;outline:none;padding:0 12px}.newsletter-form button{border:0;background:var(--green);color:#fff;font-weight:900}.news-benefits{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.news-benefits span{font-size:11px;color:#516157;display:flex;gap:7px;align-items:center}

    .footer{background:#101917;color:#fff;padding:28px 0 12px}.footer-grid{display:grid;grid-template-columns:1.35fr repeat(4,1fr);gap:32px}.footer .brand-text strong{color:#fff}.footer .brand-text span{color:#bac7bd}.footer p,.footer li{font-size:12px;color:#cbd6ce;line-height:1.75}.footer h3{font-size:13px;text-transform:uppercase;color:#fff;margin-bottom:12px}.footer ul{list-style:none;display:grid;gap:5px}.footer a:hover{color:#fff}.socials{display:flex;gap:9px;margin-top:14px}.social{width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.12);display:grid;place-items:center;font-size:11px}.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:24px;padding-top:12px;color:#aebbb3;font-size:12px}

    @media(max-width:1100px){
      .top-inner{grid-template-columns:200px 1fr}.top-actions{grid-column:1/-1;justify-content:flex-end}.topbar{height:auto;padding:10px 0}.nav{gap:16px}.hero-grid{grid-template-columns:1fr}.hero-card{max-width:400px}.cat-panel{grid-template-columns:repeat(4,1fr)}.product-grid,.new-grid{grid-template-columns:repeat(3,1fr)}.category-products{grid-template-columns:repeat(2,1fr)}.info-grid{grid-template-columns:1fr}.newsletter{grid-template-columns:1fr}.footer-grid{grid-template-columns:repeat(3,1fr)}.footer-grid>div:first-child{grid-column:1/-1}
    }
    @media(max-width:820px){
      .container{padding:0 14px}.brand-text strong{font-size:19px}.top-inner{grid-template-columns:1fr auto}.search{grid-column:1/-1}.post-btn,.login,.cart{display:none}.navline{height:auto}.nav-inner{height:58px}.menu-btn{min-width:auto}.nav{display:none;position:absolute;left:0;right:0;top:126px;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 14px 24px rgba(79,139,47,.12);height:auto;flex-direction:column;align-items:stretch;padding:8px 14px;z-index:60}.nav.open{display:flex}.nav a{height:38px}.nav a.active::after{display:none}.menu-toggle{display:grid;place-items:center}.hero h1{font-size:30px}.hero h1 span{font-size:34px}.hero-benefits{grid-template-columns:repeat(2,1fr)}.hero-search{grid-template-columns:1fr}.cat-panel,.product-grid,.new-grid{grid-template-columns:repeat(2,1fr)}.category-products{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr 1fr}.footer-grid>div:first-child{grid-column:1/-1}
    }
    @media(max-width:520px){
      body{font-size:13px}.hero-copy{padding:30px 0}.hero h1{font-size:27px}.hero h1 span{font-size:31px}.hero p{font-size:14px}.hero-benefits,.cat-panel,.product-grid,.new-grid,.footer-grid{grid-template-columns:1fr}.cat-card{border-right:0;border-bottom:1px solid var(--line)}.cat-card:last-child{border-bottom:0}.section-head{align-items:flex-start}.section-head h2{font-size:19px}.product-img{height:170px}.new-img{height:150px}.category-box{grid-template-columns:1fr}.category-img{height:180px}.seller{grid-template-columns:42px 1fr}.stars,.count{display:none}.newsletter{padding:18px 14px}.newsletter-form{grid-template-columns:1fr}.newsletter-form button{height:40px}.news-benefits{grid-template-columns:1fr}.footer-grid>div:first-child{grid-column:auto}
    }

/* WordPress + WooCommerce extensions */
body.admin-bar .nav.open{top:158px}.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.alignwide,.alignfull{max-width:var(--container);margin-left:auto;margin-right:auto}.entry-content{font-size:15px;color:var(--text);line-height:1.75}.entry-content p{margin:0 0 1em}.entry-content h1,.entry-content h2,.entry-content h3{color:var(--ink);line-height:1.25;margin:1em 0 .55em;font-weight:800}.page-shell{padding:34px 0}.page-card{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-soft);padding:24px}.page-title{font-size:30px;color:var(--ink);font-weight:900;letter-spacing:-.4px;margin:0 0 16px}.breadcrumb{font-size:12px;color:var(--muted);margin-bottom:14px}.breadcrumb a{color:var(--green);font-weight:800}.layout-with-sidebar{display:grid;grid-template-columns:1fr 300px;gap:24px;align-items:start}.sidebar-box{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-soft);padding:18px;margin-bottom:16px}.sidebar-box h3{font-size:15px;color:var(--ink);font-weight:900;margin:0 0 12px}.sidebar-box ul{list-style:none;display:grid;gap:8px}.sidebar-box li,.sidebar-box a{font-size:13px;color:#516157}.sidebar-box a:hover{color:var(--green)}.post-list{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.post-card{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-soft);overflow:hidden}.post-thumb{height:150px;background:#eef3ea}.post-body{padding:14px}.post-body h2,.post-body h3{font-size:16px;line-height:1.35;color:var(--ink);font-weight:900;margin-bottom:8px}.post-meta{font-size:11px;color:var(--muted);margin-bottom:8px}.read-more{display:inline-flex;align-items:center;margin-top:10px;color:var(--green);font-size:12px;font-weight:900}.khdc-pagination{margin-top:22px;display:flex;gap:8px;flex-wrap:wrap}.khdc-pagination .page-numbers{min-width:34px;height:34px;border:1px solid var(--line);border-radius:7px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;font-size:13px;font-weight:800;background:#fff}.khdc-pagination .current{background:var(--green);color:#fff;border-color:var(--green)}.single-cover{height:320px;border-radius:12px;overflow:hidden;margin-bottom:20px;background:#eef3ea}.single-meta{font-size:12px;color:var(--muted);margin-bottom:14px}.related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.related-card{display:grid;grid-template-columns:96px 1fr;gap:12px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-soft);padding:10px}.related-thumb{height:74px;border-radius:8px;overflow:hidden;background:#eef3ea}.related-card h3{font-size:13px;line-height:1.35;color:var(--ink);font-weight:900}.khdc-empty{background:#fff;border:1px dashed var(--line);border-radius:12px;padding:30px;text-align:center;color:var(--muted)}
.woocommerce .site-main,.woocommerce-page .site-main{padding:34px 0}.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:0;padding:0}.woocommerce ul.products li.product{width:auto!important;margin:0!important;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-soft);overflow:hidden;padding:0 0 12px;position:relative}.woocommerce ul.products li.product a img{height:190px;object-fit:cover;margin:0 0 12px}.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:14px;color:var(--ink);font-weight:900;line-height:1.35;padding:0 12px;min-height:40px}.woocommerce ul.products li.product .price{display:block;padding:0 12px;color:var(--green);font-size:15px;font-weight:900}.woocommerce ul.products li.product .button{display:none}.woocommerce-result-count,.woocommerce-ordering{font-size:13px;margin-bottom:16px}.woocommerce div.product{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-soft);padding:20px}.woocommerce div.product .product_title{font-size:30px;color:var(--ink);font-weight:900}.woocommerce div.product p.price{color:var(--green);font-size:24px;font-weight:900}.woocommerce .quantity,.woocommerce div.product form.cart .button{display:none!important}.woocommerce div.product .woocommerce-tabs ul.tabs li a{font-weight:900}.single-product-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.khdc-btn{height:42px;border-radius:7px;background:var(--green);color:#fff;font-weight:900;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;border:0}.khdc-btn.yellow{background:var(--yellow);color:#1c180d}.khdc-btn.outline{background:#fff;color:var(--green);border:1px solid var(--line)}.khdc-product-extra{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}.khdc-mini{background:#f6f9f3;border:1px solid var(--line);border-radius:10px;padding:12px}.khdc-mini strong{display:block;color:var(--ink);font-size:13px}.khdc-mini span{font-size:12px;color:var(--muted)}
.mobile-bottom-nav{display:none;position:fixed;left:0;right:0;bottom:0;z-index:99;background:#fff;border-top:1px solid var(--line);box-shadow:0 -10px 26px rgba(35,68,30,.09);grid-template-columns:repeat(4,1fr)}.mobile-bottom-nav a{height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;color:#536159;font-weight:800}.mobile-bottom-nav b{font-size:17px;line-height:1;color:var(--green)}
@media(max-width:1100px){.post-list{grid-template-columns:repeat(2,1fr)}.layout-with-sidebar{grid-template-columns:1fr}.woocommerce ul.products{grid-template-columns:repeat(3,1fr)}}
@media(max-width:820px){.post-list{grid-template-columns:repeat(2,1fr)}.woocommerce ul.products{grid-template-columns:repeat(2,1fr)}.page-title{font-size:24px}.mobile-bottom-nav{display:grid}body{padding-bottom:54px}.khdc-product-extra{grid-template-columns:1fr}}
@media(max-width:520px){.post-list,.related-grid{grid-template-columns:1fr}.related-card{grid-template-columns:86px 1fr}.single-cover{height:220px}.woocommerce ul.products{grid-template-columns:repeat(2,1fr);gap:12px}.woocommerce ul.products li.product a img{height:145px}.woocommerce div.product .product_title{font-size:24px}.page-card{padding:18px}}
