/* ============================================
   File: categories-shop.css
   ============================================ */

@import "category-filter.css";

/* ==========================================================================
   CATEGORY CARDS STYLES (Existing - Preserved)
   These styles apply to category archive pages showing category cards
   ========================================================================== */

.woocommerce-shop ul.products li.product-category,
.woocommerce-page.archive ul.products li.product-category,
.post-type-archive-product ul.products li.product-category,
body.tax-product_cat ul.products li.product-category {
  position: relative !important;
  background: var(--color-white) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  margin-bottom: var(--space-6) !important;
  border: none !important;
}

.woocommerce-shop ul.products li.product-category:hover,
.woocommerce-page.archive ul.products li.product-category:hover,
.post-type-archive-product ul.products li.product-category:hover,
body.tax-product_cat ul.products li.product-category:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Full Card Link */
.woocommerce-shop ul.products li.product-category > a,
.woocommerce-page.archive ul.products li.product-category > a,
.post-type-archive-product ul.products li.product-category > a,
body.tax-product_cat ul.products li.product-category > a {
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
  height: 100% !important;
  width: 100% !important;
  color: inherit !important;
  padding: 0 !important;
  position: relative !important;
}

.woocommerce-shop ul.products li.product-category > a::before,
.woocommerce-page.archive ul.products li.product-category > a::before,
.post-type-archive-product ul.products li.product-category > a::before,
body.tax-product_cat ul.products li.product-category > a::before {
  display: none !important;
}

/* Animated Arrow */
.woocommerce-shop ul.products li.product-category > a::after,
.woocommerce-page.archive ul.products li.product-category > a::after,
.post-type-archive-product ul.products li.product-category > a::after,
body.tax-product_cat ul.products li.product-category > a::after {
  content: "" !important;
  position: absolute !important;
  bottom: var(--space-5) !important;
  right: var(--space-5) !important;
  width: 20px !important;
  height: 20px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-10px) !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 20px 20px !important;
  background-color: transparent !important;

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: 20px 20px !important;
  mask-size: 20px 20px !important;
  background-color: var(--color-text-light, #888888) !important;
  background-image: none !important;
}

