@font-face {
    font-family: "Montserrat-Regular";
    src: url("../fonts/Montserrat-Regular.ttf");
}

html {
    box-sizing: border-box;
}

*,
*::after,
*::before {
    box-sizing: inherit;
}

body {
    font-family: "Montserrat-Regular";
    margin: 0;
    padding: 0;
    font-size: 16px;
    background-color: #fff;
    color: #000;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header__top {
    background-color: #ffffff;
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header__top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 28px;
}

.search__form {
    position: relative;
    width: 420px;
}

.search__form input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #000000;
    background-color: #fff;
    font-size: 14px;
    outline: none;
}

.search__form input::placeholder {
    color: #999;
}

.search__form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-45%);
    border: none;
    background: none;
    cursor: pointer;
}

.search__form button img {
    width: 35px;
}

.search__form button:hover img {
    opacity: 1;
}

.header__icon {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header__icon img {
    width: 40px;    
    transition: 0.3s;
}

.header__icon img:hover {
    opacity: 1;
}

.auth-btn {
    border: 1px solid #000000;
    padding: 10px 20px;
    color: #000;
}

.auth-btn:hover {
    background-color: #000;
    color: #fff;
    transition: 0.3s;
}

.reg-btn {
    background-color: #000;
    border: 1px solid #000000;
    padding: 10px 20px;
    color: #fff;
}

.reg-btn:hover {
    background-color: #fff;
    color: #000;
    transition: 0.3s;
}

.nav {
    position: relative;
    left: 0;
    height: auto;
    width: 100%;
    padding-top: 0;
    background: #000;
}

.menu__list {
    list-style: none;
    margin: 0;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu__item a {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.menu__item a:hover {
    color: #127FB2;
}

.menu__item img {
    width: 10px;
    opacity: 0.8;
}

.menu__item {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 1000px;
    background: #fff;
    padding: 40px;
    display: flex;
    gap: 60px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: 0.3s ease;
    z-index: 100;
}

.menu__item--mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-column {
    flex: 1;
}

.mega-column h4 {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
}

.mega-group {
    margin-bottom: 20px;
}

.mega-group h5 {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column li {
    margin-bottom: 6px;
}

.mega-column a {
    color: #555;
    font-size: 14px;
    transition: 0.3s;
}

.mega-column a:hover {
    color: #127FB2;
}

footer {
    background-color: #000;
}

.footer {
  background: #000;
  padding: 60px 0;
  color: #ffffff;
}

.footer__wrapper {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.footer__col h3 {
  font-size: 18px;
  margin-bottom: 18px;
  font-weight: 600;
}

.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__col li {
  margin-bottom: 10px;
}

.footer__col a {
  text-decoration: none;
  color: #9c9c9c;
  transition: 0.25s;
}

.footer__col a:hover {
  color: #fff;
}

.footer__col p {
  margin: 6px 0;
  color: #cfcfcf;
}

.socials {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.social {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
}

.icon_account {
    margin-right: 20px;
}

.search__form{
position:relative;
}

.search-results{
position:absolute;
top:45px;
left:0;
width:100%;
background:white;
border:1px solid #eee;
border-radius:8px;
display:none;
z-index:999;
max-height:300px;
overflow-y:auto;
}

.search-item{
display:flex;
gap:10px;
padding:10px;
text-decoration:none;
color:black;
border-bottom:1px solid #f1f1f1;
}

.search-item img{
width:40px;
height:40px;
object-fit:cover;
border-radius:6px;
}

.search-item:hover{
background:#f7f7f7;
}

.search-title{
font-size:14px;
}

.search-price{
font-size:13px;
color:#777;
}
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #000;
    transition: 0.3s;
}

/* Анимация */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: none;
}

.mobile-close {
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    text-align: right;
    padding: 20px 25px;
}

/* Кнопки внутри меню */
.mobile-auth a {
    display: block;
    width: 100%;
    padding: 10px 0;
}

.mobile-login {
    border: 1px solid #fff;
    text-align: center;
}

.mobile-register {
    background: #fff;
    color: #000 !important;
    text-align: center;
}

.cart-link {
    position: relative;
    display: inline-flex;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border: 1px solid #000000;
    padding: 15px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #000;
    text-decoration: none;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.product-brand,
.release-date {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-family: "Montserrat-Bold";
    color: #127FB2;
}

.btn-cart, .btn-preorder {
    background: #127FB2;
    color: #fff;
    border: none;
    font-family: "Montserrat-Bold";
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-cart:hover, 
.btn-preorder:hover {
    background: rgb(7, 97, 138);
}

.product-image {
    position: relative;
}

.product-bottom--center {
    justify-content: center;
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    max-width: 320px;
    padding: 14px 16px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { background: #2ecc71; }
.toast.error   { background: #e63946; }
.toast.info    { background: #127FB2; }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(120%); }
}

.fav-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 2;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.fav-btn:hover {
    transform: scale(1.15);
    color: #e63946;
    background: #fff;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.25);
}

.fav-btn.fav-active {
    color: #e63946;
    background: #fff;
    box-shadow: 0 2px 10px rgba(230, 57, 70, 0.2);
}

.fav-btn.fav-active:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35);
}
.mobile-auth {
    margin-top: 30px;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth a {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.mobile-login,
.mobile-login:visited,
.mobile-login:hover,
.mobile-login:active {
    color: #fff !important;
}

.mobile-auth { display: none; }


/* =========================
   992px — планшет
========================= */
@media (max-width: 992px) {

    .search__form {
        width: 220px;
    }

    .menu__list {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .mega-menu {
        display: none !important;
    }

    .footer__wrapper {
        gap: 40px;
    }
}


/* =========================
   768px — мобильный
========================= */
@media (max-width: 768px) {

    /* ШАПКА */
    .header__top .container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }

    .burger {
        display: flex;
        order: 1;
    }

    .logo {
        order: 2;
        margin-left: auto;
    }

    .header__icon {
        order: 3;
        margin-left: auto;
    }

    .search__form {
        order: 4;
        width: 100%;
    }

    /* МОБИЛЬНОЕ МЕНЮ */
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #000;
        padding-top: 100px;
        transition: 0.4s ease;
        z-index: 999;
    }

    .nav.active {
        left: 0;
    }

    .menu__list {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 25px;
        gap: 20px;
    }

    .menu__item a {
        font-size: 15px;
    }

    .mega-menu {
        display: none !important;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* ФУТЕР */
    .footer__wrapper {
        flex-direction: column;
        gap: 35px;
    }

    .footer__brand {
        text-align: center;
    }

    .footer__col {
        text-align: center;
    }

    .socials {
        justify-content: center;
    }

    .mobile-menu-header {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
    }

    .nav {
        padding-top: 70px;
    }

    /* Прячем кнопки в шапке */
    .header__icon .auth-btn,
    .header__icon .reg-btn {
        display: none;
    }
    
    .mobile-auth { display: flex; }
}

@media (max-width: 480px) {

    .logo img {
        height: 22px;
    }

    .header__icon img {
        width: 30px;
    }

    .auth-btn,
    .reg-btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .search__form input {
        padding: 10px 40px 10px 12px;
        font-size: 13px;
    }

    .search__form button img {
        width: 25px;
    }

    .footer {
        padding: 40px 0;
    }

    .footer__col h3 {
        font-size: 16px;
    }
}