/* LIGHT THEME VERSION (same structure, only colors adjusted) */

:root{
  --hm-shop-sticky-top: 0px; /* set this if you have a fixed header */
}

/* If WP admin bar is present */
body.admin-bar{
  --hm-shop-sticky-top: 46px; /* tweak if needed */
}

/* 2-column shop layout */
.hm-shop-layout{
  max-width: 1450px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
}

/* sidebar */
.hm-shop-sidebar__title{
  font-size: 24px !important;
  margin: 0 0 18px 0;
  font-weight: 400;
  color: #111;
}

.hm-shop-sidebar__toggle{
  display: none; /* desktop hides toggle (we show it on mobile) */
}

.hm-shop-sidebar__list,
.hm-shop-sidebar__sublist{
  list-style: none;
  padding: 0;
  margin: 0;
}

.hm-shop-sidebar__item{
  margin-bottom: 2px;
}

.hm-shop-sidebar__link{
  display: block;
  padding: 10px 16px;
  background: rgba(0,0,0,0.04);
  color: #111;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.08);
}

.hm-shop-sidebar__item.is-active-parent > .hm-shop-sidebar__link{
  background: rgba(0,0,0,0.06);
}

.hm-shop-sidebar__sublist{
  margin-top: 4px;
  margin-left: 22px;
}

.hm-shop-sidebar__sublink{
  display: block;
  padding: 10px 14px;
  color: rgba(0,0,0,0.70);
  text-decoration: none;
}

.hm-shop-sidebar__subitem.is-active .hm-shop-sidebar__sublink{
  color: #2190C2;
}

/* Subcategory row background */
.hm-shop-sidebar__subitem{
  margin-bottom: 2px;
}

