/* === КАРТОЧКИ ТОВАРОВ === */
.product-card {
    background: #ffffff;
    border: 1px solid rgba(202, 165, 95, 0.3);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(202,165,95,0.25);
}

/* Diagonal shimmer effect */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent, rgba(202,165,95,0.15), transparent);
    background-size: 400% 400%;
    animation: shimmer 5s linear infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Hover glow effect */
.product-card:hover {
    box-shadow: 0 8px 40px rgba(202,165,95,0.4);
    transform: translateY(-4px);
    border-color: rgba(202, 165, 95, 0.6);
}

.product-image {
    background: #faf6f0;
    position: relative;
    overflow: hidden;
}

.product-image img {
    transition: transform 0.6s ease, object-fit 0.3s ease, padding 0.3s ease;
    object-fit: contain; /* По умолчанию */
    padding: 10px; /* По умолчанию для contain */
}

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

.product-card .card-title {
    color: #351303;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.product-card .card-text {
    color: #351303;
}

.product-card .card-meta {
    color: rgba(53, 19, 3, 0.6);
}

/* === КНОПКИ === */
.btn-primary {
    background: #caa55f;
    color: #351303;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 8px 40px rgba(202,165,95,0.4);
    text-transform: uppercase;
    /*letter-spacing: 0.23em;*/
    font-size: 0.75rem;
    border: none;
}

.btn-primary:hover {
    background: #e0c98a;
    transform: translateY(-2px);
    box-shadow: 0 12px 50px rgba(202,165,95,0.5);
}

.btn-dark {
    background: linear-gradient(135deg, #351303 0%, #562a0e 100%);
    color: #f7efe8;
    border: 1px solid rgba(202, 165, 95, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-dark:hover {
    background: linear-gradient(135deg, #562a0e 0%, #5f3419 100%);
    border-color: #caa55f;
    color: #caa55f;
    box-shadow: 0 4px 12px rgba(202, 165, 95, 0.3);
}

.btn-light {
    background: #ffffff;
    color: #351303;
    border: 1px solid rgba(202, 165, 95, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-light:hover {
    background: rgba(202, 165, 95, 0.1);
    border-color: #caa55f;
    color: #caa55f;
    box-shadow: 0 4px 12px rgba(202, 165, 95, 0.2);
}

/* Переопределение для btn-light внутри dark-block */
.dark-block .btn-light {
    color: #351303;
}

.dark-block .btn-light:hover {
    color: #caa55f;
}

.btn-secondary {
    border: 1px solid rgba(202, 165, 95, 0.5);
    color: #caa55f;
    transition: all 0.3s ease;
    background: #ffffff;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.23em;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(202, 165, 95, 0.1);
    border-color: #caa55f;
    color: #caa55f;
    box-shadow: 0 4px 12px rgba(202, 165, 95, 0.2);
}

/* === ФИЛЬТРЫ === */
.filter-btn {
    border: 1px solid rgba(202, 165, 95, 0.4);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #351303 0%, #562a0e 100%);
    color: #f7efe8;
    border-radius: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #562a0e 0%, #5f3419 100%);
    border-color: #caa55f;
    color: #caa55f;
    box-shadow: 0 4px 12px rgba(202, 165, 95, 0.2);
}

/* === НАВИГАЦИЯ === */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
    color: #351303;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #caa55f;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #caa55f;
}

/* === ИЗБРАННОЕ === */
/* Активный фильтр избранного в шапке */
#favoriteButton.active-filter {
    background: rgba(202, 165, 95, 0.2);
    border-radius: 50%;
    padding: 0.5rem;
}

#favoriteButton.active-filter svg {
    fill: currentColor;
}

/* === ЗАГРУЗКА ИЗОБРАЖЕНИЙ === */
.image-placeholder {
    background: linear-gradient(
        135deg,
        rgba(202, 165, 95, 0.1) 0%,
        rgba(202, 165, 95, 0.2) 50%,
        rgba(202, 165, 95, 0.1) 100%
    );
    background-size: 200% 200%;
    animation: shimmer 2s infinite;
}

/* === ТЕМНЫЕ БЛОКИ === */
.dark-block {
    background: linear-gradient(135deg, #351303 0%, #562a0e 100%);
    border: 1px solid rgba(202, 165, 95, 0.2);
    border-radius: 0.75rem;
}

.dark-block .heading-font {
    color: #caa55f;
}

.dark-block, .dark-block * {
    color: #f7efe8;
}

/* === СВЕТЛЫЕ БЛОКИ === */
.light-block {
    background: #ffffff;
    border: 1px solid rgba(202, 165, 95, 0.25);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(202,165,95,0.25);
}

.light-block .heading-font {
    color: #caa55f;
}

.light-block, .light-block * {
    color: #351303;
}

/* === ДЕКОРАТИВНАЯ ЛИНИЯ === */
.decorative-line {
    width: 80px;
    height: 2px;
    background: #caa55f;
    opacity: 0.8;
}

/* === САЙДБАР === */
.sidebar-light {
    background: white;
    border: 1px solid rgba(202, 165, 95, 0.25);
    border-radius: 1rem;
    color: #351303;
    box-shadow: 0 4px 20px rgba(202,165,95,0.25);
}

.sidebar-light .heading-font {
    color: #caa55f;
}

/* === СЕЛЕКТ === */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23caa55f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem !important;
    background-color: #ffffff;
    color: #351303;
    border-color: rgba(202, 165, 95, 0.3);
    border-radius: 0.5rem;
}

select:focus {
    outline: none;
    border-color: #caa55f;
    box-shadow: 0 0 0 2px rgba(202, 165, 95, 0.2);
}

/* Селект внутри темного блока */
.dark-block select {
    background-color: rgba(110, 64, 33, 0.4);
    color: #f7efe8;
    border-color: rgba(202, 165, 95, 0.3);
}

.dark-block select:focus {
    border-color: #caa55f;
}

/* === СКРОЛЛ === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #fefaf5;
}

::-webkit-scrollbar-thumb {
    background: rgba(202, 165, 95, 0.4);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(202, 165, 95, 0.6);
}

/* === FOOTER SPOTLIGHT EFFECT === */
.footer-spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(202, 165, 95, 0.15),
        transparent 40%
    );
}

#footer:hover .footer-spotlight {
    opacity: 1;
}

