/*
Theme Name: Rikaf
Theme URI: https://rikaf.com/
Author: Rikaf Team
Author URI: https://rikaf.com/
Description: Rikaf (ركاف) is a modern, fully responsive Arabic RTL WordPress theme designed for bookstores and e-commerce sites. Built for the Rikaf Bookstore with WooCommerce integration, custom homepage sections (hero slider, categories, featured books, curated tabs, testimonials, blog, newsletter), and beautiful book-card components. Colors: Primary Blue #027CC1, Gold #B7906B.
Version: 1.1.5
Requires at least: 5.5
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rikaf
Tags: e-commerce, rtl-language-support, woocommerce, custom-menu, custom-logo, custom-colors, featured-images, post-formats, theme-options, threaded-comments, translation-ready, two-columns, three-columns, right-sidebar, left-sidebar, grid-layout, custom-background, custom-header
*/

/* ============================================
   RIKAF BOOKSTORE - SHARED STYLES
   Color Palette from Logo:
   - Primary Blue: #027CC1
   - Darker Blue: #024F80
   - Gold/Beige: #B7906B
   - Dark Gold: #8A6843
   - White: #FFFFFF
   - Background: #F9FAFC
   ============================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #027CC1;
  --primary-dark: #024F80;
  --primary-light: #E5EEFA;
  --primary-lighter: #F0F6FC;
  --gold: #B7906B;
  --gold-dark: #8A6843;
  --gold-light: #F5EBDD;
  --red: #D4070E;
  --red-light: #FFF0F0;
  --green: #2E8B57;
  --bg: #F9FAFC;
  --bg-alt: #EFF2F7;
  --white: #FFFFFF;
  --text: #273444;
  --text-light: #42526E;
  --text-muted: #8492A6;
  --border: #E0E6ED;
  --border-light: #F1F1F1;
  --shadow-sm: 0 1px 3px rgba(39, 52, 68, 0.06);
  --shadow: 0 2px 8px rgba(39, 52, 68, 0.08);
  --shadow-md: 0 4px 16px rgba(39, 52, 68, 0.1);
  --shadow-lg: 0 8px 24px rgba(39, 52, 68, 0.12);
  --shadow-xl: 0 16px 48px rgba(2, 124, 193, 0.15);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Tajawal', 'Cairo', system-ui, sans-serif;
  --font-display: 'Cairo', 'Tajawal', sans-serif;
  --font-serif: 'Amiri', serif;
}

/* #31: Prevent horizontal overflow */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

ul { list-style: none; }

input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ===== ACCESSIBILITY ===== */
/* #21: Skip-to-content link */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--primary); color: white;
  padding: 8px 16px; z-index: 10000; font-weight: 700;
}
.skip-link:focus { top: 0; }

/* #25: Focus-visible styles */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2,124,193,0.3); }
.btn--gold { background: var(--gold); color: white; }
.btn--gold:hover { background: var(--gold-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(183,144,107,0.3); }
.btn--dark { background: var(--text); color: white; }
.btn--dark:hover { background: #1a2433; color: white; }
.btn--outline { background: transparent; border-color: white; color: white; }
.btn--outline:hover { background: white; color: var(--primary); }
.btn--outline-light { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); color: white; }
.btn--outline-light:hover { background: rgba(255,255,255,0.2); color: white; }
.btn--lg { padding: 14px 28px; font-size: 15px; }
.btn--block { width: 100%; }

/* ===== TOP BAR ===== */
.top-bar { background: var(--text); color: rgba(255,255,255,0.85); font-size: 13px; padding: 8px 0; }
.top-bar__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-bar__right, .top-bar__left { display: flex; align-items: center; gap: 16px; }
.top-bar__item { display: inline-flex; align-items: center; gap: 6px; }
.top-bar__item i { color: var(--gold); }
.top-bar__link { color: rgba(255,255,255,0.85); }
.top-bar__link:hover { color: var(--gold); }
.top-bar__divider { color: rgba(255,255,255,0.2); }
.top-bar__selector .selector-btn {
  color: rgba(255,255,255,0.85); padding: 4px 10px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-sm);
}
.top-bar__selector .selector-btn:hover { background: rgba(255,255,255,0.1); }
.top-bar__selector .selector-btn i { color: var(--gold); }

