/* Стили для сборок - ВОССТАНАВЛИВАЕМ ОРИГИНАЛЬНЫЕ ЦВЕТА И ДЕЛАЕМ 5 В РЯД */
.assemblies-section {
    margin: 40px 0;
}

/* Область изображения в карточках «Готовые сборки» — абсолютно белый фон */
.assemblies-section .catalog-product-image {
    background: #ffffff;
}

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

.section-header h2 {
    font-size: 28px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--yellow-secondary);
}

.view-all {
    color: var(--yellow-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #e6b400;
    text-decoration: none;
}

.assemblies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.assembly-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 330px;
}

.assembly-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.assembly-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
}

.no-image i {
    font-size: 40px;
}

.assembly-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--yellow-secondary);
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
    z-index: 2;
}

.assembly-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.assembly-info h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.assembly-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 50px;
}

.assembly-components {
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
    max-height: 120px;
    overflow: hidden;
}

.assembly-components h4 {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assembly-components h4 i {
    color: var(--yellow-secondary);
    font-size: 11px;
}

.component-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.component-item i {
    color: #4CAF50;
    margin-top: 1px;
    flex-shrink: 0;
    font-size: 10px;
}

.component-item:last-child {
    margin-bottom: 0;
}

.btn-show-all-components {
    width: 100%;
    background: none;
    border: 1px dashed #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    color: var(--yellow-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-show-all-components:hover {
    background: #f5f5f5;
    border-color: var(--yellow-secondary);
}

.btn-show-all-components i {
    font-size: 10px;
}

.assembly-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-add-assembly,
.btn-view-assembly {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-add-assembly {
    background: var(--yellow-secondary);
    color: #333;
    border: none;
}

.btn-add-assembly:hover {
    background: #e6b400;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.btn-view-assembly {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    font-size: 12px;
    padding: 8px 10px;
}

.btn-view-assembly:hover {
    background: #f5f5f5;
    border-color: var(--yellow-secondary);
    color: var(--yellow-secondary);
}

.no-assemblies {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    grid-column: 1 / -1;
}

.no-assemblies-icon {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 10px;
}

.no-assemblies h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
}

.no-assemblies p {
    color: #888;
    font-size: 13px;
}

/* Адаптивность для 5 карточек */
@media (max-width: 1400px) {
    .assemblies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

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

    .assembly-image {
        height: 180px;
    }

    .assembly-info h3 {
        font-size: 15px;
    }

    .assembly-description {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .assemblies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .assembly-image {
        height: 200px;
    }

    .assembly-card {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .assemblies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .assembly-image {
        height: 180px;
    }

    .assembly-info {
        padding: 12px;
    }

    .assembly-actions {
        flex-direction: row;
    }

    .assembly-card {
        min-height: 400px;
    }

    .assembly-info h3 {
        font-size: 14px;
        height: 40px;
    }

    .assembly-description {
        font-size: 12px;
        min-height: 54px;
    }
}

@media (max-width: 576px) {
    .assemblies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .assembly-image {
        height: 200px;
    }

    .assembly-card {
        min-height: auto;
        max-width: 350px;
        margin: 0 auto;
    }

    .assembly-actions {
        flex-direction: row;
    }

    /* Заголовок и «Смотреть все» в одну линию */
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 20px;
        flex-wrap: nowrap;
    }

    .section-header h2 {
        font-size: 22px;
        margin: 0;
        white-space: nowrap;
    }

    .view-all {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 18px;
    }

    .view-all {
        font-size: 14px;
    }

    .assembly-image {
        height: 180px;
    }

    .assembly-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .assembly-info {
        padding: 10px;
    }

    .assembly-info h3 {
        font-size: 13px;
        height: 34px;
    }

    .assembly-description {
        font-size: 11px;
        min-height: 45px;
    }

    .btn-add-assembly,
    .btn-view-assembly {
        padding: 6px 8px;
        font-size: 11px;
    }

    .assembly-components {
        padding: 8px;
        max-height: 100px;
    }

    .component-item {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .assembly-actions {
        flex-direction: column;
        gap: 6px;
    }

    .btn-add-assembly,
    .btn-view-assembly {
        width: 100%;
    }
}

/* Стили для модального окна с деталями сборки */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 20px 25px;
    background: var(--yellow-secondary);
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

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

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

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

.assembly-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.assembly-details-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.assembly-details-image {
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    height: 280px;
}

.assembly-details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.assembly-details-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.assembly-details-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.assembly-details-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--yellow-secondary);
    margin: 5px 0;
}

.assembly-details-description {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--yellow-secondary);
}

