@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
   /* font-family: 'Roboto', sans-serif; */
        font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
    color: #333;       width: 100%;
    overflow-x: hidden;
}

header {
    background-color: #232f3e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    height: 40px;
}



header nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
}

.menu-button {
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    margin-right: 20px;
}

header .favorites img, header .cart img {
    height: 30px;
    margin-right: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

header .favorites img:hover, header .cart img:hover {
    transform: scale(1.1);
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-height: 100vh;
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #ff9900;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 18px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.sidenav a:hover {
    color: #f1f1f1;
}

.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    color: #818181;
}

.sidenav-content h3 {
    color: #fff;
    padding: 0 32px;
    font-size: 20px;
    margin-bottom: 20px;
}

.sidenav-content hr {
    border: 0;
    border-top: 1px solid #818181;
    margin: 20px 0;
}

main {
    flex: 1;
    padding: 2rem;
}

.breadcrumb {
    padding: 1rem 2rem;
    background-color: #eaeaea;
    margin: 1rem 0;
}

.breadcrumb a {
    text-decoration: none;
    color: #0066c0;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #ff9900;
}

.product-section {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-image {
    flex: 1;
    text-align: center;
    padding: 1rem;
}

.product-image .main-image img {
    max-width: 100%;
    border-radius: 10px;
    transition: transform 0.3s;
}

.product-image .main-image img:hover {
    transform: scale(1.05);
}

.product-image .small-images {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.product-image .small-images img {
    max-width: 60px;
    margin: 0 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.3s;
}

.product-image .small-images img:hover {
    transform: scale(1.1);
}

.product-details {
    flex: 2;
    padding: 1rem 2rem;
}

.product-details h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #f39c12;
    margin-right: 0.5rem;
}

.reviews {
    color: #0066c0;
    cursor: pointer;
    transition: color 0.3s;
}

.reviews:hover {
    color: #ff9900;
}

.price {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 0.5rem;
}

.new-price {
    color: #e74c3c;
}

.availability {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 1rem;
}

.description {
    margin-bottom: 1rem;
}

.add-to-cart-section {
    margin-bottom: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    background-color: #ff9900;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #e68a00;
 /*  transform: translateY(-2px);  */
}

.technical-specs {
    margin-top: 2rem;
}

.technical-specs h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.technical-specs ul {
    list-style: none;
    padding: 0;
}

.technical-specs ul li {
    margin-bottom: 0.5rem;
}

.related-products {
    padding: 2rem;
    background-color: #fff;
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.related-products h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;  /* Расстояние между карточками */
    justify-content: center;
    padding: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 200px;  /* Ширина карточки */
    padding: 16px;
    transition: box-shadow 0.3s;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 10px 0;
}

.product-info h3 {
    font-size: 14px;  /* Размер текста названия товара */
    margin: 10px 0;  /* Отступы сверху и снизу */
    color: #007185;  /* Цвет текста */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;  /* Межстрочный интервал */
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rating .star {
    color: #ccc;
    font-size: 1rem;
}

.rating .star.filled {
    color: #f39c12;
}

.rating .reviews {
    margin-left: 10px;
    color: #555;
    font-size: 0.9rem;
}

.price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.price-section .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
}

.price-section .old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.delivery-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
}

.add-to-cart {
    padding: 10px 20px;
    background-color: #ff9900;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
}

.add-to-cart:hover {
    background-color: #e68a00;
}

.sponsored {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-end;
}


footer {
    background-color: #232f3e;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

h1, h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.category-card {
    background-color: #fff;
    padding: 1rem;
    text-align: center;
    border-radius: 10px;
    transition: box-shadow 0.3s;
    text-decoration: none;
    color: #333;
}

.category-card img {
    max-width: 100px;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.category-card p {
    font-size: 1rem;
    font-weight: bold;
}

.category-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Styles for top navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #232F3E;
    padding: 10px 20px;
    color: white;
}

.top-nav .logo img {
    height: 40px;
}

/* Стили для логотипа с иконками Font Awesome */
.top-nav .logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s;
}

.top-nav .logo a i {
    transition: transform 0.3s;
}

.top-nav .logo a:hover {     
    color: #ff9900;
}

.top-nav .logo a:hover i {
    transform: scale(1.1);
}

.top-nav .search-bar {
    display: flex;
    flex-grow: 1;
    margin: 0 20px;
}

.top-nav .search-bar input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
}

/* Стили для кнопки поиска */
.top-nav .search-bar button {
    background-color: transparent; /* Сделать фон кнопки прозрачным */
    border: none; /* Убрать рамку */
    color: #fff; /* Цвет иконки */
    font-size: 18px;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.3s, transform 0.3s;
}

.top-nav .search-bar button:hover {
    color: #ff9900;
    transform: scale(1.1);
}

/* Стили для иконок в навигации */
.top-nav .nav-links i {
    color: #fff; /* Цвет иконок */
    font-size: 24px; /* Размер иконок */
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.top-nav .nav-links i:hover {
    color: #ff9900; /* Цвет при наведении */
    transform: scale(1.1); /* Увеличение иконки при наведении */
}

.top-nav .nav-links div {
    margin-left: 20px;
}

.top-nav .nav-links img {
    height: 30px;
}

/* Styles for category navigation */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #37475A;
    color: white;
}

.category-nav .menu-button {
    cursor: pointer;
}

.category-nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;      white-space: nowrap; /* Предотвращение переноса текста на новую строку */
}

.category-nav a:hover {
    text-decoration: underline;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
   display: none;
    width: 100%;
    height: 100%;  // или 100vh, если вы хотите, чтобы он занимал всю видимую высоту
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    z-index: 10;
    overflow-y: auto;
    box-shadow: none;
    box-sizing: border-box;  // Это ключ к решению вашей проблемы
    }

    main {
        padding: 1rem;
    }

    .product-section {
        flex-direction: column;
        padding: 1rem;
    }

    .product-details {
        padding: 1rem 0;
    }

    .related-products {
        margin: 1rem 0;
    }

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

    .closebtn {
     position: fixed;  /* Изменено на fixed, чтобы кнопка не занимала место в потоке документа */
                top: 10px;
                right: 10px;
                 z-index: 20;  /* Убедитесь, что z-index выше, чем у sidebar */
        font-size: 24px;     /* Размер шрифта */
        cursor: pointer;     /* Курсор в виде указателя */
        color: #333;         /* Цвет иконки, можно заменить на нужный */
        border: none;        /* Убрать рамку */
        background: none;    /* Убрать фон */
        padding: 5px 10px;   /* Паддинг вокруг текста */
        border-radius: 50%;  /* Круглая форма кнопки */
        background-color: #f2f2f2; /* Светлый фон для кнопки */
        box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Тень для красоты */
    }
}
