/* --- :root (CSS Variables) --- */
:root {
    --color-white: #fff;
    --color-light-gray: #d3d3d3;
    --color-gold: #fdb913;
    --color-dark-bg: #141414;
    --color-dark-secondary: #1e1e1e;
    --color-white-transparent-10: rgba(255, 255, 255, 0.1);
    --color-white-transparent-85: rgba(255, 255, 255, 0.85);
    /* Theme Colors */
    --color-theme-red: #E74C3C;
    --color-theme-green: #2ECC71;
    --color-theme-purple: #9B59B6;
    --color-theme-orange: #F39C12;
    /* Transitions & Sizing */
    --transition-speed: 500ms;
    --transition-fast: 300ms;
    --transition-super-fast: 50ms;
    --fixed-nav-footer-height-mobile: 48px;
    --fixed-nav-footer-height-desktop: 52px;
}

/* --- Global Resets and Body Styling --- */
html {
    box-sizing: border-box;
    font-size: 1rem;
    height: 100%;
}
*, *::before, *::after {
    box-sizing: inherit;
    /* Prevents default tap highlight on mobile devices */
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-dark-bg);
    color: var(--color-white);
    height: 100%;
    min-width: 100vw;
    overflow-x: hidden;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    /* Disable text selection except for specific utility class */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Hide scrollbar across browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hides scrollbars globally */
body::-webkit-scrollbar,
.page::-webkit-scrollbar,
.contact-body::-webkit-scrollbar,
.contact-details::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Custom scrollbar styling for the Services page content container 
   We now apply custom styling to the .page element, which now handles scrolling. */
#page-services::-webkit-scrollbar,
#page-portfolio::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#page-services::-webkit-scrollbar-thumb,
#page-portfolio::-webkit-scrollbar-thumb {
    background-color: rgba(253, 185, 19, 0.5); /* Gold, similar to portfolio */
    border-radius: 4px;
}

#page-services::-webkit-scrollbar-track,
#page-portfolio::-webkit-scrollbar-track {
    background-color: var(--color-dark-bg);
}

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

/* --- FIXED HEADER SECTION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    background-color: var(--color-dark-bg);
    border-bottom: 1px solid var(--color-white-transparent-10);
    transform: translateZ(0);
    min-height: var(--fixed-nav-footer-height-mobile);
}

nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    width: 100vw;
    margin: 0 auto;
    min-height: var(--fixed-nav-footer-height-mobile);
    max-width: none;
}

/* --- Navigation Links --- */
.nav-link {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 13.6px 8px;
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
    color: var(--color-light-gray);
    transition: color var(--transition-fast) ease,
                transform var(--transition-fast) cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 100ms ease;
    white-space: nowrap;
    transform: translateZ(0);
}

.nav-link:hover {
    color: var(--color-white);
}

/* Style for the currently active page link */
.nav-link.active {
    color: var(--color-gold);
}

.nav-link.active:hover {
    color: var(--color-gold);
}

.nav-link:active {
    opacity: 0.8;
    transition-duration: var(--transition-super-fast);
}

/* --- Dynamic Underline element for navigation (Moved and sized by JS) --- */
#nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: var(--color-gold);
    border-radius: 2px;
    transform: translateZ(0);
}

/* --- MAIN CONTENT AREA --- */
main {
    width: 100vw;
    flex-grow: 1;
    overflow: hidden;
    /* Adjusts for fixed header height */
    padding-top: calc(var(--fixed-nav-footer-height-mobile) + 1px); 
    /* Adjusts for fixed footer height */
    padding-bottom: var(--fixed-nav-footer-height-mobile); 
}

/* --- Page Slider Container (Holds 3 pages side-by-side) --- */
#page-slider {
    display: flex;
    width: 300vw;
    height: 100%;
    transition: transform var(--transition-speed) ease-in-out;
    transform: translateZ(0);
}

