/* =================================================================
   NAIL IMAGES GALLERY - Premium Styling for Nail & Fashion Services
   v2.0.0 - Modern, Elegant Design
================================================================= */

:root {
    --nail-primary: #1a1a1a;
    --nail-secondary: #c9a961;
    --nail-accent: #d4af37;
    --nail-light: #f5f5f5;
    --nail-dark: #0a0a0a;
    --nail-text: #333333;
    --nail-border: #e0e0e0;
    --nail-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================================================================
   RESET & BASE STYLES
================================================================= */

.nail-hero-banner,
.nail-hero-banner * {
    box-sizing: border-box;
}

/* =================================================================
   HERO BANNER SECTION
================================================================= */

.nail-hero-banner {
    position: relative;
    width: 100%;
    min-height: 650px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background-blend-mode: overlay;
}

.nail-hero-banner * {
    box-sizing: border-box;
}

/* Dark Gradient Overlay - More elegant */
.nail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(26, 26, 26, 0.4) 0%,
            rgba(26, 26, 26, 0.5) 50%,
            rgba(10, 10, 10, 0.6) 100%);
    z-index: 1;
    backdrop-filter: blur(0.5px);
}

/* Decorative Elements */
.nail-hero-decoration {
    position: absolute;
    z-index: 0;
}

.nail-hero-deco-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 8s ease-in-out infinite;
}

.nail-hero-deco-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(30px) rotate(5deg);
    }
}

/* Content Wrapper */
.nail-hero-wrapper {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 100px 50px;
    text-align: center;
    color: #ffffff;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Tag */
.nail-hero-tag {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--nail-secondary);
    margin-bottom: 25px;
    font-weight: 700;
    opacity: 1;
    animation: slideInDown 0.8s ease-out;
}

/* Hero Title */
.nail-hero-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 76px;
    line-height: 1.15;
    font-weight: 900;
    margin: 30px 0;
    color: #ffffff;
    letter-spacing: -2px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    animation: slideInDown 1s ease-out 0.1s backwards;
}

/* Divider Line */
.nail-hero-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--nail-secondary), transparent);
    margin: 35px auto;
    opacity: 1;
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

/* Hero Subtitle */
.nail-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 30px 0 50px;
    font-weight: 300;
    letter-spacing: 1.5px;
    animation: slideInUp 0.8s ease-out 0.3s backwards;
}

/* Hero Button */
.nail-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    border: 2.5px solid var(--nail-secondary);
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: var(--nail-transition);
    cursor: pointer;
    border-radius: 2px;
    animation: slideInUp 0.8s ease-out 0.4s backwards;
}

.nail-hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--nail-secondary);
    z-index: -1;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nail-hero-btn:hover::before {
    left: 0;
}

.nail-hero-btn:hover {
    color: var(--nail-primary);
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.3);
    transform: translateY(-2px);
}

.nail-hero-btn-icon {
    width: 20px;
    height: 20px;
    animation: bounce 2.5s ease-in-out infinite;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* ===== Default (DESKTOP) ===== */
.nail-lightbox-slider {
    display: none;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .nail-lightbox-single {
        display: none !important;
    }

    .nail-lightbox-slider {
        display: flex;
        width: 300%;
        transform: translateX(-100%);
        transition: transform .25s ease;
        will-change: transform;
    }

    .nail-lightbox-prev,
    .nail-lightbox-next {
        display: none !important;
    }


    .nail-lightbox-slider .slide {
        width: 100%;
        flex-shrink: 0;
        max-height: 80vh;
        object-fit: contain;
        user-select: none;
        pointer-events: none;
    }

    .nail-lightbox-viewport {
        width: 100%;
        max-width: 90vw;
        height: 80vh;
        overflow: hidden;
        position: relative;
        margin: 0 auto;
    }
}

/* =================================================================
   GALLERY SECTION
================================================================= */

.nail-gallery-section {
    padding: 80px 0;
    background: #ffffff;
    position: relative;
    width: auto;
    max-width: none;
    margin: 0;
    user-select: none;
    /* Prevent text selection during swipe */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: opacity 0.3s ease-in-out;
}

/* Re-enable text selection for interactive elements */
.nail-gallery-section .nail-gallery-item,
.nail-gallery-section .nail-gallery-pagination a,
.nail-gallery-section .nail-gallery-pagination span {
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}

.nail-gallery-container {
    width: 100%;
    max-width: 1200px;
    /* similar to Bootstrap container */
    margin: 0 auto;
    padding: 0 20px;
}

/* Gallery Header */
.nail-gallery-header {
    text-align: center;
    margin-bottom: 70px;
}

.nail-gallery-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--nail-primary);
    margin: 0 0 12px;
    letter-spacing: -1px;
}

