/* CSS Variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --border-radius: 0.375rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --transition: all 0.15s ease-in-out;
    --action-height: 34px; /* унифицированная высота кнопок/ценового блока в карточке */
}

/* Navigation Styles */
.navbar-nav {
    flex-wrap: nowrap !important;
}

.navbar-nav .nav-link {
    white-space: nowrap;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-size: 0.95rem;
}

.navbar-nav .dropdown-menu {
    white-space: nowrap;
}

.navbar-expand-lg .navbar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        flex-direction: column !important;
        width: 100%;
        align-items: flex-start;
        flex-wrap: nowrap !important;
    }
    .navbar-nav .nav-item {
        width: 100%;
    }
    .navbar-nav .nav-link {
        width: 100%;
        text-align: left;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        white-space: normal;
    }
    .navbar-collapse, .collapse {
        width: 100%;
    }
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        box-shadow: none;
        background: none;
        border: none;
        padding-left: 2rem;
    }
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    color: inherit;
}

h1 { font-size: 2.25rem; font-weight: var(--font-weight-bold); }
h2 { font-size: 1.875rem; font-weight: var(--font-weight-bold); }
h3 { font-size: 1.5rem; font-weight: var(--font-weight-semibold); }
h4 { font-size: 1.25rem; font-weight: var(--font-weight-semibold); }
h5 { font-size: 1.125rem; font-weight: var(--font-weight-medium); }
h6 { font-size: 1rem; font-weight: var(--font-weight-medium); }

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Catalog layout */
.catalog-container {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.catalog-header {
    background: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #dee2e6;
}

.catalog-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.catalog-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 10px;
    line-height: 1.6;
}

.catalog-content {
    display: flex;
    gap: 0;
    margin-top: 20px;
}

.products-section {
    flex: 1;
    padding-right: 20px;
}

/* Results header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.results-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.results-count {
    font-weight: 600;
    color: #2c3e50;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggles {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.view-toggle {
    padding: 8px 12px;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    color: #6c757d;
}

.view-toggle.active {
    background: #007bff;
    color: white;
}

.view-toggle:hover:not(.active) {
    background: #f8f9fa;
}

.sort-select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9rem;
    min-width: 180px;
}

/* Products Grid */
.products-grid {
    display: grid;
    gap: 15px;
}

.products-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    padding: 10px 0;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Grid View - Компактные вертикальные карточки */
.products-grid.grid-view .product-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #6c757d; /* тонкая тёмная рамка вокруг всей карточки */
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: auto;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.products-grid.grid-view .product-card:hover {
    transform: none; /* избегаем наложений рядов */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    z-index: 1;
}

.products-grid.grid-view .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.products-grid.grid-view .product-card:hover::before {
    opacity: 1;
}

.products-grid.grid-view .product-image {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.products-grid.grid-view .product-image img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.products-grid.grid-view .product-card:hover .product-image img {
    transform: scale(1.03);
}

.products-grid.grid-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    min-height: 140px;
}

.products-grid.grid-view .product-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2d3748;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: calc(2 * 1.3em); /* фикс на 2 строки */
    margin-bottom: 6px; /* небольшой отступ под заголовком */
}

/* Enforce title over image and hide legacy details button */
.products-grid.grid-view .product-card {
    display: flex;
    flex-direction: column;
}
.products-grid.grid-view .product-title { order: 0; }
.products-grid.grid-view .product-image { order: 1; }
.products-grid.grid-view .product-info { order: 2; }
.products-grid.grid-view .product-actions { order: 3; }
.products-grid .btn-details { display: none !important; }

.products-grid.grid-view .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.products-grid.grid-view .product-title a:hover {
    color: #667eea;
}

.products-grid.grid-view .product-rating {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.products-grid.grid-view .rating-stars i {
    color: #ffd700;
    font-size: 0.8rem;
}

.products-grid.grid-view .rating-count {
    font-size: 0.75rem;
    color: #718096;
}

.products-grid.grid-view .product-specs {
    flex: 1;
    margin-bottom: 0px;
}

.products-grid.grid-view .product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: #4a5568;
}

