/* Universal Wrapper Styles */
.fmp-universal-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.fmp-u-item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.fmp-u-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.fmp-u-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fmp-u-item:hover .fmp-u-image img {
    transform: scale(1.05);
}

.fmp-u-no-image {
    background: #eaeaea;
    color: #999;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
}

.fmp-u-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fmp-u-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fmp-u-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.fmp-u-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 15px;
}

.fmp-u-prices {
    display: flex;
    gap: 10px;
}

.fmp-u-price {
    background: rgba(0,0,0,0.05);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.fmp-u-price small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fmp-u-price strong {
    font-size: 1.1rem;
}

/* =======================================
   1. LAYOUTS
======================================= */

/* Grid Layout */
.fmp-layout-grid.fmp-cols-2 .fmp-u-item { width: calc(50% - 15px); }
.fmp-layout-grid.fmp-cols-3 .fmp-u-item { width: calc(33.333% - 20px); }
.fmp-layout-grid.fmp-cols-4 .fmp-u-item { width: calc(25% - 22.5px); }
.fmp-layout-grid .fmp-u-image { height: 220px; }

/* List Layout */
.fmp-layout-list {
    flex-direction: column;
}
.fmp-layout-list .fmp-u-item {
    flex-direction: row;
    width: 100%;
}
.fmp-layout-list .fmp-u-image {
    width: 250px;
    height: auto;
    flex-shrink: 0;
}

/* Masonry Layout */
.fmp-layout-masonry {
    display: block;
    column-gap: 30px;
}
.fmp-layout-masonry.fmp-cols-2 { column-count: 2; }
.fmp-layout-masonry.fmp-cols-3 { column-count: 3; }
.fmp-layout-masonry.fmp-cols-4 { column-count: 4; }
.fmp-layout-masonry .fmp-u-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
}

/* Carousel Layout (CSS Scroll Snapping) */
.fmp-layout-carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px; /* Space for scrollbar */
    gap: 20px;
}
.fmp-layout-carousel::-webkit-scrollbar {
    height: 8px;
}
.fmp-layout-carousel::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}
.fmp-layout-carousel::-webkit-scrollbar-thumb {
    background: #b0d025;
    border-radius: 10px;
}
.fmp-layout-carousel .fmp-u-item {
    scroll-snap-align: start;
    flex: 0 0 calc(33.333% - 20px);
    min-width: 280px; /* Ensure cards don't shrink too much */
}

/* Minimal Layout */
.fmp-layout-minimal.fmp-cols-2 .fmp-u-item { width: calc(50% - 15px); }
.fmp-layout-minimal.fmp-cols-3 .fmp-u-item { width: calc(33.333% - 20px); }
.fmp-layout-minimal.fmp-cols-4 .fmp-u-item { width: calc(25% - 22.5px); }
.fmp-layout-minimal .fmp-u-item { border-radius: 0; border-bottom: 2px solid transparent; }
.fmp-layout-minimal .fmp-u-image { height: 180px; border-radius: 8px; }

/* =======================================
   2. THEMES (Colors)
======================================= */

/* Theme: Light */
.fmp-theme-light .fmp-u-item {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.fmp-theme-light .fmp-u-title { color: #000000; }
.fmp-theme-light .fmp-u-desc { color: #333333; }
.fmp-theme-light .fmp-u-price { 
    background: #def086; 
    color: #000000;
}
.fmp-theme-light .fmp-u-price strong { 
    color: #000000; 
}

/* Theme: Dark */
.fmp-theme-dark .fmp-u-item {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.fmp-theme-dark .fmp-u-title { color: #ffffff; }
.fmp-theme-dark .fmp-u-desc { color: #aaaaaa; }
.fmp-theme-dark .fmp-u-price { background: rgba(255,255,255,0.05); }
.fmp-theme-dark .fmp-u-price small { color: #888; }
.fmp-theme-dark .fmp-u-price strong { color: #def086; } /* Brand green for dark mode */

/* Theme: Glassmorphism */
.fmp-theme-glass {
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}
.fmp-theme-glass .fmp-u-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.fmp-theme-glass .fmp-u-title { color: #111; }
.fmp-theme-glass .fmp-u-desc { color: #444; }

/* Theme: Brand Green */
.fmp-theme-brand .fmp-u-item {
    background: #def086;
    border: 2px solid #b0d025;
}
.fmp-theme-brand .fmp-u-title, .fmp-theme-brand .fmp-u-desc {
    color: #000000;
}
.fmp-theme-brand .fmp-u-price {
    background: #ffffff;
    border: 1px solid #b0d025;
}
.fmp-theme-brand .fmp-u-price strong {
    color: #b0d025;
}
