/* ==========================================================
   PRODUCT CARD
   ========================================================== */
.ab-pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ab-line);
  list-style: none;
  transition: box-shadow 0.3s var(--ab-ease), transform 0.3s var(--ab-ease);
}
.ab-pcard:hover { box-shadow: 0 16px 34px rgba(11, 31, 25, 0.1); transform: translateY(-3px); }

.ab-pcard__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 40%, #fff 0, var(--ab-cream) 100%);
  overflow: hidden;
}
.ab-pcard__img { display: block; width: 100%; height: 100%; }
.ab-pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ab-ease); }
.ab-pcard:hover .ab-pcard__img img { transform: scale(1.06); }

.ab-pcard__badges { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ab-badge--gold { background: linear-gradient(135deg, var(--ab-gold-light), var(--ab-gold)); color: var(--ab-ink); font-weight: 600; }

.ab-pcard__body { display: flex; flex-direction: column; flex: 1; padding: 11px 10px 10px; }

/* 1. Title: chhota, fixed 2 line */
.ab-pcard__title {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.22;
  height: 2.44em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ab-pcard__title a:hover { color: var(--ab-gold-dark); }

/* 2. Rating: yellow ya gray */
.ab-rate { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; color: #8d8b7e; line-height: 1; }
.ab-rate__stars { --on: #f2a900; --off: #d9d6ca; font-size: 13px; letter-spacing: 1px; line-height: 1; }
.ab-rate__stars::before {
  content: "★★★★★";
  background: linear-gradient(90deg, var(--on) var(--p, 0%), var(--off) var(--p, 0%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ab-rate.has-rating .ab-rate__txt { color: var(--ab-text); font-weight: 500; }
.ab-rate a.ab-rate__txt:hover { color: var(--ab-gold-dark); }

/* 3. Size chips: jab empty ho to 0 space lega */
.ab-sizes { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; margin-bottom: 8px; }
.ab-sizes:empty { display: none !important; margin: 0 !important; min-height: 0 !important; }

.ab-size {
  min-width: 40px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid #cdbf9d;
  background: #fff;
  color: var(--ab-green);
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.2s var(--ab-ease);
}
.ab-size:hover:not(:disabled) { border-color: var(--ab-gold); background: var(--ab-ivory); }
.ab-size.is-active { background: var(--ab-green); border-color: var(--ab-green); color: var(--ab-gold-light); }
.ab-size:disabled { border-color: #ece4cf; background: #fff; color: #b3ae9a; cursor: default; }

.is-nudge { animation: ab-shake 0.5s var(--ab-ease); }
.ab-sizes.is-nudge .ab-size:not(:disabled) { border-color: var(--ab-gold); box-shadow: 0 0 0 2px rgba(201, 162, 75, 0.35); }
@keyframes ab-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* 4. Price row: ek line me (sale price, MRP, % off) */
.ab-pr { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; }
.ab-pr[hidden], .ab-pr [hidden] { display: none !important; }
.ab-pr__now { font-size: 18px; font-weight: 700; color: var(--ab-ink); line-height: 1.1; }
.ab-pr__reg { font-size: 11px; font-weight: 400; color: #8b8b82; }
.ab-pr__off {
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--ab-success);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

/* 5. Qty + button (no extra gap above or below) */
.ab-pcard__actions { display: flex; gap: 6px; margin-top: 2px; margin-bottom: 0; }

.ab-qty { display: inline-flex; flex: none; align-items: center; height: 40px; border: 1px solid #cdbf9d; background: #fff; }
.ab-qty button { width: 26px; height: 100%; font-size: 17px; color: var(--ab-green); line-height: 1; }
.ab-qty button:hover { background: var(--ab-ivory); }
.ab-qty__v { min-width: 20px; text-align: center; font-size: 13px; font-weight: 600; }

.ab-pcard__btn {
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: var(--ab-green);
  color: var(--ab-gold-light);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transition: background 0.25s;
}
.ab-pcard__btn:hover { background: var(--ab-ink); }
.ab-pcard__btn.is-loading { opacity: 0.65; pointer-events: none; }
.ab-pcard__btn.is-sold { background: #e4e1d6; color: #8b8b82; cursor: not-allowed; }

.ab-pcard__btn.is-locked .lbl--add,
.ab-pcard__btn:not(.is-locked) .lbl--lock { display: none; }
.t-long { display: none; }

@media (min-width: 480px) {
  .t-long { display: inline; }
  .t-short { display: none; }
}

@media (min-width: 992px) {
  .ab-pcard__body { padding: 14px 14px 12px; }
  .ab-pcard__title { font-size: 17.5px; }
  .ab-size { min-width: 46px; font-size: 12px; padding: 0 10px; }
  .ab-pr { gap: 8px; }
  .ab-pr__now { font-size: 23px; }
  .ab-pr__reg { font-size: 13px; }
  .ab-pr__off { font-size: 11.5px; padding: 3px 8px; }
  .ab-qty button { width: 30px; }
  .ab-pcard__btn { font-size: 11px; letter-spacing: 0.14em; }

  /* Homepage rows: desktop par sirf 4 */
  .ab-products--row > li:nth-child(n + 5) { display: none; }
}

/* Homepage rows + swipe widths */
.ab-products--row.ab-hscroll > .ab-pcard { flex: 0 0 176px; width: 176px !important; }

@media (min-width: 992px) {
  .ab-products--row.ab-hscroll > .ab-pcard { flex: none; width: auto !important; }
}

/* Related / upsell: mobile pe swipe row */
@media (max-width: 991px) {
  .woocommerce .related.products ul.products,
  .woocommerce .upsells.products ul.products {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: calc(var(--ab-gutter) * -1);
    padding-right: var(--ab-gutter);
  }
  .woocommerce .related.products ul.products::-webkit-scrollbar,
  .woocommerce .upsells.products ul.products::-webkit-scrollbar { display: none; }
  .woocommerce .related.products ul.products li.product,
  .woocommerce .upsells.products ul.products li.product { flex: 0 0 176px; width: 176px !important; scroll-snap-align: start; }
}

/* ==========================================================
   USP STRIP: mobile par center
   ========================================================== */
.ab-usp__item {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 16px 6px;
  border-bottom: 1px solid var(--ab-line);
}
.ab-usp__item:nth-child(odd) { border-right: 1px solid var(--ab-line); }
.ab-usp__item:nth-child(n + 3) { border-bottom: 0; }

@media (min-width: 992px) {
  .ab-usp__item {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
    padding: 22px 24px;
    border-bottom: 0;
    border-right: 1px solid var(--ab-line);
  }
}

/* ==========================================================
   HEADER FIXES
   ========================================================== */
@media (min-width: 992px) {
  .ab-nav .ab-menu { flex-wrap: wrap; gap: 4px 26px; }
  .ab-nav .ab-menu > li > a { white-space: nowrap; font-size: 11.5px; letter-spacing: 0.12em; }
}

/* Mobile par admin bar scroll ke saath chali jati hai, isliye header top par rahe */
@media (max-width: 600px) {
  .admin-bar .ab-header { top: 0; }
}
/* ==========================================================
   REMOVE EXTRA BOTTOM SPACE BELOW ADD TO CART BUTTON
   ========================================================== */
.ab-pcard,
ul.products li.product.ab-pcard {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
  align-self: start !important;
}

.ab-pcard__body {
  flex: 0 0 auto !important;
  padding-bottom: 12px !important;
}

.ab-pcard__body > *:last-child,
.ab-pcard__actions {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}