@import 'variables.css';

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

/* Typography Utilities */
.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

.font-bold {
    font-weight: 700;
}

.text-muted {
    color: var(--color-text-muted);
}

/* Navigation */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    padding: var(--spacing-sm) 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--color-border);
}

#main-header.scrolled .logo,
#main-header.scrolled .nav-link {
    color: #111;
}

#main-header.scrolled .bar {
    background-color: #111;
}

.logo {
    color: #fff;
    transition: color 0.3s ease;
    text-decoration: none;
    /* Prevent underline */
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    transition: opacity 0.3s ease, color 0.3s ease;
    color: #fff;
}

.nav-link:hover {
    opacity: 1;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown .nav-link::after {
    content: '';
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

#main-header.scrolled .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
}

#main-header.scrolled .dropdown-menu a {
    color: #111;
}

#main-header.scrolled .dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    margin: var(--spacing-sm) 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    color: #fff;
}

.mobile-sub-link {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0.25rem 0;
    padding-left: 1rem;
    opacity: 0.8;
}

.mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Buttons & Links */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #111;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

.link-arrow::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.link-arrow:hover::after {
    transform: translateX(5px);
}

/* Section Styles */
section {
    padding: var(--spacing-lg) 0;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Hero Section */
.hero-section {
    padding-top: var(--header-height);
    align-items: flex-start;
    position: relative;
    z-index: 1;
    color: #fff;
    min-height: 100vh;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/blueprint-bg.JPG');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-bottom: var(--spacing-lg);
}

/* Text Section */
.text-section {
    text-align: center;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
}

.section-text {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* Product Showcase */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: #f5f5f5;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image-placeholder {
    width: 100%;
    height: 300px;
    background: #ddd;
    margin-bottom: var(--spacing-md);
}

.product-info h3 {
    margin-bottom: 0.5rem;
}

/* Features */
.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: var(--spacing-lg) 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    color: #fff;
}



/* About Page Styles */
.about-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
    margin-bottom: var(--spacing-xl);
}

.about-intro-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-intro-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.blockquote-styled {
    position: relative;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: #f9fafb;
    border-radius: 12px;
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.blockquote-styled p {
    font-size: 1.25rem;
    font-style: italic;
    color: #1f2937;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.blockquote-styled::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    color: #e5e7eb;
    font-family: serif;
    line-height: 1;
    z-index: 0;
}

.feature-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .about-intro-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        display: block !important;
    }

    .about-intro-grid>div {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 1.5rem !important;
        clear: both !important;
    }

    .about-intro-image {
        height: auto !important;
        max-height: 250px !important;
        margin-bottom: 1.5rem !important;
    }

    .about-intro-image img {
        height: auto !important;
        max-height: 250px !important;
    }

    .blockquote-styled {
        display: block !important;
        margin: 1.5rem 0 !important;
        padding: 1rem !important;
        overflow: visible;
        clear: both !important;
    }

    .blockquote-styled::before {
        display: none !important;
    }

    .blockquote-styled p {
        font-size: 1rem;
    }
}

/* Scrolling Gallery */
.scrolling-gallery-section {
    padding: 0;
    background: #1f2937;
    overflow: hidden;
}

.gallery-scroller {
    overflow-x: hidden;
    /* Hide scrollbar for seamless effect */
}

