/* ----- Цветовая палитра (эко-стиль для админки + яркая витрина) ----- */
:root {
    --primary: #4a7c59;        /* тёмно-зелёный */
    --primary-light: #6a9c79;
    --accent: #a3b18a;         /* светло-зелёный */
    --accent-dark: #8a9e72;
    --bg: #f7f4ee;             /* бежевый фон для всей страницы */
    --card-bg: #ffffff;
    --text: #3d3d3d;
    --text-light: #6b6b6b;
    --shadow: 0 8px 24px rgba(0,0,0,0.06);
    --radius: 14px;
    --transition: 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
}
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
}
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5px;
}
a {
    text-decoration: none;
    color: inherit;
}

/* ----- Хедер (яркий, с градиентом) ----- */
/* ----- Шапка (парящий блок) ----- */
/* ----- Шапка (парящий блок, ширина как у контента) ----- */
header {
    margin: 20px auto 0 auto;
    max-width: 1300px;
	width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #4a7c59 0%, #2c5e3f 100%);
    color: #fff;
    padding: 0;
}

header .container {
    padding: 8px 10px;
    max-width: 100%; /* чтобы не ограничивать внутренний контейнер */
}

/* ----- Подвал (парящий блок, ширина как у контента) ----- */
footer {
    margin: -20px auto 20px auto;
    max-width: 1300px;
	width: 100%;
    border-radius: 20px;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.08);
    background: var(--primary);
    color: #ecf0f1;
    padding: 0;
}

