:root {
    /* High-Impact Premium Palette */
    --bg-dark: #050505;
    --bg-midnight: #0A0A10;
    --accent-blue: #3B82F6;
    --accent-indigo: #6366F1;
    --accent-cyan: #22D3EE;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow-blue: rgba(59, 130, 246, 0.15);

    --font-display: "Playfair Display", serif;
    --font-main: "Inter", system-ui, sans-serif;
    --font-brand: "Outfit", sans-serif;
    /* New brand font */

    --spacing-xl: 10rem;
    --container-max: 1200px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- LOGO --- */
.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    color: var(--accent-blue);
    vertical-align: middle;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.brand {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.brand span {
    color: var(--accent-blue);
    margin-left: 2px;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

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

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 3px;
    background: #fff;
    transition: all 0.25s ease;
}

nav.mobile-nav-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

nav.mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

nav.mobile-nav-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Immersive Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0;
    background: radial-gradient(circle at 80% 20%, var(--glow-blue), transparent 40%);
}

.hero-header {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

@media (min-width: 768px) {
    .hero-header {
        margin-left: 10%; /* Positions the text block between the far left edge and true center */
    }
}

.tagline {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 2rem;
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.7;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
    border-left: 2px solid var(--accent-blue);
    padding-left: 20px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    margin-bottom: var(--spacing-xl);
}

.bento-item {
    position: relative;
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.5s ease;
    text-decoration: none; /* Prevent blue/purple link color */
    color: var(--text-primary);
}

.bento-item:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-5px);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.35;
    transition: transform 0.8s ease;
}

.bento-content {
    position: relative;
    z-index: 10;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, var(--bg-midnight) 10%, transparent);
}

.bento-item h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.bento-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 250px;
}

/* --- Shared Two-Column Layout Helpers --- */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.split-grid-tight {
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 6rem;
}

.solution-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.feature-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    grid-auto-rows: minmax(220px, auto) !important;
    margin-bottom: 0;
}

.feature-grid > div {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* --- Contact Section --- */
.input-field {
    width: 100%;
    padding: 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    font-family: var(--font-main);
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Methodology --- */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.method-card {
    padding: 3rem;
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.num {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent-blue);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

/* --- Tech Stack --- */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0.6;
}

.tech-tag {
    padding: 0.75rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- FAQ --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
    cursor: pointer;
}

.faq-item h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    margin-top: 1rem;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    height: 250px;
    background: var(--bg-midnight);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* --- Footer --- */
.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
}

/* --- Mobile --- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .split-grid,
    .solution-layout {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .bento-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: 350px;
    }

    .hero {
        align-items: flex-start;
        padding-top: 12rem;
    }

    .method-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }
}

/* --- Mobile Responsive Overrides for inline-styled grids --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    nav {
        padding: 0.9rem 0;
    }

    .brand {
        font-size: 1.15rem;
        letter-spacing: -0.2px;
    }

    .logo-icon {
        width: 26px;
        height: 26px;
        margin-right: 10px;
    }

    .tagline {
        font-size: 0.7rem;
        letter-spacing: 3px;
        margin-bottom: 1rem;
    }

    .hero {
        min-height: auto;
        padding: 8.5rem 0 4.5rem;
    }

    .hero-header {
        max-width: 100%;
    }

    #contact .container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .split-grid,
    .solution-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .split-grid-tight {
        margin-bottom: 3rem;
    }

    .feature-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
    }

    /* Hero section improvements for mobile */
    .hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.3rem);
        letter-spacing: -1px;
        line-height: 1;
        margin-bottom: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 2rem;
        padding-left: 14px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    .btn-primary {
        padding: 1rem 1.4rem;
        font-size: 0.95rem;
    }

    .hero-cta a[style] {
        margin-left: 0 !important;
    }

    /* Section headings size reduction */
    h2[style*="font-size: 3rem"],
    h2[style*="font-size: 3.5rem"] {
        font-size: clamp(2rem, 9vw, 2.45rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 1.25rem !important;
    }

    .split-grid p[style*="font-size: 1.1rem"],
    .split-grid p[style*="max-width: 450px"],
    #contact p[style*="color: var(--text-secondary)"] {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        max-width: 100% !important;
    }

    #contact form {
        max-width: 560px;
        margin: 0 auto;
    }

    .input-field {
        padding: 1rem;
        margin-bottom: 1rem;
        font-size: 1rem;
    }

    #contact button.btn-primary {
        white-space: normal;
        line-height: 1.25;
        min-height: 54px;
    }

    .method-card,
    .team-card {
        padding: 2rem 1.5rem;
    }

    /* Footer responsive */
    footer > div[style] {
        flex-direction: column !important;
        gap: 3rem !important;
    }

    footer > div > div[style*="gap: 4rem"] {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    /* Team grid already handled but ensure */
    .team-grid {
        grid-template-columns: 1fr !important;
    }

    /* Gallery grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Philosophy quote card */
    div[style*="padding: 4rem"] {
        padding: 2rem !important;
    }

    /* Constrain all sections to prevent overflow */
    .container {
        width: 100%;
        overflow-x: clip;
    }

    section[style*="padding: 10rem"],
    section[style*="padding-bottom: 10rem"] {
        padding-top: 4.5rem !important;
        padding-bottom: 4.5rem !important;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 0 1rem;
    }

    .brand {
        font-size: 1.05rem;
    }

    .hero h1 {
        font-size: clamp(2.1rem, 10.8vw, 2.8rem);
    }

    .bento-content {
        padding: 1.4rem;
    }

    .bento-item {
        height: 300px;
    }

    .tech-grid {
        gap: 0.8rem;
    }

    .tech-tag {
        padding: 0.55rem 0.8rem;
        font-size: 0.7rem;
        letter-spacing: 0.6px;
    }
}

