/*
 * Stylesheet for Electronics Shop Showcase plugin.
 *
 * This CSS defines a flexible grid layout for product items, sale badges,
 * pricing labels and coupon codes.  It draws inspiration from WooCommerce’s
 * default sale badges where a small label appears over the product image to
 * highlight discounts【660195171591391†L60-L146】.  The badge colour, position and
 * shape can be customised by editing these styles.  Feel free to adjust
 * colours, fonts and spacing to match your theme.
 */

.es-product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    margin: 20px 0;
}

.es-product-item {
    width: calc(25% - 20px);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    background-color: #ffffff;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.es-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.es-product-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    border-radius: 4px;
}

.es-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #d9534f;
    color: #ffffff;
    padding: 5px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
    text-transform: uppercase;
}

.es-price {
    margin: 10px 0;
    font-size: 1rem;
}

.es-original-price {
    text-decoration: line-through;
    color: #777777;
    margin-right: 5px;
}

.es-sale-price {
    color: #d9534f;
    font-weight: bold;
}

.es-discount-code {
    display: inline-block;
    margin: 8px 0;
    font-size: 0.8rem;
    background-color: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    color: #333333;
}

.es-button-disabled {
    display: inline-block;
    margin-top: 10px;
    background-color: #cccccc;
    color: #333333;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: not-allowed;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .es-product-item {
        width: calc(33.333% - 20px);
    }
}
@media (max-width: 768px) {
    .es-product-item {
        width: calc(50% - 20px);
    }
}
@media (max-width: 480px) {
    .es-product-item {
        width: 100%;
    }
}