/* ============================================================
   🛍️  AFELTA — Products Listing PRO v1.0
   Brand: #e85d2f (Orange) | RTL-first | Cairo + Tajawal
   ============================================================ */

/* ── Reset & Root ──────────────────────────────────────────── */
:root {
    --af-orange:        #e85d2f;
    --af-orange-dark:   #c94a1f;
    --af-orange-light:  #f07d55;
    --af-orange-muted:  #fde8df;
    --af-orange-xmuted: #fff5f0;

    --af-bg:            #FAFAF8;
    --af-surface:       #FFFFFF;
    --af-border:        #E8E4E0;
    --af-border-soft:   #F0EDE8;

    --af-text:          #1A1A1A;
    --af-text-sub:      #5A5A5A;
    --af-text-muted:    #A0A0A0;

    --af-success:       #16a34a;
    --af-success-bg:    #dcfce7;
    --af-danger:        #dc2626;
    --af-danger-bg:     #fee2e2;
    --af-warning:       #d97706;
    --af-warning-bg:    #fef3c7;

    --af-marketer:      #7C3AED;
    --af-marketer-bg:   #f5f3ff;

    --af-radius-sm:     8px;
    --af-radius:        14px;
    --af-radius-lg:     20px;
    --af-radius-xl:     28px;

    --af-shadow-xs:     0 1px 3px rgba(0,0,0,0.06);
    --af-shadow-sm:     0 2px 10px rgba(0,0,0,0.07);
    --af-shadow:        0 4px 24px rgba(0,0,0,0.09);
    --af-shadow-lg:     0 16px 48px rgba(0,0,0,0.13);
    --af-shadow-orange: 0 8px 28px rgba(232,93,47,0.28);

    --af-sidebar-w:     272px;
    --af-header-h:      64px;
    --af-transition:    0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Page Wrapper ──────────────────────────────────────────── */
.afl-page {
    background: var(--af-bg);
    min-height: 100vh;
    padding-bottom: 80px;
}

.afl-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.afl-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1810 40%, #e85d2f 100%);
    position: relative;
    overflow: hidden;
    padding: 52px 0 48px;
}

.afl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(232,93,47,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating circles decoration */
.afl-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -200px;
    left: -150px;
    pointer-events: none;
}

.afl-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.afl-hero-text { flex: 1; }

.afl-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.afl-hero-eyebrow span {
    width: 6px;
    height: 6px;
    background: var(--af-orange-light);
    border-radius: 50%;
    animation: afl-blink 2s ease-in-out infinite;
}

@keyframes afl-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.afl-hero-title {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 12px;
}

.afl-hero-title em {
    font-style: normal;
    color: var(--af-orange-light);
}

.afl-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 28px;
    line-height: 1.7;
}

/* Hero Stats */
.afl-hero-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.afl-stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 8px 18px;
    transition: all var(--af-transition);
}

.afl-stat-pill:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.afl-stat-num {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.afl-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

/* Hero Search */
.afl-hero-search {
    flex-shrink: 0;
    width: 360px;
}

.afl-search-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--af-radius-lg);
    padding: 20px;
}

.afl-search-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.afl-search-row {
    display: flex;
    gap: 8px;
}

.afl-search-input {
    flex: 1;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: var(--af-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    color: var(--af-text);
    outline: none;
    transition: box-shadow var(--af-transition);
}

.afl-search-input:focus {
    box-shadow: 0 0 0 3px rgba(232,93,47,0.35);
}

.afl-search-input::placeholder { color: var(--af-text-muted); }

.afl-search-btn {
    background: var(--af-orange);
    color: #fff;
    border: none;
    border-radius: var(--af-radius-sm);
    padding: 12px 18px;
    cursor: pointer;
    font-size: 15px;
    transition: all var(--af-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.afl-search-btn:hover {
    background: var(--af-orange-dark);
    transform: scale(1.05);
}

/* Quick categories in hero */
.afl-hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.afl-hero-cat-chip {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all var(--af-transition);
    text-decoration: none;
}

.afl-hero-cat-chip:hover {
    background: var(--af-orange);
    border-color: var(--af-orange);
    color: #fff;
    transform: translateY(-1px);
}

/* ================================================================
   BREADCRUMB + TOOLBAR STRIP
   ================================================================ */
.afl-strip {
    background: var(--af-surface);
    border-bottom: 1px solid var(--af-border-soft);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--af-shadow-xs);
}

.afl-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Breadcrumb */
.afl-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--af-text-muted);
}