.nail-gallery-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--nail-secondary), transparent);
    margin: 0 auto;
}

/* Gallery Grid - square items, responsive columns */
.nail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 50px;
    background: #ffffff;
    padding: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    will-change: transform, opacity;
    touch-action: pan-y pinch-zoom;
    /* Allow vertical scrolling and pinch zoom, but enable horizontal swipe detection */
}

/* Desktop: When there are 1-2 items, keep normal position (top-left) but maintain size */
.nail-gallery-grid .nail-gallery-item-wrapper:only-child {
    grid-column: 1 / 2;
}

.nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2) {
    grid-column: 1 / 2;
}

.nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2)~.nail-gallery-item-wrapper {
    grid-column: 2 / 3;
}

/* Gallery Item Wrapper */
.nail-gallery-item-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--nail-transition);
    opacity: 0;
    animation: fadeInGalleryItem 0.6s ease-out forwards;
    background: #ffffff;
    aspect-ratio: 1 / 1;
    /* square */
}

.nail-gallery-item-wrapper:nth-child(1) {
    animation-delay: 0.1s;
}

.nail-gallery-item-wrapper:nth-child(2) {
    animation-delay: 0.2s;
}

.nail-gallery-item-wrapper:nth-child(3) {
    animation-delay: 0.3s;
}

.nail-gallery-item-wrapper:nth-child(4) {
    animation-delay: 0.4s;
}

.nail-gallery-item-wrapper:nth-child(5) {
    animation-delay: 0.5s;
}

.nail-gallery-item-wrapper:nth-child(6) {
    animation-delay: 0.6s;
}

.nail-gallery-item-wrapper:nth-child(n+7) {
    animation-delay: 0.7s;
}

@keyframes fadeInGalleryItem {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nail-gallery-visible {
    opacity: 1 !important;
}

.nail-gallery-item-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Gallery Item Link */
.nail-gallery-item {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* Image Container */
.nail-gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.nail-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--nail-transition);
}

.nail-gallery-card-title {
    padding: 12px 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nail-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.nail-gallery-pagination {
    margin: 26px 0 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.nail-gallery-pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
}

.nail-gallery-pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    line-height: 34px;
}

.nail-gallery-pagination-item a,
.nail-gallery-pagination-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
    text-decoration: none;
    background: #fff;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

.nail-gallery-pagination-item a:hover {
    border-color: #c9a961;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.nail-gallery-pagination-item.is-active span {
    background: #2271b1 !important;
    color: #fff !important;
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2) !important;
    font-weight: 600;
}

.nail-gallery-pagination-item.ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
}

.nail-gallery-pagination-item.ellipsis span {
    border: none !important;
    background: transparent !important;
    color: #1a1a1a !important;
    cursor: default;
    padding: 0 4px;
    min-width: auto;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    line-height: 1;
}

.nail-gallery-pagination-item.prev a,
.nail-gallery-pagination-item.next a {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Related galleries */
.nail-related-section {
    padding: 40px 0 70px;
    background: #fff;
}

.nail-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.nail-related-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--nail-primary);
}

.nail-related-actions {
    display: flex;
    gap: 8px;
}

.nail-related-nav {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--nail-border);
    background: #fff;
    cursor: pointer;
    transition: var(--nail-transition);
    font-size: 20px;
    line-height: 1;
}

