/* ==========================================================================
   8. Product Category Page Styles
   ========================================================================== */


.archive-product-content {
  
/* Product template grid system */
ul.wc-block-product-template {
  display: grid !important;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 24px;
  grid-template-columns: 1fr;
  /* Default: 1 column */
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  ul.wc-block-product-template {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  ul.wc-block-product-template {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Ensure list items behave as grid cells */
ul.wc-block-product-template li.wc-block-product {
  width: 100% !important;
  margin: 0 !important;
}

  

  /* Links retain their underlines per accessibility requirements (WP Theme Review).
     Product card titles are styled distinctly via font-size/weight rather than
     removing underlines. */

  .tinvwl_add_to_wishlist_button::before {
    font-size: 28px;
  }

  .wc-block-product-filter-price-slider .text input[type=text] {
    background: transparent;
    border-radius: 0px;
    color: var(--wp--preset--color--accent-4);
    border-color: currentColor;
    font-size: 0.875rem;
    letter-spacing: -1.5px;

  }

  /* Custom Select Styling */
  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    padding: 0.75em 2em 0.75em 0.5em;
    /* space for arrow */
    border: none;
    border-bottom: 1px solid var(--wp--preset--color--contrast);
    background-color: transparent;
    /* Chevron icon */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'><polyline points='1,1 5,4 9,1' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5em center;
    background-size: 10px 5px;

    color: var(--wp--preset--color--contrast);
    font: inherit;
    cursor: pointer;
  }

  /* Focus state (important for UX) */
  select:focus {
    border-bottom: 1px solid var(--wp--preset--color--contrast);
  }

  /* Dropdown options (limited browser control) */
  select option {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
  }

  /* Attempt to style selected option (works in some browsers only) */
  select option:checked,
  select option:hover,
  select option:focus,
  select option:focus-within {
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
  }

  .wc-block-product-filters__overlay-content div>h3 {
    padding: 19px 24px;
    background: var(--wp--preset--color--accent-3);
  }

  .wc-block-product-filters__overlay-content h2 {
    display: none;
  }

  /* 🎯 THUMB (the handles) */
  .wc-block-product-filter-price-slider input[type="range"]::-webkit-slider-thumb:hover {
    -webkit-appearance: none;
    appearance: none;

    pointer-events: all;
    /* re-enable interaction */

    width: 14px;
    height: 14px;
    border-radius: 50%;

    background-color: var(--wp--preset--color--contrast);
    border: 2px solid var(--wp--preset--color--base);

    cursor: pointer;
    margin-top: -5px;
    /* align with track */
  }

  .wc-block-product-filter-price-slider input[type="range"]::-moz-range-thumb:hover {
    pointer-events: all;

    width: 14px;
    height: 14px;
    border-radius: 50%;

    background-color: var(--wp--preset--color--contrast);
    border: 2px solid var(--wp--preset--color--base);

    cursor: pointer;
  }

  /* 🟢 Active / hover state */
  .wc-block-product-filter-price-slider input[type="range"]::-webkit-slider-thumb {
    background-color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--contrast);
  }

  .wc-block-product-filter-price-slider input[type="range"]::-moz-range-thumb {
    background-color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--contrast);
  }


  .wc-block-product-filters__overlay-content>div {
    border: 1px solid var(--wp--preset--color--accent-4);
  }

  .wc-block-product-filters__overlay-content>div>h3+div {
    padding: 12px 24px;
  }

  .wp-block-group.card-data {
    display: flex;
    align-items: start;
  }

 

  h3 {
    margin: 0px;
  }


  @media (min-width: 1240px) {
    .index-content .mobile-filters-wrapper {
      display: none !important;
    }
  }

  @media (max-width: 600px) {
    .wp-block-woocommerce-product-template {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .desktop-filters-column {
      display: none !important;
    }

    .index-content .products-wrapper {
      flex-basis: 100% !important;
    }

    .wc-block-catalog-sorting {
      display: none !important;
    }
  }

  @media (min-width: 601px) {
    .mobile-filters-wrapper {
      display: none !important;

    }

    .index-content {
      padding: 10px;
    }

  }

  .wc-block-product-filters__open-overlay span {
    display: none;
  }

/* ==========================================================================
   9. Product Swiper Integration
   ========================================================================== */

/* Product container for Swiper */
.wc-block-product-template .wc-block-product {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

/* Main Swiper container */
.wc-product-swiper {
  position: relative;
  overflow: hidden;
}

/* Ensure hover detection works for Swiper products */
.wc-block-product.has-product-swiper {
  position: relative;
  z-index: 1;
}

.wc-block-product.has-product-swiper .wc-product-swiper {
  z-index: 2;
}

/* Product image with Swiper */
.wc-block-components-product-image.has-product-swiper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.wc-block-components-product-image.has-product-swiper a {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Swiper wrapper */
.wc-product-swiper .swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: flex;
  box-sizing: border-box;
}

/* Swiper slides */
.wc-product-swiper .swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}






/* WooCommerce Blocks integration */
.wc-block-product.has-product-swiper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.wc-block-product .wc-block-components-product-image {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: block;
}



/* Overlay elements preservation */
.wc-product-swiper+.wc-block-components-product-image__inner-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
}

.wc-product-swiper+.wc-block-components-product-image__inner-container * {
  pointer-events: auto;
}

/* Ensure wishlist and quick view stay above Swiper */


.woocommerce .wc-block-product a.quick_view {
  position: absolute;
  right: 14px;
  top: 40px;
  z-index: 15 !important;
  pointer-events: auto;
}

/* Loading state */
.wc-product-swiper.swiper-initialized {
  background: transparent;
}

.wc-product-swiper:not(.swiper-initialized)::before {
  content: "⟳";
  font-size: 24px;
  color: #666;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

  .wc-product-swiper .swiper-button-prev,
  .wc-product-swiper .swiper-button-next {
    background: #000;
    border: 2px solid #fff;
  }

  .wc-product-swiper .swiper-pagination-bullet {
    background: #000;
    border: 2px solid #fff;
  }

  .wc-product-swiper .swiper-pagination-bullet-active {
    background: #fff;
    border-color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  .wc-product-swiper .swiper-slide img,
  .wc-product-swiper .swiper-button-prev,
  .wc-product-swiper .swiper-button-next,
  .wc-product-swiper .swiper-pagination-bullet {
    transition: none;
  }

  .wc-product-swiper:hover .swiper-slide img {
    transform: none;
  }
}

/* Print styles */
@media print {

  .wc-product-swiper .swiper-button-prev,
  .wc-product-swiper .swiper-button-next,
  .wc-product-swiper .swiper-pagination {
    display: none !important;
  }

  .wc-product-swiper {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   10. Product Template & Grid Styles
   ========================================================================== */

/* Product template responsive grid */
.wc-block-product-template__responsive.columns-3 {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr) !important;
}

/* Large screens: 3 columns */
@media (min-width: 1024px) {
  .wc-block-product-template__responsive.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}


  /* Reset list item margin */
  .wc-block-product-template__responsive>li {
    margin-block-start: 0;
  }

  /* Product positioning */
  .wc-block-product {
    position: relative;
  }

  /* Text alignment override */
  .has-text-align-center {
    text-align: start !important;
  }


  /* Product price styling */
  .wc-block-components-product-price {
    font-size: clamp(0.875rem, 0.7602rem + 0.4898vw, 1.25rem) !important;
    line-height: 1 !important;
    margin-bottom: 8px !important;
  }

  /* Wishlist positioning */
  .tinv-wishlist {
    position: absolute;
    right: 20px;
    top: 10px;
    width: fit-content !important;
    z-index: 15 !important;
  }

  /* Hide wishlist text */
  .tinvwl_add_to_wishlist-text {
    display: none;
  }

  /* Wishlist button styling */
  .tinv-wishlist.tinvwl-after-add-to-cart .tinvwl_add_to_wishlist_button {
    margin: 0 !important;
    padding: 0px;
    border: none;
  }

  .tinvwl_add_to_wishlist_button {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
  }

  /* Wishlist icon styling */
  .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
  .woocommerce ul.products li.product a.tinvwl-button.tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
  .woocommerce-page ul.products li.product a.tinvwl-button.tinvwl-icon-heart.tinvwl_add_to_wishlist_button:before,
  a.wishlist_products_counter.top_wishlist-heart:before,
  span.wishlist_products_counter.top_wishlist-heart:before,
  a.sidr-class-wishlist_products_counter.sidr-class-top_wishlist-heart:before {
    content: "\e909";
    display: inline-block;
    font-family: tinvwl-webfont !important;
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    font-size: 25px;
    vertical-align: top;
    margin-right: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* Show wishlist on product hover */
  .wc-block-product:hover .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
  .wc-block-product.has-product-swiper:hover .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
  .woocommerce ul.products li.product a.tinvwl-button.tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
  .woocommerce-page ul.products li.product a.tinvwl-button.tinvwl-icon-heart.tinvwl_add_to_wishlist_button:before,
  a.wishlist_products_counter.top_wishlist-heart:before,
  span.wishlist_products_counter.top_wishlist-heart:before,
  a.sidr-class-wishlist_products_counter.sidr-class-top_wishlist-heart:before {
    opacity: 1;
  }

  /* Hide sale badge */
  wc-block-components-product-sale-badge alignright wc-block-components-product-sale-badge--align-right {
    display: none !important;
  }

  .editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,
  .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right {
    display: none !important;
  }

  /* Mobile adjustments */
  @media (width <=767px) {

    .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
    .woocommerce ul.products li.product a.tinvwl-button.tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before,
    .woocommerce-page ul.products li.product a.tinvwl-button.tinvwl-icon-heart.tinvwl_add_to_wishlist_button:before,
    a.wishlist_products_counter.top_wishlist-heart:before,
    span.wishlist_products_counter.top_wishlist-heart:before,
    a.sidr-class-wishlist_products_counter.sidr-class-top_wishlist-heart:before {
      opacity: 1;
    }

    .wc-block-product:hover a.quick_view,
    .wc-block-product.has-product-swiper:hover a.quick_view {
      opacity: 1;
    }
  }
.wc-block-product-filter-checkbox-list__items span{
    font-size: var(--wp--preset--font-size--medium) !important;

}
}






/* ==========================================================================
   12. Countdown Timer Styles
   ========================================================================== */

/* Countdown digit display */
.revx-d-flex {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: clamp(0.28125rem, 0.176rem + 0.449vw, 0.625rem);
  background-color: #fff !important;
  width: clamp(1.75rem, 1.1378rem + 2.6122vw, 3.75rem);
  height: clamp(1.75rem, 1.1378rem + 2.6122vw, 3.75rem);
  font-size: clamp(0.875rem, 0.7602rem + 0.4898vw, 1.25rem);
  justify-content: center !important;
  box-sizing: border-box;
}

/* Hide shop subheading */
[data-smart-tag="shopSubheading"] {
  display: none !important;
}

/* Countdown wrapper positioning */
.revx-countdown-digit-wrapper {
  align-items: center !important;
  justify-content: center !important;
  position: absolute;
  left: 50%;
  top: -180px;
  transform: translate(-50%, 50%);
}

/* Mobile countdown adjustments */
@media (max-width: 769px) {
  .revx-countdown-digit-wrapper {
    top: -140px;
  }

  .archive-product-content .wc-block-components-product-price {
    max-width: 65%;
  }
}
  .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button {
    font-size: 0 !important;
  }
/* Small mobile countdown adjustments */
@media (max-width: 425px) {
  .revx-countdown-digit-wrapper {
    top: -120px;
  }

  .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button {
    padding: 4px !important;
  }

  .revx-d-flex {
    padding: 4px 1px !important;
    gap: 1px !important;
  }
}

.revx-template {
  height: 0 !important;
  margin: 0 !important;
}



.archive-product-content 
{
  --wc-product-filters-overlay-background-color: var(--wp--preset--color--base)
}
.wc-block-next-previous-buttons {
  display: none;
}

  .wp-block-query-pagination {
    gap: 12px;

  }

  .wp-block-query-pagination-next-arrow,
  .wp-block-query-pagination-previous-arrow {
    margin-left: 0px !important;
    margin-right: 0px !important;
    height: 100%;
    width: 100%;
    text-align: center;
  }

  .wp-block-query-pagination-previous,
  .wp-block-query-pagination-next {
    border: 1px solid var(--wp--preset--color--accent-4);
    font-size: 20px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;


  }

  .wp-block-query-pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .page-numbers.current {
    color: var(--wp--preset--color--accent-1);
    background-color: var(--wp--preset--color--contrast);

  }

  .page-numbers {
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .wc-block-product .tinv-wishlist {
  position: absolute;
  right: 20px;
  top: 15px;
  width: fit-content !important;
  z-index: 15 !important;
  pointer-events: auto;
}
 .tinvwl_add_to_wishlist_button {
    display: flex;
    align-items: center;
    border: 1px solid var(--wp--preset--color--accent-4);
    width: fit-content;
    padding: 10px;
    gap: 8px;
  } 
