/* style.css */
:root {
    --color-accent: #e2001a;
    --color-text-primary: #000000;
    --color-text-on-dark: #FFFFFF;
    --color-text-secondary: #6B7280;
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F9FAFB;
    --color-bg-dark: #111111;
    --color-border: #E5E7EB;
    --font-headline: 'Barlow', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary); /* CORRECTED: Default text color should be primary (black) */
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    counter-reset: card-counter; /* Add counter for value cards */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.15;
}

/* Style for elements that should look like a heading but are not semantically a heading */
.heading-style {
    font-family: var(--font-headline);
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.15;
}
.font-primary { font-family: var(--font-headline); } /* Remap old class */
.font-secondary { font-family: var(--font-body); }

.text-accent-primary { color: var(--color-accent); } /* Remap old class */
.bg-accent-primary { background-color: var(--color-accent); } /* Remap old class */
.border-accent-primary { border-color: var(--color-accent); } /* Remap old class */

.text-headings { color: var(--color-text-primary); } /* Remap old class */
.text-body { color: var(--color-text-secondary); } /* Remap old class */
.text-muted { color: var(--color-text-secondary); } /* Remap old class */

.smooth-transition {
    transition: var(--transition);
}

/* --- Navigation Bar --- */
.custom-navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}
.nav-logo {
    /* Style for the logo link container */
}

.nav-logo img {
    height: 3rem; /* 56px, increased from 2.5rem */
    width: auto;
    display: block;
}
.nav-link {
    font-family: var(--font-headline); /* Use headline font for navigation links */          

    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-primary);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem;
    padding-bottom: 8px;
}
.nav-link:hover {
    color: var(--color-accent);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}
.nav-link:hover::after {
    transform: scaleX(1);
}
.nav-cta {
    font-family: var(--font-headline); /* Use headline font for CTA in navigation */
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    transition: var(--transition);
}
.nav-cta:hover {
    color: var(--color-accent);
}

/* --- Hero Section --- */
.hero-section {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    background-color: var(--color-bg-primary);
}
.hero-headline {
    font-size: clamp(3.5rem, 6.5vw, 4rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.75rem;
}
.hero-headline .highlight {
    color: var(--color-accent);
    background: none;
    -webkit-text-fill-color: initial;
    padding: 0;
}
.hero-subheadline {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}
 .hero-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headline);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0.75rem 2rem;
    border-radius: 0;
    transition: var(--transition);
    border: 2px solid var(--color-text-primary);
    background-color: transparent;
    color: var(--color-text-primary);
}
.hero-cta-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-on-dark);
    transform: translateY(-2px);
	
	/* === ADD THIS NEW RULE === */
.hero-image-container {
    border: 1px solid var(--color-border); /* 把边框应用到容器上 */
    max-width: 500px;    /* 限制在大屏幕上的最大宽度，保持平衡 */
    margin-left: auto;   /* 在网格中居中（如果适用） */
    margin-right: auto;
    /* 容器不需要内边距 (padding) */
}
/* === END OF ADDITION === */


}
.hero-image-container img {
    width: 100%;      /* 确保图片宽度完全填充容器 */
    height: auto;     /* 高度自动，保持图片原始比例 */
    display: block;   /* 最佳实践，避免图片下方出现幽灵空白 */
    border-radius: 0; /* 这些可以保留，虽然现在作用不大 */
    box-shadow: none;
    /* border 和 padding 已被移除 */
}

.hero-image-container::before {
    display: none;
}

/* --- Section Styles --- */
.section-padding {
    padding: 6rem 1rem; 
}
@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 1.5rem; 
    }
}
.container-custom {
    max-width: 1280px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.section-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 4rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Value Proposition Cards (Info Cards) --- */
.value-card {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    position: relative;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}
.value-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-border);
}
.value-card-icon-wrapper {
    display: none;
}
.value-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3; 
}
.value-card::after {
    content: '0' counter(card-counter);
    counter-increment: card-counter;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-headline);
    font-size: 1.25rem;
    color: var(--color-border);
}

