/* HiGuppy Shop — product grid aligned with homepage product cards */

body.hg-shop-page-active {
  background: linear-gradient(180deg, #f7fbff 0%, #fff 220px);
  color: #082747;
}

body.hg-shop-page-active .page-heading {
  display: none !important;
}

body.hg-shop-page-active .template-container,
body.hg-shop-page-active .template-content,
body.hg-shop-page-active .page-wrapper,
body.hg-shop-page-active .content-page.container,
body.hg-shop-page-active .content-page > .container,
body.hg-shop-page-active .container.content-page {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.hg-shop-page-active .sidebar-position-left > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.hg-shop-page-active .content.main-products-loop,
body.hg-shop-page-active .main-products-loop[class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  left: auto !important;
  right: auto !important;
}

body.hg-shop-page-active .sidebar-position-left,
body.hg-shop-page-active .sidebar-position-right {
  width: 100% !important;
  max-width: 100% !important;
}

body.hg-shop-page-active .main-products-loop {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

body.hg-shop-page-active .shop-filters-area,
body.hg-shop-page-active .shop-tools,
body.hg-shop-page-active .woocommerce-result-count,
body.hg-shop-page-active .woocommerce-ordering {
  margin-bottom: 16px;
}

body.hg-shop-page-active .shop-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
}

body.hg-shop-page-active .woocommerce-ordering select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #e3ebf7;
  border-radius: 999px;
  background: #fff;
  color: #082747;
  font-size: 14px;
}

/* Product grid — CSS grid with explicit gap */
body.hg-shop-page-active .row.products.products-loop,
body.hg-shop-page-active ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 16px 28px !important;
  width: 100% !important;
  max-width: none !important;
}

body.hg-shop-page-active .row.products.products-loop::before,
body.hg-shop-page-active .row.products.products-loop::after,
body.hg-shop-page-active ul.products::before,
body.hg-shop-page-active ul.products::after {
  display: none !important;
  content: none !important;
}

body.hg-shop-page-active .row.products.products-loop > .product,
body.hg-shop-page-active .row.products.products-loop > li.product,
body.hg-shop-page-active ul.products > li.product,
body.hg-shop-page-active .products-loop > [class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  left: auto !important;
  right: auto !important;
}

body.hg-shop-page-active .row.products.products-loop > .grid-sizer {
  display: none !important;
}

/* Product cards */
body.hg-shop-page-active .products-loop .product,
body.hg-shop-page-active ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  border: 1px solid #e3ebf7 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(8, 39, 71, 0.06) !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.hg-shop-page-active .products-loop .product:hover,
body.hg-shop-page-active ul.products li.product:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 36px rgba(8, 39, 71, 0.1) !important;
}

body.hg-shop-page-active .products-loop .product .product-content,
body.hg-shop-page-active .products-loop .product .product-details,
body.hg-shop-page-active ul.products li.product .product-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  padding: 12px 14px 16px !important;
}

body.hg-shop-page-active .products-loop .product .product-image-wrapper,
body.hg-shop-page-active .products-loop .product .product-element-top,
body.hg-shop-page-active ul.products li.product .product-image-wrapper,
body.hg-shop-page-active ul.products li.product .product-element-top {
  aspect-ratio: 1 / 1 !important;
  background: #eaf6ff !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

body.hg-shop-page-active .products-loop .product img,
body.hg-shop-page-active ul.products li.product img,
body.hg-shop-page-active ul.products li.product .wp-post-image,
body.hg-shop-page-active ul.products li.product .attachment-woocommerce_thumbnail {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
}

body.hg-shop-page-active .products-loop .product .woocommerce-loop-product__title,
body.hg-shop-page-active .products-loop .product .product-title,
body.hg-shop-page-active .products-loop .product h2,
body.hg-shop-page-active ul.products li.product .woocommerce-loop-product__title,
body.hg-shop-page-active ul.products li.product h2 {
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  color: #082747 !important;
}

body.hg-shop-page-active .products-loop .product .posted_in,
body.hg-shop-page-active .products-loop .product .product-categories,
body.hg-shop-page-active ul.products li.product .posted_in {
  margin: 0 0 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff6b4a !important;
}

body.hg-shop-page-active .products-loop .product .price,
body.hg-shop-page-active ul.products li.product .price {
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #1747b8 !important;
}

body.hg-shop-page-active .products-loop .product .button:not(.higuppy-shop-buy-now),
body.hg-shop-page-active .products-loop .product .add_to_cart_button,
body.hg-shop-page-active ul.products li.product .button:not(.higuppy-shop-buy-now),
body.hg-shop-page-active ul.products li.product .add_to_cart_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 0 !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff6b4a, #ff9f3f) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 24px rgba(255, 107, 74, 0.22) !important;
}

