/* ===========================
   CSS Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ===========================
   Header Styles
   =========================== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-tagline {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

/* ===========================
   Navigation Styles
   =========================== */
.navigation {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.nav-button:hover {
    color: #667eea;
    border-bottom-color: #667eea;
}

.nav-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* ===========================
   Main Content Styles
   =========================== */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: capitalize;
    font-weight: 600;
}

/* ===========================
   Creations Grid
   =========================== */
.creations-grid {
    display: grid;
    /* Larger cards: 3 columns on desktop instead of 4 */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.creation-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

    .creation-card:hover {
        transform: translateY(-12px);
        box-shadow: 0 16px 40px rgba(102, 126, 234, 0.25);
        transform: scale(1.08)
    }

.creation-card:hover .creation-image {
    /* Eye candy zoom - works perfectly with larger source images */
    /* When you upgrade to 300x200 thumbnails, this will be crisp! */
  /*  transform: scale(1.08);*/
}

.creation-image-wrapper {
    position: relative;
    width: 100%;
    /* 150x100 aspect ratio = 1.5:1, so height is 66.67% of width */
    padding-bottom: 66.67%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.creation-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Do NOT scale up images - use max dimensions */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* Preserve original image quality by not upscaling */
    image-rendering: crisp-edges;
}

.creation-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.creation-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.creation-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.creation-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.creation-description:empty {
    display: none;
}

.creation-description::before {
    content: '';
}

/* ===========================
   Footer Styles
   =========================== */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .header-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-section {
        flex-direction: column;
        gap: 0.75rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .nav-container {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .nav-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .main-content {
        margin: 1rem auto;
    }

    .container {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .creations-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .creation-card:hover {
        transform: translateY(-4px);
    }

    .creation-name {
        font-size: 1.1rem;
    }

    .creation-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }

    .site-tagline {
        font-size: 0.9rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-button {
        width: 100%;
        text-align: center;
    }

    .creations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ===========================
   Details Page
   =========================== */
.back-link {
    text-decoration: none;
    display: inline-block;
}

.details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
    animation: fadeIn 0.5s ease-in;
}

.details-image-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.details-nav-circle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    color: #667eea;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
    padding-bottom: 6px; /* optical centering for the chevron glyphs */
}

.details-nav-circle.prev { left: 14px; }
.details-nav-circle.next { right: 14px; }

.details-nav-circle:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.details-nav-circle:disabled {
    opacity: 0.3;
    cursor: default;
}

@media (max-width: 768px) {
    .details-nav-circle {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }

    .details-nav-circle.prev { left: 8px; }
    .details-nav-circle.next { right: 8px; }
}

.details-image {
    max-width: 100%;
    max-height: 560px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.details-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.details-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.details-description {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

.details-description.is-fallback {
    color: #999;
    font-style: italic;
}

.details-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.details-order {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 14px;
}

.details-order-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.details-order p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.details-order a {
    color: #667eea;
    font-weight: 600;
}

.details-order-button {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
}

.details-order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.45);
}

@media (max-width: 768px) {
    .details-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .details-title {
        font-size: 1.6rem;
    }

    .details-image {
        max-height: 420px;
    }
}