.products-grid.grid-view .product-specs li {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.products-grid.grid-view .product-specs .spec-label {
    font-weight: 600;
    color: #2d3748;
}

.products-grid.grid-view .product-specs .spec-value {
    font-weight: 400;
    color: #4a5568;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}



/* Унифицированные стили действий для всех режимов просмотра */
.products-grid .product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
}

/* Кнопка ПОДРОБНЕЕ - вверху, полная ширина */
.products-grid .btn-details {
    background: #007bff;
    color: white;
    padding: 0 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    display: block;
    margin-top: 8px;
    height: var(--action-height);
    min-height: var(--action-height);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-grid .btn-details:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Блок цены - посередине между кнопками */
.products-grid .product-price-block {
    text-align: center;
    padding: 0 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    height: var(--action-height);
    min-height: var(--action-height);
}

.products-grid .product-price-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.products-grid .product-card:hover .product-price-block::before {
    left: 100%;
}

.products-grid .product-price-block .current-price {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    line-height: 1;
}

.products-grid .product-price-block .old-price {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    text-decoration: line-through;
    line-height: 1;
}

/* Кнопка КУПИТЬ - посередине, полная ширина */
.products-grid .btn-buy-now {
    background: #28a745;
    color: white;
    border: none;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    width: 100%;
    white-space: nowrap;
    height: var(--action-height);
    min-height: var(--action-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1;
}

/* Специальные стили для list view */
.products-grid.list-view .btn-buy-now {
    font-size: 0.7rem;
    padding: 8px 6px;
    letter-spacing: 0.1px;
    width: 100%;
    min-height: 40px;
}

.products-grid .btn-buy-now:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Контейнер для кнопок контактов - внизу в ряд */
.products-grid .contact-buttons {
    display: flex;
    gap: 4px;
    width: 100%;
}

/* Кнопки Telegram и WhatsApp - по 50% ширины */
.products-grid .btn-contact {
    flex: 1;
    padding: 6px 4px;
    border: none;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.products-grid .btn-telegram {
    background: #0088cc;
    color: white;
}

.products-grid .btn-telegram:hover {
    background: #006ba8;
}

.products-grid .btn-whatsapp {
    background: #25d366;
    color: white;
}

.products-grid .btn-whatsapp:hover {
    background: #20b954;
}

.products-grid .btn-contact i {
    font-size: 0.7rem;
}

/* List View - Компактные горизонтальные карточки */
.products-grid.list-view .product-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    display: grid;
    grid-template-columns: 140px 1fr 200px;
    gap: 15px;
    align-items: start;
    min-height: 120px;
}

.products-grid.list-view .product-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.products-grid.list-view .product-card .product-image {
    position: relative;
    text-align: center;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.products-grid.list-view .product-card .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}

.products-grid.list-view .product-card:hover .product-image img {
    transform: scale(1.03);
}

.products-grid.list-view .product-card .product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.products-grid.list-view .product-card .product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: #2c3e50;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.products-grid.list-view .product-card .product-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.products-grid.list-view .product-card .product-title a:hover {
    color: #007bff;
}

.products-grid.list-view .product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.products-grid.list-view .product-card .rating-stars {
    color: #ffc107;
    font-size: 0.75rem;
}

.products-grid.list-view .product-card .rating-count {
    color: #6c757d;
    font-size: 0.75rem;
}

.products-grid.list-view .product-card .product-specs {
    flex: 1;
}

.products-grid.list-view .product-card .product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 12px;
}

.products-grid.list-view .product-card .product-specs li {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-grid.list-view .product-card .product-specs li::before {
    content: '•';
    color: #007bff;
    font-weight: bold;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.products-grid.list-view .product-card .product-specs .spec-label {
    font-weight: 600;
    color: #495057;
}

.products-grid.list-view .product-card .product-specs .spec-value {
    color: #6c757d;
    font-size: 0.8rem;
}



/* Filters Sidebar */
.filters-sidebar {
    width: 300px;
    background: #f8f9fa;
    padding: 2px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.filter-toggle {
    transition: transform 0.2s;
}

.filter-options {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 5px 0;
    transition: background-color 0.2s;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
}

.filter-option label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-count {
    color: #6c757d;
    font-size: 0.8rem;
}

.price-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.price-separator {
    display: none;
}

.price-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85rem;
}

.filter-apply {
    width: 100%;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.filter-apply:hover {
    background: #0056b3;
}

.clear-filters {
    width: 100%;
    padding: 6px 16px;
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
}

.clear-filters:hover {
    background: #f8f9fa;
    color: #495057;
}

/* View icons */
.view-icon {
    width: 16px;
    height: 16px;
    position: relative;
}

.grid-icon .grid-squares {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.grid-icon .grid-square {
    background: currentColor;
    border-radius: 1px;
}

.list-icon .list-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.list-icon .list-line {
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    :root {
        --action-height: 40px; /* крупнее тапы на мобильных */
    }
    .catalog-content {
        flex-direction: column;
    }
    
    .products-section {
        padding-right: 0;
    }
    
    .filters-sidebar {
        width: 100%;
        position: static;
        margin-top: 20px;
    }
    
    /* Две карточки в ряд на мобильных */
    .products-grid.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    
    /* Уменьшаем отступы в мобильной версии */
    .products-grid.grid-view .product-title {
        margin-bottom: 3px !important; /* было 4px */
    }
    
    .products-grid.grid-view .product-image {
        margin-bottom: 4px !important; /* было 8px */
    }
    
    .products-grid.grid-view .product-info {
        margin-bottom: 4px !important; /* было 8px */
    }
    
    /* Уменьшаем размер текста кнопок на мобильных */
    .products-grid .btn-buy-now {
        font-size: 0.7rem; /* было 0.8rem */
        letter-spacing: 0.1px; /* было 0.2px */
    }
    
    .products-grid .product-card.sale-card .btn-buy-now {
        font-size: 0.7rem; /* было 1rem */
        letter-spacing: 0.1px; /* было 0.5px */
    }
    
    .products-grid.list-view .product-card {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: auto;
    }
    
    .products-grid.list-view .product-card .product-image {
        height: 160px;
    }
    
    .products-grid.list-view .product-card .product-info {
        order: 2;
    }
    .products-grid.grid-view .product-image {
        height: auto;
        min-height: 240px;
    }
    .products-grid.grid-view .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
} 

/* Product Detail Page - Main Image */
.product-images-container {
    max-width: 400px;
    margin: 0;
}

.main-image-wrapper {
    margin-bottom: 0px;
}

.main-product-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.main-product-image:hover {
    transform: scale(1.02);
}

/* Additional Images */
.additional-images-wrapper {
    display: flex;
    gap: 10px;
    max-width: 400px;
}

.additional-image-item {
    flex: 1;
    position: relative;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.additional-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.additional-image:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.additional-image.active {
    border-color: #007bff;
}

/* Show All Photos Overlay */
.show-all-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.show-all-trigger:hover .show-all-overlay {
    opacity: 1;
}

.show-all-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

/* Modal Carousel */
#photoGalleryModal .carousel-item img {
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
} 

/* Modal Carousel */
#photoGalleryModal .modal-content {
    background: #000;
    border: none;
}

#photoGalleryModal .modal-body {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoCarousel {
    width: 100%;
    height: 80vh;
}

.carousel-image-wrapper {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* Carousel Controls */
#photoCarousel .carousel-control-prev,
#photoCarousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

#photoCarousel .carousel-control-prev {
    left: 20px;
}

#photoCarousel .carousel-control-next {
    right: 20px;
}

#photoCarousel .carousel-control-prev:hover,
#photoCarousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

#photoCarousel .carousel-control-prev-icon,
#photoCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Carousel Indicators */
#photoCarousel .carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

#photoCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

#photoCarousel .carousel-indicators button.active {
    background: #fff;
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-image-wrapper {
        height: 60vh;
        padding: 2px;
    }
    
    #photoCarousel {
        height: 60vh;
    }
    
    #photoGalleryModal .modal-body {
        min-height: 60vh;
    }
    
    #photoCarousel .carousel-control-prev,
    #photoCarousel .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    #photoCarousel .carousel-control-prev {
        left: 10px;
    }
    
    #photoCarousel .carousel-control-next {
        right: 10px;
    }
} 

