/**
 * Condalab Category Page CSS
 * Hero, product grid, cards, support section
 */

/* ===== PS DEFAULT OVERRIDES FOR CATEGORY ===== */
#category #wrapper {
  padding-top: 0;
  background: #fff;
}
#category #wrapper > .container {
  padding: 0;
  max-width: 100%;
}
#category #content-wrapper {
  padding: 0;
  border: none;
}
#category #content {
  border: none;
  box-shadow: none;
}
#category #main {
  padding: 0;
  margin: 0;
}
#category #main > .block-category,
#category .block-category.card {
  display: none;
}
#category #products {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
/* Hide PS default breadcrumb on category */
#category .breadcrumb {
  display: none;
}

/* ===== CATEGORY HERO (cloned from home hero system) ===== */
.cdl-cat-hero {
  position: relative;
  background: #000;
  padding: 80px 0 120px;
  overflow: hidden;
  text-align: left;
  /* Full-width breakout - same as .condalab-hero */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.cdl-cat-hero__inner {
  position: relative;
  z-index: 2;
}

/* Breadcrumb */
.cdl-cat-hero__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.cdl-cat-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.cdl-cat-hero__breadcrumb a:hover {
  color: #EBBE18;
}

.cdl-cat-hero__breadcrumb-sep {
  color: rgba(255, 255, 255, 0.25);
}

.cdl-cat-hero__breadcrumb-current {
  color: #EBBE18;
}

/* Hero row: icon + text side by side */
.cdl-cat-hero__row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.cdl-cat-hero__text {
  flex: 1;
  min-width: 0;
}

.cdl-cat-hero__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Category icon */
.cdl-cat-hero__icon-wrap {
  flex-shrink: 0;
}

.cdl-cat-hero__icon-wrap img {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.cdl-cat-hero__icon-placeholder {
  opacity: 0.8;
}

/* Title */
.cdl-cat-hero__title {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

/* Description */
.cdl-cat-hero__desc {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 640px;
  margin: 0 0 28px;
}

.cdl-cat-hero__desc p {
  margin: 0;
}

/* Product count badge */
.cdl-cat-hero__count {
  display: flex;
  justify-content: flex-start;
}

.cdl-cat-hero__count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.cdl-cat-hero__count-badge svg {
  opacity: 0.6;
}

/* Wave - using same bottomHero.png as home */
.cdl-cat-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.cdl-cat-hero__wave img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== TOOLBAR (SORT BAR) ===== */
.cdl-cat-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 0 16px;
  gap: 12px;
}

.cdl-cat-toolbar .cdl-cat-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 0;
}

.cdl-cat-toolbar .sort-by {
  display: inline-flex !important;
  align-items: center;
  width: auto;
  padding: 0;
  margin: 0 6px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.cdl-cat-toolbar .products-sort-order {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0;
  width: auto;
}

.cdl-cat-toolbar .products-sort-order .select-title {
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #333;
}

/* ===== PRODUCT GRID ===== */
#category .cdl-cat-grid.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 16px 0 48px;
  flex-wrap: unset;
}

#category .cdl-cat-grid .cdl-cat-grid__item {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  float: none !important;
  flex: unset !important;
}

/* ===== PRODUCT CARD ===== */
.cdl-cat-card {
  position: relative;
  background: #fff;
  border: 2px solid #bbb;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cdl-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: #EBBE18;
}

/* Card image */
.cdl-cat-card__img-link {
  display: block;
  background: #f8f8f8;
  padding: 24px;
  text-align: center;
}

.cdl-cat-card__img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.cdl-cat-card__img-placeholder {
  display: block;
}

.cdl-cat-card__img-placeholder img {
  display: block;
}

/* Card body */
.cdl-cat-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Product ID badge (top-right) */
.cdl-cat-card__id {
  position: absolute;
  top: 40px;
  right: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #999;
  z-index: 2;
}

/* Product icon (when no cover image) */
.cdl-cat-card__icon-wrap {
  padding: 16px 0 0;
}

.cdl-cat-card__icon {
  display: block;
}

