@import url('https://v1.fontapi.ir/css/SFProDisplay');

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    box-sizing: border-box;
    list-style: none;
    scroll-behavior: smooth;
    font-family: SF Pro Display, sans-serif;
}

:root {
    --text-color: rgba(255, 255, 255, 0.9);
    --text-other-color: rgba(255, 255, 255, 0.7);
    --text-desc: rgb(185, 185, 185, 0.9);
}

body {
    background: #000;
    background-image: url(/img/Фон.svg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    min-height: 100vh;
}

main {
    padding-bottom: 0;
    padding: 0 12%;
    padding-bottom: 0;
    overflow-x: hidden;
}

.main-sect {
    display: flex;
    align-items: center;
    justify-content: center;
    
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.product, .buy, .popup, .wrapper, .custom-select-wrapper {
    align-items: center;
    position: relative;
    padding: 20px;
    border-radius: 35px;
    background: transparent;
    border: none;
    backdrop-filter: blur(37.5px);
    overflow: hidden;
    box-shadow: 4px 7px 13.5px rgb(0, 0, 0, 0.15);
}

.product::before, .buy::before, .popup::before, .wrapper::before, .custom-select-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 35px;
    padding: 1px;
    background: linear-gradient(149deg, #fff -30%, #fff -60%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, #fff 130%, #fff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.product img {
    width: 240px;
    border-radius: 20px;
}

.buy {
    width: 100%;
    padding: 13px 10px;
    font-size: 16px;
    color: var(--text-color);
    background: rgb(20, 20, 20, 0.55);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.buy:hover {
    transform: scale(1.03);
}

.text {
    margin: 12px 0;
}

.text p {
    font-size: 17px;
    color: var(--text-other-color);
    font-weight: 400;
}

.text h2 {
    font-size: 22px;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 4px;
}

/* попап */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.55);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlay-fade-in 0.3s cubic-bezier(.4,0,.2,1);
}

.popup {
    overflow: visible;
    width: 540px;
    max-width: 95vw;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 32px;
    padding: 28px;
    backdrop-filter: blur(25px);
    animation: popup-fade-in 0.38s cubic-bezier(0.45, 1.45, 0.49, 1.15);
}

.other {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.popup-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}

.popup-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 0;
}

.popup-info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.other .text  .popup-title {
    color: #fff;
    font-size: 24px;
    margin-bottom: 6px;
    font-weight: 500;
}

.other .text .popup-price {
    color: var(--text-other-color);
    font-size: 18px;
}

.promo-input {
    border: none;
    width: 100%;
    padding: 18px 22px;
    color: var(--text-color);
    font-weight: 400;
    background: transparent;
    font-size: 16px;
    outline: none;
}

.wrapper {
    padding: 0;
    margin-bottom: 14px;
}

.custom-select-wrapper {
    width: 100%;
    margin-bottom: 22px;
    padding: 18px 0;
    position: relative;
    overflow: visible;
    z-index: 200;
}

.selected {
    padding: 18px 22px;
    z-index: 200;
}

.custom-select {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    user-select: none;
    z-index: 200;
}

.select-options {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(20,22,24);
    border-radius: 22px;
    position: absolute;
    padding: 6px 0;
    width: 100%;
    left: 0;
    top: 220%;
    display: none;
    z-index: 9999;
}

.select-options li {
    padding: 14px 20px;
    cursor: pointer;
    color: var(--text-desc);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

.select-options li:hover {
    color: var(--text-color);
}

.custom-select.open .select-options {
    display: block;
}

.popup-buy {
    align-items: center;
    position: relative;
    padding: 20px;
    border-radius: 35px;
    background: transparent;
    border: none;
    overflow: hidden;
    width: 100%;
    color: var(--text-color);
    font-size: 18px;
    background-color: rgb(20, 20, 20, 0.35);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-buy::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 35px;
    padding: 1px;
    background: linear-gradient(149deg, #fff -30%, #fff -60%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, #fff 130%, #fff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.popup-buy:hover {
    transform: scale(1.03);
    background-color: rgb(20, 20, 20, 0.45);
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes product-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product {
    opacity: 0;
    animation: product-fade-in 0.6s cubic-bezier(0.45, 1.45, 0.49, 1.15) forwards;
}

.product:nth-child(1) { animation-delay: 0.1s; }
.product:nth-child(2) { animation-delay: 0.2s; }
.product:nth-child(3) { animation-delay: 0.3s; }
.product:nth-child(4) { animation-delay: 0.4s; }
.product:nth-child(5) { animation-delay: 0.5s; }

@keyframes popup-fade-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
}

@keyframes overlay-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.popup-overlay.closing {
    animation: overlay-fade-out 0.3s forwards;
}

.popup-overlay.closing .popup {
    animation: popup-fade-out 0.38s cubic-bezier(0.45, 1.45, 0.49, 1.15) forwards;
}