.gallery-track {
    display: flex;
    gap: 0;
    padding: 0;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-slide {
    flex: 0 0 auto;
    width: 60vw;
    max-width: 800px;
    height: 50vh;
    min-height: 400px;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: grab;
}

.gallery-slide:active {
    cursor: grabbing;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-slide:hover img {
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .gallery-slide {
        width: 85vw;
        height: 40vh;
        min-height: 300px;
    }
}

/* ===== Footer ===== */
.site-footer {
    background: #1f2937;
    color: #9ca3af;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h3 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.footer-column p {
    line-height: 1.6;
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

.footer-socials a:hover {
    background: #4b5563;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: var(--spacing-md);
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* ===== Mobile Responsive Fixes ===== */
@media (max-width: 768px) {

    /* Prevent horizontal overflow */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Container padding for mobile */
    .container {
        padding: 0 1rem;
    }

    /* Hero section mobile */
    .hero-section {
        min-height: 80vh;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Product grid - stack on mobile */
    .product-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .product-grid>div:first-child {
        order: 2;
    }

    .product-grid>div:last-child {
        order: 1;
        min-height: 250px !important;
        height: auto !important;
    }

    .product-grid img {
        max-height: 300px;
        object-fit: contain;
    }

    /* Product sections - stack on mobile */
    #synthetic-slate>.container>div,
    #roman-tile>.container>div {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    #synthetic-slate>.container>div>div:last-child,
    #roman-tile>.container>div>div:last-child {
        min-height: 300px !important;
        order: -1;
    }

    /* Product text adjustments */
    #synthetic-slate h2,
    #roman-tile h2 {
        font-size: 2rem !important;
    }

    /* Features section */
    .feature-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-item {
        padding: 2rem 1.5rem !important;
    }

    /* Section padding on mobile */
    section {
        padding: 3rem 0 !important;
    }

    #features {
        padding: 4rem 0 !important;
    }

    /* Typography adjustments */
    #features h2 {
        font-size: 2rem !important;
    }

    /* CTA section mobile */
    #intro h2,
    section h2 {
        font-size: 1.75rem !important;
    }

    /* About page grid */
    .about-intro-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .about-intro-grid>div:first-child {
        min-height: 300px !important;
        height: 300px !important;
    }

    .about-intro-grid img {
        height: 300px !important;
    }

    /* Feature cards grid */
    .feature-grid-cards {
        grid-template-columns: 1fr !important;
    }

    /* Hamburger menu animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Prevent scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Fix any elements that might overflow */
    * {
        max-width: 100%;
    }

    /* Fix inline grids that might not respond */
    div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix the product image containers */
    div[style*="min-height: 500px"] {
        min-height: 250px !important;
    }

    /* Fix page header overlap on mobile */
    .page-header {
        padding-top: 100px !important;
    }

    /* Ensure main content has enough top margin on non-hero pages */
    main>section:first-child:not(.hero-section) {
        padding-top: 80px !important;
    }

    /* Fix About page image floating over text */
    .about-intro-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .about-intro-grid>div {
        width: 100% !important;
        position: relative !important;
        float: none !important;
        z-index: 1 !important;
    }

    .about-intro-image {
        position: relative !important;
        z-index: 1 !important;
        order: -1 !important;
    }

    .about-intro-image img {
        position: relative !important;
        max-height: 300px !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    /* Reduce spacing after page title on mobile */
    .page-header {
        margin-bottom: 1rem !important;
        padding-bottom: 1rem !important;
    }

    h1 {
        margin-bottom: 0.5rem !important;
    }

    /* Make feature/advantage cards more compact on mobile */
    .feature-card {
        padding: 1.25rem !important;
    }

    .feature-card h3 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .feature-card p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 1rem !important;
    }

    .feature-grid-cards {
        gap: 1rem !important;
    }

    /* Fix blockquote floating issues on mobile */
    .blockquote-styled {
        position: relative !important;
        margin: 1.5rem 0 !important;
        padding: 1rem 1.25rem !important;
    }

    .blockquote-styled::before {
        display: none !important;
    }
}

/* DEFINITIVE MOBILE FIXES FOR ABOUT PAGE */
@media (max-width: 768px) {
    .about-intro-grid {
        display: block !important;
        height: auto !important;
        margin-bottom: 2rem !important;
    }

    .about-intro-grid>div {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        position: static !important;
        margin-bottom: 1.5rem !important;
    }

    .about-intro-image {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 200px !important;
        overflow: hidden !important;
        margin-top: 1.5rem !important;
    }

    .about-intro-image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        position: static !important;
    }

    .blockquote-styled {
        display: block !important;
        position: static !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        clear: both !important;
        height: auto !important;
    }
}

/* Visibility Utilities for Mobile/Desktop Switching */
.mobile-view {
    display: none !important;
}

.desktop-view {
    display: block !important;
}

@media (max-width: 768px) {
    .mobile-view {
        display: block !important;
    }

    .desktop-view {
        display: none !important;
    }

    .mobile-view * {
        float: none !important;
        position: static !important;
    }
}

/* --- Modern Responsive Layout (New System) --- */
.layout-section {
    padding: 3rem 0;
}

.layout-grid {
    display: grid;
    gap: 3rem;
    align-items: start;
    /* Standard top alignment is safer for varying heights, or center if desired */
}

/* Desktop Structure */
@media (min-width: 769px) {
    .layout-grid {
        grid-template-columns: 1fr 1fr;
        /* Equal split */
        gap: 4rem;
        /* Generous spacing */
        align-items: center;
        /* Vertically center on desktop usually looks best */
    }

    /* Modifiers for Column Ordering */
    /* .image-left is default grid order (Image first in HTML) */
    /* .image-right: */
    .layout-grid.image-right .content-media {
        order: 1;
    }

    .layout-grid.image-right .content-text {
        order: 0;
    }
}

