body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
}

#shop {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: absolute;
    top: 0;
    left: 0;
    padding-bottom: 80px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f5e6d3 0%, #d4b896 50%, #c19a6b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    touch-action: pan-y;
}

#shop::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 105, 61, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(101, 67, 33, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(184, 134, 11, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#header {
    display: flex;
    width: 95%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

#search-container {
    display: flex;
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2500;
    background: rgba(250, 245, 235, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 2.5%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(101, 67, 33, 0.15);
    border-bottom: 1px solid rgba(193, 154, 107, 0.3);
}

#search {
    display: flex;
    border: none;
    height: 40px;
    width: 84%;
    border-radius: 25px;
    align-items: center;
    padding: 0 15px;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    box-shadow: 0 4px 15px rgba(101, 67, 33, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

#search:active {
    box-shadow: 0 6px 20px rgba(101, 67, 33, 0.4);
    transform: translateY(-2px);
}

/* Кнопка закрытия клавиатуры */
#keyboard-close-button {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 3000;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(101, 67, 33, 0.4);
    border: 3px solid rgba(184, 134, 11, 0.3);
    animation: keyboardButtonPulse 2s ease infinite;
}

@keyframes keyboardButtonPulse {
    0%, 100% {
        box-shadow: 0 6px 25px rgba(101, 67, 33, 0.4);
    }
    50% {
        box-shadow: 0 6px 35px rgba(101, 67, 33, 0.6);
    }
}

#keyboard-close-button:active {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(101, 67, 33, 0.5);
}

#keyboard-close-button i {
    font-size: 24px;
    color: #faf5eb;
}

#search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: white;
    font-weight: 500;
}

#search input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

#search i {
    color: white;
    font-size: 16px;
}

#search-clear {
    position: absolute;
    right: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 1;
}

#search-clear:active {
    color: white;
    transform: scale(1.2) rotate(90deg);
}

#options {
    display: flex;
    border: none;
    height: 40px;
    width: 13%;
    border-radius: 25px;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

#options:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

#options:active {
    transform: translateY(0px);
    box-shadow: 0 3px 10px rgba(184, 134, 11, 0.3);
}

#options i {
    color: white;
    font-size: 18px;
}

#banners {
    display: block;
    width: 100%;
    position: relative;
    margin-top: 15px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(101, 67, 33, 0.25);
    aspect-ratio: 71 / 71;
    overflow: hidden;
    border: 3px solid rgba(193, 154, 107, 0.4);
    transition: all 0.3s ease;
}

#banners:active {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(101, 67, 33, 0.35);
}

.banner-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #654321;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
    animation: fadeInOut 0.5s ease-in-out;
    width: 100%;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tns-outer {
    overflow: hidden;
    border-radius: 15px;
}

.tns-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    flex-wrap: wrap;
}

.tns-nav button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}

.tns-nav button.tns-nav-active {
    background: white;
    transform: scale(1.2);
}

.splide__pagination {
    bottom: 20px !important;
}

.splide__pagination__page {
    background: rgba(255, 255, 255, 0.6) !important;
    width: 8px !important;
    height: 8px !important;
    margin: 0 6px !important;
}

.splide__pagination__page.is-active {
    background: white !important;
    transform: scale(1.2) !important;
}

#cart-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    color: #faf5eb;
    padding: 16px 32px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(101, 67, 33, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid rgba(184, 134, 11, 0.3);
}

#cart-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2) 0%, rgba(184, 134, 11, 0) 100%);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cart-button:active::before {
    opacity: 1;
}

#cart-button:active {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 15px 40px rgba(101, 67, 33, 0.5);
}

#cart-button:active {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 8px 25px rgba(101, 67, 33, 0.4);
}

#cart-button i {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

#cart-button span {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Обновляем общие анимации */
button, .card, #search, #options, .categories {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация появления карточек */
.card {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }

/* Адаптивные стили для маленьких экранов */
@media (max-width: 380px) {
    #search {
        width: 82%;
    }
    
    #options {
        width: 15%;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    #cart-button {
        padding: 14px 28px;
    }
    
    #cart-button span {
        font-size: 15px;
    }
}

/* Адаптивные стили для больших экранов */
@media (min-width: 768px) {
    #search-container {
        padding: 10px 5%;
    }
    
    #header {
        width: 90%;
    }
    
    #main {
        width: 90%;
    }
}

/* Кастомные скроллбары */
#shop::-webkit-scrollbar {
    width: 8px;
}

#shop::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#shop::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

#shop::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.5);
}

.cart-items::-webkit-scrollbar,
.brands-list::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track,
.brands-list::-webkit-scrollbar-track {
    background: rgba(193, 154, 107, 0.1);
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb,
.brands-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:active,
.brands-list::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #654321 0%, #8b6f47 100%);
}

/* Эффект загрузки/плавного появления */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Экран загрузки */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5e6d3 0%, #d4b896 50%, #c19a6b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 105, 61, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(101, 67, 33, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(184, 134, 11, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.loading-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px rgba(101, 67, 33, 0.4);
    animation: logoFloat 3s ease-in-out infinite;
    border: 3px solid rgba(184, 134, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.loading-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: logoShine 3s linear infinite;
}

.loading-logo i {
    font-size: 50px;
    color: #faf5eb;
    z-index: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes logoShine {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 4px 15px rgba(101, 67, 33, 0.2);
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        filter: drop-shadow(0 4px 15px rgba(101, 67, 33, 0.2));
    }
    50% {
        filter: drop-shadow(0 4px 25px rgba(101, 67, 33, 0.4));
    }
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spinnerRotate 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #8b6f47;
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #654321;
    animation-duration: 2s;
    animation-delay: -0.5s;
    width: 70%;
    height: 70%;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #b8860b;
    animation-duration: 2.5s;
    animation-delay: -1s;
    width: 50%;
    height: 50%;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-subtext {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #654321;
    opacity: 0.8;
    animation: subtextPulse 2s ease-in-out infinite;
}

@keyframes subtextPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Адаптивные стили для экрана загрузки */
@media (max-width: 380px) {
    .loading-logo {
        width: 80px;
        height: 80px;
        border-radius: 25px;
    }
    
    .loading-logo i {
        font-size: 40px;
    }
    
    .loading-text {
        font-size: 28px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loading-subtext {
        font-size: 14px;
    }
}



