/* V24 card parity on inner pages.
 * Reference: #tl-home-shell .products-grid .product-card in home.css.
 * Kept separate from legacy .product-thumb so the homepage design is unchanged.
 */
.products.row,
.product-carousel.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -6px;
    margin-right: -6px;
}
.products.row::before,
.products.row::after,
.product-carousel.row::before,
.product-carousel.row::after { display: none; }
.products.row > .product-layout,
.product-carousel.row > .product-layout {
    display: flex;
    float: none;
    min-width: 0;
    padding: 0 6px 12px;
    margin: 0;
}
.products.row > .product-layout.product-grid,
.product-carousel.row > .product-layout.product-grid {
    margin: 0;
    z-index: auto;
    box-shadow: none;
    transform: none;
    transition: none;
}
.products.row > .product-layout.product-grid:hover,
.product-carousel.row > .product-layout.product-grid:hover {
    box-shadow: none;
    z-index: auto;
}
/* The old list/grid script can switch the outer Bootstrap class. */
.product-layout > .product-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 7px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.15);
    transition: box-shadow .2s;
}
.product-layout > .product-card:hover { box-shadow: 0 5px 19px rgba(45,28,10,.12); }
.product-layout .product-card .product-photo {
    height: 181px;
    position: relative;
    overflow: hidden;
    background: #f5f4f2;
}
.product-layout .product-card .product-photo-link { display: block; width: 100%; height: 100%; }
.product-layout .product-card .product-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}
.product-layout .product-card .discount {
    position: absolute;
    top: 8px;
    left: 7px;
    z-index: 1;
    color: #fff;
    background: #e51f30;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    padding: 5px 6px;
    line-height: 1;
}
.product-layout .product-card .discount.product-badge--alternate { background: #c59a26; }
.product-layout .product-card .product-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 11px 6px 9px 7px;
}
.product-layout .product-card .product-info h3 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    min-height: 34px;
    max-height: calc(1.3em * 2);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-layout .product-card .product-title-link {
    color: inherit;
    font-size: inherit;
    text-decoration: none;
}
.product-layout .product-card .product-title-link:hover,
.product-layout .product-card .product-title-link:focus-visible { color: #ab7d08; }
.product-layout .product-card .product-info del {
    color: #a7a5a2;
    font-size: 12px;
    display: block;
    white-space: nowrap;
    margin-top: auto;
    margin-bottom: 2px;
}
.product-layout .product-card .product-price-placeholder { visibility: hidden; }
.product-layout .product-card .product-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
}
.product-layout .product-card .product-bottom strong,
.product-layout .product-card .product-bottom strong a {
    color: #d01624;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.3px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.product-layout .product-card .product-bottom strong a:hover { color: #ab7d08; }
/* Optional catalog fields retain original data without reintroducing the legacy layout. */
.product-layout .product-card .product-extras {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.35;
}
.product-layout .product-card .product-cashback {
    padding: 3px 6px;
    border-radius: 4px;
    background: #fff1bd;
    color: #965500;
    font-weight: 700;
}
.product-layout .product-card .product-contact-note { color: #f1592a; }
.product-layout .product-card .product-rating { color: #d4a30f; letter-spacing: 1px; white-space: nowrap; }
@media (min-width: 1500px) {
    .product-layout .product-card .product-photo { height: 189px; }
}
@media (max-width: 1024px) {
    .product-layout .product-card .product-photo { height: 138px; }
    .product-layout .product-card .product-info { padding: 9px 5px; }
}
@media (max-width: 768px) {
    .product-layout .product-card .product-photo { height: 193px; }
}
@media (max-width: 620px) {
    .product-layout .product-card .product-photo { height: 180px; }
    .product-layout .product-card .product-bottom strong,
    .product-layout .product-card .product-bottom strong a { font-size: 16px; }
}
@media (max-width: 420px) {
    .products.row, .product-carousel.row { margin-left: -4px; margin-right: -4px; }
    .products.row > .product-layout, .product-carousel.row > .product-layout { padding: 0 4px 8px; }
    .product-layout .product-card .product-photo { height: 145px; }
    .product-layout .product-card .product-info { padding: 7px 5px; }
    .product-layout .product-card .product-info h3 { font-size: 12px; min-height: 29px; }
    .product-layout .product-card .product-bottom strong,
    .product-layout .product-card .product-bottom strong a { font-size: 14px; }
}
@media (max-width: 375px) {
    .product-layout .product-card .product-photo { height: 127px; }
}

/* Product cards: automatic 1:1 photos, replacing fixed heights at breakpoints. */
.product-layout .product-card .product-photo {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.product-layout .product-card .product-photo > .product-photo-link {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.product-layout .product-card .product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
