:root {
  --primary: #27824B;
  --primary-dark: #1a5c35;
  --primary-soft: #6fbf8d;
  --primary-mist: #e8f5ee;
  --text-white-color: #fff;
  --text-black-color: #222;
  --background-sidebar: #f4faf6;
  --border-color: #c9ddd1;
  --muted: #666;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --gradient-hero: linear-gradient(125deg, #1a5c35 0%, #27824B 42%, #3fa66a 78%, #6fbf8d 100%);
  --gradient-btn: linear-gradient(135deg, #27824B 0%, #3fa66a 100%);
  --gradient-footer: linear-gradient(160deg, #163f28 0%, #1a5c35 45%, #27824B 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--muted);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(39, 130, 75, 0.08), transparent 55%),
    radial-gradient(700px 380px at 92% 4%, rgba(111, 191, 141, 0.1), transparent 50%),
    #fff;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: #222; }

.container-all {
  width: 100%;
  max-width: 1300px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Header */
header #header-main {
  padding: 16px 0;
  position: absolute;
  z-index: 10;
  width: 100%;
}
header #header-main .header-main--wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { width: 180px; }
.logo img { width: 100%; height: auto; }
.page-list #header-main .logo img,
.page-detail #header-main .logo img {
  filter: brightness(0) invert(1);
}
.page-detail #header-main,
.page-list.no-banner #header-main { /* kept for clarity */ }

#main-menu {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
#main-menu .menu-item { position: relative; }
#main-menu .menu-item + .menu-item { margin-left: 6px; }
#main-menu .menu-item > a h3 {
  color: var(--text-white-color);
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
}
#main-menu .menu-item:hover > a h3 { opacity: 0.9; }
#main-menu .sub-menu {
  position: absolute;
  min-width: 220px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 5px;
  top: 140%;
  left: 0;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.35s;
  z-index: 20;
}
#main-menu .menu-item:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#main-menu .sub-menu .menu-item + .menu-item { margin-top: 10px; margin-left: 0; }
#main-menu .sub-menu .menu-item a h3 {
  color: #333;
  padding: 0 8px;
  font-size: 14px;
}
#main-menu .sub-menu .menu-item:hover a h3 { color: var(--primary); }

.contact-home a p {
  margin: 0;
  color: var(--primary);
  background: #fff;
  border-radius: 50px;
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 700;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
}

/* Banner */
#banner-home {
  position: relative;
  background-image: var(--gradient-hero);
  margin-bottom: 30px;
  overflow: hidden;
}
#banner-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,0.18), transparent 42%),
    radial-gradient(circle at 82% 70%, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
}
#banner-home .banner-home--wrap {
  padding: 150px 0 80px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
#banner-home .banner-home--item {
  text-align: center;
  color: #fff;
}
#banner-home .banner-home--item h2 {
  font-size: clamp(26px, 4vw, 36px);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(16, 56, 32, 0.25);
}
#banner-home .banner-home--item h3 {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 400;
  margin-top: 18px;
  line-height: 1.5;
  color: rgba(255,255,255,0.95);
}

.page-hero-spacer {
  background-image: var(--gradient-hero);
  height: 110px;
  margin-bottom: 24px;
}

/* Search */
#form_search { margin-bottom: 28px; }
.form_search--wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(180deg, #f7fcf8 0%, var(--primary-mist) 100%);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 16px;
  align-items: flex-end;
}
.form_item { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.form_item--grow { flex: 1; min-width: 220px; }
.form_item .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}
.form_item input,
.form_item select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 11px 14px;
  font: inherit;
  background: #fff;
  color: #333;
}
.form_item .submit,
.bt {
  display: inline-block;
  background: var(--gradient-btn);
  color: #fff !important;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: 0.25s;
  box-shadow: 0 6px 16px rgba(39, 130, 75, 0.22);
}
.form_item .submit:hover,
.bt:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(39, 130, 75, 0.28);
}
.bt-outline {
  background: #fff;
  color: var(--primary) !important;
  border: 1px solid var(--primary);
  box-shadow: none;
}
.bt-outline:hover {
  background: var(--primary-mist);
  box-shadow: none;
}
.bt-lg { padding: 14px 32px; font-size: 16px; }

/* Layout */
.category-product--wrap {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.col-side { width: 280px; flex-shrink: 0; }
.col-main { flex: 1; min-width: 0; }

.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 14px;
}
.list-heading h1 { font-size: 22px; }
.list-heading p { margin: 0; color: #999; }

/* Sidebar */
#sidebar { position: sticky; top: 12px; }
#sidebar .widget {
  margin-bottom: 10px;
  border: 1px dashed var(--border-color);
  border-radius: 5px;
  padding: 20px;
}
.widget .wrap {
  background: var(--background-sidebar);
  border: 1px dashed var(--border-color);
  border-radius: 5px;
  padding: 20px;
  margin: -8px;
}
.widget-title {
  border-bottom: 1px solid #ddd;
  color: var(--primary);
  padding-bottom: 10px;
  margin-bottom: 15px;
  text-transform: uppercase;
  font-size: 16px;
}
.widget-body .menu-list li {
  padding: 6px 0 6px 20px;
  border-radius: 6px;
  margin-bottom: 4px;
  position: relative;
}
.widget-body .menu-list li:after {
  position: absolute;
  content: "•";
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  font-size: 22px;
  color: var(--primary);
}
.widget-body .menu-list li a { color: #444; font-size: 15px; }
.widget-body .menu-list li.active a,
.widget-body .menu-list li:hover a { color: var(--primary); font-weight: 600; }

/* Product rows */
#product_cat .item {
  border: 1px dashed var(--border-color);
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 8px 22px rgba(39, 130, 75, 0.08);
  margin-bottom: 28px;
  color: #666;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  transition: box-shadow 0.25s, border-color 0.25s;
}
#product_cat .item:hover {
  border-color: var(--primary-soft);
  box-shadow: 0 12px 28px rgba(39, 130, 75, 0.14);
}
#product_cat .item .media .wrap_img {
  width: 300px;
  height: 190px;
  background: #f7f7f7;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#product_cat .item .media .wrap_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#product_cat .item .text { padding: 5px 16px 0; flex: 1; }
