* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f97316;
  --background-light: #f8fafc;
  --background-dark: #1e293b;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ==================== GLOBAL STYLES ==================== */
body {
  font-family: "Inter", "Poppins", sans-serif;
  color: var(--text-dark);
  background-color: #fff;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* ==================== CONTAINER ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==================== NAVBAR - IMPROVED ==================== */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  height: 70px;
}

/* Improved logo styling with better visual hierarchy */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  transition: var(--transition);
}

.logo-icon:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

/* Enhanced navigation menu with better spacing */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: white;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 6px;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.nav-item-group {
  list-style: none;
}

/* Improved dropdown menu styling */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-toggle i:last-child {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  list-style: none;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  margin-top: 8px;
  overflow: hidden;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown:hover .dropdown-toggle i:last-child {
  transform: rotate(180deg);
}

.dropdown-item {
  color: var(--text-dark);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: var(--background-light);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  padding-left: 15px;
}

/* Auth Buttons */
.login-btn,
.register-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.login-btn {
  border: 2px solid white;
  color: white;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.register-btn {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.register-btn:hover {
  background: white;
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 25px;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}

/* ==================== ALERTS ==================== */
.alert {
  padding: 15px 0;
  margin-bottom: 0;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #d1fae5;
  border-left: 4px solid var(--success-color);
}

.alert-success .alert-content {
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  border-left: 4px solid var(--error-color);
}

.alert-error .alert-content {
  color: #7f1d1d;
}

.alert-info {
  background: #dbeafe;
  border-left: 4px solid var(--primary-color);
}

.alert-info .alert-content {
  color: #0c2d6b;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--accent-color);
  color: white;
}

.btn-secondary:hover {
  background: #d97706;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-block {
  width: 100%;
}

/* ==================== MAIN CONTENT ==================== */
main {
  min-height: calc(100vh - 70px);
}

/* ==================== SEARCH BOX ==================== */
.search-box {
  margin: 30px auto;
  max-width: 700px;
  position: relative;
}

.search-form {
  display: flex;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-input {
  flex: 1;
  padding: 14px 24px;
  border: none;
  outline: none;
  font-size: 15px;
}

.search-button {
  padding: 14px 32px;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.search-button:hover {
  background: var(--secondary-color);
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 8px;
}

.search-result-item {
  display: flex;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
  align-items: center;
  gap: 12px;
}

.search-result-item:hover {
  background: var(--background-light);
}

.search-result-cover {
  width: 50px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
}

.search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.search-result-author {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
}

.no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-light);
}

/* ==================== SLIDER ==================== */
.slider-container {
  margin: 40px 0;
  padding: 0;
  background: linear-gradient(135deg, var(--background-light) 0%, white 100%);
}

.mySwiper {
  width: 100%;
}

.swiper-slide {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* تعديل اتجاه السلايدر إلى أفقي */
.slide-content {
  display: flex;
  flex-direction: row; /* تغيير الاتجاه إلى أفقي */
  align-items: center; /* محاذاة العناصر أفقيًا */
  padding: 30px;
  background-color: #e3f2fd; /* خلفية زرقاء فاتحة */
  border-radius: 10px; /* إضافة زوايا مستديرة (اختياري) */
}

/* تعديل حجم الصورة لتتناسب مع التصميم الأفقي */
.slide-image {
  width: 40%; /* عرض أقل للصورة */
  height: 250px; /* ارتفاع ثابت */
  margin-right: 20px; /* مسافة بين الصورة والمعلومات */
  margin-bottom: 0; /* إزالة المسافة السفلية */
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px; /* زوايا مستديرة للصورة (اختياري) */
}

/* تعديل صندوق المعلومات ليملأ المساحة المتبقية */
.slide-info {
  width: 60%; /* عرض أكبر للمعلومات */
  padding: 10px;
}

/* بقية الأنماط كما هي */
.slide-info h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-dark);
  font-weight: 700;
}

.slide-description {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.6;
}

.slide-prices {
  margin: 18px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.price-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.price-tag.pdf {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #0d47a1;
}

.price-tag.print {
  background: #f3f4f6;
  color: #374151;
}




/* ==================== WELCOME SECTION ==================== */
.welcome-section {
  padding: 70px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  margin: 50px 0;
  border-radius: 16px;
}

.welcome-content {
  max-width: 800px;
  margin: 0 auto;
}

.welcome-section h2 {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.welcome-section p {
  font-size: 17px;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== BOOKS SECTION - IMPROVED ==================== */
.books-section {
  padding: 50px 0;
  border-bottom: 1px solid var(--border-color);
}

.books-section:last-of-type {
  border-bottom: none;
}

.section-header {
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.category-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 28px;
  color: var(--text-dark);
  margin: 0;
  font-weight: 700;
}

.section-header p {
  color: var(--text-light);
  font-size: 14px;
  margin: 8px 0 0 0;
}

/* ==================== BOOKS GRID ==================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 0;
}

.book-card-link {
  text-decoration: none;
  color: inherit;
}

.book-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: var(--shadow-sm);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* Reduced book cover height for better proportions */
.book-cover {
  height: 240px;
  overflow: hidden;
  background: var(--background-light);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.book-card:hover .book-cover img {
  transform: scale(1.06);
}

.book-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author {
  font-size: 12px;
  color: var(--primary-color);
  margin: 0 0 8px 0;
  font-weight: 600;
}

.book-description {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
  flex: 1;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-prices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.price-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 11px;
}

.price-tag.pdf {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #0d47a1;
}

.price-tag.print {
  background: #f3f4f6;
  color: #374151;
}

.no-books {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* ==================== TESTIMONIALS ==================== */
.testimonials-section {
  padding: 70px 0;
  background: var(--background-light);
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 50px;
  color: var(--text-dark);
  font-weight: 700;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.testimonial-card {
  background: white;
  padding: 28px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.testimonial-content {
  margin-bottom: 24px;
}

.testimonial-content p {
  font-style: italic;
  color: var(--text-light);
  line-height: 1.8;
  margin: 0;
}

.testimonial-author h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px 0;
}

.testimonial-author p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

/* ==================== NEWSLETTER ==================== */
.newsletter-section {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  text-align: center;
  color: white;
  border-radius: 16px;
  margin: 50px 0;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-section h2 {
  font-size: 32px;
  margin-bottom: 15px;
  font-weight: 700;
}

.newsletter-section p {
  font-size: 16px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.newsletter-form input {
  flex: 1;
  padding: 14px 22px;
  border: none;
  outline: none;
  font-size: 14px;
}

.newsletter-form button {
  padding: 14px 32px;
  background: white;
  color: var(--primary-color);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* ==================== FOOTER ==================== */
footer {
  background: var(--text-dark);
  color: white;
  padding: 50px 0 25px;
  margin-top: 70px;
  position: relative; /* لإضافة تأثيرات إضافية */
  overflow: hidden; /* لمنع أي تداخل غير مرغوب */
}

/* تأثير تدرج لوني للنص (Gradient Text) */
footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6,
footer a {
  background: linear-gradient(90deg, #ffffff, #cbd5e1, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.3s ease;
}

/* تأثير عند التمرير على الروابط */
footer a:hover {
  background: linear-gradient(90deg, #ffffff, #ffffff, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7); /* إضافة ظل إضاءة */
}

/* تصميم إضافي للفوتر */
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* تأثيرات إضافية للخطوط الفاصلة أو الزخارف */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 20px 0;
}

/* تأثيرات للزر أو الأزرار في الفوتر */
.footer-button {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.footer-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}


/* ==================== BOOK DETAIL PAGE ==================== */
.book-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  margin: 50px 0;
  align-items: start;
}

.book-detail-cover {
  position: sticky;
  top: 90px;
}

.book-detail-cover img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.book-detail-info h1 {
  font-size: 36px;
  margin-bottom: 24px;
  color: var(--text-dark);
  line-height: 1.3;
  font-weight: 700;
}

.book-meta {
  background: var(--background-light);
  padding: 24px;
  border-radius: 10px;
  margin: 24px 0;
}

.book-meta p {
  margin: 10px 0;
  font-size: 15px;
}

.book-meta strong {
  color: var(--primary-color);
  font-weight: 700;
}

.book-detail-description {
  margin: 36px 0;
}

.book-detail-description h3 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--text-dark);
  font-weight: 700;
}

.book-detail-description p {
  line-height: 1.8;
  color: var(--text-light);
  font-size: 15px;
}

.toc {
  background: var(--background-light);
  padding: 24px;
  border-radius: 10px;
  margin: 24px 0;
}

.toc h3 {
  font-size: 20px;
  margin-bottom: 18px;
  color: var(--text-dark);
  font-weight: 700;
}

.toc pre {
  font-size: 13px;
  overflow-x: auto;
  line-height: 1.6;
}

.purchase-options {
  display: flex;
  gap: 14px;
  margin: 36px 0;
  flex-wrap: wrap;
}

/* ==================== CHECKOUT PAGE ==================== */
.form-container {
  max-width: 900px;
  margin: 50px auto;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.form-container h2 {
  font-size: 32px;
  margin-bottom: 36px;
  color: var(--text-dark);
  font-weight: 700;
}

.form-container h3 {
  font-size: 20px;
  margin: 28px 0 18px 0;
  color: var(--text-dark);
  font-weight: 700;
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 28px 0;
}

.payment-method {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.payment-method:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.payment-method h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-weight: 700;
}

.payment-method p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* ==================== PROFILE PAGE ==================== */
.profile-header {
  padding: 40px 0 30px 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 40px;
}

.profile-header h2 {
  font-size: 32px;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.profile-subtitle {
  color: var(--text-light);
  font-size: 15px;
  margin: 0;
}

/* Improved library grid styling with better card layout */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.library-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.library-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.library-card-cover {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--background-light);
}

.library-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.library-card:hover .library-card-cover img {
  transform: scale(1.08);
}

.library-card-content {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.library-card-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-type-badge {
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pdf {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #0d47a1;
}

.badge-print {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  color: #4a148c;
}

.order-date {
  font-size: 13px;
  color: var(--text-light);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.library-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-small {
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.order-processing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 13px;
  padding: 10px;
  text-align: center;
  background: var(--background-light);
  border-radius: 8px;
  justify-content: center;
}

/* Improved empty library state styling */
.empty-library {
  text-align: center;
  padding: 80px 20px;
  background: var(--background-light);
  border-radius: 12px;
  margin: 40px 0;
}

.empty-icon {
  font-size: 64px;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.8;
}

.empty-text {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ==================== FORMS ==================== */
input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  margin-bottom: 16px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
  /* Improved mobile navbar with text labels visible */
  .navbar .container {
    height: 60px;
    padding: 0 10px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .logo-text {
    font-size: 20px;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--primary-color);
    padding: 10px 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-menu.active {
    max-height: 600px;
  }

  .nav-toggle {
    display: flex;
    z-index: 100;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Mobile nav links show full text */
  .nav-link {
    width: 100%;
    padding: 14px 20px;
    justify-content: flex-start;
    font-size: 15px;
    white-space: normal;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.1);
    margin-top: 0;
  }

  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* Books Grid Mobile */
  /* Improved mobile books grid sizing */
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin: 0;
  }

  .book-card {
    border-radius: 10px;
  }

  .book-cover {
    height: 200px;
  }

  .book-info {
    padding: 12px;
  }

  .book-info h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .book-prices {
    gap: 4px;
  }

  .price-tag {
    padding: 4px 8px;
    font-size: 10px;
  }

  .section-header {
    margin-bottom: 24px;
    padding-bottom: 14px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .category-badge {
    padding: 5px 12px;
    font-size: 11px;
  }
  /* Book Detail Mobile */
  .book-detail {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 30px 0;
  }

  .book-detail-cover {
    position: static;
  }

  .book-detail-info h1 {
    font-size: 28px; /* Adjusted for mobile */
    margin-bottom: 16px; /* Adjusted for mobile */
  }

  /* Mobile responsive for profile page */
  .profile-header {
    padding: 25px 0 20px 0;
    margin-bottom: 25px;
  }

  .profile-header h2 {
    font-size: 24px;
    margin-bottom: 6px;
  }

  .profile-subtitle {
    font-size: 14px;
  }

  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
  }

  .library-card-cover {
    height: 200px;
  }

  .library-card-content {
    padding: 14px;
  }

  .library-card-content h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .order-date {
    font-size: 12px;
  }

  .badge {
    padding: 5px 10px;
    font-size: 11px;
  }

  .empty-library {
    padding: 60px 20px;
  }

  .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }

  .empty-text {
    font-size: 16px;
    margin-bottom: 16px;
  }
} 


////



/* تحسين أنماط بطاقات الدفع */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.payment-method {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.payment-method i {
  margin: 0 auto 0.75rem;
}

.payment-method h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.payment-method p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.payment-method button {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* تحسين نموذج بطاقة الائتمان */
#stripe-form {
  display: none;
  background: white;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

#stripe-form h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

#card-element {
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin: 1rem 0;
  background: white;
}

#card-errors {
  color: #ef4444;
  font-size: 0.875rem;
  margin: 0.75rem 0;
}

/* تحسين زر العودة */
.form-container p[style*="text-align: center"] {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.form-container p[style*="text-align: center"] a {
  color: var(--text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9rem;
}

/* تحسين الأزرار */
.btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: var(--background-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--light-color);
}

/* تحسين التجاوب مع الهواتف */
@media (max-width: 768px) {
  .container {
    padding: 0.75rem;
  }

  .form-container {
    padding: 1rem;
  }

  .payment-methods {
    gap: 1rem;
  }

  .payment-method {
    padding: 1rem;
  }

  .form-container h2 {
    font-size: 1.25rem;
  }

  #stripe-form {
    padding: 1rem;
  }
}