/* ===== HEADER ===== */
.header { background: white; padding: 14px 0; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
/* #3: CSS class for scrolled header state */
.header--scrolled { box-shadow: 0 4px 20px rgba(39, 52, 68, 0.12); }
.header__inner { display: flex; align-items: center; gap: 24px; flex-wrap: nowrap; white-space: nowrap; }
.header__logo { flex-shrink: 0; display: flex; align-items: center; }
/* #55: Add width and height attributes to logo (set in HTML) */
.header__logo img { height: 100px; width: auto; transition: transform var(--transition); }
.header__logo:hover img { transform: scale(1.05); }

.header__search { flex: 1; max-width: 580px; min-width: 280px; }
.search-box {
  display: flex; align-items: stretch;
  border: 2px solid var(--primary); border-radius: var(--radius);
  overflow: hidden; background: white; height: 48px;
  box-shadow: 0 2px 8px rgba(2,124,193,0.1);
}
.search-box__category {
  border: none; border-left: 1px solid var(--border);
  padding: 0 14px; background: var(--primary-lighter); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer; outline: none;
  max-width: 130px;
}
.search-box__input {
  flex: 1; border: none; padding: 0 14px; font-size: 14px;
  outline: none; background: transparent;
}
.search-box__btn {
  background: var(--primary); color: white; padding: 0 28px;
  font-size: 18px; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
  min-width: 64px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.search-box__btn i {
  line-height: 1;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.search-box__btn:hover { background: var(--primary-dark); transform: scale(1.02); }
.search-box__btn:active { transform: scale(0.98); }

.header__actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header__action {
  display: flex; align-items: center; gap: 10px;
  position: relative; padding: 6px 8px; border-radius: var(--radius);
  transition: background var(--transition);
}
.header__action:hover { background: var(--primary-lighter); }
.header__action > i { font-size: 22px; color: var(--primary); }
.header__action-text { display: flex; flex-direction: column; line-height: 1.2; }
.header__action-text small { color: var(--text-muted); font-size: 11px; }
.header__action-text strong { color: var(--text); font-size: 13px; }
.header__badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--gold); color: white; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}
.header__badge--red { background: var(--red); }

/* ===== MAIN NAV ===== */
.main-nav { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.main-nav__inner { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; white-space: nowrap; }
.main-nav__all-categories {
  background: var(--primary-dark); color: white; padding: 14px 18px;
  display: flex; align-items: center; gap: 4px; font-weight: 700;
  font-size: 15px; border-radius: 0; transition: background var(--transition);
  flex-shrink: 0;
}
.main-nav__all-categories span { margin-left: 4px; }
.main-nav__all-categories:hover { background: #012b4a; }
.main-nav__caret { font-size: 11px; margin-right: 2px; }
.main-nav__list {
  display: flex; align-items: center; gap: 0;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.main-nav__list::-webkit-scrollbar { display: none; }
.main-nav__list a {
  color: white; padding: 14px 12px; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative; transition: background var(--transition);
  white-space: nowrap;
}
.main-nav__list a i { font-size: 13px; opacity: 0.85; }
.main-nav__list a:hover, .main-nav__list a.active {
  background: rgba(255,255,255,0.12); color: white;
}
.main-nav__list a.active { border-bottom: 3px solid var(--gold); padding-bottom: 11px; }
/* #5: Removed !important - fixed specificity with more specific selector */
.main-nav .main-nav__highlight {
  background: var(--gold);
  margin-top: 4px;
  margin-bottom: 4px;
  border-radius: 8px;
  padding: 10px 16px;
}
.main-nav .main-nav__highlight:hover { background: var(--gold-dark); }

/* ===== HERO ===== */
.hero { margin-bottom: 0; }
.hero__slider { position: relative; overflow: hidden; min-height: 480px; }
.hero__slide {
  position: absolute; top: 0; right: 0; width: 100%; min-height: 480px;
  opacity: 0; transition: opacity 0.6s ease;
  display: flex; align-items: center; padding: 50px 0;
}
.hero__slide--active { opacity: 1; position: relative; }
.hero__content { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero__text { color: white; }
.hero__tag {
  display: inline-block; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 16px; border-radius: 30px; font-size: 13px; font-weight: 600;
  margin-bottom: 20px; backdrop-filter: blur(8px);
}
.hero__title {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 900; line-height: 1.2; margin-bottom: 18px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.hero__title-accent { color: var(--gold-light); display: inline-block; }
.hero__subtitle { font-size: 17px; line-height: 1.7; margin-bottom: 28px; opacity: 0.95; max-width: 540px; }
.hero__actions { display: flex; gap: 12px; margin-bottom: 35px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 35px; }
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 28px; font-weight: 900; }
.hero__stats span { font-size: 13px; opacity: 0.85; }
.hero__image {
  display: flex; align-items: center; justify-content: center; height: 380px;
  position: relative;
}
.hero__book-stack { position: relative; width: 280px; height: 340px; }
.hero__book {
  position: absolute; width: 140px; height: 200px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 60px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25); background: white;
}
.hero__book--1 { top: 0; right: 0; transform: rotate(-8deg); }
.hero__book--2 { top: 30px; right: 80px; transform: rotate(5deg); background: var(--gold-light); }
.hero__book--3 { top: 110px; right: 30px; transform: rotate(-3deg); background: var(--primary-light); }
.hero__book--4 { top: 140px; right: 110px; transform: rotate(10deg); background: white; }
.hero__audio-visual {
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  background: rgba(255,255,255,0.1); padding: 50px; border-radius: 50%;
  backdrop-filter: blur(8px); border: 2px solid rgba(255,255,255,0.2);
}
.hero__audio-icon { font-size: 80px; color: white; }
.hero__waveform { display: flex; gap: 4px; align-items: center; height: 40px; }
.hero__waveform span {
  display: block; width: 5px; background: var(--gold-light); border-radius: 3px;
  animation: wave 1.2s ease-in-out infinite;
}
.hero__waveform span:nth-child(1) { height: 20%; animation-delay: 0s; }
.hero__waveform span:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.hero__waveform span:nth-child(3) { height: 90%; animation-delay: 0.2s; }
.hero__waveform span:nth-child(4) { height: 40%; animation-delay: 0.3s; }
.hero__waveform span:nth-child(5) { height: 80%; animation-delay: 0.4s; }
.hero__waveform span:nth-child(6) { height: 50%; animation-delay: 0.5s; }
.hero__waveform span:nth-child(7) { height: 70%; animation-delay: 0.6s; }
.hero__waveform span:nth-child(8) { height: 30%; animation-delay: 0.7s; }
.hero__waveform span:nth-child(9) { height: 90%; animation-delay: 0.8s; }
.hero__waveform span:nth-child(10) { height: 50%; animation-delay: 0.9s; }
.hero__waveform span:nth-child(11) { height: 70%; animation-delay: 1.0s; }
.hero__waveform span:nth-child(12) { height: 30%; animation-delay: 1.1s; }
.hero__waveform span:nth-child(13) { height: 80%; animation-delay: 1.2s; }
.hero__waveform span:nth-child(14) { height: 50%; animation-delay: 1.3s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.2); }
}
.hero__new-stack {
  position: relative; width: 250px; height: 320px;
  background: white; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 100px;
  color: var(--primary); box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  transform: rotate(-3deg);
}
.hero__new-badge {
  position: absolute; top: -12px; left: -12px;
  background: var(--red); color: white; padding: 8px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 700;
  transform: rotate(8deg);
}
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); color: white;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; z-index: 5; backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.3); transition: all var(--transition);
}
.hero__arrow:hover { background: rgba(255,255,255,0.3); }
.hero__arrow--prev { right: 20px; }
.hero__arrow--next { left: 20px; }
.hero__dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.hero__dot {
  width: 30px; height: 5px; background: rgba(255,255,255,0.4);
  border-radius: 3px; cursor: pointer; transition: all var(--transition);
}
.hero__dot--active { background: white; width: 40px; }
/* #27: Hero slider accessibility - pause button */
.hero__pause-btn {
  position: absolute; bottom: 18px; right: 20px; z-index: 5;
  background: rgba(255,255,255,0.15); color: white;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  transition: all var(--transition);
}
.hero__pause-btn:hover { background: rgba(255,255,255,0.3); }

