/* APF Pro v6 */

.apf-wrap {
  width: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── PRICE SLIDER ── */
.apf-price-wrap {
  padding: 30px;
  /* background: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08); */
}

#apf-slider {
  margin: 0 auto 20px;
  max-width: 265px;
}

.apf-price-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  letter-spacing: 0.29px;
}

.apf-price-label span:first-child {
  color: #000;
}
.apf-price-label strong {
  color: #000;
  /* font-weight: 600; */
}

.noUi-target {
  background: #f4f4f4;
  border: none;
  box-shadow: none;
  height: 6px;
  border-radius: 10px;
}
.noUi-connect {
  background: #211f20;
}
.noUi-handle {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50%;
  background: #211f20;
  border: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.noUi-handle::before,
.noUi-handle::after {
  display: none;
}
.noUi-horizontal .noUi-handle {
  right: -8px !important;
  top: -4px !important;
}
/* ── FILTERS ── */
.apf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

.apf-filter {
  position: relative;
}

.apf-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 15px !important;
    color: #211F20 !important;
    transition: border-color 0.2s, background 0.2s,color 0.2s;
    white-space: nowrap;
    min-width: 130px;
    background: #F4F4F4 !important;
    box-shadow: 0.43px 0.43px 0.43px #00000059;
}

.apf-btn:hover {
  border-color: #000;
}
.apf-filter.open .apf-btn {
  background: #000;
  color: #fff;
  border-color: #000;
}
.apf-ico {
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.25s;
  margin-left: auto;
}
.apf-filter.open .apf-ico {
  transform: rotate(45deg);
}

.apf-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 12px;
  z-index: 9999;
  display: none;
  max-height: 340px;
  overflow-y: auto;
}

.apf-filter.open .apf-drop {
  display: block;
}

.apf-drop label {
  display: flex;
  align-items: center;
  padding: 9px 6px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 14px;
  color: #333;
}

.apf-drop label:hover {
  background: #f5f5f5;
}

.apf-drop input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-right: 10px;
  accent-color: #000;
  cursor: pointer;
}

/* ── LOADING ── */
.apf-loading {
  display: flex;
  justify-content: center;
  padding: 60px;
}
.apf-spin {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top-color: #000;
  border-radius: 50%;
  animation: apf-rotate 1s linear infinite;
}
@keyframes apf-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ── GRID ── */
.apf-products {
  min-height: 100px;
}

.apf-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);
}

.apf-wrap[data-columns="2"] .apf-grid {
  grid-template-columns: repeat(2, 1fr);
}
.apf-wrap[data-columns="3"] .apf-grid {
  grid-template-columns: repeat(3, 1fr);
}
.apf-wrap[data-columns="4"] .apf-grid {
  grid-template-columns: repeat(4, 1fr);
}
.apf-wrap[data-columns="5"] .apf-grid {
  grid-template-columns: repeat(5, 1fr);
}

/* ── PRODUCT CARD ── */
.apf-card {
  background: #fff;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  border-radius: 0px;
  border-bottom: 1px solid #F4F4F4;
}

.apf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Image area */
.apf-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f8f8f8;
}

.apf-img-wrap a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Main image always visible */
.apf-img-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
  z-index: 1;
}

/* Hover image — ONLY rendered when gallery exists */
.apf-img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 2;
}

/* When card is hovered AND has-second="1" → swap images */
.apf-card[data-has-second="1"]:hover .apf-img-main {
  opacity: 0;
}
.apf-card[data-has-second="1"]:hover .apf-img-hover {
  opacity: 1;
}

/* Hover title overlay */
.apf-hover-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    padding: 13px 14px;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.apf-card:hover .apf-hover-title {
  transform: translateY(0);
}

/* ACF Badge — bottom-left */
.apf-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    
    display: inline-flex;
    align-items: center;
    justify-content: center;

    aspect-ratio: 1 / 1;   /* width = height */
    transform: rotate(-20deg);
}
/* .apf-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    padding: 5px 12px;
    border-radius: 50%;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-20deg);
} */
/* WP Product Tags — top-right */
.apf-tag-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
  z-index: 6;
}

.apf-tag {
  background: rgba(255, 255, 255, 0.94);
  color: #333;
  padding: 4px 11px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

/* Card info */
.apf-card-info {
  padding: 14px;
}

.apf-cat {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 6px;
  font-weight: 500;
}

.apf-name {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.4;
}

.apf-name a {
  color: #222;
  text-decoration: none;
}
.apf-name a:hover {
  color: #000;
}

.apf-price {
    font-size: 18px;
    font-weight: 700;
    color: #211F20;
    letter-spacing: 0.38px;
}
.apf-price del {
  color: #aaa;
  font-weight: 400;
  margin-right: 6px;
}
.apf-price ins {
  text-decoration: none;
  color: #c0392b;
}
.apf-card:hover .apf-card-info {
    opacity: 0;
    visibility: hidden;
    z-index: -1;
}
/* ── PAGINATION ── */
/* Wrapped in its OWN div so CSS is always stable */
.apf-pager {
  margin-top: 36px;
}
.apf-pages-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
        margin-top: 55px;
}
.apf-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  background: #fff;
  padding: 0 40px ! IMPORTANT;
  z-index: 9;
}
.apf-pages-wrapper:before {
    position: absolute;
    content: "";
    height: 4px;
    background: #f3f4f4;
    width: 100%;
    max-width: 35%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}
.apf-pages-wrapper:after {
    position: absolute;
    content: "";
    height: 4px;
    background: #f3f4f4;
    width: 100%;
    max-width: 35%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}