#product_cat .item .info { max-width: 420px; }
#product_cat .item .title { font-size: 20px; margin-bottom: 8px; }
#product_cat .item .title a { color: #333; }
#product_cat .item .title a:hover { color: var(--primary); }
#product_cat .item .meta {
  color: #999;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 12px;
}
#product_cat .item .meta a { color: var(--primary); font-style: normal; }
#product_cat .features li {
  padding-left: 22px;
  margin-bottom: 8px;
  position: relative;
  font-size: 15px;
}
#product_cat .features li i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #999;
}
#product_cat .item .buy {
  width: 180px;
  border-left: 1px solid #ddd;
  padding: 8px 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#product_cat .item .add_to_cart_wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}
#product_cat .item .add_to_cart_wrap .bt {
  padding: 11px 16px;
  font-size: 14px;
}

/* Detail */
#breadcrumbs--wrap { padding-top: 8px; margin-bottom: 24px; }
#breadcrumbs span { font-size: 15px; }
#breadcrumbs span a { color: #222; }
#breadcrumbs span a:hover { color: var(--primary); }
#breadcrumbs span.divider { margin: 0 8px; color: #aaa; }
#breadcrumbs--wrap .name {
  margin: 18px 0 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 22px;
  font-size: 28px;
  color: #222;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
}
.detail-media {
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 0 14px rgb(0 0 0 / 10%);
  background: #fafafa;
}
.detail-media img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  margin: 0 auto;
}
.detail-cat { margin: 0 0 14px; }
.detail-cat a {
  display: inline-block;
  background: var(--primary-mist);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.detail-features { margin: 0 0 18px; }
.detail-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}
.detail-features li i {
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--primary);
}
.detail-excerpt {
  color: #555;
  margin-bottom: 22px;
  font-size: 15px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.detail-note { font-size: 13px; color: #999; margin: 0; }
.related { margin-top: 20px; padding-top: 10px; }
.related h2 { font-size: 22px; margin-bottom: 20px; }

.empty, .empty-box { padding: 40px 20px; text-align: center; }
.empty-box h1 { margin-bottom: 12px; }
.empty-box .bt { margin-top: 18px; }

/* Footer */
footer {
  margin-top: 60px;
  color: #fff;
  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.04'%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"),
    var(--gradient-footer);
}
footer .footer-main {
  padding: 50px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
footer .footer-main .list-cate-theme {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.theme-item { margin-right: 12px; margin-bottom: 12px; }
.theme-label { color: #ddd; font-weight: 600; margin-right: 8px; }
.theme-item a {
  display: inline-block;
  padding: 5px 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  color: #fff;
  transition: 0.3s;
  font-size: 14px;
}
.theme-item a:hover {
  color: #fff;
  background: rgba(111, 191, 141, 0.35);
}
.theme-item a b { margin-right: 5px; }
footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 30px 0;
}
.footer--logo img {
  width: 160px;
  filter: brightness(0) invert(1);
}
.footer-company { flex: 1; min-width: 240px; max-width: 520px; }
.footer-company strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
  font-size: 15px;
}
.footer-company p { margin: 0 0 6px; font-size: 14px; color: #ccc; }
.footer-company a { color: #b7ebc8; }
.copyright { width: 100%; margin-top: 8px; color: rgba(255,255,255,0.65); font-size: 13px; }

/* Mobile nav */
#nav {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(22, 63, 40, 0.97), rgba(39, 130, 75, 0.96));
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
#nav.active { display: flex; }
#nav .nav__menu { text-align: center; }
#nav .nav__item {
  color: #fff;
  font-size: 22px;
  padding: 12px 0;
  font-weight: 500;
}

@media (max-width: 991px) {
  #main-menu, .contact-home { display: none !important; }
  .nav__toggle { display: flex; }
  .category-product--wrap { flex-direction: column; }
  .col-side { width: 100%; }
  #sidebar { position: static; }
  #product_cat .item { flex-wrap: wrap; }
  #product_cat .item .media .wrap_img { width: 100%; max-width: 100%; height: 200px; }
  #product_cat .item .buy {
    width: 100%;
    border-left: 0;
    border-top: 1px solid #ddd;
    padding-top: 14px;
    margin-top: 8px;
  }
  #product_cat .item .add_to_cart_wrap {
    flex-direction: row;
    justify-content: flex-end;
  }
  .detail-layout { grid-template-columns: 1fr; }
  #banner-home .banner-home--wrap { padding: 130px 0 60px; min-height: 280px; }
}

@media (max-width: 576px) {
  .logo { width: 140px; }
  #product_cat .item .text { padding: 12px 0 0; }
  .list-heading { flex-direction: column; align-items: flex-start; }
}