footer .container {
    padding: 8px 50px;
    max-width: 100%;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    header {
        margin: 10px auto 0 auto;
        border-radius: 15px;
        max-width: calc(100% - 20px);
    }
    footer {
        margin: 0 auto 10px auto;
        border-radius: 15px;
        max-width: calc(100% - 20px);
    }
    header .container,
    footer .container {
        padding: 12px 16px;
    }
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}
.logo h1 i {
    color: #f1c40f;
    margin-right: 8px;
}
.slogan {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 2px;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.main-nav ul li a {
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    border-bottom-color: #f1c40f;
}
.social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.social-icon {
    color: #fff;
    font-size: 1.4rem;
    transition: var(--transition);
    opacity: 0.8;
}
.social-icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ----- Фильтр ----- */
.filter-section {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 30px 0 25px;
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 18px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}
.filter-group input,
.filter-group select {
    padding: 6px 12px;
    font-size: 0.9rem;
    min-width: 120px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: var(--transition);
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}
.filter-form button,
.filter-form .btn-secondary {
    padding: 6px 18px;
    font-size: 0.9rem;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background: #e67e22;
    color: #fff;
}
.btn-primary:hover {
    background: #d35400;
}
.btn-secondary {
    background: #95a5a6;
    color: #fff;
}
.btn-secondary:hover {
    background: #7f8c8d;
}

/* ----- Сетка товаров (разноцветные карточки) ----- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
    margin: 30px 0 50px;
}
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 18px;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
    border-top: 5px solid #ccc; /* будет переопределено через nth-child */
}
.product-card:nth-child(1) { animation-delay: 0.05s; border-top-color: #e74c3c; }
.product-card:nth-child(2) { animation-delay: 0.1s; border-top-color: #f39c12; }
.product-card:nth-child(3) { animation-delay: 0.15s; border-top-color: #2ecc71; }
.product-card:nth-child(4) { animation-delay: 0.2s; border-top-color: #3498db; }
.product-card:nth-child(5) { animation-delay: 0.25s; border-top-color: #9b59b6; }
.product-card:nth-child(6) { animation-delay: 0.3s; border-top-color: #1abc9c; }
.product-card:nth-child(7) { animation-delay: 0.35s; border-top-color: #e67e22; }
.product-card:nth-child(8) { animation-delay: 0.4s; border-top-color: #e74c3c; }
.product-card:nth-child(9) { animation-delay: 0.45s; border-top-color: #2ecc71; }
.product-card:nth-child(10) { animation-delay: 0.5s; border-top-color: #3498db; }
/* и так далее */

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.product-card img {
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}
.product-card .no-image {
    height: 220px;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 10px;
    font-size: 1.1rem;
}
.product-card .no-image i {
    font-size: 3rem;
    color: #ccc;
    margin-right: 8px;
}
.product-card h2 {
    font-size: 1.2rem;
    margin: 10px 0 6px;
    font-weight: 600;
}
.product-card .price {
    font-size: 1.6rem;
    color: #e67e22;
    font-weight: 700;
    margin: 8px 0;
}
.product-card .price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
}
.product-card .description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    flex-grow: 1;
    margin: 10px 0;
}
.detail-btn {
    background: #34495e;
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    margin: 10px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.detail-btn:hover {
    background: #2c3e50;
}
.product-card .views {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.product-card .views i {
    margin-right: 4px;
}
.product-card .category-tag {
    display: inline-block;
    margin-top: 8px;
    background: var(--accent);
    color: #fff;
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}
.no-products {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-light);
    padding: 50px 0;
    grid-column: 1 / -1;
}
.no-products i {
    margin-right: 12px;
    color: var(--primary-light);
}

/* ----- Модалка (для просмотра товара) ----- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.modal-content {
    background: #fff;
    margin: 6% auto;
    padding: 35px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.close {
    position: absolute;
    right: 22px;
    top: 18px;
    font-size: 30px;
    font-weight: 300;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}
.close:hover {
    color: #000;
}
.detail-header h2 {
    margin: 0 0 15px 0;
    color: var(--primary);
}
.detail-body-flex {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.detail-image {
    flex: 0 0 220px;
}
.detail-image img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.detail-image .no-image {
    width: 100%;
    height: 220px;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 10px;
}
.detail-image .no-image i {
    font-size: 3rem;
    margin-right: 8px;
}
.detail-info {
    flex: 1;
}
.detail-info p {
    margin: 8px 0;
}
.detail-description {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    line-height: 1.6;
}
.detail-info .tiktok-link {
    display: inline-block;
    margin-top: 10px;
    background: #ff0050;
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    transition: var(--transition);
}
.detail-info .tiktok-link:hover {
    background: #cc0040;
}

/* ----- Админ-панель (зелёные цвета) ----- */
.admin-container {
    max-width: 1300px;
	width: 100%;
    margin: 10px auto;
    padding: 0 20px;
}
.admin-container header {
    background: var(--primary);
    color: #fff;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.admin-container header h1 {
    margin: 0;
    font-size: 1.7rem;
}
.admin-container header .logout {
    color: #f1c40f;
    font-weight: 600;
    transition: var(--transition);
}
.admin-container header .logout:hover {
    color: #f39c12;
}
.admin-container nav {
    background: #ecf0f1;
    padding: 12px 20px;
    border-radius: var(--radius);
    margin: 10px 0;
}
.admin-container nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.admin-container nav ul li a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.admin-container nav ul li a.active,
.admin-container nav ul li a:hover {
    border-bottom-color: var(--accent);
}
.admin-content {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 400px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
	weight:100%;
}
.section-header h2 {
    margin: 0;
    color: var(--primary);
}

/* ----- Таблицы админки ----- */
table {
    width: 100%;
	height: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    vertical-align: middle;
}
table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
}
table td img {
    border-radius: 6px;
    object-fit: cover;
}
table td i.fa-camera-slash {
    font-size: 1.5rem;
    color: #ccc;
}

/* ----- Кнопки админки ----- */
.btn-primary, .btn-secondary, .edit-btn, .delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-light);
}
.btn-secondary {
    background: #95a5a6;
    color: #fff;
}
.btn-secondary:hover {
    background: #7f8c8d;
}
.edit-btn {
    background: #f39c12;
    color: #fff;
}
.edit-btn:hover {
    background: #e67e22;
}
.delete-btn {
    background: #e74c3c;
    color: #fff;
}
.delete-btn:hover {
    background: #c0392b;
}

/* ----- Формы админки ----- */
.admin-form .form-group {
    margin-bottom: 18px;
}
.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--primary);
}
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="url"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}
.admin-form textarea {
    resize: vertical;
    min-height: 100px;
}
.admin-form .error {
    color: #e74c3c;
    margin-bottom: 15px;
}

/* ----- Логин (зелёный) ----- */
.login-form {
    max-width: 400px;
    margin: 120px auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 12px 48px rgba(0,0,0,0.08);
}
.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
}
.login-form input {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
.login-form button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.login-form button:hover {
    background: var(--primary-light);
}
.login-form .error {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 15px;
}

/* ----- Футер (зелёный) ----- */
footer .footer-links a {
    color: #d4e0d4;
    margin: 0 12px;
    transition: var(--transition);
}
footer .footer-links a:hover {
    color: #fff;
}

/* ----- Адаптивность ----- */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .main-nav ul {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group input,
    .filter-group select {
        min-width: unset;
    }
    .admin-container header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .admin-container nav ul {
        justify-content: center;
    }
    .admin-content {
        padding: 15px;
    }
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    table {
        font-size: 0.8rem;
    }
    table th, table td {
        padding: 8px 4px;
    }
    .admin-form input[type="text"],
    .admin-form input[type="number"],
    .admin-form input[type="url"],
    .admin-form textarea,
    .admin-form select {
        max-width: 100%;
    }
    .detail-body-flex {
        flex-direction: column;
    }
    .detail-image {
        flex: 0 0 auto;
        max-width: 100%;
    }
    .login-form {
        margin: 40px 20px;
    }
}
/* ----- Модалка деталей товара (для пользователя) ----- */
.detail-modal {
    max-width: 700px;
}
.detail-header h2 {
    margin: 0 0 15px 0;
    color: var(--primary);
}
.detail-body-flex {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.detail-image {
    flex: 0 0 auto;
    max-width: 500px;    /* максимум 500px на ПК */
    width: 100%;
	max-height: 500px;
	height: 100%;
}
.detail-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
    border-radius: 10px;
    object-fit: contain;  /* сохраняем пропорции */
}
.detail-image .no-image {
    width: 100%;
    height: 220px;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 10px;
}
.detail-image .no-image i {
    font-size: 3rem;
    margin-right: 8px;
}
.detail-info {
    flex: 1;
    min-width: 200px;
}
.detail-info p {
    margin: 8px 0;
}
.detail-description {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    line-height: 1.6;
}
.detail-info .tiktok-link {
    display: inline-block;
    margin-top: 10px;
    background: #ff0050;
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    transition: var(--transition);
}
.detail-info .tiktok-link:hover {
    background: #cc0040;
}

/* Адаптивность модалки */
@media (max-width: 768px) {
    .detail-body-flex {
        flex-direction: column;
    }
    .detail-image {
        max-width: 100%;
    }
    .detail-image img {
        max-width: 100%;
        max-height: 300px;
        object-fit: contain;
    }
}
/* ----- Страница товара (product.php) ----- */
.product-page {
    padding: 40px 0;
    min-height: 60vh;
}
.product-detail {
    display: flex;
    gap: 40px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 35px;
    align-items: flex-start;
}
.product-detail-image {
    flex: 0 0 auto;
    max-width: 500px;
    width: 100%;
}
.product-detail-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
    border-radius: 10px;
    object-fit: contain;
}
.product-detail-image .no-image {
    width: 100%;
    height: 300px;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 10px;
    font-size: 1.2rem;
}
.product-detail-image .no-image i {
    font-size: 3rem;
    margin-right: 10px;
}
.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.product-detail-info h1 {
    font-size: 2rem;
    margin: 0 0 8px 0;
    color: var(--primary);
}
.product-detail-info .price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e67e22;
}
.product-detail-info .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}
.product-detail-info .description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.7;
    margin: 5px 0 10px;
}
.product-detail-info .tiktok-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff0050;
    color: #fff;
    padding: 8px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
}
.product-detail-info .tiktok-link:hover {
    background: #cc0040;
}
.product-detail-info .btn-secondary {
    align-self: flex-start;
    padding: 8px 24px;
    border-radius: 30px;
    background: #95a5a6;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.product-detail-info .btn-secondary:hover {
    background: #7f8c8d;
}
.product-not-found {
    text-align: center;
    font-size: 1.5rem;
    padding: 60px 0;
    color: var(--text-light);
}
.product-not-found i {
    color: var(--primary-light);
    margin-right: 12px;
}
.product-not-found .btn-secondary {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    border-radius: 30px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}
.product-not-found .btn-secondary:hover {
    background: var(--primary-light);
}

