@charset "UTF-8";

/* =========================================================
Khuruz – Highest Discounts (HD PAGE ONLY) v2.0 FINAL (SCOPED)
- Depends on kh-base.css
- Scope: #kh-highest-discounts.kh-hd-page only
- Goals:
  ✅ No clash with coded-homepage.css
  ✅ Kill theme floats/clears that break grid
  ✅ Stable grid across pagination pages
  ✅ Keep price single-line
  ✅ Buttons + pager styles
  ✅ Mobile safe spacing
========================================================= */


/* =========================================================
0) Root scope + safety resets (ONLY this page)
========================================================= */

#kh-highest-discounts.kh-hd-page{
  --kh-header-offset: 78px;  /* sticky header guess */
  --kh-bottom-nav-h: 76px;   /* bottom fixed nav guess */
  padding-bottom: calc(var(--kh-bottom-nav-h) + 16px + env(safe-area-inset-bottom));
}

/* Make sure wrapper doesn’t inherit weird floats/layout */
#kh-highest-discounts.kh-hd-page,
#kh-highest-discounts.kh-hd-page *{
  box-sizing: border-box;
}

/* Kill any theme product floats inside this page area */
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid,
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid *{
  float: none;
  clear: none;
}


/* =========================================================
1) Page container spacing (SCOPED)
========================================================= */

#kh-highest-discounts.kh-hd-page .kh-hd-page-wrap,
#kh-highest-discounts.kh-hd-page .kh-container,
#kh-highest-discounts.kh-hd-page .container{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Mobile safe spacing for sticky header */
@media (max-width: 600px){
  #kh-highest-discounts.kh-hd-page .kh-hd-page-wrap,
  #kh-highest-discounts.kh-hd-page .kh-container,
  #kh-highest-discounts.kh-hd-page .container{
    padding-top: var(--kh-header-offset);
    padding-bottom: calc(var(--kh-bottom-nav-h) + 16px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 320px){
  #kh-highest-discounts.kh-hd-page{ --kh-header-offset: 63px; --kh-bottom-nav-h: 60px; }
}

/* Title + subtitle (supports .kh-title/.kh-sub too) */
#kh-highest-discounts.kh-hd-page .kh-hd-page-title,
#kh-highest-discounts.kh-hd-page .kh-title{
  margin: 22px 0 6px;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 900;
  line-height: 1.15;
}
#kh-highest-discounts.kh-hd-page .kh-hd-page-sub,
#kh-highest-discounts.kh-hd-page .kh-sub{
  margin: 0 0 16px;
  color: #666;
  font-size: 14px;
  line-height: 1.45;
}


/* =========================================================
2) GRID (SCOPED) — HARD STABLE GRID RESET
========================================================= */

/* If your markup uses: .kh-hero-discounts__grid--page */
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid{
  display: grid !important;
  grid-auto-flow: row; /* ✅ dense বাদ: dense দিলে sometimes reorder/gap weird লাগে */
  align-content: start;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));

  list-style: none;
  padding: 0;
  margin: 0;

  align-items: stretch;
}

/* Break theme’s li.product / div.product widths/floats */
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page > *,
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid > *{
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;

  display: flex !important;
  flex-direction: column !important;

  min-width: 0;
  position: relative;
}

/* If theme wraps products as li.product */
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page li,
#kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid li{
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* Responsive columns */
@media (max-width: 1200px){
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px){
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px){
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 320px){
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid--page,
  #kh-highest-discounts.kh-hd-page .kh-hero-discounts__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}


/* =========================================================
3) CARD (SCOPED) — matches your "FINAL" look
========================================================= */

#kh-highest-discounts.kh-hd-page .kh-hdCard{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

/* Image */
#kh-highest-discounts.kh-hd-page .kh-hdCard__img{
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.03);
}
#kh-highest-discounts.kh-hd-page .kh-hdCard__img img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Save badge — black glass */
#kh-highest-discounts.kh-hd-page .kh-hdCard__img .kh-hdCard__save{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  background: rgba(17,17,17,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(6px);

  pointer-events: none;
}