.assembly-details-components {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.assembly-details-components h4 {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.assembly-details-components h4 i {
    color: var(--yellow-secondary);
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.component-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #4CAF50;
    transition: all 0.3s;
}

.component-detail-item:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.component-detail-item i {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.component-detail-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.modal-footer {
    padding: 15px 25px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-primary {
    background: var(--yellow-secondary);
    color: #333;
}

.btn-modal-primary:hover {
    background: #e6b400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-modal-secondary {
    background: #666;
    color: white;
}

.btn-modal-secondary:hover {
    background: #555;
}

/* Адаптивность модального окна */
@media (max-width: 768px) {
    .assembly-details-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .assembly-details-image {
        height: 220px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }

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

    .assembly-details-name {
        font-size: 18px;
    }

    .assembly-details-price {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .assembly-details-image {
        height: 180px;
    }

    .assembly-details-name {
        font-size: 16px;
    }

    .assembly-details-price {
        font-size: 18px;
    }

    .btn-modal {
        padding: 8px 16px;
        font-size: 13px;
    }
}
/* Стили для разделения рядов сборок */
.assemblies-row {
    margin-bottom: 30px;
}

.assemblies-row:last-child {
    margin-bottom: 0;
}

/* Отступы между рядами на разных устройствах */
@media (max-width: 1400px) {
    .assemblies-row {
        margin-bottom: 25px;
    }
}

@media (max-width: 1200px) {
    .assemblies-row {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .assemblies-row {
        margin-bottom: 15px;
    }
}

/* МОБИЛЬНАЯ ВЕРСИЯ - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ */
.mobile-menu-button {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-button {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--yellow-gradient);
        color: #333;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        margin-left: 10px;
        font-size: 14px;
    }

    .mobile-menu-button i {
        font-size: 16px;
    }

    .nav-categories-btn {
        display: none;
    }

    .header-content {
        padding: 10px 0;
    }

    .logo span {
        font-size: 18px;
    }

    .logo i {
        font-size: 22px;
    }

    .header-actions {
        gap: 10px;
    }

    .action-btn span {
        display: none;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        justify-content: center;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .action-btn i {
        margin: 0;
        font-size: 18px;
    }

    .cart-btn .cart-count {
        top: -5px;
        right: -5px;
    }

    .nav-links {
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .nav-links a {
        white-space: nowrap;
        font-size: 14px;
        padding: 10px 5px;
    }

    .nav-links a i {
        display: none;
    }

    .categories-sidebar {
        display: none;
    }

    .main-container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .assemblies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .assembly-card {
        margin-bottom: 0;
        min-height: 320px;
        display: flex;
        flex-direction: column;
    }

    .assembly-image {
        height: 140px;
    }

    .assembly-badge {
        font-size: 11px;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }

    .assembly-info {
        padding: 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .assembly-info h3 {
        font-size: 13px;
        height: 36px;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .assembly-description {
        font-size: 11px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        min-height: 45px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .assembly-components {
        margin-bottom: 12px;
        max-height: 100px;
        overflow: hidden;
    }

    .assembly-components h4 {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .component-item {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .btn-show-all-components {
        font-size: 10px;
        padding: 4px 6px;
    }

    .assembly-actions {
        margin-top: auto;
        flex-direction: row;
        gap: 8px;
    }

    .btn-add-assembly,
    .btn-view-assembly {
        padding: 8px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .btn-add-assembly i,
    .btn-view-assembly i {
        font-size: 10px;
    }

    .assemblies-row {
        margin-bottom: 20px;
    }

    .assemblies-row:last-child {
        margin-bottom: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-column h3 {
        font-size: 18px;
    }

    .right-sidebar.open {
        width: 100%;
    }

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

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

@media (max-width: 480px) {
    .assemblies-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .assembly-card {
        min-height: 300px;
    }

    .assembly-image {
        height: 120px;
    }

    .assembly-actions {
        flex-direction: column;
        gap: 6px;
    }

    .btn-add-assembly,
    .btn-view-assembly {
        width: 100%;
        font-size: 10px;
        padding: 6px 8px;
    }
}

.mobile-navigation {
    display: none;
}

@media (max-width: 768px) {
    .mobile-navigation {
        display: flex;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        z-index: 1000;
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #666;
        font-size: 11px;
        padding: 5px 10px;
        border-radius: 8px;
        transition: all 0.3s;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-nav-item.active {
        color: var(--yellow-secondary);
        background: rgba(255, 193, 7, 0.1);
    }

    .mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .main-content-wrapper {
        padding-bottom: 70px;
    }

    .nav-links {
        display: none;
    }
}

.mobile-categories-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1002;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-categories-menu.active {
    transform: translateY(0);
}

.mobile-categories-header {
    padding: 15px 20px;
    background: var(--yellow-gradient);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.mobile-categories-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-categories-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.mobile-categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.mobile-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.mobile-category-item:hover {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--yellow-secondary);
}

.mobile-category-item i {
    color: var(--yellow-secondary);
    font-size: 18px;
    width: 24px;
}