/* Compact Specifications Table */
.specifications-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.spec-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0;
}

.spec-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.spec-table {
    margin: 0;
    width: 100%;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.8rem;
    line-height: 1.3;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-name {
    font-weight: 500;
    color: #666;
    flex: 1;
    margin-right: 0.5rem;
    text-align: left;
}

.spec-val {
    font-weight: 400;
    color: #333;
    flex: 1;
    text-align: right;
    word-break: break-word;
}

/* Action Buttons Block */
.action-buttons-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.action-buttons-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: center;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action i {
    font-size: 1.1rem;
}

/* Product Details Blocks */
.product-details-blocks h4 {
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.specifications-block,
.description-block,
.reviews-block {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.review-item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

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

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.review-rating {
    display: flex;
    gap: 0.2rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .specifications-compact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .spec-group {
        padding: 0.5rem;
    }
    
    .spec-group-title {
        font-size: 0.85rem;
    }
    
    .spec-row {
        font-size: 0.75rem;
        padding: 0.2rem 0;
    }
    
    .spec-name {
        margin-right: 0.3rem;
    }
    
    .action-buttons-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-action {
        width: 100%;
        min-width: auto;
    }
    
    .product-details-blocks {
        padding: 0.5rem;
    }
    
    .specifications-block,
    .description-block,
    .reviews-block {
        padding: 1rem;
    }
}

/* Very compact layout for maximum density */
@media (min-width: 1200px) {
    .specifications-compact {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .spec-row {
        font-size: 0.75rem;
        padding: 0.15rem 0;
    }
    
    .spec-group {
        padding: 0.6rem;
    }
    
    .action-buttons-container {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Related Products Section */
.related-products-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid #dee2e6;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Vertical product card for similar products */
.related-product-card-vertical {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.related-product-card-vertical:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.related-product-card-vertical .product-image-wrapper {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
}

.related-product-card-vertical .product-image {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
}

.related-product-card-vertical .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-card-vertical .product-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.related-product-card-vertical .product-title a {
    color: #2c3e50;
    text-decoration: none;
}

.related-product-card-vertical .product-title a:hover {
    color: #007bff;
}

.related-product-card-vertical .product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0px;
}

.related-product-card-vertical .rating-stars {
    color: #ffc107;
    font-size: 0.7rem;
}

.related-product-card-vertical .rating-count {
    color: #6c757d;
    font-size: 0.7rem;
}

.related-product-card-vertical .product-specs {
    margin: 8px 0;
    flex-grow: 1;
}

.related-product-card-vertical .product-specs .spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.related-product-card-vertical .product-specs .spec-item i {
    width: 14px;
    color: #007bff;
    font-size: 0.7rem;
    text-align: center;
}

.related-product-card-vertical .product-specs .spec-item span {
    flex: 1;
}

.related-product-card-vertical .product-price {
    margin: 12px 0;
}

.related-product-card-vertical .current-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.related-product-card-vertical .old-price {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 0.8rem;
    margin-right: 6px;
}

.related-product-card-vertical .product-actions {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.related-product-card-vertical .btn-buy-now {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    text-decoration: none;
    text-align: center;
}

.related-product-card-vertical .btn-buy-now:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.related-product-card-vertical .btn-icon {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.related-product-card-vertical .btn-icon:hover {
    background: #e9ecef;
}

.related-product-card-vertical .btn-icon.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.no-related-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-related-products i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products-section {
        padding: 1.5rem;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .related-product-card-vertical {
        padding: 2px;
        min-height: 320px;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .related-product-card-vertical .product-actions .btn-buy-now {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .related-product-card-vertical {
        min-height: 300px;
    }
    
    .related-product-card-vertical .product-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
} 

/* CSS cache busting */ 

/* Product page buy button - same style as catalog */
.product-actions .btn-buy-now {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    text-decoration: none;
}

.product-actions .btn-buy-now:hover {
    background: #218838 !important;
    color: white !important;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Disabled state for out of stock */
.product-actions .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    cursor: not-allowed;
}

.product-actions .btn-secondary:hover {
    background: #6c757d !important;
    transform: none;
}

/* CSS cache busting */ 

/* Mobile Filters Styles */
.mobile-filters-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.mobile-filters-btn:hover {
    background: #218838;
}

.mobile-filters-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
}

.mobile-filters-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .mobile-filters-btn {
        display: flex;
        order: -1;
        margin-right: 12px;
    }
    
    .mobile-filters-header {
        display: flex;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: white;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .filters-sidebar.active {
        transform: translateX(0);
    }
    
    .filters-sidebar .filters-title {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }
    
    .filters-sidebar form {
        padding: 0 20px 20px;
    }
    
    /* Adjust view controls layout on mobile */
    .view-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .view-toggles {
        order: 1;
    }
    
    .sort-select {
        order: 2;
        min-width: 150px;
    }
    
    /* Hide desktop filters title on mobile */
    .filters-sidebar .filters-title:not(.mobile-filters-header .filters-title) {
        display: none;
    }
} 

/* Специальные стили для list view кнопок */
.products-grid.list-view .product-card .btn-buy-now {
    font-size: 0.7rem;
    padding: 8px 6px;
    letter-spacing: 0.1px;
    width: 100%;
    white-space: nowrap;
}

/* Special styling for sale products */
.product-card.sale-card {
    position: relative;
    border: 2px solid #ff4444;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.2);
    border-radius: 12px;
    padding: 12px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    position: relative;
    height: auto;
    overflow: hidden;
}

.product-card.sale-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 68, 68, 0.3);
    border-color: #ff2222;
}

.product-card.sale-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff4444, #ff6b35, #ff4444);
    border-radius: 8px;
    z-index: -1;
    animation: saleGlow 2s ease-in-out infinite alternate;
}

@keyframes saleGlow {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.8;
    }
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    animation: salePulse 1.5s ease-in-out infinite;
}

@keyframes salePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sale-badge::before {
    content: '🔥';
    margin-right: 4px;
}

.product-card.sale-card .current-price {
    color: #c41e3a;
    font-weight: 700;
    font-size: 1.3em;
    text-shadow: 0 1px 2px rgba(196, 30, 58, 0.2);
}

.product-card.sale-card .old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9em;
    position: relative;
}

.product-card.sale-card .old-price::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4444;
    transform: translateY(-50%);
}

.savings-amount {
    display: block;
    color: #28a745;
    font-weight: 600;
    font-size: 0.85em;
    margin-top: 2px;
}

.savings-amount::before {
    content: '💰 ';
}

.product-card.sale-card .btn-buy-now {
    font-size: 0.85rem;
    padding: 12px 8px;
    height: 48px;
    min-width: 100%;
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.product-card.sale-card .btn-buy-now:hover {
    background: linear-gradient(135deg, #218838, #28a745);
    transform: translateY(-1px);
}

.product-card.sale-card .btn-details {
    border: 2px solid #ff4444;
    color: #ff4444;
    background: transparent;
}

.product-card.sale-card .btn-details:hover {
    background: #ff4444;
    color: white;
}

/* Компактные отступы для элементов в sale карточках */
.product-card.sale-card .product-image {
    margin-bottom: 12px;
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-card.sale-card .product-info {
    margin-bottom: 12px;
    font-size: 0.8rem;
    min-height: 120px;
    max-height: none;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
}

.product-card.sale-card .product-title {
    margin-bottom: 0px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2d3748;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card.sale-card .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.product-card.sale-card .product-title a:hover {
    color: #667eea;
}

.product-card.sale-card .product-rating {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card.sale-card .rating-stars i {
    color: #ffd700;
    font-size: 0.8rem;
}

.product-card.sale-card .rating-count {
    font-size: 0.75rem;
    color: #718096;
}

.product-card.sale-card .product-specs {
    flex: 1;
    margin-bottom: 0px;
}

.product-card.sale-card .product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: #4a5568;
}

.product-card.sale-card .product-specs li {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.product-card.sale-card .product-specs .spec-label {
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.product-card.sale-card .product-specs .spec-value {
    font-weight: 400;
    color: #4a5568;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.product-card.sale-card .product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 180px;
}

.product-card.sale-card .btn-details {
    background: #ff4444;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    display: block;
    margin-top: 8px;
}

.product-card.sale-card .btn-details:hover {
    background: #c41e3a;
    color: white;
    text-decoration: none;
}

.product-card.sale-card .product-price-block {
    text-align: center;
    padding: 10px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-height: 32px;
}

.product-card.sale-card .btn-buy-now {
    font-size: 1rem;
    padding: 10px 0;
    height: 40px;
    min-width: 100%;
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
}

.product-card.sale-card .btn-buy-now:hover {
    background: linear-gradient(135deg, #218838, #28a745);
}

.product-card.sale-card .contact-buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Компактный grid для страниц с распродажей */
.products-grid.grid-view.sale-grid {
    gap: 10px !important;
}

.products-grid.grid-view.sale-grid .product-card {
    min-height: 280px;
}

/* Discount percentage calculation */
.discount-percentage {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.75rem;
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Mobile adaptations for sale cards */
@media (max-width: 768px) {
    .sale-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .discount-percentage {
        min-width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    
    .product-card.sale-card {
        border-width: 1px;
        padding: 6px;
        min-height: 260px;
    }
    
    .product-card.sale-card .product-image {
        height: 100px;
        margin-bottom: 6px;
    }
    
    .product-card.sale-card .product-title {
        font-size: 0.85rem;
        margin-bottom: 0px;
    }
    
    .product-card.sale-card .product-actions {
        gap: 4px;
    }
    
    .products-grid.grid-view.sale-grid {
        gap: 8px;
    }
}

/* Sale product detail page styles */
.sale-product-page {
    position: relative;
}

/* Компактный layout для страницы распродажи */
.sale-product-layout {
    margin-left: -5px;
    margin-right: -5px;
}

.sale-product-layout > [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
}

/* Дополнительная информация о распродаже */
.sale-extra-info {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 2px;
    position: relative;
    overflow: hidden;
}

.sale-extra-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4444, #ffc107, #ff4444);
    animation: saleGlow 2s ease-in-out infinite alternate;
}

.sale-features {
    display: grid;
    gap: 12px;
}

.sale-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #856404;
    font-weight: 600;
    font-size: 0.9rem;
}

.sale-feature i {
    color: #ff4444;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sale-feature span {
    flex: 1;
}

/* Анимация для sale features */
.sale-feature:hover i {
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(-2px);
    }
}

.sale-product-page::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, #ff4444, #ff6b35, #ff4444);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.1;
    animation: saleGlow 3s ease-in-out infinite alternate;
}

/* Компактный layout для страницы распродажи */
.sale-product-layout {
    margin-left: -5px;
    margin-right: -5px;
}

.sale-product-layout > [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
}

/* Дополнительная информация о распродаже */
.sale-extra-info {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 2px;
    position: relative;
    overflow: hidden;
}

.sale-extra-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4444, #ffc107, #ff4444);
    animation: saleGlow 2s ease-in-out infinite alternate;
}

.sale-features {
    display: grid;
    gap: 12px;
}

.sale-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #856404;
    font-weight: 600;
    font-size: 0.9rem;
}

.sale-feature i {
    color: #ff4444;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sale-feature span {
    flex: 1;
}

/* Анимация для sale features */
.sale-feature:hover i {
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(-2px);
    }
}

.sale-product-page .product-title {
    position: relative;
    color: #c41e3a;
    text-shadow: 0 2px 4px rgba(196, 30, 58, 0.1);
}

.sale-product-page .product-title::after {
    content: '🔥 РАСПРОДАЖА';
    position: absolute;
    top: -35px;
    right: 0;
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.6em;
    font-weight: bold;
    animation: salePulse 1.5s ease-in-out infinite;
    box-shadow: 0 3px 10px rgba(255, 68, 68, 0.4);
}

.sale-product-page .product-price {
    position: relative;
    padding: 2px;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    border: 2px solid #ff4444;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.15);
}

.sale-product-page .current-price {
    color: #c41e3a !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(196, 30, 58, 0.2);
}

.sale-product-page .old-price {
    color: #999 !important;
    text-decoration: line-through !important;
    font-size: 1.5rem !important;
    position: relative;
    display: block;
    margin-bottom: 0px;
}

.sale-product-page .old-price::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff4444;
    transform: translateY(-50%);
}

.sale-product-page .discount-badge {
    background: #28a745 !important;
    color: white !important;
    padding: 8px 15px !important;
    border-radius: 25px !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    margin-left: 10px;
    animation: salePulse 2s ease-in-out infinite;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.sale-product-page .savings-info {
    display: block;
    margin-top: 10px;
    padding: 10px 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    font-weight: 600;
}

.sale-product-page .savings-info::before {
    content: '💰 ';
}

.sale-product-page .btn-buy-now {
    background: linear-gradient(135deg, #ff4444, #ff6b35) !important;
    border: none !important;
    color: white !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.3) !important;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.sale-product-page .btn-buy-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.sale-product-page .btn-buy-now:hover::before {
    left: 100%;
}

.sale-product-page .btn-buy-now:hover {
    background: linear-gradient(135deg, #ff2222, #ff5722) !important;
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.4) !important;
    transform: translateY(-2px);
}

.sale-product-page .product-actions {
    position: relative;
}

.sale-product-page .urgent-timer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 0px;
    text-align: center;
    color: #856404;
    font-weight: 600;
}

.sale-product-page .urgent-timer::before {
    content: '⏰ ';
}

/* Sale badge for product images */
.sale-product-page .product-images-container {
    position: relative;
}

.sale-product-page .sale-image-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
    animation: salePulse 1.5s ease-in-out infinite;
}

.sale-product-page .sale-image-badge::before {
    content: '🔥 ';
}

/* Mobile adaptations for sale product page */
@media (max-width: 768px) {
    .sale-product-page .product-title::after {
        top: -30px;
        right: -10px;
        font-size: 0.5em;
        padding: 4px 10px;
    }
    
    .sale-product-page .current-price {
        font-size: 2rem !important;
    }
    
    .sale-product-page .old-price {
        font-size: 1.2rem !important;
    }
    
    .sale-product-page .discount-badge {
        font-size: 0.9rem !important;
        padding: 6px 12px !important;
    }
    
    .sale-product-page .btn-buy-now {
        font-size: 1rem;
        padding: 12px 25px;
    }
} 

/* Принудительный grid стиль для страницы распродажи */
.products-grid.sale-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

.products-grid.sale-grid .product-card {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-width: none !important;
    width: 100% !important;
}

/* Скрываем переключатели на странице распродажи */
.sale-grid ~ .view-controls .view-toggles {
    display: none !important;
} 

.sale-product-page .additional-image {
    width: 64px;
    height: 64px;
}

.sale-product-page .product-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0px;
} 

/* Pagination Styles */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    background: var(--white);
    border: 1px solid var(--gray-300);
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-item:not(:last-child) {
    border-right: 1px solid var(--gray-300);
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 0.75rem;
    color: var(--gray-700);
    background-color: var(--white);
    border: none;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition);
    position: relative;
}

.pagination .page-link:hover {
    color: var(--primary-color);
    background-color: var(--gray-100);
    text-decoration: none;
    z-index: 2;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    z-index: 3;
}

.pagination .page-item.active .page-link:hover {
    background-color: #0056b3;
    color: var(--white);
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.pagination .page-item.disabled .page-link {
    color: var(--gray-500);
    background-color: var(--white);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    color: var(--gray-500);
    background-color: var(--white);
}

/* Pagination container */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem 0;
}

.pagination-info {
    margin-right: 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .pagination .page-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--gray-300);
    }
    
    .pagination .page-item:nth-child(odd) {
        border-right: 1px solid var(--gray-300);
    }
}

