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

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: #f5f0e8;
    color: #2c2418;
    min-height: 100vh;
}

header {
    background: #1a1a1a;
    color: #e8dcc8;
    padding: 1.5rem 2rem;
    text-align: center;
}

header h1 {
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 1.8rem;
}

.header-atelier {
    display: block;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 1.2rem;
    color: #e8dcc8;
    margin-top: 0.25rem;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #c9b896;
}

.feature-btn {
    display: inline-block;
    margin: 1rem 0 0;
    background: #1a1a1a;
    color: #e8dcc8;
    border: 1px solid #c9b896;
    padding: 0.75rem 2rem;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.feature-btn:hover {
    background: #3d3428;
}

button {
    background: #1a1a1a;
    color: #e8dcc8;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #3d3428;
}

.section-note {
    margin-bottom: 1.5rem;
    color: #555;
    max-width: 60ch;
}

#gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.work-item {
    background: #fff;
    border: 1px solid #c9b896;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.work-item.selected {
    box-shadow: 0 0 0 4px #c9b896;
}

.work-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 4px solid #fff;
    box-sizing: border-box;
}

.work-caption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #2c2418;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden {
    display: none;
}

.selected-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.selected-image-wrap {
    flex: 1 1 320px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #c9b896;
    padding: 1.5rem;
}

.selected-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.selected-image-wrap.bordered {
    border: 5px solid #2c2418;
    padding: 0;
}

.selected-options {
    flex: 0 1 260px;
    background: #fff;
    border: 1px solid #c9b896;
    padding: 1.5rem;
}

.selected-options h3 {
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.size-selector-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.size-selector-container label {
    font-weight: 300;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.size-selector-container select {
    padding: 0.5rem;
    border: 1px solid #c9b896;
    border-radius: 4px;
    font-family: inherit;
    background: #fff;
}

.border-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-label {
    font-weight: 300;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #1a1a1a;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

#contact-form {
    background: #fff;
    border: 1px solid #c9b896;
    padding: 1.5rem;
    max-width: 640px;
}

#contact-form label {
    display: block;
    font-weight: 300;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin: 1rem 0 0.25rem;
}

#contact-form input,
#contact-form textarea {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #c9b896;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

#contact-form button {
    margin-top: 1.5rem;
}

#thanks-section {
    text-align: center;
    padding: 3rem 0;
}

#thanks-section h2 {
    border-bottom: none;
    margin-bottom: 1rem;
}

#thanks-section p {
    margin: 0.5rem auto 1.5rem;
    max-width: 50ch;
    color: #555;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.4rem;
    }

    main {
        padding: 1rem;
    }

    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }

    .selected-layout {
        flex-direction: column;
    }

    .selected-options {
        width: 100%;
    }
}