/* Прижимаем футер к низу */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8b500;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e429f 100%);
}

.min-vh-80 {
    min-height: 80vh;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('/images/hero-pattern.svg') no-repeat right top;
    opacity: 0.1;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover .card-overlay {
    opacity: 1;
}

.overlay-buttons {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-card:hover .overlay-buttons {
    transform: translateY(0);
}

/* Простая анимация для статистики */
.stats-section-simple {
    animation: fadeInUp 0.8s ease-out;
}

.animate-title {
    animation: slideInDown 0.8s ease-out 0.3s both;
}

.animate-stat {
    animation: bounceIn 0.8s ease-out both;
}

.stat-number-wrapper {
    position: relative;
    display: inline-block;
}

.stat-number-wrapper::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #f8b500;
    animation: lineExpand 0.8s ease-out 0.5s both;
}

/* Компактные анимации для статистики */
.hero-stats .row > div {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.hero-stats .row > div:nth-child(1) { animation-delay: 0.2s; }
.hero-stats .row > div:nth-child(2) { animation-delay: 0.3s; }
.hero-stats .row > div:nth-child(3) { animation-delay: 0.4s; }
.hero-stats .row > div:nth-child(4) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Легкая пульсация для 24/7 */
.stat-pulse {
    display: inline-block;
    animation: gentlePulse 3s infinite ease-in-out;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Эффект при наведении */
.stat-compact:hover h3 {
    color: #f8b500 !important;
    transition: color 0.3s ease;
}

.stat-compact:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes lineExpand {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Анимация пульсации для 24/7 */
.pulse {
    animation: pulseEffect 2s infinite;
    display: inline-block;
}

@keyframes pulseEffect {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(44, 90, 160, 0.7);
    }
    70% {
        transform: scale(1.1);
        text-shadow: 0 0 20px rgba(44, 90, 160, 0);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(44, 90, 160, 0);
    }
}

/* Эффект при наведении */
.animate-stat:hover h2 {
    color: #f8b500 !important;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.animate-stat:hover .stat-number-wrapper::after {
    width: 80px;
    background: #2c5aa0;
}

/* Стили для фотографий команды */
.team-photo-container {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid #f8b500;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.team-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-member:hover .team-photo-container img {
    transform: scale(1.05);
}

/* Bootstrap 5.2+ имеет класс object-fit-cover, но на всякий случай: */
.object-fit-cover {
    object-fit: cover !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .team-photo-container {
        width: 100px;
        height: 100px;
    }
}

/* Сверхкомпактные бейджи */
.product-badge {
    position: absolute;
    padding: 5px 6px; /* Минимальные отступы */
    border-radius: 15px; /* Немного меньше скругление */
    font-size: 0.7rem; /* Чуть меньше шрифт */
    font-weight: 700; /* Жирнее для лучшей читаемости */
    color: white;
    line-height: 1;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* Ограничиваем ширину */
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Для скидки (-15%) делаем еще компактнее */
.product-badge.bg-success {
    top: 10px;
    left: 10px;
    min-width: 40px;
    padding: 5px 5px;
    font-size: 0.65rem;
}

/* Для текстовых бейджей */
.product-badge:not(.bg-success) {
    top: 10px;
    right: 10px;
    min-width: 45px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .product-badge {
        max-width: 50px;
        padding: 4px 5px;
        font-size: 0.65rem;
        border-radius: 12px;
    }
    
    .product-badge:not(.bg-success) {
        min-width: 40px;
    }
    
    .product-badge.bg-success {
        min-width: 35px;
        font-size: 0.6rem;
    }
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.category-icon {
    width: 100px;
    height: 100px;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

/* Social Links */
.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color) !important;
}

/* Text Colors */
.text-light-50 {
    color: rgba(255,255,255,0.8) !important;
}

.text-light-50:hover {
    color: white !important;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1050;
    max-width: 400px;
    margin: 0 auto;
}

.cookie-content {
    padding: 20px;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Page Header */
.page-header {
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('/images/pattern.svg') no-repeat right top;
    opacity: 0.1;
}

/* Contact Page */
.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.map-placeholder {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* About Page */
.team-member {
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

/* Products Page */
.form-check-label {
    cursor: pointer;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Privacy Page */
.privacy-content h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.privacy-content ul {
    padding-left: 20px;
}

.privacy-content ul li {
    margin-bottom: 8px;
}

/* Terms Page Styles */
.terms-section {
    border-left: 4px solid var(--primary-color);
    padding-left: 0;
}

.terms-section h4 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.terms-content ul {
    padding-left: 20px;
}

.terms-content ul li {
    margin-bottom: 8px;
    position: relative;
}

.terms-content ul li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Убираем стрелки у числовых полей */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Для Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Дополнительно можно стилизовать поле ввода */
.quantity-input {
    text-align: center;
    font-weight: bold;
    border-left: none;
    border-right: none;
    border-color: #dee2e6;
}

.quantity-input:focus {
    box-shadow: none;
    border-color: #86b7fe;
}

/* Alert customization */
.alert-info {
    border-left: 4px solid #0dcaf0;
}

/* Анимация для счетчика корзины */
.cart-badge.update {
    transform: scale(1.3);
    transition: transform 0.3s ease;
}

/* Плавное появление/исчезновение счетчика */
#cart-counter {
    transition: all 0.3s ease;
}

/* Центрирование меню */
.navbar-nav.mx-auto {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Карусель - исправленные стили */
#heroCarousel {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.carousel-item {
    min-height: 500px;
}

.slide-content {
    min-height: 500px;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Индикаторы */
.carousel-indicators {
    bottom: 20px;
    margin: 0;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    border: 2px solid white;
    background-color: transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: white;
    opacity: 1;
    transform: scale(1.2);
}

.carousel-indicators button:hover {
    opacity: 1;
}

/* Кнопки навигации */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* Статистика */
.hero-stats {
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: -15px;
    position: relative;
    z-index: 10;
}

.hero-stats h3 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    color: #2c5aa0;
}

.hero-stats small {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Анимации для контента карусели */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 991.98px) {
    .navbar-nav.mx-auto {
        position: static;
        transform: none;
    }
    
    .carousel-item,
    .slide-content {
        min-height: 450px;
    }
    
    .hero-stats h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon {
        width: 80px;
        height: 80px;
    }
    
    .carousel-item,
    .slide-content {
        min-height: 400px;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-buttons .btn.me-3 {
        margin-right: 0 !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    
    .hero-stats {
        padding: 20px;
        margin-top: 0;
    }
    
    .hero-stats .row > div {
        margin-bottom: 15px;
    }
    
    .terms-section {
        margin-left: 0;
        padding-left: 15px;
    }
    
    .terms-section h4 {
        font-size: 1.2rem;
    }
}