/* FastSpring Product Gallery Styles */
.fpg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.fpg-product {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fpg-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.fpg-product a {
    text-decoration: none;
    color: inherit;
}

.fpg-product img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.fpg-product h3 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: #333;
}

.fpg-product-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.fpg-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 1rem 0;
}

.fpg-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.fpg-price .free-price {
    font-weight: bold;
}

.fpg-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.fpg-cart-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.fpg-cart-button:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.fpg-discount-badge {
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    background: #2ecc71;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    transform: rotate(-12deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fpg-discount-badge:hover {
    transform: rotate(-12deg) scale(1.05);
    box-shadow: 0 5px 10px rgba(0,0,0,0.25), 0 5px 10px rgba(0,0,0,0.22);
}

.fpg-product {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: visible;  /* Allow badge to overflow */
}

/* Page Template Overrides */
.single-fastspring_product .entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.fpg-product-info {
    border-top: 1px solid #eee;
    margin-top: 1rem;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .fpg-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
}