/* Body */
#kh-highest-discounts.kh-hd-page .kh-hdCard__body{
  padding: 8px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

#kh-highest-discounts.kh-hd-page .kh-hdCard__title{
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price — hard single line + kill float weirdness */
#kh-highest-discounts.kh-hd-page .kh-hdCard__price,
#kh-highest-discounts.kh-hd-page .price{
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  min-width: 0;
}

#kh-highest-discounts.kh-hd-page .kh-hdCard__price del,
#kh-highest-discounts.kh-hd-page .price del{
  float: none !important;
  opacity: .55;
  font-weight: 700;
  font-size: 11px;
  margin: 0 !important;
}
#kh-highest-discounts.kh-hd-page .kh-hdCard__price ins,
#kh-highest-discounts.kh-hd-page .price ins{
  float: none !important;
  margin: 0 !important;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}

/* Actions */
#kh-highest-discounts.kh-hd-page .kh-hdCard__actions{
  padding: 0 10px 12px;
  display: flex;
  gap: 10px;
}

#kh-highest-discounts.kh-hd-page .kh-hdCard__actions a{
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.12);
}

#kh-highest-discounts.kh-hd-page .kh-hdCard__actions a.kh-hdBtn--add{
  background: #111;
  color: #fff;
  border-color: #111;
}
#kh-highest-discounts.kh-hd-page .kh-hdCard__actions a.kh-hdBtn--buy{
  background: var(--kh-yellow);
  color: #111;
  border-color: var(--kh-yellow);
}

/* Screen-reader only */
#kh-highest-discounts.kh-hd-page .kh-srOnly{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Disabled */
#kh-highest-discounts.kh-hd-page .kh-hdBtn.is-disabled,
#kh-highest-discounts.kh-hd-page .kh-hdBtn[aria-disabled="true"]{
  opacity: .45;
  pointer-events: none;
}

/* Mobile: compact actions */
@media (max-width: 400px){
  #kh-highest-discounts.kh-hd-page .kh-hdCard__actions{
    padding: 0 6px 10px;
    gap: 6px;
  }
  #kh-highest-discounts.kh-hd-page .kh-hdCard__actions a{
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
    letter-spacing: -0.2px;
  }
}


/* =========================================================
4) Load more (if you use it)
========================================================= */

#kh-highest-discounts.kh-hd-page .kh-hd-loadmoreWrap{ margin:14px 0 10px; }
#kh-highest-discounts.kh-hd-page .kh-hd-loadmoreBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  background:#111;
  color:#fff;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}
#kh-highest-discounts.kh-hd-page .kh-hd-loadmoreBtn:active{ transform: translateY(1px); }
#kh-highest-discounts.kh-hd-page .kh-hd-sentinel{ height:1px; }


/* =========================================================
5) Pager (if you use it)
========================================================= */

#kh-highest-discounts.kh-hd-page .kh-pager{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top:16px;
}
#kh-highest-discounts.kh-hd-page .kh-page{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:40px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  text-decoration:none;
  font-weight:900;
  color:#111;
  background:#fff;
}
#kh-highest-discounts.kh-hd-page .kh-page.is-current{
  background:#111;
  color:#fff;
  border-color:#111;
}


/* =========================================================
6) Hover polish + reduced motion
========================================================= */

@media (hover:hover){
  #kh-highest-discounts.kh-hd-page .kh-hdCard{
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  #kh-highest-discounts.kh-hd-page .kh-hdCard:hover{
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
    border-color: rgba(0,0,0,.16);
  }
  #kh-highest-discounts.kh-hd-page .kh-hdCard__img img{
    transition: transform .18s ease;
  }
  #kh-highest-discounts.kh-hd-page .kh-hdCard:hover .kh-hdCard__img img{
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce){
  #kh-highest-discounts.kh-hd-page .kh-hdCard{
    transition: none;
  }
}
