/* ===================================
   المتغيرات والألوان الأساسية - Modern Theme
   =================================== */
:root {
    /* Primary Colors - Modern Palette */
    --primary-color: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

    /* Secondary Colors */
    --secondary-color: #6366f1;
    --secondary-light: #818cf8;
    --secondary-dark: #4f46e5;

    /* Accent Colors */
    --accent-color: #f43f5e;
    --accent-light: #fb7185;
    --gold-color: #f59e0b;
    --purple-color: #8b5cf6;

    /* Background Colors */
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #f8fafc;
    --lighter-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);

    /* Text Colors */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;

    /* Border & Divider */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Shadows - Modern Layered */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 20px 30px -5px rgba(16, 185, 129, 0.3);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius - Modern Rounded */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===================================
   إعادة تعيين وإعدادات عامة
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===================================
   الهيدر والتنقل - Modern Design
   =================================== */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.125rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.report-needy-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.report-needy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.cart-icon {
    position: relative;
    background: var(--primary-gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.cart-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: var(--radius-full);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    animation: bounce 0.5s;
    box-shadow: 0 2px 10px rgba(244, 63, 94, 0.5);
}

/* ===================================
   البانر الرئيسي
   =================================== */
.hero-banner {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.9), rgba(52, 152, 219, 0.9)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: shimmer 3s infinite;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-banner h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s;
}

.hero-banner p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s;
}

.hero-actions-main {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s 0.2s both;
}

.hero-cta-btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.hero-cta-btn.primary {
    background: var(--primary-gradient);
    color: white;
}

.hero-cta-btn.secondary {
    background: white;
    color: var(--primary-dark);
}

.hero-cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.hero-cta-btn.primary:hover {
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
}

.hero-cta-btn.secondary:hover {
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    animation: fadeIn 1s;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    color: var(--gold-color);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===================================
   قسم الآية القرآنية
   =================================== */
.quran-section {
    padding: 3rem 1rem;
    margin: -2rem auto 2rem;
    position: relative;
    z-index: 10;
}

.quran-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 3px solid var(--primary-color);
    position: relative;
    backdrop-filter: blur(10px);
}

.quran-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
}

.quran-verse {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 2;
    margin: 0;
    font-family: 'Cairo', sans-serif;
}

.quran-verse cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-style: normal;
    font-weight: 600;
}

@media (max-width: 768px) {
    .quran-container {
        padding: 2rem 1.5rem;
    }

    .quran-verse {
        font-size: 1.4rem;
    }

    .quran-section {
        margin: -1.5rem auto 1rem;
    }
}

/* ===================================
   قسم المنتجات - Modern Cards
   =================================== */
.container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeIn 1s;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: white;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-weight: 800;
    letter-spacing: -1px;
}

.section-title p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.product-card {
    background: var(--lighter-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeInUp 0.6s;
    position: relative;
    border: 1px solid var(--border-light);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--gold-color), #ea580c);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

.product-info {
    padding: var(--spacing-md);
}

.product-name {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.product-description {
    color: var(--text-medium);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
}

.product-price span {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-bg);
    border-radius: var(--radius-full);
    padding: 0.375rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.quantity-selector:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.quantity-btn {
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.15);
    box-shadow: var(--shadow);
}

.quantity-btn:active {
    transform: scale(1.05);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.add-to-cart-btn {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    letter-spacing: 0.3px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* ===================================
   الفوتر
   =================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-light);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li::before {
    content: '◀ ';
    color: var(--primary-color);
    margin-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   الرسوم المتحركة
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes shimmer {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* ===================================
   التصميم المتجاوب - Mobile First Enhanced
   =================================== */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 576px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .header {
        padding: 0.75rem 0;
    }

    .header-content {
        padding: 0 var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .logo-text h1 {
        font-size: 1.25rem;
    }

    .logo-text p {
        display: none;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .cart-icon {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .report-needy-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .cart-icon span:not(.cart-badge),
    .report-needy-btn span {
        display: none;
    }

    .hero-banner {
        padding: 2rem 1rem;
    }

    .hero-banner h2 {
        font-size: 1.75rem;
    }

    .hero-banner p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
        flex-direction: column;
    }

    .stat-number {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-card {
        border-radius: var(--radius-lg);
    }

    .product-image {
        height: 220px;
    }

    .product-info {
        padding: var(--spacing-sm);
    }

    .product-name {
        font-size: 1.25rem;
    }

    .product-price {
        font-size: 1.75rem;
    }

    .product-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .quantity-selector {
        width: 100%;
        justify-content: center;
    }

    .add-to-cart-btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 577px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 769px) and (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 993px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    .quantity-btn,
    .add-to-cart-btn,
    .cart-icon {
        min-height: 44px;
        min-width: 44px;
    }

    .product-card:hover {
        transform: none;
    }

    .product-card:active {
        transform: scale(0.98);
    }
}

/* ===================================
   أزرار المشاركة الاجتماعية - Social Share
   =================================== */
.share-container {
    padding: 3rem 0;
    text-align: center;
}

.share-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.share-btn {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.share-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.share-btn:hover,
.share-btn:active {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.share-btn:active {
    transform: translateY(-2px) scale(0.95);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0C4D9A);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2, #0D82C4);
}

.share-btn.copy {
    background: linear-gradient(135deg, #6366f1, #4338ca);
}

.share-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    margin: 2rem auto;
    max-width: 650px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.share-card .share-title {
    color: white;
}

.share-success-card {
    background: white;
    border: 3px solid var(--primary-color);
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    margin: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.share-success-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 900;
}

.share-success-card p {
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

@media (max-width: 576px) {
    .share-btn {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        border-radius: 16px;
    }

    .share-buttons {
        gap: 1rem;
    }

    .share-title {
        font-size: 1.25rem;
    }
}