/* --- Tech Highlight Icons (Category Page) --- */
.tech-highlight-icon {
    width: 4rem; /* 64px */
    height: 4rem; /* 64px */
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    padding: 0.75rem; /* Add some padding */
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
}
.tech-highlight-icon svg {
    width: 100%;
    height: 100%;
}


/* =================================================================== */
/*                      PRODUCT CARD STYLES (REFINED)                */
/* =================================================================== */

/* This wrapper makes the entire card a clickable link */
.product-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the link takes up the full space of the card */
    height: 100%;
}

.product-card {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make card take full height of its container */
}

.product-card:hover {
    border-color: var(--color-accent);
}

.product-card-image-wrapper {
    overflow: hidden;
    background-color: var(--color-bg-primary);
    aspect-ratio: 4/3;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use contain to show the whole product */
    padding: 1rem; /* Add some space around the product image */
    transition: transform 0.3s ease;
}

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

.product-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows this section to grow */
    margin-top: auto; /* Pushes the content to the bottom */
}

.product-card-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    text-transform: none; /* ADD THIS LINE to override the h3 uppercase style */
    
    /* --- Line clamping for 2 lines --- */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.125rem * 1.4 * 2); /* Reserve space for 2 lines to prevent jumping */
}

.product-card-description {
    font-size: 0.875rem; /* 14px */
    color: var(--color-text-secondary);
    line-height: 1.5;
    
    /* --- Line clamping for 3 lines --- */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(0.875rem * 1.5 * 3); /* Reserve space for 3 lines */
}


/* --- Contact CTA Section (Red one) --- */
#contact-cta {
    background-color: var(--color-accent);
}
#contact-cta .section-title, 
#contact-cta .section-subtitle {
    color: var(--color-text-on-dark);
}
#contact-cta .section-title span {
    text-decoration-color: var(--color-text-on-dark) !important;
}
#contact-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headline);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0.75rem 2rem;
    border-radius: 0;
    transition: var(--transition);
    border: 2px solid var(--color-text-on-dark);
    background-color: transparent;
    color: var(--color-text-on-dark);
}
#contact-cta a:hover {
    background-color: var(--color-text-on-dark);
    color: var(--color-accent);
}

/* --- Contact Form Section --- */
.contact-form-section {
    background-color: var(--color-bg-secondary);
}
.contact-form-container {
    max-width: 768px; 
    margin-left: auto;
    margin-right: auto;
    background-color: var(--color-bg-primary);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: none;
    margin-top: -3rem; 
    position: relative; 
    z-index: 10; 
}
@media (min-width: 768px) {
    .contact-form-container {
        padding: 3.5rem; 
    }
}
.contact-form-section.overlapped { 
    padding-top: calc(8rem + 3rem); 
}
.form-label {
    display: block;
    font-family: var(--font-primary);
    font-weight: 500; 
    color: var(--color-text-secondary); 
    margin-bottom: 0.625rem; 
    font-size: 0.9375rem; 
}
.form-label .required-star {
    color: #EF4444; 
    font-weight: bold;
    margin-left: 2px;
}
.form-input,
.form-textarea,
.form-select {
    display: block;
    width: 100%;
    padding: 0.875rem 1.125rem; 
    font-family: var(--font-secondary);
    font-size: 1rem; 
    line-height: 1.5; 
    color: var(--color-text-primary); 
    background-color: var(--color-bg-primary); 
    border: 1px solid var(--color-border);
    border-radius: 8px; 
    box-shadow: none; 
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.7;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.2); 
}
.form-textarea {
    min-height: 130px; 
    resize: vertical;
}
.form-grid {
    display: grid;
    gap: 1.75rem; 
}

