/* Homepage-only popular product styles; Django app static, no Gulp needed. */
.home__row_popular-products {
    padding: 56px 0 72px;
    background: #f4f4f2;
}
.home-popular__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px 28px;
    margin-bottom: 25px;
}
.home-popular__title {
    margin: 0;
    color: #0d0d0d;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 400;
}
.home-popular__tabs {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid #d4d4d4;
}
.home-popular__tab {
    box-sizing: border-box;
    margin: 0 0 -1px;
    padding: 10px 2px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
    color: #4a4a4a;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}
.home-popular__tab:not(:disabled):hover,
.home-popular__tab[aria-selected="true"] {
    color: #0d0d0d;
    border-bottom-color: #f5a800;
}
.home-popular__tab[aria-selected="true"] { font-weight: 600; }
.home-popular__tab:disabled { opacity: .45; cursor: default; }
.home-popular__tab:focus-visible { outline: 2px solid #f5a800; outline-offset: 3px; }
.home-popular__panel[hidden] { display: none; }
.home-popular__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.home-popular__item { min-width: 0; }
/* The global product-cards-height-fix.js writes inline height:0px to cards
   in the initially hidden tab. Let the homepage grid size from real content. */
.home-popular__item .product-card {
    height: auto !important;
}
.home-popular__item .product-card__inner {
    height: auto;
}

/* Catalogue-style hover panel: float over the next grid row rather than
   increasing the height of the current row. Keep the white panel opaque. */
.home-popular__item .product-card__footer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 3;
    box-sizing: border-box;
    margin-top: 0;
    padding: 16px 16px 20px;
    background: #fff;
    border-top: 1px solid #eaedf0;
    box-shadow: 0 15px 18px rgba(40, 67, 100, .33);
}

@media (max-width: 768px) {
    .home__row_popular-products { padding: 40px 0 52px; }
    .home-popular__header { display: block; margin-bottom: 18px; }
    .home-popular__title { font-size: 28px; margin-bottom: 18px; }
    .home-popular__tabs { gap: 12px; flex-wrap: nowrap; }
    .home-popular__tab { min-width: 0; flex: 1; font-size: 13px; padding: 10px 0; }
    .home-popular__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
