/* ==========================================================================
   ShowMyAura Professional v4.3.1 - Public Styles
   Modern Portfolio Gallery with 12 Layouts
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES & THEME
   ========================================================================== */
:root {
    --sma-primary: #3b82f6;
    --sma-secondary: #8b5cf6;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --sma-bg: #ffffff;
    --sma-bg-alt: #f8fafc;
    --sma-text: #0f172a;
    --sma-text-muted: #64748b;
    --sma-border: #e2e8f0;
    --sma-radius: 12px;
    --sma-radius-lg: 20px;
    --sma-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    --sma-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --scroll-speed: 3s;
}

/* Dark Theme */
.sma-gallery-wrap.theme-dark {
    --sma-bg: #0f172a;
    --sma-bg-alt: #1e293b;
    --sma-text: #f1f5f9;
    --sma-text-muted: #94a3b8;
    --sma-border: #334155;
}

/* ==========================================================================
   2. BASE GALLERY WRAP
   ========================================================================== */
.sma-gallery-wrap {
    width: 100%;
    position: relative;
    margin: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--sma-text);
    background: var(--sma-bg);
    padding: 40px;
    border-radius: var(--sma-radius-lg);
    box-shadow: var(--sma-shadow);
}

.sma-gallery-wrap * {
    box-sizing: border-box;
}

/* ==========================================================================
   3. WAVY CURTAIN GRADIENT SHIELD ANIMATION (On HOVER)
   ========================================================================== */
.gradient-shield {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    z-index: 2;
    opacity: 0.25;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* On hover: increase opacity, then animate away with wavy effect */
.sma-card:hover .gradient-shield,
.sma-download-card:hover .gradient-shield,
.hover-scroll:hover .gradient-shield {
    opacity: 0.65;
    animation: wavyCurtainAway 1s ease-in-out forwards;
}

/* Wavy Glassy Curtain Animation */
@keyframes wavyCurtainAway {
    0% {
        opacity: 0.65;
        transform: perspective(1000px) translateX(0) skewX(0deg);
        filter: blur(0px);
    }
    30% {
        opacity: 0.5;
        transform: perspective(1000px) translateX(30%) skewX(-8deg);
        filter: blur(2px);
    }
    60% {
        opacity: 0.3;
        transform: perspective(1000px) translateX(70%) skewX(-12deg);
        filter: blur(5px);
    }
    100% {
        opacity: 0;
        transform: perspective(1000px) translateX(100%) skewX(-18deg);
        filter: blur(8px);
    }
}

/* Reset animation when not hovering */
.sma-card:not(:hover) .gradient-shield,
.sma-download-card:not(:hover) .gradient-shield {
    animation: none;
    opacity: 0.25;
}

/* ==========================================================================
   4. HOVER SCROLL FOR TALL IMAGES
   ========================================================================== */
.hover-scroll {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.sma-img-scroller {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    transition: background-position var(--scroll-speed) ease-in-out, transform 0.6s ease;
}

/* Hover scroll effect */
.hover-scroll:hover .sma-img-scroller {
    background-position: bottom center;
    transform: scale(1.03);
}

/* ==========================================================================
   5. THEME TOGGLE
   ========================================================================== */
.sma-theme-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.sma-theme-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--sma-bg-alt);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--sma-transition);
    color: var(--sma-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sma-theme-btn:hover,
.sma-theme-btn.active {
    background: var(--gradient);
    color: #fff;
}

/* ==========================================================================
   6. CATEGORY FILTERS
   ========================================================================== */
.sma-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.sma-cat-btn {
    background: transparent;
    border: 2px solid var(--sma-border);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--sma-transition);
    color: var(--sma-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sma-cat-btn:hover {
    border-color: var(--sma-primary);
    color: var(--sma-primary);
}

.sma-cat-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   7. MEDIA BOX
   ========================================================================== */
.sma-media-box {
    position: relative;
    overflow: hidden;
    background: var(--sma-bg-alt);
    height: 100%;
    width: 100%;
    display: block;
}

.sma-media-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sma-audio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--sma-text-muted);
    font-size: 40px;
    background: var(--sma-bg-alt);
}

.sma-audio-placeholder span {
    font-size: 14px;
    margin-top: 10px;
}

/* ==========================================================================
   8. OVERLAY
   ========================================================================== */
.sma-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    cursor: pointer;
    z-index: 3;
}

.sma-card:hover .sma-overlay {
    opacity: 1;
}

