:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --vk-color: #4c75a3;
    --yandex-color: #ff0000;
    --google-color: #4285f4;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p:last-child {
    margin-bottom: 0;
}

main {
    flex: 1;
    padding-top: 2em;
}

.login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.auth-header h2 {
    font-weight: 600;
    margin-bottom: 5px;
}

.auth-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.auth-body {
    padding: 40px 35px;
}

.form-control {
    border: 2px solid #eef2f7;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    background: transparent;
    border: 2px solid #eef2f7;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 10px;
    transition: box-shadow 0.3s;
}

.btn-primary:hover {
    box-shadow: inset -0.8em -0.8em 0.4em -0.4em #0003, inset 0.8em 0.8em 0.4em -0.4em #fff3;
}

.btn-primary:active {
    box-shadow: inset -0.8em -0.8em 0.4em -0.4em #fff3, inset 0.8em 0.8em 0.4em -0.4em #0003;
}

.btn-primary.btn-sm {
    padding: 6px 12px;
}

.btn-outline-secondary {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 500;
    border: 2px solid #eef2f7;
    transition: all 0.3s;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-secondary.btn-sm {
    padding: 6px 12px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-5px);
    color: white;
}

.btn-vk {
    background-color: var(--vk-color);
}

.btn-yandex {
    background-color: var(--yandex-color);
}

.btn-google {
    background-color: var(--google-color);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #8a94a6;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eef2f7;
}

.divider span {
    padding: 0 15px;
    font-size: 0.9rem;
}

.password-toggle {
    width: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8a94a6;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #667eea;
}

.form-label {
    font-weight: 500;
    color: #3a3f58;
    margin-bottom: 8px;
}

.footer-links {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #8a94a6;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Стили для модальных окон */
.modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    background: transparent;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    padding: 25px 30px;
}

.modal-success .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.modal-info .modal-header {
    background: linear-gradient(135deg, var(--vk-color) 0%, #5d8cc7 100%);
}

.modal-error .modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #dc3545 100%);
}

.modal-title {
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center
}