.form-submit-button {
    display: inline-block;
    width: 100%; 
    background-color: var(--color-text-primary);
    color: var(--color-text-on-dark);
    font-family: var(--font-primary);
    font-size: 1.0625rem; 
    font-weight: 700;
    padding: 0.9375rem 1.5rem; 
    border: none;
    border-radius: 0px;
    text-align: center;
    box-shadow: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.form-submit-button:hover:not(:disabled) {
    background-color: var(--color-accent);
    box-shadow: none;
    transform: translateY(-2px);
}
.form-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
@media (min-width: 640px) { /* sm breakpoint */
    .form-submit-button {
        width: auto; 
        padding-left: 3.5rem; 
        padding-right: 3.5rem;
    }
}
.form-agreement {
    margin-top: 0.5rem; 
    margin-bottom: 1.5rem; 
}
.form-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}
.form-checkbox {
    width: 1.125rem; 
    height: 1.125rem;
    margin-right: 0.625rem; 
    accent-color: var(--color-accent);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    flex-shrink: 0; 
}
.form-checkbox-label a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.form-checkbox-label a:hover {
    color: var(--color-accent);
}
#form-feedback {
    margin-top: 1.5rem; 
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem; 
    font-weight: 500;
    text-align: center;
}
#form-feedback.success {
    background-color: #E6FFFA; 
    color: #047857; 
    border: 1px solid #99F6E4;
}
#form-feedback.error {
    background-color: #FFF1F2; 
    color: #BE123C;
    border: 1px solid #FFD6D9;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: 5rem 1rem 3rem;
}
.footer-logo a {
    font-family: var(--font-headline);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}
.footer-link {
    color: rgba(255, 255, 255, 0.8); /* Use a solid, slightly transparent white for clarity */
    transition: var(--transition);
    font-weight: 500; /* Reduced weight for better sharpness */
}
.footer-link:hover {
    color: var(--color-accent);
}
.footer-bottom-text {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
}
.footer-bottom-text strong {
    color: rgba(255,255,255,0.6);
    font-weight: 500; /* Reduce weight for sharpness */
}

/* --- Animation Classes --- */
.opacity-0 { opacity: 0; }
.animate-on-scroll { transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0) !important; }
.translate-y-10 { transform: translateY(40px); }

/* --- DCRYSTA in Action Section --- */
.action-card {
    background-color: var(--color-bg-primary);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: none;
    transition: border-color 0.3s ease;
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack items vertically */
    height: 100%; /* Ensure the card takes up the full height of the grid cell */
}
.action-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-accent);
}
.action-card-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
}
.action-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.action-card:hover .action-card-image {
    transform: scale(1.05);
}
.action-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.action-card:hover .action-card-overlay {
    opacity: 1;
}
.action-card-icon {
    color: white;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
.action-card:hover .action-card-icon {
    transform: scale(1);
}
.action-card-content {
    padding: 1.25rem;
    flex-grow: 1; /* Allow this area to grow and fill available space */
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack items vertically */
}
.action-card-category {
    display: block; /* Changed from inline-block */
    font-size: 0.75rem; /* 12px */
    font-weight: 700; /* Bold */
    text-transform: uppercase;
    letter-spacing: 0.075em; /* Wider spacing */
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}
.action-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-headings);
    line-height: 1.4;
    /* The magic for line clamping */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.125rem * 1.4 * 3); /* Set a minimum height to avoid collapsing */
}

/* Add this at the end of your style.css file */

/* --- Case Study / Moment Page Specific Styles -- */

.moment-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) { /* lg breakpoint */
    .moment-layout {
        grid-template-columns: repeat(12, 1fr);
    }
    .moment-content {
        grid-column: span 8;
    }
    .moment-sidebar {
        grid-column: span 4;
    }
}

.moment-sidebar .sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 6rem; /* Adjust based on your navbar height */
}

.prose-custom img[src*="placeholder"] {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
}

.prose-custom {
    color: #333;
    line-height: 1.65;
}

.prose-custom h2 {
    font-size: 1.75rem;
    margin-top: 2.5em;
    margin-bottom: 1.25em;
    line-height: 1.2;
    font-weight: 700;
}

.prose-custom h3 {
    font-size: 1.375rem;
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.prose-custom p {
    margin-bottom: 1.25em;
}

.prose-custom a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 500;
}

.prose-custom a:hover {
    color: #000;
}

.prose-custom ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.prose-custom ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.prose-custom li {
    margin-bottom: 0.5em;
}

