/**
 * Hailingmeng Goods List Styles
 * Based on Figma designs: https://www.figma.com/design/1N4AJMh9ad3jxG0wG6jjH8
 */

.hailingmeng_goods_list_main {
  width: 100%;
  position: relative;
  padding-bottom: 6.25rem;
  background: #f9f8f3;
}

/* ==========================================
   Header Section (Design: 510-936)
   ========================================== */
.hailingmeng_goods_list_header {
  text-align: left;
  padding-top: 4.75rem;
  padding-bottom: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hailingmeng_goods_list_header-left {
  flex: 1;
}

.hailingmeng_goods_list_header-title {
  font-family: var(--title-font-family);
  font-weight: 400;
  line-height: 1.28;
  color: var(--text-color);
  text-transform: capitalize;
  margin: 0 0 10px;
}

.hailingmeng_goods_list_header-title-link {
  text-decoration: none;
}

.hailingmeng_goods_list_header-desc {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
  margin: 0;
}

/* Mobile Sidebar Toggle Button */
.hailingmeng_goods_list_sidebar-toggle {
  display: none;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-size: var(--font-size-md);
  font-family: var(--font-family);
}

/* Sidebar Close Button */
.hailingmeng_goods_list_sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  /* width: 32px; */
  /* height: 32px; */
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 24px;
  position: absolute;
  top: 0;
  right: 0;
}

/* ==========================================
   Content Layout
   ========================================== */
.hailingmeng_goods_list_content {
  display: flex;
  gap: 2.5rem;
  position: relative;
}

/* ==========================================
   Sidebar - Category Tabs (Design: 510-937)
   ========================================== */
.hailingmeng_goods_list_sidebar {
  width: 17.5625rem;
  min-width: 240px;
  flex-shrink: 0;
  position: relative;
}

.hailingmeng_goods_list_sidebar_content {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.hailingmeng_goods_list_category-list {
  display: flex;
  flex-direction: column;
  gap: 2.9375rem;
}

.hailingmeng_goods_list_category-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  padding-left: 4px;
  position: relative;
}

.hailingmeng_goods_list_category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 0.625rem;
  padding-left: 0.625rem;
  min-height: 36px;
}

.hailingmeng_goods_list_category-header::before {
  content: '';
  position: absolute;
  height: 65%;
  background: var(--color-primary);
  width: 4px;
  top: 50%;
  left: 0px;
  transform: translate(-4px, -50%);
}

.hailingmeng_goods_list_category-link {
  flex: 1;
  text-decoration: none;
}

.hailingmeng_goods_list_category-name {
  font-family: var(--title-font-family);
  color: var(--text-color) !important;
  text-transform: capitalize;
  word-break: break-all;
  transition: color 0.3s ease;
}

.hailingmeng_goods_list_category-item.active
  .hailingmeng_goods_list_category-name {
  color: var(--color-primary) !important;
}

.hailingmeng_goods_list_category-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
}

/* Submenu (Design: 510-937 - Frame 369) */
.hailingmeng_goods_list_submenu {
  display: none;
  margin-top: 2.9375rem;
  gap: 13px;
}

.hailingmeng_goods_list_subitem {
  display: flex;
  flex-direction: column;
}

.hailingmeng_goods_list_subitem:last-child {
  padding-bottom: 0;
}

.hailingmeng_goods_list_sublink {
  text-decoration: none;
}

.hailingmeng_goods_list_subname {
  font-family: var(--title-font-family);
  font-size: max(1.25rem, 16px);
  font-weight: 400;
  color: #999999 !important;
  line-height: 1.8;
  text-transform: capitalize;
  transition: color 0.3s ease;
}

.hailingmeng_goods_list_subitem.active .hailingmeng_goods_list_subname {
  color: var(--color-primary) !important;
}

/* ==========================================
   Main Content - Product Grid (Design: 510-938)
   ========================================== */
.hailingmeng_goods_list_main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* gap: 2.8125rem; */
}

.hailingmeng_goods_list_products {
  position: relative;
}

.hailingmeng_goods_list_product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0px, 1fr));
  column-gap: 2.8125rem;
  row-gap: 1.875rem;
}

.hailingmeng_goods_list_product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hailingmeng_goods_list_product-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: #f0ebe1;
}