.sma-overlay-content h3 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.sma-btn-glass {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sma-card:hover .sma-overlay-content h3,
.sma-card:hover .sma-btn-glass {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   9. LAYOUT: MODERN GRID
   ========================================================================== */
.layout-grid .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 28px;
}

.layout-grid .sma-card {
    border-radius: var(--sma-radius-lg);
    height: 380px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
}

.layout-grid .sma-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* ==========================================================================
   10. LAYOUT: SMART MASONRY
   ========================================================================== */
.layout-masonry .sma-items-container {
    columns: var(--cols, 3);
    column-gap: 30px;
}

.layout-masonry .sma-card {
    break-inside: avoid;
    margin-bottom: 30px;
    border-radius: 24px;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    background: var(--sma-bg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.layout-masonry .sma-media-box {
    height: 320px;
    min-height: 320px;
}

.layout-masonry .sma-card:nth-child(3n+1) .sma-media-box {
    height: 400px;
}

.layout-masonry .sma-card:nth-child(4n+2) .sma-media-box {
    height: 280px;
}

.layout-masonry .sma-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ==========================================================================
   11. LAYOUT: SWIPE SLIDER
   ========================================================================== */
.layout-slider .swiper {
    padding-bottom: 70px;
}

.layout-slider .sma-slider-card {
    display: flex;
    flex-direction: column;
    background: var(--sma-bg);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    box-shadow: var(--sma-shadow);
    height: 100%;
}

.layout-slider .sma-media-box {
    height: 280px;
}

.layout-slider .sma-slider-info {
    padding: 30px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.layout-slider .sma-slider-info h3 {
    font-size: 22px;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--sma-text);
}

.layout-slider .sma-desc-clamp {
    font-size: 14px;
    color: var(--sma-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sma-view-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    align-self: center;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sma-view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Slider Navigation */
.swiper-button-prev,
.swiper-button-next {
    width: 44px !important;
    height: 44px !important;
    background: var(--sma-bg);
    border-radius: 50%;
    box-shadow: var(--sma-shadow);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    display: none !important;
}

.swiper-button-prev i,
.swiper-button-next i {
    color: var(--sma-text);
    font-size: 16px;
}

.swiper-pagination-bullet {
    background: var(--sma-border) !important;
}

.swiper-pagination-bullet-active {
    background: var(--sma-primary) !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* ==========================================================================
   12. LAYOUT: SPLIT VIEW (Fixed Hover Scroll)
   ========================================================================== */
.layout-split .sma-split-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    min-height: 70vh;
}

.layout-split .sma-split-hero {
    position: relative;
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    background: var(--sma-bg-alt);
}

.layout-split .sma-split-hero .sma-media-box {
    height: 100%;
}

.layout-split .sma-split-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 8px;
    max-height: 70vh;
}

.layout-split .sma-split-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--sma-bg-alt);
    border-radius: var(--sma-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
}

.layout-split .sma-split-item:hover,
.layout-split .sma-split-item.active {
    border-color: var(--sma-primary);
    background: var(--sma-bg);
    transform: translateX(-5px);
}

.layout-split .sma-split-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.layout-split .sma-split-thumb .sma-img-scroller {
    background-size: cover;
    background-position: center;
}

/* Split view hover scroll - this is the fix */
.layout-split .sma-split-item:hover .sma-split-thumb .sma-img-scroller {
    transform: scale(1.1);
}

.layout-split .sma-split-content {
    flex: 1;
    min-width: 0;
}

.layout-split .sma-split-content h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sma-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-split .sma-split-cat {
    font-size: 12px;
    color: var(--sma-primary);
    font-weight: 500;
}

/* ==========================================================================
   13. LAYOUT: CINEMATIC REVEAL
   ========================================================================== */
.layout-cinematic .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.layout-cinematic .sma-card {
    position: relative;
    width: 100%;
    height: 70vh;
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.layout-cinematic .sma-media-box {
    height: 100%;
}

.layout-cinematic .sma-cinematic-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 100%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 4;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, transparent 100%);
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout-cinematic .sma-card:hover .sma-cinematic-content {
    opacity: 1;
    transform: translateX(0);
}

.sma-cinematic-cat {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sma-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sma-cinematic-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}

.sma-cinematic-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
}

/* ==========================================================================
   14. LAYOUT: CASE STUDY (ZIGZAG)
   ========================================================================== */
.layout-zigzag {
    background: var(--sma-bg-alt);
    border-radius: 0;
    padding: 80px 0;
    margin: 0;
}

.layout-zigzag .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.layout-zigzag .sma-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

.layout-zigzag .sma-card:nth-child(even) {
    flex-direction: row-reverse;
}

.layout-zigzag .sma-media-box {
    flex: 1.2;
    height: 500px;
    border-radius: var(--sma-radius-lg);
    box-shadow: var(--sma-shadow);
}

.layout-zigzag .sma-zigzag-info {
    flex: 1;
    background: var(--sma-bg);
    padding: 40px;
    border-radius: var(--sma-radius-lg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.sma-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.layout-zigzag .sma-zigzag-info h3 {
    font-size: 36px;
    margin: 0 0 15px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--sma-text);
}

.sma-desc-clip {
    font-size: 16px;
    color: var(--sma-text-muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

/* ==========================================================================
   15. LAYOUT: ELEGANT FRAMED
   ========================================================================== */
.layout-framed {
    background: var(--sma-bg-alt);
    padding: 50px 40px;
    border-radius: var(--sma-radius-lg);
}

.layout-framed .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 60px;
}

.layout-framed .sma-card {
    border: 20px solid var(--sma-bg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    background: var(--sma-bg);
    height: 500px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: hidden;
}

.layout-framed .sma-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.18);
}

/* ==========================================================================
   16. LAYOUT: MUSEUM WALL
   ========================================================================== */
.layout-museum .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding: 2rem 0;
}

.layout-museum .sma-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: transparent;
    box-shadow: none;
}

.layout-museum .sma-card:nth-child(even) {
    direction: rtl;
}

.layout-museum .sma-card:nth-child(even) > * {
    direction: ltr;
}

.layout-museum .sma-media-box {
    height: 500px;
    border: 15px solid var(--sma-bg-alt);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1), 0 20px 50px rgba(0,0,0,0.15);
}

