/* Modern Components - Instagram/Pinterest Style */

/* Floating Bottom Navigation - Pinterest Style */
.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.nav-item svg {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item:hover {
    background: var(--bg);
}

.nav-item:hover svg {
    transform: scale(1.1);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    animation: liquidDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes liquidDrop {
    0% {
        border-radius: 50%;
    }

    30% {
        border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    }

    50% {
        border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    }

    70% {
        border-radius: 50% 50% 50% 50% / 55% 45% 45% 55%;
    }

    100% {
        border-radius: 50%;
    }
}

.nav-item.active svg {
    transform: scale(1.05);
}

.nav-item:active {
    transform: scale(0.85);
}

.nav-item:active svg {
    transform: scale(0.95);
}

/* Floating Action Button (FAB) - Pinterest Style */
.fab {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.fab:active {
    transform: scale(0.95);
}

/* Filter Section */
.filter-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: var(--space-2);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
}

.pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Instagram-style Photo Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    background: transparent;
}

@media (min-width: 640px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (min-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* Item Card - Photo plein écran style Instagram */
.item-card,
.simple-item-card {
    background: var(--surface);
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.item-card:hover,
.simple-item-card:hover {
    transform: scale(1.02);
    z-index: 10;
}

.item-card:active,
.simple-item-card:active {
    transform: scale(0.98);
}

.item-image,
.simple-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Item overlay - subtle and compact */
.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.3) 60%,
            transparent 100%);
    color: white;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.item-category {
    font-size: 10px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Info overlay on hover */
.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-3);
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7),
            transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.item-card:hover .item-info {
    opacity: 1;
}

/* Outfit placeholder when no cover photo */
.outfit-no-cover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.outfit-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.7;
}

/* Outfit items collage */
.outfit-collage {
    background: var(--bg);
}

.items-collage {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 2px;
}

/* 1 item - full */
.items-1 {
    grid-template-columns: 1fr;
}

/* 2 items - 2 columns */
.items-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 items - first full width, bottom 2 split */
.items-3 {
    grid-template-columns: repeat(2, 1fr);
}

.items-3 .collage-item:first-child {
    grid-column: 1 / -1;
}

/* 4 items - 2x2 grid */
.items-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.collage-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-category {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.item-name {
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Badge - Minimal */
.simple-item-badge {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

/* Check Mark */
.simple-item-check {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.simple-item-card.selected {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

/* Outfit Card - Modern */
.outfit-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
}

.outfit-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.outfit-card:active {
    transform: scale(0.98);
}

.outfit-preview {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
}

.outfit-preview.single-image {
    display: block;
}

.outfit-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.outfit-card-info {
    padding: var(--space-4);
}

.outfit-card-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: var(--space-1);
}

.outfit-card-meta {
    font-size: var(--text-sm);
    color: var(--text-3);
}

/* Photo Preview */
.photo-preview-area,
.cover-preview-area {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto var(--space-6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    box-shadow: var(--shadow-md);
}

.photo-preview-area img,
.cover-preview-area img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.cover-remove-btn {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #FF3B30;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
}

.cover-remove-btn:hover {
    transform: scale(1.1);
}

.cover-remove-btn:active {
    transform: scale(0.95);
}

/* Selected Summary */
.selected-summary {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    border: 1px solid var(--border);
}

.selected-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    background: var(--bg);
    color: var(--text-1);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid var(--border);
}