:root {
    --navy-950: #071522;
    --navy-900: #0b2033;
    --navy-800: #10304a;
    --cyan: #1ec8c8;
    --cyan-dark: #119c9f;
    --paper: #f4f7f8;
    --white: #ffffff;
    --ink: #102234;
    --muted: #6a7b89;
    --line: #dce5e9;
    --shadow: 0 18px 50px rgba(7, 21, 34, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.news-ticker { position: relative; z-index: 55; height: 31px; display: flex; overflow: hidden; color: #dce8ed; background: #06111c; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 11px; }
.ticker-label { position: relative; z-index: 2; flex: none; display: grid; place-items: center; padding: 0 18px; color: var(--navy-950); background: var(--cyan); font-weight: 900; }
.ticker-window { flex: 1; overflow: hidden; }
.ticker-track { width: max-content; min-width: 100%; height: 31px; display: flex; align-items: center; gap: 23px; padding-inline: 23px; white-space: nowrap; animation: ticker-move 34s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-dot { color: var(--cyan); font-size: 9px; }
.ticker-track a:hover { color: var(--cyan); }
@keyframes ticker-move { from { transform: translateX(-15%); } to { transform: translateX(100%); } }

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    color: var(--white);
    background: rgba(7, 21, 34, .94);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.main-nav { display: flex; gap: 24px; margin-inline-start: 20px; font-size: 14px; color: #c8d4db; }
.main-nav a:hover { color: var(--cyan); }
.cart-button {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    color: #dce7ec;
    background: rgba(255,255,255,.06);
    cursor: pointer;
}
.cart-count { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; color: var(--navy-950); background: var(--cyan); font-size: 12px; font-weight: 800; }
.mobile-menu-button { display: none; margin-inline-start: auto; padding: 8px; border: 0; background: transparent; }
.mobile-menu-button span { display: block; width: 24px; height: 2px; margin: 5px 0; background: white; }

.hero {
    position: relative;
    min-height: 570px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
    background: var(--navy-950);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 35%, rgba(30,200,200,.22), transparent 32%), linear-gradient(115deg, transparent 40%, rgba(30,200,200,.06));
}
.hero-backdrop { position: absolute; inset: 0 0 0 52%; background-size: cover; background-position: center; filter: saturate(.72); opacity: .55; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,21,34,.15), var(--navy-950) 78%); }
.hero-content { position: relative; z-index: 2; padding-block: 80px; }
.eyebrow, .section-kicker { display: block; margin-bottom: 8px; color: var(--cyan-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.hero .eyebrow { color: var(--cyan); }
.hero h1 { max-width: 650px; margin: 0; font-size: clamp(46px, 8vw, 86px); line-height: 1.05; letter-spacing: -.045em; }
.hero h1 span { color: var(--cyan); }
.hero p { max-width: 610px; margin: 24px 0 30px; color: #c9d6dc; font-size: 18px; }
.search-box {
    width: min(690px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px 7px 16px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.search-box > span { font-size: 28px; transform: rotate(-20deg); }
.search-box input { min-width: 0; flex: 1; padding: 12px 4px; border: 0; outline: 0; color: white; background: transparent; }
.search-box input::placeholder { color: #b7c6ce; }
.search-box button { padding: 12px 25px; border: 0; border-radius: 11px; color: var(--navy-950); background: var(--cyan); font-weight: 800; cursor: pointer; }
.quick-links { display: flex; gap: 12px; margin-top: 20px; font-size: 13px; color: #c4d1d7; }
.quick-links a { padding: 7px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; }

.page-content { padding-block: 62px 90px; }
.search-status { display: none; margin-bottom: 24px; padding: 14px 18px; border-radius: 12px; color: #075a5d; background: #dff7f5; font-weight: 700; }
.content-section { margin-bottom: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.2; }
.section-count { color: var(--muted); font-size: 13px; }
.book-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.book-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 8px 28px rgba(7,21,34,.06); transition: transform .22s ease, box-shadow .22s ease; }
.book-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.book-card[hidden] { display: none; }
.book-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #dce9eb; }
.book-cover > a { display: block; height: 100%; }
.book-cover > a > img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.book-card:hover .book-cover > a > img { transform: scale(1.035); }
.book-stage { position: absolute; inset: auto 10px 10px auto; max-width: calc(100% - 20px); padding: 5px 9px; border-radius: 8px; color: white; background: rgba(7,21,34,.84); font-size: 11px; backdrop-filter: blur(6px); }
.cover-placeholder { height: 100%; display: grid; place-content: center; gap: 12px; justify-items: center; color: white; background: linear-gradient(145deg, var(--navy-800), var(--cyan-dark)); }
.cover-placeholder img { width: 70px; }
.book-info { padding: 15px; }
.book-info h3 { min-height: 48px; margin: 0 0 4px; font-size: 16px; line-height: 1.45; }
.book-info p { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.book-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px solid #edf1f3; font-size: 12px; }
.book-meta span { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.book-meta strong { flex: none; color: var(--cyan-dark); font-size: 14px; }
.add-to-cart { padding: 14px 24px; border: 0; border-radius: 12px; color: var(--navy-950); background: var(--cyan); font-weight: 800; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.add-to-cart:hover { background: #43dddd; transform: translateY(-2px); }
.add-to-cart.compact { width: 100%; margin-top: 13px; padding: 9px 12px; font-size: 12px; }
.empty-state { padding: 45px; border: 1px dashed #bac9cf; border-radius: 18px; text-align: center; background: white; }
.empty-state strong { font-size: 20px; }
.empty-state p { margin-bottom: 0; color: var(--muted); }

.advertising-slot { position: relative; min-height: 260px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 0 0 75px; padding: 45px clamp(28px, 6vw, 70px); overflow: hidden; border-radius: 24px; color: white; background: linear-gradient(115deg, #0b2033 5%, #123d55 65%, #119c9f); box-shadow: var(--shadow); }
.advertising-slot::before { content: "إعلان"; position: absolute; inset: -75px auto auto -10px; color: rgba(255,255,255,.045); font-size: 180px; font-weight: 900; }
.ad-copy { position: relative; z-index: 1; }
.ad-copy > span { display: inline-block; padding: 5px 10px; border-radius: 999px; color: var(--navy-950); background: var(--cyan); font-size: 11px; font-weight: 800; }
.ad-copy h2 { margin: 15px 0 10px; font-size: clamp(26px, 4vw, 42px); line-height: 1.25; }
.ad-copy p { max-width: 650px; margin: 0; color: #c8d9df; }
.ad-mark { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 105px; height: 105px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.1); font-size: 35px; }
.advertising-slot.has-media { display: grid; grid-template-columns: 1fr minmax(300px, 46%); }
.ad-media { position: relative; z-index: 1; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: #06111c; }
.ad-media img, .ad-media iframe { width: 100%; height: 100%; display: block; border: 0; object-fit: cover; }
.ad-link { display: inline-block; margin-top: 17px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: white; font-size: 12px; }

.site-footer { color: #b8c7cf; background: var(--navy-950); }
.footer-inner { min-height: 150px; display: flex; align-items: center; gap: 30px; }
.footer-brand { color: white; }
.footer-inner p { margin: 0; }
.footer-inner > a { margin-inline-start: auto; color: var(--cyan); font-size: 13px; }

.detail-page, .cart-page { min-height: 75vh; padding: 38px 0 90px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--cyan-dark); }
.book-detail { display: grid; grid-template-columns: minmax(300px, 430px) 1fr; gap: clamp(40px, 7vw, 90px); align-items: start; margin-bottom: 90px; }
.detail-main-image { overflow: hidden; aspect-ratio: 3 / 4; border-radius: 22px; background: #dfe8eb; box-shadow: var(--shadow); }
.detail-main-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-thumbnails { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail { flex: 0 0 68px; width: 68px; height: 86px; padding: 3px; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: white; cursor: pointer; }
.thumbnail.active { border-color: var(--cyan-dark); }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.detail-info { padding-top: 15px; }
.detail-label { display: inline-block; padding: 6px 11px; border-radius: 999px; color: #08777a; background: #dff7f5; font-size: 12px; font-weight: 800; }
.detail-info h1 { margin: 18px 0 9px; font-size: clamp(34px, 5vw, 58px); line-height: 1.17; letter-spacing: -.035em; }
.detail-teacher { margin: 0 0 30px; color: var(--muted); font-size: 17px; }
.detail-teacher strong { color: var(--ink); }
.detail-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.detail-facts div { display: flex; flex-direction: column; gap: 2px; }
.detail-facts span { color: var(--muted); font-size: 11px; }
.detail-facts strong { font-size: 14px; }
.detail-description { margin-top: 27px; }
.detail-description h2 { margin: 0 0 8px; font-size: 20px; }
.detail-description p { margin: 0; color: #566978; white-space: pre-line; }
.purchase-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 32px; padding: 20px; border-radius: 17px; color: white; background: var(--navy-900); }
.purchase-box > div { display: flex; flex-direction: column; }
.purchase-box span { color: #b9cbd3; font-size: 12px; }
.purchase-box strong { color: var(--cyan); font-size: 26px; }
.delivery-note { margin: 10px 4px 0; color: var(--muted); font-size: 12px; }
.related-section { margin-bottom: 0; }

.cart-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.cart-title h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); }
.cart-title > a { color: var(--cyan-dark); font-size: 13px; font-weight: 800; }
.cart-layout { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.cart-items { display: grid; gap: 13px; }
.cart-item { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.cart-item-image { width: 90px; height: 116px; overflow: hidden; border-radius: 10px; background: #e4ebee; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h2 { margin: 0 0 7px; font-size: 17px; }
.cart-item-info strong { color: var(--cyan-dark); }
.quantity-control { display: flex; align-items: center; gap: 9px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; }
.quantity-control button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: #edf3f5; cursor: pointer; }
.quantity-control span { min-width: 20px; text-align: center; font-weight: 800; }
.remove-item { border: 0; color: #c33131; background: transparent; cursor: pointer; }
.cart-summary { position: sticky; top: 95px; padding: 24px; border-radius: 18px; color: white; background: var(--navy-900); box-shadow: var(--shadow); }
.cart-summary h2 { margin: 0 0 22px; }
.cart-summary > div { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; color: #c7d5dc; border-bottom: 1px solid rgba(255,255,255,.1); }
.cart-summary .summary-total { color: white; font-size: 18px; }
.summary-total strong { color: var(--cyan); }
.cart-summary button { width: 100%; margin-top: 22px; padding: 14px; border: 0; border-radius: 11px; color: var(--navy-950); background: var(--cyan); font-weight: 800; cursor: pointer; }
.cart-summary button:disabled { opacity: .45; cursor: not-allowed; }
.cart-summary p { margin: 12px 0 0; color: #9fb2bc; font-size: 11px; text-align: center; }
.cart-empty { padding: 70px 25px; border: 1px dashed #b8c8cf; border-radius: 18px; text-align: center; background: white; }
.cart-empty strong { font-size: 22px; }
.cart-empty p { color: var(--muted); }
.cart-empty a { display: inline-block; padding: 10px 18px; border-radius: 10px; color: white; background: var(--navy-900); font-weight: 800; }
.toast { position: fixed; z-index: 100; inset: auto 50% 25px auto; padding: 12px 20px; border-radius: 12px; color: white; background: var(--navy-900); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(50%, 20px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }

.library-register-page { min-height: 78vh; padding: 70px 0 95px; background: linear-gradient(145deg, #edf5f5, var(--paper) 45%); }
.register-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(35px, 7vw, 85px); align-items: start; }
.register-intro { position: sticky; top: 105px; padding-top: 30px; }
.register-intro h1 { margin: 7px 0 18px; font-size: clamp(40px, 6vw, 64px); line-height: 1.1; letter-spacing: -.045em; }
.register-intro > p { color: var(--muted); font-size: 17px; }
.register-intro ul { margin: 25px 0 0; padding: 0; list-style: none; }
.register-intro li { position: relative; margin: 12px 0; padding-right: 27px; }
.register-intro li::before { content: "✓"; position: absolute; right: 0; color: var(--cyan-dark); font-weight: 900; }
.registration-card { padding: clamp(23px, 4vw, 40px); border: 1px solid var(--line); border-radius: 23px; background: white; box-shadow: var(--shadow); }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.public-field.full { grid-column: 1 / -1; }
.public-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.public-field label small { color: var(--muted); font-weight: normal; }
.public-field input, .public-field textarea { width: 100%; padding: 12px 13px; border: 1px solid #cbd7dc; border-radius: 11px; outline: none; background: #fbfcfc; }
.public-field textarea { min-height: 95px; resize: vertical; }
.public-field input:focus, .public-field textarea:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(17,156,159,.1); }
.register-submit { width: 100%; margin-top: 22px; padding: 14px; border: 0; border-radius: 12px; color: var(--navy-950); background: var(--cyan); font-weight: 800; cursor: pointer; }
.public-alert { margin-bottom: 20px; padding: 13px 15px; border-radius: 11px; font-size: 13px; }
.public-alert.success { color: #075f52; background: #dcf8ef; }
.public-alert.error { color: #8f2424; background: #feecec; }
.public-alert ul { margin: 7px 0 0; }
.coming-soon-page { min-height: 76vh; display: grid; place-items: center; padding: 70px 0; overflow: hidden; color: white; background: radial-gradient(circle at 50% 30%, #16455c, var(--navy-950) 62%); }
.coming-soon-content { position: relative; text-align: center; }
.coming-soon-content::before { content: ""; position: absolute; z-index: 0; inset: 50% auto auto 50%; width: 420px; height: 420px; border: 1px solid rgba(30,200,200,.14); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 70px rgba(30,200,200,.035), 0 0 0 140px rgba(30,200,200,.018); }
.coming-soon-content > * { position: relative; z-index: 1; }
.coming-badge { display: inline-block; padding: 6px 12px; border-radius: 999px; color: var(--navy-950); background: var(--cyan); font-size: 12px; font-weight: 800; }
.coming-icon { display: block; width: 90px; height: 90px; object-fit: contain; margin: 32px auto 14px; }
.coming-soon-content h1 { margin: 0; color: var(--cyan); font-size: clamp(52px, 10vw, 92px); line-height: 1; }
.coming-soon-content p { max-width: 580px; margin: 24px auto; color: #c3d4dc; font-size: 17px; }
.coming-soon-content a { display: inline-block; padding: 11px 20px; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; color: white; background: rgba(255,255,255,.07); }
.checkout-page { min-height: 78vh; padding: 45px 0 90px; }
.checkout-heading { margin-bottom: 28px; }
.checkout-heading h1 { margin: 0; font-size: clamp(34px,5vw,52px); }
.checkout-heading p { margin: 8px 0 0; color: var(--muted); }
.checkout-layout { display:grid;grid-template-columns:1fr 360px;gap:28px;align-items:start; }
.checkout-form { padding: clamp(22px,4vw,38px); border:1px solid var(--line);border-radius:20px;background:white;box-shadow:0 10px 35px rgba(7,21,34,.06); }
.form-privacy { margin:10px 0 0;color:var(--muted);font-size:11px;text-align:center; }
.checkout-summary { position:sticky;top:105px;padding:24px;border-radius:18px;color:white;background:var(--navy-900);box-shadow:var(--shadow); }
.checkout-summary h2 { margin-top:0; }
.checkout-line { display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.09);font-size:12px; }
.checkout-line span { color:#c6d5dc; }
.checkout-line strong { flex:none; }
.checkout-subtotal { display:flex;justify-content:space-between;gap:15px;padding:10px 0;color:#c6d5dc;border-bottom:1px solid rgba(255,255,255,.09);font-size:13px; }
.checkout-subtotal strong { color:white; }
.checkout-total { display:flex;justify-content:space-between;gap:15px;margin-top:15px;padding-top:15px;border-top:1px solid rgba(255,255,255,.2); }
.checkout-total strong { color:var(--cyan);font-size:19px; }
.checkout-summary>p { margin-bottom:0;color:#9fb2bc;font-size:11px; }
.checkout-empty { padding:18px;border-radius:10px;background:rgba(255,255,255,.07); }
.checkout-empty a { color:var(--cyan); }
.order-success-page { min-height:78vh;display:grid;place-items:center;padding:70px 0;background:linear-gradient(145deg,#eef8f7,var(--paper)); }
.success-card { max-width:680px;padding:clamp(30px,6vw,65px);border:1px solid var(--line);border-radius:25px;background:white;box-shadow:var(--shadow);text-align:center; }
.success-check { width:75px;height:75px;display:grid;place-items:center;margin:0 auto 22px;border-radius:50%;color:white;background:var(--cyan-dark);font-size:38px;font-weight:900; }
.success-card h1 { margin:5px 0 10px;font-size:clamp(34px,6vw,54px); }
.success-card>p { color:var(--muted); }
.order-number { margin:28px 0;padding:20px;border:1px dashed #9db3bd;border-radius:15px;background:#f5f9fa; }
.order-number span { display:block;color:var(--muted);font-size:11px; }
.order-number strong { display:block;margin:5px 0 12px;color:var(--navy-900);font-family:Consolas,monospace;font-size:clamp(20px,5vw,31px);direction:ltr; }
.order-number button { padding:7px 12px;border:0;border-radius:8px;color:white;background:var(--navy-900);cursor:pointer; }
.success-summary { display:flex;justify-content:center;gap:25px;margin-bottom:24px; }
.success-summary strong { color:var(--cyan-dark); }
.success-card>a { display:inline-block;padding:11px 19px;border-radius:10px;color:white;background:var(--navy-900);font-weight:800; }
.order-success-page>.container { width:min(680px,calc(100% - 28px)); }
.rating-card { width:min(760px,calc(100% - 28px)); margin:30px auto 0;padding:clamp(25px,5vw,45px);border:1px solid var(--line);border-radius:23px;background:white;box-shadow:var(--shadow); }
.rating-heading { margin-bottom:25px;text-align:center; }
.rating-heading h2 { margin:0;font-size:34px; }
.rating-heading p { margin:7px 0 0;color:var(--muted); }
.rating-row { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 0;border-bottom:1px solid #e8eef1; }
.rating-row>div:first-child { display:flex;flex-direction:column; }
.rating-row span { color:var(--muted);font-size:11px; }
.rating-row strong { font-size:15px; }
.stars { display:inline-flex;flex-direction:row-reverse;gap:3px;margin:0;padding:0;border:0; }
.stars input { position:absolute;opacity:0;pointer-events:none; }
.stars label { color:#cbd5db;font-size:31px;line-height:1;cursor:pointer;transition:color .15s,transform .15s; }
.stars label:hover,.stars label:hover~label,.stars input:checked~label { color:#f3b61f; }
.stars label:hover { transform:scale(1.12); }
.platform-feedback { display:none;margin-top:20px; }
.platform-feedback.show { display:block; }
.platform-feedback label { display:block;margin-bottom:7px;font-weight:800; }
.platform-feedback textarea { width:100%;min-height:105px;padding:12px;border:1px solid #cbd7dc;border-radius:11px;resize:vertical; }
.rating-thanks { padding:35px;border-radius:15px;color:#08705f;background:#e2f8f2;text-align:center;font-size:18px;font-weight:800; }

@media (max-width: 980px) {
    .book-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero-backdrop { inset-inline: 35% 0; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 760px) {
    .container { width: min(100% - 28px, 1180px); }
    .header-inner { min-height: 64px; }
    .brand { font-size: 19px; }
    .brand img { width: 34px; height: 34px; }
    .mobile-menu-button { display: block; }
    .main-nav { position: absolute; inset: 64px 14px auto; display: none; flex-direction: column; gap: 0; margin: 0; padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: var(--navy-900); box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 11px 12px; }
    .cart-button { margin-inline-start: 0; padding: 8px 10px; }
    .cart-button > span:nth-child(2) { display: none; }
    .hero { min-height: 540px; }
    .hero-backdrop { inset: 0; opacity: .22; }
    .hero-overlay { background: linear-gradient(0deg, rgba(7,21,34,.35), rgba(7,21,34,.92)); }
    .hero-content { padding-block: 60px; }
    .hero p { font-size: 16px; }
    .search-box { padding: 5px 6px 5px 12px; }
    .search-box button { padding-inline: 17px; }
    .book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .book-info { padding: 12px; }
    .book-info h3 { font-size: 14px; }
    .advertising-slot { min-height: 310px; align-items: flex-start; flex-direction: column; }
    .ad-mark { width: 78px; height: 78px; }
    .advertising-slot.has-media { grid-template-columns: 1fr; }
    .ad-media { width: 100%; }
    .ticker-label { padding-inline: 10px; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 36px; }
    .footer-inner > a { margin-inline-start: 0; }
    .book-detail { grid-template-columns: 1fr; gap: 35px; margin-bottom: 65px; }
    .detail-gallery { width: min(100%, 430px); margin-inline: auto; }
    .detail-info { padding-top: 0; }
    .purchase-box { align-items: stretch; flex-direction: column; }
    .purchase-box .add-to-cart { width: 100%; }
    .cart-title { align-items: flex-start; flex-direction: column; }
    .cart-item { grid-template-columns: 76px 1fr auto; gap: 12px; }
    .cart-item-image { width: 76px; height: 100px; grid-row: span 2; }
    .quantity-control { justify-self: start; }
    .remove-item { grid-column: 3; grid-row: 1; }
    .register-layout { grid-template-columns: 1fr; }
    .register-intro { position: static; padding-top: 0; }
    .field-grid { grid-template-columns: 1fr; }
    .public-field.full { grid-column: auto; }
    .checkout-layout { grid-template-columns:1fr; }
    .checkout-summary { position:static;grid-row:1; }
    .rating-row { align-items:flex-start;flex-direction:column; }
}
@media (max-width: 390px) {
    .quick-links { flex-wrap: wrap; }
    .book-row { grid-template-columns: 1fr 1fr; }
    .book-meta { align-items: flex-start; flex-direction: column; }
}
