.apa-sale-page {
  --apa-sale-black: #111;
  --apa-sale-red: #d71920;
  --apa-sale-gray: #efefef;
  --apa-sale-border: #ddd;
  position: relative;
  padding: 12px 0 64px;
  color: #191919;
}

#banner-sale img {
  width: 100%;
}

.apa-sale-header {
  padding: 30px 0 18px;
  text-align: left;
}

.apa-sale-header h1 {
  margin: 0;
  font-size: 30px;
  color: #000;
}

.apa-sale-breadcrumb {
  margin: 8px 0 0 !important;
}

.apa-sale-breadcrumb .breadcrumbs {
  margin: 0;
  font-weight: 100;
}

.apa-sale-countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px auto 4px;
}

.apa-sale-countdown.is-expired {
  display: none;
}

.apa-sale-countdown>div {
  width: 76px;
  text-align: center;
}

.apa-sale-countdown strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border-radius: 4px;
  background: #090909;
  color: #fff;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.apa-sale-countdown span {
  display: block;
  margin-top: 6px;
  color: var(--apa-sale-red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.apa-sale-top-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 10px 0 14px;
  padding: 5px 2px;
}

.apa-sale-top-filter-actions {
  display: flex;
  min-width: 0;
  gap: 9px;
  
}

.apa-sale-top-filters>.apa-sale-sort-select {
  flex: 0 0 auto;
}

.apa-sale-top-filters button {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--apa-sale-gray);
  color: #151515;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  flex: 1;
  min-width: 145px;
}

.apa-sale-top-filters button:hover,
.apa-sale-top-filters button.is-active {
  border-color: var(--apa-sale-black);
  background: var(--apa-sale-black);
  color: #fff;
}

.apa-sale-active-filters:empty {
  display: none;
}

.apa-sale-active-filters {
  margin: 0 0 24px;
  padding: 12px 14px;
  border: 1px solid #e2e2e2;
  background: #fafafa;
}

.apa-sale-active-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 9px;
  font-size: 13px;
}

.apa-sale-active-head button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--apa-sale-red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}

.apa-sale-active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.apa-sale-active-tags button {
  min-height: 30px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #1c1c1c;
  border-radius: 30px;
  background: #fff;
  color: #1c1c1c;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-transform: none;
}

.apa-sale-active-tags button span {
  margin-left: 5px;
  color: var(--apa-sale-red);
  font-size: 16px;
  line-height: 12px;
}

.apa-sale-section-results {
  display: grid;
  gap: 34px;
}

.apa-sale-product-section {
  min-width: 0;
}

.apa-sale-product-section>h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--apa-sale-border);
  color: #111;
  font-family: "UTM Avo", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.apa-sale-section-slider {
  margin: 0 -6px;
}

.apa-sale-section-slider:not(.flickity-enabled) {
  display: flex;
  overflow: hidden;
}

.apa-sale-catalog .apa-sale-product-section .apa-sale-product-page {
  display: grid !important;
  flex: 0 0 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 12px;
  width: 100%;
  min-width: 0;
  padding: 0 6px;
}

.apa-sale-product-page>.product-small.col {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.apa-sale-section-slider .flickity-prev-next-button {
  width: 36px;
  height: 36px;
  opacity: .92;
}

.apa-sale-section-slider .flickity-prev-next-button.previous {
  left: 0;
}

.apa-sale-section-slider .flickity-prev-next-button.next {
  right: 0;
}

.apa-sale-catalog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(200px, 245px) minmax(0, 1fr);
  gap: 28px;
  margin-top: 24px;
}

.apa-sale-sidebar-inner {
  position: sticky;
  top: 105px;
  background: #fff;
}

.apa-sale-filter-group {
  padding: 0 0 24px;
  border-bottom: 0;
}

.apa-sale-filter-group:last-child {
  border-bottom: 0;
}

.apa-sale-filter-group h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  color: #141414;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.apa-sale-check-option {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #e5e5e5;
  border-bottom: 0;
  background: transparent;
  color: #333;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  text-align: left;
  text-transform: none;
}

.apa-sale-check-option:last-child {
  border-bottom: 1px solid #e5e5e5;
}

.apa-sale-check-option:hover {
  color: var(--apa-sale-red);
}

.apa-sale-checkbox {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 1px 9px 0 0;
  border: 1px solid #999;
  background: #fff;
}

.apa-sale-check-option.is-active .apa-sale-checkbox {
  border-color: #111;
  background: #111;
}

.apa-sale-check-option.is-active .apa-sale-checkbox::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  transform: rotate(45deg);
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
}

.apa-sale-sort-select {
  width: auto;
  min-width: 205px;
  height: 39px;
  margin: 0;
  padding-right: 32px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 13px;
}

.apa-sale-result-summary {
  margin: 0 0 14px;
  color: #666;
  font-size: 13px;
}

.apa-sale-result-summary strong {
  color: #111;
}

.apa-sale-products-results>.products {
  margin-bottom: 0;
}

.apa-sale-pagination {
  margin: 26px 0 8px;
}

.apa-sale-pagination .page-numbers {
  cursor: pointer;
}

