@charset "UTF-8";

main.archive-product {
  padding-top: calc(var(--top-bar-height) + var(--header-height) + 30px);
  background-color: #f8f8f8;
}

/* Header Section: Two Column Layout */
.archive-product-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-12);
  padding: var(--space-10) 0 var(--space-8) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  min-height: 250px;
}

/* Breadcrumbs inside header */
.archive-product-breadcrumbs {
  margin-bottom: var(--space-3);
}

.archive-product-breadcrumbs .woocommerce-breadcrumb {
  font-size: var(--text-sm);
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.archive-product-breadcrumbs .woocommerce-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.archive-product-breadcrumbs .woocommerce-breadcrumb a:hover {
  color: var(--secondary-color);
}

.archive-product-header-left h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.archive-product-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.archive-product-header-right .woocommerce-archive-description,
.archive-product-header-right .term-description {
  margin: 0;
  max-width: 70ch;
  width: 100%;
}

.archive-product-header-right .term-description p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--primary-color);
  margin: 0 0 var(--space-3) 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.archive-product-header-right .term-description p:last-child {
  margin-bottom: 0;
}

/* Category Filter Navigation */
.archive-product-category-filter {
  margin-bottom: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Mobile filter toggle button */
.archive-product-filter-toggle {
  display: none;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  align-items: center;
  justify-content: space-between;
}

.archive-product-filter-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.archive-product-filter-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.archive-product-filter-toggle.active svg {
  transform: rotate(180deg);
}

.archive-product-category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-product-category-list li {
  margin: 0;
}

.archive-product-category-list li a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.archive-product-category-list li.active a {
  font-style: italic;
  font-weight: 600;
  text-transform: uppercase;
}

.archive-product-category-list li a:hover {
  color: var(--secondary-color);
}

/* Product Count Section */
.archive-product-product-count {
  padding: var(--space-2) 0;
  margin-bottom: var(--space-5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: right;
  font-family: var(--font-body);
}

.archive-product-product-count strong {
  font-weight: 600;
}

.archive-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);

  .product-item {
    overflow: hidden;
  }
}

.archive-product-text-under-loop-wrapper {
  border-top: 1px solid var(--black);
  /* border-bottom: 1px solid var(--black); */
  margin-top: var(--space-20);
  background-color: #f5f5f5;
  padding-top: var(--space-10);

  .container {
    display: flex;
    justify-content: center;
  }
}

/* Content wrapper (FAQ + Text under loop) */
.archive-product-content-wrapper {
  background-color: var(--white);
  padding-block: var(--space-10);
}

/* FAQ section */
.archive-product-faq {
  margin-bottom: var(--space-10);
}

.archive-product-faq-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  text-align: center;
  color: var(--primary-color);
}

.archive-product-faq-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.archive-product-faq-item {
  background-color: var(--white);
  border: 1px solid #dddddd;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.archive-product-faq-item:hover {
  border-color: var(--primary-color);
}

.archive-product-faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background-color: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.archive-product-faq-question:hover {
  color: var(--accent-color);
}

.archive-product-faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  stroke: var(--primary-color);
}

.archive-product-faq-item.active .archive-product-faq-icon {
  transform: rotate(180deg);
  stroke: var(--accent-color);
}

.archive-product-faq-item.active .archive-product-faq-question {
  color: var(--accent-color);
}

.archive-product-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.archive-product-faq-item.active .archive-product-faq-answer {
  max-height: 1000px;
}

.archive-product-faq-answer-content {
  padding: 0 var(--space-5) var(--space-4) var(--space-5);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-color);
}

.archive-product-faq-answer-content p {
  margin-bottom: var(--space-3);
}

.archive-product-faq-answer-content p:last-child {
  margin-bottom: 0;
}

/* Text under loop section */
.archive-product-text-under-loop {
  padding-block: var(--space-10);
  max-width: 100ch;
  margin: 0 auto;
  position: relative;
}

.archive-product-text-under-loop-content {
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.4s ease;
  position: relative;
}

.archive-product-text-under-loop-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #f5f5f5);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.archive-product-text-under-loop.expanded .archive-product-text-under-loop-content {
  max-height: 5000px;
}

.archive-product-text-under-loop.expanded .archive-product-text-under-loop-content::after {
  opacity: 0;
}

.archive-product-text-under-loop-toggle {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background-color: var(--primary-color);
  color: var(--color-text-light);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius-3xl);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: fit-content;
}

.archive-product-text-under-loop-toggle:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.archive-product-text-under-loop-arrow {
  transition: transform 0.3s ease;
}

.archive-product-text-under-loop.expanded .archive-product-text-under-loop-arrow {
  transform: rotate(180deg);
}

@media (width <= 1024px) {
  .archive-product-header {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .archive-product-category-list {
    gap: var(--space-4);
  }

  .archive-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (width <= 768px) {
  .archive-product-header {
    padding: var(--space-6) 0;
  }

  .archive-product-header-left h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  /* Show mobile filter toggle button */
  .archive-product-filter-toggle {
    display: flex;
    margin-bottom: var(--space-3);
  }

  /* Hide category list by default on mobile */
  .archive-product-category-list {
    display: none;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding: var(--space-4);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  /* Show category list when active */
  .archive-product-category-list.active {
    display: flex;
  }

  .archive-product-category-list li a {
    display: block;
    padding: var(--space-3);
    background: var(--white);
    border-radius: var(--border-radius);
    border: 2px solid var(--color-border-light);
    text-align: center;
    transition: all 0.3s ease;
  }

  .archive-product-category-list li.active a {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
  }

  .archive-product-category-list li a:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .archive-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 480px) {
  .archive-product-grid {
    grid-template-columns: 1fr;
  }
}