/* Pagination animations */
.pagination .page-link {
    transform: translateY(0);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-sm);
}

.pagination .page-item.active .page-link {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

/* Pagination loading state */
.pagination.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pagination.loading .page-link {
    cursor: wait;
}

/* Pagination with filters */
.pagination-container.with-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Pagination in catalog */
.catalog-content .pagination-container {
    margin-top: 2rem;
    padding: 1.5rem 0;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

/* Pagination in product list */
.products-section .pagination-container {
    margin-top: 2rem;
}

/* Pagination in mobile */
@media (max-width: 480px) {
    .pagination {
        font-size: 0.8rem;
    }
    
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0.25rem 0.5rem;
    }
    
    .pagination-info {
        display: none;
    }
} 

.products-grid.list-view .product-card.sale-card .product-specs .spec-label {
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.products-grid.list-view .product-card.sale-card .product-specs ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.products-grid.list-view .product-card.sale-card .product-specs li {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
    min-width: 0;
    gap: 6px;
}

.products-grid.list-view .product-card.sale-card .product-specs .spec-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0 4px 0 0;
    padding: 0;
    display: inline-block;
    min-width: 0;
}

.products-grid.list-view .product-card.sale-card .product-specs .spec-value {
    font-weight: 400;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.products-grid.grid-view .product-card.sale-card .product-info {
    padding-top: 0;
}

.products-grid.grid-view .product-card.sale-card .product-specs {
    margin-top: 16px;
}

.products-grid.grid-view .product-card .product-title,
.products-grid.grid-view .product-card.sale-card .product-title {
    margin-bottom: 0px;
}
.products-grid.grid-view .product-card .product-specs,
.products-grid.grid-view .product-card.sale-card .product-specs {
    margin-top: 12px;
}

.products-grid.grid-view .product-card.sale-card .product-title {
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: visible;
    min-height: calc(2 * 1.3em);
    margin-bottom: 6px;
}

/* Специальные стили для sale кнопок в list view */
.products-grid.list-view .product-card.sale-card .btn-buy-now {
    font-size: 0.65rem;
    padding: 6px 4px;
    letter-spacing: 0.05px;
    width: 100%;
    white-space: nowrap;
}

/* Компактный блок характеристик под фото */
.product-quick-specs-compact {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 18px 0;
  border-left: 4px solid #007bff;
  width: 100%;
  max-width: 520px;
}

.product-quick-specs-compact .spec-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0px;
  padding: 4px 0;
}

.product-quick-specs-compact .spec-item:last-child {
  margin-bottom: 0;
}

.product-quick-specs-compact .spec-label {
  font-weight: 600;
  color: #333;
  min-width: 80px;
  margin-right: 12px;
}

.product-quick-specs-compact .spec-value {
  color: #666;
  text-align: right;
  flex: 1;
  word-wrap: break-word;
}

/* Quick Buy modal compact styles */
#quickBuyModal .modal-content{max-width:420px;padding:18px;border-radius:12px}
#quickBuyModal .modal-title{font-weight:700;font-size:18px;margin-bottom:6px}
#quickBuyModal .modal-product-title{font-size:14px;color:#6c757d;margin-bottom:12px;line-height:1.3}
#quickBuyModal .form-group{margin-bottom:10px}
#quickBuyModal .form-label{margin-bottom:4px;font-size:13px}
#quickBuyModal .form-control, #quickBuyModal textarea{padding:8px 10px;line-height:1.3}
#quickBuyModal textarea{min-height:72px}
#quickBuyModal .submit-btn{width:100%;background:#0d6efd;color:#fff;border:none;border-radius:10px;padding:12px 16px;font-weight:700;letter-spacing:.2px;box-shadow:0 8px 16px rgba(13,110,253,.15)}
#quickBuyModal .submit-btn:hover{background:#0b5ed7}
#quickBuyModal .close-btn{top:8px;right:10px}
.btn-buy-now{background:linear-gradient(135deg,#0d6efd,#0b5ed7);color:#fff;border:none;border-radius:10px;padding:12px 14px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;box-shadow:0 8px 20px rgba(13,110,253,.2)}
.btn-buy-now:hover{filter:brightness(1.05)}

/* Product Detail Page Styles */
.product-detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2px;
  font-family: 'Inter', sans-serif;
  background: #fff;
}




.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff4757;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.main-photo-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-photo {
  width: 100%;
  height: 400px;
  object-fit: contain;
}

.photo-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.thumbnail.active {
  border-color: #007bff;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail.more-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  color: #6c757d;
  font-weight: 600;
  font-size: 14px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.product-header {
  background: #f8f9fa;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.brand-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 0px;
}

.product-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0px;
  line-height: 1.3;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-sku {
  color: #6c757d;
  font-size: 14px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #ffc107;
  font-size: 16px;
}

.star.filled {
  color: #ffc107;
}

.rating-value {
  font-weight: 600;
  color: #2c3e50;
}

.rating-count {
  color: #6c757d;
  font-size: 14px;
}

.price-section {
  background: #f8f9fa;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  text-align: center;
}

.old-price {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 18px;
  margin-bottom: 0px;
}

.discount-badge {
  display: inline-block;
  background: #ff4757;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0px;
}

.current-price {
  font-size: 32px;
  font-weight: 700;
  color: #28a745;
  margin-bottom: 0px;
}

.price-note {
  color: #6c757d;
  font-size: 14px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.btn-outline-primary {
  background: transparent;
  color: #007bff;
  border: 2px solid #007bff;
}

.btn-outline-primary:hover {
  background: #007bff;
  color: white;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #1e7e34;
  transform: translateY(-2px);
}

.quick-specs {
  background: #f8f9fa;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.specs-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0px;
  color: #2c3e50;
  position: relative;
}

.specs-title::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #007bff;
  color: #fff;
  border-radius: 2px;
}

.specs-grid {
  display: grid;
  gap: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

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

.spec-label {
  font-weight: 600;
  color: #495057;
}

.spec-value {
  color: #2c3e50;
}

.availability-status {
  background: #f8f9fa;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  text-align: center;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.status.available {
  color: #28a745;
}

.status.unavailable {
  color: #dc3545;
}

.product-tabs {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 40px;
}

.tab-navigation {
  display: flex;
  border-bottom: 1px solid #e9ecef;
}

.tab-btn {
  padding: 15px 30px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  color: #007bff;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.tab-content {
  padding: 30px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.description-content {
  line-height: 1.6;
  color: #2c3e50;
}

.specifications-content {
  line-height: 1.6;
}

.specs-categories {
  display: grid;
  gap: 30px;
}

.spec-category h4 {
  color: #2c3e50;
  margin-bottom: 0px;
  font-size: 18px;
  font-weight: 600;
}

.specs-list {
  display: grid;
  gap: 10px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f4;
}

.spec-name {
  font-weight: 600;
  color: #495057;
}

.spec-value {
  color: #2c3e50;
}

.reviews-content {
  text-align: center;
  color: #6c757d;
}

.recommended-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 30px;
  text-align: center;
}

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

.recommended-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.recommended-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.card-info {
  padding: 2px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0px;
  line-height: 1.4;
}

.card-title a {
  color: #2c3e50;
  text-decoration: none;
}

.card-title a:hover {
  color: #007bff;
}

.card-price {
  font-size: 18px;
  font-weight: 700;
  color: #28a745;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.modal-body {
  padding: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 0px;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Breadcrumb Styles */
.breadcrumb-nav {
  margin-bottom: 30px;
}

.breadcrumb {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px 20px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin: 0 10px;
  color: #6c757d;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
  
  .action-buttons {
    flex-direction: column;
  }
  
  .tab-navigation {
    flex-direction: column;
  }
  
  .tab-btn {
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    border-right: none;
  }
  
  .recommended-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
}

@media (max-width: 480px) {
  .product-detail-page {
    padding: 15px;
  }
  
  .product-title {
    font-size: 20px;
  }
  
  .current-price {
    font-size: 28px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* === Product Detail Page - Full Characteristics Section === */
.characteristics-section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

.characteristics-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 18px;
  position: relative;
}

.characteristics-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 2px;
}

.characteristics-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.char-group-card {
  border: 1px solid #eef1f4;
  border-radius: 10px;
  padding: 14px 14px 6px 14px;
  background: #fbfcfd;
  transition: all 0.3s ease;
}

.char-group-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.char-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1f2d3d;
  margin-bottom: 0px;
  font-size: 16px;
}

.char-group-header i {
  color: #007bff;
  font-size: 18px;
}

.char-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.char-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #edf0f3;
}

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

.char-label { 
  color: #6c757d; 
  font-size: 13px; 
  font-weight: 500;
}

.char-value { 
  color: #2c3e50; 
  font-weight: 600; 
  font-size: 13px; 
  text-align: right;
}

/* Responsive for characteristics */
@media (max-width: 991.98px) {
  .characteristics-groups { 
    grid-template-columns: 1fr; 
  }
  .char-items-grid { 
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 575.98px) {
  .characteristics-section {
    padding: 2px;
  }
  .characteristics-title {
    font-size: 20px;
  }
}

/* === Product Detail Page - Full Characteristics Section === */
.characteristics-section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

.characteristics-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 18px;
  position: relative;
}

.characteristics-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 2px;
}

.characteristics-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.char-group-card {
  border: 1px solid #eef1f4;
  border-radius: 10px;
  padding: 14px 14px 6px 14px;
  background: #fbfcfd;
  transition: all 0.3s ease;
}

.char-group-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.char-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1f2d3d;
  margin-bottom: 0px;
  font-size: 16px;
}

.char-group-header i {
  color: #007bff;
  font-size: 18px;
}

.char-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.char-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #edf0f3;
}

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

