/* ===================================
   Le Menuisier - Custom Visual Parity Fixes
   Priority 1: CSS Global Fixes
   =================================== */

/* ===================================
   1. REMOVE ALL GALLERY GAPS
   =================================== */

/* Homepage gallery grid - zero gaps */
.sqs-gallery-design-grid,
.sqs-gallery-design-grid-slide,
.gallery-grid-wrapper,
.summary-thumbnail-container {
    margin: 0 !important;
    padding: 0 !important;
}

.sqs-gallery-design-grid .slide {
    margin: 0 !important;
    padding: 0 !important;
}

.sqs-gallery-design-grid .image-slide-anchor {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* Grid containers */
.Index-page-content .sqs-block-summary-v2 .summary-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sqs-block-summary-v2 .summary-thumbnail-outer-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Force zero gaps on all gallery types */
.sqs-gallery-block-grid .sqs-gallery-design-grid-slide,
.sqs-gallery-block-grid .slide,
.summary-item {
    margin: 0 !important;
    padding: 0 !important;
}

/* Grid spacing override */
.Index-page-content .sqs-layout > .row,
.Index-page-content .sqs-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.Index-page-content .sqs-col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ===================================
   2. SQUARE BUTTONS GLOBALLY
   =================================== */

/* All button styles - force square corners */
button,
.sqs-block-button-element,
.sqs-editable-button,
input[type="submit"],
input[type="button"],
.btn,
a.btn,
.button,
a.button,
.sqs-button-element--primary,
.sqs-button-element--secondary,
.newsletter-form-button,
.sqs-add-to-cart-button {
    border-radius: 0 !important;
}

/* Button containers */
.sqs-block-button-container,
.button-block,
.sqs-button-element-wrapper {
    border-radius: 0 !important;
}

/* Ensure all interactive elements are square */
.sqs-block-button .sqs-block-button-element--small,
.sqs-block-button .sqs-block-button-element--medium,
.sqs-block-button .sqs-block-button-element--large {
    border-radius: 0 !important;
}

/* ===================================
   3. NAVIGATION TRANSPARENCY & BEHAVIOR
   =================================== */

/* About & Contact Us pages - Static nav, no overlay, just text and logo */
body#collection-58336a64c534a5a026dbb951 #header,
body#collection-57dd8bf68419c2abeeb77631 #header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: transparent !important;
}

body#collection-58336a64c534a5a026dbb951 #header .Header-nav-item a,
body#collection-57dd8bf68419c2abeeb77631 #header .Header-nav-item a {
    color: #fff !important;
}

/* Our Work page - Static, transparent initially, fades in with overlay on scroll */
body#collection-57dd7c6db8a79bb3c44967e2 #header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: transparent !important;
    transition: background-color 0.3s ease, opacity 0.3s ease !important;
}

body#collection-57dd7c6db8a79bb3c44967e2.scrolled #header {
    background: rgba(0, 0, 0, 0.7) !important;
}

body#collection-57dd7c6db8a79bb3c44967e2 #header .Header-nav-item a {
    color: #fff !important;
}

/* Homepage - Nav hidden initially, shows on scroll */
body.homepage #header,
body.homepage .Header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: transparent !important;
    transition: background-color 0.3s ease, opacity 0.3s ease !important;
    opacity: 0 !important;
}

body.homepage.scrolled #header,
body.homepage.scrolled .Header {
    background: rgba(0, 0, 0, 0.7) !important;
    opacity: 1 !important;
}

body.homepage.scrolled #header .Header-nav-item a,
body.homepage.scrolled .Header-nav-item a {
    color: #fff !important;
}

