/* ==========================================
   🎨 Unified Product Cards System
========================================== */
.custom-radius-16 { border-radius: 16px !important; }
.custom-radius-12 { border-radius: 12px !important; }

.custom-product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.12) !important;
    background: #ffffff !important;
}
.custom-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
    box-shadow: 0 10px 25px rgba(var(--bs-primary-rgb), 0.08) !important;
}

/* 🔒 تثبيت حاوية الصورة ومنع الـ CLS أثناء التحميل */
.product-thumb-container {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    max-height: 100% !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #f1f5f9;
    contain: layout paint;
}

/* ✨ تأثير الـ Loading Shimmer */
.shimmer-placeholder {
    background: #f1f5f9 linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%) no-repeat !important;
    background-size: 200% 100% !important;
    animation: shimmerEffect 1.5s infinite linear !important;
}
@keyframes shimmerEffect {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-thumb-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    display: block !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    transition: transform 0.3s ease;
}
.custom-product-card:hover .product-thumb-img {
    transform: scale(1.04);
}

/* 🚫 نسف وإلغاء الشريط المائل القديم نهائياً (على كل الأجهزة) */
.product__power-badge img,
.product__power-badge svg {
    display: none !important;
}

/* ⚡ شارة العروض الخاطفة الدائرية الفخمة باللون الثانوي */
.product__power-badge {
    position: absolute !important;
    top: 8px !important;
    inset-inline-start: 8px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: var(--bs-secondary, #f59e0b) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    transform: none !important;
    z-index: 10 !important;
}
.product__power-badge i {
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1 !important;
    display: block !important;
}
.product__power-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid var(--bs-secondary, #f59e0b);
    animation: flash-pulse 2s infinite ease-out;
}
@keyframes flash-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* شارة الخصم */
.product-card-discount-badge {
    position: absolute !important;
    top: 8px !important;
    inset-inline-start: 8px !important;
    background: var(--bs-secondary, #e62e04) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    z-index: 5 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    line-height: 1.2;
}
.product__power-badge ~ .product-card-discount-badge,
.product-thumb-container:has(.product__power-badge) .product-card-discount-badge {
    top: 42px !important;
}

/* شريط الإجراءات بالأعلى */
.product-card-actions {
    position: absolute !important;
    top: 8px !important;
    inset-inline-end: 8px !important;
    z-index: 10 !important;
}

.custom-card-action-btn {
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #363636 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.custom-card-action-btn:hover,
.custom-card-action-btn.active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}
.custom-card-action-btn:hover i,
.custom-card-action-btn.active i {
    color: #ffffff !important;
}

/* صورة البراند الدائرية المتناسقة */
.brand-action-container {
    border-radius: 50% !important;
    padding: 2px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(var(--bs-primary-rgb), 0.25) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}
.brand-full-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

/* قائمة المشاركة */
.card-share-wrap {
    position: relative !important;
}
.card-share-dropdown {
    display: none !important;
    position: absolute !important;
    top: 0 !important;
    inset-inline-end: 36px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    padding: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    z-index: 50 !important;
    flex-direction: column !important;
    gap: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}
.card-share-wrap:hover .card-share-dropdown {
    display: flex !important;
}
.card-share-dropdown a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background-color: #f8fafc !important;
    color: #475569 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}
.card-share-dropdown a i,
.card-share-dropdown a svg {
    color: #475569 !important;
    fill: #475569 !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}
.card-share-dropdown a:hover {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}
.card-share-dropdown a:hover i,
.card-share-dropdown a:hover svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* ====================================================
   ⏳ عداد الفلاش ديل: خلفية تدرج ناعمة ونصوص بيضاء ناصعة
==================================================== */
.product__countdown {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.72) 40%, rgba(15, 23, 42, 0.95) 100%) !important;
    backdrop-filter: blur(2px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    direction: ltr !important;
    padding: 6px 4px 4px 4px !important;
    height: auto !important;
    border-radius: 0 0 16px 16px !important;
}

/* إخفاء الدوائر والكروت الرمادية القديمة المضافة بالسكربت */
.product__countdown > div,
.product__countdown .days,
.product__countdown .hours,
.product__countdown .minutes,
.product__countdown .seconds,
.product__countdown .countdown-item {
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 2px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    border-radius: 0 !important;
}

/* النصوص والأرقام باللون الأبيض النقي عالي التباين */
.product__countdown,
.product__countdown span,
.product__countdown strong,
.product__countdown b,
.product__countdown .days,
.product__countdown .hours,
.product__countdown .minutes,
.product__countdown .seconds {
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    line-height: 1.2 !important;
}

/* تكبير الأرقام لتبرز بوضوح */
.product__countdown strong,
.product__countdown b {
    font-size: 13px !important;
    font-weight: 900 !important;
}

/* الشارات السفلية */
.feature-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.cashback-badge {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}
.wholesale-badge {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}
.stock-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.stock-badge.in-stock { color: #198754; background-color: rgba(25, 135, 84, 0.1); }
.stock-badge.out-stock { color: #dc3545; background-color: rgba(220, 53, 69, 0.1); }

.save-badge {
    font-size: 11px;
    font-weight: 600;
    color: #198754;
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    padding: 1px 5px;
    border-radius: 6px;
}

.color-circle-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
    cursor: pointer;
}

.line-limit-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.custom-buy-btn {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}
.custom-buy-btn:hover {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
}

.fs-10 { font-size: 10px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-17 { font-size: 17px; }