.apf-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 2px !important;
    background: #fff;
    border: 1px solid #CECECE;
    border-radius: 50%;
    color: #211F20;
    text-decoration: none;
    font-size: 14px !important;
    font-weight: 500;
    transition: background 0.2s,
    color 0.2s,
    border-color 0.2s;
    cursor: pointer;
}
.next-apf-arrow, .left-apf-arrow {
    border: 0;
}
.apf-page:hover,
.apf-page.current {
  background: #CCCCCC;
  color: #211F20;
  border-color: #CCCCCC;
}

/* Empty state */
.apf-empty {
  padding: 60px;
  text-align: center;
  color: #888;
  font-size: 16px;
}
.apf-no-prod {
  text-align: center;
  color: #999;
  padding: 40px;
}
.apf-hover-title span {
    flex: 0 0 18px;
    width: 18px;
    display: inline-flex;
}

.apf-hover-title span svg {
    color: #fff;
    fill: #fff;
}
/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .apf-wrap[data-columns="5"] .apf-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .apf-wrap[data-columns="4"] .apf-grid,
  .apf-wrap[data-columns="5"] .apf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* .apf-filters {
    flex-direction: row;
  } */
}

@media (max-width: 680px) {
  .apf-pages-wrapper:before, .apf-pages-wrapper:after {
    display: none;
}
    p.apf-cat {
    font-size: 16px;
    line-height: normal;
    letter-spacing: 0.2px;
}
.apf-price {
    font-size: 16px;
    letter-spacing: 0.2px;
}
  .apf-wrap[data-columns="3"] .apf-grid,
  .apf-wrap[data-columns="4"] .apf-grid,
  .apf-wrap[data-columns="5"] .apf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* .apf-filters {
    flex-direction: column;
  } */
  .apf-btn {
    width: 100%;
  }
  .apf-drop {
    left: 0;
    right: 0;
    min-width: auto;
  }
}

@media (max-width: 400px) {
  .apf-wrap[data-columns="2"] .apf-grid,
  .apf-wrap[data-columns="3"] .apf-grid,
  .apf-wrap[data-columns="4"] .apf-grid,
  .apf-wrap[data-columns="5"] .apf-grid {
    grid-template-columns: 1fr;
  }
}


.apf-card-info {
    position: absolute;
    bottom: 0;
    z-index: 1;
    background: #fff;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    display: grid;
    grid-template-columns: 3fr auto;
    gap: 0 10px;
}

.apf-card {
    position: relative;
}

h3.apf-name {
    grid-row-start: 2;
    margin: 0;
}

p.apf-cat {
    margin: 0;
    margin-bottom: 0px;
    color: #211F20;
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.4px;
}
h3.apf-name a {
    color: #211F20;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    letter-spacing: 0.3px;
}
/* ── COLOR SWATCHES IN FILTER DROPDOWN ── */
.apf-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.18);
  margin-right: 8px;
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}

/* Checked state: add a tick overlay via outline */
.apf-drop input[type="checkbox"]:checked + .apf-color-swatch,
.apf-drop label:has(input:checked) .apf-color-swatch {
  outline: 2px solid #000;
  outline-offset: 2px;
}


.apf-breadcrumb {
  margin-bottom: 20px;
}

.apf-bc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  color: #999;
  list-style: none;
  margin: 0;
  padding: 0;
}

.apf-bc-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.apf-bc-home:hover {
  color: #333;
}

.apf-bc-home svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
color: #bbbbbd;
}
nav.apf-bc a.apf-bc-item {
    font-size: 16px !important;
    font-weight: bold;
    color: #bbbbbd;
}
span.apf-bc-current{
     font-size: 16px !important;
    font-weight: bold;
    color: #211F20;
}
.apf-bc-sep {
    margin: -4px 12px 0;
    color: #bbbbbd;
    font-size: 24px;
    line-height: 100%;
    font-weight: bold;
}
.apf-bc-item {
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.apf-bc-item:hover {
  color: #333;
}

.apf-bc-current {
  color: #555;
  font-weight: 500;
}

/* ── BRAND NAVIGATION ── */
.apf-brand-nav .apf-drop {
    min-width: 320px;
    max-height: 500px;
}

.apf-brand-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.apf-brand-item:last-child {
    border-bottom: none;
}

.apf-brand-item.current {
    background: #f8f9fa;
    margin: -8px -12px 8px;
    padding: 8px 12px;
    border-radius: 4px;
}

.apf-brand-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    transition: background .2s;
}

.apf-brand-link:hover {
    background: #f5f5f5;
}

.apf-brand-item.current .apf-brand-link {
    color: #000;
    background: transparent;
}

.apf-brand-link strong {
    font-size: 15px;
    font-weight: 600;
}

.apf-count {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-left: 6px;
	display: none;
}

.apf-collections {
    margin: 6px 0 0 18px;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.apf-collections a {
    width: 100%;
    display: inline-grid;
    margin-left: 8px;
    font-size: 14px;
    line-height: normal;
}

.apf-collection-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-radius: 3px;
    transition: all .2s;
    margin-bottom: 2px;
}

.apf-collection-link:hover {
    background: #f5f5f5;
    color: #333;
}

.apf-collection-link.current {
    background: #000;
    color: #fff;
    font-weight: 500;
}

.apf-collection-link.current .apf-count {
    color: rgba(255,255,255,0.7);
}
@media(max-width: 767px){
.apf-card:hover {
    transform: initial;
    box-shadow: initial;
}
.apf-hover-title {
    display: none;
}
.apf-card:hover .apf-card-info {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.apf-card-info {
    position: relative;
}
p.apf-cat {
    font-size: 14px;
}
.apf-price {
    font-size: 14px;
    letter-spacing: 0.2px;
}
p.apf-cat {
    font-size: 14px;
}
}