/* ====================== */
/* index.html специфичные стили */
/* ====================== */

/* Loader для карусели */
.loader-container-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 5;
    animation: fadeIn 0.3s ease-in;
}

.loader-container.fadeout-animation {
    animation: fadeIn 0.3s ease-in, fadeOut 0.3s ease-out 2s forwards;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-results {
    padding: 0rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--black);
    transition: background 0.2s;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--gray-100);
    flex-shrink: 0;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--black);
}

.search-show-all {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.search-show-all-btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.search-show-all-btn:hover {
    background: var(--gray-800);
}

.search-empty {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Mobile Search - НОВЫЕ СТИЛИ */
.mobile-search-button {
    display: none;
    height: 28px;
    width: 28px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-search-button:hover {
    border-color: var(--black);
}

.mobile-search-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--black);
}

/* Mobile Search Panel - СКРЫТА ПО УМОЛЧАНИЮ */
.mobile-search-panel {
    display: none;
}

/* ПОКАЗЫВАЕМ ТОЛЬКО НА МОБИЛЬНЫХ */
@media (max-width: 480px) {
    .mobile-search-panel {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, visibility 0.3s;
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .mobile-search-panel.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.mobile-search-container {
    padding: 0 0.4rem 0.75rem;
}

.mobile-search-input-wrapper {
    position: relative;
}

body.mobile-search-open .header {
    border-bottom: 1px solid transparent;
}

.mobile-search-input {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--gray-300);
    border-radius: 22px;
    font-size: 1rem;
    background: var(--gray-50);
    transition: all 0.2s;
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--black);
    background: var(--white);
}

.mobile-search-close {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.mobile-search-close:active {
    opacity: 0.5;
}

.mobile-search-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--gray-600);
    stroke-width: 2;
}

/* Mobile Search Dropdown */
.mobile-search-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-search-dropdown.show {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
}

.mobile-search-results {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
}

.mobile-search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--black);
    transition: background 0.15s;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-search-result-item:last-child {
    border-bottom: none;
}

.mobile-search-result-item:active {
    background: var(--gray-50);
}

.mobile-search-result-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--gray-100);
    flex-shrink: 0;
    overflow: hidden;
}

.mobile-search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-search-result-content {
    flex: 1;
    min-width: 0;
}

.mobile-search-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-search-result-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--black);
}

.mobile-search-show-all {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.mobile-search-show-all-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}

.mobile-search-show-all-btn:active {
    background: var(--gray-800);
}

.mobile-search-empty {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Backdrop */
.mobile-search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 99;
}

.mobile-search-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Header state - убираем лишние стили */
.header {
    /* Стандартные стили header без изменений */
}

/* Navigation */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
}

.nav-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    padding: 0.84rem 0;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
    cursor: pointer;
    animation: fadeIn 0.3s ease-in;
}

.nav-item:hover {
    color: var(--black);
}

.nav-item.active {
    color: var(--black);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--black);
}

/* Hero Banner */
.hero {
    max-width: 1440px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.promo-section {
    position: relative;
    animation: slideUp 0.5s ease-out forwards;
}

.promo-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--black);
}

.promo-slides {
    position: relative;
    display: flex;
    transition: transform 0.3s ease-out;
    touch-action: pan-y;
    min-height: 370px;
}

