﻿/* Brand card styling */
.image-card img {
    /* Removed fixed width and height to show full image */
    object-fit: contain; /* Ensures the full image is visible */
    max-width: 100%; /* Prevents image from exceeding card width */
    height: auto; /* Allows natural height */
}

.image-card {
    text-align: center;
    margin: 0; /* Reset margin to control spacing via grid */
    border: none;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-title {
    font-size: 0.7rem;
    margin-top: 0.2rem;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Alphabet filter buttons */
.alphabet-filter .btn {
    margin: 0.15rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
}

    .alphabet-filter .btn.active {
        background-color: #007bff;
        color: white;
    }

.alphabet-filter {
    margin-bottom: 1rem;
}

/* Alphabet group and section */
.alphabet-group {
    margin-bottom: 1.5rem;
}

.alphabet-section {
    padding: 0.5rem;
}

.alphabet-header {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.4rem;
    background-color: #f8f9fa;
    border: 1px solid #007bff;
    display: inline-block;
    border-radius: 0.2rem;
}

/* Image gallery container */
#imageGallery {
    width: 100%;
}

/* Grid container with scrollbar */
.grid-container {
    max-height: 300px; /* 4 rows * (60px image + 0.7rem title + 0.2rem margin + 30px bottom gap) ≈ 300px */
    overflow-y: auto;
    padding-right: 5px; /* Adjust for scrollbar */
}

    .grid-container::-webkit-scrollbar {
        width: 8px;
    }

    .grid-container::-webkit-scrollbar-thumb {
        background-color: transparent; /* Colorless thumb */
    }

    .grid-container::-webkit-scrollbar-track {
        background-color: transparent; /* Colorless track */
    }

    /* Grid inside alphabet section */
    .grid-container .row {
        margin: -5px 0 0 -5px; /* Negative margin to offset padding for custom gap */
    }

        .grid-container .row .col {
            padding: 5px 0 15px 5px; /* 10px top/right/left, 30px bottom adjusted via padding */
        }

/* No brands message */
.no-product {
    display: none;
    text-align: center;
    margin-top: 1rem;
    font-size: 1rem;
}

/* Search bar */
.search-bar {
    margin-bottom: 1rem;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.shimmer {
    border-radius: 4px;
}

.skeleton-card {
    opacity: 0.7
    border: none;
    box-shadow: none;
    background: transparent;
}

.skeleton.product-img {
    width: 60px; /* Placeholder size for skeleton */
    height: 60px; /* Placeholder size for skeleton */
}

.skeleton.card-title {
    width: 80%;
    height: 10px;
    margin: 0.2rem auto 0;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}
