/* ====================================================================
   3D Design Gallery Styles
   ==================================================================== */

:root {
    --gallery-primary: #0c542c;
    --gallery-accent: #f9a014;
    --gallery-dark: #252638;
    --gallery-light: #FAF5F2;
    --gallery-card-bg: rgba(255, 255, 255, 0.85);
    --gallery-glass-border: rgba(255, 255, 255, 0.4);
    --gallery-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --gallery-shadow-hover: 0 30px 60px rgba(12, 84, 44, 0.2);
}

/* 3D View Toggles */
.gallery-controls-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-view-toggle {
    display: flex;
    background: rgba(12, 84, 44, 0.06);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid rgba(12, 84, 44, 0.1);
    backdrop-filter: blur(10px);
}

.gallery-view-toggle .view-btn {
    background: transparent;
    border: none;
    color: #555;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-view-toggle .view-btn.active {
    background: var(--gallery-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(12, 84, 44, 0.3);
}

.gallery-view-toggle .view-btn i {
    font-size: 16px;
}

/* Category Filters Enhancement */
.filters-3d {
    margin: 0;
}

.filters-3d .filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters-3d .filter-tabs li {
    background: #fff;
    color: #2B2D42;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.filters-3d .filter-tabs li.active,
.filters-3d .filter-tabs li:hover {
    background: var(--gallery-accent);
    color: #fff;
    border-color: var(--gallery-accent);
    box-shadow: 0 4px 12px rgba(249, 160, 20, 0.3);
}

/* View Sections Wrapper */
.gallery-views-container {
    position: relative;
    width: 100%;
}

.gallery-view-section {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ====================================================================
   1. 3D GRID STYLES
   ==================================================================== */
.grid-3d-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    perspective: 1500px;
    transform-style: preserve-3d;
}

@media (max-width: 991px) {
    .grid-3d-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 767px) {
    .grid-3d-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.gallery-card-3d-wrap {
    perspective: 1000px;
    height: 380px;
    border-radius: 16px;
}

.gallery-card-3d {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    transform-style: preserve-3d;
    transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease;
    box-shadow: var(--gallery-shadow);
    background: #fff;
    overflow: hidden;
}

.gallery-card-3d:hover {
    box-shadow: var(--gallery-shadow-hover);
}

/* Parallax Inner Image Block */
.card-image-box {
    position: absolute;
    width: 110%;
    height: 110%;
    left: -5%;
    top: -5%;
    transform-style: preserve-3d;
    transform: translateZ(10px) scale(1.05);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Card Shine / Reflection Layer */
.card-shine-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-card-3d:hover .card-shine-overlay {
    opacity: 1;
}

/* Floating Glassmorphic Details Overlay */
.card-info-glass {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    z-index: 4;
    transform: translateZ(40px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.gallery-card-3d:hover .card-info-glass {
    background: rgba(12, 84, 44, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateZ(60px);
}

.card-info-glass .tag-line {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gallery-accent);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    display: inline-block;
}

.card-info-glass h4 {
    font-size: 20px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
    font-family: 'Cormorant', serif;
    transition: color 0.3s;
}

.card-info-glass p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    margin-bottom: 0;
}

.gallery-card-3d:hover .card-info-glass p {
    color: rgba(255, 255, 255, 0.9);
}

/* Zoom Hover Action Button */
.card-3d-action {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    z-index: 4;
    transform: translateZ(35px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-card-3d:hover .card-3d-action {
    opacity: 1;
    transform: translateZ(50px) scale(1);
}

.card-3d-action:hover {
    background: var(--gallery-accent);
    color: #fff;
    box-shadow: 0 5px 15px rgba(249, 160, 20, 0.4);
    border-color: var(--gallery-accent);
}

/* ====================================================================
   2. 3D COVERFLOW CAROUSEL STYLES
   ==================================================================== */
.carousel-3d-wrapper {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at center, rgba(12, 84, 44, 0.08) 0%, rgba(250, 245, 242, 0) 70%);
    padding: 40px 0;
    border-radius: 20px;
    overflow: hidden;
}

.carousel-3d-container {
    position: relative;
    width: 100%;
    height: 480px;
    margin: 0 auto;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-y;
}

.carousel-3d-viewport {
    position: relative;
    width: 320px;
    height: 400px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-3d-item {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, filter 0.5s ease;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: pointer;
    background: #fff;
}

.carousel-3d-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.carousel-3d-item .item-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 30px 20px 20px;
    color: #fff;
    transform: translateZ(20px);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.carousel-3d-item.active .item-details {
    opacity: 1;
}

.carousel-3d-item .item-details h4 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 5px;
}

.carousel-3d-item .item-details p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 0;
}

.carousel-3d-item.active {
    box-shadow: 0 25px 60px rgba(12, 84, 44, 0.35);
    z-index: 10;
}

/* 3D Carousel Controls */
.carousel-3d-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 30px;
}

.carousel-nav-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--gallery-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.carousel-nav-btn:hover {
    background: var(--gallery-primary);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(12, 84, 44, 0.25);
}

.carousel-nav-btn:active {
    transform: scale(0.95);
}

/* Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(12, 84, 44, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    width: 28px;
    border-radius: 10px;
    background: var(--gallery-primary);
}

/* Dragging indicator overlay */
.carousel-instructions {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 15px;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.carousel-instructions i {
    animation: dragSwipe 1.8s infinite ease-in-out;
}

@keyframes dragSwipe {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-6px); }
}

/* Lightbox Trigger inside Carousel */
.carousel-lightbox-trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-primary);
    font-size: 16px;
    z-index: 12;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.carousel-3d-item.active:hover .carousel-lightbox-trigger {
    opacity: 1;
    transform: scale(1);
}

.carousel-lightbox-trigger:hover {
    background: var(--gallery-accent);
    color: #fff;
    box-shadow: 0 5px 15px rgba(249, 160, 20, 0.4);
}
