/* ============================================
   SHARE - ITEMS
   بطاقات المشاركات + صفحة جميع المشاركات
   ============================================ */

.items-section {
    padding: 40px 0 80px;
    background: var(--gray-50);
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 130px 0 50px;
    background: linear-gradient(135deg, #0D9488 0%, #0F766E 50%, #065F46 100%);
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.8;
}

/* ===== FILTER SECTION ===== */
.filter-section {
    padding: 30px 0 0;
    background: var(--gray-50);
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--charity-primary);
    color: var(--charity-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--charity-primary);
    border-color: var(--charity-primary);
    color: var(--white);
}

/* ===== SEARCH FORM ===== */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 10px;
    gap: 0;
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

[dir="rtl"] .search-form input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.search-form input:focus {
    border-color: var(--charity-primary);
}

.search-form button {
    padding: 12px 20px;
    background: var(--charity-primary);
    color: var(--white);
    border: 2px solid var(--charity-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    transition: all 0.3s;
}

[dir="rtl"] .search-form button {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-form button:hover {
    background: var(--charity-primary-dark);
    border-color: var(--charity-primary-dark);
}

/* ===== ITEMS GRID ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ===== ITEM CARD ===== */
.item-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid rgba(13,148,136,0.08);
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--charity-primary);
}

.item-image {
    height: 200px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.item-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--charity-primary);
    box-shadow: var(--shadow-sm);
}

[dir="rtl"] .item-category-badge {
    left: auto;
    right: 12px;
}

.item-status {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.item-status.active {
    background: #DCFCE7;
    color: #16A34A;
}

.item-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.item-status.reserved {
    background: #DBEAFE;
    color: #2563EB;
}

.item-status.completed {
    background: #E5E7EB;
    color: #6B7280;
}

.item-status.expired {
    background: #FEE2E2;
    color: #DC2626;
}

[dir="rtl"] .item-status {
    right: auto;
    left: 12px;
}

.item-content {
    padding: 20px;
}

.item-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.item-content h3 a {
    color: var(--gray-900);
    text-decoration: none;
    transition: all 0.3s;
}

.item-content h3 a:hover {
    color: var(--charity-primary);
}

.item-desc {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
    gap: 8px;
}

.item-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--charity-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.item-user .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
}

.item-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 50px;
    background: var(--charity-primary);
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.item-actions .btn-sm:hover {
    background: var(--charity-primary-dark);
}

.items-actions {
    text-align: center;
    margin-top: 40px;
}

.items-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.items-empty i {
    font-size: 48px;
    color: var(--gray-300);
    display: block;
    margin-bottom: 16px;
}

.items-empty p {
    color: var(--gray-500);
    font-size: 16px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--charity-primary);
    color: var(--white);
    border-color: var(--charity-primary);
}

.pagination .pagination-current {
    background: var(--charity-primary);
    color: var(--white);
    border-color: var(--charity-primary);
}

.pagination .pagination-prev,
.pagination .pagination-next {
    width: auto;
    padding: 0 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 110px 0 30px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .filter-bar {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .item-image {
        height: 180px;
    }
    
    .pagination a {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 24px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .search-form input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .search-form button {
        padding: 8px 14px;
    }
}

/* ============================================
   FILTER SECTION - فلترة متقدمة
   ============================================ */

.filter-section {
    padding: 20px 0 0;
    background: var(--gray-50);
}

.filter-container {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

/* ===== Search Bar ===== */
.search-form {
    margin-bottom: 16px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    transition: all 0.3s;
    overflow: hidden;
}

.search-input-wrapper:focus-within {
    border-color: var(--charity-primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.08);
}

.search-input-wrapper i {
    padding: 0 12px;
    color: var(--gray-400);
    font-size: 16px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: var(--gray-800);
}

.search-input-wrapper input::placeholder {
    color: var(--gray-400);
}

.search-input-wrapper button {
    padding: 10px 16px;
    background: var(--charity-primary);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.search-input-wrapper button:hover {
    background: var(--charity-primary-dark);
}

/* ===== Filter Toggle (Mobile) ===== */
.filter-toggle {
    display: none;
    width: 100%;
    padding: 10px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-toggle:hover {
    border-color: var(--charity-primary);
    color: var(--charity-primary);
}

/* ===== Filter Options ===== */
.filter-options {
    display: block;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.filter-group label i {
    margin-right: 4px;
}

[dir="rtl"] .filter-group label i {
    margin-right: 0;
    margin-left: 4px;
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364758B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

[dir="rtl"] .filter-group select {
    background-position: left 12px center;
    padding-right: 12px;
    padding-left: 36px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--charity-primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.08);
}

/* ===== Filter Actions ===== */
.filter-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.sort-group {
    flex: 1;
    min-width: 150px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-reset:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* ============================================
   RESULTS INFO
   ============================================ */

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 16px;
    padding: 12px 16px;
    background: #FFFFFF;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.results-count {
    font-weight: 600;
    color: var(--gray-700);
}

.search-query {
    font-size: 14px;
    color: var(--gray-500);
}

.search-query strong {
    color: var(--charity-primary);
}

/* ============================================
   PRICE BADGE
   ============================================ */

.price-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

[dir="rtl"] .price-badge {
    left: auto;
    right: 10px;
}

.price-badge.free {
    background: #DCFCE7;
    color: #16A34A;
}

.price-badge.paid {
    background: #DBEAFE;
    color: #2563EB;
}

/* ============================================
   RESPONSIVE - FILTER
   ============================================ */

@media (max-width: 992px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-toggle {
        display: flex;
    }
    
    .filter-options {
        display: none;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--gray-200);
    }
    
    .filter-options.active {
        display: block;
    }
    
    .filter-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-group {
        min-width: auto;
    }
    
    .btn-reset {
        justify-content: center;
    }
    
    .results-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        padding: 16px;
    }
}

.item-status.expired {
    background: #FEE2E2;
    color: #DC2626;
}