/* Базовый контейнер каталога */
.catalog-wrapper {
    min-height: calc(100vh - 240px);
    padding-top: 24px; /* Минимальный отступ сверху */
    padding-bottom: 100px;
}

/* Сайдбар */
.catalog-sidebar {
    width: 100%;
    max-width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px; /* Увеличили отступы внутри сайдбара */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px; /* Увеличили отступ между пунктами */
    margin-top: 10px; /* Уменьшили отступ сверху для сайдбара */
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px; /* Увеличили отступ между иконкой и текстом */
    padding: 14px 16px; /* Увеличили отступы внутри пунктов */
    border-radius: 12px; /* Увеличили скругление */
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background: var(--surface-2);
    color: var(--primary);
    border-color: var(--border);
    transform: translateX(4px); /* Добавили анимацию при наведении */
}

.sidebar-item.active {
    background: var(--surface-2);
    color: var(--primary);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.16);
    transform: translateX(4px);
}

.sidebar-icon {
    width: 18px; /* Увеличили иконки */
    display: flex;
    justify-content: center;
    font-size: 16px;
}

.sidebar-text {
    font-size: 15px; /* Увеличили текст */
    font-weight: 600;
}

/* Поисковая строка */
.catalog-search-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px; /* Увеличили скругление */
    padding: 20px; /* Увеличили отступы */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Усилили тень */
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Увеличили отступ между элементами */
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px; /* Увеличили отступ снизу */
    margin-top: 20px; /* Добавили отступ сверху */
}

.search-field {
    flex: 1;
    min-width: 200px;
    height: 48px; /* Увеличили высоту */
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px; /* Увеличили скругление */
    display: flex;
    align-items: center;
    padding: 0 16px; /* Увеличили отступы */
}

.search-field .search-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px; /* Увеличили текст */
    color: var(--text);
}

.search-field .search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    width: 36px; /* Увеличили иконку */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    font-size: 16px;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 12px; /* Увеличили отступ между кнопками */
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Увеличили отступ между иконкой и текстом */
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px; /* Увеличили скругление */
    padding: 12px 18px; /* Увеличили отступы */
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--border);
}

.sort-wrapper {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px); /* Увеличили отступ от кнопки */
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px; /* Увеличили скругление */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1); /* Усилили тень */
    width: 250px; /* Увеличили ширину */
    display: none;
    overflow: hidden;
    z-index: 30;
}

.dropdown-panel.open {
    display: block;
}

.dropdown-item {
    padding: 14px 18px; /* Увеличили отступы */
    font-size: 15px; /* Увеличили текст */
    color: #374151;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

/* Панель фильтров */
.filter-panel {
    position: relative;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px; /* Увеличили скругление */
    padding: 20px; /* Увеличили отступы */
    margin-top: 12px; /* Увеличили отступ сверху */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); /* Усилили тень */
    display: none;
    z-index: 25;
}

.filter-panel.open {
    display: block;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px; /* Увеличили отступ */
}

.close-btn {
    width: 36px; /* Увеличили кнопку */
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px; /* Увеличили скругление */
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--surface);
    color: var(--primary);
}

.filter-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Увеличили минимальную ширину */
    gap: 16px; /* Увеличили отступы */
    margin-bottom: 20px; /* Увеличили отступ */
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px; /* Увеличили отступ */
    font-size: 15px; /* Увеличили текст */
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
}

.filter-checkbox input {
    accent-color: var(--primary);
    width: 18px; /* Увеличили чекбоксы */
    height: 18px;
}

.filter-footer {
    display: flex;
    gap: 16px; /* Увеличили отступ между кнопками */
    justify-content: flex-end;
}

.apply-btn {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
    color: #ffffff;
    padding: 12px 24px; /* Увеличили отступы */
    border-radius: 12px; /* Увеличили скругление */
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.28);
}

.apply-btn:hover {
    transform: translateY(-2px);
}

