﻿@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f7f9f8;
    font-family: "PT Sans", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: #000000;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #ffe5e6;
    display: flex;
    justify-content: space-between;
    border-radius: 15px;
    padding: 10px 20px;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.gap16 {
    display: flex;
    gap: 40px;
}

    .gap16 > a {
        font-size: 18px;
    }

.main-nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.search-field {
    display: flex;
    gap: 16px;
    background-color: #f7f9f8;
    height: 30px;
    align-items: center;
    padding: 0 8px;
    border-radius: 10px;
    width: 100%;
    max-width: 300px;
    position: relative;
}

.search-input {
    outline: none;
    border: none;
    font-family: "PT Sans", sans-serif;
    width: 100%;
    background-color: transparent;
    font-size: 16px;
}

main {
    flex: 1;
    padding: 20px 0;
}

footer {
    background-color: #a5bbe4;
    border-radius: 15px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    margin-bottom: 16px;
}

.footer-left > h2 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 8px;
}

.footer-left ul {
    list-style: none;
    display: flex;
    gap: 16px;
}

.footer-left li:not(:last-child) {
    /*margin-bottom: 8px;*/
}

.footer-left a {
    color: #333;
    font-size: 14px;
    font-weight: normal;
    display: block;
}

.footer-right {
    text-align: right;
}

.footer-right-up {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
    justify-content: flex-end;
}

.politics {
    color: #333;
    font-size: 14px;
    text-decoration: underline;
}

.hits {
    margin-bottom: 20px;
}

    .hits h1 {
        font-size: 30px;
        margin-bottom: 20px;
    }

.hits-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); /* Жёстко 5 колонок */
    gap: 15px;
}

.hit-card {
    width: 100%;
    cursor: pointer;
}

.hit-photo {
    background-color: #a5bbe4;
    border-radius: 15px;
    width: 100%;
    height: 300px;
    overflow: hidden;
    align-items: center;
    display: flex;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.hit-photo:hover {
    background-color: #7E9DD8;
}

.hit-photo img {
    width: 50%;
    margin: 0 auto;
    object-fit: cover;
    display: block;
}

.hit-card-type {
    color: #b6a7a7;
    font-size: 14px;
    margin-top: 8px;
}

.catalog h1 {
    font-size: 30px;
    margin-bottom: 20px;
}

.catalog-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* Жёстко 5 колонок */
    gap: 15px;
}

.catalog-card {
    width: 100%;
    background-color: #ffe5e6;
    border-radius: 15px;
    height: 300px;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.catalog-card:hover {
    background-color: #FFCBCD;
}

.catalog-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    align-self: flex-start; /* Текст слева */
}

.catalog-photo {
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    width: 150px;
    height: 150px;
    align-self: flex-end;
    margin-left: auto;
}

.hit-card > p {
    margin-left: 8px;
}

.photo-description {
    display: flex;
    gap: 32px;
    width: 50%;
    margin: 0 auto;
    margin-bottom: 48px;
}
    .photo-description img {
        height: 300px;
        object-fit: cover;
        object-position: center;
        display: block;
        margin: 0 auto;
    }

.desc-colors input {
    background-color: #ffe5e6;
    border: none;
    outline: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-family: "PT Sans", sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: black;
}

.desc-colors input:hover {
    background-color: #FFCBCD;
}
.desc-colors input.selected {
    background-color: #a5bbe4;
}

.desc-type {
    color: #b6a7a7;
    font-size: 14px;
}

.desc-name {
    font-size: 18px;
    font-weight: bold;
}

.desc-params {
    margin-top: 8px;
}

.storedeal {
    display: flex;
    background-color: #ffe5e6;
    padding: 16px 32px;
    border-radius: 15px;
    justify-content: space-between;
}

.store-prices {
    gap: 32px;
    display: flex;
}
/*.store-prices > div > #text {
    min-width: 100px;
    text-align: right;
}*/

#store-list > div:not(:last-child) {
    margin-bottom: 16px;
}

.prices > h3 {
    font-size: 24px;
}

.store-name {
    display: flex;
    align-items: center;
    gap: 20px;
}

.store-name svg {
    cursor: pointer;
}

.catalog-item-name {
    margin-top: 8px;
}

.catalog-page-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 24px;
}

.catalog-page-card {
    width: 100%;
}

.catalog-page-card > p {
    margin-left: 8px;
}

.catalog-page-photo {
    background-color: #a5bbe4;
    border-radius: 15px;
    width: 100%;
    height: 300px;
    overflow: hidden;
    align-items: center;
    display: flex;
    transition: background-color 0.3s ease;
}

