/* Electronics Product Grid - Clean Responsive Styles */

.epg-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3px 0;
}

.epg-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
    .epg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .epg-image {
        height: 180px;
    }
    
    .epg-content {
        height: calc(100% - 180px);
    }
}

/* Desktop: 5 columns */
@media (min-width: 769px) {
    .epg-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    
    .epg-image {
        height: 220px;
    }
    
    .epg-content {
        height: calc(100% - 220px);
    }
}

/* Product Card */
.epg-product {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.epg-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.epg-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.epg-product:hover .epg-image img {
    transform: scale(1.05);
}

.epg-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    font-weight: 300;
}

/* Wishlist heart on left side (to avoid FEATURED badge on right) */
.epg-wishlist {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.epg-wishlist-btn {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    color: #ff4757;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.epg-wishlist-btn::before {
    content: "\2665";
    font-size: 14px;
    line-height: 1;
}

.epg-wishlist-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
    color: #ffffff;
    transform: translateY(-1px);
}

.epg-wishlist-btn.in-wishlist {
    background: #ff4757;
    border-color: #ff4757;
    color: #ffffff;
}

/* Featured Badge */
.epg-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 3px 3px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    z-index: 2;
}

/* Verified vendor badge overlay in image */
.epg-vendor-badge-wrap {
    position: absolute;
    left: 0;
    bottom: 0;
    max-width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    pointer-events: none;
}

.epg-vendor-badge-wrap .wcfmvb-badge {
    font-size: 10px;
    padding: 2px 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Selling Badge */
.epg-selling {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: #4CAF50;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid #4CAF50;
}

/* Rental Badge */
.epg-rental {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: #2196F3;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid #2196F3;
}

/* Property Grid Styles */
.property-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.property-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.property-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-item:hover .property-thumbnail img {
    transform: scale(1.05);
}

.property-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.property-wishlist-btn {
    display: block;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333' width='20px' height='20px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.property-wishlist-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.property-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-content h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.property-content h3 a {
    color: #333;
    text-decoration: none;
}

.property-content h3 a:hover {
    color: #007cba;
}

.property-summary {
    margin-bottom: 15px;
    flex-grow: 1;
}

.property-main-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.property-main-price {
    font-size: 18px;
    font-weight: 700;
    color: #007cba;
}

.property-meta-line {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.property-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.detail-icon {
    display: inline-flex;
    align-items: center;
}

.showcase-actions {
    margin-top: auto;
    padding-top: 10px;
}

.showcase-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.showcase-btn:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

/* Product Content */
.epg-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.epg-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.4;
    height: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.epg-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.2s ease;
}

.epg-title a:hover {
    color: #3498db;
}

.epg-price {
    font-weight: 300;
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 5px;
}

.epg-add-cart {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.epg-add-cart:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* No Products Message */
.epg-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.epg-no-products p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
    font-weight: 300;
}

/* Load More Button */
.epg-load-more-container {
    text-align: center;
    margin-top: 40px;
}

.epg-load-more-btn {
    padding: 10px 10px;
    background: linear-gradient(135deg, #000000, #000000);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.epg-load-more-btn:hover:not(:disabled) {
    background: linear-gradient(35deg, #000000, #000000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.epg-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Adjustments */
@media (max-width: 300px) {
    .epg-container {
        padding: 3px 3px;
    }
    
    .epg-grid {
        gap: 12px;
    }
    
    .epg-image {
        height: 150px;
    }
    
    .epg-content {
        padding: 3px;
        height: calc(100% - 150px);
    }
    
    .epg-title {
        font-size: 13px;
        height: 20px;
    }
    
    .epg-price {
        font-size: 15px;
    }
    
    .epg-add-cart {
        padding: 3px;
        font-size: 11px;
    }
}

@media (max-width: 200px) {
    .epg-image {
        height: 120px;
    }
    
    .epg-content {
        height: calc(100% - 120px);
    }
}

/* Large Desktop Optimization */
@media (min-width: 1200px) {
    .epg-container {
        max-width: 1400px;
    }
    
    .epg-grid {
        gap: 25px;
    }
    
    .epg-image {
        height: 250px;
    }
    
    .epg-content {
        height: calc(100% - 250px);
    }
}

/* Smooth Animations - Without Flashing */
.epg-product {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.epg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.epg-loading .epg-product {
    animation: none;
}