/* Base styling and variables */
:root {
    --primary-color: #8a1c1c; /* rustic red */
    --dark-color: #0f0f0f;    /* almost black */
    --light-color: #ffffff;
    --muted-color: #f5f5f5;
}

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

[hidden] {
    display: none !important;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--muted-color);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Containers */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Header */
.site-header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-color);
    font-size: 1.4rem;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--light-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.main-nav a {
    color: var(--light-color);
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--light-color);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 4px;
    cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle-icon::before {
    top: -7px;
}

.nav-toggle-icon::after {
    top: 7px;
}

.site-header.nav-open .nav-toggle-icon {
    background: transparent;
}

.site-header.nav-open .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.main-nav a.portal-nav-link {
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    line-height: 1;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.main-nav a.portal-nav-link:hover,
.main-nav a.portal-nav-link:focus-visible {
    color: #fff;
    border-color: var(--primary-color);
    background-color: rgba(138, 28, 28, 0.65);
}

/* Hero sections */
.hero,
.page-hero {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
}

/* Hero with background image */
.hero-image {
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-image::after {
    /* Overlay for readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.hero-image .container {
    position: relative;
    z-index: 1;
    color: var(--light-color);
}

/* Features section */
.features {
    /* Light section behind feature cards */
    background-color: var(--muted-color);
    padding: 3rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.feature-card {
    background-color: var(--light-color);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 2rem 1rem;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.feature-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.feature-card p {
    font-size: 0.95rem;
    color: #555;
}

/* Who We Are section */
.who-we-are {
    /* Light neutral background for our story section */
    background-color: var(--muted-color);
    padding: 4rem 0;
    text-align: center;
}

.who-we-are h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.who-we-are p {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #555;
    line-height: 1.5;
}

.hero h1,
.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p,
.page-hero p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    margin-top: auto;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font: inherit;
}

.btn-primary:hover {
    background-color: #701717;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.load-more-button {
    min-width: 180px;
}

.kalmbach-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.kalmbach-header .btn-secondary {
    margin-left: auto;
}

.kalmbach-search {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.kalmbach-search label {
    font-weight: 600;
    color: #1f1f1f;
}

.kalmbach-search-input-wrap {
    flex: 1 1 460px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kalmbach-search input[type="search"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid #b9b9b9;
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font: inherit;
    background: #fff;
}

.kalmbach-search .btn-secondary {
    min-height: 42px;
}

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

.kalmbach-search-status {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 0.9rem !important;
}

.kalmbach-empty {
    margin-bottom: 1rem;
}

.kalmbach-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Sections */
.product-section,
.about-content,
.contact-content,
.intro {
    padding: 3rem 0;
    /* Light background for readability */
    background-color: var(--muted-color);
}

.product-section:nth-of-type(odd) {
    background-color: #ffffff;
}

.product-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-section p {
    margin-bottom: 1rem;
    color: #333;
}

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

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

.custom-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.custom-grid img:hover {
    transform: scale(1.02);
}

.product-card {
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px; /* Adjust as needed */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card model-viewer {
    width: 100%;
    height: 160px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.product-card p {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.placeholder-text {
    font-style: italic;
    color: #666;
}

.custom-swiper {
    width: 100%;
    height: clamp(260px, 60vh, 650px);
    position: relative;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.swiper-pagination-bullet {
    background: #ffffff !important;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 1 !important;
    margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
    transform: scale(1.3);
}

.product-detail-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.product-detail-actions {
    margin-top: 1.5rem;
}

.back-link {
    display: inline-block;
}

.product-model {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-model model-viewer {
    display: block;
    width: 100%;
    height: 500px;
    background: #eee;
}

.product-description {
    font-size: 1.1rem;
    color: #333;
}

.inquiry-btn {
    margin-top: 1.5rem;
}

/* Make text legible on sections with decorative backgrounds */
/* Override all text in decorative sections to light color */
.product-section.decorative-bg {
    background-image: url('../images/decorative-bg.png');
    color: var(--light-color) !important;
}

/* Ensure nested elements adopt light colour */
.product-section.decorative-bg * {
    color: var(--light-color) !important;
}

/* Contact page */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Map container on contact page */
.map-container {
    margin-top: 2rem;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.contact-info,
.contact-form {
    flex: 1 1 45%;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-info p {
    margin-bottom: 0.75rem;
    color: #333;
}

.contact-info strong {
    display: inline-block;
    width: 140px;
}

.contact-form input,
.contact-form textarea,
.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    margin-bottom: 1rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: #333;
}

/* About page layout */
.about-overview {
    padding: 3rem 0;
    /* Light background to contrast the dark hero */
    background-color: var(--muted-color);
}
.overview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}
.overview-item {
    flex: 1;
    min-width: 280px;
}
.about-list {
    margin-left: 1.5rem;
    padding-left: 1rem;
    line-height: 1.6;
    list-style-type: disc;
}
/* History section */
.history-section {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
}

.history-section h2 {
    margin-bottom: 2rem;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    padding: 0 2rem;
}

.timeline::before,
.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #444;
}

.timeline::before {
    left: 0;
}

.timeline::after {
    right: 0;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid #fff;
}

.timeline-year {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: #ddd;
    line-height: 1.5;
}

.site-footer {
    margin-top: 0;
    color: #f4f4f4;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 12% 15%, rgba(138, 28, 28, 0.32), transparent 48%),
        radial-gradient(circle at 84% 8%, rgba(138, 28, 28, 0.24), transparent 42%),
        linear-gradient(180deg, #161616 0%, #0e0e0e 100%);
}

.site-footer .container {
    max-width: 1180px;
}

/* Fallback spacing for static footer markup before JS enhancement runs */
footer > .container {
    padding: 2rem 0 1.2rem;
}

.footer-shell {
    padding: 2rem 0 1.2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.05fr;
    gap: 1.25rem;
}

.footer-brand-line {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.footer-logo {
    height: 32px;
    width: auto;
}

.footer-brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.04rem;
    letter-spacing: 0.02em;
}

.footer-description {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
    max-width: 36ch;
    margin-bottom: 0.55rem;
}

.footer-since {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.93rem;
}

.footer-column {
    font-size: 0.95rem;
}

.footer-title {
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 0.8rem;
}

.footer-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.42rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
    color: #fff;
    opacity: 1;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.footer-social-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.27);
    padding: 0.46rem 0.7rem;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.social-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: currentColor;
}

.social-facebook {
    background: rgba(24, 119, 242, 0.14);
    border-color: rgba(24, 119, 242, 0.5);
}

.social-instagram {
    background: rgba(193, 53, 132, 0.14);
    border-color: rgba(193, 53, 132, 0.44);
}

.social-pill:hover,
.social-pill:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.14);
}

.footer-language label {
    display: block;
    margin-bottom: 0.36rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.88rem;
}

.footer-language-select {
    width: 100%;
    max-width: 220px;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: inherit;
}

.footer-language-select option {
    color: #101010;
}

.footer-bottom {
    margin-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 0.85rem;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.google-translate-anchor {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
}

.back-to-top-btn {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(138, 28, 28, 0.95);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 1700;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-btn:hover,
.back-to-top-btn:focus-visible {
    background-color: #701717;
}

.faq-chatbot {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1800;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.faq-chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(15, 15, 15, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    padding: 0.46rem 0.85rem;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-chatbot-toggle:hover,
.faq-chatbot-toggle:focus-visible {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.faq-chatbot.is-open .faq-chatbot-toggle {
    display: none;
}

.faq-chatbot-dot {
    display: none;
}

.faq-chatbot-panel {
    width: min(320px, calc(100vw - 1.4rem));
    max-height: min(62vh, 440px);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8d8d8;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
    display: flex;
    flex-direction: column;
}

.faq-chatbot-panel[hidden] {
    display: none !important;
}

.faq-chatbot-header {
    background: #f4f4f4;
    color: #171717;
    padding: 0.65rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-chatbot-header h2 {
    margin: 0;
    font-size: 0.96rem;
}

.faq-chatbot-close {
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
}

.faq-chatbot-subtitle {
    margin: 0;
    padding: 0.1rem 0.8rem 0.55rem;
    color: #5a5a5a;
    background: #f4f4f4;
    font-size: 0.82rem;
}

.faq-chatbot-messages {
    flex: 1;
    min-height: 170px;
    max-height: 245px;
    overflow-y: auto;
    background: #f7f7f7;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-message {
    display: flex;
}

.faq-message p {
    margin: 0;
    max-width: 86%;
    padding: 0.48rem 0.62rem;
    font-size: 0.87rem;
    line-height: 1.35;
    border-radius: 10px;
}

.faq-message-user {
    justify-content: flex-end;
}

.faq-message-user p {
    color: #fff;
    background: #8a1c1c;
    border-bottom-right-radius: 4px;
}

.faq-message-bot p {
    color: #202020;
    background: #fff;
    border: 1px solid #dddddd;
    border-bottom-left-radius: 4px;
}

.faq-chatbot-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.58rem;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.faq-chatbot-input {
    flex: 1;
    min-height: 36px;
    border: 1px solid #bdbdbd;
    border-radius: 999px;
    padding: 0 0.68rem;
    font: inherit;
    font-size: 0.88rem;
}

.faq-chatbot-send {
    min-height: 36px;
    border: none;
    border-radius: 999px;
    background: #8a1c1c;
    color: #fff;
    padding: 0 0.75rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.87rem;
    cursor: pointer;
}

.faq-chatbot-send:hover,
.faq-chatbot-send:focus-visible {
    background: #701717;
}

.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;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.modal-content label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: #333;
}

.modal-content input,
.modal-content textarea {
    margin-top: 0.25rem;
}

.modal-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.inquiry-status {
    min-height: 1.2rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.inquiry-status.info {
    color: #555;
}

.inquiry-status.success {
    color: #177a2f;
}

.inquiry-status.error {
    color: #b02a2a;
}

.not-found-section {
    min-height: 60vh;
    padding: 5rem 0;
    background: var(--muted-color);
}

.not-found-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-top: 5px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.not-found-code {
    margin-bottom: 0.35rem;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.not-found-card h1 {
    margin-bottom: 0.75rem;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-content .btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-secondary {
    background: #ccc;
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: #aaa;
}

.dimensions-text {
    font-weight: bold;
    margin-top: 0.5rem;
    color: #333;
}

.product-summary {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.section-nav {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
  text-align: center;
  position: sticky;
  top: 70px;
  z-index: 999;
}

.section-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.section-nav a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.section-nav a:hover {
  background-color: var(--primary-color);
  color: white;
}

html {
  scroll-behavior: smooth;
}

a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.category-card:focus-visible,
.gallery-item:focus-visible,
.lightbox-btn:focus-visible {
  outline: 3px solid #c24141;
  outline-offset: 3px;
}

.category-hub-section {
  background-color: var(--muted-color);
}

.category-hub-intro {
  margin-bottom: 1.5rem;
}

.category-hub-intro h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.category-hub-intro p {
  margin-bottom: 0;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.category-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.category-card-bg.is-visible {
  opacity: 1;
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 20%, rgba(0, 0, 0, 0.78) 100%);
  z-index: 1;
}

.category-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 92%;
  color: #fff;
}

.category-card-title {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.category-card-description {
  font-size: 0.95rem;
  max-width: 44ch;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
}

.category-card-cta {
  margin-top: 0.3rem;
  align-self: flex-start;
  pointer-events: none;
}

.category-gallery-section {
  background: #fff;
}

.category-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.gallery-item {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: #101010;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
  opacity: 0.95;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  width: min(1080px, 100%);
  height: min(88vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100% - 2.2rem);
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-btn {
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
}

.lightbox-prev {
  left: 0.4rem;
}

.lightbox-next {
  right: 0.4rem;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .site-header.nav-open .main-nav {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .main-nav a {
    display: block;
    padding: 0.7rem 0.75rem;
    text-align: center;
  }

  .hero,
  .page-hero {
    padding: 3rem 0;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2rem;
  }

  .hero p,
  .page-hero p {
    font-size: 1rem;
  }

  .section-nav {
    top: 56px;
  }

  .section-nav ul {
    gap: 0.5rem;
  }

  .contact-info,
  .contact-form {
    flex: 1 1 100%;
  }

  .kalmbach-search {
    align-items: flex-start;
  }

  .kalmbach-search-input-wrap {
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .kalmbach-search .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .category-card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-card {
    aspect-ratio: auto;
    min-height: 240px;
    padding: 1rem;
  }

  .category-card-title {
    font-size: 1.32rem;
  }

  .category-card-description {
    line-height: 1.3;
    font-size: 0.93rem;
  }

  .category-page-header .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .lightbox-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .lightbox-prev {
    left: calc(50% - 56px);
  }

  .lightbox-next {
    right: calc(50% - 56px);
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .footer-shell {
    padding: 2rem 0 1rem;
  }

  footer > .container {
    padding: 2rem 0 1rem;
  }

  .back-to-top-btn {
    left: 0.75rem;
    bottom: 0.85rem;
  }

  .faq-chatbot {
    right: 0.75rem;
    bottom: 0.85rem;
  }

  .faq-chatbot-panel {
    width: min(92vw, 320px);
    max-height: min(58vh, 410px);
  }
}

@media (max-width: 520px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-title {
    margin-bottom: 0.5rem;
  }

  .footer-column p {
    margin-bottom: 0.65rem;
  }
}
