/* public/home-products-tabs/home-products-tabs.css */

.home-products-tabs {
box-sizing: border-box;
width: 100%;
margin: 0 auto;
}

.home-products-tabs__input {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
border: 0;
white-space: nowrap;
}

.home-products-tabs__nav {
display: flex;
align-items: stretch;
justify-content: center;
gap: 20px;
margin: 20px auto;
}

.home-products-tabs__tab {
color: #ffffff70;
cursor: pointer;
user-select: none;
transition: 0.18s ease;
text-decoration: double;
}

.home-products-tabs__tab:hover {
color: #fff;
}

#homeProductsTabLatest:checked ~ .home-products-tabs__nav .home-products-tabs__tab--latest,
#homeProductsTabPopular:checked ~ .home-products-tabs__nav .home-products-tabs__tab--popular,
#homeProductsTabMyFavorites:checked ~ .home-products-tabs__nav .home-products-tabs__tab--my-favorites,
#homeProductsTabMostFavorited:checked ~ .home-products-tabs__nav .home-products-tabs__tab--most-favorited {
color: #fff;
border-bottom: 3px solid #72cb93;
}

#homeProductsTabLatest:focus-visible ~ .home-products-tabs__nav .home-products-tabs__tab--latest,
#homeProductsTabPopular:focus-visible ~ .home-products-tabs__nav .home-products-tabs__tab--popular,
#homeProductsTabMyFavorites:focus-visible ~ .home-products-tabs__nav .home-products-tabs__tab--my-favorites,
#homeProductsTabMostFavorited:focus-visible ~ .home-products-tabs__nav .home-products-tabs__tab--most-favorited {
outline: 3px solid #26becf;
outline-offset: 3px;
}

.home-products-tabs__panel {
box-sizing: border-box;
width: 100%;
}

.home-products-tabs__panel--popular, .home-products-tabs__panel--my-favorites, .home-products-tabs__panel--most-favorited {
display: none;
}

#homeProductsTabPopular:checked ~ .home-products-tabs__panels .home-products-tabs__panel--latest,
#homeProductsTabMyFavorites:checked ~ .home-products-tabs__panels .home-products-tabs__panel--latest,
#homeProductsTabMostFavorited:checked ~ .home-products-tabs__panels .home-products-tabs__panel--latest {
display: none;
}

#homeProductsTabPopular:checked ~ .home-products-tabs__panels .home-products-tabs__panel--popular,
#homeProductsTabMyFavorites:checked ~ .home-products-tabs__panels .home-products-tabs__panel--my-favorites,
#homeProductsTabMostFavorited:checked ~ .home-products-tabs__panels .home-products-tabs__panel--most-favorited {
display: block;
}

.home-popular-products__list {
box-sizing: border-box;
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
gap: 10px;
margin: 0 0 30px;
padding: 0;
}

.home-popular-product {
min-width: 0;
}

.home-popular-product__link {
box-sizing: border-box;
display: flex;
align-items: center;
gap: 0px;
background: #313337;
color: #fff;
text-decoration: none;
transition: 0.18s ease;
flex-direction: column;
border-radius: 14px;
overflow: hidden;
}

.home-popular-product__link:hover {
transform: translateY(-2px);
background: linear-gradient(135deg, #747c91f5, #373b48fa);
}

.home-popular-product__link:focus-visible {
outline: 3px solid #26becf;
outline-offset: 2px;
}

.home-popular-product__image {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
width: stretch;
aspect-ratio: 460 / 660;
object-fit: cover;
}

.home-popular-product__body {
width: stretch;
display: flex;
flex-direction: column;
gap: 7px;
padding: 10px;
}

.home-popular-product__name, .home-popular-product__price {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.home-popular-product__name {
font-size: 15px;
font-weight: 600;
line-height: 1.2;
}

.home-popular-product__price {
color: #dbe7ff;
font-size: 13px;
font-weight: 500;
line-height: 1.2;
}

.home-popular-products__empty {
grid-column: 1 / -1;
box-sizing: border-box;
min-height: 86px;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
border: 1px dashed #ffffff2e;
border-radius: 18px;
background: #1b1f2859;
color: #ffffffad;
font-size: 14px;
text-align: center;
}


@media (max-width: 660px) {
.home-popular-products__list {grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));}
}


@media (max-width: 334px) {
.home-popular-products__list {grid-template-columns: repeat(auto-fill, minmax(139px, 1fr));}
}


