:root {
    --bg-color: #8a8e91;
    --surface-color: #9da1a4;
    --surface-hover: #a8acaf;
    --text-primary: #1a1e21;
    --text-secondary: #161a1d;
    /* Changed from light #e8eaec to dark #161a1d to improve contrast on gray backgrounds */
    --accent-color: #2b3035;
    /* Dark graphite instead of bright blue */
    --accent-hover: #161a1d;
    /* Almost black */
    --accent-warm: #e17c1a;
    --border-color: #6e7377;
    --border-accent: rgba(43, 48, 53, 0.5);
    --img-bg: #8a8e91;
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 8px 30px rgba(43, 48, 53, 0.3);
    --spacing: 20px;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing);
}

/* ── Header ── */
header {
    border-bottom: 3px solid var(--accent-color);
    padding: 0;
    margin-bottom: 40px;
    background: var(--bg-color);
}

.logo-container {
    display: block;
    width: 100%;
}

.logo-container a {
    display: block;
    width: 100%;
}

.logo-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Index Page: Product Grid ── */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    background: var(--surface-hover);
    box-shadow: var(--shadow-card-hover);
}

.product-card h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--accent-color);
}

.product-card p {
    color: var(--text-secondary);
}

.product-card img {
    max-width: 100%;
    max-height: 300px;
    height: auto;
    width: auto;
    border-radius: 4px;
    background: var(--img-bg);
    padding: 10px;
}

/* ── Section Titles ── */
.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

/* ── About Section ── */
.about-section {
    background: var(--surface-color);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

/* ── Contacts Section ── */
.contacts-section {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s;
}

.contact-item:hover img {
    opacity: 0.85;
    transform: scale(1.05);
}

.contact-item img {
    border-radius: 8px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ── Product Page ── */
.product-info {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.product-main-gallery {
    flex: 0.6;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-gallery-item {
    background: var(--surface-color);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.product-gallery-item img {
    max-width: 100%;
    max-height: 280px;
    height: auto;
    width: auto;
    background: var(--img-bg);
    padding: 10px;
    border-radius: 4px;
}

/* ── Specs Table ── */
.specs-table .table-group {
    background: rgba(43, 48, 53, 0.15);
    /* Soft dark gray background instead of blue */
    font-weight: bold;
    color: var(--accent-color);
}

.product-desc {
    flex: 0.8;
    color: var(--text-primary);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--surface-color);
    border-radius: 4px;
}

.specs-table th,
.specs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.specs-table th {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── Connection Diagrams ── */
.connection-photos {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 40px 0;
}

.connection-photo-box {
    text-align: center;
}

.connection-photo-box p {
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color);
}

.connection-photo-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--img-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-card);
}

/* ── Materials Section ── */
.materials-section {
    margin-top: 60px;
    padding: 30px;
    background: var(--surface-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

.materials-links {
    display: flex;
    gap: 20px;
}

/* ── Buttons ── */
.btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s, box-shadow 0.3s;
}

.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(43, 48, 53, 0.3);
}

.btn-secondary {
    background: #636e72;
}

.btn-secondary:hover {
    background: #4a5568;
}

/* ── Responsive Mobile Styles ── */
@media screen and (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-info {
        flex-direction: column;
        gap: 20px;
    }

    .product-main-gallery {
        flex: 1;
    }

    .product-desc {
        flex: 1;
    }

    .specs-table {
        display: block;
        overflow-x: auto;
    }

    .contacts-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .materials-links {
        flex-direction: column;
        gap: 10px;
    }

    .materials-links .btn {
        width: 100%;
        text-align: center;
    }
}