* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

:root {
    --primary-color: #1a3a5f;
    --secondary-color: #ff6b35;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark-mode {
    --primary-color: #2c5282;
    --secondary-color: #ff8c5a;
    --bg-color: #1a1a2e;
    --text-color: #f0f0f0;
    --card-bg: #16213e;
    --border-color: #2d3748;
    --shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    transition: var(--transition);
    min-height: 100vh;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes glow {
    from { box-shadow: 0 0 10px var(--secondary-color); }
    to { box-shadow: 0 0 20px var(--secondary-color); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Шапка */
header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 15px 15px;
    margin-bottom: 30px;
    animation: slideIn 0.8s ease-out;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(45deg, white, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    transition: var(--transition);
    z-index: -1;
}

nav a:hover::before {
    left: 0;
}

nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.theme-toggle {
    background: transparent;
    border: 2px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.theme-toggle:hover {
    background: white;
    color: var(--primary-color);
    transform: rotate(180deg);
}

.cart-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    font-weight: 600;
}

.cart-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255,107,53,0.3);
    animation: pulse 0.5s ease;
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease;
}

/* Герой */
#home {
    background: linear-gradient(135deg, var(--primary-color), #2c5282);
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out;
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

#home h2 {
    font-size: 42px;
    margin-bottom: 20px;
    animation: fadeIn 1.2s ease-out 0.3s both;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#home p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeIn 1.4s ease-out 0.6s both;
}

.btn {
    background: var(--secondary-color);
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255,107,53,0.4);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Поиск */
.search {
    display: flex;
    margin: 30px 0;
    gap: 15px;
    animation: fadeIn 1s ease-out;
}

.search input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 16px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: var(--transition);
}

.search input:focus {
    outline: none;
    border-color: var(--secondary-color);
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255,107,53,0.1);
}

.search button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.search button:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Секции */
section {
    background: var(--card-bg);
    padding: 40px;
    margin: 30px 0;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 32px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Товары */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product {
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeIn 0.6s ease-out;
    position: relative;
    border: 1px solid var(--border-color);
}

.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}
.product:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product:hover img {
    transform: scale(1.1);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.product-info {
    padding: 20px;
}

.product h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
}

.price {
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 700;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price::before {
    content: '₽';
    font-size: 18px;
    opacity: 0.8;
}

.add-cart {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-cart:hover {
    background: var(--secondary-color);
    letter-spacing: 1px;
}

.add-cart:active {
    animation: shake 0.3s ease;
}

/* О нас */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 32px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

/* Контакты */
.contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    background: var(--primary-color);
    color: white;
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 20px;
}

/* Подвал */
footer {
    text-align: center;
    padding: 30px;
    background: var(--primary-color);
    color: white;
    margin-top: 40px;
    border-radius: 15px 15px 0 0;
    animation: fadeIn 1s ease-out;
}

/* Корзина */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 1000;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--secondary-color);
}

.cart-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.cart-content h3 {
    color: var(--primary-color);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 24px;
}

#cartItems {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--bg-color);
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
    border-left: 4px solid var(--secondary-color);
}

.cart-item:hover {
    transform: translateX(5px);
}

.remove {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
}

.remove:hover {
    background: #cc0000;
    transform: rotate(90deg);
}

.total {
    padding-top: 20px;
    border-top: 2px solid var(--primary-color);
}

.total p {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cart-buttons {
    display: flex;
    gap: 10px;
}
.cart-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.checkout-btn {
    background: var(--secondary-color);
    color: white;
}

.checkout-btn:hover {
    background: #ff8c5a;
    animation: glow 1s infinite alternate;
}

.close-btn {
    background: #6c757d;
    color: white;
}

.close-btn:hover {
    background: #5a6268;
}

/* Плавающие кнопки */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 99;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.floating-btn.whatsapp {
    background: #25D366;
    animation-delay: 0.5s;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 1001;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 2.7s;
    box-shadow: var(--shadow);
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cart-modal {
        width: 100%;
    }
    
    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }
}