.nail-related-nav:hover {
    border-color: var(--nail-secondary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.nail-related-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.nail-related-track::-webkit-scrollbar {
    height: 8px;
}

.nail-related-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .15);
    border-radius: 999px;
}

.nail-related-card {
    scroll-snap-align: start;
    flex: 0 0 260px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--nail-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .06);
    transition: var(--nail-transition);
}

.nail-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}

.nail-related-card-media {
    height: 160px;
    background: #f0f0f0;
}

.nail-related-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nail-related-card-body {
    padding: 12px 12px 14px;
}

.nail-related-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--nail-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nail-gallery-item:hover .nail-gallery-image {
    transform: scale(1.08);
    filter: brightness(0.7);
}

/* Hover Overlay */
.nail-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--nail-transition);
    z-index: 2;
}

.nail-gallery-item:hover .nail-gallery-overlay {
    opacity: 1;
}

/* Gallery Icon */
.nail-gallery-icon {
    width: 40px;
    height: 40px;
    color: #ffffff;
    stroke-width: 2;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =================================================================
   LIGHTBOX CUSTOMIZATION
================================================================= */

.lb-outerContainer {
    background: var(--nail-dark) !important;
}

.lb-container {
    padding: 0 !important;
    background: transparent !important;
}

.lb-image {
    border-radius: 4px;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.7;
    transition: var(--nail-transition);
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.lb-close {
    color: #ffffff !important;
    opacity: 0.7;
    transition: var(--nail-transition);
}

.lb-close:hover {
    opacity: 1;
}

.lb-dataContainer {
    padding: 20px !important;
    text-align: center;
}

.lb-details {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.lb-caption {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.nail-gallery-item {
    cursor: zoom-in;
    position: relative;
}

.nail-gallery-item.is-zoomed {
    cursor: zoom-out;
    z-index: 50;
}

.nail-gallery-item.is-zoomed img {
    transform: scale(1.8);
    transition: transform 0.35s ease;
}

.nail-gallery-image {
    transition: transform 0.35s ease;
}

.nail-gallery-lightbox-content {
    cursor: grab;
}

.nail-gallery-lightbox-content:active {
    cursor: grabbing;
}

/* =================================================================
   RESPONSIVE DESIGN
================================================================= */

/* Tablet (768px) */
@media (max-width: 1024px) {
    .nail-hero-banner {
        min-height: 550px;
    }

    .nail-hero-title {
        font-size: 56px;
    }

    .nail-hero-subtitle {
        font-size: 18px;
    }

    .nail-hero-wrapper {
        padding: 60px 40px;
    }

    .nail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .nail-gallery-container {
        padding: 0 30px;
    }
}

/* Mobile (768px) */
@media (max-width: 768px) {
    .nail-hero-banner {
        min-height: 400px;
        height: auto;
        background-attachment: scroll !important;
        background-size: cover;
        background-position: center center;
    }

    .nail-hero-wrapper {
        padding: 40px 20px;
        max-width: 100%;
    }

    .nail-hero-title {
        font-size: 40px;
        line-height: 1.2;
        margin: 20px 0;
    }

    .nail-hero-subtitle {
        font-size: 16px;
        margin: 20px 0 30px;
    }

    .nail-hero-tag {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .nail-hero-divider {
        width: 60px;
        height: 3px;
        margin: 20px auto;
    }

    .nail-hero-btn {
        padding: 14px 36px;
        font-size: 12px;
        gap: 8px;
    }

    .nail-hero-btn-icon {
        width: 16px;
        height: 16px;
    }

    .nail-deco-1,
    .nail-deco-2 {
        display: none;
    }

    .nail-gallery-section {
        padding: 60px 0;
        touch-action: pan-y;
        /* Allow both horizontal and vertical panning */
        -webkit-overflow-scrolling: touch;
    }

    .nail-gallery-container {
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .nail-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: auto;
        gap: 10px;
        margin-top: 30px;
        width: 100%;
        box-sizing: border-box;
    }

    .nail-gallery-item-wrapper {
        width: 100% !important;
        aspect-ratio: 1 / 1;
        max-width: 100%;
    }

    /* Mobile 2 columns: when 1 item, keep at first position (top-left) */
    .nail-gallery-grid .nail-gallery-item-wrapper:only-child {
        grid-column: 1 / 2;
    }

    /* Mobile 2 columns: when 2 items, keep normal 2 columns */
    .nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2) {
        grid-column: 1 / 2;
    }

    .nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2)~.nail-gallery-item-wrapper {
        grid-column: 2 / 3;
    }

    .nail-gallery-header {
        margin-bottom: 40px;
    }

    .nail-gallery-title {
        font-size: 20px;
    }

    /* Pagination mobile */
    .nail-gallery-pagination {
        margin: 20px 0 0;
    }

    .nail-gallery-pagination-list {
        gap: 6px;
    }

    .nail-gallery-pagination-item a,
    .nail-gallery-pagination-item span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .nail-gallery-pagination-item.prev a,
    .nail-gallery-pagination-item.next a {
        font-size: 14px;
    }

    /* Lightbox mobile */
    .nail-gallery-lightbox-content {
        max-width: none;
        max-height: none;
        padding: 0;
    }

    .nail-gallery-lightbox-content img {
        max-height: 75vh;
    }

    .nail-gallery-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
    }

    .nail-gallery-lightbox-caption {
        font-size: 12px;
        margin-top: 10px;
    }

    /* Related galleries mobile */
    .nail-related-section {
        padding: 30px 0 50px;
    }

    .nail-related-header {
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .nail-related-title {
        font-size: 16px;
    }

    .nail-related-nav {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .nail-related-card {
        flex: 0 0 220px;
    }

    .nail-related-card-media {
        height: 140px;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .nail-hero-banner {
        min-height: 350px;
        background-attachment: scroll !important;
        background-size: cover;
        background-position: center center;
    }

    .nail-hero-title {
        font-size: 28px;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .nail-hero-tag {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .nail-hero-subtitle {
        font-size: 13px;
        line-height: 1.4;
    }

    .nail-hero-wrapper {
        padding: 30px 15px;
        max-width: 100%;
    }

    .nail-hero-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .nail-hero-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .nail-gallery-section {
        padding: 40px 0;
    }

    .nail-gallery-container {
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
    }

    .nail-gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 25px;
        width: 100%;
    }

    /* Small mobile 1 column: when 1-2 items, keep normal position (top-left) */
    .nail-gallery-grid .nail-gallery-item-wrapper:only-child {
        grid-column: auto;
    }

    .nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2) {
        grid-column: auto;
    }

    .nail-gallery-grid .nail-gallery-item-wrapper:first-child:nth-last-child(2)~.nail-gallery-item-wrapper {
        grid-column: auto;
    }

    .nail-gallery-grid {
        grid-auto-rows: auto;
    }

    .nail-gallery-item-wrapper {
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    .nail-gallery-item-wrapper.is-wide {
        grid-column: span 1;
    }

    .nail-gallery-title {
        font-size: 18px;
    }

    .nail-gallery-header {
        margin-bottom: 30px;
    }

    .nail-gallery-header {
        margin-bottom: 30px;
    }

    /* Pagination small mobile */
    .nail-gallery-pagination {
        margin: 15px 0 0;
    }

    .nail-gallery-pagination-list {
        gap: 4px;
    }

    .nail-gallery-pagination-item a,
    .nail-gallery-pagination-item span {
        min-width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .nail-gallery-pagination-item.prev a,
    .nail-gallery-pagination-item.next a {
        font-size: 13px;
    }

    /* Lightbox small mobile */
    .nail-gallery-lightbox-content {
        max-width: 98vw;
        max-height: 90vh;
        padding: 5px;
    }

    .nail-gallery-lightbox-content img {
        max-height: 80vh;
    }

    .nail-gallery-lightbox-close {
        top: 5px;
        right: 5px;
        font-size: 24px;
    }

    .nail-gallery-lightbox-caption {
        font-size: 11px;
        margin-top: 8px;
    }

    /* Related galleries mobile */
    .nail-related-section {
        padding: 30px 0 50px;
    }

    .nail-related-header {
        margin-bottom: 20px;
    }

    .nail-related-title {
        font-size: 16px;
    }

    /* Related galleries small mobile */
    .nail-related-card {
        flex: 0 0 180px;
    }

    .nail-related-card-media {
        height: 120px;
    }

    .nail-related-card-title {
        font-size: 12px;
    }

    .nail-related-nav {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* ===============================
   CUSTOM LIGHTBOX (SAFE)
================================ */

.nail-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.nail-gallery-lightbox.active {
    display: block;
}

.nail-gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    animation: fadeIn .25s ease;
}

.nail-gallery-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    top: 50%;
    transform: translateY(-50%) scale(.96);
    text-align: center;
    animation: zoomIn .25s ease forwards;
}

.nail-gallery-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.nail-gallery-lightbox-caption {
    margin-top: 12px;
    color: #fff;
    font-size: 14px;
    opacity: .85;
}

.nail-gallery-lightbox-close:hover {
    opacity: 1;
}



@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes zoomIn {
    from {
        transform: translateY(-50%) scale(.9)
    }

    to {
        transform: translateY(-50%) scale(1)
    }
}

/* =====================================================
   FIX HERO BANNER INSIDE FLATSOME CONTENT
   Make banner behave like Flatsome hero
===================================================== */

/* Full width escape from container */
.single-post .nail-hero-banner,
.nail-hero-banner {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

@media (max-width: 768px) {

    .single-post .nail-hero-banner,
    .nail-hero-banner {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Optimal banner height */
.nail-hero-banner {
    min-height: 620px;
    height: 65vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Centered content */
.nail-hero-banner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text doesn't get squeezed */
.nail-hero-wrapper {
    max-width: 1000px;
    width: 100%;
    padding: 80px 50px;
}

/* Title optimal size */
.nail-hero-title {
    font-size: 68px;
    line-height: 1.15;
}

/* Mobile optimization */
@media (max-width: 1200px) {
    .nail-hero-banner {
        min-height: 550px;
        height: 60vh;
    }

    .nail-hero-wrapper {
        padding: 70px 40px;
    }

    .nail-hero-title {
        font-size: 56px;
    }
}

/* These are already handled in the main responsive section above */
.align-center .large-12 {
    display: none !important;
}

.entry-header-text {
    display: none !important;
}

body.ng-lightbox-open {
    overflow: hidden !important;
    touch-action: none !important;
}

.nail-gallery-lightbox-content {
    touch-action: pan-x !important;
}

/* ===============================
   LIGHTBOX ARROW NAVIGATION
================================ */

.nail-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    font-size: 40px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .25s ease, transform .25s ease;
    user-select: none;
}

.nail-lightbox-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.nail-lightbox-prev {
    left: -70px;
}

.nail-lightbox-next {
    right: -70px;
}

@media (max-width: 768px) {
    .nail-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 32px;
    }

    .nail-lightbox-prev {
        left: 8px;
    }

    .nail-lightbox-next {
        right: 8px;
    }
}

.nail-gallery-lightbox-close {
    position: absolute;
    top: 50px;
    right: 25px;

    width: 40px;
    height: 40px;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 10;

    transition: background 0.2s ease, transform 0.2s ease;
}

/* Hover / tap feedback */
.nail-gallery-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}


@media (max-width: 768px) {
    .nail-lightbox-viewport {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 80vh;
        overflow: hidden;
        position: relative;
    }

    .nail-gallery-lightbox-close {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    /* Slider: container trượt */
    .nail-lightbox-slider {
        display: flex;
        width: 300%;
        height: 100%;
        transition: transform 0.25s ease;
        will-change: transform;
    }

    .nail-lightbox-slider .slide {
        flex: 0 0 100%;
        max-width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        user-select: none;
        pointer-events: none;
        padding: 0 20px;
        box-sizing: border-box;
    }

}