/* ================== SEARCH BAR (theo mockup) ================== */
.searchbar-wrap {
    background: #F7F7F7;
    padding: 15px 16px;
    border-bottom: 1px solid #F4F4F4;

}

.searchbar {
    width: min(1440px, 100%);
    margin: 0 auto;
}

/* Desktop Search Layout */
.searchbar-desktop {
    display: grid;
    grid-template-columns: 176px 16px 568px;
    align-items: center;
    justify-content: center;
}

/* Mobile Search Layout */
.searchbar-mobile {
    display: none;
    align-items: center;
    gap: 8px;
}

.cat-wrap {
    position: relative;
}

.cat-btn {
    min-height: 56px;
    padding: 0 15px;
    border: 0;
    border-radius: 6px;
    background: var(--yellow);
    color: #11261B;
    font: 700 15px "Open Sans", system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    cursor: pointer;
}

.cat-btn:focus {
    outline: 2px solid rgba(17, 38, 27, .35);
    outline-offset: 2px
}

.chev-fill {
    width: 12px;
    height: 7px;
    display: block;
    background: #11261B;
    mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 7\"><path fill=\"%23000\" d=\"M6 7 0 1.5 1.5 0 6 4 10.5 0 12 1.5z\"/></svg>') center/contain no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 7\"><path fill=\"%23000\" d=\"M6 7 0 1.5 1.5 0 6 4 10.5 0 12 1.5z\"/></svg>') center/contain no-repeat;
}

.cat-menu {
    position: absolute;
    margin-top: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    width: 260px;
    padding: 6px;
    display: none;
    z-index: 10;
}

.cat-wrap.open .cat-menu {
    display: block;
}

.cat-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: #111;
    text-decoration: none;
    font: 400 14px/1.4 Roboto, system-ui, sans-serif;
}

.cat-menu a:hover {
    background: #F7F7F7;
}
.cat-menu { display:none;}
.cat-wrap.open .cat-menu { display:block; }

