/**
 * Astra Hook Theme — Shop Grid & Product Cards
 */

/* ─── ডিফল্ট পেজিনেশন হাইড (ইনফিনিট মোডে) ──────────────────────────────── */
.ah-pagination-container[data-mode="infinite"] ~ .woocommerce-pagination,
.ah-pagination-container[data-mode="infinite"] + nav.woocommerce-pagination {
  display: none !important;
}

/* ─── শপ ও ক্যাটাগরি পেজের ডিফল্ট ড্রপডাউন ও বড় টাইটেল হাইড ──────────── */
.woocommerce-products-header,
.woocommerce-products-header__title.page-title,
.woocommerce-result-count,
.woocommerce-ordering {
  display: none !important;
}

/* ─── shovaas.com স্টাইল সেকশন হেডার (All Products + See More) ──────── */
.ah-shovaas-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 0 6px !important;
  margin-bottom: 8px !important;
}

.ah-shovaas-header .ah-shop-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #1e272e !important;
  margin: 0 !important;
}

.ah-title-orange {
  color: var(--ah-primary, #ff5722) !important;
}

.ah-see-more-btn {
  display: inline-block !important;
  padding: 6px 14px !important;
  border: 1.5px solid #27ae60 !important;
  border-radius: 6px !important;
  color: #27ae60 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
}

.ah-see-more-btn:hover {
  background: #27ae60 !important;
  color: #ffffff !important;
}

/* ─── প্রোডাক্ট গ্রিড (২-কলাম মোবাইল ফার্স্ট) ────────────────────────── */
ul.products,
#ah-products-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

ul.products::before,
ul.products::after {
  display: none !important;
}

/* ─── প্রোডাক্ট কার্ড (shovaas.com exact look) ───────────────────────── */
ul.products li.product,
#ah-products-grid li.product {
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 1px solid #eef0f3 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  position: relative;
}

ul.products li.product:hover,
#ah-products-grid li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
}

/* প্রোডাক্ট ইমেজ */
ul.products li.product a.woocommerce-loop-product__link {
  display: block;
  text-decoration: none;
  background: #fdfdfd;
}

ul.products li.product a img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  margin: 0 !important;
}

/* ─── অটোমেটিক পারসেন্টেজ ডিসকাউন্ট ব্যাজ (-21%, -13%) ──────────────── */
.onsale.ah-discount-tag,
ul.products li.product .onsale {
  background: #ff4757 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 7px !important;
  min-width: auto !important;
  min-height: auto !important;
  line-height: 1 !important;
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  right: auto !important;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.3) !important;
  z-index: 2;
}

/* প্রোডাক্ট টাইটেল */
ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #2f3542 !important;
  line-height: 1.35 !important;
  margin: 10px 10px 4px !important;
  padding: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

/* প্রাইস */
ul.products li.product .price {
  padding: 0 10px 10px !important;
  margin: 0 !important;
  font-size: 14px !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* বর্তমান অফার মূল্য (বোল্ড লাল) */
ul.products li.product .price ins,
ul.products li.product .price .woocommerce-Price-amount {
  color: #ff4757 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  text-decoration: none !important;
}

/* আগের মূল মূল্য (কাটা ধূসর) */
ul.products li.product .price del,
ul.products li.product .price del .woocommerce-Price-amount {
  color: #a4b0be !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* ─── '🛍️ অর্ডার করুন' বাটন (shovaas.com exact bright orange) ────────── */
ul.products li.product .ah-loop-order-btn,
ul.products li.product .button,
ul.products li.product a.button,
ul.products li.product .add_to_cart_button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 10px !important;
  background: var(--ah-primary, #ff5722) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 0 10px 10px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background 0.2s ease !important;
  margin-top: auto !important;
}

ul.products li.product .ah-loop-order-btn:hover,
ul.products li.product .button:hover {
  background: #e64a19 !important;
}

/* ─── niorashopping.com স্টাইল পেজিনেশন কার্ড ────────────────────────── */
.ah-niora-card-pagination {
  margin: 25px auto 10px;
  display: flex;
  justify-content: center;
}

.ah-niora-card-pagination .ah-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #eef0f3;
}

.ah-niora-card-pagination .ah-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #eef0f3;
  color: #2f3542;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ah-niora-card-pagination .ah-page-btn:hover {
  border-color: var(--ah-primary, #ff5722);
  color: var(--ah-primary, #ff5722);
}

.ah-niora-card-pagination .ah-page-btn.ah-page-active {
  background: var(--ah-primary, #ff5722);
  color: #ffffff;
  border-color: var(--ah-primary, #ff5722);
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.35);
}

/* ─── ইনফিনিট স্ক্রোল লোডার ───────────────────────────────────────────── */
.ah-scroll-trigger {
  height: 1px;
  visibility: hidden;
}

.ah-loading-indicator {
  text-align: center;
  padding: 25px 0;
}

.ah-dots {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 6px;
}

.ah-dots span {
  width: 10px;
  height: 10px;
  background: var(--ah-primary, #ff5722);
  border-radius: 50%;
  animation: ah-bounce 0.8s ease-in-out infinite;
}

.ah-dots span:nth-child(1) { animation-delay: 0s; }
.ah-dots span:nth-child(2) { animation-delay: 0.15s; }
.ah-dots span:nth-child(3) { animation-delay: 0.30s; }

@keyframes ah-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.ah-loading-msg {
  font-size: 13px;
  color: var(--ah-text-muted);
  margin: 0;
}

.ah-finished-indicator {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--ah-text-muted);
}

.ah-finished-indicator span {
  display: inline-block;
  padding: 6px 16px;
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: 20px;
}

/* ─── ডেস্কটপ গ্রিড ব্রেকপয়েন্ট ───────────────────────────────────────── */
@media (min-width: 768px) {
  ul.products, #ah-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
  }
}

@media (min-width: 1024px) {
  ul.products, #ah-products-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px !important;
  }
}
