/**
 * Gallery and image display styles for Maricopa Yard Sales
 */

/* Inventory card image gallery */
.inventory-card {
    position: relative;
    transition: box-shadow 0.3s ease;
}

.inventory-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.image-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
    z-index: 1;
}

.gallery-expander {
    cursor: pointer;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color 0.2s ease;
}

.gallery-expander:hover {
    background-color: #e9ecef;
}

.thumbnail-gallery {
    margin-top: 10px;
    overflow-x: auto;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.thumbnail {
    width: 60px;
    height: 60px;
    margin-right: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image modal and zoom functionality */
.image-zoom-container {
    overflow: hidden;
    position: relative;
    max-height: 80vh;
}

#modalImage {
    transition: transform 0.3s ease;
    cursor: zoom-in;
    max-height: 80vh;
}

/* Item image management page */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.image-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-wrapper .badge {
    position: absolute;
    top: 8px;
    left: 8px;
}

.image-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.5);
    padding: 5px;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .image-controls {
    opacity: 1;
}

.primary-image {
    border: 2px solid #0d6efd;
}