.afl-breadcrumb a {
    color: var(--af-text-muted);
    text-decoration: none;
    transition: color var(--af-transition);
}

.afl-breadcrumb a:hover { color: var(--af-orange); }

.afl-breadcrumb-sep {
    color: var(--af-border);
    font-size: 11px;
}

.afl-breadcrumb-current {
    color: var(--af-text);
    font-weight: 600;
}

/* Count & Sort */
.afl-strip-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.afl-results-count {
    font-size: 13px;
    color: var(--af-text-sub);
    white-space: nowrap;
}

.afl-results-count strong {
    color: var(--af-orange);
    font-weight: 700;
}

/* Sort select */
.afl-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.afl-sort-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--af-text-sub);
    white-space: nowrap;
}

.afl-sort-select {
    border: 1.5px solid var(--af-border);
    border-radius: var(--af-radius-sm);
    padding: 7px 14px;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
    color: var(--af-text);
    background: var(--af-surface);
    cursor: pointer;
    outline: none;
    transition: border-color var(--af-transition);
    direction: rtl;
}

.afl-sort-select:focus { border-color: var(--af-orange); }

/* Mobile filter toggle button */
.afl-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--af-orange);
    color: #fff;
    border: none;
    border-radius: var(--af-radius-sm);
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all var(--af-transition);
}

.afl-mobile-filter-btn:hover { background: var(--af-orange-dark); }

/* ================================================================
   MAIN BODY LAYOUT
   ================================================================ */
.afl-body {
    padding-top: 28px;
}

.afl-layout {
    display: grid;
    grid-template-columns: var(--af-sidebar-w) 1fr;
    gap: 28px;
    align-items: start;
}

/* ================================================================
   SIDEBAR FILTERS
   ================================================================ */
.afl-sidebar {
    position: sticky;
    top: calc(var(--af-header-h) + 12px);
    max-height: calc(100vh - var(--af-header-h) - 24px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--af-border) transparent;
}

.afl-sidebar::-webkit-scrollbar { width: 4px; }
.afl-sidebar::-webkit-scrollbar-thumb { background: var(--af-border); border-radius: 4px; }

/* Filter card */
.afl-filter-card {
    background: var(--af-surface);
    border-radius: var(--af-radius-lg);
    border: 1px solid var(--af-border-soft);
    overflow: hidden;
    box-shadow: var(--af-shadow-xs);
}

.afl-filter-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--af-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.afl-filter-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    color: var(--af-text);
}

.afl-filter-title-icon {
    width: 32px;
    height: 32px;
    background: var(--af-orange-muted);
    color: var(--af-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.afl-clear-all {
    font-size: 12px;
    font-weight: 700;
    color: var(--af-orange);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all var(--af-transition);
    font-family: 'Cairo', sans-serif;
}

.afl-clear-all:hover {
    background: var(--af-orange-muted);
}

/* Filter Sections */
.afl-filter-body { padding: 8px 0; }

.afl-filter-section {
    border-bottom: 1px solid var(--af-border-soft);
}

.afl-filter-section:last-child { border-bottom: none; }

.afl-filter-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: background var(--af-transition);
}

.afl-filter-section-toggle:hover { background: var(--af-bg); }

.afl-filter-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--af-text);
}

.afl-filter-section-title i {
    color: var(--af-orange);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.afl-filter-chevron {
    font-size: 11px;
    color: var(--af-text-muted);
    transition: transform var(--af-transition);
}

.afl-filter-section.open .afl-filter-chevron {
    transform: rotate(180deg);
}

.afl-filter-section-body {
    padding: 4px 20px 14px;
    display: none;
}

.afl-filter-section.open .afl-filter-section-body {
    display: block;
}

/* Radio / Checkbox Options */
.afl-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--af-radius-sm);
    cursor: pointer;
    transition: background var(--af-transition);
    margin-bottom: 2px;
}

.afl-filter-option:hover { background: var(--af-bg); }

.afl-filter-option input[type="radio"],
.afl-filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--af-orange);
    cursor: pointer;
    flex-shrink: 0;
}

.afl-filter-option-label {
    flex: 1;
    font-size: 13.5px;
    color: var(--af-text-sub);
    line-height: 1.4;
}

