/* Основные стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

/* Заголовок (Header) */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

header nav {
    margin-top: 10px;
}

header nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

header nav a:hover {
    text-decoration: underline;
}

/* Стили для футера */
footer {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
}

footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: #333;
    color: #fff;
}

.footer-column {
    flex: 1;
    margin-right: 20px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 5px;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}

/* Стили для главной страницы */
.homepage .products-container, .products-page .products-container, .category-page .products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
}

.homepage .product-card, .products-page .product-card, .category-page .product-card {
    width: 23%;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    box-sizing: border-box;
}

.homepage .product-card img, .products-page .product-card img, .category-page .product-card img {
    width: 100%;
    height: auto;
}

.homepage .product-info, .products-page .product-info, .category-page .product-info {
    margin-top: 10px;
    text-align: left;
}

.homepage .product-name, .products-page .product-name, .category-page .product-name {
    font-size: 18px;
    margin-bottom: 10px;
}

.homepage .product-price, .products-page .product-price, .category-page .product-price {
    font-size: 16px;
    color: #e60000;
    margin-bottom: 10px;
    text-align: center;
}

.homepage .rating, .products-page .rating, .category-page .rating {
    margin-bottom: 10px;
}

.homepage .rating .star, .products-page .rating .star, .category-page .rating .star {
    color: orange;
}

.homepage .details-button, .products-page .details-button, .category-page .details-button {
    display: inline-block;
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 10px 20px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.homepage .details-button:hover, .products-page .details-button:hover, .category-page .details-button:hover {
    background-color: #cc5200;
}

/* Адаптивные карточки товаров */
@media (max-width: 1200px) {
    .homepage .product-card, .products-page .product-card, .category-page .product-card {
        width: 31%;
    }
}

@media (max-width: 768px) {
    .homepage .product-card, .products-page .product-card, .category-page .product-card {
        width: 48%;
    }
}

@media (max-width: 480px) {
    .homepage .product-card, .products-page .product-card, .category-page .product-card {
        width: 100%;
    }
}

/* Страница товара */
.product-page .product-container.single-product {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
    background: #fff;
    margin: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-page .product-card {
    display: flex;
    width: 100%;
    align-items: flex-start;
}

.product-page .product-images {
    flex: 0 0 50%;
    max-width: 50%;
    margin-right: 20px;
}

.product-page .product-images img {
    width: 100%;
    height: auto;
}

.product-page .product-details {
    flex: 1;
}

.product-page .product-details h1, .product-page .product-details h2 {
    font-size: 24px;
    margin: 0 0 10px;
}

.product-page .product-price {
    font-size: 20px;
    margin: 10px 0;
    text-align: left;
}

.product-page .product-price .old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 18px;
}

.product-page .product-price .new-price {
    color: #e60000;
    font-weight: bold;
    font-size: 22px;
}

.product-page .rating {
    margin: 10px 0;
}

.product-page .rating .star {
    color: orange;
}

.product-page .button-container {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.product-page .buy-button, .product-page .buy-one-click {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.product-page .buy-button {
    background-color: #ff6600;
    color: #fff;
}

.product-page .buy-button:hover {
    background-color: #cc5200;
}

.product-page .buy-one-click {
    background-color: #f00;
    color: #fff;
}

.product-page .buy-one-click:hover {
    background-color: #cc0000;
}

.product-page .product-description, .product-page .product-specs {
    margin: 20px 0;
}

.product-page .related-products {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 40px;
}

.product-page .related-product-card {
    flex: 0 0 18%;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.product-page .related-product-card img {
    width: 100%;
    height: auto;
}

.product-page .related-product-info {
    margin-top: 10px;
    text-align: left;
}

.product-page .related-product-name {
    font-size: 16px;
    margin-bottom: 5px;
}

.related-product-price {
    font-size: 14px;
    color: #e60000;
    margin-bottom: 5px;
}

.related-product-price .old-price-small {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.related-rating .star {
    color: orange;
}

.product-page .related-details-button {
    display: inline-block;
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 5px 10px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.product-page .related-details-button:hover {
    background-color: #cc5200;
}

/* Баннер скидки */
.discount-banner {
    background-color: #ffe0b2;
    color: #d84315;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
}