/* ==========================================================
   TZ-Studt — Professional Engineering & Trades Stylesheet
   Serious, clean, high-contrast Light Theme (White Mode).
   ========================================================== */

:root {
    --white: #ffffff;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-section-alt: #f1f5f9;

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;

    --navy: #1e3a8a;
    --navy-dark: #172554;
    --navy-light: rgba(30, 58, 138, 0.05);

    --red: #dc2626;
    --red-light: rgba(220, 38, 38, 0.05);

    --border: #cbd5e1;
    --border-light: #e2e8f0;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);

    --radius: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    background-image: linear-gradient(var(--border-light) 1.2px, transparent 1.2px),
        linear-gradient(90deg, var(--border-light) 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    color: var(--text-body);
    line-height: 1.7;
    transition: background-image 0.3s ease, background-color 0.3s ease;
}

body.grid-disabled {
    background-image: none;
}

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

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
    transition: box-shadow var(--transition), padding var(--transition);
}

.navbar-scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 75px;
    width: auto;
    display: block;
}

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

.nav-links a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--navy);
    transition: width var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.lang-switch button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.15rem 0.3rem;
    transition: color var(--transition);
}

.lang-switch button.active {
    color: var(--navy);
    font-weight: 700;
}

.lang-switch button:hover {
    color: var(--text-heading);
}

.lang-switch .divider {
    color: var(--border);
    font-size: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-heading);
    font-size: 1.45rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    font-family: var(--font-main);
    line-height: 1.4;
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border: 1px solid var(--navy);
}

.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-body);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    color: var(--navy);
    border-color: var(--navy);
    background: var(--navy-light);
    transform: translateY(-1px);
}

/* === Hero === */
.hero {
    padding: 9.5rem 0 6.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--border-light) 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.7;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 1.1rem;
    background: var(--navy-light);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(30, 58, 138, 0.15);
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.3rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.hero h1 span {
    color: var(--navy);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-body);
    margin-bottom: 2.2rem;
    max-width: 95%;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero-software {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.autocad-logo-img {
    height: 1.25rem;
    width: auto;
    object-fit: contain;
}

/* Blueprint Card (AutoCAD style light dashboard) */
.blueprint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-header {
    background: var(--bg-section-alt);
    padding: 0.7rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-heading);
    font-weight: 600;
}

.card-header i {
    color: var(--navy);
}

.card-status {
    font-size: 0.7rem;
    background: var(--navy-light);
    color: var(--navy);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid rgba(30, 58, 138, 0.15);
}

.card-body {
    padding: 1.2rem;
    background: var(--white);
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.tech-svg {
    width: 100%;
    height: auto;
    color: var(--text-body);
    cursor: crosshair;
}

/* Clean Engineering Style Controls */
.cad-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.1rem;
    background: var(--bg-section-alt);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.8rem;
}

.cad-layer-selectors {
    display: flex;
    align-items: center;
    column-gap: 1.1rem;
    row-gap: 0.3rem;
    flex-wrap: wrap;
}

.cad-controls-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: bold;
    width: 100%;
    margin-bottom: 0.1rem;
}

.cad-controls-title i {
    color: var(--navy);
}

.cad-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--text-body);
    cursor: pointer;
    font-family: var(--font-mono);
    user-select: none;
    font-weight: 500;
}

.cad-toggle input {
    display: none;
}

.toggle-slider {
    width: 24px;
    height: 12px;
    background: #cbd5e1;
    border-radius: 6px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.cad-toggle input:checked+.toggle-slider {
    background: var(--navy);
}

.cad-toggle input:checked+.toggle-slider::before {
    transform: translateX(12px);
}

.btn-grid-toggle {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-body);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-grid-toggle:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--navy-light);
}

/* CAD Status bar */
.cad-statusbar {
    background: var(--white);
    padding: 0.55rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
}

.coord-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.coord-indicator i {
    color: var(--navy);
}

.coord-val {
    color: var(--text-heading);
    font-weight: 700;
}

.cad-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #16a34a;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

/* === Sections === */
section {
    padding: 6rem 0;
}

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

.section-header h2 {
    font-size: 2.1rem;
    margin-bottom: 0.6rem;
    color: var(--text-heading);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
}