/* Адаптивность для страницы товара */
@media (max-width: 768px) {
    .product-detail {
        flex-direction: column;
        padding: 20px;
        gap: 25px;
    }
    .product-detail-image {
        max-width: 100%;
        width: 100%;
    }
    .product-detail-image img {
        max-width: 100%;
        max-height: 300px;
        object-fit: contain;
    }
    .product-detail-info h1 {
        font-size: 1.6rem;
    }
    .product-detail-info .price {
        font-size: 1.8rem;
    }
    .product-page {
        padding: 20px 0;
    }
}
/* ----- Страницы контактов и соцсетей ----- */
.page-content {
    padding: 5px 0;
}
.page-content h1 {
    color: var(--primary);
    margin-bottom: 25px;
}
.contact-info p {
    margin: 12px 0;
    font-size: 1.1rem;
}
.contact-info i {
    width: 28px;
    color: var(--primary-light);
}
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 20px;
}
.social-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    transition: var(--transition);
}
.social-item:hover {
    transform: scale(1.03);
}
.social-item.telegram { background: #0088cc; }
.social-item.instagram { background: #e4405f; }
.social-item.vk { background: #4a76a8; }
.social-item.youtube { background: #ff0000; }
.social-item.facebook { background: #1877f2; }
.social-item.twitter { background: #000000; }
.social-item.whatsapp { background: #25d366; }
.social-item.viber { background: #7360f2; }
.social-item.tiktok {
    background: #000000;
    color: #ffffff;
}
.social-item.tiktok:hover {
    background: #1a1a1a;
}
/* ----- Страница товара (слева текст, справа фото) ----- */
.detail-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 35px;
    margin: 30px 0;
}

.detail-info {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-info h1 {
    font-size: 2rem;
    margin: 0 0 8px 0;
    color: var(--primary);
}

.detail-info .price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e67e22;
}

.detail-info .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.detail-info .detail-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.7;
    margin: 5px 0 10px;
}

.detail-info .tiktok-link {
    align-self: flex-start;
}

.detail-info .btn-primary {
    align-self: flex-start;
    padding: 8px 24px;
    border-radius: 30px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-info .btn-primary:hover {
    background: var(--primary-light);
}

.detail-image {
    flex: 0 0 400px;
    max-width: 400px;
}

.detail-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
}

.detail-image .no-image {
    width: 100%;
    height: 300px;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 10px;
    font-size: 1.2rem;
}

.detail-image .no-image i {
    font-size: 3rem;
    margin-right: 10px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column-reverse; /* на мобильных фото сверху, текст снизу */
        padding: 20px;
        gap: 25px;
    }

    .detail-image {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .detail-image img {
        max-height: 300px;
    }

    .detail-info h1 {
        font-size: 1.6rem;
    }

    .detail-info .price {
        font-size: 1.8rem;
    }

    .detail-info .tiktok-link,
    .detail-info .btn-primary {
        align-self: stretch;
        text-align: center;
        justify-content: center;
    }
}
/* ----- Новости на главной ----- */
.news-section {
    margin: 40px 0;
}
.news-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.news-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: transform var(--transition);
}
.news-card:hover {
    transform: translateY(-4px);
}
.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}
.news-card h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
}
.news-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.news-card .btn-primary {
    padding: 6px 18px;
    font-size: 0.9rem;
}
.news-card .news-date {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}	
/* ----- Страница новости ----- */
.news-detail h1 {
    color: var(--primary);
    margin-bottom: 15px;
}
.news-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.news-detail-image {
    margin: 20px 0;
    max-width: 700px;
}
.news-detail-image img {
    width: 100%;
    border-radius: 10px;
}
.news-detail-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 30px;
}