/*
 * Product Display CSS for Ammo Elite
 * Focus on improved visuals and grid layouts with hover overlay icons
 */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
    padding: 20px 0;
    align-items: stretch;
}

.product-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--accent-color, #e74c3c);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 15px 15px 10px;
    color: #2c3e50;
    line-height: 1.3;
    min-height: 3.2em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-card .product-title-link {
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.product-card .product-title-link:hover {
    color: var(--accent-color, #e74c3c);
}

.price {
    font-size: 1.2rem;
    color: var(--accent-color, #e74c3c);
    margin: auto 15px 20px;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    flex-shrink: 0;
}

.price .currency {
    font-size: 0.9em;
    opacity: 0.8;
}

.price .sale-price {
    color: var(--accent-color, #e74c3c);
}

.price .regular-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 0.9em;
    margin-right: 8px;
}

/* Product Hover Overlay Icons */
.product-hover-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-card:hover .product-hover-actions {
    opacity: 1;
    visibility: visible;
}

.hover-icon {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
}

.hover-icon:hover {
    background: var(--accent-color, #e74c3c);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.hover-icon.add-to-cart:hover {
    background: #27ae60;
}

.hover-icon.quick-view:hover {
    background: #3498db;
}

.hover-icon.wishlist:hover {
    background: #e74c3c;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color, #e74c3c);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

.product-badge.sale {
    background: #e67e22;
}

.product-badge.new {
    background: #27ae60;
}

.product-card-content {
    padding: 0 15px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-rating .stars {
    color: #f39c12;
}

.product-stock {
    font-weight: 500;
}

.product-stock.in-stock {
    color: #27ae60;
}

.product-stock.out-of-stock {
    color: var(--accent-color, #e74c3c);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .product-card {
        min-height: 380px;
    }
    
    .product-card img {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        min-height: 350px;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .hover-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
