/* ======= Root Vars (Mobile Default) ======= */
:root {
  --card-width: 190px;
  --card-height: 330px;
  --image-height: 220px;
  --border-color: #e0e0e0;
  --card-gap: 0px;
}

/* ======= Grid Container ======= */
.product-card-grid,
.product-listing-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
  padding: 0;
  justify-items: center;
}

/* ======= Product Card ======= */
.product-card,
.sh-product-card {
  background: #fff;
  width: var(--card-width);
  height: var(--card-height);
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 1px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.product-card:hover,
.sh-product-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* ======= Image Container ======= */
.product-card-image-container {
  width: 100%;
  height: var(--image-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ======= Product Image ======= */
.product-card-image,
.pr-long-card .pr-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -o-object-fit: cover;
  object-position: center;
  display: block;
  box-sizing: border-box;
  border-radius: 4px 4px 0 0;
  transition-duration: 450ms;
  aspect-ratio: var(--pr-image-aspect-ratio, 3 / 4);
}

/* ======= Product Info ======= */
.product-card-info {
  padding: 8px 6px 0;
  text-align: center;
  font-size: 12px;
  flex-grow: 1;
  overflow: hidden;
  word-break: break-word;
  min-height: 60px;
}

.product-card-info h2,
.product-card-info .product-title {
  font-size: 8px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.product-card-info .price {
  font-size: 20px;
  color: #388e3c;
  font-weight: 900;
  margin-top: 7px;
}

/* ======= Wishlist Button ======= */
.product-card .wishlist-button,
.product-card .wishlist-icon,
.product-card .wishlist-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  background: white;
  border-radius: 50%;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
  z-index: 10;
  pointer-events: auto;
  transition: transform 0.2s ease;
}

.product-card .wishlist-button:hover {
  transform: scale(1.1);
}

/* ======= Shoopy Category Card Styling ======= */
.sh-category-card > a > div {
  padding: 6px !important;
  border: 1px solid #E5E5E5 !important;
  border-radius: 8px !important;
  transition: 0.2s ease;
}

.sh-category-card > a > div:hover {
  border: 1px solid #29A56C !important;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}

.sh-category-card:nth-child(3n-2) > a > div {
  background-color: #ECFFEC !important;
}

.sh-category-card:nth-child(3n-1) > a > div {
  background-color: #FFFCEB !important;
}

.sh-category-card:nth-child(3n) > a > div {
  background-color: #FEEFEA !important;
}

.sh-category-card > a > div > p {
  line-height: 24px;
  font-size: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 48px;
}

@media only screen and (max-width: 600px) {
  .sh-category-card > a > div > p {
    line-height: 20px;
    font-size: 14px;
    min-height: 40px;
  }
}

/* ======= Custom Card Padding ======= */
.pr-long-card {
  padding: 0;
}

.pr-card-content {
  padding: 4px 8px;
}

/* ======= Tablet (≥600px) ======= */
@media (min-width: 600px) {
  :root {
    --card-width: 190px;
    --card-height: 300px;
    --image-height: 180px;
    --card-gap: 10px;
  }

  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px;
  }

  .product-card-info {
    font-size: 13px;
  }

  .product-card-info h3 {
    font-size: 13px;
  }

  .product-card-info .price {
    font-size: 14px;
  }

  .product-card .wishlist-button {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

/* ======= Desktop (≥768px) ======= */
@media (min-width: 768px) {
  :root {
    --card-width: 399px;
    --card-height: 510px;
    --image-height: 399px;
    --card-gap: 3px;
  }

  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(4, 1fr);
    padding: 12px;
  }

  .product-card-info {
    font-size: 13px;
  }

  .product-card-info h3 {
    font-size: 16px;
    font-weight: 700;
  }

  .product-card-price {
    font-size: 16px;
    font-weight: 700;
  }

  .product-card .wishlist-button {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

/* ======= Shoopy Overrides & Chat Button Fix ======= */
.sh-shoopy-html-page > div,
.sh-shoopy-html-page .border-inherit {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  border: none !important;
}

.sh-shoopy-html-page .text-zinc-900,
.ref-widg.sh-referral-widget {
  display: none !important;
}

.sh-shoopy-blog-page .border-inherit {
  border: none;
}

/* ======= Chatwoot Button Fix ======= */
.woot-widget-bubble {
  position: fixed !important;
  bottom: 64px !important;
  right: 16px !important;
  z-index: 999999 !important;
}

@media (max-width: 768px) {
  .woot-widget-holder {
    width: 80% !important;
    height: 60vh !important;
    bottom: 10px !important;
    right: 10px !important;
    transform: translateY(45%) !important;
  }
}

.woot-widget-powered-by {
  display: none !important;
}

/* ======= Banner Full Width Fix ======= */
.banner.page-container,
.banner-collection.page-container {
  max-width: none;
  width: 100%;
}

/* ======= Header Flex Fix for Mobile ======= */
@media (max-width: 767px) {
  .main-header {
    justify-content: space-between;
  }
}
