/* Item Gallery Styles - OLX Style Redesign */

/* --- Gallery Container --- */
.gallery-container {
    background-color: #000;
    /* OLX uses dark background for images */
    border-radius: 4px;
    /* Slight radius */
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    height: 480px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
    z-index: 1;
    position: relative;
}

/* --- Navigation Buttons --- */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s;
    z-index: 10;
    font-size: 20px;
}

.carousel-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* Arrows inside buttons */
.carousel-nav-btn i {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Thumbnails Strip --- */
.thumbnails-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.thumbnail-container {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail-container:hover {
    opacity: 1;
}

.thumbnail-container.active-thumb {
    border-color: #2f3542;
    /* Highlight color (dark grey/accent) */
    opacity: 1;
    border-width: 3px;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* --- Info Cards (Right Column) --- */
.info-card {
    background: #fff;
    border: 1px solid #ced4da;
    /* Light border */
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.info-price {
    font-size: 32px;
    font-weight: 700;
    color: #2f3542;
    margin-bottom: 4px;
}

.info-title {
    font-size: 20px;
    color: #4a4a4a;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.4;
}

.info-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* Seller Card */
.seller-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.seller-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.seller-name {
    font-weight: 700;
    font-size: 18px;
    color: #2f3542;
    text-decoration: none;
}

.seller-meta {
    font-size: 13px;
    color: #6c757d;
}

.btn-chat-seller {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Safety Tips */
.safety-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.safety-list li {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.safety-list li i {
    margin-right: 8px;
    margin-top: 2px;
    color: #2f3542;
}


/* --- Lightbox Styles (Kept mostly same, refined) --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    /* Flexbox for centering */
    align-items: center;
    justify-content: center;
}

.lightbox-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 20px;
    font-size: 40px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
    z-index: 10000;
}

.lightbox-nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-container {
        height: 300px;
        border-radius: 0;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
    }

    .info-card {
        border: none;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        /* Remove negative margins if any */
    }
}