/**
 * Store-style product rows — Nykaa-like compact cards, hover actions, variable columns
 */

.page-home .home-products-showcase {
  margin-bottom: 4px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.page-home .home-products-showcase.home-section-block {
  padding: 10px 0 6px !important;
  margin-bottom: 2px !important;
  max-width: 100% !important;
}
@media (min-width: 1024px) {
  .page-home .home-products-showcase.home-section-block {
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 12px 14px 10px !important;
  }
}

.page-home .home-products-showcase .home-section-head,
.page-home .home-products-showcase .trending-header {
  padding: 0 10px !important;
  margin-bottom: 8px !important;
}
.page-home .home-products-showcase .section-title {
  font-size: 16px !important;
  font-weight: 800 !important;
}
.page-home .home-products-showcase .section-link {
  font-size: 11px !important;
}

/* Track wrapper + scroll arrow */
.home-products-track-wrap {
  position: relative;
}
.home-products-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 10px 8px !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-products-grid::-webkit-scrollbar {
  display: none;
}
.home-products-scroll-btn {
  display: none;
}
@media (min-width: 1024px) {
  .home-products-grid {
    display: grid !important;
    overflow: visible !important;
    padding: 0 2px !important;
    gap: 8px !important;
  }
  .home-products-scroll-btn {
    display: flex;
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: #1a1218;
    font-size: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .home-products-scroll-btn:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.2);
  }
  .home-products-scroll-btn.prev {
    left: -4px;
  }
  .home-products-scroll-btn.next {
    right: -4px;
  }
  .showcase-cols-4 .home-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .showcase-cols-5 .home-products-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .showcase-cols-6 .home-products-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ========== Store product card ========== */
.store-product-card {
  flex: 0 0 34%;
  width: 34%;
  min-width: 118px;
  max-width: 168px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: storeCardIn 0.45s ease backwards;
}
@keyframes storeCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.store-product-card:nth-child(2) {
  animation-delay: 0.04s;
}
.store-product-card:nth-child(3) {
  animation-delay: 0.08s;
}
.store-product-card:nth-child(4) {
  animation-delay: 0.12s;
}
.store-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 18, 24, 0.1);
  border-color: #f5d0dc;
  z-index: 2;
}