/* --- Base styles for all pages (Home, Portfolio, Services) --- */
.page {
    width: 100vw;
    height: 100%;
    scroll-behavior: smooth;
    overflow-y: auto; /* Enables vertical scrolling for pages by default */
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    opacity: 0;
    transition: opacity 400ms ease-in-out;
    transform: translateZ(0);
    
    /* ADDED: Lock selection for all non-selectable content pages */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.page.page-active {
    opacity: 1;
    transition-delay: 200ms;
}

/* --- HOME PAGE (Page 0) Styling --- */

/* Animation for social media icons */
@keyframes icon-pump {
    0%, 100% {
        transform: translateY(0) scale(1.0);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

#page-home {
    padding-top: 48px;
    justify-content: flex-start;
    /* Removed overflow-y: hidden; so it inherits overflow-y: auto from .page, 
       enabling scrolling on mobile when content overflows. */
}

.home-content-wrapper {
    width: 80vw;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 0;
    flex-grow: 0;
}

/* --- Main Logo and Welcome Message --- */
.main-logo-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.main-dmg-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto;
}

.page-welcome-title {
    font-size: clamp(1.7rem, 7vw, 3rem);
    font-weight: 700;
    color: var(--color-gold);
    margin-top: 16px;
    margin-bottom: 0;
}

/* --- Brand Section --- */
.brands-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.brands-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 8px;
    transition: background-color var(--transition-fast) ease;
}

.brands-svg {
    width: 64px;
    height: auto;
    flex-shrink: 0;
    margin-top: 2.4px;
}

.brands-text {
    text-align: left;
}

.brands-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold);
    margin: 0 0 4px 0;
}

.brands-description {
    font-size: 0.7rem;
    color: var(--color-white-transparent-85);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* --- Social Media Links --- */
.social-links {
    display: none; /* Hidden on small screens */
    gap: 8px;
    margin-top: 8px;
}

.social-links a {
    display: block;
    line-height: 0;
    transition: transform 150ms ease, filter 150ms ease;
    transform: translateZ(0);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

.social-links a:hover {
    /* Triggers the icon-pump animation on hover */
    animation: icon-pump 1.5s ease-in-out infinite; 
    transition-duration: 250ms;
}

.social-links svg {
    width: 18px;
    height: 18px;
}

/* --- Generic Page Title (Used by Portfolio/Services) --- */
.page-title {
    font-weight: 700;
    margin-top: 0;
}

/* --- PORTFOLIO PAGE (Page 1) Styling --- */
#page-portfolio {
    padding: 0;
    align-items: stretch;
    position: relative;
}

#page-portfolio .portfolio-header {
    text-align: center;
    flex-shrink: 0;
    /* Centers the header text over the image grid */
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    padding: 24px;
    z-index: 2;
    background: none;
    border-bottom: none;
    transition: transform var(--transition-fast) ease-in-out;
}

#page-portfolio .portfolio-title {
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: clamp(3rem, 12vw, 4.5rem);
    color: var(--color-gold);
}

#page-portfolio .portfolio-subtitle {
    font-size: clamp(0.8rem, 4vw, 1.1rem);
    color: var(--color-white);
    margin: 0;
    line-height: 1.4;
}

/* --- Container for dynamically loaded portfolio images (Uses CSS Grid) --- */
.image-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
    display: grid;
    /* Mobile default: 3 columns */
    grid-template-columns: repeat(3, 1fr); 
    gap: 0;
    justify-content: center;
    /* Custom scrollbar styling (Firefox) */
    scrollbar-width: thin; 
    scrollbar-color: rgba(253, 185, 19, 0.5) var(--color-dark-bg);

    /* Lock image interaction properties on the container (Redundant now, but kept for legacy/safety) */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.portfolio-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    opacity: 0; /* Hidden initially, shown on JS load */
    position: relative;
    filter: brightness(0.25); /* Dark overlay for text readability */
    transition: opacity var(--transition-speed) ease;

    /* Lock image interaction properties on the image itself */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Prevents dragging/selection on older browsers/mobile */
    -webkit-user-drag: none; /* Specifically for Webkit image dragging */
}