.afl-filter-option-count {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--af-text-muted);
    background: var(--af-bg);
    border: 1px solid var(--af-border-soft);
    padding: 2px 7px;
    border-radius: 999px;
}

/* Price Inputs */
.afl-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.afl-price-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.afl-price-field label {
    font-size: 11px;
    font-weight: 700;
    color: var(--af-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.afl-price-field input {
    border: 1.5px solid var(--af-border);
    border-radius: var(--af-radius-sm);
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
    color: var(--af-text);
    text-align: center;
    outline: none;
    transition: border-color var(--af-transition);
}

.afl-price-field input:focus { border-color: var(--af-orange); }

/* Quick price buttons */
.afl-quick-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.afl-quick-price-btn {
    border: 1.5px solid var(--af-border);
    border-radius: var(--af-radius-sm);
    padding: 6px 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--af-text-sub);
    background: var(--af-surface);
    cursor: pointer;
    text-align: center;
    transition: all var(--af-transition);
    font-family: 'Cairo', sans-serif;
}

.afl-quick-price-btn:hover,
.afl-quick-price-btn.active {
    border-color: var(--af-orange);
    color: var(--af-orange);
    background: var(--af-orange-xmuted);
}

.afl-apply-price-btn {
    width: 100%;
    background: var(--af-orange);
    color: #fff;
    border: none;
    border-radius: var(--af-radius-sm);
    padding: 9px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all var(--af-transition);
}

.afl-apply-price-btn:hover { background: var(--af-orange-dark); }

/* Rating Stars Filter */
.afl-rating-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--af-radius-sm);
    cursor: pointer;
    transition: background var(--af-transition);
    margin-bottom: 2px;
}

.afl-rating-option:hover { background: var(--af-bg); }

.afl-rating-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--af-orange);
    cursor: pointer;
    flex-shrink: 0;
}

.afl-stars {
    display: flex;
    gap: 2px;
}

.afl-stars i {
    font-size: 11px;
    color: #fbbf24;
}

.afl-stars i.far { color: #d1d5db; }

.afl-rating-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--af-text-sub);
}

/* Active Filters Tags */
.afl-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--af-border-soft);
}

.afl-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--af-orange-muted);
    color: var(--af-orange-dark);
    border: 1px solid rgba(232,93,47,0.2);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
}

.afl-tag-remove {
    background: none;
    border: none;
    color: var(--af-orange-dark);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--af-transition);
    display: flex;
    align-items: center;
}

.afl-tag-remove:hover { opacity: 1; }

/* ================================================================
   PRODUCTS AREA
   ================================================================ */
.afl-products-area {
    min-width: 0;
}

/* Toolbar */
.afl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--af-surface);
    border: 1px solid var(--af-border-soft);
    border-radius: var(--af-radius);
    padding: 12px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.afl-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.afl-product-count-badge {
    background: var(--af-orange-muted);
    color: var(--af-orange);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.afl-page-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--af-text);
}

/* View toggle */
.afl-view-toggle {
    display: flex;
    gap: 2px;
    background: var(--af-bg);
    border: 1px solid var(--af-border-soft);
    border-radius: var(--af-radius-sm);
    padding: 3px;
}

.afl-view-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--af-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--af-transition);
}

.afl-view-btn.active {
    background: var(--af-surface);
    color: var(--af-orange);
    box-shadow: var(--af-shadow-xs);
}

.afl-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================================================================
   ACTIVE FILTERS CHIPS
   ================================================================ */
.afl-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.afl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--af-surface);
    border: 1.5px solid var(--af-orange);
    color: var(--af-orange);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 600;
    transition: all var(--af-transition);
}

.afl-chip-remove {
    background: none;
    border: none;
    color: var(--af-orange);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    transition: opacity var(--af-transition);
}

.afl-chip-remove:hover { opacity: 0.6; }

/* ================================================================
   PRODUCTS GRID
   ================================================================ */
.afl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    transition: all var(--af-transition);
}

.afl-grid.list-view {
    grid-template-columns: 1fr;
    gap: 14px;
}

/* ================================================================
   PRODUCT CARD PRO
   ✅ v6.3 COMPAT: لا overflow:hidden على article
   ✅ الأزرار دايمًا مرئية (مش بس على hover)
   ================================================================ */

article.product-card-v2 {
    background: var(--af-surface);
    border-radius: var(--af-radius-lg);
    border: 1.5px solid var(--af-border-soft);
    overflow: visible;           /* ✅ CRITICAL: مش hidden عشان الأزرار تبان */
    box-shadow: var(--af-shadow-xs);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    will-change: transform;
}