/* === Services === */
.services {
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-bottom: 3.5rem;
}

.area-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.2rem 2rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.area-card:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-icon {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 1.1rem;
    line-height: 1;
}

/* Fire safety card */
.area-card--fire {
    border-left: 3px solid var(--red);
}

.area-card--fire .card-icon {
    color: var(--red);
}

.area-card--fire:hover {
    border-color: var(--red);
}

.area-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
    color: var(--text-heading);
    font-weight: 700;
}

.area-card p {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* Interactive Plan Showcase (Trades style) */
.showcase-container {
    margin: 4.5rem 0 3.5rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.showcase-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.showcase-main-title {
    font-size: 1.6rem;
    color: var(--text-heading);
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.showcase-main-desc {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.showcase-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.showcase-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.1rem;
    flex-wrap: wrap;
}

.showcase-tab {
    background: var(--bg-section-alt);
    border: 1px solid var(--border);
    color: var(--text-body);
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.showcase-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.showcase-tab:hover:not(.active) {
    color: var(--navy);
    border-color: var(--navy);
    background: var(--navy-light);
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 2rem;
    align-items: center;
}

.showcase-visual {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: inset 0 0 10px rgba(15, 23, 42, 0.03);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.showcase-tech-svg {
    width: 100%;
    height: auto;
    max-height: 260px;
    color: var(--text-body);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.detector-glow {
    transform-origin: center;
}

.showcase-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.showcase-title {
    font-size: 1.35rem;
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.showcase-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-body);
}

.showcase-desc strong {
    color: var(--text-heading);
}

/* Products / Specific Services */
.products-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.products-title {
    margin-bottom: 2.2rem;
    font-size: 1.3rem;
    text-align: center;
    color: var(--text-heading);
    font-weight: 800;
}

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

.product-item {
    display: flex;
    gap: 1.1rem;
}

.product-marker {
    width: 3px;
    background: var(--navy);
    flex-shrink: 0;
    border-radius: 2px;
}

.product-item--fire .product-marker {
    background: var(--red);
}

.product-content h4 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
    color: var(--text-heading);
    font-weight: 700;
}

.product-content p {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === Formats === */
.formats {
    background: var(--white);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    text-align: center;
}

.format-card {
    background: var(--bg-body);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.format-card:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    background: var(--white);
}

.format-icon {
    font-size: 2.2rem;
    color: var(--navy);
    margin-bottom: 1.1rem;
    line-height: 1;
}

.format-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.format-card p {
    color: var(--text-body);
    font-size: 0.9rem;
}



/* === Contact === */
.contact {
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contact-info {
    padding: 3rem 3.5rem;
    display: flex;
    align-items: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.contact-item {
    display: flex;
    gap: 1.1rem;
    align-items: center;
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--navy);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-light);
    border: 1px solid rgba(30, 58, 138, 0.15);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item strong {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.contact-item span,
.contact-item a {
    color: var(--text-heading);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 700;
    transition: color var(--transition);
}

.contact-item a:hover {
    color: var(--navy);
}

/* Contact CTA Panel */
.contact-cta {
    background: var(--bg-section-alt);
    border-left: 1px solid var(--border);
    color: var(--text-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}

.contact-cta-inner {
    text-align: center;
    max-width: 300px;
    position: relative;
    z-index: 2;
}

.contact-cta-inner>i {
    font-size: 2.2rem;
    color: var(--navy);
    display: block;
    margin-bottom: 1.1rem;
}

.contact-cta-inner h3 {
    font-size: 1.45rem;
    margin-bottom: 0.7rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.contact-cta-inner p {
    font-size: 0.92rem;
    color: var(--text-body);
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.contact-cta .btn-primary {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    width: 100%;
    margin-bottom: 0.6rem;
}

.contact-cta .btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
}

.contact-cta .btn-secondary {
    color: var(--text-body);
    border-color: var(--border);
    background: var(--white);
    width: 100%;
}

.contact-cta .btn-secondary:hover {
    color: var(--navy);
    border-color: var(--navy);
    background: var(--navy-light);
}

/* === Footer === */
footer {
    padding: 3rem 0 2.5rem;
    background: var(--white);
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.88rem;
    border-left: 1px solid var(--border-light);
    padding-left: 1.4rem;
}

.footer-links {
    display: flex;
    gap: 2.2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--navy);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border-light);
}

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Mobile Navigation === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 1.5rem 0;
        text-align: center;
        gap: 0;
    }

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

    .nav-links a {
        padding: 0.8rem 1.5rem;
        font-size: 1.05rem;
        display: block;
    }

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

    .mobile-menu-btn {
        display: block;
    }
}

/* === Responsive === */
@media (max-width: 992px) {
    .hero {
        padding: 8.5rem 0 5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3.5rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    .areas-grid,
    .products-grid,
    .formats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-cta {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 0.6rem 0;
    }

    .cad-controls-title {
        width: 100%;
        margin-bottom: 0.2rem;
    }

    .hero {
        padding: 6.8rem 0 4rem;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .hero-eyebrow {
        font-size: 0.75rem;
        background: none;
        border: none;
        padding: 0;
        letter-spacing: 0.8px;
        margin-bottom: 0.8rem;
        display: block;
    }

    .areas-grid,
    .products-grid,
    .formats-grid {
        grid-template-columns: 1fr;
    }

    .showcase-container,
    .contact-info,
    .contact-cta {
        padding: 2rem 1.5rem;
    }

    .products-container {
        padding: 1.8rem 1.2rem;
    }

    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .footer-tagline {
        border-left: none;
        padding-left: 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
}

/* === Rechner (Kalkulator) Section === */
.rechner {
    background-color: var(--white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.rechner-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

/* Card layout for Configurator */
.calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.calc-card-header {
    background: var(--bg-section-alt);
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-card-header i {
    color: var(--navy);
}

.calc-card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    background-color: var(--bg-body);
    color: var(--text-body);
    font-family: var(--font-main);
    font-size: 0.92rem;
    border-radius: 4px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e3a8a'%3E%3Cpath d='M12 16L6 10H18L12 16Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2rem;
    padding-right: 2.2rem;
}

/* Quantity input group with step buttons */
.quantity-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-body);
}

.quantity-input-group .form-control {
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    border-radius: 0;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 0.7rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input-group .form-control::-webkit-outer-spin-button,
.quantity-input-group .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.btn-qty {
    background: none;
    border: none;
    color: var(--text-body);
    font-size: 1.1rem;
    padding: 0.7rem 1.1rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-qty:hover {
    background: var(--border-light);
    color: var(--navy);
}

.btn-block {
    width: 100%;
}

/* Copies tier warning style */
.form-info-tier {
    background: var(--navy-light);
    border: 1px solid rgba(30, 58, 138, 0.12);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.4;
}

.form-info-tier i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Cart receipt style (Invoice/Lieferschein theme) */
.cart-receipt {
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.cart-receipt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--navy), var(--navy) 15px, var(--red) 15px, var(--red) 30px);
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--text-heading);
    padding-bottom: 1.1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.receipt-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Premium custom pricing switch */
.price-toggle {
    display: inline-block;
}

.toggle-container {
    cursor: pointer;
    display: block;
    user-select: none;
}

.toggle-container input {
    display: none;
}

.toggle-labels {
    display: flex;
    background: var(--bg-section-alt);
    border: 1px solid var(--border);
    padding: 0.2rem;
    border-radius: 4px;
    position: relative;
    gap: 0.2rem;
}

.toggle-labels span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    transition: all var(--transition);
    text-transform: uppercase;
    color: var(--text-muted);
}

.toggle-container input:not(:checked)~.toggle-labels .label-net {
    background: var(--navy);
    color: var(--white);
}

.toggle-container input:checked~.toggle-labels .label-gross {
    background: var(--navy);
    color: var(--white);
}

/* Cart table styling */
.cart-table-wrapper {
    min-height: 120px;
    margin-bottom: 1.8rem;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.5;
}

.cart-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-table td {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px dashed var(--border-light);
    vertical-align: middle;
}

.col-product {
    font-weight: 600;
    color: var(--text-heading);
}

.col-qty {
    font-family: var(--font-mono);
    color: var(--text-body);
    font-weight: 500;
    white-space: nowrap;
}

.col-price,
.col-total {
    font-family: var(--font-mono);
    color: var(--text-heading);
    font-weight: 600;
    white-space: nowrap;
}

.col-action {
    text-align: right;
    width: 32px;
}

/* Delete button row */
.btn-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    color: var(--red);
    background: var(--red-light);
}

.cart-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    padding: 3rem 0;
    font-style: italic;
}

/* Receipt summary */
.receipt-summary {
    border-top: 2px solid var(--text-heading);
    padding-top: 1.2rem;
    margin-bottom: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-body);
}

.summary-row span:last-child {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-heading);
}

.summary-row-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading);
    border-top: 1px dashed var(--border);
    padding-top: 0.8rem;
    margin-top: 0.2rem;
}

.summary-row-total span:last-child {
    color: var(--navy);
    font-size: 1.2rem;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem;
    font-size: 0.95rem;
}

.btn-checkout:disabled {
    background: var(--border-light);
    border-color: var(--border-light);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive adjustment */
@media (max-width: 900px) {
    .rechner-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 640px) {

    /* Formular-Optimierung */
    .calc-card-body {
        padding: 1.2rem;
    }

    .btn-qty {
        padding: 0.7rem 0.8rem;
    }

    #calc-add-btn {
        padding: 0.85rem 0.5rem;
        font-size: 0.95rem;
        white-space: normal;
        height: auto;
    }

    /* Logo-Optimierung */
    .logo-img {
        height: 55px;
    }

    /* Warenkorb-Optimierung */
    .cart-receipt {
        padding: 1.2rem 1rem;
    }

    .cart-table-wrapper {
        margin-bottom: 1.2rem;
        width: 100%;
    }

    .cart-table {
        width: 100%;
        min-width: 0;
        /* Kein Scrollen erzwingen */
    }

    .cart-table th,
    .cart-table td {
        padding: 0.5rem 0.2rem;
        font-size: 0.8rem;
    }

    /* Spalte Einzelpreis ausblenden, um Platz zu sparen */
    .col-price {
        display: none !important;
    }

    .col-action {
        width: 25px;
    }

    .btn-delete {
        padding: 0.1rem;
    }

    .receipt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 1.2rem;
        padding-bottom: 0.8rem;
    }

    .receipt-header h3 {
        font-size: 1.1rem;
    }

    .summary-row-total {
        font-size: 0.95rem;
    }

    .summary-row-total span:last-child {
        font-size: 1.05rem;
    }

    .btn-checkout {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
}

/* Tier Info Box */
.tier-info-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tier-info-text {
    font-size: 0.85rem;
    color: var(--text-body);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tier-info-text .highlight {
    color: var(--navy);
    font-weight: 600;
}

.tier-progress-bg {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.tier-progress-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Toast Notifications === */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toast {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    color: var(--text-body);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--navy);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    min-width: 280px;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: var(--red);
}

.toast-icon {
    font-size: 1.4rem;
    margin-right: 1rem;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: var(--red);
}

.toast-message {
    flex-grow: 1;
}

/* Optimizations for extremely narrow devices (like Z Fold 5 folded, < 380px) */
@media (max-width: 380px) {
    .container {
        padding: 0 0.75rem;
    }

    .card-header {
        padding: 0.5rem 0.6rem;
        font-size: 0.68rem;
    }

    .card-status {
        font-size: 0.62rem;
        padding: 0.1rem 0.35rem;
    }

    .card-body {
        padding: 0.6rem;
    }

    .cad-controls {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }

    .cad-layer-selectors {
        gap: 0.5rem;
    }

    .cad-toggle {
        font-size: 0.66rem;
    }

    .btn-grid-toggle {
        font-size: 0.64rem;
        padding: 0.2rem 0.4rem;
    }

    .cad-statusbar {
        padding: 0.4rem 0.6rem;
        font-size: 0.66rem;
    }
}

/* ALTCHA Widget Customization */
.altcha-custom {
    display: block;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    /* Farbanpassungen passend zum Theme */
    --altcha-color-base: var(--bg-card, #ffffff);
    --altcha-color-bg: var(--bg-main, #f8fafc);
    --altcha-color-border: var(--border-color, #e2e8f0);
    --altcha-color-text: var(--text-body, #475569);
    --altcha-border-radius: 8px;
    /* Reduziere die Höhe des Widgets */
    --altcha-padding-y: 0.5rem;
    --altcha-padding-x: 0.75rem;
}