/* --- Portfolio Image Hover Effect (Desktop only) --- */
@media (hover: hover) and (min-width: 1024px) {
    #page-portfolio .portfolio-header:hover {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* --- SERVICES PAGE (Page 2) Styling --- */
#page-services {
    /* The parent element now handles scrolling, so we remove internal overflow and scrollbar styles */
    overflow-y: auto; 
    padding-top: 24px; 
    max-width: 100vw;
    /* Custom scrollbar styling moved up to the .page selector for #page-services */
    scrollbar-width: thin; 
    scrollbar-color: rgba(253, 185, 19, 0.5) var(--color-dark-bg);
}

/* Catalog Scroll Container */
#catalog-scroll-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 0; 
    flex-grow: 1;
    /* IMPORTANT: Remove internal scrolling so the scrollbar is on the page edge */
    overflow-y: visible;
    /* Ensure no custom scrollbar settings override the parent */
    scrollbar-width: none;
}

/* Loading Message */
.loading-message {
    text-align: center;
    color: var(--color-light-gray);
    padding: 40px 0;
    font-size: 1rem;
}

/* Individual Category Section */
.category-section {
    margin-bottom: 32px;
    padding-bottom: 0; /* Removed padding */
    border-bottom: none; /* Removed border */
}

/* Product Grid (Mobile-first layout) */
.product-grid {
    display: grid;
    /* Default: 1 column on mobile */
    grid-template-columns: 1fr; 
    gap: 24px;
}

/* Product Card Styling (Updated for better design) */
.product-card {
    background-color: var(--color-dark-secondary);
    padding: 20px; /* Increased padding */
    border-radius: 12px;
    /* MODIFIED: Set default border to the dark background color to make it invisible/blended. */
    border: 1px solid var(--color-dark-secondary); 
    display: flex;
    flex-direction: column;
    /* ADDED: Explicitly defines space between the image, description, and bottom-aligned price/title */
    justify-content: space-between; 
    transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

/* --- NEW: Mobile Outline for Product Cards (Max 767px) --- */
@media (max-width: 767px) {
    .product-card {
        /* Set neutral border for consistency, will be overwritten by category color below */
        border: 1px solid var(--color-dark-secondary); 
        /* Retain subtle shadow for mobile for definition */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        
        /* ADDED: Remove the 'lift' effect on mobile */
        transform: none !important; 
    }
    
    /* NEW: Explicitly set the mobile border color using the category color classes */
    .product-card.color-our-products { border-color: var(--color-theme-red); }
    .product-card.color-graphic-designing { border-color: var(--color-theme-green); }
    .product-card.color-stock-element { border-color: var(--color-theme-purple); }
    .product-card.color-surveillance-camera { border-color: var(--color-theme-orange); }

    /* NEW: REMOVE the hover effect on mobile (if any browser incorrectly applies it) */
    .product-card:hover {
        transform: none;
    }
}
/* --- END NEW MOBILE OUTLINE --- */

.product-card:hover {
    transform: translateY(-6px); /* More pronounced lift (Desktop only) */
    /* Remove general border-color declaration here, relying only on specific rules below */
}

.product-card img {
    /* UPDATED: Image is full width, natural height, no cropping */
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 8px; /* REDUCED margin from 16px to 8px */
    opacity: 0.95; /* Slightly brighter image */
    transition: opacity var(--transition-fast) ease;
}

/* UPDATED: Content is left-aligned on all screen sizes */
.product-details-content {
    text-align: left;
}

/* NEW: Ensures the description text block expands to take up all available space */
.product-details-description {
    flex-grow: 1; 
    margin-bottom: 0; 
}

/* OLD: This was used for all details content, now only used for alignment */
.product-details-top {
    /* Ensure no margin above the first element */
    margin-top: 0;
}

.product-title {
    font-size: clamp(1.7rem, 6vw, 2rem); /* UPDATED from 1.25rem */
    font-weight: 700;
    margin: 0; /* Removed margins to tightly control spacing with surrounding wrappers */
    /* UPDATED: Title color will be set by the dynamic color class */
}

.price-text {
    font-size: 1.1rem; /* UPDATED from 1rem */
    font-weight: 500;
    color: var(--color-light-gray);
    margin-top: 6px; /* Added slight top margin to separate from title */
    margin-bottom: 0; /* Removed margin bottom */
    line-height: 1.4;
}

.product-description {
    font-size: 0.85rem; /* UPDATED from 0.9rem */
    color: var(--color-white-transparent-85);
    margin-top: 12px; /* Added top margin to separate from title/price block */
    margin-bottom: 0; /* Removed bottom margin */
    line-height: 1.4;
    /* REMOVED truncation properties to show full text */
}

/* --- Category Color Themes (from JSON data structure) --- */
/* The color property is dynamically added to .product-title and .product-card on hover */
.color-our-products { color: var(--color-theme-red); } /* Red */
.color-graphic-designing { color: var(--color-theme-green); } /* Green */
.color-stock-element { color: var(--color-theme-purple); } /* Purple */
.color-surveillance-camera { color: var(--color-theme-orange); } /* Orange */

/* For the product title to inherit the theme color */
.product-title.color-our-products { color: var(--color-theme-red); }
.product-title.color-graphic-designing { color: var(--color-theme-green); }
.product-title.color-stock-element { color: var(--color-theme-purple); }
.product-title.color-surveillance-camera { color: var(--color-theme-orange); }

/* FIX: Apply border color directly to the .product-card on hover (Desktop only) */
/* MODIFIED: Removed box-shadow (glow) from all desktop hover states */
.product-card.color-our-products:hover { 
    border-color: var(--color-theme-red); 
    box-shadow: none;
}
.product-card.color-graphic-designing:hover { 
    border-color: var(--color-theme-green); 
    box-shadow: none;
}
.product-card.color-stock-element:hover { 
    border-color: var(--color-theme-purple); 
    box-shadow: none;
}
.product-card.color-surveillance-camera:hover { 
    border-color: var(--color-theme-orange); 
    box-shadow: none;
}

/* ADDED: Remove click/active effect for cards */
.product-card:active {
    transform: none;
    opacity: 1; /* Reset any potential default opacity change */
    transition-duration: var(--transition-fast);
}

@media (max-width: 767px) {
    .product-card:active {
        /* Explicitly override any active state on mobile to ensure no visual change */
        transform: none !important;
        opacity: 1 !important;
    }
}


/* --- FIXED FOOTER SECTION --- */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    background-color: var(--color-dark-bg);
    border-top: 1px solid var(--color-white-transparent-10);
    padding: 13.6px 12px;
    text-align: center;
    transform: translateZ(0);
    transition: transform var(--transition-fast) ease-in-out;
    min-height: var(--fixed-nav-footer-height-mobile);
}