article.product-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: var(--af-shadow-lg);
    border-color: rgba(232,93,47,0.25);
}

/* Image wrapper — overflow:hidden هنا للصورة بس */
article.product-card-v2 .image-wrapper-v2 {
    position: relative;
    background: linear-gradient(145deg, #fafaf9 0%, #f0ede8 100%);
    aspect-ratio: 1 / 1;
    overflow: hidden;            /* ✅ الصورة بتتقطع صح */
    flex-shrink: 0;
    border-radius: var(--af-radius-lg) var(--af-radius-lg) 0 0;
}

/* Shine effect */
article.product-card-v2 .image-wrapper-v2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
    background-size: 200% 100%;
    background-position: 200% 0;
    transition: background-position 0.55s ease;
    pointer-events: none;
    z-index: 2;
}

article.product-card-v2:hover .image-wrapper-v2::after {
    background-position: -100% 0;
}

/* Product image */
article.product-card-v2 .product-image-v2 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    display: block;
}

article.product-card-v2:hover .product-image-v2 {
    transform: scale(1.06);
}

/* Badges — داخل image-wrapper يسار */
article.product-card-v2 .badges-stack-v2 {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

article.product-card-v2 .badge-primary-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    white-space: nowrap;
    animation: afl-badge-pop 0.45s cubic-bezier(0.68,-0.55,0.265,1.55) both;
}

@keyframes afl-badge-pop {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

article.product-card-v2 .badge-hot-v2 {
    background: linear-gradient(135deg, var(--af-orange) 0%, var(--af-orange-dark) 100%);
}

article.product-card-v2 .badge-new-v2 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

article.product-card-v2 .badges-secondary-v2,
article.product-card-v2 .badges-features-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

article.product-card-v2 .badge-secondary-v2 {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(255,255,255,0.95);
    color: var(--af-text-sub);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: fit-content;
}

article.product-card-v2 .badge-limited-v2 { color: var(--af-danger); }
article.product-card-v2 .badge-bestseller-v2 { color: var(--af-warning); }

article.product-card-v2 .badge-feature-v2 {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.85);
    color: var(--af-success);
    width: fit-content;
}

/* ================================================================
   ✅ ACTION BUTTONS — دايمًا مرئية (مش بس hover)
   الأزرار على يمين الكارد، الـ badges على اليسار
   ================================================================ */
article.product-card-v2 .action-buttons-floating-v2 {
    position: absolute;
    top: 10px;
    right: 10px;                 /* ✅ يمين الكارد */
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
    opacity: 1;                  /* ✅ دايمًا مرئية */
    transform: none;             /* ✅ مفيش offset */
}