.layout-museum .sma-museum-content {
    padding: 2rem;
}

.layout-museum .sma-museum-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--sma-text);
}

.sma-museum-desc {
    color: var(--sma-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ==========================================================================
   17. LAYOUT: BENTO BOX
   ========================================================================== */
.layout-bento .sma-items-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 280px;
}

.layout-bento .sma-card {
    border-radius: var(--sma-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.layout-bento .sma-card:nth-child(4n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

.layout-bento .sma-card:hover {
    transform: scale(1.03);
    z-index: 2;
}

/* ==========================================================================
   18. LAYOUT: FANNED DECK CAROUSEL
   ========================================================================== */
.layout-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
}

.theme-dark .layout-carousel {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.layout-carousel .swiper {
    width: 300px;
    height: 420px;
    margin: 0 auto;
}

.layout-carousel .sma-card {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: var(--sma-bg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.layout-carousel .sma-overlay {
    border-radius: 20px;
}

/* Mobile fix: Categories should be above carousel */
@media (max-width: 768px) {
    .layout-carousel {
        flex-direction: column;
        min-height: auto;
        padding: 20px 0;
    }
    
    .layout-carousel .sma-category-filters {
        order: -1;
        margin-bottom: 20px;
        position: relative;
        z-index: 10;
    }
    
    .layout-carousel .swiper {
        width: 280px;
        height: 380px;
    }
}

/* ==========================================================================
   19. LAYOUT: SPOTLIGHT
   ========================================================================== */
.layout-spotlight .sma-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.layout-spotlight .sma-card {
    aspect-ratio: 1;
    position: relative;
    border-radius: var(--sma-radius);
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.4s ease, transform 0.4s ease;
}

.layout-spotlight .sma-items-container:has(.sma-card:hover) .sma-card:not(:hover) {
    filter: brightness(0.3);
    transform: scale(0.98);
}

/* ==========================================================================
   20. LAYOUT: DOWNLOAD GALLERY
   ========================================================================== */
.layout-download .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
}

.sma-download-card {
    background: var(--sma-bg-alt);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    border: 1px solid var(--sma-border);
    transition: var(--sma-transition);
    position: relative;
}

.sma-download-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sma-shadow);
    border-color: transparent;
}

.sma-download-media {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.sma-download-info {
    padding: 20px;
}

.sma-download-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--sma-text);
}

.sma-download-desc {
    font-size: 13px;
    color: var(--sma-text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Action Buttons - Small & Responsive */
.sma-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sma-dl-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--sma-bg);
    border: 1px solid var(--sma-border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sma-text);
    text-decoration: none;
    cursor: pointer;
    transition: var(--sma-transition);
    flex: 1;
    min-width: 60px;
    max-width: 100px;
}

.sma-dl-action-btn:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.sma-dl-action-btn.sma-upsell-btn {
    opacity: 0.7;
    cursor: not-allowed;
}

.sma-dl-action-btn.sma-upsell-btn:hover {
    opacity: 1;
}

.sma-dl-action-btn i {
    font-size: 12px;
}

/* ==========================================================================
   21. MODAL POPUP
   ========================================================================== */
.sma-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sma-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
}

.sma-modal-content {
    position: relative;
    background: var(--sma-bg);
    border-radius: var(--sma-radius-lg);
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    animation: sma-modal-in 0.3s ease;
}

@keyframes sma-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sma-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.sma-modal-close-btn:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.sma-modal-split {
    display: flex;
    width: 100%;
    height: 90vh;
}

.sma-modal-media-wrap {
    flex: 1.5;
    background: #000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
}

.sma-modal-media {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sma-modal-media img {
    width: 100%;
    height: auto;
    display: block;
}

.sma-modal-media video {
    width: 100%;
    height: auto;
}

.sma-modal-media audio {
    margin-top: 20%;
    width: 80%;
}

.sma-modal-info {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: var(--sma-bg);
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.sma-m-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.3;
    color: var(--sma-text);
}

.sma-m-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--sma-border);
    padding-bottom: 20px;
    font-size: 13px;
    color: var(--sma-text-muted);
}

