:root {
    --primary: #1a1a1a;
    --primary-foreground: #f5f5f5;
    --accent: #ff4d00;
    --accent-foreground: #ffffff;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --border: #e4e4e7;
    --card: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: var(--primary);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand, .btn {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== НАВИГАЦИЯ ========== */
.navbar {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-box {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.tagline {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-accent {
    background: var(--accent);
    color: var(--accent-foreground);
}

.btn-accent:hover {
    background: #e64400;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 77, 0, 0.3);
}

.btn-outline {
    background: #ffffff;
    border: 2px solid var(--border);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ========== ГЕРОЙ ========== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(26,26,26,0.9), rgba(26,26,26,0.7), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 77, 0, 0.1);
    border: 1px solid rgba(255, 77, 0, 0.5);
    color: var(--accent);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    font-family: monospace;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    border-radius: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.outline-text {
    -webkit-text-stroke: 2px white;
    color: transparent;
}

.accent-text {
    color: var(--accent);
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.experience-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255, 77, 0, 0.1);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(255, 77, 0, 0.3);
    border-left: 2px solid rgba(255, 77, 0, 0.3);
    padding: 2rem;
    text-align: right;
    display: none;
}

@media (min-width: 1024px) {
    .experience-badge {
        display: block;
    }
}

.exp-number {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Oswald', sans-serif;
}

.exp-text {
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* ========== ПРЕИМУЩЕСТВА ========== */
.features {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
    border-radius: 8px;
    background: white;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 4px 4px 0 0 var(--accent);
    transform: translate(-2px, -2px);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* ========== КАТАЛОГ (4 КАРТОЧКИ В РЯД) ========== */
.catalog {
    padding: 6rem 0;
    background-color: #fafafa;
}

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

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--muted-foreground);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.product-card {
    background: white;
    border: 2px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 8px 8px 0 0 var(--primary);
    transform: translate(-2px, -2px);
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--muted);
    overflow: hidden;
    padding: 1.5rem;
}

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

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

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-info {
    padding: 1.5rem;
    border-top: 2px solid var(--border);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.product-specs {
    margin-top: auto;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-family: monospace;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.product-action {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.product-action .btn {
    width: 100%;
    background: var(--muted);
    color: var(--primary);
    border: 2px solid var(--border);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* ========== ПРИЗЫВ К ДЕЙСТВИЮ ========== */
.cta {
    position: relative;
    padding: 6rem 0;
    color: white;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-bg .overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.9);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== ПОДВАЛ ========== */
.footer {
    padding: 4rem 0 2rem;
    background: white;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-info p {
    margin-top: 1rem;
    color: var(--muted-foreground);
    max-width: 300px;
}

.footer-contacts p {
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copyright {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    margin: 20px auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.product-modal-content {
    max-width: 1100px;
}

.quote-modal-content {
    max-width: 500px;
    padding: 2rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--muted-foreground);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s;
}

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

.modal-body {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr 1fr;
    }
}

.product-image-col {
    background: var(--muted);
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 600px;
    border-radius: 12px 0 0 12px;
}

/* Десктоп: main-image-container растягивается на всю высоту колонки */
.main-image-container {
    position: relative;
    width: 100%;
    flex: 1;                /* занимает всё доступное место в колонке */
    min-height: 300px;
    background: var(--muted);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .product-image-col {
        min-height: unset;
        padding: 0;
        border-radius: 12px 12px 0 0;
    }

    .main-image-container {
        flex: none;
        border-radius: 12px 12px 0 0;
        width: 100%;
        height: auto;
        min-height: unset;
        max-height: unset;
        margin-bottom: 0;
    }

    .thumbnails-container {
        padding: 0.5rem 0.75rem;
    }
}

.product-image-col img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.badge-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    font-weight: bold;
    font-size: 0.875rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.product-info-col {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.product-info-col h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 2rem;
}

.specs-section {
    margin-bottom: 2.5rem;
}

.specs-section h4 {
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.specs-grid {
    display: grid;
    gap: 1.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--muted-foreground);
    font-weight: bold;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.spec-value {
    font-family: monospace;
    font-size: 12px;
    color: var(--primary);
}

.benefits-list {
    background: rgba(0,0,0,0.03);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.benefits-list p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.modal-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 160px;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.modal-secondary-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.modal-secondary-actions .btn {
    flex: 1;
    min-width: 0;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: color 0.2s, border-color 0.2s;
}

.btn-share svg {
    flex-shrink: 0;
}

/* ========== ФОРМЫ ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    font-family: inherit;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.modal-footer-contacts {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    flex-wrap: wrap;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========== АДАПТИВНОСТЬ КАТАЛОГА (4→3→2→1) ========== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ========== МНОГОИЗОБРАЗИТЕЛЬНАЯ МОДАЛКА ========== */

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .main-image-container img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.image-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

.image-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 2;
}

.thumbnails-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--border);
}

.thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border: 2px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 77, 0, 0.3);
}

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

/* Кастомный скроллбар для миниатюр */
.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 3px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.thumbnails-container::-webkit-scrollbar-thumb:hover {
    background: #e64400;
}

/* Адаптивность для миниатюр */
@media (max-width: 768px) {
    .thumbnails-container:has(.thumbnail:only-child) {
        display: none;
    }
}
    
    .thumbnail {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .image-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .main-image-container {
        height: 55vw;
        min-height: 200px;
        max-height: 320px;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
}

/* ========== АДАПТИВНОСТЬ МОДАЛЬНОГО ОКНА ========== */
@media (max-width: 600px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .product-image-col {
        min-height: 300px;
        border-radius: 12px 12px 0 0;
    }
    
    .product-info-col {
        padding: 1.25rem;
    }
    
    .product-info-col h2 {
        font-size: 1.4rem;
    }
    
    .price {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .specs-section {
        margin-bottom: 1rem;
    }

    .benefits-list {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .modal-actions .btn {
        padding: 0.75rem 1rem;
    }
}

/* ========== АДАПТИВНОСТЬ ГЕРОЯ И НАВИГАЦИИ ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        padding: 4rem 0;
        text-align: center;
    }
    
    .hero-bg .overlay {
        background: rgba(26,26,26,0.8);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-desc {
        font-size: 1rem;
        border-left: none;
        padding-left: 0;
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

/* ========== АДАПТИВНОСТЬ ПОДВАЛА ========== */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}

::selection {
    background: var(--accent);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== СТИЛИ ДЛЯ ПЕЧАТИ ========== */
@media print {
    .navbar,
    .hero-buttons,
    .product-action,
    .modal-actions,
    .btn,
    .cta,
    .footer {
        display: none !important;
    }
    
    .hero {
        color: black;
        height: auto;
    }
    
    .hero-bg {
        display: none;
    }
    
    .outline-text {
        -webkit-text-stroke: 0;
        color: black;
    }
    
    body {
        font-size: 12pt;
    }
    
    .product-card {
        break-inside: avoid;
    }
}