@media (min-width: 1024px) {
  .store-product-card {
    flex: unset;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

.store-card-media {
  position: relative;
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}
.store-card-media > a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
}
.store-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.store-product-card:hover .store-card-media img {
  transform: scale(1.04);
}

.store-badge-new {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: #00897b;
  color: #fff;
  text-transform: uppercase;
}
.store-badge-ad {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: #f5f5f5;
  color: #888;
  border: 1px solid #eee;
}
.store-promo-pill {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  max-width: calc(100% - 12px);
  font-size: 7px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  background: #fff;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.store-size-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  font-size: 7px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 3px;
  background: #1a237e;
  color: #fff;
}

/* Hover / touch actions */
.store-card-hover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.88);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .store-product-card:hover .store-card-hover {
    opacity: 1;
    pointer-events: auto;
  }
}
.store-card-hover .btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #f0e8ec;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5c4a52;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.store-card-hover .btn-icon:hover {
  transform: scale(1.08);
  color: #e91e63;
  border-color: #f8bbd0;
}
.store-card-hover .btn-icon.active {
  color: #e91e63;
}
.store-card-hover .btn-row {
  display: flex;
  gap: 8px;
}
.store-card-hover .btn-buy-now,
.store-card-hover .btn-add-cart {
  font-size: 9px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.store-card-hover .btn-add-cart {
  background: #fff;
  color: #e91e63;
  border: 1.5px solid #e91e63;
}
.store-card-hover .btn-buy-now {
  background: linear-gradient(135deg, #e91e63, #ff4081);
  color: #fff;
}
.store-card-hover .btn-add-cart,
.store-card-hover .btn-buy-now {
  width: min(120px, 90%);
}

/* Override older home-sections-v23 grid rules */
.page-home .home-products-showcase .home-products-grid {
  display: flex !important;
  gap: 6px !important;
}
@media (min-width: 1024px) {
  .page-home .home-products-showcase .home-products-grid {
    display: grid !important;
    gap: 8px !important;
  }
}
.page-home .home-products-showcase .product-card-ref .tagline-bar,
.page-home .home-products-showcase .product-card-ref .coupon-pill,
.page-home .home-products-showcase .product-card-ref .ribbon,
.page-home .home-products-showcase .product-card-ref .badge-pill {
  display: none !important;
}

.store-card-info {
  padding: 6px 8px 8px;
}
.store-card-title {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1218;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}
.store-card-title a {
  color: inherit;
  text-decoration: none;
}
.store-card-title a:hover {
  color: #e91e63;
}
.store-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  line-height: 1.2;
}
.store-price {
  font-size: 14px;
  font-weight: 800;
  color: #1a1218;
}
.store-mrp {
  font-size: 11px;
  color: #9e9e9e;
  text-decoration: line-through;
}
.store-off {
  font-size: 11px;
  font-weight: 700;
  color: #2e7d32;
}

/* Mobile: compact + always-visible mini actions */
.store-card-actions-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.store-card-actions-bar button,
.store-card-actions-bar a {
  flex: 1;
  font-size: 8px;
  font-weight: 800;
  padding: 6px 4px;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  line-height: 1.2;
}
.store-card-actions-bar .act-cart {
  background: #fff5f8;
  color: #c2185b;
  border: 1px solid #f8bbd0;
}
.store-card-actions-bar .act-buy {
  background: linear-gradient(135deg, #e91e63, #ff4081);
  color: #fff;
}
.store-card-actions-bar .act-wish {
  flex: 0 0 32px;
  padding: 6px;
  background: #fafafa;
  border: 1px solid #eee;
  color: #888;
}
.store-card-actions-bar .act-wish.active {
  color: #e91e63;
  border-color: #f8bbd0;
}

@media (min-width: 1024px) {
  .store-card-actions-bar {
    display: none;
  }
  .store-card-title {
    font-size: 12px;
    min-height: 32px;
  }
  .store-price {
    font-size: 15px;
  }
}

@media (max-width: 1023px) {
  .store-card-hover {
    display: none;
  }
  .store-product-card {
    flex: 0 0 32%;
    width: 32%;
    min-width: 108px;
    max-width: 140px;
  }
  .store-card-info {
    padding: 5px 6px 6px;
  }
  .store-card-title {
    font-size: 10px;
    min-height: 26px;
    margin-bottom: 4px;
  }
  .store-price {
    font-size: 12px;
  }
  .store-mrp,
  .store-off {
    font-size: 9px;
  }
  .store-promo-pill {
    font-size: 6px;
    padding: 2px 5px;
  }
}

/* Hide old premium card chrome inside showcase */
.page-home .home-products-showcase .product-card-premium:not(.store-product-card) {
  display: none;
}


/* v2 — Blinkit-style readability; whole title block is link */
.store-card-media > a.store-card-media-link {
  display: block !important;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
}
.store-product-card { min-width: 132px; max-width: 188px; }
.store-card-info { padding: 8px 10px 10px; }
.store-card-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  min-height: 36px !important;
  -webkit-line-clamp: 2;
}
.store-price { font-size: 16px !important; }
.store-mrp { font-size: 12px !important; }
.store-off { font-size: 12px !important; font-weight: 800 !important; }
.store-badge-new { font-size: 9px !important; padding: 3px 7px !important; }
.store-card-actions-bar button { font-size: 10px !important; padding: 8px 6px !important; }
.store-card-hover .btn-add-cart,
.store-card-hover .btn-buy-now { font-size: 10px !important; }
@media (max-width: 1023px) {
  .store-product-card { flex: 0 0 38% !important; width: 38% !important; min-width: 132px !important; max-width: 200px !important; }
}
@keyframes storeBuyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.32); transform: scale(1); }
  50% { box-shadow: 0 0 0 5px rgba(233, 30, 99, 0); transform: scale(1.02); }
}
@media (max-width: 1023px) {
  .store-card-actions-bar .act-buy {
    animation: storeBuyPulse 2.5s ease-in-out infinite;
  }
  .store-card-actions-bar .act-cart {
    border-width: 1.5px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
  }
}
/* page-home-whole-card-tap — Best Sellers only: large tap zone; Trending/New use stacked card in markup */
@media (max-width: 1023px) {
  .page-home .section-bestsellers .store-product-card {
    cursor: pointer;
  }
  .page-home .section-bestsellers .store-product-card .store-card-main-link {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 50px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: auto;
    text-decoration: none;
  }
  .page-home .section-bestsellers .store-product-card .store-card-info {
    position: relative;
    width: 100%;
    background: #fff;
    padding: 8px 8px 6px !important;
    border-top: 1px solid rgba(240, 232, 236, 0.95);
    box-sizing: border-box;
    pointer-events: auto;
  }
  .page-home .section-bestsellers .store-product-card .store-card-actions-bar {
    position: relative;
    z-index: 5;
    gap: 5px !important;
    margin-top: 4px !important;
    padding: 0 4px 4px !important;
  }
  .page-home .section-bestsellers .store-product-card .store-card-actions-bar .act-wish {
    flex: 0 0 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border: 1px solid #e8d5dc !important;
    color: #9e8e94 !important;
    box-shadow: none !important;
  }
  .page-home .section-bestsellers .store-product-card .store-card-actions-bar .act-cart,
  .page-home .section-bestsellers .store-product-card .store-card-actions-bar .act-buy {
    font-size: 9px !important;
    padding: 7px 4px !important;
    border-radius: 7px !important;
  }
}

