:root {
    --ink: #1f2544;
    --ink-soft: #5f6582;
    --paper: #fffdf9;
    --surface: #ffffff;
    --surface-soft: #f7f4ff;
    --line: #ebe8f3;
    --purple: #6558f5;
    --purple-dark: #5045d6;
    --peach: #ffb38f;
    --yellow: #ffd95a;
    --mint: #99dfc7;
    --pink: #f2a7d2;
    --lilac: #c8b8ff;
    --green: #25d366;
    --shadow: 0 18px 45px rgba(47, 40, 93, .10);
    --shadow-soft: 0 8px 24px rgba(47, 40, 93, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.55;
}
body.rtl-mode { font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif; }
body.modal-open, body.cart-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(235, 232, 243, .9);
}
.nav-container {
    width: min(1220px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
    white-space: nowrap;
}
.logo-icon { color: var(--purple); font-size: 20px; }
.logo .dot { color: var(--peach); }
.text-white { color: white; }
.search-box {
    position: relative;
    width: min(360px, 34vw);
    flex: 0 1 360px;
}
.search-box input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f4f2fb;
    color: var(--ink);
    padding: 0 18px 0 45px;
    outline: none;
    transition: .2s ease;
}
body.rtl-mode .search-box input { padding: 0 45px 0 18px; }
.search-box input:focus { background: #fff; border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(101, 88, 245, .10); }
.search-icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #9195aa; }
body.rtl-mode .search-icon { left: auto; right: 17px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.packs-link, .language-toggle, .icon-btn {
    border: 0;
    background: transparent;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
}
.packs-link { padding: 8px 6px; }
.packs-link:hover { color: var(--purple); }
.language-toggle {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
}
.language-toggle:hover { border-color: var(--purple); color: var(--purple); }
.icon-btn { width: 40px; height: 40px; position: relative; display: inline-grid; place-items: center; font-size: 18px; }
.icon-btn:hover { color: var(--purple); }
.badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--yellow);
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
}
body.rtl-mode .badge { right: auto; left: 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 19px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 10px 24px rgba(101, 88, 245, .25); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.full-width-btn { width: 100%; }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;

    /* New illustrated background */
    background-image: url("images-webp/hero.png.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #1f2544;
    padding: 92px 20px 82px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* Creative Coloring Collection */
.hero-subtitle,
.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero-subtitle {
    color: #6558f5;
}

/* Main hero title */
.hero h1 {
    max-width: 800px;
    margin: 14px auto 17px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -.05em;
    color: #1f2544;
}

/* Description */
.hero p {
    max-width: 650px;
    margin: 0 auto 28px;
    font-size: 17px;
    color: #5f6582;
}

/* Buttons */
.hero-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Cash on delivery */
.hero-note {
    margin-top: 22px;
    font-size: 13px;
    font-weight: 700;
    color: #5f6582;
}

.hero-note i {
    margin-inline-end: 6px;
}

/* Old circles are no longer needed */
.hero-decoration {
    display: none;
}
.hero p { max-width: 650px; margin: 0 auto 28px; font-size: 17px; color: rgba(255,255,255,.86); }
.hero-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 22px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.78); }
.hero-note i { margin-inline-end: 6px; }
.hero-decoration { position: absolute; border-radius: 50%; filter: blur(.2px); }
.hero-decoration-one { width: 220px; height: 220px; right: -60px; top: -70px; background: rgba(255, 217, 90, .35); }
 { width: 160px; height: 160px; left: -40px; bottom: -50px; background: rgba(153, 223, 199, .35); }

