.portfolio-section {
    padding-top: 0;
    padding-bottom: 80px;
}

.viewer-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0 !important;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

.viewer-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-height: none;
}

[dir="rtl"] .viewer-container {
    margin-left: 0;
    margin-right: 0;
}

.project-details-sidebar {
    position: sticky;
    top: 100px;
}

.detail-spec-box {
    background: var(--white-accent);
    border-radius: 16px;
    padding: 24px;
}

.category-card-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 10;
}

.category-nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.category-nav-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
    transform: scale(1.1);
}

.viewer-actions {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    width: auto;
    max-width: 90vw;
}

.viewer-actions-row {
    flex-wrap: wrap;
    justify-content: center;
}

.viewer-actions .btn {
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    border-width: 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.viewer-actions .btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
}

.viewer-actions .btn-outline-light:hover {
    background: #fff;
    color: #000 !important;
    border-color: #fff;
}

.viewer-actions .btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.category-360-btn {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 10;
}

.thumb-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-item {
    width: 80px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumb-item.active,
.thumb-item:hover {
    opacity: 1;
    border-color: var(--brand-primary);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[dir="rtl"] .category-card-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .category-360-btn {
    right: auto;
    left: 24px;
}

@media (max-width: 991.98px) {
    .portfolio-section {
        padding-top: 100px;
    }

    .project-details-sidebar {
        position: static;
        margin-top: 2rem;
    }

    .category-card {
        height: 400px;
    }
}

/* Viewer actions row */
[dir="rtl"] .viewer-actions-row .btn:has(.fa-arrow-left) i {
    transform: scaleX(-1);
}

/* Details modal spacing */
#detailsModal .modal-body .product-spec-box {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
}

@media (max-width: 575.98px) {
    .category-card {
        height: 300px;
    }

    .category-overlay {
        padding: 1.5rem !important;
    }

    .category-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}