.prose-custom blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5em;
    margin-left: 0;
    font-style: italic;
    color: #555;
}

.prose-custom img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 2em;
    margin-bottom: 0.5em; /* Space for caption */
}

.prose-custom em {
    font-size: 0.875rem;
    text-align: center;
    color: #666;
    display: block;
    margin-bottom: 2em;
}

/* ... all other styles from the original file ... */
.about-hero-section, .category-header {
    background-color: var(--color-bg-secondary);
}
.timeline-dot {
    background-color: var(--color-accent);
}
.core-value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.core-value-icon {
    color: var(--color-accent);
    flex-shrink: 0;
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
}
.core-value-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.testimonial-card {
    border-left-color: var(--color-accent);
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary); /* CORRECTED: Use primary text color for better visibility and consistency */
    font-weight: 500; /* CORRECTED: Changed from 600 to 500 for a thinner look */
    text-decoration: none;
    transition: var(--transition);
    min-width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    line-height: 1;
}

.pagination-link:hover, .pagination-link.is-active {
    border-color: var(--color-accent);
    background-color: var(--color-accent);
    color: var(--color-text-on-dark);
}
.pagination-link.is-active {
    font-weight: 700;
}
.product-detail-cta {
    background-color: var(--color-accent);
}
.product-tab-button.active {
    border-color: var(--color-accent);
}
.thumbnail-item:hover, .thumbnail-item.active {
    border-color: var(--color-accent);
}

/* --- Category & About Page Header (NEW) --- */
.about-hero-section {
    padding: 5rem 1.5rem;
    background-color: var(--color-bg-secondary);
    text-align: center;
}
.about-hero-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    text-transform: uppercase;
    color: var(--color-text-headings); /* Changed from --color-accent */
    margin-bottom: 1rem;
    line-height: 1.2;
}
.about-intro-text {
    font-family: var(--font-secondary); /* Changed from --font-body */
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--color-text-muted); /* Changed from --color-text-secondary */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-transform: none;
    letter-spacing: normal;
}

/* =================================================================== */
/*          STYLES FOR NEW PRODUCT DETAIL PAGE (FROM TESTPAGE)         */
/* =================================================================== */

/* UNIFIED BUTTON SYSTEM */
.dc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headline);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0.75rem 2rem;
    border-radius: 0;
    transition: var(--transition);
}
.dc-btn-primary {
    border: 2px solid var(--color-text-primary);
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}
.dc-btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-on-dark);
    transform: translateY(-2px);
}
.dc-btn-secondary {
    font-weight: 600;
    color: var(--color-text-primary);
}
.dc-btn-secondary .arrow { transition: transform 0.2s ease; }
.dc-btn-secondary:hover { color: var(--color-accent); }
.dc-btn-secondary:hover .arrow { transform: translateX(4px); }


/* PRODUCT DETAIL PAGE SPECIFIC COMPONENTS */

.product-gallery-main-viewer {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    padding: 1rem;
}
.product-gallery-main-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumbnail { 
    cursor: pointer; 
    border: 2px solid var(--color-border); 
    transition: border-color 0.2s ease; 
    background-color: var(--color-bg-secondary); /* ADDED: Ensures placeholder is visible */
    aspect-ratio: 1 / 1; /* ADDED: Ensures placeholder has correct dimensions */
}
.gallery-thumbnail.active, .gallery-thumbnail:hover { 
    border-color: var(--color-accent); 
}

.tab-button { 
    font-family: var(--font-headline); 
    font-size: 1.25rem; 
    text-transform: uppercase; 
    padding: 1rem 0; 
    color: var(--color-text-secondary); 
    border-bottom: 2px solid transparent; /* CORRECTED: Set transparent border by default */
    transition: color 0.3s ease, border-color 0.3s ease; /* CORRECTED: Ensure transition is present */
    margin-bottom: -1px; /* CORRECTED: Add negative margin for alignment */
    background: none;
    border-top: none; /* Ensure no other borders interfere */
    border-left: none;
    border-right: none;
}
.tab-button.active, .tab-button:hover { 
    color: var(--color-text-primary); 
}
.tab-button.active { 
    border-bottom-color: var(--color-accent); /* CORRECTED: Only change border color on active */
}

