/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #666;
}

/* ===== CONTAINERS ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== HEADER ===== */
.header {
    background: #fff;
    position: relative;
    z-index: 100;
}

.header-top {
    padding: 12px 0;
    text-align: center;
}

.header-bottom {
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    text-align: center;
}

.site-title a {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ===== NAVIGATION ===== */
.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.main-nav .active a {
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin: 0 auto;
}

/* On mobile, header-bottom becomes a flex row so hamburger sits on the right */

.hamburger span {
    width: 25px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
}

/* ===== MOBILE MENU ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.mobile-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-nav {
    background: #fff;
    padding: 60px 40px;
    border-radius: 8px;
    position: relative;
    min-width: 260px;
    text-align: center;
}

.mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin: 20px 0;
}

.mobile-nav a {
    font-size: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== HERO SECTION ===== */
.hero-section {
    width: 100%;
    padding-top: 50px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* ===== SLIDESHOW ===== */
.slideshow {
    position: relative;
    width: 100%;
    height: 82vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 1.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.slideshow-below {
    padding: 16px 0 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.slideshow-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
}

.dot.active {
    background: #333;
}

.slideshow-arrow {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    padding: 4px 8px;
    transition: color 0.2s;
    line-height: 1;
    font-family: 'EB Garamond', serif;
}

.slideshow-arrow:hover {
    color: #333;
}

/* ===== CONTENT SECTIONS ===== */
.content {
    padding: 50px 0 70px;
}

.gallery-page {
    padding-bottom: 60px;
}

.page-title {
    font-size: 48px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

hr.short {
    width: 80px;
    height: 1px;
    background: #ccc;
    border: none;
    margin: 0 auto 50px;
}

/* ===== GALLERY FILTERS ===== */
.gallery-filters {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 7px 20px;
    font-family: 'EB Garamond', serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    cursor: pointer;
    transition: all 0.25s;
}

.filter-btn:hover {
    border-color: #333;
    color: #333;
}

.filter-btn.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* ===== GALLERY GRID — masonry ===== */
.gallery-grid {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.gallery-item {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item.visible {
    opacity: 1;
}

.gallery-item.hidden {
    opacity: 0;
    pointer-events: none;
}

.hover-effect {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
}

.hover-effect img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.hover-effect:hover img {
    transform: scale(1.04);
}

.hover-effect figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82), transparent);
    color: #fff;
    padding: 36px 20px 18px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.hover-effect:hover figcaption {
    transform: translateY(0);
}

.caption-content h2 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 8px;
}

.caption-content .details {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
}

.status {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status.sold {
    background: rgba(180,0,0,0.55);
}

.shadow {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 88%;
    max-height: 92vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox-caption {
    color: #fff;
    padding: 14px 20px 10px;
    width: 100%;
    text-align: center;
}

.lightbox-caption-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lightbox-caption h2 {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
}

.lightbox-caption-row {
    font-size: 16px;
    opacity: 0.75;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    transition: opacity 0.2s;
    opacity: 0.75;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 16px;
    right: 30px;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-link-inline {
    color: #fff;
    font-size: 18px;
    opacity: 0.75;
    text-decoration: underline;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.lightbox-link-inline:hover {
    opacity: 1;
    color: #fff;
}

/* ===== PAINTING LAYOUT — side by side ===== */
.painting-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.painting-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.painting-main-image img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.painting-thumbs {
    display: flex;
    gap: 12px;
}

.painting-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

.painting-thumb:hover {
    opacity: 1;
}

.painting-thumb.active {
    opacity: 1;
    border-color: #333;
}

/* ===== PAINTING RIGHT PANEL ===== */
.painting-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 10px;
}

.painting-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.painting-title-heading {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 2px;
    display: inline-block;
    margin: 0;
}

.painting-title-line {
    height: 1px;
    background: #ccc;
    width: 100%;
    display: block;
}

.painting-info-line {
    font-size: 17px;
    letter-spacing: 1px;
    color: #555;
    margin: 0;
}

.painting-description {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin: 0;
}

.painting-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
}

.actions-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    width: 320px;
}

.painting-nav {
    padding-top: 10px;
}

/* ===== BUTTONS — single definition ===== */
/* .btn-secondary is kept as an alias so existing HTML doesn't need changing,
   but both classes are identical by design. If you ever want them to differ,
   remove the comma-grouped rule and write them separately. */
.btn,
.btn-secondary {
    display: inline-block;
    padding: 11px 28px;
    background: #333;
    color: #fff !important;
    border: 1.5px solid #333;
    border-radius: 3px;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'EB Garamond', serif;
}

.btn:hover,
.btn-secondary:hover {
    background: #fff;
    color: #333 !important;
}

/* ===== PRINT PURCHASE ===== */
.print-purchase {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.print-select-wrap {
    display: flex;
    width: 100%;
}

.print-select {
    flex: 1;
    padding: 11px 16px;
    font-family: 'EB Garamond', serif;
    font-size: 13px;
    letter-spacing: 1px;
    border: 1.5px solid #333;
    border-left: none;
    border-radius: 0 3px 3px 0;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.25s;
    appearance: auto;
}

.print-select:focus {
    outline: none;
}

#buy-print-btn {
    border-radius: 3px 0 0 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.print-note {
    font-size: 15px;
    color: #555;
    letter-spacing: 0.5px;
    text-align: center;
}

.inquire-wrap {
    margin: 0;
    width: 100%;
}

.inquire-wrap .btn,
.inquire-wrap .btn-secondary {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: block;
}

.sold-badge {
    display: block;
    width: 100%;
    padding: 11px 28px;
    background: #eee;
    color: #999;
    border: 1.5px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    box-sizing: border-box;
    font-family: 'EB Garamond', serif;
    cursor: default;
}

/* ===== CONTACT PAGE LAYOUT ===== */
/* Default (no painting image): form column is centred */
.contact-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Image column is hidden until JS adds the has-image class */
.inquiry-image-col {
    display: none;
    flex-shrink: 0;
}

/* When a painting image is present: show image column, left-align the layout */
.contact-layout.has-image {
    justify-content: flex-start;
}

.contact-layout.has-image .inquiry-image-col {
    display: block;
    width: 300px;
    position: sticky;
    top: 40px;
}

.contact-form-col {
    flex: 1;
    max-width: 600px;
}

.inquiry-thumb {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-family: 'EB Garamond', serif;
    font-size: 17px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: border-color 0.3s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #999;
}

.form-note {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-top: 20px;
}

.form-error {
    text-align: center;
    font-size: 14px;
    color: #900;
    margin-top: 16px;
}

/* ===== THANK YOU MESSAGE ===== */
.thankyou-message {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
    line-height: 1.8;
}

.thankyou-message p:first-child {
    font-size: 48px;
    color: #555;
    margin-bottom: 20px;
}

.thankyou-message h2 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 16px;
}

.thankyou-message p {
    font-size: 18px;
    color: #666;
}

/* ===== MAILING LIST ===== */
.mailing-label {
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 16px;
}

.mailing-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mailing-inline input,
.mailing-footer input {
    padding: 10px 16px;
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 260px;
    background: #fff;
    transition: border-color 0.3s;
}

.mailing-inline input:focus,
.mailing-footer input:focus {
    outline: none;
    border-color: #999;
}

.btn-mailing {
    padding: 10px 22px;
    background: transparent;
    color: #555;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-family: 'EB Garamond', serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-mailing:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.mailing-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.mailing-thankyou {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    padding: 8px 0;
}

/* ===== TEXT CONTENT ===== */
.text-content {
    max-width: 680px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.85;
}

.text-content h3 {
    margin: 40px 0 16px;
    font-size: 26px;
    font-weight: 500;
}

.text-content p {
    margin-bottom: 20px;
}

.cta-text {
    text-align: center;
    margin-top: 50px;
}

/* ===== COMMISSION STATEMENT ===== */
.commission-statement p {
    font-size: 21px;
    line-height: 1.9;
    margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.footer {
    padding: 36px 0;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    color: #999;
    letter-spacing: 0.5px;
}

.footer-copy {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}

/* ===== COMMISSION LAYOUT ===== */
.commission-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.commission-slideshow-wrap {
    position: sticky;
    top: 40px;
    max-width: 400px;
    margin: 0 auto;
}

.commission-slideshow {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.commission-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.commission-slide.active {
    opacity: 1;
    position: relative;
}

.commission-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.commission-text {
    padding-top: 10px;
}

/* ===== ABOUT LAYOUT ===== */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

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

/* ===== SHIPPING INFO ===== */
.shipping-toggle {
    background: none;
    border: none;
    padding: 0;
    font-family: 'EB Garamond', serif;
    font-size: 15px;
    color: #888;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-align: left;
    transition: color 0.2s;
    margin-top: 4px;
}

.shipping-toggle:hover {
    color: #333;
}

.shipping-info {
    display: none;
    margin-top: 16px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 3px;
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

.shipping-info h4 {
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #333;
    margin: 16px 0 6px;
}

.shipping-info h4:first-child {
    margin-top: 0;
}

.shipping-info p {
    margin: 0 0 8px;
}

.shipping-info a {
    color: #555;
    text-decoration: underline;
}

.shipping-info ul {
    padding-left: 16px;
    margin: 0 0 8px;
}

.shipping-info li {
    margin-bottom: 4px;
}

.shipping-info.open {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
    }

    /* Header: remove double border lines on mobile, single bottom border on header only */
    .header-bottom {
        border-top: none;
        padding: 14px 0;
        display: flex;
        justify-content: flex-end;
    }

    .main-nav {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    /* Hamburger: shown on right */
    .hamburger {
        display: flex;
        margin: 0;
    }

    .container,
    .container-narrow {
        padding: 0 20px;
    }

    .site-title a {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .page-title {
        font-size: 34px;
    }

    .content {
        padding: 40px 0;
    }

    .slideshow {
        height: 50vh;
    }

    .painting-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .actions-inner {
        width: 100%;
    }

    /* Mobile: stack button on top, select below, clean border join */
    .print-select-wrap {
        flex-direction: column;
    }

    #buy-print-btn {
        border-radius: 3px 3px 0 0;
        width: 100%;
        border: 1.5px solid #333;
    }

    .print-select {
        border-left: 1.5px solid #333;
        border-top: none;
        border-radius: 0 0 3px 3px;
        width: 100%;
    }

    .lightbox-content img {
        max-height: 55vh;
    }

    .lightbox-prev {
        left: 6px;
        font-size: 28px;
    }

    .lightbox-next {
        right: 6px;
        font-size: 28px;
    }

    .lightbox-close {
        right: 16px;
        top: 10px;
        font-size: 28px;
    }

    .mailing-inline,
    .mailing-footer {
        flex-direction: column;
        align-items: center;
    }

    .mailing-inline input,
    .mailing-footer input {
        width: 100%;
        max-width: 300px;
    }

    .commission-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .commission-slideshow-wrap {
        max-width: 100%;
        position: static;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .painting-nav {
        text-align: center;
    }

    /* Contact layout: stack on mobile */
    .contact-layout,
    .contact-layout.has-image {
        flex-direction: column;
        align-items: center;
    }

    .contact-layout.has-image .inquiry-image-col {
        width: 100%;
        max-width: 300px;
        position: static;
        margin: 0 auto;
    }

    .contact-form-col {
        width: 100%;
        max-width: 600px;
    }
}