/* Trending + New Arrivals — mobile: full image block, name/price below (stacked link card) */
@media (max-width: 1023px) {
  .page-home .store-card-layout-stacked.store-product-card {
    display: flex;
    flex-direction: column;
  }
  .page-home .section-trending .home-products-grid > .store-product-card.store-card-layout-stacked,
  .page-home .home-section-new-arrivals .home-products-grid > .store-product-card.store-card-layout-stacked {
    /* ~2.5 cards visible: 2 full + half of next (scroll hint) */
    flex: 0 0 calc((100vw - 42px) / 2.5) !important;
    width: calc((100vw - 42px) / 2.5) !important;
    min-width: 100px !important;
    max-width: none !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-card-title,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-title {
    font-size: 10px !important;
    font-weight: 700 !important;
    min-height: 0 !important;
    margin-bottom: 2px !important;
    -webkit-line-clamp: 2 !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-price,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-price {
    font-size: 12px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-mrp,
  .page-home .section-trending .store-card-layout-stacked .store-off,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-mrp,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-off {
    font-size: 8px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-badge-new,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-badge-new {
    font-size: 7px !important;
    padding: 2px 5px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-card-info,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-info {
    padding: 5px 5px 4px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-card-actions-bar,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-actions-bar {
    gap: 3px !important;
    margin-top: 2px !important;
    padding: 0 3px 3px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-card-actions-bar .act-cart,
  .page-home .section-trending .store-card-layout-stacked .store-card-actions-bar .act-buy,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-actions-bar .act-cart,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-actions-bar .act-buy {
    font-size: 7px !important;
    padding: 5px 2px !important;
    border-radius: 5px !important;
  }
  .page-home .section-trending .store-card-layout-stacked .store-card-actions-bar .act-wish,
  .page-home .home-section-new-arrivals .store-card-layout-stacked .store-card-actions-bar .act-wish {
    flex: 0 0 28px !important;
    min-height: 28px !important;
    font-size: 13px !important;
  }
  .page-home .section-trending .home-products-grid,
  .page-home .home-section-new-arrivals .home-products-grid {
    gap: 6px !important;
  }
  .page-home .store-card-layout-stacked .store-card-stacked-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1 1 auto;
    min-height: 0;
  }
  .page-home .store-card-layout-stacked .store-card-media {
    flex: 0 0 auto;
  }
  .page-home .store-card-layout-stacked .store-card-info {
    flex: 0 0 auto;
    padding: 8px 8px 6px !important;
    background: #fff;
    border-top: 1px solid rgba(240, 232, 236, 0.95);
  }
  .page-home .store-card-layout-stacked .store-card-media img {
    object-fit: contain;
  }
}
/* v29 — premium Add to Cart + Best Sellers stacked + app-like mobile */
.store-card-actions-premium {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 8px;
  margin-top: 0;
}
.store-card-actions-premium .act-wish {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
  border: 1.5px solid #f0e0e6;
  background: #fff;
  color: #9a8a92;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.store-card-actions-premium .act-wish.active {
  color: #e91e63;
  border-color: #f8bbd0;
  background: #fff5f8;
}
.store-card-actions-premium .act-add-cart-main {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e91e63 0%, #ff4081 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-card-actions-premium .act-add-cart-main:active {
  transform: scale(0.98);
}
.store-card-actions-premium .act-add-cart-main svg {
  flex-shrink: 0;
}
.store-card-actions-premium .act-buy {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid #e91e63;
  background: #fff;
  color: #c2185b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.page-home .store-card-layout-stacked .store-card-media {
  background: linear-gradient(180deg, #fff9fc 0%, #fafafa 100%);
}
.page-home .store-card-layout-stacked .store-card-media img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}
@media (max-width: 1023px) {
  .page-home .home-products-grid {
    padding: 0 12px 10px !important;
    gap: 8px !important;
    scroll-padding-left: 12px;
  }
  .page-home .home-products-showcase .section-title {
    font-size: 17px !important;
  }
  .store-card-actions-premium .act-add-cart-main span {
    font-size: 11px;
  }
}
/* v30 — desktop: 5 per row, minimal gap, full-width cards */
@media (min-width: 1024px) {
  .page-home .home-products-showcase.home-section-block {
    max-width: 100% !important;
    padding: 10px 8px 12px !important;
  }
  .page-home .home-products-showcase .home-section-head,
  .page-home .home-products-showcase .trending-header {
    padding: 0 8px !important;
    margin-bottom: 8px !important;
  }
  .page-home .home-products-showcase .home-products-grid,
  .page-home .home-products-showcase.showcase-cols-4 .home-products-grid,
  .page-home .home-products-showcase.showcase-cols-5 .home-products-grid,
  .page-home .home-products-showcase.showcase-cols-6 .home-products-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .page-home .home-products-showcase .store-product-card,
  .page-home .home-products-showcase .store-product-card.store-card-layout-stacked {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: unset !important;
    border-radius: 0 !important;
    border: none !important;
    border-right: 1px solid #ece8ea !important;
    box-shadow: none !important;
  }
  .page-home .home-products-showcase .home-products-grid > .store-product-card:last-child {
    border-right: none !important;
  }
  .page-home .home-products-showcase .store-card-layout-stacked {
    border-radius: 0 !important;
  }
  .page-home .home-products-showcase .store-card-media {
    aspect-ratio: 1;
  }
  .page-home .home-products-showcase .store-card-title {
    font-size: 12px !important;
    min-height: 32px !important;
  }
  .page-home .home-products-showcase .store-price {
    font-size: 15px !important;
  }
  .page-home .home-products-showcase .store-card-actions-premium {
    padding: 0 6px 8px !important;
    gap: 4px !important;
  }
  .page-home .home-products-showcase .store-card-actions-premium .act-wish {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
  .page-home .home-products-showcase .store-card-actions-premium .act-add-cart-main {
    min-height: 36px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
  }
  .page-home .home-products-showcase .store-card-actions-premium .act-add-cart-main span {
    font-size: 10px !important;
  }
  .page-home .home-products-track-wrap .home-products-scroll-btn {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .page-home .section-bestsellers .store-card-layout-stacked,
  .page-home .section-trending .store-card-layout-stacked,
  .page-home .home-section-new-arrivals .store-card-layout-stacked {
    flex: 0 0 calc((100vw - 28px) / 2.4) !important;
    width: calc((100vw - 28px) / 2.4) !important;
    min-width: 0 !important;
    max-width: none !important;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(26, 18, 24, 0.06);
  }
  .page-home .home-products-grid {
    gap: 4px !important;
    padding: 0 8px 8px !important;
  }
}