article.product-card-v2 .action-btn-v2 {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article.product-card-v2 .action-btn-v2:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* Wishlist — قلب وردي */
article.product-card-v2 .wishlist-btn-v2 i { color: #f87171; font-size: 14px; }
article.product-card-v2 .wishlist-btn-v2:hover { background: #fff1f2; border-color: #fca5a5; }
article.product-card-v2 .wishlist-btn-v2.active { background: #ef4444; border-color: #ef4444; }
article.product-card-v2 .wishlist-btn-v2.active i { color: #fff !important; }

/* Compare — برتقالي */
article.product-card-v2 .compare-btn-v2 i { color: var(--af-orange); font-size: 13px; }
article.product-card-v2 .compare-btn-v2:hover { background: var(--af-orange-xmuted); border-color: #ffd5c2; }

/* Share — أزرق */
article.product-card-v2 .share-btn-v2 i { color: #2563eb; font-size: 13px; }
article.product-card-v2 .share-btn-v2:hover { background: #eff6ff; border-color: #93c5fd; }

/* Content section */
article.product-card-v2 .product-info-v2 {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    background: #fff;
    border-radius: 0 0 var(--af-radius-lg) var(--af-radius-lg);
}

/* Category badge */
article.product-card-v2 .product-category-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.2s;
    margin-bottom: 2px;
}

article.product-card-v2 .product-category-v2:hover {
    background: var(--af-orange-xmuted);
    color: var(--af-orange);
}

/* Title */
article.product-card-v2 .product-title-v2 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

article.product-card-v2 .product-link-v2 {
    color: var(--af-text);
    text-decoration: none;
    transition: color var(--af-transition);
}

article.product-card-v2 .product-link-v2:hover { color: var(--af-orange); }

/* Rating */
article.product-card-v2 .product-meta-row-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

article.product-card-v2 .product-rating-v2 {
    display: flex;
    align-items: center;
    gap: 5px;
}

article.product-card-v2 .stars-v2 { display: flex; gap: 2px; }
article.product-card-v2 .stars-v2 .fas.fa-star,
article.product-card-v2 .stars-v2 .fas.fa-star-half-alt { color: #fbbf24; font-size: 11px; }
article.product-card-v2 .stars-v2 .far.fa-star { color: #d1d5db; font-size: 11px; }
article.product-card-v2 .rating-count-v2 { font-size: 11.5px; color: var(--af-text-muted); font-weight: 600; }
article.product-card-v2 .sales-counter-v2 { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--af-text-muted); }

/* Pricing */
article.product-card-v2 .price-section-v2 { margin-bottom: 4px; }

article.product-card-v2 .price-regular-v2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--af-text);
    letter-spacing: -0.5px;
    line-height: 1;
}

article.product-card-v2 .price-deal-v2 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

article.product-card-v2 .price-current-v2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--af-orange);
    letter-spacing: -0.5px;
    line-height: 1;
}

article.product-card-v2 .price-old-v2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--af-text-muted);
    text-decoration: line-through;
}

article.product-card-v2 .discount-badge-v2 {
    background: linear-gradient(135deg, var(--af-orange-muted), #ffd5c2);
    color: var(--af-orange-dark);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(232,93,47,0.2);
}

article.product-card-v2 .savings-info-v2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--af-success-bg);
    color: var(--af-success);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid #bbf7d0;
    margin-top: 5px;
    width: fit-content;
}

/* Marketer pricing */
article.product-card-v2 .marketer-pricing-v2 {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #4f46e5 100%);
    border-radius: 11px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(67,56,202,0.25);
}

article.product-card-v2 .price-row-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    border-radius: 7px;
    margin-bottom: 4px;
}

article.product-card-v2 .price-row-v2.highlight { background: rgba(255,255,255,0.12); }
article.product-card-v2 .price-row-v2.profit { background: rgba(255,255,255,0.07); }
article.product-card-v2 .label-v2 { font-size: 11px; color: rgba(255,255,255,0.85); font-weight: 600; }
article.product-card-v2 .value-v2 { font-size: 13px; font-weight: 700; color: #fff; }
article.product-card-v2 .value-v2.profit-value { color: #86efac; }

/* Stock */
article.product-card-v2 .product-meta-bottom-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

article.product-card-v2 .stock-status-v2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

article.product-card-v2 .stock-status-v2.in-stock {
    background: var(--af-success-bg);
    color: var(--af-success);
    border: 1px solid #bbf7d0;
}

article.product-card-v2 .stock-status-v2.in-stock .fa-circle { font-size: 6px; }

article.product-card-v2 .stock-status-v2.out-stock {
    background: var(--af-danger-bg);
    color: var(--af-danger);
    border: 1px solid #fecaca;
}

article.product-card-v2 .shipping-info-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--af-success);
}

/* ================================================================
   CTA Buttons
   ✅ زرار السلة (icon) واضح بـ border برتقالي
   ================================================================ */
article.product-card-v2 .product-actions-v2 {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    gap: 7px;
}

article.product-card-v2 .btn-add-cart-v2 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: var(--af-radius-sm);
    font-size: 13.5px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

