/* =========================================================
   Tick Away v1.5.7 shop/catalogus viewport fix
   Products visible in first viewport, reassurance moved to sidebar.
   ========================================================= */

body.woocommerce-shop main.site-main,
body.tax-product_cat main.site-main,
body.tax-product_tag main.site-main,
body.post-type-archive-product main.site-main {
  max-width: 1240px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 24px 18px 72px !important;
}

body.woocommerce-shop .woocommerce-wrap,
body.tax-product_cat .woocommerce-wrap,
body.tax-product_tag .woocommerce-wrap,
body.post-type-archive-product .woocommerce-wrap {
  max-width: 1240px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.woocommerce-shop .woocommerce,
body.tax-product_cat .woocommerce,
body.tax-product_tag .woocommerce,
body.post-type-archive-product .woocommerce {
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
}

/* Compact hero: no tall right card above the product grid */
body.woocommerce-shop .ta-shop-hero,
body.tax-product_cat .ta-shop-hero,
body.tax-product_tag .ta-shop-hero,
body.post-type-archive-product .ta-shop-hero {
  display: block !important;
  margin: 0 0 16px !important;
  padding: 22px 26px !important;
  min-height: 0 !important;
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 44%, #eef8f2 100%) !important;
  border: 1px solid #dbece3 !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 30px rgba(6, 43, 73, .055) !important;
}

body.woocommerce-shop .ta-shop-hero-card,
body.tax-product_cat .ta-shop-hero-card,
body.tax-product_tag .ta-shop-hero-card,
body.post-type-archive-product .ta-shop-hero-card {
  display: none !important;
}

body.woocommerce-shop .ta-shop-kicker,
body.tax-product_cat .ta-shop-kicker,
body.tax-product_tag .ta-shop-kicker,
body.post-type-archive-product .ta-shop-kicker {
  min-height: 28px !important;
  margin: 0 0 8px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

body.woocommerce-shop .ta-shop-hero h1,
body.tax-product_cat .ta-shop-hero h1,
body.tax-product_tag .ta-shop-hero h1,
body.post-type-archive-product .ta-shop-hero h1 {
  margin: 0 0 6px !important;
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.035em !important;
}

body.woocommerce-shop .ta-shop-hero p,
body.tax-product_cat .ta-shop-hero p,
body.tax-product_tag .ta-shop-hero p,
body.post-type-archive-product .ta-shop-hero p {
  max-width: 760px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

/* Sidebar layout */
body.woocommerce-shop .ta-shop-layout,
body.tax-product_cat .ta-shop-layout,
body.tax-product_tag .ta-shop-layout,
body.post-type-archive-product .ta-shop-layout {
  display: grid !important;
  grid-template-columns: 224px minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: start !important;
}

body.woocommerce-shop .ta-shop-main,
body.tax-product_cat .ta-shop-main,
body.tax-product_tag .ta-shop-main,
body.post-type-archive-product .ta-shop-main {
  min-width: 0 !important;
}

body.woocommerce-shop .ta-shop-sidebar,
body.tax-product_cat .ta-shop-sidebar,
body.tax-product_tag .ta-shop-sidebar,
body.post-type-archive-product .ta-shop-sidebar {
  position: sticky !important;
  top: 18px !important;
  display: block !important;
  padding: 18px !important;
  background: #ffffff !important;
  border: 1px solid #e2edf3 !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 30px rgba(6, 43, 73, .055) !important;
}

body.woocommerce-shop .ta-shop-sidebar > strong,
body.tax-product_cat .ta-shop-sidebar > strong,
body.tax-product_tag .ta-shop-sidebar > strong,
body.post-type-archive-product .ta-shop-sidebar > strong {
  display: block !important;
  margin: 0 0 12px !important;
  color: #062b49 !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: -.015em !important;
}

body.woocommerce-shop .ta-shop-sidebar ul,
body.tax-product_cat .ta-shop-sidebar ul,
body.tax-product_tag .ta-shop-sidebar ul,
body.post-type-archive-product .ta-shop-sidebar ul {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.woocommerce-shop .ta-shop-sidebar li,
body.tax-product_cat .ta-shop-sidebar li,
body.tax-product_tag .ta-shop-sidebar li,
body.post-type-archive-product .ta-shop-sidebar li {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  column-gap: 9px !important;
  row-gap: 2px !important;
  align-items: start !important;
  padding: 10px !important;
  background: #f8fafb !important;
  border: 1px solid #edf2f5 !important;
  border-radius: 14px !important;
}

body.woocommerce-shop .ta-shop-sidebar li span,
body.tax-product_cat .ta-shop-sidebar li span,
body.tax-product_tag .ta-shop-sidebar li span,
body.post-type-archive-product .ta-shop-sidebar li span {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 24px !important;
  height: 24px !important;
  display: grid !important;
  place-items: center !important;
  background: #eef8f2 !important;
  color: #008c45 !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.woocommerce-shop .ta-shop-sidebar li b,
body.tax-product_cat .ta-shop-sidebar li b,
body.tax-product_tag .ta-shop-sidebar li b,
body.post-type-archive-product .ta-shop-sidebar li b {
  grid-column: 2 !important;
  margin: 0 !important;
  color: #062b49 !important;
  font-size: 13px !important;
  line-height: 1.22 !important;
  font-weight: 900 !important;
}

body.woocommerce-shop .ta-shop-sidebar li small,
body.tax-product_cat .ta-shop-sidebar li small,
body.tax-product_tag .ta-shop-sidebar li small,
body.post-type-archive-product .ta-shop-sidebar li small {
  grid-column: 2 !important;
  margin: 0 !important;
  color: #4b6578 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Toolbar compact, not a second hero */
body.woocommerce-shop .ta-shop-toolbar,
body.tax-product_cat .ta-shop-toolbar,
body.tax-product_tag .ta-shop-toolbar,
body.post-type-archive-product .ta-shop-toolbar {
  margin: 0 0 16px !important;
  padding: 10px 12px !important;
  min-height: 52px !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

body.woocommerce-shop .ta-shop-toolbar select,
body.tax-product_cat .ta-shop-toolbar select,
body.tax-product_tag .ta-shop-toolbar select,
body.post-type-archive-product .ta-shop-toolbar select {
  min-height: 40px !important;
  font-size: 13px !important;
}

/* Product cards: smaller above the fold, still conversion focused */
body.woocommerce-shop ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products,
body.post-type-archive-product ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-shop ul.products::before,
body.woocommerce-shop ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.tax-product_tag ul.products::before,
body.tax-product_tag ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
  display: none !important;
  content: none !important;
}

body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.post-type-archive-product ul.products li.product {
  width: auto !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 14px !important;
  border-radius: 20px !important;
  min-height: 0 !important;
}

body.woocommerce-shop ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img,
body.post-type-archive-product ul.products li.product img {
  height: 166px !important;
  padding: 14px !important;
  margin-bottom: 12px !important;
  border-radius: 15px !important;
}

body.woocommerce-shop .ta-loop-badges,
body.tax-product_cat .ta-loop-badges,
body.tax-product_tag .ta-loop-badges,
body.post-type-archive-product .ta-loop-badges {
  top: 24px !important;
  left: 24px !important;
}

body.woocommerce-shop .ta-loop-badges span,
body.tax-product_cat .ta-loop-badges span,
body.tax-product_tag .ta-loop-badges span,
body.post-type-archive-product .ta-loop-badges span {
  min-height: 23px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
  min-height: 0 !important;
  margin-bottom: 7px !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
}

body.woocommerce-shop ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
  margin-bottom: 9px !important;
  font-size: 17px !important;
}

body.woocommerce-shop .ta-loop-proof,
body.tax-product_cat .ta-loop-proof,
body.tax-product_tag .ta-loop-proof,
body.post-type-archive-product .ta-loop-proof {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 10px !important;
  margin-bottom: 12px !important;
  font-size: 12px !important;
}

body.woocommerce-shop ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button {
  min-height: 44px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

body.woocommerce-shop nav.woocommerce-pagination,
body.tax-product_cat nav.woocommerce-pagination,
body.tax-product_tag nav.woocommerce-pagination,
body.post-type-archive-product nav.woocommerce-pagination {
  margin-top: 28px !important;
}

/* Tablet */
@media (max-width: 1040px) {
  body.woocommerce-shop .ta-shop-layout,
  body.tax-product_cat .ta-shop-layout,
  body.tax-product_tag .ta-shop-layout,
  body.post-type-archive-product .ta-shop-layout {
    grid-template-columns: 1fr !important;
  }

  body.woocommerce-shop .ta-shop-sidebar,
  body.tax-product_cat .ta-shop-sidebar,
  body.tax-product_tag .ta-shop-sidebar,
  body.post-type-archive-product .ta-shop-sidebar {
    position: static !important;
    padding: 12px !important;
  }

  body.woocommerce-shop .ta-shop-sidebar ul,
  body.tax-product_cat .ta-shop-sidebar ul,
  body.tax-product_tag .ta-shop-sidebar ul,
  body.post-type-archive-product .ta-shop-sidebar ul {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.woocommerce-shop ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile: keep products as high as possible */
@media (max-width: 700px) {
  body.woocommerce-shop main.site-main,
  body.tax-product_cat main.site-main,
  body.tax-product_tag main.site-main,
  body.post-type-archive-product main.site-main {
    padding: 16px 12px 70px !important;
  }

  body.woocommerce-shop .ta-shop-hero,
  body.tax-product_cat .ta-shop-hero,
  body.tax-product_tag .ta-shop-hero,
  body.post-type-archive-product .ta-shop-hero {
    margin-bottom: 12px !important;
    padding: 18px !important;
    border-radius: 18px !important;
  }

  body.woocommerce-shop .ta-shop-hero h1,
  body.tax-product_cat .ta-shop-hero h1,
  body.tax-product_tag .ta-shop-hero h1,
  body.post-type-archive-product .ta-shop-hero h1 {
    font-size: 28px !important;
  }

  body.woocommerce-shop .ta-shop-hero p,
  body.tax-product_cat .ta-shop-hero p,
  body.tax-product_tag .ta-shop-hero p,
  body.post-type-archive-product .ta-shop-hero p {
    font-size: 14px !important;
  }

  body.woocommerce-shop .ta-shop-sidebar,
  body.tax-product_cat .ta-shop-sidebar,
  body.tax-product_tag .ta-shop-sidebar,
  body.post-type-archive-product .ta-shop-sidebar {
    display: none !important;
  }

  body.woocommerce-shop .ta-shop-toolbar,
  body.tax-product_cat .ta-shop-toolbar,
  body.tax-product_tag .ta-shop-toolbar,
  body.post-type-archive-product .ta-shop-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
  }

  body.woocommerce-shop .ta-shop-toolbar .woocommerce-result-count,
  body.tax-product_cat .ta-shop-toolbar .woocommerce-result-count,
  body.tax-product_tag .ta-shop-toolbar .woocommerce-result-count,
  body.post-type-archive-product .ta-shop-toolbar .woocommerce-result-count {
    font-size: 13px !important;
  }

  body.woocommerce-shop ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.woocommerce-shop ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product,
  body.post-type-archive-product ul.products li.product {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center !important;
    padding: 12px !important;
  }

  body.woocommerce-shop ul.products li.product a.woocommerce-LoopProduct-link,
  body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
  body.tax-product_tag ul.products li.product a.woocommerce-LoopProduct-link,
  body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
    display: contents !important;
  }

  body.woocommerce-shop ul.products li.product img,
  body.tax-product_cat ul.products li.product img,
  body.tax-product_tag ul.products li.product img,
  body.post-type-archive-product ul.products li.product img {
    grid-column: 1 !important;
    grid-row: 1 / span 5 !important;
    width: 112px !important;
    height: 112px !important;
    margin: 0 !important;
    padding: 10px !important;
  }

  body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.woocommerce-shop ul.products li.product .price,
  body.tax-product_cat ul.products li.product .price,
  body.tax-product_tag ul.products li.product .price,
  body.post-type-archive-product ul.products li.product .price,
  body.woocommerce-shop ul.products li.product .star-rating,
  body.tax-product_cat ul.products li.product .star-rating,
  body.tax-product_tag ul.products li.product .star-rating,
  body.post-type-archive-product ul.products li.product .star-rating,
  body.woocommerce-shop ul.products li.product .ta-loop-proof,
  body.tax-product_cat ul.products li.product .ta-loop-proof,
  body.tax-product_tag ul.products li.product .ta-loop-proof,
  body.post-type-archive-product ul.products li.product .ta-loop-proof {
    grid-column: 2 !important;
  }

  body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    font-size: 17px !important;
  }

  body.woocommerce-shop ul.products li.product .button,
  body.tax-product_cat ul.products li.product .button,
  body.tax-product_tag ul.products li.product .button,
  body.post-type-archive-product ul.products li.product .button {
    grid-column: 2 !important;
    min-height: 40px !important;
    margin-top: 0 !important;
  }
}
