* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #faf8f5;
    color: #2d2d2d;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Бегущая строка */
.marquee-wrapper {
    background: linear-gradient(90deg, #1a1a2e, #c9a227, #1a1a2e);
    background-size: 200% 100%;
    animation: goldShift 4s ease infinite;
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
}

@keyframes goldShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.marquee {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

.marquee span {
    display: inline-block;
    margin-right: 60px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    color: #f5e6c8;
    text-transform: uppercase;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Шапка */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.06);
}

.logo {
    height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(201, 162, 39, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(201, 162, 39, 0.6)); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

.header-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 11px;
    color: rgba(245, 230, 200, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: #f5e6c8;
}

.info-value.phone {
    color: #c9a227;
    text-decoration: none;
}

.cart-btn {
    background: linear-gradient(135deg, #a8871c, #7d6200);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 135, 28, 0.4);
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 135, 28, 0.6);
}

.cart-count {
    background: white;
    color: #a8871c;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

/* Категории */
.categories-nav {
    padding: 40px 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.category-card span {
    font-weight: 700;
    font-size: 16px;
    color: #2d2d2d;
}

.category-card:hover,
.category-card.active {
    border-color: #c9a227;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
}

.category-card:hover img {
    transform: rotate(5deg) scale(1.1);
}

/* Каталог */
.catalog {
    padding: 50px 0;
    min-height: 60vh;
}

.category-section {
    margin-bottom: 60px;
    text-align: center;
}

.category-title {
    font-size: 32px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #c9a227;
    display: inline-block;
    color: #1a1a2e;
    font-weight: 800;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    text-align: left;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card.visible:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.product-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-weight {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 12px;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: #c9a227;
    margin-bottom: 15px;
}

.add-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #a8871c, #7d6200);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(168, 135, 28, 0.5);
}

/* Вращающийся круг с надписью */
.section-badge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
}

.section-badge svg {
    width: 100%;
    height: 100%;
    animation: spin 16s linear infinite;
}

.section-badge text {
    fill: #8f6f00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.badge-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #333;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s;
}

.modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a2e;
}

.modal h3 {
    margin: 20px 0 15px;
    font-size: 20px;
    color: #1a1a2e;
}

/* Корзина */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #a8871c;
    font-size: 14px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #a8871c;
    border-color: #a8871c;
    color: white;
}

.cart-total {
    font-size: 20px;
    font-weight: 800;
    text-align: right;
    margin: 20px 0;
    color: #a8871c;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #a8871c, #7d6200);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(168, 135, 28, 0.5);
}

.clear-btn {
    width: 100%;
    padding: 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    border-color: #a8871c;
    color: #a8871c;
}

/* Форма */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #333;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #c9a227;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 2px;
    accent-color: #c9a227;
}

.checkbox-label a {
    color: #a8871c;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.5);
}

/* Доставка / самовывоз */
.delivery-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 10px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: center;
    transition: all 0.3s;
}

.radio-card span small {
    font-size: 12px;
    font-weight: 500;
    color: #888;
}

.radio-card input:checked + span {
    border-color: #a8871c;
    background: #fdf6e3;
    box-shadow: 0 4px 15px rgba(168, 135, 28, 0.2);
}

/* Политика конфиденциальности */
.privacy-modal {
    max-width: 700px;
}

.privacy-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.privacy-content h3 {
    margin: 20px 0 10px;
    font-size: 16px;
    color: #a8871c;
}

.privacy-content p {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Лайтбокс — просмотр фото */
#lightbox {
    cursor: zoom-out;
}

.lightbox-content {
    text-align: center;
    animation: slideUp 0.3s ease;
}

#lightboxImg {
    max-width: 90vw;
    max-height: 78vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

#lightboxTitle {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-top: 15px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 42px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s;
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Плавающая кнопка корзины */
.floating-cart {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #a8871c, #7d6200);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(168, 135, 28, 0.5);
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.floating-cart:hover {
    transform: scale(1.1);
}

.floating-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #a8871c;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

/* Стрелка вверх */
.scroll-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #a8871c, #7d6200);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top svg {
    animation: floaty 2s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(2px); }
    50% { transform: translateY(-3px); }
}

.scroll-top:hover {
    transform: scale(1.1);
}

/* Футер */
.footer {
    background: #1a1a2e;
    padding: 40px 0 20px;
    margin-top: 60px;
    color: #f5e6c8;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #c9a227;
}

.footer-info p {
    color: rgba(245, 230, 200, 0.7);
    margin-bottom: 5px;
}

.footer-info a {
    color: #c9a227;
    text-decoration: none;
}

.footer-links a {
    color: rgba(245, 230, 200, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #c9a227;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(245, 230, 200, 0.2);
    color: rgba(245, 230, 200, 0.5);
    font-size: 14px;
}

/* Пустая корзина */
.empty-cart {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.empty-cart-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        height: 60px;
        max-width: 200px;
    }

    .logo-section {
        flex-direction: column;
    }

    .header-info {
        flex-direction: column;
        gap: 10px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-btn {
        display: none;
    }

    .floating-cart {
        display: flex;
    }

    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 20px;
        margin: 10px;
    }

    .logo {
        height: 50px;
    }

    .delivery-toggle {
        grid-template-columns: 1fr;
    }
}