:root {
    --theme-color: #007bff;
    --theme-color2: #00045F;
    --title-color: #161921;
    --body-color: #646464;
    --smoke-color: #F7F7F7;
    --smoke-color2: #EFF3FA;
    --black-color: #000000;
    --black-color2: #080E1C;
    --gray-color: #bdbdbd;
    --white-color: #ffffff;
    --light-color: #bdbdbd;
    --yellow-color: #FFB539;
    --success-color: #28a745;
    --error-color: #dc3545;
    --border-color: #E0E0E0;
    --title-font: 'Outfit', sans-serif;
    --body-font: 'Roboto', sans-serif;
    --icon-font: "Font Awesome 6 Pro";
    --main-container: 1220px;
    --container-gutters: 30px;
    --section-space: 120px;
    --section-space-mobile: 80px;
    --section-title-space: 60px;
}

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

body {
    background: var(--white-color);
    min-height: 100vh;
    color: var(--title-color);
    overflow-x: hidden;
    font-family: var(--body-font);
    width: 100%;
}

.product-specification-container {
    max-width: var(--main-container);
    margin: 0 auto;
    padding: 80px 30px 30px 30px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: var(--section-title-space);
    opacity: 0;
    animation: fadeInDown 1s ease-out forwards;
}

.header h1 {
    font-family: var(--title-font);
    font-size: 3.5rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--theme-color), var(--theme-color2));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    word-wrap: break-word;
    line-height: 1.1;
}

.header p {
    font-size: 1.2rem;
    color: var(--body-color);
    font-family: var(--body-font);
    word-wrap: break-word;
}

.product-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(0, 123, 255, 0.1);
    border: 2px solid var(--border-color);
    color: var(--theme-color);
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--title-font);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
}

.nav-btn:hover {
    background: rgba(0, 123, 255, 0.15);
    border-color: var(--theme-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.25);
}

.nav-btn.active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: var(--white-color);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.product-page {
    display: none;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    width: 100%;
    overflow: hidden;
}

.product-page.active {
    display: block;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    width: 100%;
}

.product-info {
    background: var(--smoke-color2);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.08);
    width: 100%;
    overflow: hidden;
}

.product-info h2 {
    font-family: var(--title-font);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--title-color);
    word-wrap: break-word;
    line-height: 1.2;
}

.product-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--body-color);
    font-family: var(--body-font);
    word-wrap: break-word;
}

.product-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: fit-content;
    width: 100%;
    max-width: 100%;
}

.product-image {
    /* Убираем фиксированный aspect-ratio и overflow: hidden */
    background: var(--smoke-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--theme-color);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.1);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    min-height: 200px; /* Минимальная высота для пустых блоков */
    padding: 20px; /* Добавляем отступы для контента */
}

.product-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain; /* Сохраняем пропорции изображения */
}

.product-image:hover {
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
    background: var(--smoke-color2);
}

.product-image:first-child {
    grid-column: 1 / -1;
    /* Убираем aspect-ratio: 2; */
}

.tech-specs {
    margin-top: var(--section-title-space);
    width: 100%;
}

.tech-specs h3 {
    font-family: var(--title-font);
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--title-color);
    word-wrap: break-word;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    width: 100%;
}

.spec-table {
    background: var(--white-color);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.08);
    width: 100%;
}

.spec-table h4 {
    background: var(--smoke-color2);
    padding: 20px;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--theme-color);
    font-family: var(--title-font);
    word-wrap: break-word;
}

.spec-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.spec-table th,
.spec-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--body-font);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.spec-table th {
    background: var(--smoke-color);
    font-weight: 600;
    font-size: 1rem;
    color: var(--title-color);
}

.spec-table td {
    font-size: 0.95rem;
    color: var(--body-color);
}

.spec-table tr:hover {
    background: var(--smoke-color2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
    width: 100%;
}

.feature-card {
    background: var(--white-color);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.08);
    width: 100%;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.15);
    background: var(--smoke-color2);
}

.feature-card h5 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--theme-color);
    font-family: var(--title-font);
    word-wrap: break-word;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--body-color);
    font-family: var(--body-font);
    word-wrap: break-word;
}

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

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

/* Планшеты и малые ноутбуки */
@media (max-width: 1024px) {
    .product-specification-container {
        padding: 60px 20px 20px 20px;
    }

    .header h1 {
        font-size: 3rem;
    }

    .specs-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Планшеты */
@media (max-width: 768px) {
    .product-specification-container {
        padding: 40px 15px 15px 15px;
    }

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

    .header {
        margin-bottom: var(--section-space-mobile);
    }

    .header h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .header p {
        font-size: 1.1rem;
    }

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

    .nav-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        flex: 1 1 auto;
        max-width: calc(50% - 7.5px);
    }

    .tech-specs {
        margin-top: var(--section-space-mobile);
    }

    .tech-specs h3 {
        font-size: 1.8rem;
    }

    .product-info h2 {
        font-size: 2rem;
    }

    .product-info p {
        font-size: 1rem;
    }

    .product-image {
        font-size: 2.5rem;
        min-height: 150px; /* Уменьшаем минимальную высоту для мобильных */
        padding: 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .spec-table th,
    .spec-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .spec-table h4 {
        font-size: 1.2rem;
        padding: 15px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .product-specification-container {
        padding: 20px 10px 10px 10px;
    }

    .header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .header p {
        font-size: 1rem;
    }

    .product-navigation {
        gap: 10px;
        margin-bottom: 30px;
    }

    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        max-width: 100%;
    }

    .product-content {
        gap: 25px;
        margin-bottom: 40px;
    }

    .product-info {
        padding: 20px;
    }

    .product-info h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .product-info p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .product-gallery {
        gap: 10px;
    }

    .product-image {
        font-size: 2rem;
        min-height: 120px; /* Еще меньше для очень маленьких экранов */
        padding: 10px;
    }

    .tech-specs {
        margin-top: 50px;
    }

    .tech-specs h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .specs-grid {
        gap: 20px;
    }

    .spec-table th,
    .spec-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .spec-table h4 {
        font-size: 1.1rem;
        padding: 12px;
    }

    .features-grid {
        gap: 15px;
        margin-top: 30px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-card h5 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .feature-card p {
        font-size: 0.9rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    .product-specification-container {
        padding: 15px 8px 8px 8px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .product-info {
        padding: 15px;
    }

    .product-info h2 {
        font-size: 1.6rem;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .feature-card {
        padding: 15px;
    }

    .product-image {
        font-size: 1.8rem;
        min-height: 100px;
        padding: 8px;
    }
}

/* Landscape ориентация для мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .header h1 {
        font-size: 2.2rem;
    }

    .product-specification-container {
        padding: 30px 15px 15px 15px;
    }

    .tech-specs {
        margin-top: 60px;
    }
}