.catalog-page-photo:hover {
    background-color: #7E9DD8;
}

.catalog-page-photo img {
    width: 50%;
    margin: 0 auto;
    object-fit: cover;
    display: block;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.product-item {
    background-color: #ffe5e6;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.product-item:hover {
    background-color: #FFCBCD;
}

.products-list > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.product-item > h3 {
    font-size: 16px;
    font-weight: normal;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /*margin-top: 5px;*/
    /*padding: 8px 16px;*/
}
.search-results.show {
    display: block;
}
.search-result-item {
    cursor: pointer;
    padding: 8px 16px;
}
.search-result-item:hover {
    background-color: #ffe5e6;
}
.search-result-item.no-results:hover {
    background-color: transparent; /* или unset */
    cursor: default;
}

.desc-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#store-list {
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

#store-list > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#store-list > * {
    animation-delay: calc(var(--i) * 0.1s);
}

/*.catalog-page-card {
    cursor: pointer;
}*/

.price-container {
    min-width: 100px;
    display: flex;
    justify-content: flex-end;
}

.price-tooltip {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
    cursor: help;
    text-align: right;
    min-width: 100px;
}

.price-text {
    text-align: right;
    display: inline-block;
    min-width: 100px;
}

.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    right: 0; /* Изменили left:50% на right:0 для привязки к правому краю */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 14px;
    font-weight: normal;
}

    .tooltip-text::after {
        content: "";
        position: absolute;
        top: 100%;
        right: 15px; /* Позиционируем стрелку ближе к правому краю */
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #555 transparent transparent transparent;
    }

.price-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Остальные стили остаются без изменений */
.store-prices p {
    margin: 0;
    position: relative;
}

.storedeal {
    transition: transform 0.2s;
}

    .storedeal:hover {
        transform: translateY(-2px);
    }

/* About */
.about-section {
  padding: 60px 0;
}
.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  /*color: #007acc;*/
}
.about-text {
  margin-bottom: 25px;
  font-size: 16px;
}
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}
.feature h3 {
  /*color: #007acc;*/
  margin-bottom: 10px;
  font-size: 18px;
}
.feature {
  flex: 1 1 300px;
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  /*box-shadow: 0 2px 5px rgba(0,0,0,0.05);*/
}

/* Команда */
.team-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}
.team-title {
  font-size: 20px;
  margin-bottom: 15px;
}
.team-desc a {
  color: #007acc;
  text-decoration: underline;
}

.section-description {
  font-size: 16px;
  margin-bottom: 30px;
  color: #555;
}

.stores-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 0;
}

.store-item {
  background-color: #ffe5e6;
  padding: 15px 20px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.store-item:hover {
  background-color: #FFCBCD;
}

.logo {
    white-space: nowrap;
}

.main-nav a {
    white-space: nowrap;
}

@media (max-width: 500px) {
    /* Стили для мобильных телефонов */
    header {
        display: block;
    }
    .main-nav {
        margin-bottom: 8px;
    }
    .main-nav a:not(:first-child) {
        display: none;
    }
    .search-field {
        max-width: 100%;
    }

    .hits-list {
        grid-template-columns: none !important;
    }

    .catalog-list {
        grid-template-columns: none;
    }

    .catalog-page-list {
        grid-template-columns: none;
    }
    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-description {
        display: block;
        width: 100%;
    }
    .store-prices {
        display: block;
    }

    footer {
        display: block;
    }
    .footer-right {
        text-align: left;
    }
    .footer-right-up {
        justify-content: normal;
    }
    .footer-left {
        margin-bottom: 8px;
    }
}

@media (max-width: 580px) {
    .catalog-list {
        grid-template-columns: none;
    }
}

@media (max-width: 769px) {
    /* Стили для планшетов */
    .main-nav a:not(:first-child) {
        display: none;
    }
    
    .hits-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .catalog-page-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-description {
        display: block;
        width: 100% !important;
    }
}

@media (max-width: 1025px) {
    /* Стили для ноутбуков */
    .photo-description {
        width: 70%;
    }
}

@media (max-width: 1200px) {
    .photo-description {
        width: 70%;
    }
}

#productsContainer {
    scroll-margin-top: 20px; /* нужный тебе отступ */
}

.wrong {
    background-color: #FFF0E5;
}
.wrong:hover {
    background-color: #FFE1CB;
}
.wrong-product {
    background-color: #FFF0E5;
}