.promo-slide {
    min-width: 100%;
    padding: 3rem 80px;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.promo-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.promo-label {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.promo-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.promo-text {
    font-size: 1.1rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.button-promo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    background: var(--white);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.button-promo:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.promo-background {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

.carousel-button {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgb(0 0 0 / 45%);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-button:active {
    opacity: 0.7;
}

.carousel-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}

.carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-indicator.active {
    width: 20px;
    background: rgba(255, 255, 255, 0.8);
}

/* Categories */
.categories {
    display: none;
    max-width: 1440px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--black);
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-card.active {
    border-color: var(--black);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: var(--black);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-icon img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.category-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Product Card Animation для главной */
.product-card {
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

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

/* Trust Section */
.trust-section {
    max-width: 1440px;
    margin: 5rem auto;
    padding: 3rem 2rem;
    background: var(--gray-50);
    border-radius: 16px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-icon {
    width: 48px;
    height: 48px;
    background: var(--black);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.trust-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
}

.trust-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.trust-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* ====================== */
/* item.html специфичные стили */
/* ====================== */

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 9999;
}

.page-loader.hidden {
    display: none;
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.breadcrumb-link {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--black);
}

/* Product Page */
.product-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 4rem;
}

/* Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--gray-100);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image-placeholder {
    font-size: 4rem;
}

/* Product Info */
.product-info {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* Product item specific overrides */
.product-page .product-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.product-page .product-meta {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
}

/* Seller Section */
.seller-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.seller-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    background: var(--black);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
}

.seller-details {
    flex: 1;
}

.seller-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.verified-badge {
    color: var(--success);
}

.seller-role {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Price Section */
.price-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.buy-button {
    width: 100%;
    height: 52px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.buy-button:hover {
    background: var(--gray-800);
}

.buy-button:active {
    transform: scale(0.98);
}

.add-to-cart {
    width: 100%;
    height: 52px;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-cart:hover {
    border-color: var(--black);
    background: var(--gray-50);
}

/* Features */
.features {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.feature-icon {
    color: var(--success);
    font-weight: 700;
}

/* Details Section */
.details-section {
    margin-top: 4rem;
}

.description-content {
    color: var(--gray-700);
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Error Container */
.error-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
    padding: 0 2rem;
}

.error-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.error-text {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.error-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.error-button:hover {
    background: var(--gray-800);
}

/* ====================== */
/* login.html и register.html специфичные стили */
/* ====================== */

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.015) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-20px, -20px); }
    66% { transform: translate(20px, -10px); }
}

/* Auth Header */
.auth-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.back-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.back-button:hover {
    background: var(--gray-50);
    border-color: var(--black);
    transform: scale(1.05);
}

.back-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--black);
}

.auth-header .logo {
    font-size: 1.25rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.auth-header .logo:hover {
    opacity: 1;
}

.header-spacer {
    width: 40px;
}

/* Auth Container */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 0 1.5rem;
}

.auth-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 3rem 3rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header-content {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--black);
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 400;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    color: var(--black);
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-input::placeholder {
    color: var(--gray-500);
}

.form-input:hover {
    background: var(--white);
    border-color: var(--gray-500);
}

.form-input:focus {
    background: var(--white);
    border-color: var(--black);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.form-input.error {
    border-color: var(--accent);
    background: rgba(255, 59, 48, 0.05);
}

.form-input.error:focus {
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 54%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--black);
    stroke-width: 1.5;
}

.error-message {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Buttons */
.btn-submit {
    width: 100%;
    height: 52px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-submit:hover:not(:disabled) {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-submit.loading {
    color: transparent;
}

.btn-submit .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-submit.loading .loader {
    display: block;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: lowercase;
}

/* Footer Links */
.form-footer {
    text-align: center;
}

.footer-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--black);
}

/* Register specific */
.progress-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.progress-step {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background 0.3s;
}

.progress-step.active {
    background: var(--black);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    flex: 1;
    height: 52px;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.btn-back {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--gray-300);
}

.btn-back:hover {
    background: var(--gray-50);
    border-color: var(--black);
}

/* ====================== */
/* search.html специфичные стили */
/* ====================== */

/* Search Results Section */
.search-results-section {
    max-width: 1440px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 60vh;
}

.search-header {
    margin-bottom: 2rem;
}

.search-query {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.search-info {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Search grid override for animation */
.search-results-section .product-card {
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

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

.search-results-section .product-image {
    height: 160px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination-button {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover:not(:disabled) {
    border-color: var(--black);
}

.pagination-button.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.pagination-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0 8px;
    color: var(--gray-500);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--gray-400);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.empty-button:hover {
    background: var(--gray-800);
}

/* ====================== */
/* Mobile specific responsive adjustments */
/* ====================== */

@media (max-width: 1024px) {
    /* Navigation mobile */
    .nav-content {
        padding: 0 1rem;
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        white-space: nowrap;
        font-size: 0.8rem;
    }

    /* Hero mobile */
    .hero {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .promo-slide {
        min-height: 300px;
    }

    .promo-title {
        font-size: 2rem;
    }

    .promo-text {
        font-size: 1rem;
    }

    /* Categories mobile */
    .categories {
        padding: 0 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .category-card {
        padding: 1rem 0.5rem;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .category-name {
        font-size: 0.75rem;
    }

    .category-count {
        font-size: 0.65rem;
    }

    /* Trust section mobile */
    .trust-section {
        padding: 2rem 1rem;
        margin: 3rem auto;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 968px) {
    /* Product page mobile */
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-info {
        position: static;
    }

    .breadcrumbs {
        padding: 1rem 1rem 0;
    }

    .product-page {
        padding: 1.5rem 1rem 3rem;
    }

    .product-page .product-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
    
    .promo-slide {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Mobile search button */
    .mobile-search-button {
        display: flex;
    }

    /* Скрываем десктопный поиск */
    .search-container {
        display: none !important;
    }
    
    /* Показываем мобильную панель только на мобильных */
    .mobile-search-panel {
        display: block;
    }

    .promo-title {
        font-size: 1.75rem;
    }

    .promo-text {
        font-size: 0.875rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Auth pages mobile */
    .auth-header {
        padding: 1.5rem;
    }

    .auth-wrapper {
        padding: 0 1rem;
    }

    .auth-container {
        padding: 3rem 2rem 2rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 481px) and (max-width: 1024px) {
    .search-container {
        display: block;
        flex: 1;
    }
}