@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Bảng màu thương hiệu — thay giá trị khi có bộ nhận diện chính thức của khách */
:root {
    --vtd-primary: #398B29;
    --vtd-primary-dark: #2F7422;
    --vtd-primary-soft: #F1F8EF;
    --vtd-buy: #0FA80F;
    --vtd-sale: #FFD004;
    --vtd-text: #323C42;
    --vtd-muted: #9E9E9E;
    --vtd-line: #E5E8EC;
    --vtd-soft: #EAEDF1;
    --vtd-footer: #24272E;
    --vtd-footer-text: #D3D5DA;
    --vtd-footer-muted: #8B8E96;
    --vtd-container: 1200px;
    --vtd-radius: 6px;
}

/* ===== Nền chung ===== */
body {
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--vtd-text);
    background: #fff;
}
a { color: var(--vtd-text); }
a:hover, a:focus { color: var(--vtd-primary); text-decoration: none; }
img { max-width: 100%; height: auto; }
.vtd-container {
    width: 100%;
    max-width: var(--vtd-container);
    margin: 0 auto;
    padding: 0 15px;
}
.hidden { display: none !important; }

/* Tắt các mảnh của theme mặc định không dùng */
.site-banner, .section-header-bar, .section-nav, .third-nav, .theme-change, #ftip, #tip { display: none; }

/* ===== Header ===== */
.vtd-header-top {
    background: #fff;
    border-bottom: 1px solid var(--vtd-line);
}
.vtd-header-row {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 88px;
    padding: 10px 0;
}
.vtd-logo { flex: 0 0 auto; }
.vtd-logo img {
    max-height: 66px;
    width: auto;
    object-fit: contain;
    display: block;
}
.vtd-search { flex: 1 1 320px; max-width: 480px; }
.vtd-search form { margin: 0; }
.vtd-search .input-group, .vtd-search .form-group { margin: 0; display: flex; }
.vtd-search input[type="text"], .vtd-search input[type="search"], .vtd-search .form-control {
    height: 42px;
    flex: 1 1 auto;
    width: 100%;
    border: 1px solid var(--vtd-primary);
    border-right: 0;
    border-radius: 21px 0 0 21px;
    padding: 0 18px;
    box-shadow: none;
    font-size: 14px;
}
.vtd-search button, .vtd-search .btn {
    height: 42px;
    min-width: 54px;
    background: var(--vtd-primary);
    color: #fff;
    border: 1px solid var(--vtd-primary);
    border-radius: 0 21px 21px 0;
    padding: 0 16px;
}
.vtd-search button:hover, .vtd-search .btn:hover { background: var(--vtd-primary-dark); color: #fff; }
.vtd-hotline {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    line-height: 1.2;
}
.vtd-hotline .fa { font-size: 28px; color: var(--vtd-primary); }
.vtd-hotline small { display: block; color: #6B7280; font-size: 12px; }
.vtd-hotline strong, .vtd-hotline a { display: block; color: var(--vtd-primary); font-size: 17px; font-weight: 700; }
.vtd-account { white-space: nowrap; font-size: 13px; line-height: 1.3; }
.vtd-account a { color: var(--vtd-primary); font-weight: 500; }
.vtd-cart {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}
.vtd-cart a, .vtd-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--vtd-text);
}
.vtd-badge {
    position: absolute;
    top: -8px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--vtd-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.vtd-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 6px;
    border: 1px solid var(--vtd-line);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.vtd-menu-toggle span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--vtd-primary);
}

/* ===== Thanh menu xanh ===== */
.vtd-nav {
    background: var(--vtd-primary);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.vtd-nav-row { display: flex; align-items: stretch; min-height: 46px; }
.vtd-nav-cat { position: relative; flex: 0 0 270px; width: 270px; }
.vtd-nav-cat-btn {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 0;
    background: var(--vtd-primary-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}
.vtd-nav-cat-btn .fa { font-size: 16px; }
.vtd-nav-cat-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--vtd-line);
    border-top: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    z-index: 1000;
}
.vtd-nav-cat:hover .vtd-nav-cat-panel, .vtd-nav-cat.is-open .vtd-nav-cat-panel { display: block; }
.vtd-nav-cat-panel ul { list-style: none; margin: 0; padding: 0; }
.vtd-nav-cat-panel li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid #F0F2F4;
    color: var(--vtd-text);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}