.search {
    min-height: 56px;
    padding: 0 15px;
    background: #fff;
    border-radius: 6px;
    outline: 1px solid rgba(17, 38, 27, .4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Mobile Search Styles */
.search-mobile {
    flex: 1;
    height: 36px;
    padding: 4px 20px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid rgba(17, 38, 27, 0.40);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-mobile input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #C8C9CB;
    font: 400 15px/22.5px Roboto, system-ui;
}

.search-btn-mobile {
    width: 36px;
    height: 36px;
    border: 0;
    background: #2E7D32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font: 400 15px/22.5px Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

.search input::placeholder {
    color: #787878;
}

.search-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: grid;
    place-items: center;
}

.search-btn:focus {
    outline: 2px solid rgba(17, 38, 27, .35);
    outline-offset: 2px
}

.icons {
    width: 25px;
    height: 25px;
    position: relative
}

.icons:before,
.icons:after {
    content: "";
    position: absolute;
    border: 2px solid #11261B
}

.icons:before {
    left: 2px;
    top: 2px;
    width: 17.26px;
    height: 17.65px;
    border-radius: 999px
}

.icons:after {
    right: 1px;
    bottom: 1px;
    width: 6px;
    height: 6px;
    transform: rotate(45deg)
}

@media (max-width:1200px) {
    .searchbar-desktop {
        grid-template-columns: 176px 12px 1fr;
    }
}

@media (max-width:768px) {
    .searchbar-desktop {
        display: none;
    }

    .searchbar-mobile {
        display: flex;
    }
}

/* ===== SIDEBAR (tối giản) ===== */
.sp-sidenav {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.sp-sidenav-title {
    color: var(--green);
    font-weight: 700;
    margin-bottom: 1rem;
}

.sp-sidenav .nav-link {
    padding: .5rem 0;
    color: #212529 !important;
    /* màu đen, không bị ảnh hưởng bởi navbar */
    border-radius: 0;
}

.sp-sidenav .nav-link:hover {
    color: var(--green);
    background: transparent;
}

.sp-sidenav .nav-link.active {
    color: var(--green) !important;
    font-weight: 600;
}

/* sticky dưới navbar */
@media (min-width:992px) {
    .sp-sidenav.sticky-lg-top {
        top: calc(var(--nav-h) + 16px);
    }
}

/* Cards */
.sp-thumb {
    background: #f8f9fa;
}

.sp-thumb img {
    object-fit: contain;
}

.card-product .btn-buy {
    background: var(--green);
    border-color: var(--green);
    line-height: 1.2;
    padding: .35rem .6rem;
}

.card-product .btn-buy:hover {
    filter: brightness(.95);
}



:root {
    --green: #2E7D32;
}

/* nếu đã có thì giữ nguyên */

.sp-sidenav {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.sp-sidenav-title {
    color: var(--green);
    font-weight: 700;
    margin-bottom: 1rem;
}

.sp-sidenav .nav-link {
    padding: .5rem 0;
    /* khoảng cách như ảnh */
    color: #212529;
    border-radius: 0;
}

.sp-sidenav .nav-link:hover {
    color: var(--green);
    background: transparent;
    /* không có nền hover */
    text-decoration: none;
}

.sp-sidenav .nav-link.active {
    color: var(--green);
    font-weight: 600;
}

/* ========== FOOTER ========== */
.mrg-footer {
    color: #fff;
    background: linear-gradient(133deg, #725030 0%, #83653A 25%, #947044 50%, #83613E 100%);
    position: relative;
    /* gutter trái/phải + max width */
    --side-pad: 80px;
    --maxw: 1380px;
}

/* wrapper mở rộng – xích 2 bên */
.mrg-footer__inner,
.ft-bottom__inner {
    width: min(var(--maxw), calc(100vw - var(--side-pad)*2));
    margin-left: auto;
    margin-right: auto;
}

.mrg-footer__inner {
    display: grid;
    grid-template-columns: 316px 1fr 1fr 1fr 1.25fr;
    column-gap: 44px;
    row-gap: 28px;
    padding: 40px 0 34px;
}

/* brand */
.ft-brand {
    display: grid;
    gap: 26px;
    align-content: start;
}

.ft-brand__logo {
    width: 90px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ft-brand__intro {
    display: grid;
    gap: 6px;
}

.ft-brand__name {
    margin: 0;
    font: 700 18px/1.5 "Playfair Display", serif;
}

.ft-brand__sub {
    margin: 0;
    font: 400 15px/1.5 "Open Sans", system-ui, sans-serif;
}

.ft-social {
    display: flex;
    gap: 12px;
}

.ft-social__btn {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    transition: filter .2s ease, transform .06s ease, background .2s ease;
    border: 1px solid rgba(255, 255, 255, .25);
}

.ft-social__btn:hover {
    filter: brightness(1.08);
    background: rgba(255, 255, 255, .16);
}

.ft-social__btn:active {
    transform: translateY(1px);
}

/* columns */
.ft-col__title {
    margin: 0 0 14px;
    font: 700 16px/1 "Open Sans", system-ui, sans-serif;
}

.ft-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.ft-list a {
    color: #fff;
    text-decoration: none;
    font: 400 13px/1.6 "Open Sans", system-ui, sans-serif;
    opacity: .95;
}

.ft-list a:hover {
    text-decoration: underline;
}

/* contact – mặc định canh giữa theo icon */
.ft-contact .ft-contact__row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 12px;
    justify-self: start;
    font: 400 13px/1.6 "Open Sans", system-ui, sans-serif;
}

.ft-ico {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
}

.ft-ico svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ft-contact .ft-contact__row p,
.ft-contact .ft-contact__row a {
    margin: 0;
}

.ft-contact a {
    color: #fff;
    text-decoration: none;
}

.ft-contact a:hover {
    text-decoration: underline;
}

.ft-contact__hotline {
    color: #FCCD04;
    font: 700 19px/1.2 "Open Sans", system-ui, sans-serif;
}

/* HÀNG ĐỊA CHỈ: canh theo đỉnh icon (giống ảnh mẫu) */
.ft-contact .ft-contact__row--addr {
    align-items: flex-start;
}

.ft-contact .ft-contact__row--addr .ft-ico {
    margin-top: 4px;
}

/* đẩy icon xuống 1 chút cho đẹp */
.ft-contact .ft-contact__row--addr p {
    line-height: 1.6;
}

.ft-contact .ft-contact__row--addr p strong {
    display: block;
    font-weight: 700;
    font-size: 13px;
    /* muốn to hơn/nhỏ hơn chỉnh ở đây */
    line-height: 1.3;
    margin-bottom: 6px;
}

/* bottom bar */
.mrg-footer__bottom {
    background: rgba(34, 34, 34, .25);
}

.ft-bottom__inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: 400 13px/1.2 "Open Sans", system-ui, sans-serif;
}

/* responsive */
@media (max-width:1200px) {
    .mrg-footer {
        --side-pad: 56px;
    }
}

@media (max-width:1024px) {
    .mrg-footer__inner {
        grid-template-columns: 1fr 1fr;
        row-gap: 24px;
    }
}

@media (max-width:640px) {
    .mrg-footer {
        --side-pad: 16px;
        --maxw: 9999px;
    }

    .mrg-footer__inner {
        grid-template-columns: 1fr;
        padding: 32px 0 24px;
    }

    .ft-brand__logo {
        width: 120px;
    }

    .ft-contact__hotline {
        font-size: 12px;
    }
}

.file-card {
    position: relative;
    width: 361px;
    height: 80px;
    background: #FDFDFD;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    display: block;
    text-decoration: none;
    color: #131313;
}

.file-card .icon {
    position: absolute;
    left: 16px;
    top: 24px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #ECF1EF;
}

.file-card .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.file-card .name {
    position: absolute;
    left: 60px;
    top: 7px;
    font: 700 18px/38px "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: #131313;
}

.file-card .sub {
    position: absolute;
    left: 60px;
    top: 44px;
    font: 400 16px/20px "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: #818C99;
}

.file-card .dl {
    position: absolute;
    right: 16px;
    top: 28px;
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}
/* Helper hiển thị/ẩn theo thiết bị */
.pc-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 991px) {
  .pc-only { display: none !important; }
  .mobile-only { display: block !important; }
}

/* Ẩn sidebar & file-card trên mobile */
@media (max-width: 991px) {
  .sp-sidenav { display: none !important; }          /* ẩn cột trái */
}

/* Giảm khoảng trắng container ở mobile */
@media (max-width: 991px) {
  .container.py-5 { padding-top: 16px !important; padding-bottom: 24px !important; }
}

/* ===== Toolbar Mobile (giống hình 2) ===== */

.tm-count {
  font: 400 14px/1.2 Roboto, system-ui, sans-serif;
  color: #111;
}

.tm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #111;
  font: 500 14px/1 Roboto, system-ui, sans-serif;
}

.tm-pill:active { transform: translateY(1px); }

.tm-caret {
  width: 10px; height: 6px; display: inline-block; background: #111;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23000" d="M0 0h10L5 6z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23000" d="M0 0h10L5 6z"/></svg>') center/contain no-repeat;
}

/* Lưới card: ảnh contain + nút mua nhỏ gọn vẫn giữ */
.sp-thumb { background: #f8f9fa; }
.sp-thumb img { object-fit: contain; }

/* Searchbar: bạn đã có. Giữ: desktop ẩn, mobile hiện */
@media (max-width: 991px) {
  .searchbar-desktop { display: none; }
  .searchbar-mobile { display: flex; }
}

/* Nếu dùng side-rail icon dọc ở mobile (như hình 2) */
@media (max-width: 991px) {
  .hero-rail {
    position: fixed;
    right: 8px;
    top: 40%;
    transform: translateY(-50%);
    display: grid;
    gap: 8px;
    z-index: 1000;
  }
  .hero-rail .rail-item { width: 44px; height: 44px; display: block; }
  .hero-rail .rail-icon img { width: 100%; height: 100%; object-fit: contain; }
}



/* vỏ pill */
.tm-select{
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  height: 36px;
  gap: 6px;
  min-width: 80px;
}

/* combobox */
.tm-select select{
  appearance: none;          /* ẩn caret mặc định */
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 0;
  background: transparent;
  font: 500 14px/1 Roboto, system-ui, sans-serif;
  color: #111;
  padding-right: 18px;       /* chừa chỗ caret custom */
}

/* caret custom */
.tm-select .tm-caret{
  position: absolute;
  right: 10px;
  width: 10px; height: 6px; background:#111;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23000" d="M0 0h10L5 6z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23000" d="M0 0h10L5 6z"/></svg>') center/contain no-repeat;
}

/* kích thước gọn cho mobile */
.toolbar-mobile{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2px;
  align-items: center;
}
/* Media query */
@media (max-width: 991px) {
  .pc-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
  .contact-rail{
    bottom: 70px !important;
  }
  .contact-fab{
    bottom: 110px !important;
  }
}

#productGrid {
  transition: opacity 0.3s ease;
}
.animate-item {
  animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