@media (max-width: 600px) {
    .nav-content {
        position: relative;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.85rem;
        background: rgba(10, 10, 16, 0.96);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
    }

    nav.mobile-nav-open .nav-links {
        display: flex;
    }

    .nav-links > a,
    .nav-links .dropbtn {
        display: block;
        width: 100%;
        padding: 0.7rem 0.55rem;
        font-size: 0.92rem;
        border-radius: 8px;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown::after,
    .dropdown-content::before {
        display: none;
    }

    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        top: auto;
        left: auto;
        min-width: 0;
        box-shadow: none;
        background: transparent;
        border: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
        padding: 0.2rem 0 0.5rem 0.75rem;
    }

    .dropdown-content a {
        padding: 0.55rem;
        font-size: 0.86rem;
    }

    .dropdown-content a:hover {
        transform: none;
    }
}

/* Team Grid Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.team-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-10px);
    background: var(--bg-midnight);
}

.team-image-placeholder {
    width: 60px;
    height: 60px;
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
}

.team-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.team-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.team-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 2.5rem;
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-midnight);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.team-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    z-index: -1;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    opacity: 0.15;
    z-index: 1;
    filter: blur(15px);
    transition: opacity 0.5s ease;
}

.team-card:hover .avatar-glow {
    opacity: 0.3;
}

.avatar-ceo {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: var(--accent-blue);
}

.avatar-cto {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-color: var(--accent-indigo);
}

.avatar-cso {
    background: linear-gradient(135deg, #164e63, #083344);
    border-color: var(--accent-cyan);
}


@media (max-width: 900px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Dropdown Navigation --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    background: rgba(10, 10, 16, 0.85); /* var(--bg-midnight) with opacity */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    min-width: 240px;
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 1001; /* Ensure above hero images */
    top: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.5rem;
}

/* Subtle notch to point to the nav item */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(10, 10, 16, 0.95);
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2; /* keep above the notch */
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(5px);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    top: 100%;
}

/* Add an invisible buffer zone so the cursor doesn't fall off the gap */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

