/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
    color: #888;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Expired */
.expired-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    text-align: center;
    gap: 12px;
}

.expired-icon {
    font-size: 64px;
    margin-bottom: 8px;
}

.expired-container h1 {
    font-size: 24px;
    font-weight: 700;
}

.expired-container p {
    color: #666;
    font-size: 16px;
    max-width: 320px;
}

/* Header */
.gallery-header {
    padding: 28px 20px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.brand-logo {
    margin-bottom: 8px;
}

.brand-logo img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.business-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Hero */
.hero-section {
    width: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    max-height: 50vh;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-image.loaded {
    opacity: 1;
}

/* Customer Name */
.customer-section {
    padding: 24px 20px 8px;
    text-align: center;
}

.customer-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

/* CTA Buttons */
.cta-section {
    padding: 16px 20px 24px;
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button-secondary {
    background: #16a34a;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.cta-button-secondary:hover {
    background: #15803d;
}

/* Color Sections */
.color-sections {
    padding: 0 0 40px;
}

.color-section {
    margin-bottom: 32px;
}

.color-section-header {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    padding: 0 20px 12px;
    border-bottom: 2px solid #f0f0f0;
    margin: 0 20px 16px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 6px;
}

@media (min-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 8px;
    }
}

@media (min-width: 900px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 0 20px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.photo-card img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Footer */
.gallery-footer {
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    color: #999;
    font-size: 13px;
}

/* ===================== */
/* LIGHTBOX              */
/* ===================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-image-container {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 50%;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

/* Touch-friendly lightbox on mobile */
@media (max-width: 600px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 6px 12px;
    }

    .lightbox-close {
        font-size: 30px;
        top: 12px;
        right: 12px;
    }
}