.reset-btn {
    background: var(--surface-2);
    color: var(--text);
    padding: 12px 22px; /* Увеличили отступы */
    border-radius: 12px; /* Увеличили скругление */
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.reset-btn:hover {
    background: var(--surface);
    color: var(--primary);
}

/* Заголовок рекомендаций */
.recommendations-header {
    margin: 30px 0 20px 0; /* Увеличили отступы сверху и снизу */
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.recommendations-header h2 {
    font-size: 24px; /* Увеличили размер заголовка */
    font-weight: 700;
    color: var(--text);
}

/* Сетка товаров */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; /* Увеличили отступ между карточками */
    width: 100%;
}

.product-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px; /* Увеличили скругление */
    padding: 20px; /* Увеличили отступы */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05); /* Усилили тень */
    margin-bottom: 30px; /* Увеличили отступ снизу */
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.product-card .buy-btn {
    cursor: pointer;
}

.product-card-image {
    aspect-ratio: 320 / 200;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface-2);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Подборки */
.collections-wrapper {
    min-height: calc(100vh - 240px);
    padding: 40px 0 120px;
}

.collections-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.collection-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.collection-top {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
    color: #ffffff;
    display: grid;
    place-items: center;
    height: 170px;
}

.collection-bottom {
    background: var(--surface);
    padding: 18px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
}

.collection-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.collection-subtitle {
    font-size: 14px;
    color: var(--muted);
}

/* Страница настроек */
.settings-wrapper {
    min-height: calc(100vh - 240px);
    padding: 40px 0 120px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.settings-text p {
    color: var(--muted);
}

/* Темная тема для каталога */
body.theme-dark .catalog-search-bar,
body.theme-dark .product-block,
body.theme-dark .product-card,
body.theme-dark .filter-panel,
body.theme-dark .catalog-sidebar,
body.theme-dark .collection-card,
body.theme-dark .settings-card {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

body.theme-dark .catalog-sidebar .sidebar-item,
body.theme-dark .catalog-sidebar .sidebar-text,
body.theme-dark .catalog-sidebar .sidebar-icon {
    color: #e5e7eb;
}

body.theme-dark .sidebar-item:hover,
body.theme-dark .sidebar-item.active {
    color: #e5e7eb;
    background: #1f2937;
    border-color: #1f2937;
    box-shadow: none;
}

body.theme-dark .collection-bottom {
    background: #0f172a;
    box-shadow: none;
    border-top: 1px solid #1f2937;
}

body.theme-dark .collection-title,
body.theme-dark .collection-subtitle {
    color: #e5e7eb;
}

body.theme-dark .recommendations-header h2,
body.theme-dark .collections-header h2 {
    color: #e5e7eb;
}

body.theme-dark .settings-text h2,
body.theme-dark .settings-text p {
    color: #e5e7eb;
}

body.theme-dark .collection-top i {
    color: #ffffff;
}

body.theme-dark .product-title {
    color: #e5e7eb;
}

body.theme-dark .product-card-image {
    background: #0b1220;
}

body.theme-dark .price {
    color: #ffffff;
}

body.theme-dark .search-field,
body.theme-dark .action-btn {
    background: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}

body.theme-dark .filter-checkbox input {
    accent-color: var(--primary);
}

body.theme-dark .filter-checkbox {
    color: #e5e7eb;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px; /* Увеличили текст */
    font-weight: 700;
    padding: 8px 12px; /* Увеличили отступы */
    min-height: 32px; /* Фиксируем высоту бейджа */
    border-radius: 10px; /* Увеличили скругление */
    color: var(--primary-700);
    background: #ffe4e6;
    line-height: 1.1;
}

.badge.orange {
    color: var(--accent-700);
    background: rgba(20, 184, 166, 0.14);
}

.badge.blue {
    color: var(--accent-700);
    background: rgba(20, 184, 166, 0.14);
}

.badge.gray {
    color: var(--muted);
    background: var(--surface-2);
}

.price {
    font-weight: 700;
    color: #111827;
    font-size: 18px;
    line-height: 1.1;
    margin-top: 2px;
}

.product-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    line-height: 1.4;
}

.buy-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
    color: #ffffff;
    font-weight: 700;
    border-radius: 10px;
    padding: 14px 18px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.22);
    text-align: center;
    margin-top: auto;
    font-size: 15px;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(225, 29, 72, 0.32);
}

