/**
 * Основные стили для публичных страниц
 * Основаны на оригинальных стилях из kokudey.com
 */

/* ========== Переменные ========== */
:root {
    --primary-color: #2e2e2e;
    --primary-red: #c10f0f;
    --secondary-color: rgba(0, 0, 0, 0.4);
    --border-color: #cbcbcb;
    --bg-light: #f8f8f8;
    --bg-section: #f5f5f5;
    --text-dark: #2e2e2e;
    --text-light: rgba(0, 0, 0, 0.4);
    --white: #ffffff;
    --error-color: #e32c2b;
    --success-color: #4caf50;
}

/* ========== Базовые стили ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    padding: 0;
}

/* ========== Типографика ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-red);
}

/* ========== Кнопки ========== */
.btn,
button {
    font-size: 13px;
    letter-spacing: 1.3px;
    line-height: 19px;
    font-weight: 700;
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 0;
    text-transform: uppercase;
    padding: 1.1em 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn:hover,
button:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn--subdued {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn--subdued:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn--loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Формы ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--white);
    transition: border-color 0.3s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 46, 46, 0.1);
}

.form-control.error,
input.error,
select.error,
textarea.error {
    border-color: var(--error-color);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========== Хлебные крошки ========== */
.breadcrumbs {
    padding: 16px 32px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
}

.breadcrumbs li {
    display: inline-block;
    color: var(--text-light);
}

.breadcrumbs li:after {
    content: '/';
    margin: 0 8px;
    font-weight: 400;
    color: var(--text-light);
}

.breadcrumbs li:last-child:after {
    display: none;
}

.breadcrumbs li a {
    color: var(--text-light);
    text-decoration: underline;
}

.breadcrumbs li:last-child {
    font-weight: 700;
    color: var(--text-dark);
}

/* ========== Контейнеры ========== */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 40px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========== Карточки товаров ========== */
.product-card {
    background: var(--bg-section);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    background: var(--white);
    display: block;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-name {
    font-size: 14px;
    line-height: 18px;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 400;
}

.product-name a {
    color: var(--text-dark);
    text-decoration: none;
}

.product-name a:hover {
    color: var(--primary-red);
}

.product-price {
    margin-top: 8px;
}

.price-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.price-old {
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 10px;
    font-weight: normal;
}

.discount {
    color: var(--primary-red);
    font-size: 12px;
    font-weight: 700;
}

/* ========== Сетка товаров ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 20px 0;
}

@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px 0;
    }
}

/* ========== Уведомления ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: var(--white);
    font-size: 14px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

.notification--success {
    background: var(--success-color);
}

.notification--error {
    background: var(--error-color);
}

.notification--info {
    background: #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== Загрузка ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Адаптивность ========== */
@media (max-width: 999px) {
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 21px 0;
    }
    
    .breadcrumbs {
        padding: 8px 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .btn {
        padding: 1.1em 2em;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .product-card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* ========== Утилиты ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ========== Специфичные стили для страниц ========== */
.page-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

@media (max-width: 767px) {
    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}