.modal-header .btn-close {
    filter: invert(1) brightness(100%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #3a3f58;
    background: #fff;
}

.modal-icon {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-success .modal-icon {
    background-image: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.modal-info .modal-icon {
    background-image: linear-gradient(135deg, var(--vk-color) 0%, #5d8cc7 100%);
}

.modal-error .modal-icon {
    background-image: linear-gradient(135deg, #dc3545 0%, #dc3545 100%);
}

.modal-footer {
    border-top: 1px solid #eef2f7;
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #eee;
}

.modal-footer .btn {
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.social-modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.social-modal-icon .icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.loading {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: #fff7 !important;
    border-radius: var(--radius-1);
    opacity: 0;
}

.loading img {
    position: sticky;
    top: calc(50% - 8em);
    width: 100%;
    height: 16em;
    padding: 3em 0;
}

.loading.mini img {
    position: absolute;
    height: 3em;
    padding: 0;
    max-height: 100%;
    transform: translateY(-50%);
    top: 50%;
}

@media (max-width: 576px) {
    .auth-body {
        padding: 30px 25px;
    }

    .auth-header {
        padding: 30px 20px;
    }
}

container {
    display: block;
    width: 90%;
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    padding: 1em 0;
    margin-bottom: 0.5em;
    z-index: 100;
    background: #ffffffbd;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 1em 0 #0000001c;
}

header .logo {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    grid-gap: 0.5em;
    margin-right: 1em;
}

header .logo svg {
    display: inline-block;
    width: 2em;
    border-radius: 0.5em;
}

header .logo b {
    font-size: 1.5em;
}

header nav {
    display: flex;
    grid-gap: 1em;
}

header a {
    text-decoration: none;
    color: #5599ff;
    font-weight: 500;
}

header a.active {
    color: #dd55ff;
}

.price {
    font-size: 1.5em;
    line-height: 1em;
    display: flex;
    grid-gap: 0 0.5em;
    align-items: center;
    flex-wrap: wrap;
}

.price span {}

.price span.old {
    position: relative;
    font-size: 0.7em;
    color: #666;
}

.price span.old::before {
    content: '';
    position: absolute;
    width: calc(100% + 6px);
    height: 1px;
    left: -3px;
    background: red;
    top: 50%;
    transform: rotate(6deg);
}

.price span.old sup {
    color: red;
    vertical-align: baseline;
    position: absolute;
    font-size: 1em;
    top: -0.1em;
    left: calc(100% + .2em);
    line-height: 1em;
    font-weight: bold;
}

.goods .list {
    --col: 4;

    display: flex;
    flex-wrap: wrap;
    grid-gap: 1em;
    margin-top: 1em;
}

.goods .list>a {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    width: calc(100% / var(--col) - (1em - 1em / var(--col)));
    font-size: 16px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border-radius: 1em;
    overflow: hidden;
    box-shadow: 0 0 0 0.2em #eee;
}

.goods .list>a:hover {
    box-shadow: 0 0 0 0.2em #f6d1ff;
}

.goods .list>a .images {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    background: #fff;
    border-radius: var(--bs-card-border-radius) var(--bs-card-border-radius) 0 0;
    overflow: hidden;
    display: flex;
}

.goods .list>a .images img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    pointer-events: none;
    background: #fff;
}

.goods .list>a .images span:nth-child(1) img {
    z-index: 2;
}

.goods .list>a .images span {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.goods .list>a .images span:before {
    content: '';
    display: block;
    height: 4px;
    width: calc(100% - 8px);
    background: #f4e1ff;
    position: relative;
    z-index: 999;
    margin-bottom: 6px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px #9930d5;
    opacity: 0;
}

.goods .list>a .images:hover span:before {
    opacity: 1;
}

.goods .list>a .images span:hover:before {
    background: #9930d5;
}

.goods .list>a .images span:hover img {
    z-index: 3;
}

.goods .list>a content {
    flex: 1;
    display: flex;
    padding: 1em;
    flex-direction: column;
    justify-content: space-between;
}

.goods .list>a content .name {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.1em;
    margin-bottom: 1em;
}

.goods .list>a content p {
    flex: 1;
}

.goods .list>a content .price {
    margin: 0.5em 0;
}

.goods .list>a content .price .not_available {
    font-size: 0.8em;
    color: #ff7e7e;
}

.goods .list>a content .buttons {}

.goods .list>a content .buttons button {
    width: 100%;
}

.pagination {
    margin: 3em 0;
    display: flex;
    justify-content: center;
    grid-gap: 1em;
}

.pagination .page-item .page-link,
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 1em;
    aspect-ratio: 1;
    width: 2em;
    line-height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.1em;
}

.pagination .page-item.active .page-link {
    background-color: #ba5ae9;
    border-color: #ba5ae9;
    color: #fff;
}

.btn-secondary {
    --bs-btn-color: #212529;
    --bs-btn-bg: #e9ecef;
    --bs-btn-border-color: #ced4da;
    --bs-btn-hover-color: #212529;
    --bs-btn-hover-bg: #dee2e6;
    --bs-btn-hover-border-color: #c1c9d0;
    --bs-btn-focus-shadow-rgb: 158, 167, 179;
    --bs-btn-active-color: #212529;
    --bs-btn-active-bg: #d3d9df;
    --bs-btn-active-border-color: #b6bec7;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.075);
    --bs-btn-disabled-color: #6c757d;
    --bs-btn-disabled-bg: #f8f9fa;
    --bs-btn-disabled-border-color: #e9ecef;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: #59953e;
    --bs-btn-border-color: #59953e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4a7e33;
    --bs-btn-hover-border-color: #45752f;
    --bs-btn-focus-shadow-rgb: 89, 149, 62;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3f6b2b;
    --bs-btn-active-border-color: #3a6227;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #59953e;
    --bs-btn-disabled-border-color: #59953e;
}

.btn-outline-info {
    --bs-btn-color: #5599ff;
    --bs-btn-border-color: #5599ff;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #5599ff;
    --bs-btn-hover-border-color: #5599ff;
    --bs-btn-focus-shadow-rgb: 85, 153, 255;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #5599ff;
    --bs-btn-active-border-color: #5599ff;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #5599ff;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #5599ff;
    --bs-gradient: none;
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
}

.btn-check:checked+.btn,
.btn.active,
.btn.show,
.btn:first-child:active {
    transform: translateY(1px);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
    transition: all 0.2s ease;
}

.btn>.bi,
.btn>i {
    vertical-align: middle;
    margin-right: 0.25rem;
}

.empty {
    text-align: center;
    margin: 2em 0;
    font-size: 1.5em;
}

.empty a {
    font-size: 0.8em;
}

.search button {
    padding: 0 2em;
}

footer {
    background: #24283b;
    padding: 3em;
    color: #fff;
    font-size: 0.8em;
    margin-top: 2em;
    text-align: center;
}

footer container {
    display: flex;
    justify-content: space-between;
}

footer a {
    color: #fff;
    text-decoration: none;
}

.detail h1 {
    font-size: 2em;
}

.detail .images {
    display: flex;
    grid-gap: 0.5em;
}

.detail .images .thumbnail {
    display: flex;
    flex-direction: column;
    grid-gap: 0.5em;
}

.detail .images .thumbnail img {
    width: 6em;
    border-radius: 0.5em;
    box-shadow: 0 0.5em 1em -0.5em #0003;
}

.detail .images .full img {
    display: none;
    width: 25em;
    border-radius: 1em;
    box-shadow: 0 0.5em 1em -0.5em #0003;
}

.detail .images .full img.active {
    display: block;
}

.detail container>.row {
    margin-top: 2em;
}

.detail container>.row .col {
    flex: 0;
}

.detail container>.row .col:nth-child(2) {
    flex: 1;
}

.detail container>.row .col:nth-child(3) {
    flex-basis: 30em;
    display: flex;
    flex-direction: column;
    grid-gap: 1em;
}

.navbar-expand-lg .navbar-collapse {
    justify-content: space-between;
}

@media (max-width: 1400px) {
    .detail container>.row .col:nth-child(3) {
        flex-basis: 100%;
        margin-top: 2em;
    }
}

@media (max-width: 1200px) {
    .goods .list {
        --col: 3;
    }
}

@media (max-width: 992px) {

    .detail container>.row .col:nth-child(1),
    .detail container>.row .col:nth-child(2) {
        flex-basis: 100%;
    }

    .detail container>.row .col:nth-child(2) {
        margin-top: 2em;
    }

    .detail .images {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .goods .list {
        --col: 2;
    }

    footer container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .goods .list {
        --col: 1;
    }

    header .logo {
        font-size: 15px;
    }

    .detail h1 {
        font-size: 1.4em;
    }

    .detail .images {
        flex-direction: column-reverse;
        align-items: center;
    }

    .detail .images .thumbnail {
        flex-direction: row;
    }

    .detail .images .full img {
        width: 19em;
    }
}

main.e404 {
    flex: 1;
    padding-top: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

main.e404 .error-content {
    text-align: center;
}

main.e404 .error-code {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FFB347, #FF6B6B, #C85CFF, #5D9BFF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 6s ease infinite, subtleFloat 4s ease-in-out infinite;
    display: inline-block;
    margin-bottom: 0.25rem;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes subtleFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}