/* --- Button to trigger the contact panel --- */
#contact-trigger {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    color: var(--color-light-gray);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    transition: color var(--transition-fast) ease,
                transform var(--transition-fast) cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 100ms ease;
    transform: translateZ(0);
}

#contact-trigger:hover {
    color: var(--color-gold);
}
#contact-trigger:active {
    opacity: 0.8;
    transition-duration: var(--transition-super-fast);
}

#contact-trigger:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- CONTACT PANEL OVERLAY (Modal/Drawer) --- */
#contact-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    min-height: 65dvh;
    max-height: 85dvh;
    background-color: var(--color-dark-secondary);
    z-index: 200;
    border-top: 2px solid var(--color-gold);
    /* Initially hidden below viewport */
    transform: translateY(100%); 
    transition: transform var(--transition-speed) ease-in-out;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

#contact-panel.open {
    transform: translateY(0);
}

/* --- Panel Header with Title and Close Button --- */
.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-white-transparent-10);
    flex-shrink: 0;
}

.contact-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gold);
    margin: 0;
}

#contact-close-btn {
    color: var(--color-light-gray);
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contact-close-btn:hover {
    color: var(--color-white);
    transform: rotate(90deg);
}

/* --- Panel Body: Contains map and details, scrollable container --- */
.contact-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* --- Map Container (for Leaflet.js) --- */
.contact-map {
    display: none; /* Hidden on mobile, shown via media query */
    width: 100%;
    align-items: center;
    justify-content: center;
    color: var(--color-dark-bg);
    font-weight: 600;
    overflow: hidden;
    filter: grayscale(100%);
    border-right: none;
    flex-shrink: 0;
}

