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

body {
    font-family: "Winky Rough", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    color: #333;
    line-height: 1.6;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header & Navigation --- */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 0;
    text-align: center;
    width: 100%;
}

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

.site-title {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.site-title img {
    height: 60px;
    margin-right: 1rem;
    display: inline-block;
}

.site-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.site-nav a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: #000;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

p {
    margin-bottom: 20px;
}

.etsy-button {
    height:60px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.etsy-button:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* --- Gallery Page (Item Cards) --- */
.gallery-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.gallery-item {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "title"
        "image"
        "desc";
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.gallery-title {
    grid-area: title;
    margin: 0;
}

.gallery-image {
    grid-area: image;
    aspect-ratio: 4 / 3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.gallery-description {
    grid-area: desc;
}

@media (min-width: 768px) {
    .gallery-item {
        grid-template-columns: 320px 1fr;
        grid-template-areas:
            "title title"
            "image desc";
        align-items: start;
    }
}

/* Thumbnails under each gallery item */
.gallery-thumbs {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.75;
    outline: none;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Disable transitions on mobile devices */
@media (hover: none) and (pointer: coarse) {
    .gallery-images img {
        transition: none;
    }
    .gallery-images img:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

.footer-link {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #000;
    text-decoration: underline;
}

/* --- Main Content Panel --- */
.main-content-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    flex: 1;
}

.content-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
}

/* --- Footer --- */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
}

.footer-logo {
    height: 40px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-logo-left {
    order: 1;
}

.site-footer p {
    order: 2;
    margin: 0;
    text-align: center;
    flex: 1;
}

.footer-logo-right {
    order: 3;
}

.buy-item {
    cursor:pointer;
}

/* --- Responsive Design (Media Queries) --- */
@media (max-width: 767px) {
    /* Mobile footer layout */
    /* Navigation: place buy-item beneath other links */
    .site-nav ul {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .site-nav li.buy-item {
        order: 99;
        width: 100%;
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }

    .site-footer {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .footer-logo {
        height: 30px;
    }
    
    .site-footer p {
        order: 1;
    }
    
    .footer-logo-left {
        order: 2;
    }
    
    .footer-logo-right {
        display: none;
    }

    .site-header {
        padding-bottom: 0px;
    }
}

@media (min-width: 768px) {
    /* Desktop layout */
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-title {
        margin-bottom: 0;
    }
}