.char-label { 
  color: #6c757d; 
  font-size: 13px; 
  font-weight: 500;
}

.char-value { 
  color: #2c3e50; 
  font-weight: 600; 
  font-size: 13px; 
  text-align: right;
}

/* Responsive for characteristics */
@media (max-width: 991.98px) {
  .characteristics-groups { 
    grid-template-columns: 1fr; 
  }
  .char-items-grid { 
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 575.98px) {
  .characteristics-section {
    padding: 2px;
  }
  .characteristics-title {
    font-size: 20px;
  }
}

/* === Fixed Product Layout Alignment === */



.main-photo {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background: white;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  
  .photo-section {
    max-width: 100%;
  }
}

/* === Fixed Header Section Width === */
.product-header-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}


/* === Fixed Product Container New Layout === */
.product-container-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
  width: 100%;
  box-sizing: border-box;
}



.main-photo {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background: white;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .product-container-new {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .photo-section {
    max-width: 100%;
  }
}



.photo-section {
}

.product-info {
}

/* === Fixed Main Photo Stretching === */
.main-photo-container {
  position: relative;
  margin-bottom: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 0;  /* Убираем отступы */
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;  /* Скрываем выходящие за границы части */
}

.main-photo-wrapper {
  position: relative;
  border-radius: 0;  /* Убираем скругление */
  overflow: hidden;
  box-shadow: none;  /* Убираем тень */
  width: 100%;
  height: 100%;
}

.main-photo {
  width: 100%;
  height: 350px;
  object-fit: contain;  /* Растягиваем фото на весь блок */
  background: white;
  border-radius: 12px;  /* Скругление переносим на само фото */
}

/* === Fixed Thumbnails Alignment === */
.photo-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 20px;  /* Добавляем отступы по бокам */
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;  /* Предотвращаем сжатие */
}

