/* Product Widget Container */
.product-widget-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    direction: rtl; /* For Right-to-Left languages */
    text-align: right;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    max-width: 380px; /* Standard widget width */
    margin: 20px auto; /* Center the widget */
    background-color: #fff;
    transition: all 0.3s ease;
}

.product-widget-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Widget Header */
.widget-header {
    color: #fff;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(90deg, #dc3545, #6f42c1); /* Default gradient */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Widget Content */
.widget-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Product Image */
.product-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover; /* Cover the area, crop if necessary */
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.seller-info {
    font-size: 0.9em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.seller-info span:first-child {
    font-weight: 500;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffc107; /* Star color */
}

.rating .stars {
    font-size: 1.1em;
    letter-spacing: 2px;
}

.rating .star {
    color: #ffc107;
}

.rating .empty-star {
    color: #e0e0e0;
}

.rating-number {
    font-size: 0.95em;
    font-weight: bold;
    color: #555;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #fff;
    background: #6f42c1; /* Default feature background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-item .feature-icon {
    font-size: 1.1em;
    line-height: 1;
}

/* Price Section */
.price-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discount-badge {
    background-color: #dc3545; /* Red for discount */
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    width: fit-content;
    margin-bottom: 5px;
}

.prices {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.current-price {
    font-size: 1.6em;
    font-weight: bold;
    color: #333;
}

.original-price {
    font-size: 1em;
    color: #999;
    text-decoration: line-through;
}

/* Buy Button */
.buy-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-top: 20px;
    background: linear-gradient(90deg, #6f42c1, #e83e8c); /* Default button gradient */
    color: #fff;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.buy-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}