/* ==========================================================================
   Grannis & Orme Shopping Center — Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base / Global
   -------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Custom Scrollbar
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

/* --------------------------------------------------------------------------
   Animations / Keyframes
   -------------------------------------------------------------------------- */

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 200px;
    }
    to {
        opacity: 0;
        max-height: 0;
    }
}

/* Flash messages */
.flash-message {
    animation: slideDown 0.3s ease-out forwards;
}

.flash-message.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}

/* --------------------------------------------------------------------------
   Store Card Hover Effects
   -------------------------------------------------------------------------- */

.store-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
                0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.store-card img {
    transition: transform 0.3s ease;
}

.store-card:hover img {
    transform: scale(1.05);
}

/* Line clamp for taglines */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Photo Gallery / Lightbox
   -------------------------------------------------------------------------- */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    background: none;
    border: none;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    z-index: 10000;
}

.lightbox-nav:hover {
    opacity: 0.7;
}

.lightbox-nav.prev {
    left: 1rem;
}

.lightbox-nav.next {
    right: 1rem;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */

@media print {
    /* Hide non-essential elements */
    header,
    footer,
    nav,
    #admin-sidebar,
    #sidebar-overlay,
    .flash-message,
    .no-print,
    button,
    .lightbox-overlay {
        display: none !important;
    }

    /* Reset backgrounds and colors for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    /* Ensure content fills the page */
    main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Store cards — stack vertically */
    .store-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }

    /* Links show URLs */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
