.faag-frontend-container {
    display: flex;
    font-family: inherit;
    gap: 30px;
    margin: 20px 0;
}

/* Layouts */
.faag-layout-vertical {
    flex-direction: row;
}
.faag-layout-horizontal {
    flex-direction: column;
}

/* Left Sidebar */
.faag-sidebar-left {
    display: flex;
    flex-direction: column;
}
.faag-layout-vertical .faag-sidebar-left {
    flex: 0 0 250px; /* Default, overridden by Elementor */
}
.faag-layout-horizontal .faag-sidebar-left {
    flex: 1;
}

.faag-category-label {
    background: transparent;
    color: #cc0000;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 0;
    text-transform: uppercase;
}

/* Tabs */
.faag-tabs-left {
    display: flex;
    gap: 10px;
}
.faag-layout-vertical .faag-tabs-left {
    flex-direction: column;
}
.faag-layout-horizontal .faag-tabs-left {
    flex-direction: row;
    flex-wrap: wrap;
}

.faag-main-tab {
    background: #002244;
    color: #fff;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}
.faag-layout-horizontal .faag-main-tab {
    flex: 1 1 auto;
    justify-content: center;
}

/* Arrow Icon toggle */
.faag-show-arrow .faag-main-tab::after {
    content: '>';
    font-family: monospace;
    font-weight: bold;
    margin-left: 10px;
}
.faag-layout-horizontal.faag-show-arrow .faag-main-tab::after {
    display: none; /* Usually don't want arrow on horizontal */
}

/* Right Content Area */
.faag-content-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.faag-right-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Sub-tabs */
.faag-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.faag-sub-tab {
    cursor: pointer;
    font-size: 16px;
    color: #555;
    padding: 5px 10px;
    transition: color 0.3s ease;
}
.faag-sub-tab:hover, .faag-sub-tab.active {
    color: #002244;
    font-weight: bold;
    border-bottom: 2px solid #002244;
}

/* Date Filter */
.faag-date-filter-wrap {
    margin-left: 20px;
}
.faag-date-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
}

/* Image Grid */
.faag-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.faag-grid-item {
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background: #f0f0f0;
}
.faag-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.faag-grid-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.faag-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}
.faag-lightbox.show {
    display: flex;
}
.faag-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.faag-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 768px) {
    .faag-layout-vertical {
        flex-direction: column;
    }
    .faag-layout-vertical .faag-tabs-left {
        flex: 1;
    }
}


/* Grid Layout Enhancements */

/* 1. Masonry */
.faag-grid-layout-masonry .faag-gallery-grid {
    display: block; /* Override default grid */
    column-width: 250px;
    column-gap: 15px;
}
.faag-grid-layout-masonry .faag-grid-item {
    display: block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 15px;
    aspect-ratio: auto; /* Let images define height naturally */
}
.faag-grid-layout-masonry .faag-grid-item img {
    height: auto;
}

/* 2. Quilted Mosaic */
.faag-grid-layout-quilted .faag-gallery-grid {
    grid-auto-flow: dense;
}
.faag-grid-layout-quilted .faag-grid-item {
    aspect-ratio: 1;
}
.faag-grid-layout-quilted .faag-grid-item:nth-child(5n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}
.faag-grid-layout-quilted .faag-grid-item:nth-child(7n) {
    grid-column: span 2;
}

/* 3. Bento Grid */
.faag-grid-layout-bento .faag-gallery-grid {
    grid-auto-flow: dense;
    /* Elementor columns might apply, but we'll ensure items look like bento boxes */
}
.faag-grid-layout-bento .faag-grid-item {
    border-radius: 12px;
    aspect-ratio: 1;
}
.faag-grid-layout-bento .faag-grid-item:nth-child(4n + 1) {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}
.faag-grid-layout-bento .faag-grid-item:nth-child(4n + 2) {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 2 / 1;
}

/* 4. Sliding Carousel / Horizontal Scroll */
.faag-grid-layout-carousel .faag-gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    grid-template-columns: none !important; /* Override Elementor */
}
.faag-grid-layout-carousel .faag-gallery-grid::-webkit-scrollbar {
    height: 8px;
}
.faag-grid-layout-carousel .faag-gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
.faag-grid-layout-carousel .faag-gallery-grid::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 4px;
}
.faag-grid-layout-carousel .faag-grid-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
}

/* 5. Lookbook / Editorial */
.faag-grid-layout-lookbook .faag-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    grid-template-columns: none !important; /* Override Elementor */
}
.faag-grid-layout-lookbook .faag-grid-item {
    width: 100%;
    aspect-ratio: auto;
}
.faag-grid-layout-lookbook .faag-grid-item img {
    height: auto;
}
.faag-grid-layout-lookbook .faag-grid-item:nth-child(even) {
    width: 70%;
    margin-left: auto;
}
.faag-grid-layout-lookbook .faag-grid-item:nth-child(3n) {
    width: 50%;
    margin: 0 auto;
}

/* Carousel Navigation */
.faag-gallery-grid-wrapper {
    position: relative;
    width: 100%;
}
.faag-carousel-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 34, 68, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.faag-carousel-btn:hover {
    background: rgba(0, 34, 68, 1);
}
.faag-grid-layout-carousel .faag-carousel-btn {
    display: flex;
}
.faag-carousel-prev {
    left: 10px;
}
.faag-carousel-next {
    right: 10px;
}
/* Hide scrollbar for cleaner look when buttons are present */
.faag-grid-layout-carousel .faag-gallery-grid::-webkit-scrollbar {
    display: none;
}
.faag-grid-layout-carousel .faag-gallery-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