.thumbnail.active {
  border-color: #007bff;
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail.more-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  color: #6c757d;
  font-weight: 600;
  font-size: 12px;
}

/* === FORCE TEST: Price Block Changes (removed) === */

/* === Unified SALE card visuals to match base grid-view === */
.products-grid.grid-view .product-card.sale-card {
    min-height: 380px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #6c757d;
}

.products-grid.grid-view .product-card.sale-card .product-image {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
    margin-bottom: 12px;
}

.products-grid.grid-view .product-card.sale-card .product-info {
    min-height: 140px;
    margin-bottom: 12px;
}

.products-grid .product-card.sale-card .product-actions {
    gap: 2px;
}

.products-grid .product-card.sale-card .product-price-block {
    height: var(--action-height);
    min-height: var(--action-height);
    padding: 0 8px;
}

.products-grid .product-card.sale-card .btn-buy-now {
    height: var(--action-height);
    min-height: var(--action-height);
    font-size: 0.8rem;
    padding: 0 8px;
    letter-spacing: 0.2px;
}

/* Ensure badges are overlaid on image without affecting layout */
.products-grid.grid-view .product-card .product-image { position: relative; }
.products-grid.grid-view .product-card .product-image .sale-badge {
    position: absolute;
    top: 40px;
    left: 10px;
    z-index: 3;
    pointer-events: none;
}
.products-grid.grid-view .product-card .product-image .discount-percentage {
    position: absolute;
    top: 40px;
    right: 10px;
    z-index: 3;
    pointer-events: none;
}