/* Desktop - 4 колонки */
@media (min-width: 1200px) {
    .catalog-sidebar {
        position: static;
        top: auto;
        height: auto;
        margin-right: 24px;
        margin-top: 20px; /* Уменьшили отступ сверху */
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px; /* Увеличили отступ между карточками */
    }
    
    .product-card {
        border-radius: 16px;
    }

    .product-card-body {
        padding: 20px;
    }
    
    .product-title {
        font-size: 17px;
    }
    
    .price {
        font-size: 20px; /* Увеличили текст */
        margin-top: 2px;
    }
    
    .buy-btn {
        padding: 16px;
        font-size: 16px; /* Увеличили текст */
    }
}

/* Для больших экранов (1400px+) */
@media (min-width: 1400px) {
    .catalog-wrapper {
        padding-top: 32px; /* Чуть больше отступ для крупных экранов */
    }
    
    .catalog-wrapper > .max-w-7xl {
        max-width: 1400px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 28px; /* Увеличили отступ между карточками */
    }
    
    .catalog-sidebar {
        margin-top: 25px; /* Уменьшили отступ сверху */
    }
    
    .catalog-search-bar {
        margin-top: 30px; /* Увеличили отступ сверху */
    }
}

/* Laptop - 3 колонки */
@media (min-width: 1024px) and (max-width: 1199px) {
    .catalog-sidebar {
        position: static;
        top: auto;
        height: auto;
        margin-right: 20px;
        margin-top: 25px; /* Увеличили отступ сверху */
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px; /* Увеличили отступ между карточками */
    }

    .price {
        margin-top: 2px;
    }
}