/* --- 3D Printing Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #111;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-blue);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-badge.out {
    background: #eab308;
    color: #000;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.product-price {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.product-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--glass);
    padding: 4px 8px;
    border-radius: 4px;
}

.request-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.request-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin: 0 auto 2rem;
    max-width: 900px;
}

.filter-chip {
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.55);
}

.filter-chip.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
}

.catalog-controls {
    max-width: 980px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1.5fr auto auto;
    gap: 0.9rem;
    align-items: end;
}

.catalog-search-wrap,
.catalog-sort-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.catalog-control-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.catalog-search,
.catalog-sort {
    width: 100%;
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.68rem 0.8rem;
    font-size: 0.9rem;
    font-family: var(--font-main);
    -webkit-appearance: none;
    appearance: none;
}

.catalog-sort {
    padding-right: 2.2rem;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.catalog-search::placeholder {
    color: #8192ad;
}

.catalog-search:focus,
.catalog-sort:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.catalog-stock-toggle {
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
    padding: 0.72rem 0.95rem;
    border-radius: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.catalog-stock-toggle:hover {
    border-color: rgba(59, 130, 246, 0.55);
    color: var(--text-primary);
}

.catalog-stock-toggle.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: #fff;
}

.catalog-filters,
.catalog-controls {
    width: min(100%, 980px);
}

.variant-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.variant-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    font-weight: 700;
}

.variant-select {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.58rem 0.65rem;
    font-size: 0.88rem;
}

.loading-state,
.error-state {
    border: 1px solid var(--glass-border);
    background: var(--bg-midnight);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    color: var(--text-secondary);
    text-align: center;
}

.error-state {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-midnight);
    margin: auto;
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
}

.close-modal {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .input-field {
    margin-bottom: 1rem;
}

.quantity-row {
    align-items: center;
    background: var(--glass);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.quantity-row label {
    flex-grow: 1;
    font-weight: 600;
}

.quantity-row input {
    width: 80px;
    margin-bottom: 0;
    padding: 0.5rem;
}

.moq-warning {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 2px solid #ef4444;
    border-radius: 4px;
}

.hero-bg-filament {
    position: absolute; 
    top: 0;
    bottom: 0; 
    right: 0; 
    width: 60%; 
    background: url('assets/images/filament_hero.png') no-repeat center right; 
    background-size: cover; 
    z-index: -1; 
    opacity: 0.5;
    mask-image: linear-gradient(to left, black 60%, transparent);
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent);
}

.hero-bg-standard {
    position: absolute; 
    top: 0;
    bottom: 0; 
    right: 0; 
    width: 60%; 
    background-size: cover; 
    background-position: center right;
    background-repeat: no-repeat;
    z-index: -1; 
    opacity: 0.4; 
    mask-image: linear-gradient(to left, black 60%, transparent); 
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent);
}


/* --- Printer Grid --- */
.printer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.printer-card {
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.printer-card:hover {
    background: #f1f5f9;
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.printer-card:hover p {
    color: #1e293b !important;
}

.manufacturer-logo {
    height: 70px;
    width: auto;
    max-width: 90%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 1;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.printer-card:hover .manufacturer-logo {
    filter: brightness(0);
    transform: scale(1.1);
}

/* --- Blog Content Matrix --- */
.blog-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: var(--bg-midnight);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.blog-card .tagline {
    margin-bottom: 1rem;
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
    font-family: var(--font-display);
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
}

.blog-card .read-more {
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2rem;
    display: inline-block;
}

@media (max-width: 900px) {
    .blog-matrix {
        grid-template-columns: 1fr;
    }
    .printer-grid {
        grid-template-columns: 1fr;
    }

    .catalog-filters {
        justify-content: flex-start;
    }

    .catalog-controls {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .catalog-stock-toggle {
        width: fit-content;
    }
}

@media (max-width: 600px) {
    .catalog-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        scrollbar-width: thin;
    }

    .catalog-filters::-webkit-scrollbar {
        height: 6px;
    }

    .catalog-filters::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.45);
        border-radius: 999px;
    }

    .filter-chip {
        flex: 0 0 auto;
        font-size: 0.74rem;
        padding: 0.48rem 0.82rem;
        letter-spacing: 0.7px;
        color: #dbe6ff;
        background: rgba(15, 23, 42, 0.6);
    }

    .catalog-controls {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-bottom: 1.4rem;
    }

    .catalog-search,
    .catalog-sort {
        min-height: 44px;
        font-size: 16px;
        padding: 0.72rem 0.82rem;
    }

    .catalog-stock-toggle {
        width: 100%;
        min-height: 42px;
        font-size: 0.76rem;
        letter-spacing: 0.7px;
    }
}

/* --- Consolidated Catalog UI --- */
.swatch-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.color-swatch.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.color-swatch.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 2px;
    background: #ef4444; /* Red strike */
    transform: translate(-50%, -50%) rotate(45deg);
}

.size-selector {
    margin-top: 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    width: 100%;
    font-size: 0.9rem;
}

.selected-variant-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 600px;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .cookie-banner {
        bottom: 1rem;
        width: 95%;
    }
}