.contact-map #map-container {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Ensures Leaflet map elements use dark background for better integration */
.contact-map #map-container .leaflet-layer,
.contact-map #map-container .leaflet-control-container,
.contact-map #map-container .leaflet-container {
    background-color: var(--color-dark-secondary) !important;
    image-rendering: crisp-edges;
    transform: translateZ(0);
}

/* --- Contact Information and About Section (Details column) --- */
.contact-details {
    overflow-y: visible;
    color: var(--color-light-gray);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 32px 40px 32px 40px;
    gap: 24px;
    flex-shrink: 0;
}

.contact-info-col {
    gap: 10.4px;
    flex: 1;
    align-self: flex-start;
    align-items: flex-start;
    display: flex;
    flex-direction: column;
}

.contact-logo-svg {
    width: 136px;
    height: auto;
    margin-bottom: 8px;
    display: block;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-white);
    width: 100%;
}

.contact-item span {
    font-size: 0.9rem;
    line-height: 1.35;
}

.contact-icon {
    width: 18px;
    height: auto;
    margin: 2.96px 4px 0 0;
    color: var(--color-gold);
    flex-shrink: 0;
}

/* --- About Text Section --- */
.about-section-col {
    flex: 1;
    align-self: flex-start;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: none;
    margin: 0;
}

.about-section h2 {
    color: var(--color-gold);
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0;
}

.about-section p {
    font-size: 0.9rem;
    line-height: 1.35;
    margin: 0;
    color: var(--color-white-transparent-85);
}

/* --- Utility class for making text selectable (overrides body setting) --- */
.selectable-text {
    /* Retain selectability for contact info (Address, Phone, Email) */
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* --- Media Queries (Responsive Design) --- */

/* Tablet/Small Desktop (>= 768px) */
@media (min-width: 768px) {
    /* Product Grid: 2 columns */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet/Small Desktop (>= 1024px) */
@media (min-width: 1024px) {
    /* --- HOME PAGE (Desktop) --- */
    #page-home {
        overflow-y: auto;
        padding-top: 24px;
        justify-content: center;
    }

    /* Switches home content to a two-column grid layout */
    .home-content-wrapper {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr;
        grid-template-rows: 1fr;
        gap: 48px;
        align-items: center;
        padding: 0 32px;
        text-align: left;
        width: 90vw;
        max-width: 1200px;
    }

    .main-logo-column {
        align-items: flex-start;
        text-align: left;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .main-dmg-logo {
        max-width: 90%;
        width: 400px;
        margin: 0;
    }

    .page-welcome-title {
        font-size: clamp(3rem, 4vw, 4rem);
        margin-top: 24px;
    }

    .brands-column {
        height: 100%;
        display: flex;
        align-items: center;
    }

    .brands-container {
        gap: 32px;
    }

    .brands-item {
        max-width: none;
        margin: 0;
    }

    .brands-svg {
        width: 96px;
        height: auto;
    }

    .brands-title {
        font-size: 1.35rem;
    }

    .brands-description {
        font-size: 0.85rem;
    }

    .social-links {
        display: flex; /* Show social links on desktop */
    }

    .social-links svg {
        width: 21.6px;
        height: 21.6px;
    }

    /* Uses flexible columns for the portfolio image grid on larger screens */
    .image-scroll-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    /* Product Grid: 3 columns */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Standard Desktop (>= 1366px) */
@media (min-width: 1366px) {

    /* --- HOME PAGE (Desktop) --- */
    .home-content-wrapper {
        grid-template-columns: 0.75fr 1.25fr;
    }

    /* --- HEADER/NAV (Desktop) --- */
    nav {
        max-width: 768px;
        padding: 0 16px;
        justify-content: center;
        min-height: var(--fixed-nav-footer-height-desktop);
    }

    .nav-link {
        font-size: 0.95rem;
        font-weight: 700;
        padding: 18.4px 32px;
        flex-grow: 0;
    }

    /* --- MAIN CONTENT (Desktop) --- */
    main {
        padding-top: calc(var(--fixed-nav-footer-height-desktop) + 1px);
        padding-bottom: var(--fixed-nav-footer-height-desktop);
    }

    .page {
        padding: 32px;
    }
    
    /* UPDATED: #page-services padding to match .page */
    #page-services {
        padding: 32px;
    }

    /* --- PORTFOLIO (Desktop) --- */
    #page-portfolio .portfolio-header {
        padding: 48px 32px 24px 32px;
    }

    #page-portfolio .portfolio-title {
        font-size: clamp(3rem, 4vw, 4.5rem);
    }

    .image-scroll-container {
        padding: 0;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    /* --- FOOTER (Desktop) --- */
    footer {
        transition: none;
        /* Footer is fully visible without translation on large screens */
        transform: translateY(0) !important; 
        padding: 18.4px 12px;
        min-height: var(--fixed-nav-footer-height-desktop);
    }

    #contact-trigger {
        font-size: 0.95rem;
        font-weight: 700;
    }

    /* --- CONTACT PANEL (Desktop) --- */
    #contact-panel {
        max-height: 80vh;
        min-height: 50vh;
        width: 100vw;
        /* Centers the panel horizontally */
        left: 50%; 
        transform: translate(-50%, 100%);
    }

    #contact-panel.open {
        transform: translate(-50%, 0);
    }

    /* --- Panel Body (Desktop Grid) --- */
    .contact-body {
        display: grid;
        /* Map (2fr) | Details (3fr) layout */
        grid-template-columns: 2fr 3fr; 
        overflow: hidden;
    }

    /* --- Map Container (Desktop) --- */
    .contact-map {
        display: flex; /* Show map on desktop */
        min-height: 100%;
        height: auto;
        border-right: 1px solid var(--color-white-transparent-10);
    }

    .contact-details {
        overflow-y: auto;
        padding: 56px;
    }
    
    /* Product Grid: 4 columns */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop (>= 1920px) */