article.product-card-v2 .btn-primary-v2 {
    background: linear-gradient(135deg, var(--af-orange) 0%, var(--af-orange-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(232,93,47,0.3);
}

article.product-card-v2 .btn-primary-v2:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(232,93,47,0.4);
    filter: brightness(1.05);
}

article.product-card-v2 .btn-primary-v2:disabled {
    background: #e5e7eb;
    color: var(--af-text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

/* زر السلة icon */
article.product-card-v2 .btn-add-cart-v2--icon {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-height: 44px;
    padding: 0 !important;
    background: var(--af-orange-xmuted) !important;
    color: var(--af-orange) !important;
    border: 2px solid var(--af-orange) !important;
    border-radius: var(--af-radius-sm) !important;
    box-shadow: none !important;
    font-size: 1rem !important;
}

article.product-card-v2 .btn-add-cart-v2--icon:hover:not(:disabled) {
    background: var(--af-orange) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

/* ================================================================
   LIST VIEW
   ================================================================ */
.afl-grid.list-view article.product-card-v2 {
    flex-direction: row;
    max-height: 180px;
}

.afl-grid.list-view article.product-card-v2 .image-wrapper-v2 {
    width: 160px;
    min-width: 160px;
    aspect-ratio: auto;
    border-radius: 0;
}

.afl-grid.list-view article.product-card-v2 .product-info-v2 {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 20px;
}

.afl-grid.list-view article.product-card-v2 .product-title-v2 {
    min-height: auto;
    flex: 1;
    min-width: 180px;
    -webkit-line-clamp: 2;
}

.afl-grid.list-view article.product-card-v2 .product-actions-v2 {
    margin-top: 0;
    padding-top: 0;
    min-width: 140px;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.afl-empty {
    background: var(--af-surface);
    border-radius: var(--af-radius-lg);
    border: 1px solid var(--af-border-soft);
    padding: 80px 40px;
    text-align: center;
}

.afl-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--af-orange-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 24px;
}

.afl-empty-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--af-text);
    margin-bottom: 10px;
}

.afl-empty-text {
    color: var(--af-text-sub);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.afl-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--af-orange);
    color: #fff;
    border-radius: var(--af-radius-sm);
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--af-transition);
}

.afl-empty-btn:hover {
    background: var(--af-orange-dark);
    transform: translateY(-2px);
    color: #fff;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.afl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

/* ================================================================
   SKELETON
   ================================================================ */
@keyframes afl-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.afl-skeleton {
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4e0 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: afl-shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ================================================================
   SIDEBAR OVERLAY (mobile)
   ================================================================ */
.afl-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
    backdrop-filter: blur(4px);
}

.afl-sidebar-overlay.active { display: block; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .afl-layout { grid-template-columns: 240px 1fr; gap: 20px; }
    .afl-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}

@media (max-width: 900px) {
    .afl-hero-search { display: none; }
    .afl-hero-inner { flex-direction: column; }
}

@media (max-width: 768px) {
    .afl-layout { grid-template-columns: 1fr; }

    .afl-sidebar {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(320px, 100vw);
        max-height: 100vh;
        z-index: 50;
        background: var(--af-surface);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        border-radius: 0;
        padding: 0;
    }

    [dir="rtl"] .afl-sidebar { right: 0; left: auto; transform: translateX(100%); }
    .afl-sidebar.open { transform: translateX(0); box-shadow: -20px 0 60px rgba(0,0,0,0.25); }
    [dir="rtl"] .afl-sidebar.open { transform: translateX(0); }

    .afl-mobile-filter-btn { display: flex; }
    .afl-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .afl-hero { padding: 36px 0 32px; }
    .afl-hero-stats { gap: 8px; }
    .afl-stat-pill { padding: 6px 12px; }

    .afl-grid.list-view article.product-card-v2 { flex-direction: column; max-height: none; }
    .afl-grid.list-view article.product-card-v2 .image-wrapper-v2 { width: 100%; aspect-ratio: 1 / 1; }
}

@media (max-width: 480px) {
    .afl-container { padding: 0 14px; }
    .afl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    article.product-card-v2 .product-info-v2 { padding: 10px; }
    article.product-card-v2 .product-title-v2 { font-size: 12.5px; }
    article.product-card-v2 .price-regular-v2,
    article.product-card-v2 .price-current-v2 { font-size: 18px; }
    article.product-card-v2 .btn-add-cart-v2 { padding: 9px 12px; font-size: 12.5px; }
    .afl-strip-inner { flex-wrap: wrap; gap: 8px; }
}

/* ================================================================
   CLOSE BUTTON FOR MOBILE SIDEBAR
   ================================================================ */
.afl-sidebar-close {
    display: none;
    position: absolute;
    top: 14px; left: 14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--af-bg);
    border: 1px solid var(--af-border);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--af-text-sub);
    z-index: 5;
    transition: all var(--af-transition);
}

.afl-sidebar-close:hover { background: var(--af-orange-muted); color: var(--af-orange); }

@media (max-width: 768px) {
    .afl-sidebar-close { display: flex; }
    .afl-filter-card { border-radius: 0; height: 100%; overflow-y: auto; }
}

/* ================================================================
   UTILITY
   ================================================================ */
.afl-hidden { display: none !important; }
.afl-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
