/* Шрифт и фон задаёт brand.css — здесь только страница товара */
.container { max-width: 1200px; margin: auto; padding: 20px; }

/* Основной товар */
.product-main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius, 16px);
    padding: 20px;
}

.product-image { flex: 1 1 400px; text-align: center; }
.product-image img { max-width: 100%; border-radius: var(--radius, 16px); }

.product-info { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.product-info h1 { margin: 0; font-size: 1.7rem; letter-spacing: -0.02em; color: var(--ink, #0f172a); }

.product-price { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink, #0f172a); }

.btn { display: inline-block; padding: 13px 20px; border-radius: var(--radius-sm, 10px); font-weight: 600; text-decoration: none; color: #fff; text-align: center; margin-top: 10px; }
.btn-buy-main { background-color: var(--brand, #2563eb); }
.btn-buy-main:hover { background-color: var(--brand-dark, #1d4ed8); color: #fff; }
.btn-details-main { background-color: #334155; }
.btn-details-main:hover { background-color: #1e293b; color: #fff; }

.product-description { margin-top: 20px; font-size: 1rem; color: #555; }

/* Другие товары */
.other-products { margin-top: 40px; }
.other-products h2 { text-align: center; margin-bottom: 20px; }
.other-products-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }

/* Похожие товары — та же сетка «8 в ряд», что и в каталоге */
.other-products-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1600px) { .other-products-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1280px) { .other-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .other-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .other-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.other-products-grid .card {
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius, 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.other-products-grid .card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.1); }

.card img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; background: #f1f5f9; }

.card h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin: 10px 12px 0;
    /* Две строки — иначе карточки в ряду разной высоты */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card .price-new { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 12px 10px; color: var(--ink, #0f172a); }

.card .card-buttons { margin-top: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card .btn-buy-other,
.card .btn-details-other {
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm, 10px);
    text-decoration: none;
    color: #fff;
}
.card .btn-buy-other { background-color: var(--brand, #2563eb); }
.card .btn-buy-other:hover { background-color: var(--brand-dark, #1d4ed8); color: #fff; }
.card .btn-details-other { background-color: #f1f5f9; color: var(--ink, #0f172a); }
.card .btn-details-other:hover { background-color: #e2e8f0; color: var(--ink, #0f172a); }

@media(max-width:768px){ .product-main{ flex-direction: column; } }