.hm-shop-sidebar__sublink{
  display: block;
  padding: 8px 14px;
  background: #f3f3f3;
  border-radius: 0px;
  color: rgba(0,0,0,.72);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Active subcategory highlight */
.hm-shop-sidebar__subitem.is-active > .hm-shop-sidebar__sublink{
  background: rgba(33,144,194,.12);
  color: #2190C2;
}

/* hover for parent + subcategory links */
.hm-shop-sidebar__link:hover,
.hm-shop-sidebar__sublink:hover{
  background: rgba(0,0,0,.06);
}

/* 1) Visual "OPEN" state for parent categories */
.hm-shop-sidebar__item.has-children.is-open > .hm-shop-sidebar__link{
  background: rgba(33,144,194,.10);
  border-left: 3px solid #2190C2;
  padding-left: 13px;
}

/* 2) Add a caret icon on parents that have children */
.hm-shop-sidebar__item.has-children > .hm-shop-sidebar__link{
  position: relative;
  padding-right: 40px;
}

/* caret (right side) */
.hm-shop-sidebar__item.has-children > .hm-shop-sidebar__link::after{
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: transform .2s ease, opacity .2s ease;
  opacity: .75;
  font-size: 20px;
  line-height: 1;
  color: rgba(0,0,0,.70);
}

/* open = caret points up */
.hm-shop-sidebar__item.has-children.is-open > .hm-shop-sidebar__link::after{
  transform: translateY(-50%) rotate(-90deg);
  opacity: 1;
}

/* Optional: highlight active parent */
.hm-shop-sidebar__item.is-active-parent > .hm-shop-sidebar__link{
  outline: 1px solid rgba(0,0,0,.08);
}

/*------------------------------------------------*/
/* WooCommerce sorting dropdown (LIGHT style) */
.woocommerce .woocommerce-ordering{
  margin: 0 0 20px;
}

.woocommerce .woocommerce-ordering select.orderby{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  min-width: 280px;
  height: 44px;
  padding: 0 44px 0 16px;

  background-color: #fff;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;

  color: #111;
  font-size: 16px;
  font-weight: 400;

  outline: none;
  box-shadow: none;
}

/* Custom caret */
.woocommerce .woocommerce-ordering{
  position: relative;
  display: inline-block;
}

.woocommerce .woocommerce-ordering::after{
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;

  color: rgba(0,0,0,.70);
  font-size: 14px;
  line-height: 1;
}

/* Focus ring / accent */
.woocommerce .woocommerce-ordering select.orderby:focus{
  border-color: rgba(33,144,194,.7);
  box-shadow: 0 0 0 3px rgba(33,144,194,.18);
}

.woocommerce .woocommerce-ordering select.orderby option{
  background: #fff;
  color: #111;
}

/*Naviation*/
/* Woo pagination (LIGHT + blue accent) */
.woocommerce nav.woocommerce-pagination{
  margin: 28px 0 10px;
  text-align: center;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers{
  display: inline-flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li{
  margin: 0;
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border-radius: 10px;
  /*border: 1px solid rgba(0,0,0,.14);
  background: rgba(0,0,0,.04);*/

  color: #111;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;

  box-shadow: none;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers .page-numbers.current{
  background: rgba(33,144,194,.14);
  border-color: rgba(33,144,194,.55);
  color: #111;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers a.page-numbers:hover{
  border-color: rgba(33,144,194,.55);
  background: rgba(0,0,0,.06);
  color: #111;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers .page-numbers.next,
.woocommerce nav.woocommerce-pagination ul.page-numbers .page-numbers.prev{
  width: 44px;
}

/*----------------responsive-----------------*/
/* FULL-WIDTH SHOP AREA */
body.woocommerce-shop .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main,
body.post-type-archive-product .site-main{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* PRODUCTS GRID */
.hm-shop-content ul.products,
.hm-shop-content .woocommerce ul.products,
.woocommerce-page .hm-shop-content ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  justify-content: start !important;
}

/* REMOVE CLEARFIX PSEUDO ELEMENTS */
.hm-shop-content ul.products::before,
.hm-shop-content ul.products::after,
.hm-shop-content .woocommerce ul.products::before,
.hm-shop-content .woocommerce ul.products::after,
.woocommerce-page .hm-shop-content ul.products::before,
.woocommerce-page .hm-shop-content ul.products::after {
  content: none !important;
  display: none !important;
}

/* RESET OLD FLOAT/WIDTH RULES */
.hm-shop-content ul.products li.product,
.hm-shop-content .woocommerce ul.products li.product,
.woocommerce-page .hm-shop-content ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}

/* 2 columns under 1200px */
@media (max-width: 1199px) {
  .hm-shop-content ul.products,
  .hm-shop-content .woocommerce ul.products,
  .woocommerce-page .hm-shop-content ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 1 column under 460px */
@media (max-width: 459px) {
  .hm-shop-content ul.products,
  .hm-shop-content .woocommerce ul.products,
  .woocommerce-page .hm-shop-content ul.products {
    grid-template-columns: 1fr;
  }
}

/* --------------------------
   MOBILE: sticky accordion + scrollable panel + LIGHT scrollbar
   -------------------------- */
@media (max-width: 1024px){

  .hm-shop-layout{
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* Sticky block */
  .hm-shop-sidebar{
    position: sticky;
    top: var(--hm-shop-sticky-top);
    z-index: 9999;

    padding: 10px 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,.10);
  }

  /* Show the toggle on mobile */
  .hm-shop-sidebar__title{
    margin: 0;
    font-size: 18px !important;
  }

  .hm-shop-sidebar__toggle{
    display: flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: space-between;

    padding: 14px 16px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 0px;

    color: #111;
    font-size: 18px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
  }

  .hm-shop-sidebar__toggle::after{
    content: "▾";
    opacity: .85;
    transform: rotate(0deg);
    transition: transform .2s ease, opacity .2s ease;
    color: rgba(0,0,0,.70);
  }

  .hm-shop-sidebar.is-mobile-open .hm-shop-sidebar__toggle::after{
    transform: rotate(180deg);
    opacity: 1;
  }

  /* When open, give space */
  .hm-shop-sidebar.is-mobile-open #hm-shop-cats{
    margin-top: 10px;
  }

  /* Scroll INSIDE accordion */
  .hm-shop-sidebar.is-mobile-open #hm-shop-cats{
    max-height: calc(100svh - var(--hm-shop-sticky-top) - 56px - 16px);
    max-height: calc(100dvh - var(--hm-shop-sticky-top) - 56px - 16px);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    padding-right: 6px;
    padding-bottom: 12px;
  }

  /* LIGHT scrollbar (WebKit) */
  .hm-shop-sidebar.is-mobile-open #hm-shop-cats::-webkit-scrollbar{
    width: 10px;
  }

  .hm-shop-sidebar.is-mobile-open #hm-shop-cats::-webkit-scrollbar-track{
    background: #ededed;
    border-radius: 10px;
  }

  .hm-shop-sidebar.is-mobile-open #hm-shop-cats::-webkit-scrollbar-thumb{
    background: #cfcfcf;
    border-radius: 10px;
    border: 2px solid #ededed;
  }

  .hm-shop-sidebar.is-mobile-open #hm-shop-cats::-webkit-scrollbar-thumb:hover{
    background: #bdbdbd;
  }

  /* LIGHT scrollbar (Firefox) */
  .hm-shop-sidebar.is-mobile-open #hm-shop-cats{
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf #ededed;
  }
}

/* Force root list visible on desktop even though we render it "hidden" in HTML */
@media (min-width: 1025px){
  #hm-shop-cats[hidden]{
    display: block !important;
  }
}

@media (max-width: 1024px){
  body.hm-shop-archive .elementor-widget-tpmm_two_panel_mega_menu{
    display: none !important;
  }
}


