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

html {
    color: #333;
    background-color: #e4e4e4;
    border-top: #333 solid 1px;
}

body {
    height: 100%;
    margin-bottom: 100px;
    font-family: 'Source Sans Pro', sans-serif;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

.filters,
.sorts,
.contact {
    margin-top: 24px;
    text-align: center;
}

.filter-button,
.size-button,
.material-button,
.sort-button {
    background-color: #f5f1e9;
    /* Antique paper color */
    border: 1px solid #8b7d6b;
    /* Sepia-toned border */
    border-radius: 0;
    /* Square corners were more common in 1880s */
    box-shadow: 0 0 0 1px #8b7d6b, 0 0 0 5px #f5f1e9, 0 0 0 6px #8b7d6b;
    /* Double border effect */
    color: #333;
    padding: 0.5rem 1rem;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Source Sans Pro', sans-serif;
}

.filter-button:hover,
.size-button:hover,
.material-button:hover,
.sort-button:hover,
.filter-button.is-checked,
.size-button.is-checked,
.material-button.is-checked,
.sort-button.is-checked {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #333;
    color: #fff;
}

.email-link {
    font-size: 14px;
    text-decoration: none;
    color: #333;
}

.email-link:hover {
    color: #8b7d6b;
}

.email-link:visited {
    color: inherit; /* This keeps the visited color the same as the default color */
}

/* Gallery */
.gallery {
    margin: 24px auto;
    background-color: #f5f1e9;
    /* Antique paper color */
    border: 1px solid #8b7d6b;
    /* Sepia-toned border */
    border-radius: 0;
    /* Square corners were more common in 1880s */
    box-shadow: 0 0 0 1px #8b7d6b, 0 0 0 5px #f5f1e9, 0 0 0 6px #8b7d6b;
    /* Double border effect */
    padding: 20px;
    position: relative;
}

.gallery-item img {
    cursor: pointer;
    border-radius: 4px;
    width: 300px;
    margin: 10px;
    transition: transform 0.5s ease;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Image captions */
.gallery-caption {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    position: absolute;
    bottom: 14px;
    left: 12px;
    transition: opacity 0.5s ease;
    max-width: 300px;
    font-size: 14px;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Image overlay styles */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: pointer;
}

/* Image container for panning */
.image-container {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    max-height: 90vh;
}

.overlay-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: zoom-in;
    transition: transform 0.3s ease;
    transform-origin: center;
}


/* Zoom controls */
.overlay-controls {
    position: absolute;
    bottom: -0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

.control-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.control-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Close button */
.overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.overlay-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