.woocommerce-shop ul.products li.product-category:hover > a::after,
.woocommerce-page.archive ul.products li.product-category:hover > a::after,
.post-type-archive-product ul.products li.product-category:hover > a::after,
body.tax-product_cat ul.products li.product-category:hover > a::after {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  background-color: var(--brand-color, #357dfd) !important;
}

.woocommerce-shop ul.products li.product-category:hover > a::after,
.woocommerce-page.archive ul.products li.product-category:hover > a::after,
.post-type-archive-product ul.products li.product-category:hover > a::after,
body.tax-product_cat ul.products li.product-category:hover > a::after {
  animation: arrowPulseInline 1.5s ease-in-out infinite !important;
}

@keyframes arrowPulseInline {
  0%,
  100% {
    transform: translateX(0) !important;
  }
  50% {
    transform: translateX(5px) !important;
  }
}

/* Category Image */
.woocommerce-shop ul.products li.product-category > a > img,
.woocommerce-page.archive ul.products li.product-category > a > img,
.post-type-archive-product ul.products li.product-category > a > img,
body.tax-product_cat ul.products li.product-category > a > img {
  width: 100% !important;
  height: 300px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  transition: transform 0.3s ease !important;
  flex-shrink: 0 !important;
}

.woocommerce-shop ul.products li.product-category:hover > a > img,
.woocommerce-page.archive ul.products li.product-category:hover > a > img,
.post-type-archive-product ul.products li.product-category:hover > a > img,
body.tax-product_cat ul.products li.product-category:hover > a > img {
  transform: scale(1.05) !important;
}

/* Title (H2) */
.woocommerce-shop ul.products li.product-category h2,
.woocommerce-shop
  ul.products
  li.product-category
  .woocommerce-loop-category__title,
.woocommerce-page.archive ul.products li.product-category h2,
.woocommerce-page.archive
  ul.products
  li.product-category
  .woocommerce-loop-category__title,
.post-type-archive-product ul.products li.product-category h2,
.post-type-archive-product
  ul.products
  li.product-category
  .woocommerce-loop-category__title,
body.tax-product_cat ul.products li.product-category h2,
body.tax-product_cat
  ul.products
  li.product-category
  .woocommerce-loop-category__title {
  position: relative !important;
  padding: var(--space-5) !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  display: block !important;
  text-align: left !important;
  font-family: var(--font-heading) !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: var(--color-text-dark) !important;
  transition: color 0.3s ease !important;
  border: none !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}

.woocommerce-shop ul.products li.product-category:hover h2,
.woocommerce-shop
  ul.products
  li.product-category:hover
  .woocommerce-loop-category__title,
.woocommerce-page.archive ul.products li.product-category:hover h2,
.woocommerce-page.archive
  ul.products
  li.product-category:hover
  .woocommerce-loop-category__title,
.post-type-archive-product ul.products li.product-category:hover h2,
.post-type-archive-product
  ul.products
  li.product-category:hover
  .woocommerce-loop-category__title,
body.tax-product_cat ul.products li.product-category:hover h2,
body.tax-product_cat
  ul.products
  li.product-category:hover
  .woocommerce-loop-category__title {
  color: var(--brand-color) !important;
}

.woocommerce-shop ul.products li.product-category h2 mark,
.woocommerce-shop
  ul.products
  li.product-category
  .woocommerce-loop-category__title
  mark,
.woocommerce-page.archive ul.products li.product-category h2 mark,
.woocommerce-page.archive
  ul.products
  li.product-category
  .woocommerce-loop-category__title
  mark,
.post-type-archive-product ul.products li.product-category h2 mark,
.post-type-archive-product
  ul.products
  li.product-category
  .woocommerce-loop-category__title
  mark,
body.tax-product_cat ul.products li.product-category h2 mark,
body.tax-product_cat
  ul.products
  li.product-category
  .woocommerce-loop-category__title
  mark {
  background: none !important;
  color: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
}

/* Content Area */
.woocommerce-shop ul.products li.product-category .category-content-area,
.woocommerce-page.archive
  ul.products
  li.product-category
  .category-content-area,
.post-type-archive-product
  ul.products
  li.product-category
  .category-content-area,
body.tax-product_cat ul.products li.product-category .category-content-area {
  padding: 0 var(--space-6) var(--space-6) var(--space-6) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  flex-grow: 1 !important;
}

/* Category Description */
.woocommerce-shop ul.products li.product-category .category-description,
.woocommerce-page.archive ul.products li.product-category .category-description,
.post-type-archive-product
  ul.products
  li.product-category
  .category-description,
body.tax-product_cat ul.products li.product-category .category-description {
  font-size: 0.9375rem !important;
  color: #666 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--font-body) !important;
  font-weight: 400 !important;
  flex-grow: 1 !important;
  margin-bottom: -20px !important;
}

/* Product Count */
.woocommerce-shop ul.products li.product-category .count,
.woocommerce-page.archive ul.products li.product-category .count,
.post-type-archive-product ul.products li.product-category .count,
body.tax-product_cat ul.products li.product-category .count {
  display: block !important;
  font-size: 0.875rem !important;
  color: #888 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-top: auto !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
  font-family: var(--font-body) !important;
  border: none !important;
  line-height: 1.5 !important;
  flex-shrink: 0 !important;
}

.woocommerce-shop ul.products li.product-category .count::before,
.woocommerce-shop ul.products li.product-category .count::after,
.woocommerce-page.archive ul.products li.product-category .count::before,
.woocommerce-page.archive ul.products li.product-category .count::after,
.post-type-archive-product ul.products li.product-category .count::before,
.post-type-archive-product ul.products li.product-category .count::after,
body.tax-product_cat ul.products li.product-category .count::before,
body.tax-product_cat ul.products li.product-category .count::after {
  display: none !important;
}

/* Badge */
.woocommerce-shop ul.products li.product-category .category-badge,
.woocommerce-page.archive ul.products li.product-category .category-badge,
.post-type-archive-product ul.products li.product-category .category-badge,
body.tax-product_cat ul.products li.product-category .category-badge {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  background: var(--color-danger) !important;
  color: var(--color-white) !important;
  padding: 0.375rem 0.75rem !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  z-index: 2 !important;
  font-family: var(--font-body) !important;
}

/* Content Structure */
.woocommerce-shop ul.products li.product-category h2 ~ .category-description,
.woocommerce-shop ul.products li.product-category h2 ~ .count,
.woocommerce-page.archive
  ul.products
  li.product-category
  h2
  ~ .category-description,
.woocommerce-page.archive ul.products li.product-category h2 ~ .count,
.post-type-archive-product
  ul.products
  li.product-category
  h2
  ~ .category-description,
.post-type-archive-product ul.products li.product-category h2 ~ .count,
body.tax-product_cat ul.products li.product-category h2 ~ .category-description,
body.tax-product_cat ul.products li.product-category h2 ~ .count {
  padding-left: var(--space-5) !important;
  padding-right: var(--space-5) !important;
}

.woocommerce-shop ul.products li.product-category .category-description,
.woocommerce-page.archive ul.products li.product-category .category-description,
.post-type-archive-product
  ul.products
  li.product-category
  .category-description,
body.tax-product_cat ul.products li.product-category .category-description {
  padding-top: var(--space-1) !important;
  padding-bottom: var(--space-1) !important;
}

.woocommerce-shop ul.products li.product-category .count,
.woocommerce-page.archive ul.products li.product-category .count,
.post-type-archive-product ul.products li.product-category .count,
body.tax-product_cat ul.products li.product-category .count {
  padding-bottom: var(--space-5) !important;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .woocommerce-shop ul.products li.product-category > a > img,
  .woocommerce-page.archive ul.products li.product-category > a > img,
  .post-type-archive-product ul.products li.product-category > a > img,
  body.tax-product_cat ul.products li.product-category > a > img {
    height: 200px !important;
  }

  .woocommerce-shop ul.products li.product-category h2,
  .woocommerce-shop
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  .woocommerce-page.archive ul.products li.product-category h2,
  .woocommerce-page.archive
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  .post-type-archive-product ul.products li.product-category h2,
  .post-type-archive-product
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  body.tax-product_cat ul.products li.product-category h2,
  body.tax-product_cat
    ul.products
    li.product-category
    .woocommerce-loop-category__title {
    font-size: 1.375rem !important;
    padding: var(--space-5) !important;
    padding-bottom: 0 !important;
  }

  .woocommerce-shop ul.products li.product-category .count,
  .woocommerce-page.archive ul.products li.product-category .count,
  .post-type-archive-product ul.products li.product-category .count,
  body.tax-product_cat ul.products li.product-category .count {
    font-size: 0.8125rem !important;
    padding: 0 var(--space-5) var(--space-5) var(--space-5) !important;
  }

  .woocommerce-shop ul.products li.product-category .category-description,
  .woocommerce-page.archive
    ul.products
    li.product-category
    .category-description,
  .post-type-archive-product
    ul.products
    li.product-category
    .category-description,
  body.tax-product_cat ul.products li.product-category .category-description {
    font-size: 0.875rem !important;
    padding: var(--space-3) var(--space-5) var(--space-2) var(--space-5) !important;
  }

  .woocommerce-shop ul.products li.product-category > a::after,
  .woocommerce-page.archive ul.products li.product-category > a::after,
  .post-type-archive-product ul.products li.product-category > a::after,
  body.tax-product_cat ul.products li.product-category > a::after {
    width: 18px !important;
    height: 18px !important;
    -webkit-mask-size: 18px 18px !important;
    mask-size: 18px 18px !important;
    bottom: var(--space-5) !important;
    right: var(--space-5) !important;
  }
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .woocommerce-shop ul.products li.product-category,
  .woocommerce-page.archive ul.products li.product-category,
  .post-type-archive-product ul.products li.product-category,
  body.tax-product_cat ul.products li.product-category {
    margin-bottom: var(--space-4) !important;
  }

  .woocommerce-shop ul.products li.product-category > a > img,
  .woocommerce-page.archive ul.products li.product-category > a > img,
  .post-type-archive-product ul.products li.product-category > a > img,
  body.tax-product_cat ul.products li.product-category > a > img {
    height: 180px !important;
  }

  .woocommerce-shop ul.products li.product-category h2,
  .woocommerce-shop
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  .woocommerce-page.archive ul.products li.product-category h2,
  .woocommerce-page.archive
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  .post-type-archive-product ul.products li.product-category h2,
  .post-type-archive-product
    ul.products
    li.product-category
    .woocommerce-loop-category__title,
  body.tax-product_cat ul.products li.product-category h2,
  body.tax-product_cat
    ul.products
    li.product-category
    .woocommerce-loop-category__title {
    font-size: 1.25rem !important;
    padding: var(--space-4) !important;
    padding-bottom: 0 !important;
  }

  .woocommerce-shop ul.products li.product-category .count,
  .woocommerce-page.archive ul.products li.product-category .count,
  .post-type-archive-product ul.products li.product-category .count,
  body.tax-product_cat ul.products li.product-category .count {
    font-size: 0.8125rem !important;
    padding: 0 var(--space-4) var(--space-4) var(--space-4) !important;
  }

  .woocommerce-shop ul.products li.product-category .category-description,
  .woocommerce-page.archive
    ul.products
    li.product-category
    .category-description,
  .post-type-archive-product
    ul.products
    li.product-category
    .category-description,
  body.tax-product_cat ul.products li.product-category .category-description {
    font-size: 0.8125rem !important;
    padding: var(--space-3) var(--space-4) var(--space-2) var(--space-4) !important;
  }

  .woocommerce-shop ul.products li.product-category > a::after,
  .woocommerce-page.archive ul.products li.product-category > a::after,
  .post-type-archive-product ul.products li.product-category > a::after,
  body.tax-product_cat ul.products li.product-category > a::after {
    width: 16px !important;
    height: 16px !important;
    -webkit-mask-size: 16px 16px !important;
    mask-size: 16px 16px !important;
    bottom: var(--space-4) !important;
    right: var(--space-4) !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .woocommerce-shop ul.products li.product-category,
  .woocommerce-shop ul.products li.product-category > a > img,
  .woocommerce-shop ul.products li.product-category > a::after,
  .woocommerce-page.archive ul.products li.product-category,
  .woocommerce-page.archive ul.products li.product-category > a > img,
  .woocommerce-page.archive ul.products li.product-category > a::after,
  .post-type-archive-product ul.products li.product-category,
  .post-type-archive-product ul.products li.product-category > a > img,
  .post-type-archive-product ul.products li.product-category > a::after,
  body.tax-product_cat ul.products li.product-category,
  body.tax-product_cat ul.products li.product-category > a > img,
  body.tax-product_cat ul.products li.product-category > a::after {
    transition: none !important;
    animation: none !important;
  }

  .woocommerce-shop ul.products li.product-category:hover,
  .woocommerce-page.archive ul.products li.product-category:hover,
  .post-type-archive-product ul.products li.product-category:hover,
  body.tax-product_cat ul.products li.product-category:hover {
    transform: none !important;
  }

  .woocommerce-shop ul.products li.product-category:hover > a > img,
  .woocommerce-page.archive ul.products li.product-category:hover > a > img,
  .post-type-archive-product ul.products li.product-category:hover > a > img,
  body.tax-product_cat ul.products li.product-category:hover > a > img {
    transform: none !important;
  }
}

.woocommerce-shop ul.products li.product-category > a:focus,
.woocommerce-page.archive ul.products li.product-category > a:focus,
.post-type-archive-product ul.products li.product-category > a:focus,
body.tax-product_cat ul.products li.product-category > a:focus {
  outline: 3px solid var(--brand-color) !important;
  outline-offset: 3px !important;
}

.woocommerce-shop ul.products li.product-category > a:focus:not(:focus-visible),
.woocommerce-page.archive
  ul.products
  li.product-category
  > a:focus:not(:focus-visible),
.post-type-archive-product
  ul.products
  li.product-category
  > a:focus:not(:focus-visible),
body.tax-product_cat
  ul.products
  li.product-category
  > a:focus:not(:focus-visible) {
  outline: none !important;
}
