/* === Общие стили === */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* === Шапка сайта (header) === */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
}

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

header nav {
    margin-top: 8px;
}

header nav a {
    color: #fff;
    margin: 0 10px;
}

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

/* === Футер сайта (footer) === */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

footer a {
    color: #fff;
    margin: 0 10px;
}

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

/* === Стили общих секций товаров на главной, категориях и страницах списка === */
.products-section {
    padding: 20px;
}

.products-section h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

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

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

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

.product-name {
    font-size: 18px;
    margin: 0 0 10px;
}

.product-price {
    font-size: 16px;
    color: #e60000;
    margin: 0 0 10px;
    text-align: center;
}

.rating {
    margin: 0 0 10px;
}

.rating .star {
    color: orange;
}

.details-button {
    display: inline-block;
    background-color: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

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

/* === Адаптивность для карточек === */
@media (max-width: 1200px) {
    .product-card { width: 31%; }
}
@media (max-width: 768px) {
    .product-card { width: 48%; }
}
@media (max-width: 480px) {
    .product-card { width: 100%; }
}

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

.product-page .product-images {
    flex: 1 1 45%;
    max-width: 45%;
}

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

.product-page .product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.product-page .product-thumbs .thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #ccc;
}

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

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

.product-page .discount-banner {
    background-color: #ffe0b2;
    color: #d84315;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

.product-page .product-price {
    font-size: 20px;
    margin: 15px 0;
}

.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 .product-description {
    margin: 20px 0;
    line-height: 1.6;
}

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

.product-page .product-specs h3 {
    margin-bottom: 10px;
}

.product-page .product-specs ul {
    list-style: disc inside;
    padding: 0;
}

.product-page .product-specs li {
    margin-bottom: 5px;
}

/* === Кнопки покупки на странице товара === */
.product-page .button-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.buy-button,
.buy-one-click {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
}

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

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

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

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

/* === Блок похожих товаров/витрин === */
.related-products {
    margin-top: 40px;
}

.related-products h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.related-products .products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

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

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

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

.related-product-info h4 {
    font-size: 16px;
    margin: 0 0 8px;
}

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

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

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

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

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