.vtd-nav-cat-panel li:last-child a { border-bottom: 0; }
.vtd-nav-cat-panel li a:hover { background: var(--vtd-primary-soft); color: var(--vtd-primary); }
.vtd-nav-cat-panel li a img { width: 22px; height: 22px; object-fit: contain; }
.vtd-nav-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding-left: 8px;
    min-width: 0;
}
.vtd-nav-main ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.vtd-nav-main li { position: relative; }
.vtd-nav-main a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    padding: 0 16px;
    line-height: 46px;
    font-size: 14px;
    font-weight: 500;
}
.vtd-nav-main li:hover > a, .vtd-nav-main li.active > a, .vtd-nav-main li.current > a, .vtd-nav-main li.current-menu-item > a {
    background: rgba(255, 255, 255, .16);
}
.vtd-nav-main li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--vtd-line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    z-index: 1000;
}
.vtd-nav-main li:hover > ul { display: flex; }
.vtd-nav-main li ul a {
    color: var(--vtd-text);
    line-height: 40px;
    padding: 0 16px;
    font-weight: 400;
    text-transform: none;
    border-bottom: 1px solid #F0F2F4;
}
.vtd-nav-main li ul li:last-child a { border-bottom: 0; }
.vtd-nav-main li ul a:hover { background: var(--vtd-primary-soft); color: var(--vtd-primary); }
.vtd-sub-toggle { margin-left: auto; padding-left: 6px; }

/* ===== Thân trang ===== */
.vtd-body { padding-bottom: 20px; }
.vtd-breadcrumbs { padding: 12px 0 4px; font-size: 13px; }
.vtd-breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.vtd-breadcrumbs li + li::before { content: "/"; color: var(--vtd-muted); margin-right: 6px; }
.vtd-breadcrumbs a { color: #6B7280; }
.vtd-breadcrumbs li:last-child a { color: var(--vtd-primary); font-weight: 500; }

.vtd-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin: 16px 0 30px;
}
.vtd-sidebar { flex: 0 0 270px; width: 270px; min-width: 0; }
.vtd-main { flex: 1 1 auto; min-width: 0; }
.vtd-page-full { margin: 16px 0 30px; }

/* ===== Khối/section dùng chung cho trang chủ và block ===== */
.vtd-section { margin: 32px 0; }
.vtd-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 3px solid var(--vtd-primary);
    margin-bottom: 20px;
}
.vtd-section-title {
    display: inline-block;
    margin: 0;
    padding: 10px 22px;
    background: var(--vtd-primary);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}