/* === АКТИВНЫЕ ФИЛЬТРЫ === */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(202, 165, 95, 0.1);
    border: 1px solid rgba(202, 165, 95, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 400;
    color: #351303;
    transition: all 0.2s ease;
}

.filter-badge:hover {
    background: rgba(202, 165, 95, 0.2);
    border-color: rgba(202, 165, 95, 0.5);
}

.filter-badge-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(202, 165, 95, 0.3);
    transition: background 0.2s ease;
    cursor: pointer;
}

.filter-badge-remove:hover {
    background: rgba(202, 165, 95, 0.5);
}

.filter-badge-favorites {
    background: rgba(202, 165, 95, 0.15);
    border-color: #caa55f;
}

/* === SHADOW UTILITIES === */
.shadow-gold-soft {
    box-shadow: 0 4px 20px rgba(202,165,95,0.25);
}

.shadow-gold-strong {
    box-shadow: 0 8px 40px rgba(202,165,95,0.4);
}

/* === КНОПКА "ПЕРЕЙТИ В КОРЗИНУ" === */
.btn-primary.in-cart {
    background: linear-gradient(135deg, #562a0e 0%, #6e4021 100%);
    color: #f7efe8;
    border: 2px solid #caa55f;
    cursor: pointer;
}

.btn-primary.in-cart:hover {
    background: linear-gradient(135deg, #6e4021 0%, #7d4a28 100%);
    color: #caa55f;
    transform: translateY(-2px);
    box-shadow: 0 12px 50px rgba(202,165,95,0.5);
}

/* === КНОПКА ИЗБРАННОГО НА КАРТОЧКЕ === */
.favorite-btn {
    background: rgba(53, 19, 3, 0.85);
    border: 2px solid #caa55f;
    color: #caa55f;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: rgba(53, 19, 3, 0.95);
    border-color: #e0c98a;
    color: #e0c98a;
    transform: scale(1.1);
}

.favorite-btn.active {
    background: #caa55f;
    border-color: #caa55f;
    color: #351303;
}

.favorite-btn.active:hover {
    background: #e0c98a;
    border-color: #e0c98a;
}

/* === КАРТОЧКИ КОРЗИНЫ === */
.cart-item.light-block {
    background: #ffffff;
    transition: all 0.3s ease;
}

.cart-item.light-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(202, 165, 95, 0.3);
}

.cart-item .quantity-input {
    background: #faf6f0;
    color: #351303;
    border-color: rgba(202, 165, 95, 0.3);
}

.cart-item .quantity-btn {
    background: #caa55f;
    color: #351303;
}

.cart-item .quantity-btn:hover {
    background: #b8934f;
}

.cart-item .remove-btn {
    color: #562a0e;
    opacity: 0.6;
    transition: all 0.2s;
}

.cart-item .remove-btn:hover {
    opacity: 1;
    color: #dc2626;
    transform: scale(1.1);
}

/* === TOAST УВЕДОМЛЕНИЯ === */
.toast-notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === МОДАЛЬНОЕ ОКНО === */
#modalContainer {
    transition: opacity 0.2s ease-out;
}

