/* Scentiora E-Catalog Viewer */

body.ecatalog-page {
    background: #1a1228;
}

.ecatalog-app {
    margin-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(232, 83, 58, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(60, 191, 176, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #1f1635 0%, #120c22 100%);
}

.ecatalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem var(--site-gutter);
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent-yellow), var(--accent-teal)) 1;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 50;
}

.ecatalog-toolbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.ecatalog-toolbar-brand img {
    height: 42px;
    width: auto;
    flex-shrink: 0;
}

.ecatalog-toolbar-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin: 0;
}

.ecatalog-toolbar-text p {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.ecatalog-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ecatalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid rgba(45, 22, 87, 0.12);
    border-radius: 50px;
    background: #fff;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ecatalog-btn:hover:not(:disabled) {
    background: var(--tertiary);
    border-color: rgba(232, 83, 58, 0.25);
    color: var(--primary);
}

.ecatalog-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ecatalog-btn--primary {
    background: linear-gradient(135deg, var(--primary), #F07A30);
    border-color: transparent;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(232, 83, 58, 0.35);
}

.ecatalog-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.ecatalog-page-indicator {
    min-width: 5.5rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
    padding: 0 0.5rem;
}

.ecatalog-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.ecatalog-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent-teal));
    transition: width 0.35s ease;
}

.ecatalog-stage-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem var(--site-gutter) 1rem;
    position: relative;
}

.ecatalog-stage {
    position: relative;
    width: min(100%, 920px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.ecatalog-nav-side {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ecatalog-nav-side:hover:not(:disabled) {
    background: rgba(232, 83, 58, 0.85);
    transform: scale(1.05);
}

.ecatalog-nav-side:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.ecatalog-page-frame {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 4;
    max-height: calc(100vh - 220px);
}

.ecatalog-page-frame.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: ecatalog-shimmer 1.2s infinite;
}

@keyframes ecatalog-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ecatalog-page-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ecatalog-page-img.is-visible {
    opacity: 1;
}

.ecatalog-thumbs {
    padding: 0 var(--site-gutter) 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.ecatalog-thumbs-inner {
    display: flex;
    gap: 0.65rem;
    min-width: min-content;
    padding-bottom: 0.25rem;
}

.ecatalog-thumb {
    flex-shrink: 0;
    width: 72px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    padding: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ecatalog-thumb img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}

.ecatalog-thumb:hover {
    transform: translateY(-2px);
}

.ecatalog-thumb.is-active {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(232, 83, 58, 0.45);
}

.ecatalog-thumb-num {
    display: block;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.2rem 0;
    background: rgba(0, 0, 0, 0.35);
}

.ecatalog-footer-note {
    text-align: center;
    padding: 0 1rem 1.25rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.ecatalog-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 1.5rem;
}

.ecatalog-empty i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.ecatalog-app.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    margin-top: 0;
    min-height: 100vh;
}

.ecatalog-app.is-fullscreen .ecatalog-toolbar {
    top: 0;
}

.ecatalog-app.is-fullscreen .ecatalog-page-frame {
    max-height: calc(100vh - 220px);
}

@media (max-width: 900px) {
    .ecatalog-toolbar-brand img {
        height: 34px;
    }

    .ecatalog-toolbar-text h1 {
        font-size: 1rem;
    }

    .ecatalog-nav-side {
        display: none;
    }

    .ecatalog-page-frame {
        max-height: calc(100vh - 240px);
    }

    .ecatalog-btn span.ecatalog-btn-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .ecatalog-toolbar {
        padding: 0.75rem 1rem;
    }

    .ecatalog-controls {
        width: 100%;
        justify-content: space-between;
    }
}