/* Дополнительные вкладки: личное избранное и самые добавляемые в избранное. */
.home-products-tabs__tab {
white-space: nowrap;
}

.home-my-favorite-products__list, .home-most-favorited-products__list {
box-sizing: border-box;
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
gap: 10px;
margin: 0 0 30px;
padding: 0;
}

.home-my-favorite-product, .home-most-favorited-product {
min-width: 0;
}

.home-my-favorite-product__link, .home-most-favorited-product__link {
box-sizing: border-box;
display: flex;
align-items: center;
gap: 0px;
background: #313337;
color: #fff;
text-decoration: none;
transition: 0.18s ease;
flex-direction: column;
border-radius: 14px;
overflow: hidden;
}

.home-my-favorite-product__link:hover, .home-most-favorited-product__link:hover {
transform: translateY(-2px);
background: linear-gradient(135deg, #747c91f5, #373b48fa);
}

.home-my-favorite-product__link:focus-visible, .home-most-favorited-product__link:focus-visible {
outline: 3px solid #26becf;
outline-offset: 2px;
}

.home-my-favorite-product__image, .home-most-favorited-product__image {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
width: stretch;
aspect-ratio: 460 / 660;
object-fit: cover;
}

.home-my-favorite-product__body, .home-most-favorited-product__body {
width: stretch;
display: flex;
flex-direction: column;
gap: 7px;
padding: 10px;
}

.home-my-favorite-product__name, .home-my-favorite-product__price, .home-most-favorited-product__name, .home-most-favorited-product__price {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.home-my-favorite-product__name, .home-most-favorited-product__name {
font-size: 15px;
font-weight: 600;
line-height: 1.2;
}

.home-my-favorite-product__price, .home-most-favorited-product__price {
color: #dbe7ff;
font-size: 13px;
font-weight: 500;
line-height: 1.2;
}

.home-my-favorite-products__empty, .home-most-favorited-products__empty {
grid-column: 1 / -1;
box-sizing: border-box;
min-height: 128px;
display: flex;
align-items: center;
justify-content: center;
gap: 16px;
padding: 18px;
color: #ffffffad;
font-size: 14px;
text-align: left;
}

.home-my-favorite-products__empty-image {
object-fit: contain;
flex: 0 0 auto;
}

.home-my-favorite-products__empty-body {
display: flex;
flex-direction: column;
gap: 6px;
max-width: 420px;
}

.home-my-favorite-products__empty-body strong {
color: #fff;
font-size: 16px;
line-height: 1.25;
}

.home-my-favorite-products__empty-body span {
color: #ffffffad;
font-size: 14px;
line-height: 1.35;
}


/* Глобальные результаты поиска товаров на главной. */
.home-product-search-results {
box-sizing: border-box;
width: 100%;
margin: 20px auto 30px;
}

.home-product-search-results[hidden] {
display: none !important;
}

.home-product-search-results__header {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto;
text-align: center;
}

.home-product-search-results__title {
margin: 0;
color: #fff;
font-size: 18px;
font-weight: 700;
line-height: 1.25;
}

.home-product-search-results__list {
box-sizing: border-box;
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
gap: 10px;
margin: 0 0 30px;
padding: 0;
}

.home-product-search-results__empty {
grid-column: 1 / -1;
box-sizing: border-box;
min-height: 86px;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
border: 1px dashed #ffffff2e;
border-radius: 18px;
background: #1b1f2859;
color: #ffffffad;
font-size: 14px;
text-align: center;
}

@media (max-width: 660px) {
.home-products-tabs__nav {
justify-content: flex-start;
overflow-x: auto;
overflow-y: hidden;
max-width: 100%;
padding: 0 10px 8px;
scroll-snap-type: x proximity;
-webkit-overflow-scrolling: touch;
}

.home-products-tabs__nav::-webkit-scrollbar {
height: 0;
}

.home-products-tabs__tab {
flex: 0 0 auto;
scroll-snap-align: start;
}

.home-my-favorite-products__list, .home-most-favorited-products__list {
grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
}

.home-product-search-results__list {
grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
}

.home-product-search-results__header {
justify-content: flex-start;
padding: 0 10px;
text-align: left;
}

.home-my-favorite-products__empty {
flex-direction: column;
text-align: center;
}
}

@media (max-width: 334px) {
.home-my-favorite-products__list, .home-most-favorited-products__list {
grid-template-columns: repeat(auto-fill, minmax(139px, 1fr));
}

.home-product-search-results__list {
grid-template-columns: repeat(auto-fill, minmax(139px, 1fr));
}
}
