@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    color: #404040;
}

body {
    min-height: 100vh;
    background: url("../img/background.png") no-repeat;
    background-size: cover;
    background-position: center;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.logo-link {
    display: inline-block;
}

.logo {
    height: 50px;
}

.nav-menu {
    position: relative;
    align-items: center;
    flex-grow: 1;
}

.menu-item {
    position: relative;
    color: #404040;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    margin-left: 40px;
}

.menu-item:first-child {
    margin-left: 40px;
}

.menu-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: #404040;
    border-radius: 5px;
    transform: scaleX(0);
    transition: 0.5s;
}

.menu-item:hover::after {
    transform: scaleX(1);
}

.header-buttons {
    display: flex;
    align-items: center;
}

.btn-login {
    text-decoration: none;
    margin-left: 40px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #404040;
    border-radius: 6px;
    color: #404040;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.5s;
    height: 45px;
}

.btn-balance {
    margin-left: 20px;
    width: fit-content; /* Убираем фиксированную ширину, чтобы контейнер подстраивался под контент */
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #404040;
    border-radius: 6px;
    color: #404040;
    font-size: 18px;
    font-weight: bold;
    display: inline-flex; /* Используем flex для выравнивания изображения и текста */
    align-items: center; /* Центрируем элементы по вертикали */
    gap: 8px; /* Добавляем небольшой отступ между текстом и иконкой */
    transition: 0.5s;
    height: 45px;
}

.btn-balance img {
    vertical-align: middle; /* Обеспечиваем выравнивание изображения с текстом */
    margin-bottom: 2px;
}


.btn-login:hover {
    background: rgba(64, 64, 64, 0.6);
    color: #fff;
}

.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 100px; /* Отступ сверху, чтобы приветственное окно не перекрывало header */
    padding-bottom: 80px; /* Отступ снизу, чтобы содержимое не перекрывалось футером */
    overflow: hidden;
}

.welcome-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    text-align: center;
}

.welcome-box h1 {
    margin-bottom: 20px;
    font-size: 32px;
    color: #333;
}

.welcome-box p {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
}

.user-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    display: flex; /* Используем Flexbox для выравнивания картинки и текста */
    align-items: center; /* Вертикальное выравнивание по центру */
    gap: 20px; /* Расстояние между изображением и текстом */
    text-align: start;
}

.user-pic img {
    border-radius: 50%; /* Закруглим изображение */
    width: 150px; /* Размер изображения */
    height: 150px;
    object-fit: cover; /* Сохраним пропорции изображения */
}

.user-info {
    display: flex;
    flex-direction: column; /* Текст в столбик */
}

.user-box p {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
}

.form-box {
    position: relative;

    width: 400px;
    height: auto;

    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);

    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-box h2 {
    padding: 10px;
    font-size: 2em;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #404040;
    margin: 30px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #404040;
    font-weight: 500;
    pointer-events: none;
    transition: 0.5s;
}

.input-box input:focus~label,
.input-box input:not(:placeholder-shown)~label {
    top: -5px;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #404040;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #404040;
    line-height: 57px;
}

.remember-forgot {
    font-size: 0.9em;
    color: #404040;
    font-weight: 500;
    margin: -15px 0 15px;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input {
    accent-color: #404040;
    margin-right: 3px;
}

.remember-forgot a {
    color: #404040;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
    color: #38811f;
}

.terms-of-use{
    font-size: 0.9em;
    font-weight: 500;
    margin: -15px 0 15px;
    display: flex;
    justify-content: space-between;
    color: #404040;
}

.terms-of-use a {
    color: #404040;
}

.terms-of-use a:hover {
    color: #38811f;
}

.btn {
    width: 100%;
    height: 45px;
    background: #404040;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: 500;
    transition: 0.5s;

}

.btn:hover {
    background: #38811f;
}

.login-register {
    font-size: 0.9em;
    color: #404040;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.login-register p a {
    text-decoration: none;
    color: #404040;
    font-weight: 600;
}

.login-register p a:hover {
    text-decoration: underline;
    color: #38811f;
}

.toggle-footer-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: rgba(64, 64, 64, 0.5);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.toggle-footer-btn:hover {
    background-color: rgba(85, 85, 85, 0.5);
}

.hidden {
    display: none;
}

.footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px 20px;
    text-align: left;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.footer-section h5 {
    margin-bottom: 10px;
    font-size: 16px;
}

.footer-section a {
    text-decoration: none;
    color: #404040;
    margin-bottom: 5px;
    cursor: pointer;
    transition: 0.5s;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section.social {
    flex-direction: row;
    padding: 0 20px;
    gap: 10px;
}

.footer-section img {
    height: 30px;
    cursor: pointer;
}

.footer-section p {
    margin: 5px 0;
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #404040;
    align-items: center;
    padding: 5px 0;
    font-size: 12px;
}

/*Классы для страницы магазина*/
.shop-wrapper {
    justify-content: flex-start;
    padding-top: 100px; /* Отступ сверху, чтобы карточки товаров не перекрывались header */
    padding-bottom: 80px; /* Отступ снизу, чтобы содержимое не перекрывалось футером */
}

.shop-container {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
}

.shop-container h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 32px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 350px; /* Фиксированная высота */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 150px; /* Фиксированная высота изображения */
    object-fit: cover; /* Сохраняет пропорции изображения, но подгоняет его под заданную высоту */
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-card img:hover {
    transform: scale(1.05);
}

.product-card h2 {
    font-size: 18px;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 10px 0;
}

.product-card .price {
    font-size: 18px;
    font-weight: bold;
    color: #444;
    margin-bottom: 12px;
}

.product-card p {
    font-size: 14px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 40px; /* Ограничение по высоте для текста */
    margin: 5px 0;
}

.buy-button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: auto;
}

.buy-button:hover {
    background-color: #38811f;
    transform: translateY(-2px);
}