/* Logo visibility */
body.homepage #header .Header-branding,
body.homepage .Header-branding {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

body.homepage.scrolled #header .Header-branding,
body.homepage.scrolled .Header-branding {
    opacity: 1 !important;
}

/* ===================================
   4. CATEGORY GRID (Work Page)
   =================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

.category-item {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-item .category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: #fff;
}

.category-item h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Work page specific - remove ALL grid column padding */
body[id*="collection-57dd7c6d"] .sqs-col-4,
body[id*="collection-57dd7c6d"] .span-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body[id*="collection-57dd7c6d"] .sqs-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body[id*="collection-57dd7c6d"] .sqs-block-image {
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive - 2 columns on tablet */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - 1 column on mobile */
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   5. ADDITIONAL GLOBAL FIXES
   =================================== */

/* Ensure full-width sections */
.Index-page-content .sqs-layout {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Remove any default margins that create gaps */
.Index-page,
.Index-page-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Gallery image fit */
.sqs-gallery-design-grid .image-slide-anchor img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Ensure images fill their containers */
.summary-thumbnail img,
.summary-thumbnail-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Fix for Squarespace grid system spacing */
.sqs-col-12.span-12 {
    width: 100% !important;
    padding: 0 !important;
}

/* Remove collection item spacing */
.collection-content-wrapper {
    padding: 0 !important;
}

/* Ensure banner images are full bleed */
.Index-page .has-banner-image {
    margin: 0 !important;
    padding: 0 !important;
}

.Index-page-scroll,
.Index-page-content {
    padding-top: 0 !important;
}

/* ===================================
   6. PROJECT BANNERS (Future Enhancement)
   =================================== */

.project-banner {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}

.project-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-banner-title {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: #fff;
    font-size: 3em;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
}

.project-gallery-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===================================
   7. TYPOGRAPHY CONSISTENCY
   =================================== */

/* Match Squarespace typography */
body {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    letter-spacing: 0.05em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Specific letter-spacing overrides to match original */
h2 {
    letter-spacing: normal !important;
}

h3 {
    letter-spacing: 4px !important;
}

/* Override ALL Squarespace fonts globally */
*, *::before, *::after {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* ===================================
   8. HOVER EFFECTS
   =================================== */

.category-item {
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

.summary-item:hover,
.sqs-gallery-design-grid .slide:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* ===================================
   9. MOBILE OPTIMIZATIONS
   =================================== */

@media (max-width: 768px) {
    .project-banner {
        height: 40vh;
        min-height: 300px;
    }

    .project-banner-title {
        font-size: 2em;
        bottom: 20px;
        left: 20px;
        letter-spacing: 2px;
    }

    .category-item h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .project-banner-title {
        font-size: 1.5em;
        bottom: 15px;
        left: 15px;
    }

    .category-item .category-overlay {
        padding: 15px;
    }
}

/* ===================================
   10. FOOTER STYLING
   =================================== */

#footer,
.Footer {
    background: rgb(32, 26, 22);
    padding: 10px 20px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4em;
    color: rgba(255, 255, 255, 0.4);
}

#footer a,
.Footer a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

#footer a:hover,
.Footer a:hover {
    border-bottom-color: #ffffff;
}

/* ===================================
   11. ADDITIONAL TYPOGRAPHY REFINEMENTS
   =================================== */

/* Ensure consistent font rendering across browsers */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Heading spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

/* Paragraph spacing and font */
p {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

/* ===================================
   12. GALLERY IMAGE LOADING STATES
   =================================== */

.summary-item img,
.sqs-gallery-design-grid img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-item img.loaded,
.sqs-gallery-design-grid img.loaded {
    opacity: 1;
}

/* ===================================
   13. LINK STYLING CONSISTENCY
   =================================== */

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Navigation links should not have opacity change */
nav a,
.Header-nav-item a,
#header a {
    transition: color 0.2s ease;
}

nav a:hover,
.Header-nav-item a:hover,
#header a:hover {
    opacity: 1;
    color: #ccc !important;
}

/* ===================================
   14. FORM STYLING (if contact forms exist)
   =================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    border: 1px solid #e4e4e4;
    padding: 12px 15px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0 !important;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3e3e3e;
}

/* ===================================
   15. SCROLL BEHAVIOR
   =================================== */

html {
    scroll-behavior: smooth;
}

/* ===================================
   16. PRINT STYLES
   =================================== */

@media print {
    #header,
    .Header,
    #footer,
    .Footer {
        position: static !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }
}
