@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');
@import 'style.css';

#home-link {
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 9999;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

#home-link:hover {
    transform: scale(1.1);
}

#home-link svg {
    display: block;
}

:root {
    --background-color: #000000;
    --text-color: #ffffff;
    --primary-accent: #9370DB; /* Medium Purple */
    --secondary-accent: #4B0082; /* Indigo */
    --hover-glow: 0 0 15px rgba(147, 112, 219, 0.7); /* Glow effect */

.price-tag {
    color: #ba4df5;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 4px 8px;
    background: rgba(186, 77, 245, 0.1);
    border-radius: 4px;
    margin-top: 5px;
    display: inline-block;
}

.centered-price {
    font-size: 0.9rem;
    color: #ba4df5;
    margin: 8px 0;
    font-weight: bold;
    text-align: left;
    width: 100%;
    max-width: min(80vw, var(--centered-image-width, 800px));
}

    --input-bg: #222; /* Added for input background color */
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 120vh;
    margin-bottom: 120px;
}



header h1 {
    margin-bottom: 0.5rem;
}

.dimensions-display {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2px 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    font-size: 6px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    display: none;
}



.dimensions-display:not(:empty) {
    display: block;
    background: rgba(161, 66, 209, 0.3);
}

#home-link {
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 9999;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

#home-link:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

#home-link svg {
    display: block; /* Remove extra space below inline SVG */
}

#logo {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
    border-radius: 5px; 
    background-color: transparent;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    color: var(--primary-accent);
}

main {
    padding: 2rem 1rem;
}

main h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    padding: 15px;
    width: 100%;
    justify-content: center;
}

.image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 15px;
}

.image-column .grid-item {
    width: 80%;
    max-width: 800px;
    margin-bottom: 0;
    height: auto;
    aspect-ratio: unset;
}

.image-column .grid-item img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
}


.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--input-bg);
    border: 1px solid #666;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item {
    aspect-ratio: 1/1;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.grid-item.centered {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    z-index: 1000;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100vw;
    height: 100vh;
    aspect-ratio: unset;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.centered-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}



.centered-content .centered-description {
    width: var(--centered-image-width, min(80vw, 800px));
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    display: block;
}

.centered-title {
    font-size: 2.5rem;
    color: var(--primary-accent);
    text-align: center;
    margin: 0;
    width: 100%;
    max-width: min(80vw, var(--centered-image-width, 800px));
}

.centered-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(147, 112, 219, 0.3);
}

.centered-description {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-color);
    width: 100%;
    max-width: min(80vw, var(--centered-image-width, 800px));
    text-align: left;
    margin: 0;
}

@media (max-width: 768px) {
    .centered-title {
        font-size: 1.8rem;
    }
    .centered-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .centered-title {
        font-size: 1.4rem;
    }
    .centered-description {
        font-size: 0.9rem;
    }
}

.grid-item.centered .grid-item-overlay {
    display: none;
}

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

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

.grid-item.pulsating {
    animation: pulsateOutward 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulsateOutward {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Remove hover effects */

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-artwork {
    height: 200px; /* Adjust height as needed */
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    position: relative;
    overflow: hidden; /* Hide potential overflow from pseudo-elements */
}

/* Optional: Add a subtle pattern or texture */
.placeholder-artwork::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 10px 10px, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 50px 50px, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px, 60px 60px; /* Example pattern */
    opacity: 0.5;
}

.placeholder-artwork span {
    position: relative; /* Ensure text is above pseudo-element */
    z-index: 1;
    padding: 0 10px;
    background-color: rgba(0,0,0,0.3); /* Slight background for readability */
    border-radius: 3px;
}

.image-grid figcaption {
    padding: 0.8rem;
    font-size: 0.9rem;
    text-align: center;
    color: #ccc; /* Lighter gray for captions */
    background-color: #111; /* Darker background for caption area */
}

/* Artist Bio Section Styles */
#artist-bio {
    padding: 3rem 1rem;
    max-width: 900px; /* Limit width for readability */
    margin: 2rem auto 0 auto; /* Center and add top margin */
    background-color: #111; /* Slightly different background */
    border-top: 1px solid var(--secondary-accent);
    border-bottom: 1px solid var(--secondary-accent);
    border-radius: 8px; /* Optional rounded corners */
}

#artist-bio h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-accent);
    margin-bottom: 2rem; /* Increased margin */
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bio-content {
    display: flex;
    flex-direction: column; /* Stack image/name and text vertically by default */
    align-items: center; /* Center items horizontally */
    gap: 2rem; /* Increased gap */
}

.artist-visual {
    text-align: center; /* Center the image/placeholder and name */
}

.artist-photo-placeholder {
    width: 150px; /* Adjust size */
    height: 150px;
    color: var(--primary-accent); /* Use accent color for placeholder */
    border: 3px solid var(--secondary-accent);
    border-radius: 50%; /* Make it circular */
    padding: 10px; /* Add some padding inside */
    background-color: #222; /* Darker background for placeholder */
    display: block;
    margin: 0 auto 1rem auto; /* Center and add bottom margin */
    box-shadow: var(--hover-glow);
}

.artist-name {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Space below name */
    font-weight: 700;
}

.bio-text {
    text-align: center; /* Center text initially */
    color: #e0e0e0; /* Slightly brighter text for readability */
    font-size: 1rem;
    line-height: 1.7;
    max-width: 600px; /* Limit width of text block */
}

.bio-text p {
    margin-bottom: 1rem;
}

.bio-text p:last-child {
    margin-bottom: 0;
}