/* Card title */
.cdl-cat-card__title {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.cdl-cat-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.cdl-cat-card__title a:hover {
  color: #EBBE18;
}

/* Card description */
.cdl-cat-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cdl-cat-card__desc p {
  margin: 0;
}

/* Card price */
.cdl-cat-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cdl-cat-card__price {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #1a1a1a;
}

.cdl-cat-card__price-old {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
}

.cdl-cat-card__discount {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #e74c3c;
  border-radius: 6px;
  padding: 2px 8px;
}

/* Oligo specs (scales, purification) */
.cdl-cat-card__oligo-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 10px;
}

/* Badge row (medal + range info) */
.cdl-cat-card__badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.cdl-cat-card__badge-row--mods {
  margin-top: 4px;
}

.cdl-cat-card__badge-icon {
  flex-shrink: 0;
}

.cdl-cat-card__badge-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  line-height: 1.3;
}

.cdl-cat-card__spec {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.cdl-cat-card__spec-bullet {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: #EBBE18;
  position: relative;
  top: 1px;
}

.cdl-cat-card__spec-label {
  color: #999;
  font-weight: 500;
  white-space: nowrap;
}

.cdl-cat-card__spec-value {
  color: #333;
  font-weight: 600;
}

/* Card CTA button */
.cdl-cat-card__cta {
  display: block;
  text-align: center;
  background: #EBBE18;
  color: #000;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 14px;
  transition: background 0.2s, transform 0.15s;
  margin-top: auto;
}

.cdl-cat-card__cta:hover {
  background: #d4a916;
  color: #000;
  text-decoration: none;
  transform: scale(1.02);
}

/* Product flags inside card */
.cdl-cat-card .product-flags {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
}

.cdl-cat-card .product-flag {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

/* ===== SUPPORT SECTION ===== */
.cdl-cat-support {
  background: #f5f5f5;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 80px 24px;
  margin-top: 40px;
}

.cdl-cat-support__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.cdl-cat-support__icon {
  width: 64px;
  height: 64px;
  background: #EBBE18;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.cdl-cat-support__icon svg {
  stroke: #000;
}

.cdl-cat-support__title {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #1a1a1a;
  margin: 0 0 12px;
}

.cdl-cat-support__desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #666;
  margin: 0 0 32px;
}

.cdl-cat-support__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cdl-cat-support__btn {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 14px;
  transition: all 0.2s;
}

.cdl-cat-support__btn--outline {
  background: transparent;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
}

.cdl-cat-support__btn--outline:hover {
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
}

.cdl-cat-support__btn--primary {
  background: #EBBE18;
  color: #000;
  border: 2px solid #EBBE18;
}

.cdl-cat-support__btn--primary:hover {
  background: #d4a916;
  border-color: #d4a916;
  color: #000;
  text-decoration: none;
}

/* Additional description */
.cdl-cat-addl-desc {
  max-width: 900px;
  margin: 0 auto 40px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #555;
}

/* ===== PAGINATION OVERRIDES ===== */
#category .pagination {
  padding: 0 0 32px;
}

#category .pagination .page-list li a,
#category .pagination .page-list li span {
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

#category .pagination .page-list li.current a {
  background: #EBBE18;
  color: #000;
  border-color: #EBBE18;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cdl-cat-hero__title {
    font-size: 38px;
  }

  .cdl-cat-hero {
    padding: 60px 0 100px;
  }

  #category .cdl-cat-grid.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cdl-cat-support__title {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .cdl-cat-hero__title {
    font-size: 30px;
  }

  .cdl-cat-hero {
    padding: 48px 0 80px;
  }

  .cdl-cat-hero__row {
    flex-direction: column;
    gap: 16px;
  }

  .cdl-cat-hero__icon-wrap {
    width: 88px;
    height: 88px;
    min-width: 88px;
    border-radius: 22px;
  }

  .cdl-cat-hero__desc {
    font-size: 15px;
  }

  .cdl-cat-hero__breadcrumb {
    font-size: 11px;
    gap: 6px;
  }

  #category .cdl-cat-grid.products {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cdl-cat-card__title {
    font-size: 19px;
  }

  .cdl-cat-card__price {
    font-size: 20px;
  }

  .cdl-cat-support {
    padding: 48px 16px;
  }

  .cdl-cat-support__title {
    font-size: 24px;
  }

  .cdl-cat-support__actions {
    flex-direction: column;
  }

  .cdl-cat-support__btn {
    width: 100%;
    text-align: center;
  }

  .cdl-cat-toolbar {
    padding: 16px 0 8px;
  }

  #category #products {
    padding: 0 16px;
  }
}