/* ===== FEATURES BAR ===== */
.features-bar { background: white; padding: 22px 0; box-shadow: var(--shadow); }
.features-bar__grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
}
.feature { display: flex; align-items: center; gap: 12px; }
.feature i {
  font-size: 28px; color: var(--primary);
  width: 50px; height: 50px; background: var(--primary-lighter);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.feature strong { display: block; font-size: 14px; color: var(--text); }
.feature span { font-size: 12px; color: var(--text-muted); }

/* ===== SECTION ===== */
.section { padding: 60px 0; }
.section--alt { background: var(--bg-alt); }
.section__header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 35px; flex-wrap: wrap; gap: 15px;
}
.section__heading {
  display: flex; flex-direction: column; gap: 4px;
  position: relative; padding-right: 16px;
}
.section__heading::before {
  content: ''; position: absolute; top: 4px; bottom: 4px; right: 0;
  width: 4px; background: linear-gradient(180deg, var(--primary) 0%, var(--gold) 100%);
  border-radius: 2px;
}
.section__title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800; color: var(--text);
  display: inline-flex; align-items: center; gap: 10px;
  line-height: 1.2;
}
.section__title i { color: var(--primary); font-size: 24px; }
.section__eyebrow {
  display: inline-block; color: var(--text-muted); font-size: 14px;
  font-weight: 500; letter-spacing: 0.3px;
}
.section__link {
  color: var(--primary); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.section__link:hover { color: var(--primary-dark); }
.section__controls { display: flex; align-items: center; gap: 12px; }
.section__view-toggle {
  width: 36px; height: 36px; border: 1px solid var(--border);
  border-radius: 8px; background: white; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.section__view-toggle.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== CATEGORIES GRID ===== */
.categories__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.category-card {
  background: white; padding: 24px 18px; border-radius: var(--radius-md);
  text-align: center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); transition: all var(--transition);
  position: relative; overflow: hidden;
}
.category-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 4px;
  background: var(--primary); transform: scaleX(0); transition: transform var(--transition);
  transform-origin: right;
}
.category-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.category-card:hover::before { transform: scaleX(1); }
.category-card__icon {
  width: 60px; height: 60px; margin: 0 auto 14px;
  background: var(--primary-lighter); color: var(--primary);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; transition: all var(--transition);
}
.category-card:hover .category-card__icon {
  background: var(--primary); color: white; transform: rotate(-5deg) scale(1.05);
}
.category-card h3 {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.category-card span { font-size: 12px; color: var(--text-muted); }
.category-card--accent { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border-color: transparent; }
.category-card--accent h3, .category-card--accent span { color: white; }
.category-card--accent .category-card__icon { background: rgba(255,255,255,0.2); color: white; }
.category-card--accent::before { background: var(--gold); }
.category-card--audio .category-card__icon { background: #FFF0E5; color: #E67E22; }
.category-card--audio:hover .category-card__icon { background: #E67E22; color: white; }
.category-card--ebook .category-card__icon { background: #E8F5E9; color: #2E8B57; }
.category-card--ebook:hover .category-card__icon { background: #2E8B57; color: white; }
.category-card--fantasy .category-card__icon { background: #F3E5F5; color: #8E44AD; }
.category-card--fantasy:hover .category-card__icon { background: #8E44AD; color: white; }
.category-card--new { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white; border-color: transparent; }
.category-card--new h3, .category-card--new span { color: white; }
.category-card--new .category-card__icon { background: rgba(255,255,255,0.2); color: white; }
.category-card--bestseller { background: linear-gradient(135deg, #1E4D6B 0%, #0F2D40 100%); color: white; border-color: transparent; }
.category-card--bestseller h3, .category-card--bestseller span { color: white; }
.category-card--bestseller .category-card__icon { background: rgba(255,255,255,0.15); color: var(--gold-light); }

/* ===== BOOK CARD ===== */
.books-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.book-card {
  background: white; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all var(--transition); display: flex; flex-direction: column;
}
.book-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.book-card__image-wrap {
  position: relative; padding: 20px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3/4; overflow: hidden;
}
.book-card__badge {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  padding: 5px 10px; border-radius: 6px; font-size: 11px;
  font-weight: 700; color: white;
}
.book-card__badge--bestseller { background: var(--gold); }
.book-card__badge--new { background: var(--green); }
.book-card__badge--discount { background: var(--red); }
.book-card__badge--choice { background: var(--primary); }
.book-card__wishlist, .book-card__quick-view {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: white; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transition: all var(--transition);
}
.book-card__quick-view { top: 50px; }
.book-card:hover .book-card__wishlist, .book-card:hover .book-card__quick-view { opacity: 1; }
.book-card__wishlist:hover, .book-card__quick-view:hover {
  background: var(--primary); color: white; transform: scale(1.08);
}
/* #3: CSS class for wishlisted state instead of inline styles */
.book-card__wishlist.is-wishlisted {
  color: var(--red);
  background: white;
  opacity: 1;
}
.book-card__cover {
  width: 100%; aspect-ratio: 3/4.3; border-radius: 4px;
  overflow: hidden; box-shadow: 4px 6px 16px rgba(0,0,0,0.18), -2px 0 0 rgba(0,0,0,0.05);
  transition: transform var(--transition);
}
.book-card:hover .book-card__cover { transform: rotate(-1deg) scale(1.02); }

/* === BOOK COVER (CSS-generated since we don't have actual book images) === */
.book-cover {
  width: 100%; height: 100%; padding: 16px 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: white; text-align: center; position: relative;
}
.book-cover::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 6px; background: rgba(0,0,0,0.15);
}
.book-cover__title {
  font-family: var(--font-display); font-size: 18px; font-weight: 800;
  line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.book-cover__author {
  font-size: 11px; opacity: 0.85; margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.3); padding-top: 8px;
}
.book-cover--1 { background: linear-gradient(135deg, #027CC1 0%, #012b4a 100%); }
.book-cover--2 { background: linear-gradient(135deg, #8A6843 0%, #5a432a 100%); }
.book-cover--3 { background: linear-gradient(135deg, #1E4D6B 0%, #0a1a26 100%); }
.book-cover--4 { background: linear-gradient(135deg, #2E8B57 0%, #1a4f30 100%); }
.book-cover--5 { background: linear-gradient(135deg, #D4070E 0%, #7a0408 100%); }
.book-cover--6 { background: linear-gradient(135deg, #8E44AD 0%, #4a235a 100%); }
.book-cover--7 { background: linear-gradient(135deg, #E67E22 0%, #8a4a10 100%); }
.book-cover--8 { background: linear-gradient(135deg, #16A085 0%, #0a5a47 100%); }
.book-cover--9 { background: linear-gradient(135deg, #2C3E50 0%, #1a2433 100%); }
.book-cover--10 { background: linear-gradient(135deg, #C0392B 0%, #6e1f17 100%); }
.book-cover--11 { background: linear-gradient(135deg, #34495E 0%, #1c2833 100%); }
.book-cover--12 { background: linear-gradient(135deg, #7D3C98 0%, #4a235a 100%); }
.book-cover--13 { background: linear-gradient(135deg, #B7906B 0%, #8A6843 100%); }
.book-cover--14 { background: linear-gradient(135deg, #2874A6 0%, #1b4f72 100%); }
.book-cover--15 { background: linear-gradient(135deg, #1ABC9C 0%, #117864 100%); }
.book-cover--16 { background: linear-gradient(135deg, #34495E 0%, #17202a 100%); }

.book-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.book-card__category {
  font-size: 11px; color: var(--gold); font-weight: 700; text-transform: uppercase;
  margin-bottom: 4px; letter-spacing: 0.5px;
}
.book-card__title {
  font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px;
}
.book-card__author {
  font-size: 12px; color: var(--text-muted); margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.book-card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.stars { color: #FFC107; font-size: 13px; display: inline-flex; gap: 1px; }
.rating-count { font-size: 11px; color: var(--text-muted); }
.book-card__price {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-new { font-size: 20px; font-weight: 800; color: var(--primary); }
.price-new small { font-size: 12px; font-weight: 600; }
.price-discount {
  background: var(--red-light); color: var(--red);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.book-card__formats {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.format {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: white;
}
.format--paper { background: #8A6843; }
.format--ebook { background: #2E8B57; }
.format--audio { background: #E67E22; }
.book-card .btn { font-size: 13px; padding: 9px 14px; margin-top: auto; }
/* #3: CSS class for add-to-cart success state */
.btn--added { background: var(--green); }

/* ===== BOOKS SLIDER ===== */
.books-slider {
  display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--border-light);
}
.books-slider::-webkit-scrollbar { height: 6px; }
.books-slider::-webkit-scrollbar-track { background: var(--border-light); border-radius: 3px; }
.books-slider::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
.book-card--slider-item { min-width: 230px; scroll-snap-align: start; flex: 0 0 auto; }

/* ===== PROMO BANNER ===== */
.promo-banner { padding: 0; background: linear-gradient(135deg, #1E4D6B 0%, #0F2D40 100%); color: white; }
.promo-banner__inner {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px;
  padding: 60px 0; align-items: center;
}
.promo-banner__tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: white; padding: 6px 16px;
  border-radius: 30px; font-size: 13px; font-weight: 700;
  margin-bottom: 18px;
}
.promo-banner__title {
  font-family: var(--font-display); font-size: 38px; font-weight: 900;
  line-height: 1.25; margin-bottom: 16px;
}
.promo-banner__subtitle { font-size: 16px; opacity: 0.92; margin-bottom: 20px; max-width: 560px; line-height: 1.7; }
.promo-banner__list { list-style: none; margin-bottom: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 500px; }
.promo-banner__list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.promo-banner__list i { color: var(--gold-light); }
.promo-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.promo-banner__visual { display: flex; justify-content: center; }
.promo-banner__price-card {
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  padding: 40px 30px; border-radius: var(--radius-lg);
  text-align: center; min-width: 260px;
}
.promo-banner__price-tag { font-size: 14px; opacity: 0.85; display: block; margin-bottom: 10px; }
.promo-banner__price {
  font-size: 52px; font-weight: 900; line-height: 1;
  color: var(--gold-light);
}
.promo-banner__price small { font-size: 18px; font-weight: 600; opacity: 0.8; }
.promo-banner__price-old {
  display: block; margin-top: 12px;
  text-decoration: line-through; opacity: 0.7; font-size: 16px;
}
.promo-banner__price-save {
  display: inline-block; margin-top: 8px;
  background: var(--gold); color: white; padding: 4px 12px;
  border-radius: 16px; font-size: 12px; font-weight: 700;
}

/* ===== SPECIAL SECTIONS ===== */
.special-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.special-card {
  border-radius: var(--radius-lg); padding: 40px 36px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  position: relative; overflow: hidden;
}
.special-card--braille { background: linear-gradient(135deg, #2C3E50 0%, #1a2433 100%); color: white; }
.special-card--magazines { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white; }
.special-card::before {
  content: ''; position: absolute; top: -50%; left: -10%;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.special-card__icon {
  font-size: 60px; opacity: 0.95;
  width: 100px; height: 100px; background: rgba(255,255,255,0.15);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.special-card__content { z-index: 1; }
.special-card__tag {
  display: inline-block; background: rgba(255,255,255,0.2); padding: 4px 12px;
  border-radius: 12px; font-size: 11px; font-weight: 700; margin-bottom: 10px;
}
.special-card h3 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.special-card p { opacity: 0.92; margin-bottom: 18px; line-height: 1.6; }

/* ===== CURATED TABS ===== */
.curated-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
  overflow-x: auto;
}
.curated-tab {
  padding: 12px 22px; font-size: 14px; font-weight: 700;
  color: var(--text-muted); border-radius: 8px 8px 0 0;
  position: relative; transition: all var(--transition); white-space: nowrap;
}
.curated-tab:hover { color: var(--primary); }
.curated-tab--active {
  color: var(--primary); background: var(--primary-lighter);
}
.curated-tab--active::after {
  content: ''; position: absolute; bottom: -2px; right: 0; left: 0;
  height: 3px; background: var(--primary);
}

/* ===== PUBLISHERS ===== */
.publishers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px;
}
.publisher-card {
  background: white; padding: 24px 18px; border-radius: var(--radius);
  text-align: center; border: 1px solid var(--border);
  transition: all var(--transition);
}
.publisher-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.publisher-card__logo {
  font-family: var(--font-display); font-size: 18px; font-weight: 800;
  color: var(--primary); margin-bottom: 6px;
}
.publisher-card__count { font-size: 12px; color: var(--text-muted); }

/* ===== APP BANNER ===== */
.app-banner { padding: 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; }
.app-banner__inner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px;
  padding: 60px 0; align-items: center;
}
.app-banner__tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); padding: 6px 16px;
  border-radius: 30px; font-size: 13px; font-weight: 700;
  margin-bottom: 18px; border: 1px solid rgba(255,255,255,0.25);
}
.app-banner__title {
  font-family: var(--font-display); font-size: 38px; font-weight: 900;
  line-height: 1.25; margin-bottom: 16px;
}
.app-banner__subtitle { font-size: 16px; opacity: 0.92; margin-bottom: 22px; line-height: 1.7; max-width: 540px; }
.app-banner__features {
  list-style: none; margin-bottom: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 480px;
}
.app-banner__features li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.app-banner__features i { color: var(--gold-light); }
.app-banner__buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.app-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: black; color: white; padding: 10px 18px;
  border-radius: var(--radius); transition: all var(--transition);
}
.app-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.app-btn i { font-size: 28px; }
.app-btn small { display: block; font-size: 10px; opacity: 0.85; }
.app-btn strong { display: block; font-size: 15px; font-weight: 700; }

.app-banner__visual { display: flex; justify-content: center; }
.phone-mockup {
  width: 260px; height: 540px; background: #1a1a1a;
  border-radius: 38px; padding: 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), inset 0 0 0 2px #333;
  position: relative;
}
.phone-mockup::before {
  content: ''; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px; background: #1a1a1a; border-radius: 14px; z-index: 5;
}
.phone-mockup__screen {
  width: 100%; height: 100%; background: var(--bg);
  border-radius: 30px; overflow: hidden; padding: 44px 14px 14px;
}
.phone-mockup__status-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; padding: 0 8px 10px; color: var(--text);
}
.phone-mockup__status-bar i { font-size: 10px; margin-right: 3px; }
.phone-mockup__app-content { background: white; padding: 14px; border-radius: 14px; }
.phone-mockup__logo { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.phone-mockup__search {
  background: var(--bg-alt); padding: 8px 12px; border-radius: 8px;
  font-size: 12px; color: var(--text-muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.phone-mockup__continue { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.phone-mockup__book-cover { width: 110px; height: 160px; margin: 0 auto 14px; border-radius: 4px; overflow: hidden; }
.phone-mockup__progress { text-align: center; }
.phone-mockup__progress-bar {
  height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.phone-mockup__progress-fill { height: 100%; background: var(--primary); }
.phone-mockup__progress span { font-size: 10px; color: var(--text-muted); }

/* ===== TESTIMONIALS ===== */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.testimonial-card {
  background: white; padding: 28px 26px; border-radius: var(--radius-md);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.testimonial-card__rating { color: #FFC107; font-size: 16px; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-card__text {
  font-size: 15px; color: var(--text-light); line-height: 1.7;
  margin-bottom: 22px; position: relative; padding-right: 18px;
}
.testimonial-card__text::before {
  content: '"'; position: absolute; top: -8px; right: 0;
  font-size: 50px; color: var(--primary-light); font-family: serif; line-height: 1;
}
.testimonial-card__author { display: flex; align-items: center; gap: 12px; }
.testimonial-card__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.testimonial-card__author strong { display: block; font-size: 14px; color: var(--text); }
.testimonial-card__author span { font-size: 12px; color: var(--text-muted); }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: white; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.blog-card__image {
  aspect-ratio: 16/9; position: relative;
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 14px;
}
.blog-card__image--1 { background: linear-gradient(135deg, #027CC1, #012b4a); }
.blog-card__image--2 { background: linear-gradient(135deg, #B7906B, #5a432a); }
.blog-card__image--3 { background: linear-gradient(135deg, #2E8B57, #1a4f30); }
.blog-card__category {
  background: white; color: var(--primary); padding: 4px 12px;
  border-radius: 16px; font-size: 12px; font-weight: 700;
}
.blog-card__body { padding: 20px 22px 24px; }
.blog-card__date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: inline-flex; align-items: center; gap: 4px; }
.blog-card__title {
  font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.4;
  margin-bottom: 10px;
}
.blog-card__excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.blog-card__link {
  color: var(--primary); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ===== NEWSLETTER ===== */
.newsletter { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white; padding: 50px 0; }
.newsletter__inner {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px;
  align-items: center;
}
.newsletter__title {
  font-family: var(--font-display); font-size: 28px; font-weight: 900;
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
}
.newsletter__subtitle { font-size: 15px; opacity: 0.95; line-height: 1.7; max-width: 540px; }
.newsletter__form { display: flex; gap: 10px; }
.newsletter__input {
  flex: 1; padding: 14px 18px; border-radius: var(--radius);
  border: none; font-size: 14px; outline: none;
}
.newsletter__input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.newsletter .btn--primary { background: var(--text); }
.newsletter .btn--primary:hover { background: #1a2433; }

/* ===== FOOTER ===== */
.footer { background: #1a2433; color: rgba(255,255,255,0.75); padding-top: 50px; }

.footer__top {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__trust {
  display: contents;
}
.footer__trust-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: rgba(255,255,255,0.04);
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition);
}
.footer__trust-item:hover {
  background: rgba(183,144,107,0.1); border-color: rgba(183,144,107,0.3);
}
.footer__trust-item i {
  font-size: 24px; color: var(--gold);
  width: 44px; height: 44px;
  background: rgba(183,144,107,0.15); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer__trust-item div { display: flex; flex-direction: column; line-height: 1.3; }
.footer__trust-item strong { color: white; font-size: 13px; font-weight: 700; }
.footer__trust-item span { color: rgba(255,255,255,0.6); font-size: 11px; }

.footer__payment-wrap {
  padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: center; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.footer__payment-label {
  font-size: 12px; color: rgba(255,255,255,0.6); margin-left: 8px;
}
.footer__payment { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-method {
  background: white; color: var(--text); padding: 8px 14px;
  border-radius: 8px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  min-width: 56px; min-height: 32px;
  transition: transform var(--transition);
}
.payment-method:hover { transform: translateY(-2px); }
.payment-method--visa { color: #1A1F71; }
.payment-method--mastercard { font-size: 24px; color: #EB001B; }
.payment-method--apple { font-size: 24px; color: black; }
.payment-method--mada { color: #007E5E; }
.payment-method--stc { color: #5F0099; }
.payment-method--tabby { color: #1C8BCC; }
.payment-method--tamara { color: #FFC107; }

.footer__main {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 30px;
  padding: 40px 0;
}
.footer__col h4 {
  font-size: 16px; font-weight: 700; color: white; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.footer__col h4::before {
  content: ''; width: 4px; height: 18px; background: var(--gold);
  border-radius: 2px;
}
.footer__col ul li { margin-bottom: 10px; }
.footer__col ul a {
  font-size: 13px; color: rgba(255,255,255,0.65);
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.footer__col ul a::before {
  content: '◀'; font-size: 8px; color: rgba(183,144,107,0.5);
  transition: all var(--transition);
}
.footer__col ul a:hover { color: var(--gold); padding-right: 4px; }
.footer__col ul a:hover::before { color: var(--gold); }

.footer__col--brand .footer__logo {
  height: 120px; width: auto; margin-bottom: 18px;
  transition: all var(--transition);
  object-fit: contain;
}
.footer__col--brand .footer__logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(2,124,193,0.4));
}
.footer__about { font-size: 13px; line-height: 1.7; margin-bottom: 18px; }
.footer__social { display: flex; gap: 8px; margin-bottom: 18px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.08); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.06);
}
.footer__social a:hover {
  background: var(--gold); transform: translateY(-3px);
  border-color: var(--gold);
}
.footer__contact {
  padding: 14px; background: rgba(255,255,255,0.04);
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
}
.footer__contact p {
  font-size: 13px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.footer__contact p:last-child { margin-bottom: 0; }
.footer__contact i { color: var(--gold); width: 16px; }

.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
}
.footer__bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__bottom-links a { color: rgba(255,255,255,0.65); }
.footer__bottom-links a:hover { color: var(--gold); }

/* ===== FLOATING BUTTONS ===== */
.floating-buttons {
  position: fixed; bottom: 24px; left: 24px; z-index: 99;
  display: flex; flex-direction: column; gap: 10px;
}
.floating-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: white; box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}
.floating-btn:hover { transform: translateY(-3px) scale(1.05); }
.floating-btn--whatsapp { background: #25D366; }
.floating-btn--top { background: var(--primary); }
.floating-btn--top { opacity: 0; pointer-events: none; }
.floating-btn--top.visible { opacity: 1; pointer-events: auto; }

/* ===== LIST VIEW ===== */
.books-grid.list-view { grid-template-columns: 1fr; }
.books-grid.list-view .book-card {
  flex-direction: row; overflow: hidden;
}
.books-grid.list-view .book-card__image-wrap {
  width: 160px; flex-shrink: 0; aspect-ratio: auto; padding: 14px;
}
.books-grid.list-view .book-card__cover { width: 100%; aspect-ratio: 3/4; }
.books-grid.list-view .book-card__body { flex: 1; }
.books-grid.list-view .book-card__title { font-size: 18px; min-height: auto; -webkit-line-clamp: 1; }

/* #4: Toast CSS moved from JS injection to stylesheet */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-100px);
  background: var(--text); color: white; padding: 14px 24px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90vw; text-align: center;
  border-right: 4px solid var(--primary);
}
.toast--show { transform: translateX(-50%) translateY(0); }
.toast--success { border-right-color: #2E8B57; }
.toast--error { border-right-color: #D4070E; }
.toast--info { border-right-color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .header__inner { flex-wrap: wrap; }
  .header__search { order: 3; flex: 1 1 100%; max-width: 100%; }
  .header__actions { flex: 1; justify-content: flex-end; }
  .features-bar__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__main { grid-template-columns: 1fr 1fr 1fr; }
  .footer__col--brand { grid-column: 1 / -1; }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .top-bar { font-size: 11px; }
  .top-bar__inner { justify-content: center; text-align: center; }
  .top-bar__left { flex-wrap: wrap; justify-content: center; }
  .header__logo img { height: 70px; }
  .footer__col--brand .footer__logo { height: 80px; }
  .header__action-text { display: none; }
  .header__actions { gap: 14px; }
  .main-nav__inner { flex-direction: column; align-items: stretch; padding: 0; }
  .main-nav__all-categories {
    width: 100%; justify-content: space-between;
    padding: 14px 20px;
  }
  .main-nav__list {
    overflow: hidden; flex-wrap: wrap; max-height: 0;
    transition: max-height 0.4s ease; padding: 0 8px;
  }
  .main-nav__list.open {
    max-height: 600px; padding: 8px 8px 12px;
    overflow-y: auto;
  }
  .main-nav__list a { width: 100%; justify-content: flex-start; padding: 12px 14px; }
  .main-nav__list a.active { border-bottom: none; border-right: 3px solid var(--gold); padding-right: 11px; }
  .main-nav .main-nav__highlight { margin: 4px 8px; }
  .hero__slide { padding: 30px 0; min-height: auto; }
  .hero__slider { min-height: auto; }
  .hero__content { grid-template-columns: 1fr; gap: 24px; }
  .hero__title { font-size: 32px; }
  .hero__subtitle { font-size: 15px; }
  .hero__stats { gap: 20px; }
  .hero__stats strong { font-size: 22px; }
  .hero__image { height: 260px; }
  .features-bar__grid { grid-template-columns: 1fr 1fr; }
  .feature { font-size: 13px; }
  .section { padding: 40px 0; }
  .section__title { font-size: 22px; }
  .promo-banner__inner, .app-banner__inner { grid-template-columns: 1fr; padding: 40px 0; }
  .promo-banner__title, .app-banner__title { font-size: 28px; }
  .promo-banner__list, .app-banner__features { grid-template-columns: 1fr; }
  .special-grid { grid-template-columns: 1fr; }
  .special-card { grid-template-columns: 1fr; text-align: center; }
  .special-card__icon { margin: 0 auto; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .newsletter__form { flex-direction: column; }
  .footer__main { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__payment-wrap { flex-direction: column; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .book-card__title { font-size: 14px; }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero__title { font-size: 26px; }
  .books-grid { grid-template-columns: 1fr 1fr; }
  .book-card__body { padding: 10px 12px 12px; }
  .book-card__image-wrap { padding: 12px; }
  .hero__arrow { display: none; }
  .floating-buttons { bottom: 16px; left: 16px; }
}

/* ============================================
   CATEGORIES PAGE TEMPLATE (page-categories.php)
   Added in v1.1.3 — used by the "عرض الكل"
   link under "تصفّح الأقسام" on the homepage.
   ============================================ */
.section--tight { padding: 28px 0 8px; }
.section__header--centered {
  text-align: center;
  margin-bottom: 28px;
}
.section__header--centered .section__heading { align-items: center; }

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb__sep { color: var(--border); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* Full grid variant: smaller cards so many categories fit nicely. */
.categories__grid--full {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.categories__grid--full .category-card { padding: 20px 14px; }
.categories__grid--full .category-card h3 { font-size: 15px; }
.categories__grid--full .category-card span { font-size: 12px; }

/* Intro paragraph block (from the page editor content). */
.page-categories__intro {
  max-width: 760px;
  margin: 0 auto 32px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.9;
  text-align: center;
}
.page-categories__intro p { margin: 0 0 12px; }
.page-categories__intro p:last-child { margin-bottom: 0; }

/* Empty state when no categories exist yet. */
.categories__empty {
  text-align: center;
  padding: 60px 20px;
  max-width: 520px;
  margin: 0 auto;
}
.categories__empty i {
  font-size: 56px;
  color: var(--border);
  margin-bottom: 16px;
  display: block;
}
.categories__empty h2 {
  font-size: 22px;
  color: var(--text);
  margin: 0 0 10px;
}
.categories__empty p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 22px;
}
