/* =================================
   EDD Premium Card - Styles
   ================================= */

/* Reset و Base Styles */
.edd-premium-product-card * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* الكارد الرئيسي */
.edd-premium-product-card {
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.edd-premium-product-card:hover {
    transform: translateY(-5px);
}

/* قسم الصورة */
.edd-premium-product-card .product-image-wrapper {
    padding: 15px 15px 0 15px;
    background: var(--card-bg, #ffffff);
    position: relative;
}

.edd-premium-product-card .product-image {
    position: relative;
    background: #e0e0e0;
    border-radius: 15px;
    min-height: 180px;
    background-size: cover;
    background-position: center;
}

.edd-premium-product-card .discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--discount-gradient-start, #8bc34a) 0%, var(--discount-gradient-end, #689f38) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(139, 195, 74, 0.4);
    z-index: 5;
}

/* الأيقونة الصغيرة */
.edd-premium-product-card .product-icon-circle {
    position: absolute;
    bottom: -30px;
    right: 30px;
    background: linear-gradient(135deg, var(--icon-gradient-start, #9c27b0) 0%, var(--icon-gradient-end, #673ab7) 100%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

.edd-premium-product-card .product-icon-circle img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.edd-premium-product-card .product-icon-circle i {
    color: white;
    font-size: 24px;
}

/* قسم المعلومات */
.edd-premium-product-card .product-info {
    padding: 40px 20px 15px;
}

.edd-premium-product-card .product-title {
    font-size: 22px;
    font-weight: bold;
    color: #000;
    text-align: right;
    margin-bottom: 8px;
}

.edd-premium-product-card .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.edd-premium-product-card .product-title a:hover {
    color: #9c27b0;
}

.edd-premium-product-card .product-description {
    font-size: 12px;
    color: #666;
    text-align: right;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* قسم الإحصائيات */
.edd-premium-product-card .product-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* التقييم على اليمين */
.edd-premium-product-card .rating-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.edd-premium-product-card .rating-header {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.edd-premium-product-card .rating-label {
    font-size: 12px;
    color: #999;
}

.edd-premium-product-card .rating-value {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.edd-premium-product-card .stars {
    display: flex;
    gap: 2px;
    direction: ltr;
}

.edd-premium-product-card .stars i {
    color: #ffc107;
    font-size: 13px;
}

/* عمليات الشراء على اليسار */
.edd-premium-product-card .sales-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.edd-premium-product-card .sales-label {
    font-size: 12px;
    color: #999;
}

.edd-premium-product-card .sales-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.edd-premium-product-card .sales-number {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.edd-premium-product-card .sales-icon {
    color: #8bc34a;
    font-size: 20px;
}

/* قسم السعر والأزرار */
.edd-premium-product-card .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
}

.edd-premium-product-card .price-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edd-premium-product-card .current-price {
    font-size: 32px;
    font-weight: bold;
    color: #000;
}

.edd-premium-product-card .old-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

.edd-premium-product-card .action-buttons {
    display: flex;
    gap: 10px;
}

.edd-premium-product-card .btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.edd-premium-product-card .btn-wishlist {
    background: #ffe5e5;
    color: #e91e63;
}

.edd-premium-product-card .btn-wishlist:hover {
    background: #e91e63;
    color: white;
    transform: scale(1.1);
}

.edd-premium-product-card .btn-wishlist.active {
    background: #e91e63;
    color: white;
}

.edd-premium-product-card .btn-wishlist.active i {
    font-weight: 900;
}

.edd-premium-product-card .btn-cart {
    background: #f0f8e8;
    color: #8bc34a;
}

.edd-premium-product-card .btn-cart:hover {
    background: #8bc34a;
    color: white;
    transform: scale(1.1);
}

.edd-premium-product-card .btn.animating {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* تحسينات إضافية */
.edd-premium-product-card * {
    transition: all 0.3s ease;
}

/* =================================
   Grid Layout للـ Shortcode
   ================================= */

.edd-premium-grid {
    display: grid;
    gap: 30px;
    width: 100%;
}

.edd-premium-grid-columns-1 {
    grid-template-columns: 1fr;
}

.edd-premium-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.edd-premium-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.edd-premium-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .edd-premium-grid-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .edd-premium-grid-columns-3,
    .edd-premium-grid-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .edd-premium-grid-columns-2,
    .edd-premium-grid-columns-3,
    .edd-premium-grid-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .edd-premium-product-card {
        max-width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] .edd-premium-product-card .stars {
    direction: ltr;
}
