/*
Theme Name: VNCI UOBDII PRO
Description: UOBDII-style WooCommerce theme. v1.2.0 (params 1:1-like DL block + paypal hook + warehouse + version badges)
Version: 1.2.1
Text Domain: vnci-uobdii-pro
*/
:root{--vnci-orange:#f57c00;--vnci-blue:#2aa3ff;--vnci-header:#2b3b6e;--vnci-border:#e3e6ea;--vnci-gray:#f5f5f7;--vnci-text:#1f2937;--vnci-muted:#6b7280}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--vnci-text);background:#fff}
a{color:inherit;text-decoration:none}img{max-width:100%;height:auto}.container{max-width:1240px;margin:0 auto;padding:0 16px}
.sep{height:1px;background:var(--vnci-border);margin:14px 0}
.badge{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:999px;border:1px solid var(--vnci-border);background:#fff;font-size:12px;color:var(--vnci-muted)}
.badge.green{border-color:#cce9d3;background:#f2fbf4;color:#1f7a34}.badge.purple{border-color:#e7d7ff;background:#f7f2ff;color:#6d28d9}.badge.red{border-color:#ffd1d1;background:#fff1f1;color:#b91c1c}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:2px;padding:9px 12px;border:1px solid var(--vnci-border);background:#fff;cursor:pointer;font-weight:700}
.btn-cart{background:var(--vnci-orange);border-color:var(--vnci-orange);color:#fff;border-radius:2px;padding:9px 12px}
.vnci-topbar{background:#0b0b0c;color:#fff;font-size:12px}.vnci-topbar .container{display:flex;justify-content:space-between;padding:6px 16px}
.vnci-header{background:var(--vnci-header);border-bottom:1px solid rgba(255,255,255,.12)}.vnci-header .container{display:flex;gap:12px;align-items:center;padding:10px 16px;color:#fff}
.vnci-logo img{max-height:34px}.vnci-search{flex:1;display:flex;gap:0;align-items:center}
.vnci-search select,.vnci-search input{height:34px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:#fff;padding:0 10px;outline:none}
.vnci-search select{border-radius:2px 0 0 2px}.vnci-search input{flex:1;border-left:0}
.vnci-search button{height:34px;border:0;background:var(--vnci-blue);color:#fff;padding:0 12px;border-radius:0 2px 2px 0;font-weight:800;cursor:pointer}
.vnci-nav{background:#fff;border-bottom:1px solid var(--vnci-border)}.vnci-nav ul{display:flex;gap:10px;list-style:none;margin:0;padding:8px 0;flex-wrap:wrap}
.vnci-nav li a{padding:8px 10px;border-radius:2px;font-weight:800;font-size:12px;color:#1f2a44}.vnci-nav li a:hover{background:var(--vnci-gray)}
.vnci-main{padding:14px 0}.vnci-layout{display:grid;grid-template-columns:260px 1fr;gap:14px}
.vnci-card{border:1px solid var(--vnci-border);background:#fff;border-radius:2px}
.vnci-sidebar{padding:10px}.vnci-sidebar h3{margin:0 0 8px 0;font-size:13px;font-weight:900}
.vnci-cat-tree{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.vnci-cat-tree a{display:block;padding:6px 8px;border-radius:2px;font-size:12px;color:#1f2a44}
.vnci-cat-tree a:hover{background:var(--vnci-gray)}.vnci-cat-tree .lvl-1 a{font-weight:900}.vnci-cat-tree .lvl-2 a{padding-left:18px;font-weight:700}.vnci-cat-tree .lvl-3 a{padding-left:28px}
.vnci-products{display:grid;gap:10px;padding:10px}
.vnci-prod{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:10px;border:1px solid var(--vnci-border);border-radius:2px}
.vnci-prod .thumb{background:var(--vnci-gray);border-radius:2px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.vnci-prod .title{font-weight:900;font-size:13px;color:#0f172a}
.vnci-prod .desc{font-size:12px;color:var(--vnci-muted);line-height:1.5;max-height:3.2em;overflow:hidden}
.vnci-prod .price{font-weight:900;color:#b91c1c;margin-top:4px}
.vnci-prod .meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}
.vnci-prod .actions{display:flex;gap:8px;align-items:center;margin-top:8px;flex-wrap:wrap}
.vnci-single{padding:12px}.vnci-single-top{display:grid;grid-template-columns:380px 1fr;gap:14px}
.vnci-note{background:#fff6d7;border:1px solid #ffd98a;padding:10px;border-radius:2px;font-size:12px;color:#6b4e00}
.vnci-params{border:1px solid var(--vnci-border);border-radius:2px;overflow:hidden}
.vnci-params dl{margin:0}.vnci-params .row{display:grid;grid-template-columns:220px 1fr;border-top:1px solid var(--vnci-border)}
.vnci-params .row:first-child{border-top:0}.vnci-params dt{margin:0;padding:10px;background:#f3f4f6;font-weight:900;font-size:12px;color:#111827}
.vnci-params dd{margin:0;padding:10px;background:#fff;font-size:12px;line-height:1.55;color:#111827}
@media(max-width:980px){.vnci-layout{grid-template-columns:1fr}.vnci-single-top{grid-template-columns:1fr}.vnci-search select{display:none}}
@media(max-width:720px){.vnci-params .row{grid-template-columns:1fr}.vnci-params dt{border-bottom:1px solid var(--vnci-border)}}

/* v1.2.1 patch: uobdii-like home */
.vnci-card{border-radius:12px;overflow:hidden}
.vnci-hero{padding:0;margin-bottom:14px}
.vnci-carousel{position:relative;background:#0b1220}
.vnci-carousel-track{display:flex;transition:transform .45s ease;will-change:transform}
.vnci-slide{min-width:100%;position:relative}
.vnci-slide-img{width:100%;height:auto;display:block}
.vnci-slide-overlay{position:absolute;left:350px;top:18px;right:18px;bottom:18px;display:flex;flex-direction:column;justify-content:center;gap:10px}
.vnci-slide-title{color:#fff;font-weight:800;font-size:30px;max-width:520px;line-height:1.25;text-shadow:0 2px 12px rgba(0,0,0,.35)}
.vnci-slide-sub{color:#e5e7eb;font-size:15px;max-width:520px;opacity: .9;}
.vnci-slide-btn{display:inline-flex;align-items:center;justify-content:center;width:160px;height:42px;border-radius:10px;background:#dc2626;color:#fff;font-weight:800;text-decoration:none}
.vnci-carousel-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:999px;border:0;background:rgba(0,0,0,.35);color:#fff;font-size:28px;cursor:pointer}
.vnci-carousel-nav.prev{left:10px}
.vnci-carousel-nav.next{right:10px}
.vnci-carousel-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;gap:8px;justify-content:center}
.vnci-carousel-dots button{width:10px;height:10px;border-radius:999px;border:0;background:rgba(255,255,255,.35);cursor:pointer}
.vnci-carousel-dots button.is-active{background:#fff}

.vnci-cat-cards{margin-bottom:14px}
.vnci-card-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #e5e7eb;background:#fff}
.vnci-card-title{font-weight:900;font-size:14px}
.vnci-cat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:12px}
.vnci-cat-card{border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#fff;text-decoration:none;color:#111827;display:flex;flex-direction:column;gap:8px}
.vnci-cat-card:hover{border-color:#dc2626;box-shadow:0 10px 18px rgba(17,24,39,.08)}
.vnci-cat-ico{font-size:26px}
.vnci-cat-name{font-weight:900}
.vnci-cat-cta{color:#dc2626;font-weight:800;font-size:12px}

.vnci-floor{margin-bottom:14px}
.vnci-floor-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #e5e7eb;background:#fff}
.vnci-floor-title{font-weight:900;font-size:14px}
.vnci-floor-more{color:#dc2626;text-decoration:none;font-weight:800;font-size:12px}
.vnci-floor-body{padding:10px}

@media(max-width:1024px){
  .vnci-cat-grid{grid-template-columns:repeat(2,1fr)}
  .vnci-slide-title{font-size:22px}
}


/* ===== VNCI Home Floor 2 (like uobdii) ===== */
.vnci-floor2{
  margin:16px 0;
  border-radius:12px;
  background:#fff;
  border:1px solid #e5e7eb;
  overflow:hidden;
}
.vnci-floor2-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
}
.vnci-floor2-title{
  font-weight:900;
  color:#dc2626;
  text-decoration:none;
  font-size:18px;
}
.vnci-floor2-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
.vnci-floor2-tab{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 10px;
  border:1px solid #d1d5db;
  border-radius:6px;
  font-size:12px;
  color:#111827;
  text-decoration:none;
  background:#fff;
  white-space:nowrap;
}
.vnci-floor2-tab:hover{
  border-color:#dc2626;
  color:#dc2626;
}
.vnci-floor2-more{position:relative}
.vnci-floor2-more-btn{
  height:28px;
  padding:0 10px;
  border:1px solid #d1d5db;
  border-radius:6px;
  background:#fff;
  font-size:12px;
  cursor:pointer;
}
.vnci-floor2-more-menu{
  display:none;
  position:absolute;
  right:0;
  top:34px;
  z-index:50;
  min-width:180px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  box-shadow:0 14px 30px rgba(17,24,39,.12);
  padding:8px;
}
.vnci-floor2-more-menu a{
  display:block;
  padding:8px 10px;
  border-radius:8px;
  color:#111827;
  text-decoration:none;
  font-size:12px;
}
.vnci-floor2-more-menu a:hover{background:#f3f4f6}
.vnci-floor2-more:hover .vnci-floor2-more-menu{display:block}

.vnci-floor2-body{padding:12px}
.vnci-floor2-products{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin:0;
  padding:0;
}
.vnci-prod2{
  list-style:none;
  border:1px solid #e5e7eb;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.vnci-prod2-thumb{
  display:block;
  padding:10px;
  background:#fff;
}
.vnci-prod2-thumb img{
  width:100%;
  height:auto;
  display:block;
}
.vnci-prod2-meta{
  padding:10px 10px 12px;
}
.vnci-prod2-title{
  display:block;
  font-size:12px;
  line-height:1.35;
  color:#111827;
  text-decoration:none;
  min-height:34px;
}
.vnci-prod2-title:hover{color:#dc2626}
.vnci-prod2-price{
  margin-top:6px;
  font-weight:900;
  color:#f97316;
}
.vnci-floor2-empty{padding:14px;color:#6b7280;font-size:12px}

@media(max-width:1024px){
  .vnci-floor2-products{grid-template-columns:repeat(2,1fr)}
  .vnci-floor2-head{flex-direction:column;align-items:flex-start}
  .vnci-floor2-tabs{flex-wrap:wrap}
}


/* ========= FIX: Home products layout bug (VNCI Floor2) ========= */

/* 1) 强制 floor2 使用 grid，不被 Woo 默认 .products flex/float 干扰 */
.vnci-floor2-products.products{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2) 清掉 Woo 默认 li 的 float / width */
.vnci-floor2-products.products > li{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* 3) 卡片结构：保证正常宽高，不会变“细长条” */
.vnci-prod2{
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  min-height: 260px;
}

/* 4) 图片容器：固定比例，图片完整显示 */
.vnci-prod2 .vnci-prod2-thumb{
  display: block !important;
  padding: 10px !important;
  background: #fff;
}

.vnci-prod2 .vnci-prod2-thumb img{
  width: 100% !important;
  height: 180px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 5) 标题/价格区域：不要被挤成一列 */
.vnci-prod2-meta{
  padding: 10px 12px 14px !important;
}

.vnci-prod2-title{
  display: block !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  min-height: 36px !important;
  word-break: break-word;
}

.vnci-prod2-price{
  margin-top: 6px !important;
  font-weight: 900 !important;
}

/* 6) 响应式：平板 2 列，手机 1 列 */
@media (max-width: 1024px){
  .vnci-floor2-products.products{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px){
  .vnci-floor2-products.products{
    grid-template-columns: 1fr !important;
  }
}

/* 7) 防止主题旧样式把商品图片限制成很小 */
.home .products img,
.home .woocommerce ul.products li.product img{
  max-width: 100% !important;
  height: auto !important;
}


/* Fix Woo clearfix pseudo elements breaking CSS Grid (only for our floor grid) */
.vnci-floor2 ul.products.vnci-floor2-products::before,
.vnci-floor2 ul.products.vnci-floor2-products::after{
  content: none !important;
  display: none !important;