.sma-m-meta i {
    margin-right: 6px;
    color: var(--sma-primary);
}

.sma-m-tech {
    margin-bottom: 15px;
}

.sma-tech-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--sma-bg-alt);
    border-radius: 20px;
    font-size: 12px;
    margin: 4px 4px 4px 0;
    color: var(--sma-text-muted);
}

.sma-m-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--sma-text-muted);
    margin-bottom: 25px;
}

.sma-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    font-size: 14px;
}

.sma-visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.3);
}

/* Modal Action Buttons - Small & Responsive */
.sma-m-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.sma-action-btn {
    flex: 1;
    background: var(--sma-bg-alt);
    border: 1px solid var(--sma-border);
    padding: 12px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: var(--sma-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: var(--sma-transition);
    text-decoration: none;
}

.sma-action-btn:hover {
    border-color: var(--sma-primary);
    background: var(--sma-bg);
}

.sma-action-btn i {
    font-size: 16px;
}

.sma-like-btn.liked {
    color: #ef4444;
    border-color: #ef4444;
}

.sma-free-upsell {
    background: #fffbeb;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    color: #92400e;
}

.theme-dark .sma-free-upsell {
    background: #422006;
    color: #fef3c7;
}

/* ==========================================================================
   22. BACKLINK
   ========================================================================== */
.sma-backlink {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 11px;
    color: var(--sma-text-muted);
    text-decoration: none;
    opacity: 0.6;
    transition: 0.3s;
}

.sma-backlink:hover {
    opacity: 1;
    color: var(--sma-primary);
}

/* ==========================================================================
   23. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .sma-gallery-wrap {
        padding: 25px;
    }
    
    .layout-grid .sma-items-container,
    .layout-download .sma-items-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .layout-bento .sma-items-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .layout-zigzag .sma-card,
    .layout-zigzag .sma-card:nth-child(even) {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .layout-zigzag .sma-media-box {
        height: 400px;
        width: 100%;
    }
    
    .layout-split .sma-split-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .layout-split .sma-split-hero {
        height: 50vh;
    }
    
    .layout-split .sma-split-list {
        max-height: none;
    }
    
    .layout-museum .sma-card,
    .layout-museum .sma-card:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .sma-modal-split {
        flex-direction: column;
    }
    
    .sma-modal-media-wrap {
        height: 40vh;
        flex: none;
    }
    
    .sma-modal-info {
        width: 100%;
        min-width: auto;
    }
    
    .layout-cinematic .sma-cinematic-content {
        width: 100%;
        padding: 2rem;
    }
    
    .sma-cinematic-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .sma-gallery-wrap {
        padding: 15px;
        margin: 20px 0;
    }
    
    .sma-category-filters {
        gap: 8px;
    }
    
    .sma-cat-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .layout-grid .sma-items-container,
    .layout-download .sma-items-container {
        grid-template-columns: 1fr !important;
    }
    
    .layout-grid .sma-card {
        height: 320px;
    }
    
    .layout-masonry .sma-items-container {
        columns: 1;
    }
    
    .layout-framed .sma-items-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .layout-framed .sma-card {
        height: 300px;
        border-width: 8px;
    }
    
    .layout-bento .sma-items-container {
        grid-template-columns: 1fr;
    }
    
    .layout-bento .sma-card {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: 250px;
    }
    
    .layout-slider .sma-slider-card {
        width: 100% !important;
    }
    
    .layout-slider .sma-media-box {
        height: 220px;
    }
    
    .layout-zigzag .sma-zigzag-info h3 {
        font-size: 28px;
    }
    
    .sma-modal-content {
        max-height: 95vh;
        border-radius: 0;
    }
    
    .sma-modal-info {
        padding: 25px;
    }
    
    .sma-m-title {
        font-size: 22px;
    }
    
    .sma-m-actions {
        flex-direction: row;
    }
    
    .sma-action-btn {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    /* Download gallery buttons */
    .sma-download-actions {
        gap: 6px;
    }
    
    .sma-dl-action-btn {
        padding: 6px 10px;
        font-size: 10px;
        min-width: 50px;
    }
    
    .sma-dl-action-btn i {
        font-size: 10px;
    }
}

/* ==========================================================================
   24. UTILITY CLASSES
   ========================================================================== */
.sma-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
}

.sma-empty {
    padding: 40px;
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
}