.vtd-section-title a { color: #fff; }
.vtd-section-more { font-size: 13px; color: var(--vtd-primary); font-weight: 500; padding-bottom: 8px; white-space: nowrap; }
.vtd-section-sub { color: #6B7280; font-size: 13px; margin-top: 4px; }

.vtd-home > section:empty { display: none; }
.vtd-home-slider { margin: 16px 0 8px; }
.vtd-home-slider img { width: 100%; border-radius: var(--vtd-radius); }

/* Tab sản phẩm trang chủ */
.vtd-tabs { display: flex; background: var(--vtd-soft); border-radius: var(--vtd-radius) var(--vtd-radius) 0 0; overflow: hidden; }
.vtd-tabs li { flex: 1; list-style: none; }
.vtd-tabs a, .vtd-tabs button {
    display: block;
    width: 100%;
    padding: 12px 10px;
    text-align: center;
    color: var(--vtd-text);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.vtd-tabs a small, .vtd-tabs button small { display: block; font-weight: 400; text-transform: none; font-size: 12px; color: #6B7280; }
.vtd-tabs .active a, .vtd-tabs .active button, .vtd-tabs a.active, .vtd-tabs button.active { background: var(--vtd-primary); color: #fff; }
.vtd-tabs .active small, .vtd-tabs a.active small, .vtd-tabs button.active small { color: rgba(255, 255, 255, .85); }

/* Lưới sản phẩm + thẻ sản phẩm */
.vtd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.vtd-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vtd-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vtd-product {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--vtd-line);
    border-radius: var(--vtd-radius);
    transition: box-shadow .2s, transform .2s;
}
.vtd-product:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .10); transform: translateY(-2px); }
.vtd-product-img {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
    overflow: hidden;
}
.vtd-product-img img { max-height: 100%; width: auto; object-fit: contain; }
.vtd-product-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--vtd-sale);
    color: var(--vtd-text);
    font-size: 12px;
    font-weight: 700;
}
.vtd-product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: opacity .2s;
}
.vtd-product:hover .vtd-product-actions { opacity: 1; }
.vtd-product-actions a, .vtd-product-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--vtd-line);
    background: #fff;
    color: var(--vtd-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.vtd-product-actions a:hover, .vtd-product-actions button:hover { background: var(--vtd-primary); color: #fff; border-color: var(--vtd-primary); }
.vtd-product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
}
.vtd-product-name {
    margin: 0;
    min-height: 38px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vtd-product-name a { color: var(--vtd-text); }
.vtd-product-name a:hover { color: var(--vtd-primary); }
.vtd-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.vtd-price-current { color: var(--vtd-primary); font-size: 16px; font-weight: 700; }
.vtd-price-old { color: var(--vtd-muted); font-size: 13px; font-weight: 300; text-decoration: line-through; }
.vtd-price-contact { color: var(--vtd-primary); font-size: 14px; font-weight: 700; }

.vtd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: 0;
    border-radius: 4px;
    background: var(--vtd-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
}
.vtd-btn:hover, .vtd-btn:focus { background: var(--vtd-primary-dark); color: #fff; }
.vtd-btn-buy { background: var(--vtd-buy); }
.vtd-btn-buy:hover { background: #0C8F0C; }
.vtd-btn-outline { background: #fff; color: var(--vtd-primary); border: 1px solid var(--vtd-primary); }
.vtd-btn-outline:hover { background: var(--vtd-primary); color: #fff; }
.vtd-btn-block { width: 100%; }

/* Khối danh mục trang chủ: banner dọc + lưới */
.vtd-cat-block { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
.vtd-cat-banner img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--vtd-radius); }

/* Sidebar bộ lọc / block chung */
.vtd-box { border: 1px solid var(--vtd-line); border-radius: var(--vtd-radius); background: #fff; margin-bottom: 20px; }
.vtd-box-title {
    margin: 0;
    padding: 12px 15px;
    background: var(--vtd-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--vtd-radius) var(--vtd-radius) 0 0;
}
.vtd-box-body { padding: 12px 15px; }
.vtd-box ul { list-style: none; margin: 0; padding: 0; }
.vtd-box li { padding: 6px 0; border-bottom: 1px dashed #F0F2F4; }
.vtd-box li:last-child { border-bottom: 0; }

/* ===== Footer ===== */
.vtd-footer {
    margin-top: 40px;
    background: var(--vtd-footer);
    color: var(--vtd-footer-text);
    font-size: 13px;
}
.vtd-footer a { color: var(--vtd-footer-text); }
.vtd-footer a:hover { color: #fff; }
.vtd-footer-main { padding: 40px 0 24px; }
.vtd-footer-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
}
.vtd-footer-col h3, .vtd-footer-col h4, .vtd-footer-col .vtd-footer-title, .vtd-footer-col .panel-heading, .vtd-footer-col .block-title {
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}
.vtd-footer-col ul { list-style: none; margin: 0; padding: 0; }
.vtd-footer-col li { margin-bottom: 9px; }
.vtd-footer-col .panel, .vtd-footer-col .panel-body { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; color: inherit; }
.vtd-footer-info { border-top: 1px solid rgba(255, 255, 255, .10); padding: 20px 0; line-height: 1.7; }
.vtd-footer-info strong { color: #fff; }
.vtd-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .10);
    padding: 14px 0;
    color: var(--vtd-footer-muted);
    font-size: 12px;
    text-align: center;
}
.vtd-footer-bottom a { color: var(--vtd-footer-muted); }

/* ===== Nút nổi ===== */
.vtd-float {
    position: fixed;
    right: 16px;
    bottom: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vtd-float a, .vtd-float-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vtd-primary);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    transition: transform .2s, opacity .2s, visibility .2s;
}
.vtd-float a:hover, .vtd-float-btn:hover { color: #fff; transform: scale(1.06); }
.vtd-float a img { width: 26px; height: 26px; object-fit: contain; }
.vtd-float-phone { background: var(--vtd-primary); }
.vtd-float-zalo { background: #0068FF; }
.vtd-float-messenger { background: #0084FF; }
.vtd-bttop { background: var(--vtd-text); opacity: 0; visibility: hidden; }
.vtd-bttop.is-visible { opacity: 1; visibility: visible; }

/* ===== Thanh điều hướng dưới (mobile) ===== */
.vtd-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--vtd-line);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .08);
}
.vtd-bottom-nav:empty { display: none !important; }
.vtd-bottom-nav ul { display: flex; height: 100%; list-style: none; margin: 0; padding: 0; }
.vtd-bottom-nav li { flex: 1; }
.vtd-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: var(--vtd-text);
    font-size: 11px;
}
.vtd-bottom-nav .fa { font-size: 20px; }
.vtd-bottom-nav .vtd-bottom-center .fa {
    width: 52px;
    height: 52px;
    margin-top: -28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vtd-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(57, 139, 41, .4);
}

/* ===== Responsive ===== */
@media (max-width: 1279px) {
    .vtd-container { max-width: 1000px; }
    .vtd-grid, .vtd-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vtd-nav-cat { flex-basis: 240px; width: 240px; }
    .vtd-cat-block { grid-template-columns: 240px minmax(0, 1fr); }
    .vtd-header-row { gap: 16px; }
}
@media (max-width: 991px) {
    .vtd-hotline, .vtd-account { display: none; }
    .vtd-header-row { min-height: 66px; gap: 12px; }
    .vtd-logo img { max-height: 48px; }
    .vtd-menu-toggle { display: flex; }
    .vtd-nav { display: none; position: static; }
    .vtd-header.is-open .vtd-nav { display: block; }
    .vtd-nav-row { flex-direction: column; }
    .vtd-nav-cat { width: 100%; flex-basis: auto; }
    .vtd-nav-cat-panel { position: static; box-shadow: none; border: 0; }
    .vtd-nav-cat:hover .vtd-nav-cat-panel { display: none; }
    .vtd-nav-cat.is-open .vtd-nav-cat-panel { display: block; }
    .vtd-nav-main { padding: 0; }
    .vtd-nav-main ul { flex-direction: column; width: 100%; }
    .vtd-nav-main a { line-height: 44px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .vtd-nav-main li ul { position: static; display: none; min-width: 0; box-shadow: none; border: 0; background: rgba(0, 0, 0, .12); }
    .vtd-nav-main li:hover > ul { display: none; }
    .vtd-nav-main li.is-open > ul { display: flex; }
    .vtd-nav-main li ul a { color: #fff; padding-left: 32px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .vtd-layout { flex-direction: column; gap: 20px; }
    .vtd-sidebar { width: 100%; flex-basis: auto; }
    .vtd-shop-sidebar { order: 2; }
    .vtd-cat-block { grid-template-columns: minmax(0, 1fr); }
    .vtd-cat-banner { order: 2; }
    .vtd-grid, .vtd-grid-5, .vtd-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .vtd-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vtd-float { bottom: 76px; }
    .vtd-float a:not(.vtd-bttop) { display: none; }
    .vtd-bottom-nav { display: block; }
    body { padding-bottom: 60px; }
}
@media (max-width: 767px) {
    .vtd-header-row { flex-wrap: wrap; padding: 8px 0; row-gap: 8px; }
    .vtd-search { flex: 1 1 100%; max-width: none; order: 10; }
    .vtd-search input[type="text"], .vtd-search input[type="search"], .vtd-search .form-control, .vtd-search button, .vtd-search .btn { height: 38px; }
    .vtd-section-title { font-size: 15px; padding: 8px 14px; }
    .vtd-tabs a, .vtd-tabs button { font-size: 12px; padding: 10px 6px; }
    .vtd-tabs small { display: none; }
    .vtd-footer-main { padding: 28px 0 10px; }
    .vtd-footer-cols { gap: 20px; }
}
@media (max-width: 480px) {
    .vtd-container { padding: 0 12px; }
    .vtd-grid, .vtd-grid-5, .vtd-grid-3 { gap: 10px; }
    .vtd-product-name { font-size: 13px; min-height: 35px; }
    .vtd-price-current { font-size: 15px; }
    .vtd-footer-cols { grid-template-columns: minmax(0, 1fr); }
}