.hailingmeng_goods_list_product-img-primary,
.hailingmeng_goods_list_product-img-secondary {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.hailingmeng_goods_list_product-img-primary {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
}

.hailingmeng_goods_list_product-img-secondary {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.hailingmeng_goods_list_product-card.show-secondary
  .hailingmeng_goods_list_product-img-primary {
  opacity: 0;
}

.hailingmeng_goods_list_product-card.show-secondary
  .hailingmeng_goods_list_product-img-secondary {
  opacity: 1;
}

.hailingmeng_goods_list_product-placeholder {
  width: 100%;
  height: 100%;
  background: #f0ebe1;
}

.hailingmeng_goods_list_product-info {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hailingmeng_goods_list_product-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hailingmeng_goods_list_product-title {
  font-family: var(--title-font-family);
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.38;
  text-transform: capitalize;
  margin: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hailingmeng_goods_list_product-desc {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: 400;
  color: #666666;
  line-height: 1.5;
  margin: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hailingmeng_goods_list_view-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  color: #616161;
  line-height: 1.57;
  text-align: center;
  transition: all 0.3s ease;
  padding-top: 1.25rem;
  border-bottom: 1px solid #616161;
  width: max-content;
}

.hailingmeng_goods_list_view-more-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 10px;
}

.hailingmeng_goods_list_view-more-arrow svg {
  width: 16px;
  height: 10px;
}

.hailingmeng_goods_list_product-card:hover .hailingmeng_goods_list_view-more {
  color: var(--color-primary);
}

.hailingmeng_goods_list_product-card:hover
  .hailingmeng_goods_list_view-more-arrow
  svg
  path {
  fill: var(--color-primary);
}

/* ==========================================
   Pagination (Design: 263-843)
   ========================================== */
.hailingmeng_goods_list_pagination {
  display: flex;
  justify-content: center;
  /* padding: 30px 0; */
  margin-top: 14.375rem;
}

.hailingmeng_goods_list_pagination #pagesize {
  display: flex;
  justify-content: center;
  margin-top: 0px;
}

.hailingmeng_goods_list_pagination #pagesize ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hailingmeng_goods_list_pagination #pagesize ul li {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hailingmeng_goods_list_pagination #pagesize ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: max(2.5rem, 32px);
  height: max(2.5rem, 32px);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  text-decoration: none;
  background: #f5f5f5;
  border: none;
  transition: all 0.3s ease;
}

.hailingmeng_goods_list_pagination #pagesize ul li a.disabled {
  color: #e0e0e0 !important;
}

.hailingmeng_goods_list_pagination #pagesize ul li a.active,
.hailingmeng_goods_list_pagination #pagesize ul li a:not(.disabled):hover {
  /* color: rgba(0, 154, 23, 1) !important; */
  background-color: var(--color-primary);
  color: #fff;
}

.hailingmeng_goods_list_pagination #pagesize ul li:first-child,
.hailingmeng_goods_list_pagination #pagesize ul li:last-child {
  width: auto;
  height: auto;
  min-width: 0px;
}

.hailingmeng_goods_list_pagination #pagesize ul li:first-child a,
.hailingmeng_goods_list_pagination #pagesize ul li:last-child a {
  background: transparent;
  color: #666;
  padding: 0px;
  width: auto;
  height: auto;
  margin: 0px;
  min-width: 0px;
}

.hailingmeng_goods_list_pagination #pagesize ul li:first-child a span,
.hailingmeng_goods_list_pagination #pagesize ul li:last-child a span {
  font-size: 16px;
  padding: 0px;
}

.hailingmeng_goods_list_pagination
  #pagesize
  ul
  li:first-child
  a:not(.disabled):hover,
.hailingmeng_goods_list_pagination
  #pagesize
  ul
  li:last-child
  a:not(.disabled):hover {
  background: transparent !important;
  color: rgba(0, 154, 23, 1) !important;
}

@media screen and (max-width: 1200px) {
  .hailingmeng_goods_list_sidebar-toggle {
    display: flex;
  }

  .hailingmeng_goods_list_sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    max-width: 500px;
    height: 100vh;
    background: #fff;
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 0px 20px;
    /* padding-top: var(--header-height); */
  }

  .hailingmeng_goods_list_sidebar.show {
    left: 0;
  }

  .hailingmeng_goods_list_sidebar-close {
    display: flex;
  }

  .hailingmeng_goods_list_sidebar_content {
    position: relative;
    padding-top: 40px;
    top: calc(var(--header-height) + 20px);
  }

  .hailingmeng_goods_list_content {
    flex-direction: column;
    gap: 30px;
  }
  .hailingmeng_goods_list_product-grid {
    grid-template-columns: repeat(3, minmax(0px, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 1024px) {
  .hailingmeng_goods_list_pagination {
    margin-top: 3rem;
  }
  .hailingmeng_goods_list_main {
    padding-bottom: 3rem;
  }
}

@media screen and (max-width: 768px) {
  .hailingmeng_goods_list_product-grid {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
  }
}

@media screen and (max-width: 576px) {
}
