/* =========================================
   Admin Image Gallery Styling
   ========================================= */

/* Admin Preview Area */
.admin-image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.admin-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.admin-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

/* =========================================
   Frontend Product Gallery & Zoom Styling
   ========================================= */

/* Gallery Layout in Detail View */
.detail-image-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    /* Indicate zoom availability */
}

.main-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Thumbnails */
.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
}

.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.thumbnail-item {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.thumbnail-item.active {
    border-color: var(--color-accent, #ff6600);
}

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

/* Zoom Lens */
.zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    /*set in JS*/
    width: 100px;
    height: 100px;
    background-repeat: no-repeat;
    cursor: none;
    pointer-events: none;
    /* Let clicks pass through */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: none;
    /* Hidden by default */
    z-index: 10;
    border-radius: 50%;
    /* Circle lens */
    background-color: white;
    /* Fallback */
}

/* =========================================
   Toast Notification Animations
   ========================================= */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}