/* Contact Page Specific Styles */
.contact-page {
    padding: 2rem 1rem;
    max-width: 900px; /* Consistent max-width */
    margin: 0 auto;
}

#contact-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-intro {
    text-align: center;
    color: #ccc;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 3rem;
    background-color: #111; /* Match bio section background */
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--secondary-accent);
}

@media (min-width: 768px) {
    .bio-content {
        flex-direction: row; /* Side-by-side layout */
        align-items: flex-start; /* Align items to the top */
        text-align: left; /* Align text left */
        gap: 2.5rem;
    }
    .artist-visual {
        flex: 0 0 200px; /* Fixed width for the visual part */
        text-align: center;
    }
    .bio-text {
        text-align: left; /* Align text left on larger screens */
        max-width: none; /* Remove max-width limit */
    }
    .artist-photo-placeholder {
        width: 180px;
        height: 180px;
    }
    .contact-content {
        grid-template-columns: 2fr 1fr; /* Two columns on larger screens */
    }
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

#contact-form label {
    margin-bottom: 0.5rem;
    color: var(--primary-accent);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--secondary-accent);
    background-color: var(--input-bg); /* Dark input background */
    color: var(--text-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 8px rgba(147, 112, 219, 0.5);
}

#contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 120px;
}

.cta-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-accent);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    align-self: flex-start; /* Align button to the start */
    margin-top: 0.5rem;
}

.cta-button:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-2px);
    box-shadow: var(--hover-glow);
}

.contact-details {
    color: #ccc;
}

.contact-details h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--secondary-accent);
    padding-bottom: 0.5rem;
}

.contact-details p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    display: flex; /* Align icon and text */
    align-items: center;
}

.contact-details a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.contact-details svg {
    margin-right: 8px; /* Space between icon and text */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Scroll to Top Button */
#scroll-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-accent);
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    font-size: 18px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

#scroll-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: var(--hover-glow);
}

/* Footer Links */
.footer-links {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--primary-accent);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.copyright-notice {
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-color);
    padding: 1.5rem;
    margin: 2rem auto;
    border: 1px solid var(--secondary-accent);
    border-radius: 8px;
    max-width: 900px;
}

.copyright-notice h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.copyright-notice p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    padding: 1rem;
    background-color: #111;
    border-top: 1px solid var(--secondary-accent);
    z-index: 100;
}

footer p {
    font-size: 14px;
    color: white;
    margin: 0;
}

.refresh-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #888888;
    font-size: 0.8rem;
    margin: -5px 0 0 0;
    cursor: pointer;
    line-height: 1;
}

.refresh-label i {
    font-size: 0.9rem;
}

.refresh-label:hover {
    color: #ba4df5;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    main h2 {
        font-size: 1.8rem;
    }
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    .placeholder-artwork {
        height: 180px;
    }
    #contact-section h2 {
        font-size: 1.8rem;
    }
    .contact-intro {
        font-size: 1rem;
    }
    .contact-details h3 {
        font-size: 1.3rem;
    }
    .cta-button {
        align-self: stretch; /* Make button full width on smaller screens */
        text-align: center;
    }
    /* Adjust artist bio font size */
    #artist-bio h2 {
        font-size: 1.8rem;
    }
    .bio-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 0.5rem;
        text-align: center;
    }
    header h1, header p {
        width: 100%;
        text-align: center;
        padding: 0 10px;
    }
    #logo {
        max-width: 150px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    header p {
        font-size: 1rem;
    }
    main {
        padding: 1.5rem 0.5rem;
    }
    main h2 {
        font-size: 1.5rem;
    }
    .image-grid {
        grid-template-columns: 1fr; /* Stack images on very small screens */
        gap: 1.5rem;
    }
    .placeholder-artwork {
        height: 220px; /* Maybe taller when stacked */
    }
    #contact-section h2 {
        font-size: 1.5rem;
    }
    .contact-content {
        padding: 1.5rem;
    }
    .contact-intro {
        font-size: 0.95rem;
    }
    .footer-links {
        font-size: 0.9rem;
    }
    /* Adjust artist bio font size and padding */
    #artist-bio {
        padding: 2rem 1rem; /* Adjusted padding */
    }
    #artist-bio h2 {
        font-size: 1.5rem;
    }
    .bio-text {
        font-size: 0.9rem;
    }
    .artist-photo-placeholder {
        width: 120px;
        height: 120px;
    }
    .artist-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    .image-column .grid-item {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.6rem;
    }
}

.artist-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 3px solid var(--secondary-accent);
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem auto;
    box-shadow: var(--hover-glow);
}

.section-links {
    text-align: center;
    margin-top: 1rem;
}

.section-links {
    color: var(--text-color);
}

.section-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
}

.section-links a:hover {
    color: var(--primary-accent);
}

.view-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 9999;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.view-toggle svg,
.view-toggle i {
    width: 28px;
    height: 28px;
    font-size: 28px;
}

.view-toggle {
    padding: 8px;
}

.view-toggle:hover {
    transform: scale(1.1);
}

.corner-price {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(186, 77, 245, 0.9);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: bold;
    z-index: 3;
}

.grid-item-overlay {
    padding: 0.5rem;
    color: var(--text-color);
    background: none;
}

.grid-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 8px;
}

.grid-item-overlay h3 {
    font-size: clamp(0.55rem, 1.2vw, 0.7rem);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #a142d1;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 6px;
    border-radius: 4px;
    width: fit-content;
    max-width: calc(100% - 20px);
    margin-left: 0;
}