/* Mobile Structure */
@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 2rem;
    }

    /* Ensure consistent stacking: Image always on top on mobile */
    .content-media {
        order: -1 !important;
        margin-bottom: 0.5rem;
    }

    .content-media img {
        max-height: 350px;
        /* Prevent massive images on mobile */
        object-fit: cover;
        width: 100%;
    }
}

/* Content Styling */
.content-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Premium shadow */
}

.content-media img {
    display: block;
    width: 100%;
    height: auto;
}

.content-text h2.section-title {
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #4b5563;
    /* Text muted color */
}


/* --- Products Page Specifics --- */

.page-header {
    padding-top: 8rem;
    padding-bottom: 3rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #111827;
    text-align: center;
}

.product-card-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    border: 1px solid #f3f4f6;
    margin-bottom: 4rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.product-card-header {
    background: #fff;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.product-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
    font-weight: 700;
}

.product-link {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    border-radius: 6px;
    transition: all 0.2s;
}

.product-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.product-card-body {
    padding: 2rem;
}

/* Product Details Grid */
.product-details-grid {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 900px) {
    .product-details-grid {
        grid-template-columns: 4fr 5fr;
        /* Visuals slightly narrower than specs table for balance */
    }
}

/* Specs Table Styling */
.specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.specs-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    background: #fff;
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:nth-child(even) td {
    background: #f9fafb;
}

.specs-table td:first-child {
    font-weight: 600;
    color: #374151;
    width: 35%;
    border-right: 1px solid #e5e7eb;
}

/* Gallery Adjustment */
.product-visuals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.product-visuals img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    max-height: 250px;
    border: 1px solid #e5e7eb;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .page-header {
        padding-top: 6rem;
    }

    .product-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-card-body {
        padding: 1.5rem;
    }

    .specs-table {
        font-size: 0.85rem;
    }

    .specs-table td {
        padding: 0.75rem;
    }
}


/* --- Product Image Re-Style (Single Image, No Crop) --- */
.product-visuals {
    display: block;
    /* No grid needed for single image */
    margin-bottom: 0;
    text-align: center;
    /* Center the image if it's smaller than container */
}

.product-visuals img {
    max-width: 100%;
    /* Shrink if needed */
    width: auto;
    /* Do not upscale beyond native size */
    height: auto;
    /* Natural height */
    max-height: none;
    /* No height cap */
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: none;
    display: inline-block;
    /* Allow text-align center to work */
}

/* --- Gallery Page Styles --- */

.gallery-grid-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    /* Center on desktop */
}

.gallery-grid-flex a {
    display: block;
    transition: transform 0.2s;
}

.gallery-grid-flex a:hover {
    transform: scale(1.02);
}

.gallery-grid-flex img {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    width: 320px;
    /* Force thumbnail size on desktop */
    height: 220px;
    /* Consistent height */
    object-fit: cover;
    /* Crop to fill */
}

/* Mobile Gallery: Full Width Thumbnails */
@media (max-width: 768px) {
    .gallery-grid-flex {
        display: flex;
        flex-direction: column;
        /* Stack vertically */
        gap: 1.5rem;
        align-items: stretch;
        /* Stretch to fill width */
    }

    .gallery-grid-flex a {
        display: block;
        width: 100%;
    }

    .gallery-grid-flex img {
        width: 100% !important;
        /* Override HTML width attributes */
        height: auto !important;
        /* Maintain aspect ratio */
        max-width: none;
    }
}

/* Scrolling Gallery */
.scrolling-gallery-section {
    padding: 0;
    background: #1f2937;
    overflow: hidden;
}

.gallery-scroller {
    overflow-x: auto;
    /* Allow manual scrolling/swiping */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    /* Ensure touch scrolling works smoothly */
    -webkit-overflow-scrolling: touch;
}

.gallery-scroller::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.gallery-track {
    display: flex;
    gap: 0;
    padding: 0;
    width: max-content;
    animation: scroll 60s linear infinite;
}

/* CTA Section Responsive Padding */
.cta-section {
    background: #1f2937;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: #d1d5db;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .cta-section {
        padding: 0 0 1.5rem 0;
        /* Zero top padding */
    }

    .cta-section h2 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        margin-top: 1rem;
    }

    .cta-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Reduce Gallery Height on Mobile */
    .gallery-slide {
        height: 30vh;
        /* Reduced height */
        min-height: 200px;
        /* Reduced min-height */
    }
}
/* Installation Feature Section */
.installation-feature {
    padding: 2rem 3rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .installation-feature {
        padding: 2rem 0; /* Remove horizontal padding on mobile */
    }
}


/* Center Gallery Category Titles */
.gallery-category h2 {
    text-align: center !important;
}

