.ProductWrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    gap: 5px;
    grid-auto-rows: min-content;
}

.Product {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.imageWrapper {
    width: 100%;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ProductImage {
    width: 100%;
    height:100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Product Overlay Styles */
.imageWrapper {
    position: relative;
    overflow: hidden;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
}

.Product:hover .product-overlay {
    opacity: 1;
}

.product-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: white;
}



.product-availability.in-stock {
    background-color: #28a745;
    color: white;
}

.product-availability.coming-soon {
    background-color: #ffc107;
    color: #212529;
}

.Product label {
    font-size: 2rem;
    color: #bfbfbf;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
    animation: fadeIn 0.3s ease;
}

.modal-image-section {
    flex: 7; /* 70% of the width */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    position: relative;
}

.image-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.modal-content.active-slide {
    opacity: 1;
}

/* Slideshow Navigation */
.slideshow-prev, .slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-prev:hover, .slideshow-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slideshow-prev {
    left: 20px;
}

.slideshow-next {
    right: 20px;
}

/* Slideshow Indicators */
.slideshow-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slideshow-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-indicator.active {
    background: white;
    transform: scale(1.2);
}

.slideshow-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.modal-description-section {
    flex:1; /* 25% of the width */
    display: flex;
    flex-direction: column;
    background: #fff;
    min-width: 250px;
    border-left: 1px solid #dbdbdb;
}

.description-header {
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.username {
    padding-right: 10px;
    font-weight: 600;
    font-size: 30px;
    color: #262626;
}

.description-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.item-description {
    font-size: 14px;
    line-height: 1.6;
    color: #262626;
    margin: 0;
}

.description-actions {
    padding: 16px;
    border-top: 1px solid #dbdbdb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 600;
    font-size: 18px;
    color: #262626;
}

.availability {
    font-size: 14px;
    color: #0095f6;
    font-weight: 500;
}

.close {
    padding:5px;
    color: #262626;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0; /* Prevent squishing */
    min-width: 32px; /* Ensure minimum width */
}

.close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
    transform: scale(1.1);
}

.ProductImage {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ProductImage:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}