.apa-sale-description {


  position: relative;
  font-size: 14px;
  margin: 20px 0 0 0;
  text-align: justify;
}

.apa-sale-description-content {
  position: relative;
  max-height: 600px;
  overflow: hidden;
  text-align: left;
}

.apa-sale-description-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, hsla(0, 0%, 100%, 0) 20%, #fff);
}

.apa-sale-description.is-expanded .apa-sale-description-content {
  max-height: none;
}

.apa-sale-description.is-expanded .apa-sale-description-content::after {
  display: none;
}

.apa-sale-description [data-sale-description-toggle] {
  color: #000;
  position: relative;
  display: table;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  height: 38px;
  line-height: 38px;
  border-radius: 2px;
  outline: none;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid #606060;
  cursor: pointer;
  transition: 0.4s all;
  text-transform: uppercase;
  background-color: transparent;
  margin: 0 auto 30px;
}

.apa-sale-loading {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, .76);
  opacity: 0;
  transition: opacity .18s ease, visibility .18s ease;
  min-height: 500px;
}

.apa-sale-loading.is-active {
  visibility: visible;
  opacity: 1;
}

.apa-sale-loading span {
  width: 36px;
  height: 36px;
  animation: apa-sale-spin .7s linear infinite;
  border: 3px solid #ddd;
  border-top-color: var(--apa-sale-red);
  border-radius: 50%;
}

.apa-sale-loading strong {
  color: #111;
  font-size: 13px;
}

@keyframes apa-sale-spin {
  to {
    transform: rotate(360deg);
  }
}

#bartop.apa-sale-mobile-bar,
.apa-sale-mobile-drawer,
.apa-sale-drawer-backdrop {
  display: none;
}

.slider-nav-push:not(.slider-nav-reveal) .flickity-prev-next-button {
  margin-top: 0 !important;
}

@media (max-width: 849px) {
  .apa-sale-page {
    padding-bottom: 0;
    padding-top: 0;
  }

  .apa-sale-header {
    padding-top: 0;
  }

  .apa-sale-top-filters {
    margin-right: -15px;
    margin-left: -15px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .apa-sale-top-filter-actions {
    width: 100%;
    gap: 5px;
  }

  .apa-sale-top-filters>.apa-sale-sort-select {
    display: none;
  }

  .apa-sale-product-page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .apa-sale-catalog {
    display: block;
  }

  .apa-sale-sidebar {
    display: none;
  }

  #bartop.apa-sale-mobile-bar {
    display: flex !important;
    height: 43px;

  }
  #bartop .icon-equalizer{
    top: initial;
  }

  #bartop.apa-sale-mobile-bar button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    color: #fff;
    font-size: 13px;
            border-left: 1px solid #fff;
  }

  .apa-sale-mobile-sort {
    display: flex;
    min-width: 0;
    
  }

  .apa-sale-mobile-sort .apa-sale-sort-select {
    display: block;
    background: #2d2d2d url(https://apaniche.vn/wp-content/uploads/2025/01/up-down.webp) 4px center no-repeat;
    border: none;
    
    font-size: 14px;
    
    background-size: 18px;
    color: #fff;
    padding: 0 10px 0 28px;
    width: initial;
    box-shadow: none;
  }

  .apa-sale-mobile-drawer {
    position: fixed;
    z-index: 1002;
    top: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: min(88vw, 370px);
    background: #fff;
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  }

  .apa-sale-mobile-drawer.is-open {
    transform: translateX(0);
  }

  .apa-sale-drawer-backdrop {
    position: fixed;
    z-index: 1001;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(0, 0, 0, .52);
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
  }

  .apa-sale-drawer-backdrop.is-visible {
    visibility: visible;
    opacity: 1;
  }

  .apa-sale-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 17px;
    border-bottom: 1px solid #ddd;
    background: #111;
    color: #fff;
  }

  .apa-sale-drawer-head button {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
  }

  .apa-sale-drawer-body {
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    padding: 5px 15px 30px;
  }

  body.apa-sale-drawer-open {
    overflow: hidden;
  }

  .apa-sale-catalog .apa-sale-product-section .apa-sale-product-page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 549px) {
  .apa-sale-countdown {
    gap: 6px;
  }

  .apa-sale-header h1 {
    font-size: 20px;
    text-align: center;
  }

  .apa-sale-breadcrumb .breadcrumbs {

    text-align: center;
    font-size: 12px;
  }

  .apa-sale-breadcrumb {
    margin: 5px 0 0 !important;
  }

  .apa-sale-countdown>div {
    width: 61px;
  }

  .apa-sale-countdown strong {
    min-height: 49px;
    font-size: 23px;
  }

  .apa-sale-top-filters button {
    min-height: 37px;
        padding: 0 15px;
        font-size: 11px;
        min-width: initial;
        flex: 1;
  }

  .apa-sale-product-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .apa-sale-product-section>h2 {
    font-size: 17px;
  }

  .apa-sale-active-filters {
    margin-right: -5px;
    margin-left: -5px;
  }

  .apa-sale-description {
    margin-right: -15px;
    margin-left: -15px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .apa-sale-catalog .apa-sale-product-section .apa-sale-product-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}