@media (max-width: 768px) {
    .products-grid.grid-view .product-card.sale-card .product-image {
        height: auto;
        min-height: 240px;
    }
}

/* --- Final alignment: SALE card typography/specs/buttons match base grid card --- */
.products-grid.grid-view .product-card.sale-card .product-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    min-height: calc(2 * 1.3em);
    margin-bottom: 6px;
}

.products-grid.grid-view .product-card.sale-card .product-specs {
    flex: 1;
    margin-bottom: 0px;
}
.products-grid.grid-view .product-card.sale-card .product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: #4a5568;
}
.products-grid.grid-view .product-card.sale-card .product-specs li {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}
.products-grid .product-card.sale-card .contact-buttons { gap: 4px; margin-top: 0; }

/* 📱 МОБИЛЬНЫЕ СТИЛИ */
@media (max-width: 768px) {
    /* Уменьшаем отступы в мобильной версии */
    .products-grid.grid-view .product-title {
        margin-bottom: 3px !important; /* было 4px */
    }
    
    .products-grid.grid-view .product-image {
        margin-bottom: 4px !important; /* было 8px */
    }
    
    .products-grid.grid-view .product-info {
        margin-bottom: 4px !important; /* было 8px */
    }
    
    /* Уменьшаем размер текста кнопок на мобильных */
    .products-grid .btn-buy-now {
        font-size: 0.7rem !important;
        letter-spacing: 0.1px !important;
    }
    
    .products-grid .product-card.sale-card .btn-buy-now {
        font-size: 0.7rem !important;
        letter-spacing: 0.1px !important;
    }
}

