/* Global Image Sizing Standards */
img {
    max-width: 100%;
    height: auto;
}

/* Fixed ratio containers */
.ratio-4x3 {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.ratio-1x1 {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.ratio-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Prevent image distortion */
.image-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
/* Ad Card Image - Fixed size */
.ad-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    height: 100%;
}

.ad-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.ad-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area without distortion */
    object-position: center;
    transition: transform 0.3s ease;
}

.ad-card:hover .ad-image {
    transform: scale(1.05);
}

/* For different aspect ratios on different pages */
.store-ad-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

/* View Ad Page Main Image */
.main-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-ad-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* For detail view, contain is better */
    object-position: center;
}

/* Thumbnail images */
.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

/* Profile image */
.profile-pic {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* Store cover */
.store-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Responsive */
@media (max-width: 768px) {
    .main-image-container {
        height: 250px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .store-cover {
        height: 120px;
    }
}