#modalContent {
    animation: modalAppear 0.2s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === МОБИЛЬНЫЕ САЙДБАРЫ === */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(53, 19, 3, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar.active .mobile-sidebar-overlay {
    opacity: 1;
}

.mobile-sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 400px;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(53, 19, 3, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-sidebar.active .mobile-sidebar-content {
    transform: translateX(0);
}

.mobile-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(202, 165, 95, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.mobile-sidebar-nav {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #351303;
    background: #faf6f0;
    border: 1px solid rgba(202, 165, 95, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 400;
}

.mobile-nav-link:hover {
    background: rgba(202, 165, 95, 0.1);
    border-color: #caa55f;
    color: #caa55f;
}

.mobile-nav-link svg {
    flex-shrink: 0;
}

.mobile-sidebar-logo {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(202, 165, 95, 0.2);
    border-bottom: 1px solid rgba(202, 165, 95, 0.2);
    background: linear-gradient(135deg, rgba(202, 165, 95, 0.05) 0%, rgba(202, 165, 95, 0.1) 100%);
}

.mobile-sidebar-logo img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(202, 165, 95, 0.2);
    background: #faf6f0;
    flex-shrink: 0;
}

/* Мобильный сайдбар фильтров */
.mobile-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.mobile-sidebar-footer-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(202, 165, 95, 0.2);
    background: #faf6f0;
    flex-shrink: 0;
}

/* Кнопки фильтров в мобильном сайдбаре */
.mobile-filter-btn {
    width: 100%;
    justify-content: flex-start;
}

/* Скрытие скролла при открытом сайдбаре */
body.sidebar-open {
    overflow: hidden;
}

/* === МОДАЛЬНОЕ ОКНО ПОИСКА === */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: none;
}

.search-modal.active {
    display: block;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(53, 19, 3, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.search-modal-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 8px 32px rgba(53, 19, 3, 0.2);
    margin-top: 80px;
}

.search-icon {
    width: 24px;
    height: 24px;
    color: #caa55f;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 1rem;
    font-size: 1.125rem;
    color: #351303;
    outline: none;
}

.search-input::placeholder {
    color: #562a0e;
    opacity: 0.5;
}

.search-close-btn {
    padding: 0.5rem;
    color: #562a0e;
    opacity: 0.6;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.search-close-btn:hover {
    opacity: 1;
    background: rgba(202, 165, 95, 0.1);
}

.search-results {
    background: #ffffff;
    border-radius: 1rem;
    margin-top: 1rem;
    max-height: 60vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(53, 19, 3, 0.2);
    display: none;
}

.search-results.has-results {
    display: block;
}

.search-results-inner {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #caa55f #f7efe8;
}

.search-results-inner::-webkit-scrollbar {
    width: 6px;
}

.search-results-inner::-webkit-scrollbar-track {
    background: #f7efe8;
    border-radius: 0 1rem 1rem 0;
}

.search-results-inner::-webkit-scrollbar-thumb {
    background: #caa55f;
    border-radius: 3px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(202, 165, 95, 0.15);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(202, 165, 95, 0.08);
}

.search-result-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: contain;
    background: #faf6f0;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 500;
    color: #351303;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.8rem;
    color: #562a0e;
    opacity: 0.7;
}

.search-result-price {
    font-weight: 600;
    color: #caa55f;
    font-size: 1rem;
    flex-shrink: 0;
}

.search-hint {
    text-align: center;
    padding: 2rem;
    color: #f7efe8;
    opacity: 0.8;
    font-size: 0.95rem;
}

.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #562a0e;
    opacity: 0.7;
}

.search-no-results svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.3;
}

.search-view-all {
    display: block;
    text-align: center;
    padding: 1rem;
    color: #caa55f;
    font-weight: 500;
    border-top: 1px solid rgba(202, 165, 95, 0.15);
    transition: background 0.2s;
}

.search-view-all:hover {
    background: rgba(202, 165, 95, 0.08);
}

@media (max-width: 640px) {
    .search-modal-content {
        padding: 0.5rem;
    }

    .search-input-wrapper {
        margin-top: 60px;
        border-radius: 0.75rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .search-results {
        border-radius: 0.75rem;
        max-height: 70vh;
    }

    .search-result-item {
        padding: 0.75rem;
    }

    .search-result-image {
        width: 50px;
        height: 50px;
    }
}

