/* ==========================================================================
   VIEW TOGGLE STYLES
   ========================================================================== */

.view-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.view-label.active {
    color: var(--text-main);
    font-weight: 500;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-main);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--border-color); /* Kept subtle */
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Base styles for Dynamic Netflix Layout Injection */
.categorized-view-container {
    width: 100%;
}

/* Inherits .photo-category-row from photography.css dynamically if needed,
   or we can redefine lightweight versions here to ensure isolation if photography.css isn't loaded */

.cat-row {
    margin-bottom: 3rem;
    position: relative;
}

.cat-header {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.cat-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.cat-card {
    flex: 0 0 auto;
    width: 300px;
    height: 400px;
    scroll-snap-align: start;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--bg-card);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .cat-card {
        width: 240px;
        height: 320px;
    }
}

.cat-card:hover {
    transform: scale(1.02);
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.cat-card:hover img {
    opacity: 0.9;
}