/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

/* ===== LAYOUT ===== */
.al-global-layout {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}

/* ===== SIDEBAR ===== */
.al-sidebar {
  width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;

  background: linear-gradient(180deg, #0f172a, #020617);
  color: #e2e8f0;

  flex-shrink: 0;
  display: flex;
  flex-direction: column;

  transition: all 0.25s ease;
  overflow: hidden;
}

/* ===== INNER ===== */
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 12px;
}

/* ===== HEADER ===== */
#header .header-main {
    display: none !important;
}
.header-bg-container.fill {
    display: none;
}
.header-sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.logo-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}
.header-sidebar .logo-img img {
    height: 60px;
    width: auto;
    margin-right: 9px;
    background: #ffffff;
    border-radius: 4px;
}
h2.header-logo {
    color: #ffffff;
    letter-spacing: 1px;
    font-size: 34px;
}
p.header-slogan {
    font-size: 8px;
    font-style: italic;
    color: #ffffff;
}
.logo-text h2,.logo-text p {
    margin-bottom: 0;
    white-space: nowrap;
}

/* ===== SEARCH ===== */
.sidebar-search form,
.woocommerce-product-search {
    position: relative;
    margin-top: 16px;
}

.sidebar-search input[type="search"] {
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    border: none;
    outline: none;
    background: #1e1e1e;
    transition: all 0.2s ease;
    background-color: rgb(255 255 255 / 0.05);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.sidebar-search input[type="search"]::placeholder {
    color: #888;
}
.sidebar-search input[type="search"]:focus {
    box-shadow: inset 0 0 0 1px #ffffff;
    background-color: rgb(255 255 255);
}

.sidebar-search button{
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #022032;
    box-shadow: none !important;

}

/* ===== CATEGORY ===== */
.sidebar-categories {
  flex: 1;
  overflow-y: auto;
  margin-top: 16px;
}

.sidebar-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-category-list li {
  margin-bottom: 6px;
}

.sidebar-category-list a {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px;
  border-radius: 10px;

  text-decoration: none;
  color: #cbd5e1;

  transition: all 0.2s ease;
}

.sidebar-category-list a:hover {
  background: #1e293b;
  color: #fff;
}
.sidebar-category-list li.active .cat-name {
    color: #0c1426;
    font-weight: 600;
}
.sidebar-category-list li.active a {
    background: #ffffff;
    border-radius: 5px;
}

/* ===== THUMB ===== */
.cat-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.cat-thumb.placeholder {
  background: #334155;
}

/* ===== FOOTER ===== */
.sidebar-footer a {
    color: #ffffff;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    flex-wrap: nowrap;
    padding: 1.25rem;
}
.sidebar-footer .text-left {
    display: flex;
    flex-direction: column;
}
.sidebar-footer a {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    flex-wrap: nowrap;
    padding: 1rem;
    background-color: rgb(255 255 255 / 0.05);
    border-radius: 1rem;
}
.sidebar-footer .text-left {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}
.sidebar-footer .text-left p {
    margin-bottom: 0;
    font-size: 12px;
    opacity: 0.6;
    color: #ffffff;
}
.sidebar-footer .text-left h3 {
    color: #ffffff;
    font-size: 22px;
    letter-spacing: 3.1px;
    margin-bottom: 0;
}
.text-icon {
    background-color: rgb(255 255 255 / 0.05);
    border-radius: 9999px;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
svg.h-4.w-4 {
    width: 1rem;
    height: 1rem;
    color: #ffffff;
}
/* ===== TOGGLE ICON ===== */
.al-toggle-btn {
  cursor: pointer;
  user-select: none;
}
.al-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-direction: row;
    justify-content: center;
    margin: 10px 0;
    margin-bottom: 0px;
}
.al-toggle-btn p {
    margin-bottom: 0px;
}
.al-toggle-btn i.fa-solid.fa-circle-arrow-right{
  display: none;
}

/* Khi collapse */
body.al-sidebar-collapsed i.fa-solid.fa-circle-arrow-left{
  display: none;
}

body.al-sidebar-collapsed i.fa-solid.fa-circle-arrow-right{
  display: inline-block;
}

/* Ẩn text khi collapse */
body.al-sidebar-collapsed .al-toggle-btn p {
  display: none;
}

/* ===== COLLAPSE ===== */
body.al-sidebar-collapsed .al-sidebar {
  width: 72px;
}

/* ẨN TEXT */
body.al-sidebar-collapsed .logo-text,
body.al-sidebar-collapsed .sidebar-search,
body.al-sidebar-collapsed .sidebar-category-list span,
body.al-sidebar-collapsed .sidebar-footer {
  display: none;
}
body.al-sidebar-collapsed img.site-icon {
    margin-right: 0px !important;
    height: 100% !important;
}
/* CENTER ICON */
body.al-sidebar-collapsed .sidebar-category-list a {
  justify-content: center;
  padding: 0px !important;
}

/* ===== CONTENT ===== */
.al-global-layout > *:not(.al-sidebar) {
  flex: 1;
  min-width: 0;
}

/* ===== FIX FLATSOME ===== */
#wrapper,
#main,
#content,
.page-wrapper {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===== SCROLLBAR ===== */
.sidebar-categories::-webkit-scrollbar {
  width: 6px;
}

.sidebar-categories::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .al-global-layout {
    display: block;
  }

  .al-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100%;
    z-index: 999;
  }

  body.al-sidebar-open .al-sidebar {
    left: 0;
  }
}