/* Feature strip */
.feature-strip { background: #fff; border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; }
.feature-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.feature-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.feature-icon.peach { background: #fff0e8; color: #e9804b; }
.feature-icon.mint { background: #eaf9f3; color: #1a8d70; }
.feature-icon.lilac { background: #f0edff; color: var(--purple); }
.feature-item strong { display: block; font-size: 13px; }
.feature-item p { color: var(--ink-soft); font-size: 11px; }

/* Shop */
.gallery-section { padding: 74px 0 90px; }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 34px; }
.eyebrow { color: var(--purple); margin-bottom: 8px; }
.section-header h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.section-header p { margin-top: 9px; max-width: 620px; color: var(--ink-soft); font-size: 14px; }
.filter-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tag-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.tag-btn:hover, .tag-btn.active { background: var(--ink); color: white; border-color: var(--ink); }
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.book-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: .22s ease;
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.book-card[hidden] { display: none !important; }
.book-badge {
    position: absolute; z-index: 3; top: 14px; left: 14px;
    padding: 6px 10px; border-radius: 999px; color: var(--ink); font-size: 10px; font-weight: 800;
}
body.rtl-mode .book-badge { left: auto; right: 14px; }
.book-badge.hot { background: var(--yellow); }
.book-badge.new { background: var(--mint); }
.book-cover-wrap { padding: 12px 12px 0; }
.book-cover { position: relative; height: 325px; overflow: hidden; border-radius: 17px; background: linear-gradient(145deg, #f7f3ff, #fdf8ef); }
.book-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .25s ease; }
.book-card:hover .book-img { transform: scale(1.025); }
.fav-icon-btn {
    position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,.10); display: grid; place-items: center;
}
body.rtl-mode .fav-icon-btn { right: auto; left: 12px; }
.fav-icon-btn.is-favorite { color: #ef5b78; }
.preview-thumbnails { display: flex; gap: 7px; padding: 11px 13px; overflow-x: auto; scrollbar-width: thin; }
.thumb { flex: 0 0 44px; height: 50px; border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; background: #f6f4fb; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { border-color: var(--purple); }
.book-info { padding: 18px 18px 20px; }
.category-label { font-size: 10px; font-weight: 800; color: var(--purple); text-transform: uppercase; letter-spacing: .08em; }
.book-info h3 { margin: 7px 0 8px; font-size: 18px; line-height: 1.2; letter-spacing: -.02em; }
.book-desc { min-height: 66px; margin-bottom: 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.book-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.price-area { display: flex; flex-direction: column; }
.price { font-size: 20px; font-weight: 800; }
.cash-note { color: #7c8198; font-size: 9px; font-weight: 700; }
.card-btns { display: flex; gap: 7px; }
.btn-preview, .btn-add-cart {
    border: 0; border-radius: 11px; min-height: 38px; padding: 8px 11px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px;
}
.btn-preview { background: #f0edff; color: var(--purple); }
.btn-add-cart { background: var(--ink); color: #fff; }
.btn-preview:hover { background: var(--purple); color: white; }
.btn-add-cart:hover { background: #11162f; }
.no-results { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.no-results i { font-size: 34px; color: var(--peach); margin-bottom: 10px; }
.no-results h3 { color: var(--ink); }

/* Order section */
.order-section { padding: 0 0 90px; }
.order-card {
    position: relative; overflow: hidden; border-radius: 30px; padding: 44px 48px; min-height: 250px;
    background: linear-gradient(135deg, #fff0e8 0%, #f5f1ff 100%); border: 1px solid #f0e6e0; display: flex; justify-content: space-between; align-items: center; gap: 30px;
}
.order-copy { max-width: 620px; }
.order-copy h2 { font-size: 36px; line-height: 1.1; letter-spacing: -.04em; margin-bottom: 12px; }
.order-copy p { color: var(--ink-soft); margin-bottom: 20px; }
.order-art { width: 250px; height: 180px; position: relative; flex: 0 0 auto; }
.art-card { position: absolute; width: 90px; height: 110px; border-radius: 20px; display: grid; place-items: center; box-shadow: 0 14px 25px rgba(58, 48, 112, .14); font-size: 27px; }
.art-card-one { left: 5px; top: 26px; background: var(--yellow); transform: rotate(-11deg); }
.art-card-two { left: 80px; top: 8px; background: var(--mint); transform: rotate(3deg); }
.art-card-three { left: 155px; top: 31px; background: var(--pink); transform: rotate(10deg); }

/* Packs */
.packs-page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 100px; }
.packs-hero-new { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 48px; }
.packs-hero-new h1 { max-width: 760px; font-size: clamp(38px, 6vw, 62px); line-height: 1.03; letter-spacing: -.05em; margin: 4px 0 13px; }
.packs-hero-new p { max-width: 720px; color: var(--ink-soft); }
.packs-hero-badge { display: inline-flex; align-items: center; gap: 9px; padding: 12px 15px; background: #eaf9f3; border-radius: 999px; color: #1b8e6e; font-weight: 800; font-size: 12px; white-space: nowrap; }
.pack-section { margin-bottom: 55px; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading-row h2 { font-size: 31px; line-height: 1.1; letter-spacing: -.04em; }
.section-price-note { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.packs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.pack-card {
    background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow-soft); transition: .22s ease;
}
.pack-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.pack-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.pack-label { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #f0edff; color: var(--purple); font-size: 10px; font-weight: 800; }
.pack-save { font-size: 11px; color: #266c50; background: #e8f7ed; border-radius: 999px; padding: 6px 10px; font-weight: 800; white-space: nowrap; }
.pack-regular-price { display: block; font-size: 11px; color: var(--ink-soft); margin: 2px 0 4px; font-weight: 600; }
.pack-card h3 { font-size: 21px; margin-bottom: 16px; }
.pack-book-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pack-book-tile { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border: 1px solid #f0edf5; background: #faf9fd; border-radius: 13px; }
.pack-book-tile img { width: 46px; height: 60px; object-fit: contain; flex: 0 0 auto; border-radius: 8px; background: #f1eff8; }
.pack-book-tile span { font-size: 10px; font-weight: 700; line-height: 1.3; }
.pack-card-bottom { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 18px; }
.pack-price { display: block; font-size: 23px; font-weight: 800; }
.pack-cod { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.pack-card .add-pack-button { min-height: 41px; padding-inline: 14px; font-size: 11px; }
.pencil-option { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 700; cursor: pointer; }
.pencil-option input { accent-color: var(--purple); }
.pencil-option strong { margin-inline-start: auto; color: var(--purple); }
.build-pack-section { margin-top: 70px; padding: 30px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.build-pack-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
.build-pack-intro h2 { font-size: 35px; letter-spacing: -.04em; line-height: 1.05; }
.build-pack-intro p { margin-top: 9px; color: var(--ink-soft); }
.build-pack-total-card { min-width: 190px; padding: 15px 18px; background: #f3f0ff; border-radius: 18px; text-align: right; }
body.rtl-mode .build-pack-total-card { text-align: left; }
.build-pack-total-card span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.build-pack-total-card strong { font-size: 23px; }
.pack-size-selector { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.pack-size-btn { min-width: 50px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 13px; color: var(--ink); font-weight: 800; }
.pack-size-btn:hover { border-color: var(--purple); color: var(--purple); }
.pack-size-btn.active { background: var(--ink); border-color: var(--ink); color: white; }
.plus-five-controls { width: fit-content; display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 8px 10px; background: #f7f4ff; border-radius: 14px; }
.plus-five-controls button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; color: var(--ink); font-weight: 800; }
.plus-five-controls span { color: var(--ink-soft); font-size: 11px; }
.selected-pack-area { margin: 22px 0 28px; padding: 18px; border-radius: 20px; background: #fffaf1; border: 1px solid #f6ead4; }
.selected-area-heading, .available-books-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.selected-area-heading h3, .available-books-heading h3 { font-size: 21px; }
.selected-area-heading span { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.selected-pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.selected-book-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid #f0e5d4; border-radius: 13px; min-width: 0; }
.selected-book-row img { width: 40px; height: 50px; object-fit: contain; border-radius: 6px; background: #f6f1ea; flex: 0 0 auto; }
.selected-book-row span { min-width: 0; flex: 1; font-size: 10px; font-weight: 800; }
.selected-book-row button { width: 26px; height: 26px; border: 0; background: #fff1ef; color: #d95d60; border-radius: 8px; }
.empty-selection { grid-column: 1 / -1; padding: 16px; border: 1px dashed #eadfcf; border-radius: 13px; text-align: center; color: var(--ink-soft); font-size: 11px; }
.empty-selection i { color: var(--peach); font-size: 20px; margin-bottom: 5px; }
.available-books-heading p { color: var(--ink-soft); font-size: 11px; }
.build-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.build-book-card { overflow: hidden; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); transition: .18s ease; }
body.rtl-mode .build-book-card { text-align: right; }
.build-book-card:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--lilac); }
.build-book-card:disabled { opacity: .45; cursor: not-allowed; }
.build-book-card.selected { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(101, 88, 245, .09); }
.build-book-image { position: relative; height: 165px; background: #f8f6fb; }
.build-book-image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.book-selected-check { position: absolute; top: 8px; right: 8px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--purple); color: white; font-size: 13px; }
body.rtl-mode .book-selected-check { right: auto; left: 8px; }
.build-book-card > div:last-of-type { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 0; }
.build-book-card strong { font-size: 11px; line-height: 1.3; }
.build-book-card > div:last-of-type span { color: var(--ink-soft); font-size: 10px; }
.build-book-card em { display: block; padding: 8px 11px 11px; font-size: 10px; font-style: normal; font-weight: 800; color: var(--purple); }
.pack-pencil-option { margin-top: 22px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #faf9fd; border-top: 1px solid var(--line); }
.pencil-main { color: var(--ink); }
.pencil-price { margin-inline-start: auto; color: var(--purple); font-weight: 800; }
#add-build-pack-btn { margin-top: 15px; }

/* Cart */
.cart-drawer-overlay { position: fixed; inset: 0; background: rgba(28, 25, 56, .52); z-index: 1200; display: none; backdrop-filter: blur(2px); }
.cart-drawer { position: fixed; top: 0; right: -450px; z-index: 1300; width: min(420px, 100%); height: 100dvh; background: #fff; box-shadow: -20px 0 60px rgba(26, 23, 54, .18); display: flex; flex-direction: column; transition: right .28s ease; }
body.rtl-mode .cart-drawer { right: auto; left: -450px; transition: left .28s ease; }
.cart-drawer.open { right: 0; }
body.rtl-mode .cart-drawer.open { left: 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 22px; border-bottom: 1px solid var(--line); }
.cart-header h3 { font-size: 22px; line-height: 1.15; }
.close-btn, .checkout-close { border: 0; background: #f5f2fb; width: 36px; height: 36px; border-radius: 11px; font-size: 22px; color: var(--ink); }
.cart-body { flex: 1; overflow: auto; padding: 18px 22px; }
.empty-cart { min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--ink-soft); }
.empty-cart i { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: #f4f1ff; color: var(--purple); font-size: 23px; margin-bottom: 14px; }
.empty-cart p { color: var(--ink); font-weight: 800; }
.empty-cart span { margin-top: 4px; font-size: 12px; }
.cart-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-item-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: #f4f1ff; color: var(--purple); }
.cart-item-main { min-width: 0; flex: 1; }
.cart-item-main > strong { display: block; font-size: 12px; }
.cart-item-books, .cart-item-addon { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.cart-item-addon { color: #1b8e6e; font-weight: 800; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; font-weight: 800; }
.qty-controls { display: inline-flex; align-items: center; gap: 6px; }
.qty-controls button { width: 25px; height: 25px; border: 1px solid var(--line); background: #fff; border-radius: 7px; }
.qty-controls b { min-width: 15px; text-align: center; font-size: 10px; }
.qty-controls .remove-cart { margin-inline-start: 3px; background: #fff0f0; color: #d95d60; border-color: #ffe0e0; }
.cart-footer { padding: 17px 22px 22px; border-top: 1px solid var(--line); background: #fff; }
.delivery-note { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: #1b8e6e; font-size: 10px; font-weight: 800; }
.total-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 15px; }
.total-row strong { font-size: 22px; }

/* Image modal / pencil modal / checkout */
.image-modal { position: fixed; inset: 0; z-index: 1600; display: none; flex-direction: column; justify-content: center; align-items: center; padding: 30px; background: rgba(27, 24, 54, .92); }
.modal-content { width: auto; max-width: min(92vw, 900px); max-height: 78vh; object-fit: contain; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.close-modal { position: absolute; top: 17px; right: 22px; z-index: 2; border: 0; background: transparent; color: white; font-size: 42px; }
body.rtl-mode .close-modal { right: auto; left: 22px; }
.modal-nav { display: flex; gap: 10px; margin-top: 17px; }
.modal-nav button { border: 0; border-radius: 999px; background: white; color: var(--ink); padding: 10px 15px; font-weight: 800; }
.pencil-choice-overlay, .checkout-overlay { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(27, 24, 54, .52); backdrop-filter: blur(4px); }
.pencil-choice-box, .checkout-box { position: relative; width: min(100%, 430px); padding: 26px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.pencil-choice-box h3, .checkout-box h2 { margin-bottom: 9px; font-size: 25px; line-height: 1.1; }
.pencil-choice-box p, .checkout-box > p { margin-bottom: 18px; color: var(--ink-soft); font-size: 12px; }
.pencil-choice-buttons { display: grid; gap: 10px; }
.pencil-choice-buttons button { display: flex; align-items: center; justify-content: space-between; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-weight: 800; }
.pencil-choice-buttons button:hover { border-color: var(--purple); }
.pencil-choice-buttons button strong { color: var(--purple); font-size: 11px; }
.checkout-close { position: absolute; top: 18px; right: 18px; }
body.rtl-mode .checkout-close { right: auto; left: 18px; }
.checkout-box .eyebrow { padding-right: 45px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 15px 0; }
.checkout-grid label { display: block; }
.checkout-grid .checkout-full { grid-column: 1 / -1; }
.checkout-grid label > span { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 800; color: var(--ink-soft); }
.checkout-grid input, .checkout-grid textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #faf9fd; padding: 10px 11px; outline: none; resize: vertical; }
.checkout-grid input:focus, .checkout-grid textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(101, 88, 245, .08); }
.checkout-payment { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 12px; background: #eaf9f3; color: #1b8e6e; font-size: 10px; }

/* Footer */
footer { background: #1f2441; color: white; padding-top: 55px; }
.footer-content { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 38px; }
.footer-brand p { max-width: 360px; margin-top: 13px; color: #b7b9cb; font-size: 12px; }
.footer-links h4, .footer-social h4 { margin-bottom: 10px; font-size: 13px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: #b7b9cb; text-decoration: none; font-size: 11px; }
.footer-links a:hover { color: white; }
.social-icons { display: flex; gap: 9px; }
.social-icons a { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #2a3050; color: white; text-decoration: none; }
.social-icons a:hover { background: var(--purple); }
.footer-bottom { border-top: 1px solid #2d3353; text-align: center; color: #8f93a9; padding: 18px 20px; font-size: 10px; }

/* Responsive */
@media (max-width: 900px) {
    .nav-container { flex-wrap: wrap; padding: 12px 0; }
    .search-box { order: 3; width: 100%; flex: 1 0 100%; }
    .feature-grid { grid-template-columns: 1fr; gap: 12px; }
    .section-header { align-items: start; flex-direction: column; }
    .filter-tags { justify-content: flex-start; }
    .order-art { width: 190px; transform: scale(.88); transform-origin: right center; }
    body.rtl-mode .order-art { transform-origin: left center; }
}
@media (max-width: 720px) {
    .container, .packs-page { width: min(100% - 28px, 1180px); }
    .nav-container { width: calc(100% - 20px); gap: 8px; }
    .logo { font-size: 21px; }
    .nav-actions { gap: 2px; flex-wrap: wrap; max-width: 100%; }
    .packs-link { font-size: 12px; }
    .language-toggle { padding: 7px 9px; }
    .hero { padding: 68px 16px 62px; }
    .hero h1 { font-size: 40px; }
    .hero p { font-size: 14px; }
    .gallery-section { padding: 54px 0 70px; }
    .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .book-card { border-radius: 17px; }
    .book-cover-wrap { padding: 8px 8px 0; }
    .book-cover { height: 245px; border-radius: 13px; }
    .book-info { padding: 13px 12px 14px; }
    .book-info h3 { font-size: 14px; }
    .book-desc { min-height: 82px; font-size: 10px; }
    .book-footer { align-items: stretch; flex-direction: column; }
    .card-btns { width: 100%; }
    .btn-preview, .btn-add-cart { flex: 1; justify-content: center; }
    .order-card { padding: 28px 22px; min-height: 0; }
    .order-art { display: none; }
    .packs-hero-new { flex-direction: column; align-items: start; }
    .packs-hero-new h1 { font-size: 42px; }
    .build-pack-intro { flex-direction: column; align-items: stretch; }
    .build-pack-total-card { text-align: left; min-width: 0; }
    body.rtl-mode .build-pack-total-card { text-align: right; }
    .packs-grid { grid-template-columns: 1fr; }
    .pack-book-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .build-books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-content { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 500px) {
    .books-grid { grid-template-columns: 1fr; }
    .book-cover { height: 310px; }
    .build-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-grid .checkout-full { grid-column: auto; }
    .cart-drawer { width: 100%; }
    .hero h1, .packs-hero-new h1 { font-size: 36px; }
    .section-heading-row { align-items: start; flex-direction: column; gap: 7px; }
}

/* HERO DARK TEXT */
.hero h1 {
    color: #171c38 !important;
}

.hero .hero-subtitle {
    color: #4f46d8 !important;
}

.hero p {
    color: #252b49 !important;
}

.hero .hero-note {
    color: #252b49 !important;
}
/* Dedicated Kids & Stories page */
.stories-page { background: #fffdfb; min-height: 70vh; }
.stories-hero { max-width: 1220px; margin: 30px auto 36px; padding: clamp(30px,5vw,64px); border-radius: 30px; background: linear-gradient(115deg,#fff0e6,#fce6f2 55%,#eadffe); display:grid;grid-template-columns: 1.6fr .7fr;gap:30px;align-items:center;overflow:hidden; }
.stories-hero h1 { font-size: clamp(34px,4.6vw,62px);line-height:1.08;max-width:690px;color:#493254;margin:14px 0 18px; }
.stories-hero p { color:#66576b;font-size:16px;line-height:1.8;max-width:670px; }
.stories-hero-actions {display:flex;flex-wrap:wrap;gap:12px;margin:26px 0 18px;} .stories-cod {display:inline-flex;align-items:center;gap:8px;color:#765d6a;font-size:13px;}
.stories-hero-art { min-height:240px;display:flex;flex-direction:column;justify-content:center;align-items:center;transform:rotate(-8deg);color:#9c62a2;text-shadow:0 8px 25px #a87fb354;}
.stories-hero-art .fa-book-open-reader { font-size:clamp(110px,14vw,185px); } .storybook-spark,.storybook-stars {font-size:40px;color:#ec9e78;}
.stories-page-content {max-width:1220px;padding:0 20px 72px;margin:auto;} .stories-collection,.stories-bundles {margin:54px 0;} .stories-collection .section-heading-row {margin-bottom:25px;} .stories-collection .section-heading-row p,.stories-bundles .section-heading-row p {color:#776b7f;margin-top:9px;} .stories-heading-icon {font-size:45px;}
.stories-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:24px;} .story-card .book-desc {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;} .story-card[hidden]{display:none !important;} .stories-bundles {background:#faf2fd;padding:28px;border-radius:25px;} .stories-bundles .packs-grid {margin-top:22px;} .stories-bundles .pack-card {background:white;}
@media(max-width:700px){ .stories-hero {margin:14px 12px 18px;grid-template-columns:1fr;padding:28px 22px;} .stories-hero-art {display:none;} .stories-page-content {padding:0 14px 45px;} .stories-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;} .stories-bundles{padding:16px;} .stories-heading-icon{font-size:27px;} }
@media(max-width:390px){ .stories-grid{grid-template-columns:1fr;} }

/* Automatic multi-book savings shown under individual cart items */
.cart-bundle-savings { margin: 12px 0; padding: 12px 14px; border: 1px solid #eabbd0; background: #fff3f8; border-radius: 12px; display: flex; flex-direction: column; gap: 5px; color: #7b2851; font-size: 13px; }
.cart-bundle-savings strong { font-size: 14px; }

/* Keep the full checkout accessible on desktop and mobile */
.checkout-overlay { overflow-y: auto; overscroll-behavior: contain; align-items: flex-start; padding: 16px; }
.checkout-box { width: min(100%, 640px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: auto; box-sizing: border-box; }
@media (max-width: 600px) { .checkout-overlay { padding: 8px; } .checkout-box { max-height: calc(100dvh - 16px); padding: 20px 16px; } }
/* Managed catalog and mobile checkout */
.catalog-notice{padding:12px 20px;background:#fff0d8;color:#513b15;font:14px/1.6 Arial;text-align:center}.checkout-summary{padding:14px;border-radius:12px;background:#f3edf7;line-height:1.7;margin-bottom:14px}.checkout-receipt{display:grid;gap:18px;overflow-wrap:anywhere}.checkout-receipt p{font-size:16px;line-height:1.6}.checkout-box input,.checkout-box textarea,.checkout-box select{font-size:16px}.checkout-box [role=alert]{color:#a12a39;line-height:1.6}.checkout-box button,.checkout-box a.btn{min-height:44px}.checkout-box a{color:#73517c}.checkout-box a.btn{color:white}.checkout-box label{min-width:0}.checkout-full[hidden]{display:none!important}
