/* ============================================================
   Category Product Slider — Frontend CSS
   ============================================================ */

.cps-slider-wrap {
  --cps-primary: #881c44;
  --cps-tab-border: #e0e0e0;
  --cps-arrow-size: 40px;
  font-family: inherit;
  max-width: 100%;
  margin: 24px 0;
}

/* ── TABS ─────────────────────────────────────────────────── */
.cps-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  list-style: none;
  padding: 0;
}
.cps-tab {
    background: #fff;
    border: 1.5px solid var(--cps-tab-border);
    border-radius: 999px;
    padding: 12px 26px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.5;
}
.cps-tab:hover {
  border-color: var(--cps-primary);
  color: var(--cps-primary);
}
.cps-tab.active {
  background: var(--cps-primary);
  border-color: var(--cps-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(136, 28, 68, 0.3);
}

/* Parent + Sub labels inside tab */
.cps-tab {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}
.cps-tab-parent {
    font-size: 9.8px;
    font-weight: 500;
    opacity: 1;
    line-height: 1.2;
    letter-spacing: 0.3px;
    position: absolute;
    top: -12px;
    left: 22px;
    max-width: max-content;
    background: #e1e1e1;
    border: 1.5px solid var(--cps-tab-border);
    padding: 3px 8px;
    border-radius: 50px;
}
.cps-tab-sub {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.cps-tab.active .cps-tab-parent {
    opacity: 1;
    background: var(--secondary-color);
}

/* ── PANELS ───────────────────────────────────────────────── */
.cps-panel {
  display: none;
}
.cps-panel.active {
  display: block;
}
.cps-empty {
  color: #888;
  font-size: 14px;
  padding: 20px 0;
}

/* ── SLIDER VIEWPORT ──────────────────────────────────────── */
.cps-slider-viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Swiper container fills the space between arrows */
.cps-slider-viewport .swiper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* ── WooCommerce product inside swiper-slide ─────────────── */
.cps-slider-viewport .swiper-slide {
  height: auto; /* let product card stretch naturally */
}
/* Force product li to fill slide */
.cps-slider-viewport .swiper-slide .product,
.cps-slider-viewport .swiper-slide li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  height: 100% !important;
}

/* ── ARROWS ───────────────────────────────────────────────── */
.cps-arrow {
  width: var(--cps-arrow-size);
  height: var(--cps-arrow-size);
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: var(--cps-primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 5;
}
.cps-arrow:hover {
  background: var(--cps-primary);
  color: #fff;
  border-color: var(--cps-primary);
}
.cps-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.cps-prev {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 2;
}
.cps-next {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
}

/* swiper slider products css start */
.category-product-slider li.product.type-product{
    padding: 16px !important;
    background-color: #ffffff;
    transition: 0.4s !important;
    box-shadow: unset !important;
    border-radius: 16px !important;
    border: 1px solid #e0e0e0 !important;
}
.category-product-slider li.product.type-product .product-icon-container{
    position: absolute;
    top: 15px;
    right: 22px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}
.category-product-slider li.product.type-product .product-icon-container a{
    height: 35px;
    width: 35px;
}
.category-product-slider li.product.type-product .product-icon-container a img{
    max-width: 22px;
}
/* swiper slider products css end */

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .cps-tab {
	padding: 12px 18px 8px;
	font-size: 12px;
  }
  .cps-arrow {
    --cps-arrow-size: 34px;
    font-size: 20px;
  }
  .cps-prev {
    margin-right: 6px;
  }
  .cps-next {
    margin-left: 6px;
  }
  .cps-tab-sub{
	font-size: 12px;
  }
}
@media (max-width: 490px) {
	.cps-tabs{
		gap: 22px;
	}
	.cps-tab-parent{
		left: 12px;
		padding: 4px 6px;
	}
}