/* VedicMart V2 targeted UI fix, 2026-11-05. Loaded AFTER store.css and phase4.css. */
/* Feature 1: photos fit entirely within a fixed, equal-height product slot. */
.products-grid { align-items: stretch; }
.products-grid .product-card { min-width: 0; height: 100%; }
.products-grid .product-card .product-picture {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  height: 178px;
  min-height: 178px;
  max-height: 178px;
  flex: 0 0 178px;
  aspect-ratio: auto;
  overflow: hidden;
  background: #fbfcfa;
}
.products-grid .product-card .product-picture > img {
  display: block;
  box-sizing: border-box;
  width: calc(100% - 20px);
  max-width: calc(100% - 20px);
  height: calc(100% - 20px);
  max-height: calc(100% - 20px);
  min-width: 0;
  margin: auto;
  padding: 0;
  object-fit: contain;
  object-position: center center;
}
/* Keep offer/discount and wishlist overlays from affecting the photo dimensions. */
.products-grid .product-card .product-picture .discount-ribbon { position: absolute; }
/* Feature 3: Wishlist in the top header. Desktop retains Cart for discoverability;
   on mobile Cart appears ONLY in the existing bottom navigation. */
.header-wishlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #154b2e;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.header-wishlist > svg { width: 22px; height: 22px; flex: none; }
.header-wishlist:hover,
.header-wishlist:focus-visible { color: #00824a; }
.header-wishlist:focus-visible { outline: 2px solid #13864c; outline-offset: 3px; border-radius: 6px; }
@media (min-width:761px) and (max-width:1100px) {
  .products-grid .product-card .product-picture {
    height:164px; min-height:164px; max-height:164px; flex-basis:164px;
  }
}
@media (max-width:760px) {
  .products-grid .product-card .product-picture {
    height:144px; min-height:144px; max-height:144px; flex-basis:144px;
  }
  .products-grid .product-card .product-picture > img {
    width:calc(100% - 14px); max-width:calc(100% - 14px);
    height:calc(100% - 14px); max-height:calc(100% - 14px);
  }
  .site-header .header-cart { display:none; }
  .site-header .header-wishlist {
    margin-left:auto;
    padding: 8px 6px;
    min-width: 38px;
    min-height: 40px;
  }
  .site-header .header-wishlist > span { display:none; }
  .site-header .header-wishlist > svg { width:24px; height:24px; }
  /* Feature 2: stop narrow half-cards from compressing the offer copy. */
  .promo-tiles {
    display:flex;
    gap:12px;
    flex-wrap:nowrap;
    margin: 0;
    padding: 3px 0 12px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-padding-inline:0;
    scroll-snap-type:x mandatory;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
    scrollbar-width:none;
  }
  .promo-tiles::-webkit-scrollbar { display:none; }
  .promo-tiles .promo-tile {
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    flex:0 0 min(360px, calc(100vw - 44px));
    min-width:0;
    min-height:168px;
    padding:17px 17px 16px;
    scroll-snap-align:start;
    scroll-snap-stop:always;
    border-radius:15px;
  }
  .promo-tiles .promo-tile > div {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:7px;
    flex:1 1 auto;
    min-width:0;
    max-width:73%;
  }
  .promo-tiles .promo-tile small {
    font-size:10px;
    line-height:1.3;
    letter-spacing:.055em;
  }
  .promo-tiles .promo-tile h3 {
    margin:0;
    font-size:19px;
    line-height:1.19;
    letter-spacing:-.025em;
    max-width:100%;
    overflow-wrap:break-word;
  }
  .promo-tiles .promo-tile span {
    font-size:10px;
    line-height:1.35;
    padding:6px 9px;
    max-width:100%;
    white-space:normal;
  }
  .promo-tiles .promo-tile > b {
    font-size:42px;
    line-height:1.1;
    flex:0 0 auto;
    max-width:28%;
    white-space:normal;
    text-align:center;
    align-self:flex-end;
    overflow-wrap:anywhere;
  }
}
@media (max-width:360px) {
  .products-grid .product-card .product-picture {
    height:128px; min-height:128px; max-height:128px; flex-basis:128px;
  }
  .promo-tiles .promo-tile { min-height:160px; padding:15px; }
  .promo-tiles .promo-tile h3 { font-size:17px; }
  .promo-tiles .promo-tile > b { font-size:34px; }
}