/* Tablet - 2 колонки */
@media (max-width: 1023px) {
    .catalog-sidebar {
        display: none;
    }
    
    .catalog-wrapper {
        padding-top: 120px; /* Уменьшили отступ сверху для мобильных */
        padding-bottom: 120px; /* Увеличили отступ снизу */
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .price {
        margin-top: 2px;
    }
    
    .catalog-search-bar {
        padding: 16px;
        gap: 16px;
        margin-top: 15px; /* Добавили отступ сверху */
    }
    
    .search-field {
        min-width: 100%;
        order: 1;
    }
    
    .search-actions {
        order: 2;
        width: 100%;
        justify-content: flex-start;
    }
    
    .action-btn span {
        display: inline !important;
    }
    
    .recommendations-header {
        margin: 25px 0 15px 0;
    }
}

/* Мобильный сайдбар */
@media (max-width: 1023px) {
    .mobile-sidebar-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 40;
        padding: 16px 20px; /* Увеличили отступы */
        background: #ffffff;
        border-top: 2px solid #e5e7eb; /* Увеличили толщину линии */
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1); /* Усилили тень */
    }
    
    .mobile-sidebar {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .mobile-sidebar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px; /* Увеличили отступ между иконкой и текстом */
        padding: 10px 14px; /* Увеличили отступы */
        border-radius: 12px; /* Увеличили скругление */
        color: var(--text);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .mobile-sidebar-item:hover,
    .mobile-sidebar-item.active {
        background: var(--surface-2);
        color: var(--primary);
    }

/* Темная тема для мобильного меню */
body.theme-dark .mobile-sidebar-container {
    background: #0f172a;
    border-top-color: #1f2937;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

body.theme-dark .mobile-sidebar-item {
    color: #e5e7eb;
}

body.theme-dark .mobile-sidebar-item:hover,
body.theme-dark .mobile-sidebar-item.active {
    background: #1f2937;
    color: var(--highlight);
}
    
    .mobile-sidebar-icon {
        font-size: 20px; /* Увеличили иконки */
    }
    
    .mobile-sidebar-text {
        font-size: 12px; /* Увеличили текст */
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .catalog-wrapper {
        padding-top: 110px;
        padding-bottom: 110px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .product-card-body {
        padding: 14px;
        gap: 10px;
    }
    
    .product-title {
        font-size: 15px;
    }
    
    .price {
        font-size: 16px;
        margin-top: 2px;
    }
    
    .badge {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .buy-btn {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .catalog-search-bar {
        padding: 14px;
        margin-top: 10px;
    }
    
    .action-btn {
        padding: 10px 14px;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .catalog-wrapper {
        padding-top: 100px;
        padding-bottom: 140px; /* Увеличили отступ для мобильного сайдбара */
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card-body {
        padding: 12px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .price {
        font-size: 15px;
        margin-top: 2px;
    }
    
    .badge {
        font-size: 10px;
        padding: 5px 8px;
    }
    
    .buy-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .filter-panel {
        padding: 16px;
    }
    
    .filter-body {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .catalog-wrapper {
        padding-top: 90px;
        padding-bottom: 130px;
    }
    
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }
    
    .action-btn span {
        font-size: 0;
    }
    
    .action-btn i:first-child {
        margin-right: 0;
    }
}

/* Исправление для Макбук 16" (1728px) */
@media (min-width: 1728px) {
    .catalog-wrapper {
        padding-top: 40px; /* Небольшой отступ для очень больших экранов */
    }
    
    .catalog-wrapper > .max-w-7xl {
        max-width: 1600px;
    }
    
    .catalog-sidebar {
        position: static;
        top: auto;
        margin-right: 32px;
        margin-top: 30px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 28px;
    }
    
    .product-card-body {
        padding: 22px;
    }
    
    .catalog-search-bar {
        margin-top: 40px;
    }
}

/* Для больших мониторов (1920px+) */
@media (min-width: 1920px) {
    .catalog-wrapper {
        padding-top: 48px; /* Небольшой отступ для 1920px+ */
    }
    
    .catalog-wrapper > .max-w-7xl {
        max-width: 1800px;
    }
    
    .catalog-sidebar {
        position: static;
        top: auto; /* Умеренный отступ сверху для sticky */
        margin-top: 35px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
    
    .product-card-body {
        padding: 24px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .catalog-search-bar {
        margin-top: 50px;
        padding: 24px;
    }
}

/* Исправление горизонтального скролла */
@media (max-width: 1023px) {
    .page-container {
        overflow-x: hidden;
    }
    
    .catalog-wrapper {
        overflow-x: hidden;
    }
    
    .product-block {
        overflow-x: hidden;
    }
}

/* Модальное окно для большой карточки товара */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.product-modal {
    background: var(--surface);
    border-radius: 14px;
    max-width: 400px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.product-modal-overlay.active .product-modal {
    transform: scale(1);
}

.product-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.product-modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.product-modal-content {
    padding: 20px;
}

.product-modal-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--surface-2);
}

.product-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.product-modal-label {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--primary-700);
    background: #ffe4e6;
    margin-bottom: 6px;
}

.product-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-modal-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.product-modal-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.product-modal-rating {
    color: var(--accent-700);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-modal-brand {
    font-weight: 600;
    color: var(--muted);
}

.product-modal-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.product-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.product-modal-buy {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    border-radius: 10px;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.22);
    flex: 1;
    min-width: 120px;
}

.product-modal-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(225, 29, 72, 0.3);
}

.product-modal-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-modal-link:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .product-modal {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .product-modal-content {
        padding: 16px 14px;
    }

    .product-modal-title {
        font-size: 16px;
    }

    .product-modal-price {
        font-size: 18px;
    }

    .product-modal-header {
        flex-direction: column;
    }

    .product-modal-actions {
        flex-direction: column;
    }

    .product-modal-buy {
        width: 100%;
    }
}

/* Темная тема для модального окна */
body.theme-dark .product-modal {
    background: var(--surface);
    border-color: var(--border);
}

body.theme-dark .product-modal-close {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

body.theme-dark .product-modal-close:hover {
    background: var(--primary);
    color: white;
}

body.theme-dark .product-modal-label {
    background: rgba(225, 29, 72, 0.2);
    color: var(--primary);
}

body.theme-dark .product-modal-desc,
body.theme-dark .product-modal-brand {
    color: var(--muted);
}