.myfade {
    opacity: 0;
    animation: fadeIn 0.2s ease-in forwards;
}
.myfade2 {
    opacity: 0;
    animation: fadeIn 1.2s ease-in forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.myfadeout {
    overflow: hidden;
    animation: fadeOut 1s ease-out 1s forwards;
}


@keyframes fadeOut {
    to {
        opacity: 0;
        height: 0;
        margin: 0;
        padding: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Masonry Grid Layout */
.masonry-grid {
    column-count: 1;
    column-gap: 2rem;
}

.masonry-grid img.mycardimg {
    max-height: 450px;
    min-height: 150px;
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
    }
}
@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}
@media (min-width: 1280px) {
    .masonry-grid {
        column-count: 4;
    }
}
@media (min-width: 1600px) {
    .masonry-grid {
        column-count: 5;
    }
}

.break-inside-avoid {
    break-inside: avoid;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utility for hiding scrollbar in horizontal lists */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- NEW STYLES --- */

/* Scrolled Category Bar (Shrink Effect) */
.category-bar {
    transition: all 0.3s ease;
}
.category-bar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.category-bar.scrolled .category-btn {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    font-size: 0.75rem; /* text-xs */
}
.category-bar .category-btn {
    transition: all 0.3s ease;
}


/* Custom Searchable Dropdown */
.custom-select-wrapper {
    position: relative;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
    overflow: hidden;
}
.custom-options.open {
    display: block;
    animation: fadeIn 0.1s ease-out;
}
.option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    color: #374151;
}
.option:hover {
    background-color: #f3f4f6;
}
.option.selected {
    background-color: black;
    color: white;
}

/* Tags Input */
.tag-chip {
    background-color: #f3f4f6;
    color: #1f2937;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.tag-chip button:hover {
    color: #ef4444;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 5rem; /* Below header usually */
    right: 50%;
    transform: translateX(50%);
    background-color: black;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}
@media (min-width: 1024px) {
    .toast-notification {
        right: 2rem;
        transform: none;
    }
    .toast-notification.show {
        transform: none;
    }
}