.prose-custom p { margin-bottom: 1em; }
.prose-custom ul { list-style-type: none; padding-left: 0; }
.prose-custom li { padding-left: 1.5em; position: relative; margin-bottom: 0.5em; }
.prose-custom li::before { 
    content: '■'; 
    position: absolute; 
    left: 0; 
    color: var(--color-accent); 
    font-size: 0.8em; 
    line-height: inherit; 
}

.spec-table th, .spec-table td { 
    padding: 0.75rem 1rem; 
    border-bottom: 1px solid var(--color-border); 
}

.spec-table th { 
    text-align: left; 
    font-weight: 600; 
    color: var(--color-text-secondary); 
}

/* =================================================================== */
/*                      UTILITY CLASSES (from bak)                     */
/* =================================================================== */
.grid {
    display: grid;
}
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gap-4 {
    gap: 1rem;
}
.gap-8 {
    gap: 2rem;
}

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

/* --- Application Image Placeholder (Category Page) --- */
.application-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    display: block;
}

/* --- New Testimonial Card Styles (About Page) --- */
.testimonial-card-new {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.testimonial-card-new .quote-icon {
    color: var(--color-accent);
    width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    margin-bottom: 1rem;
}
.testimonial-card-new .testimonial-text {
    font-size: 1.125rem; /* 18px */
    line-height: 1.6;
    color: var(--color-text-primary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.testimonial-card-new .author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}
.testimonial-card-new .author-avatar {
    width: 3.5rem; /* 56px */
    height: 3.5rem; /* 56px */
    border-radius: 9999px;
    background-color: var(--color-border);
    object-fit: cover;
}
.testimonial-card-new .author-name {
    font-weight: 700;
    color: var(--color-text-primary);
}
.testimonial-card-new .author-title {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* --- Value Flow Diagram (About Page) --- */
.value-flow-diagram {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 2rem;
    text-align: center;
}
.flow-item {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
}
.flow-icon-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.125rem;
}
.flow-icon-plus {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
}
.flow-arrow {
    font-size: 2rem;
    color: var(--color-accent);
    margin: 0.5rem 0;
}
.flow-item-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
}
.flow-item-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* =================================================================== */
/*                      BUG FIX (Related Products Layout)              */
/* =================================================================== */
/* This rule specifically targets product cards inside the related-products flex container */
.related-products-grid .product-card-link-wrapper {
  width: 280px;
  flex-shrink: 0;
}

/* Visually hide an element but keep it accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =================================================================== */
/*                  NEW STYLES FOR LAYOUT & TABLES                     */
/* =================================================================== */

/* Two-column grid for side-by-side content */
.layout-grid-half {
    display: grid;
    gap: 2.5rem; /* The space between columns */
    margin-top: 2rem;
    margin-bottom: 2rem;
    /* This is the magic: it creates as many columns as can fit, with a minimum
       width of 320px and a maximum of 1fr (taking up equal space).
       If only one item exists, it will automatically take up 100% of the width. */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Styling for tables within the .prose-custom class */
.prose-custom table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    font-size: 0.9rem;
}

.prose-custom th,
.prose-custom td {
    border: 1px solid var(--color-border);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.prose-custom th {
    font-weight: 700;
    background-color: var(--color-bg-secondary);
    font-family: var(--font-headline);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose-custom tbody tr:nth-child(odd) {
    background-color: var(--color-bg-secondary);
}

.prose-custom tbody tr:hover {
    background-color: #f0f4f8; /* A slightly different hover color */
}

/* Image Gallery Layout from Shortcode */
.layout-image-gallery {
    display: grid;
    /* Creates a responsive grid that fills space */
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.gallery-item {
    background-color: var(--color-bg-secondary);
    aspect-ratio: 4 / 3; /* Changed to 4:3 aspect ratio */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the square space without distortion */
    border-radius: 0;
}
