/* ========== ОСНОВНЫЕ ЦВЕТА ========== */
:root {
    --primary: #1a2b4a;
    --primary-dark: #0f1a2e;
    --accent: #f39c12;
    --accent-hover: #e67e22;
    --bg: #FFF3E0;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --border: #e0dcd7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.15);
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
html, body {
    height: 100%;
}
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1 0 auto;
}

/* ========== ШАПКА ========== */
.header {
    background: #1a2b4a;                  /* сплошной тёмно-синий */
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Кнопки в шапке */
.header .btn-outline-primary {
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
}
.header .btn-outline-primary:hover {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.header .btn-primary {
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
}
.header .btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ========== ТЕКСТОВЫЙ ЛОГОТИП ========== */
.logo-text {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-block;
}
.logo-blue {
    color: #6b8ec9;    /* светло-синий */
}
.logo-orange {
    color: #f39c12;    /* оранжевый */
}
.logo-text:hover .logo-blue,
.logo-text:hover .logo-orange {
    opacity: 0.9;
}

/* ========== КНОПКИ ОБЩИЕ ========== */
.btn-primary {
    background: linear-gradient(135deg, #1a2b4a 0%, #0f1a2e 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0f1a2e 0%, #0a1220 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.btn-outline-primary {
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.btn-success {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-success:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* ========== КАРТОЧКИ ТОВАРОВ ========== */
.product-card {
    background: var(--card-bg);
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.product-card img {
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.product-card .card-title a {
    color: var(--primary);
    text-decoration: none;
}
.product-card .card-title a:hover {
    color: var(--accent-hover);
}
.product-card .current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.product-card .old-price {
    font-size: 1rem;
    color: #999;
}
.discount {
    font-size: 0.8rem;
    font-weight: 700;
    background: #e74c3c;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    margin-left: 6px;
}

/* Бейдж "Новинка" */
.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-detail-img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.characteristics-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}
.characteristics-table td:first-child {
    font-weight: 700;
    background: #faf8f6;
    width: 40%;
}

/* ========== ЛИЧНЫЙ КАБИНЕТ ========== */
.nav-tabs .nav-link {
    color: var(--text);
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s;
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
    background: transparent;
}
.nav-tabs .nav-link:hover {
    border-bottom-color: var(--accent);
}

/* ========== ИЗБРАННОЕ ========== */
.toggle-favorite.active {
    background-color: #ffe0b3;
    border-color: var(--accent);
    color: var(--primary);
}

/* ========== АДМИН-ПАНЕЛЬ ========== */
.pickup-code {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
}

/* ========== ФУТЕР ========== */
.footer {
    background: #1a2b4a;
    color: #ffffff;
    flex-shrink: 0;
}
.footer h5 {
    color: #f39c12;
    font-weight: 700;
}
.footer a,
.footer .footer-link {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover,
.footer .footer-link:hover {
    color: #f39c12 !important;
}
.footer p,
.footer small {
    color: #ffffff;
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.breadcrumb a {
    color: #1a2b4a;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #f39c12;
}

/* ========== КНОПКА НАВЕРХ ========== */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: #f39c12;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
}
.btn-scroll-top:hover {
    background: #e67e22;
    transform: translateY(-3px);
}

/* ========== УЛУЧШЕННАЯ ПАГИНАЦИЯ ========== */
.pagination {
    gap: 5px;
}
.pagination .page-link {
    border: none;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    transition: all 0.3s;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    color: #fff;
}
.pagination .page-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ========== УЛУЧШЕННЫЕ ФОРМЫ ========== */
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25);
}

/* ========== АНИМАЦИЯ КАРТОЧЕК (stagger) ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Задержка для каждой карточки */
.col-md-6.col-lg-4:nth-child(1) .product-card { animation-delay: 0.05s; }
.col-md-6.col-lg-4:nth-child(2) .product-card { animation-delay: 0.1s; }
.col-md-6.col-lg-4:nth-child(3) .product-card { animation-delay: 0.15s; }
.col-md-6.col-lg-4:nth-child(4) .product-card { animation-delay: 0.2s; }
.col-md-6.col-lg-4:nth-child(5) .product-card { animation-delay: 0.25s; }
.col-md-6.col-lg-4:nth-child(6) .product-card { animation-delay: 0.3s; }
.col-md-6.col-lg-4:nth-child(7) .product-card { animation-delay: 0.35s; }
.col-md-6.col-lg-4:nth-child(8) .product-card { animation-delay: 0.4s; }
.col-md-6.col-lg-4:nth-child(9) .product-card { animation-delay: 0.45s; }
.col-md-6.col-lg-4:nth-child(10) .product-card { animation-delay: 0.5s; }
.col-md-6.col-lg-4:nth-child(11) .product-card { animation-delay: 0.55s; }
.col-md-6.col-lg-4:nth-child(12) .product-card { animation-delay: 0.6s; }

/* ========== РЕЙТИНГ БРЕНДА ========== */
.brand-rating {
    display: inline-flex;
    align-items: center;
    background: #f39c12;
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 767px) {
    .logo-text {
        font-size: 1.5rem;
    }
    .product-card img {
        height: 180px;
    }
    .product-card .card-title {
        font-size: 1rem;
    }
    .product-card .current-price {
        font-size: 1.2rem;
    }
    .product-card .btn-primary {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    .d-flex.gap-2.mt-4 {
        flex-wrap: wrap;
    }
    .d-flex.gap-2.mt-4 .btn {
        flex: 1 1 45%;
        margin-bottom: 8px;
    }
    .filter-toggle {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    .collapse.d-md-block {
        display: none;
    }
    .collapse.show {
        display: block;
    }
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}