/* Basic Styling for Store Page */
body {
    background-color: #1e2a47; /* خلفية داكنة */
    color: white;
    font-family: Arial, sans-serif;
}

/* تعديل main لكي يكون التصميم بشكل مرن */
main {
    display: flex;
    flex-direction: column; /* ترتيب العناصر عمودياً */
    align-items: center; /* تمركز العناصر في المنتصف */
    padding: 40px 20px;
    min-height: calc(100vh - 140px); /* مناسب مع الهيدر والفوتر */
}

/* Center the h1 title at the top */
h1 {
    font-size: 2.5rem;
    color: #00E5FF;
    margin-bottom: 20px;
    text-align: center;  /* تمركز العنوان */
}

/* Store Card */
.store-card {
    background: rgba(18, 32, 50, 0.8); /* خلفية داكنة مع بعض الشفافية */
    border-radius: 12px;  /* زيادة حواف الكارت لجعله أكثر نعومة */
    padding: 20px;  /* زيادة المسافة الداخلية لجعل المحتوى أكثر تباعدًا */
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);  /* تأثير الظل أكثر وضوحًا */
    margin-bottom: 30px;
    width: 100%; /* عرض كامل للمتجر */
    max-width: 1200px; /* تحديد عرض ثابت */
}

/* Grid for Products - تعديل لجعل كارت واحد في المنتصف */
.products-grid {
    display: flex;
    justify-content: center; /* تمركز أفقي */
    align-items: center; /* تمركز عمودي */
    margin-top: 25px;  /* مسافة أكبر من الأعلى */
    width: 100%;
}

/* Product Card - تعديلات لجعل الكارت في المنتصف */
.store-item-card {
    background: rgba(18, 32, 50, 0.9); /* خلفية داكنة مع شفافية أقل */
    border-radius: 12px;  /* زيادة حواف الكارت لجعله أكثر نعومة */
    padding: 30px;  /* زيادة المسافة الداخلية */
    text-align: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);  /* تأثير الظل أكثر وضوحًا */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;  /* زيادة عرض الكارت */
    margin: 0 auto;  /* تمركز الكارت */
}

/* تحسين التأثير عند المرور على الكارت */
.store-item-card:hover {
    transform: translateY(-8px); /* رفع الكارت بشكل أكثر عند المرور عليه */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); /* تأثير الظل يصبح أكبر */
}

/* تحسين الصورة داخل الكارت */
.item-img {
    width: 100%;
    height: 160px;  /* زيادة ارتفاع الصورة بشكل معتدل */
    object-fit: cover;  /* الحفاظ على نسبة الأبعاد الصحيحة للصورة */
    border-radius: 8px;  /* زاوية دائرية للصورة */
    margin-bottom: 18px;  /* زيادة المسافة بين الصورة والمحتوى */
}

/* تحسين الخطوط داخل الكارت */
.store-item-name {
    font-size: 1.5rem;  /* زيادة حجم الخط */
    color: #fff;
    margin-bottom: 15px;  /* زيادة المسافة بين الاسم والوصف */
    font-weight: bold; /* جعل اسم المنتج أكثر بروزًا */
}

.store-item-description {
    font-size: 1.1rem;  /* زيادة حجم الوصف */
    color: #ccc;
    margin-bottom: 20px;  /* مسافة أكبر بين الوصف والسعر */
    line-height: 1.5;
}

.price {
    font-size: 1.3rem;  /* زيادة حجم الخط */
    color: #4CAF50;
    margin-bottom: 20px;  /* مسافة أكبر بين السعر وزر الشراء */
    font-weight: bold;
}

/* زر الشراء */
.buy-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 16px 30px;  /* زيادة حجم الزر */
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 100%;
    font-weight: bold;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-3px); /* تأثير رفع الزر بشكل أكثر وضوحًا */
}

/* Custom Points Input Styles */
.custom-points-input {
    margin: 20px 0;
}

.custom-points-input input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: border-color 0.3s ease;
}

.custom-points-input input:focus {
    outline: none;
    border-color: #00E5FF;
    background: rgba(255, 255, 255, 0.15);
}

.custom-points-input input::placeholder {
    color: #aaa;
}

.custom-points-input small {
    color: #aaa;
    display: block;
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.price-calculation {
    text-align: center;
    margin: 25px 0;
    padding: 15px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    border: 1px solid #2ecc71;
}

.calculated-price {
    font-size: 20px;
    font-weight: bold;
    color: #2ecc71;
}

#buyPointsBtn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
    margin-top: 10px;
}

#buyPointsBtn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .store-card {
        padding: 15px;
    }

    .store-item-card {
        padding: 25px;
        max-width: 350px;
    }

    .store-item-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }

    .store-item-card {
        padding: 20px;
        max-width: 300px;
    }

    .store-item-name {
        font-size: 1.2rem;
    }

    .buy-btn {
        padding: 14px 25px;
        font-size: 1rem;
    }

    .custom-points-input input {
        font-size: 16px;
        padding: 12px;
    }

    .calculated-price {
        font-size: 18px;
    }
}

.hidden {
    display: none;
}

.auth-error {
    text-align: center;
    font-size: 1.2rem;
    color: #ff5733; /* لون خط تحذيري */
    padding: 20px;
    background-color: #fff3cd; /* خلفية تحذيرية */
    border-radius: 5px;
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}