body.hg-shop-page-active .higuppy-shop-card-actions .button,
body.hg-shop-page-active .higuppy-shop-card-actions .add_to_cart_button {
  width: 100% !important;
  margin: 0 !important;
  min-height: 28px !important;
  padding: 4px 8px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border: 1.5px solid #ff6b35 !important;
  background: #fff !important;
  color: #ff6b35 !important;
  box-shadow: none !important;
}

body.hg-shop-page-active .higuppy-shop-card-actions .button:hover,
body.hg-shop-page-active .higuppy-shop-card-actions .add_to_cart_button:hover {
  background: #fff6e6 !important;
  color: #e55a2b !important;
  transform: none !important;
  filter: none !important;
}

body.hg-shop-page-active .products-loop .product .higuppy-shop-buy-now,
body.hg-shop-page-active ul.products li.product .higuppy-shop-buy-now,
body.hg-shop-page-active .higuppy-shop-card-cta > .higuppy-shop-buy-now {
  width: 100% !important;
  margin: 0 !important;
  min-height: 28px !important;
  padding: 4px 10px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #1747b8 !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.hg-shop-page-active .products-loop .product .higuppy-shop-buy-now:hover,
body.hg-shop-page-active ul.products li.product .higuppy-shop-buy-now:hover,
body.hg-shop-page-active .higuppy-shop-card-cta > .higuppy-shop-buy-now:hover {
  background: #0e2f86 !important;
  color: #fff !important;
  transform: none !important;
  filter: none !important;
}

body.hg-shop-page-active .products-loop .product .button:hover,
body.hg-shop-page-active ul.products li.product .button:hover {
  transform: none !important;
  filter: brightness(1.03);
  color: #fff !important;
}

/* Sidebar — desktop only; mobile uses filter off-canvas */
@media (min-width: 992px) {
  body.hg-shop-page-active .sidebar-position-left {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 24px !important;
    padding: 0 16px !important;
  }

  body.hg-shop-page-active .sidebar.sidebar-left {
    width: 100% !important;
    max-width: 260px !important;
    padding: 0 !important;
  }
}

@media (max-width: 991px) {
  /* Off-canvas filter panel is handled by higuppy-shop.css + higuppy-shop.js */
  body.hg-shop-page-active:not(.higuppy-shop-filters-open) .sidebar.sidebar-left {
    pointer-events: none;
  }

  body.hg-shop-page-active .row.products.products-loop,
  body.hg-shop-page-active ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 16px !important;
    row-gap: 16px !important;
    padding: 0 8px 24px !important;
  }

  body.hg-shop-page-active .shop-tools {
    padding: 0 8px 10px;
  }

  body.hg-shop-page-active .products-loop .product .woocommerce-loop-product__title,
  body.hg-shop-page-active .products-loop .product h2,
  body.hg-shop-page-active ul.products li.product h2 {
    font-size: 14px !important;
  }

  body.hg-shop-page-active .products-loop .product .price,
  body.hg-shop-page-active ul.products li.product .price {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  body.hg-shop-page-active .row.products.products-loop,
  body.hg-shop-page-active ul.products {
    column-gap: 14px !important;
    row-gap: 14px !important;
    padding: 0 8px 20px !important;
  }

  body.hg-shop-page-active .products-loop .product .product-content,
  body.hg-shop-page-active ul.products li.product .product-content {
    padding: 10px 10px 12px !important;
  }

  body.hg-shop-page-active .products-loop .product .button:not(.higuppy-shop-buy-now),
  body.hg-shop-page-active ul.products li.product .button:not(.higuppy-shop-buy-now) {
    min-height: 40px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 1200px) {
  body.hg-shop-page-active .row.products.products-loop,
  body.hg-shop-page-active ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 0 20px 32px !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body.hg-shop-page-active .row.products.products-loop,
  body.hg-shop-page-active ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Keep compact HiGuppy shop CTA layout from being overridden by older grid rules. */
body.hg-shop-page-active .content-product {
  height: auto !important;
  min-height: 0 !important;
}

body.hg-shop-page-active .product-details {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  padding-bottom: 8px !important;
}

body.hg-shop-page-active .higuppy-shop-card-actions .add_to_cart_button {
  min-width: 76px !important;
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: 8px !important;
  line-height: 1.05 !important;
  background: #fff !important;
  color: #ff6b35 !important;
  border: 1.5px solid #ff6b35 !important;
  box-shadow: none !important;
}

body.hg-shop-page-active .product-details a.higuppy-shop-buy-now,
body.hg-shop-page-active .products-loop .product a.higuppy-shop-buy-now {
  min-height: 26px !important;
  padding: 4px 10px !important;
  background: #1747b8 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.hg-shop-page-active .product-details a.higuppy-shop-buy-now:hover,
body.hg-shop-page-active .products-loop .product a.higuppy-shop-buy-now:hover {
  background: #0e2f86 !important;
  color: #fff !important;
}
