* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #F2F4EC;
    color: #455838;
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(107, 124, 97, 0.9) 0%, rgba(107, 124, 97, 0.7) 100%);
    backdrop-filter: blur(5px);
    padding: 15px 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(107, 124, 97, 1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header h1 {
    font-size: 2rem;
    color: #F2F4EC;
    text-transform: uppercase;
}

nav a {
    color: #F2F4EC;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #A6B295;
    transition: width 0.3s ease;
}



nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #A6B295;
}

main {
    margin-top: 80px;
}

.cloth-detail {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.cloth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #F2F4EC;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.8s ease-out forwards;
}

.image {
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.image img {
    width: 100%;
    height: 550px;
    border-radius: 20px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.image:hover img {
    transform: scale(1.05);
    opacity: 0.95;
}

.cloth-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cloth-info h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    color: #455838;
}

.description {
    font-size: 1.1rem;
    line-height: 1.7;
    padding: 20px;
    background: #EFF1E8;
    color: #555;
    border-left: 4px solid #6B7C61;
    border-radius: 8px;
}

.price {
    font-size: 2.2rem;
    font-weight: bold;
    color: #6B7C61;
    margin-bottom: 20px;
    background: #D9DFCC;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}


.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.return-btn {
    background-color: #6B7C61;
    color: #F2F4EC;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    margin: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.return-btn:hover {
    background-color: #A6B295;
    transform: translateY(-2px);
}

.error-404 {
    max-width: 800px;
    margin: 100px auto 60px;
    padding: 40px;
    text-align: center;
    background: #D9DFCC;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.8s ease-out forwards;
}

.error-404 h1 {
    font-size: 2.5rem;
    color: #455838;
    margin-bottom: 20px;
}

.error-404 p {
    font-size: 1.2rem;
    color: #6B7C61;
    margin-bottom: 30px;
}

.error-404 .return-btn {
    display: inline-block;
    font-size: 1.1rem;
}

.footer {
    background: linear-gradient(180deg, #6B7C61, #455838);
    padding: 40px 20px;
    color: #F2F4EC;
    text-align: center;
    font-size: 0.95rem;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    margin: 0 10px;
    color: #F2F4EC;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #D9DFCC;
}

main {
    margin-top: 120px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 5px 0;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    nav a {
        margin: 3px;
        font-size: 0.85rem;
        padding: 4px 8px;
        border-radius: 5px;
        background: rgba(255, 255, 255, 0.1);
        transition: background 0.3s ease;
    }

    nav a:hover {
        background: rgba(166, 178, 149, 0.3);
    }

    nav a::after {
        display: none;
    }

    .cloth-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .cloth-image img {
        height: 350px;
    }

    .cloth-info h1 {
        font-size: 2.2rem;
    }

    .price {
        font-size: 1.8rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .error-404 h1 {
        font-size: 2rem;
    }

    main {
        margin-top: 150px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    nav a {
        font-size: 0.75rem;
        padding: 3px 6px;
        margin: 2px;
    }

    .cloth-info h1 {
        font-size: 1.8rem;
    }

    .price {
        font-size: 1.6rem;
    }

    .description {
        font-size: 1rem;
    }

    .cloth-image img {
        height: 300px;
    }

    main {
        margin-top: 140px;
    }
}

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

.cloth-container {
    animation: fadeInUp 0.8s ease-out;
}



/* Search Container */
.search-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px; 
    width: 100%; 
    text-align: center; 
    box-sizing: border-box; 
}

.search-container form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto; 
}

.search-input {
    padding: 10px 15px;
    font-size: 1rem;
    border: 1px solid #A6B295;
    border-radius: 8px;
    width: 300px;
    max-width: 100%;
    background-color: #F2F4EC;
    color: #455838;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6B7C61;
    box-shadow: 0 0 5px rgba(107, 124, 97, 0.3);
}

.search-btn {
    background-color: #6B7C61;
    color: #F2F4EC;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background-color: #A6B295;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-input {
        width: 200px;
        padding: 8px 12px;
    }

    .search-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-container form {
        flex-direction: column;
        gap: 10px;
    }

    .search-input {
        width: 100%;
        max-width: 250px;
        padding: 6px 10px;
    }

    .search-btn {
        width: 100%;
        max-width: 150px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

.image-slider {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.image-slider img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    display: none;
}

.image-slider img.active {
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;


}