@media (min-width: 1920px) {
    /* --- HOME PAGE (Large Desktop) --- */
    .home-content-wrapper {
        grid-template-columns: 0.65fr 1.35fr;
    }

    /* --- HEADER/NAV (Large Desktop) --- */
    nav {
        max-width: 1040px;
    }

    .nav-link {
        font-size: 1.15rem;
        padding: 16.8px 32px;
    }

    /* --- FOOTER (Large Desktop) --- */
    footer {
        padding: 16.8px 12px;
    }

    #contact-trigger {
        font-size: 1.15rem;
    }

    /* --- CONTACT PANEL (Large Desktop) --- */
    #contact-panel {
        width: 80vw;
        max-height: 70vh;
        min-height: 50vh;
        border-radius: 16px 16px 0 0;
    }

    /* Map (3fr) | Details (2fr) layout */
    .contact-body {
        grid-template-columns: 3fr 2fr; 
    }

    .contact-details {
        padding: 64px;
    }

    .contact-header h2 {
        font-size: 1.45rem;
    }

    .contact-logo-svg {
        width: 192px;
        height: auto;
    }

    .contact-item span {
        font-size: 1.15rem;
    }

    .contact-icon {
        width: 26.4px;
        height: 26.4px;
    }

    .about-section h2 {
        font-size: 1.65rem;
    }

    .about-section p {
        font-size: 1.15rem;
    }

    /* --- HOME PAGE (Large Desktop) --- */
    .main-dmg-logo {
        width: 480px;
    }

    .page-welcome-title {
        font-size: clamp(4rem, 5vw, 5rem);
    }

    .brands-container {
        gap: 40px;
    }

    .brands-svg {
        width: 112px;
    }

    .brands-title {
        font-size: 1.65rem;
    }

    .brands-description {
        font-size: 1.0rem;
    }

    .social-links svg {
        width: 26.4px;
        height: 26.4px;
    }

    .image-scroll-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
