/* =========================================================
   BASMAH LIBRARY
   MODERN ARABIC CATALOG DESIGN
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* =========================================================
   VARIABLES
========================================================= */

:root {
    --navy: #171126;
    --navy-2: #21183a;
    --navy-3: #2c2148;
    --gold: #c99535;
    --gold-dark: #a97720;
    --gold-soft: #f3e6c9;
    --cream: #faf7f0;
    --cream-2: #f5f0e7;
    --white: #ffffff;
    --ink: #18131f;
    --text: #40394a;
    --muted: #7d7485;
    --line: #e8decd;
    --line-strong: #dacbb2;
    --success: #16834a;
    --shadow-sm: 0 4px 16px rgba(23, 17, 38, .06);
    --shadow: 0 12px 35px rgba(23, 17, 38, .08);
    --shadow-lg: 0 25px 70px rgba(23, 17, 38, .13);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --container: 1220px;
    --transition: 180ms ease;
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient( 180deg, #fffdf9 0%, #faf7f0 45%, #ffffff 100% );
    color: var(--ink);
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}

body,
button,
input,
textarea,
select {
    font-family: "Cairo", Tahoma, Arial, sans-serif;
}

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

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
    overflow-wrap: anywhere;
}

/* =========================================================
   UTILITIES
========================================================= */

[hidden] {
    display: none !important;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.section {
    padding: 90px 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .4px;
    margin-bottom: 8px;
}

    .section-label::before {
        content: "";
        width: 25px;
        height: 2px;
        background: var(--gold);
    }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 34px;
}

    .section-heading h2 {
        margin: 0;
        color: var(--navy);
        font-size: clamp(28px, 3vw, 42px);
        line-height: 1.25;
        font-weight: 900;
        letter-spacing: -.7px;
    }

    .section-heading p {
        width: min(470px, 100%);
        margin: 0;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.9;
    }

/* =========================================================
   BUTTON SYSTEM
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn-large {
    min-height: 52px;
    padding-inline: 22px;
}

.btn-primary {
    color: var(--white);
    background: var(--navy);
    box-shadow: 0 9px 22px rgba(23, 17, 38, .18);
}

    .btn-primary:hover {
        background: var(--navy-2);
        box-shadow: 0 13px 28px rgba(23, 17, 38, .23);
    }

.btn-light {
    color: var(--navy);
    background: var(--white);
    border-color: var(--line-strong);
    box-shadow: 0 5px 18px rgba(23, 17, 38, .05);
}

    .btn-light:hover {
        border-color: var(--gold);
        color: var(--gold-dark);
    }

.btn-gold {
    color: var(--white);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    box-shadow: 0 9px 22px rgba(169, 119, 32, .22);
}

    .btn-gold:hover {
        box-shadow: 0 13px 28px rgba(169, 119, 32, .28);
    }

.btn-arrow {
    font-size: 17px;
}

/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    background: var(--navy);
    color: #fff;
}

.topbar-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 11px;
}

.topbar-message {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #eee8f5;
}

.topbar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.topbar-link {
    color: #fff;
    font-weight: 700;
    transition: color var(--transition);
}

    .topbar-link:hover {
        color: #e5bd6c;
    }

/* =========================================================
   NEWS TICKER
========================================================= */

.basmah-news-ticker {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(90deg, #23193b, #171126);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.news-label {
    flex: 0 0 auto;
    min-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 15px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    font-size: 11px;
    position: relative;
    z-index: 2;
}

.news-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.15);
}

.news-track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.news-content {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 25px;
    white-space: nowrap;
    padding-inline: 20px;
    animation: basmahNewsMove 18s linear infinite;
    will-change: transform;
}

.news-item {
    color: #f5effa;
    font-size: 11px;
    font-weight: 600;
}

.news-separator {
    color: var(--gold);
    font-size: 9px;
}

@keyframes basmahNewsMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.basmah-news-ticker:hover .news-content {
    animation-play-state: paused;
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(218,203,178,.65);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
}

.brand-logo-wrap {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: var(--cream-2);
    border: 1px solid var(--line);
}

    .brand-logo-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .brand-copy strong {
        color: var(--navy);
        font-size: 16px;
        font-weight: 900;
        line-height: 1.35;
    }

    .brand-copy span {
        color: var(--gold-dark);
        font-size: 9px;
        font-weight: 700;
    }

.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

    .main-nav a {
        position: relative;
        padding: 8px 0;
        color: var(--text);
        font-size: 12px;
        font-weight: 700;
        transition: color var(--transition);
    }

        .main-nav a::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 0;
            height: 2px;
            background: var(--gold);
            transition: width var(--transition);
        }

        .main-nav a:hover {
            color: var(--gold-dark);
        }

            .main-nav a:hover::after {
                width: 100%;
            }

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 11px;
    background: var(--navy);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    transition: transform var(--transition), background var(--transition);
}

    .header-whatsapp:hover {
        transform: translateY(-2px);
        background: var(--navy-2);
    }

    .header-whatsapp svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
    }

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

    .mobile-menu-btn span {
        display: block;
        width: 18px;
        height: 2px;
        margin: 4px auto;
        background: var(--navy);
    }

/* =========================================================
   HERO
========================================================= */

.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 95px 0 90px;
    background: radial-gradient(circle at 80% 25%, rgba(201,149,53,.12), transparent 30%), linear-gradient(135deg, #fffdf9 0%, #f7f0e2 100%);
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.hero-decoration-one {
    width: 280px;
    height: 280px;
    right: -130px;
    top: -90px;
    border: 1px solid rgba(201,149,53,.25);
}

.hero-decoration-two {
    width: 180px;
    height: 180px;
    left: -80px;
    bottom: -70px;
    background: rgba(201,149,53,.08);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, .95fr);
    align-items: center;
    gap: 70px;
}

.hero-content {
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: var(--gold-dark);
    font-size: 10px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}

.hero-content h1 {
    max-width: 650px;
    margin: 0 0 22px;
    color: var(--navy);
    font-size: clamp(44px, 5vw, 72px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -2.2px;
}

    .hero-content h1 span {
        display: block;
        color: var(--gold-dark);
    }

.hero-description {
    max-width: 590px;
    margin: 0 0 30px;
    color: var(--text);
    font-size: clamp(14px, 1.5vw, 17px);
    line-height: 2;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
}

.hero-feature {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.feature-check {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 900;
}

/* =========================================================
   HERO SHOWCASE
========================================================= */

.hero-showcase {
    position: relative;
    min-height: 490px;
    display: grid;
    place-items: center;
}

.showcase-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(201,149,53,.12);
    filter: blur(8px);
}

.showcase-ring {
    position: absolute;
    border: 1px solid rgba(201,149,53,.35);
    border-radius: 50%;
}

.ring-one {
    width: 330px;
    height: 330px;
}

.ring-two {
    width: 430px;
    height: 430px;
    border-color: rgba(201,149,53,.18);
}

.ring-three {
    width: 510px;
    height: 510px;
    border-color: rgba(23,17,38,.08);
}

.showcase-main-card {
    position: relative;
    z-index: 3;
    width: 210px;
    min-height: 230px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(201,149,53,.5);
    border-radius: 28px;
    background: linear-gradient(145deg, var(--navy), #281b43);
    color: #fff;
    box-shadow: 0 25px 65px rgba(23,17,38,.25);
}

.showcase-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 20px;
    background: #fff;
    padding: 7px;
}

    .showcase-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.showcase-main-card > span {
    color: #dfc17f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.showcase-main-card strong {
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.45;
}

.showcase-card {
    position: absolute;
    z-index: 5;
    width: 170px;
    min-height: 125px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

    .showcase-card:hover {
        transform: translateY(-5px);
    }

.showcase-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    margin-bottom: 7px;
    border-radius: 10px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 18px;
}

.showcase-card small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.showcase-card strong {
    margin-top: 4px;
    color: var(--navy);
    font-size: 14px;
    line-height: 1.5;
}

.showcase-print {
    top: 35px;
    right: 15px;
}

.showcase-office {
    bottom: 35px;
    right: 10px;
}

.showcase-gifts {
    bottom: 90px;
    left: 10px;
}

/* =========================================================
   SERVICES STRIP
========================================================= */

.services-strip {
    background: var(--navy);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.service-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-left: 1px solid rgba(255,255,255,.09);
}

    .service-item:first-child {
        border-left: 0;
    }

.service-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(201,149,53,.15);
    color: #e5bd6c;
    font-size: 19px;
}

.service-item div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.service-item strong {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.service-item span {
    color: #bdb4c7;
    font-size: 9px;
    margin-top: 2px;
}

/* =========================================================
   CATEGORIES
========================================================= */

.categories-section {
    background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.category-card {
    position: relative;
    min-width: 0;
    min-height: 225px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    text-align: right;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

    .category-card:hover,
    .category-card.is-selected {
        transform: translateY(-5px);
        border-color: rgba(201,149,53,.65);
        box-shadow: var(--shadow);
    }

.category-image {
    position: relative;
    width: 100%;
    height: 125px;
    overflow: hidden;
    background: linear-gradient(135deg, #f7f0e3, #fffdf9);
}

    .category-image img {
        width: 100%;
        height: 100%;
        display: block;
        /* الصور الشخصية والمنتجات لا تتقص بشكل مبالغ فيه */
        object-fit: contain;
        padding: 8px;
        transition: transform .4s ease;
    }

.category-card:hover .category-image img {
    transform: scale(1.035);
}

.category-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--gold-dark);
    background: linear-gradient(135deg, #f7f0e3, #fffdf9);
}

    .category-placeholder span {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border-radius: 13px;
        background: #fff;
        box-shadow: var(--shadow-sm);
        font-size: 22px;
    }

    .category-placeholder small {
        max-width: 85%;
        color: var(--text);
        text-align: center;
        font-size: 9px;
        font-weight: 800;
    }

.category-content {
    flex: 1;
    min-width: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.category-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 9px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 17px;
}

.category-content h3 {
    margin: 0;
    color: var(--navy);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.55;
}

.category-content p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   CATALOG TOOLBAR
========================================================= */

.catalog-section {
    background: linear-gradient(180deg, #faf7f0, #fff);
}

.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
}

.catalog-title {
    min-width: 0;
}

    .catalog-title h2 {
        margin: 0 0 5px;
        color: var(--navy);
        font-size: clamp(28px, 3vw, 40px);
        font-weight: 900;
    }

    .catalog-title p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
    }

.catalog-tools {
    flex: 0 1 480px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-dark);
    font-size: 20px;
    pointer-events: none;
}

.search {
    width: 100%;
    min-height: 48px;
    padding: 10px 43px 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}

    .search::placeholder {
        color: #aaa1ad;
    }

    .search:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 4px rgba(201,149,53,.1);
    }

.filter-clear {
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition);
}

    .filter-clear:hover {
        border-color: var(--gold);
        color: var(--gold-dark);
    }

/* =========================================================
   PRODUCT SECTIONS
========================================================= */

.product-sections {
    display: grid;
    gap: 55px;
}

.catalog-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

    .catalog-section-heading h2 {
        margin: 0;
        color: var(--navy);
        font-size: 23px;
        font-weight: 900;
    }

    .catalog-section-heading p {
        margin: 5px 0 0;
        color: var(--muted);
        font-size: 11px;
    }

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

    .product-card:hover {
        transform: translateY(-5px);
        border-color: rgba(201,149,53,.6);
        box-shadow: var(--shadow);
    }

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f7f1e5, #fff);
}

    .product-image img {
        width: 100%;
        height: 100%;
        display: block;
        /* يمنع قص المنتج من الأطراف */
        object-fit: contain;
        padding: 8px;
        transition: transform .4s ease;
    }

.product-card:hover .product-image img {
    transform: scale(1.035);
}

.product-image-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f7f1e5, #fff);
    color: var(--gold-dark);
    font-size: 20px;
    font-weight: 900;
}

.product-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.product-title {
    margin: 0;
    color: var(--navy);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.55;
}

.product-description {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.product-price {
    color: var(--gold-dark);
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
}

.product-order-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    transition: transform var(--transition), background var(--transition);
}

    .product-order-btn::before {
        content: "↗";
        font-size: 13px;
    }

    .product-order-btn:hover {
        transform: translateY(-2px);
        background: var(--gold-dark);
    }

/* =========================================================
   BOOK CATEGORIES
========================================================= */

.books-section {
    background: #fff;
}

.book-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.book-category-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 78px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    text-align: right;
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

    .book-category-card:hover,
    .book-category-card.is-selected {
        transform: translateY(-3px);
        border-color: var(--gold);
        background: #fffaf0;
        box-shadow: var(--shadow-sm);
    }

.book-category-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 19px;
}

.book-category-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .book-category-content strong {
        color: var(--navy);
        font-size: 12px;
        font-weight: 900;
        line-height: 1.5;
    }

    .book-category-content small {
        color: var(--muted);
        font-size: 9px;
        line-height: 1.5;
    }

.book-category-card.all-books {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

    .book-category-card.all-books .book-category-content strong,
    .book-category-card.all-books .book-category-content small {
        color: #fff;
    }

    .book-category-card.all-books .book-category-icon {
        background: rgba(255,255,255,.1);
        color: #e5bd6c;
    }

/* =========================================================
   BOOK SECTIONS
========================================================= */

.book-sections {
    display: grid;
    gap: 45px;
}

.book-section {
    width: 100%;
}

.book-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

    .book-section-heading h3 {
        margin: 0;
        color: var(--navy);
        font-size: 22px;
        font-weight: 900;
    }

    .book-section-heading p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 11px;
    }

/* =========================================================
   BOOK GRID
========================================================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* =========================================================
   BOOK CARD
========================================================= */

.book-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

    .book-card:hover {
        transform: translateY(-4px);
        border-color: rgba(201,149,53,.6);
        box-shadow: var(--shadow);
    }

.book-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f5ecda, #fffdf8);
}

    .book-cover img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        padding: 8px;
    }

.book-cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #f5ecda, #fffdf8);
    color: var(--gold-dark);
    text-align: center;
}

    .book-cover-fallback span {
        font-size: 40px;
    }

    .book-cover-fallback strong {
        color: var(--navy);
        font-size: 14px;
    }

.book-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 17px;
}

.book-title {
    margin: 5px 0;
    color: var(--navy);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.55;
}

.book-author {
    margin: 0 0 7px;
    color: var(--gold-dark);
    font-size: 10px;
    font-weight: 700;
}

.book-description {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.book-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

    .book-actions .btn {
        width: 100%;
        min-height: 40px;
        padding: 8px 9px;
        font-size: 10px;
    }

.book-read-btn {
    border-color: var(--navy);
}

.book-download-btn {
    border-color: var(--line-strong);
}

/* =========================================================
   EMPTY / LOADING
========================================================= */

.loading-card,
.empty-state {
    width: 100%;
    padding: 35px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
    background: rgba(255,255,255,.75);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

    .empty-state strong {
        display: block;
        margin-bottom: 5px;
        color: var(--navy);
        font-size: 15px;
    }

    .empty-state p {
        margin: 0;
        font-size: 11px;
    }

/* =========================================================
   CTA
========================================================= */

.cta-section {
    padding: 0 0 90px;
}

.cta-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    padding: 40px 45px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--navy), #291d43);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

    .cta-card::after {
        content: "";
        position: absolute;
        width: 300px;
        height: 300px;
        left: -130px;
        bottom: -190px;
        border: 1px solid rgba(201,149,53,.3);
        border-radius: 50%;
    }

.cta-content {
    position: relative;
    z-index: 1;
}

    .cta-content .section-label {
        color: #e2bb69;
    }

    .cta-content h2 {
        margin: 0 0 8px;
        color: #fff;
        font-size: clamp(25px, 3vw, 38px);
        font-weight: 900;
    }

    .cta-content p {
        max-width: 580px;
        margin: 0;
        color: #c9c0d0;
        font-size: 12px;
    }

.cta-card > .btn {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding: 55px 0 20px;
    background: #120d1e;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .8fr 1fr 1.3fr;
    gap: 45px;
    padding-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 5px;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
}

    .footer-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.footer-brand strong {
    display: block;
    font-size: 17px;
    font-weight: 900;
}

.footer-brand p {
    margin: 3px 0 0;
    color: #bdb4c7;
    font-size: 10px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

    .footer-column h3 {
        margin: 0 0 7px;
        color: #e4bc69;
        font-size: 12px;
        font-weight: 900;
    }

    .footer-column a {
        color: #c9c0d0;
        font-size: 10px;
        transition: color var(--transition);
    }

        .footer-column a:hover {
            color: #fff;
        }

.footer-address address {
    max-width: 280px;
    margin: 0;
    color: #c9c0d0;
    font-size: 10px;
    font-style: normal;
    line-height: 1.9;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.09);
    color: #93899e;
    font-size: 9px;
}

    .footer-bottom a {
        color: #c9c0d0;
        font-weight: 700;
    }

/* =========================================================
   BOOK VIEWER
========================================================= */

.book-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: rgba(10,7,18,.78);
    backdrop-filter: blur(7px);
}

.book-viewer-card {
    width: min(1150px, 100%);
    height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 100px rgba(0,0,0,.3);
}

.book-viewer-header {
    flex: 0 0 auto;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 16px;
    background: var(--navy);
    color: #fff;
}

.viewer-label {
    display: block;
    color: #dfbd77;
    font-size: 8px;
    font-weight: 800;
}

.book-viewer-header strong {
    display: block;
    max-width: 600px;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.5;
}

.book-viewer-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.viewer-download {
    min-height: 37px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: 9px;
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.viewer-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.book-viewer-body {
    flex: 1;
    min-height: 0;
    background: #292929;
}

    .book-viewer-body iframe {
        width: 100%;
        height: 100%;
        display: block;
        border: 0;
    }

.book-viewer-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid var(--line);
}

    .book-viewer-footer .btn {
        min-width: 130px;
        min-height: 40px;
        font-size: 10px;
    }

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1100px) {

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
        gap: 40px;
    }

    .category-grid,
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .book-categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   RESPONSIVE — MOBILE NAV
========================================================= */

@media (max-width: 850px) {

    .container {
        width: min(100% - 30px, var(--container));
    }

    .header-inner {
        min-height: 70px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 15px;
        left: 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow);
    }

        .main-nav.is-open {
            display: flex;
        }

        .main-nav a {
            padding: 11px 12px;
        }

    .mobile-menu-btn {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        text-align: center;
    }

        .hero-content h1 {
            margin-inline: auto;
        }

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons,
    .hero-features {
        justify-content: center;
    }

    .hero-showcase {
        min-height: 440px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-item:nth-child(3) {
        border-left: 0;
    }

    .category-grid,
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .book-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-toolbar,
    .section-heading,
    .cta-card {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-tools {
        width: 100%;
        flex-basis: auto;
    }
}

/* =========================================================
   RESPONSIVE — PHONE
========================================================= */

@media (max-width: 620px) {

    body {
        font-size: 14px;
    }

    .container {
        width: calc(100% - 24px);
    }

    .section {
        padding: 65px 0;
    }

    /* NEWS */
    .news-label {
        min-width: 92px;
        padding-inline: 8px;
        font-size: 9px;
    }

    .news-content {
        gap: 18px;
        padding-inline: 14px;
        animation-duration: 14s;
    }

    .news-item {
        font-size: 9px;
    }

    /* TOPBAR */
    .topbar-inner {
        min-height: 34px;
        font-size: 9px;
    }

    .topbar-message {
        min-width: 0;
    }

    .topbar-link {
        white-space: nowrap;
    }

    /* HEADER */
    .brand-logo-wrap {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .brand-copy strong {
        font-size: 13px;
    }

    .brand-copy span {
        font-size: 8px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-whatsapp {
        min-height: 38px;
        padding: 7px 10px;
        font-size: 9px;
    }

        .header-whatsapp svg {
            width: 14px;
            height: 14px;
        }

    /* HERO */
    .hero-section {
        padding: 65px 0 55px;
    }

    .hero-content h1 {
        font-size: clamp(38px, 12vw, 53px);
        letter-spacing: -1.6px;
    }

    .hero-description {
        font-size: 12px;
        line-height: 1.9;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .btn-large {
        width: 100%;
        min-height: 48px;
        padding-inline: 10px;
        font-size: 10px;
    }

    .hero-features {
        gap: 9px 14px;
    }

    .hero-feature {
        font-size: 9px;
    }

    .hero-showcase {
        min-height: 350px;
        transform: scale(.82);
        margin: -35px 0;
    }

    .ring-one {
        width: 270px;
        height: 270px;
    }

    .ring-two {
        width: 350px;
        height: 350px;
    }

    .ring-three {
        width: 420px;
        height: 420px;
    }

    .showcase-main-card {
        width: 170px;
        min-height: 190px;
        border-radius: 22px;
    }

    .showcase-logo {
        width: 60px;
        height: 60px;
    }

    .showcase-main-card strong {
        font-size: 17px;
    }

    .showcase-card {
        width: 140px;
        min-height: 108px;
        padding: 12px;
        border-radius: 14px;
    }

    .showcase-print {
        top: 25px;
        right: 0;
    }

    .showcase-office {
        bottom: 25px;
        right: 0;
    }

    .showcase-gifts {
        bottom: 60px;
        left: 0;
    }

    /* SERVICES */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-item,
    .service-item:nth-child(3) {
        border-left: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

        .service-item:last-child {
            border-bottom: 0;
        }

    /* HEADINGS */
    .section-heading h2,
    .catalog-title h2 {
        font-size: 29px;
    }

    /* CATEGORIES + PRODUCTS */
    .category-grid,
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .category-card {
        min-height: 210px;
    }

    .category-image {
        height: 105px;
    }

        .category-image img {
            padding: 6px;
        }

    .category-content {
        padding: 11px;
    }

    .category-icon {
        width: 29px;
        height: 29px;
        margin-bottom: 6px;
        font-size: 14px;
    }

    .category-content h3 {
        font-size: 11px;
    }

    .category-content p {
        font-size: 8px;
    }

    /* SEARCH */
    .catalog-tools {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .filter-clear {
        width: 100%;
    }

    /* PRODUCT */
    .product-body {
        padding: 11px;
    }

    .product-image img {
        padding: 6px;
    }

    .product-title {
        font-size: 11px;
    }

    .product-description {
        font-size: 8px;
    }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
    }

    .product-price {
        font-size: 14px;
    }

    .product-order-btn {
        width: 100%;
        min-height: 36px;
        font-size: 9px;
    }

    /* BOOK CATEGORIES */
    .book-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .book-category-card {
        min-height: 70px;
        padding: 9px;
        gap: 7px;
    }

    .book-category-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .book-category-content strong {
        font-size: 10px;
    }

    .book-category-content small {
        font-size: 7px;
    }

    /* BOOKS */
    .books-grid {
        grid-template-columns: 1fr;
    }

    .book-card {
        display: grid;
        grid-template-columns: 125px minmax(0, 1fr);
    }

    .book-cover {
        height: 100%;
        min-height: 175px;
        aspect-ratio: auto;
    }

    .book-body {
        padding: 12px;
    }

    .book-title {
        font-size: 14px;
    }

    .book-author {
        font-size: 8px;
    }

    .book-description {
        font-size: 8px;
    }

    .book-actions {
        grid-template-columns: 1fr;
        gap: 5px;
    }

        .book-actions .btn {
            min-height: 36px;
            font-size: 9px;
        }

    /* CTA */
    .cta-card {
        padding: 30px 22px;
    }

    .cta-content h2 {
        font-size: 27px;
    }

    /* FOOTER */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-column {
        align-items: center;
    }

    .footer-address address {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    /* BOOK VIEWER */
    .book-viewer-modal {
        padding: 0;
    }

    .book-viewer-card {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .book-viewer-header {
        min-height: 58px;
        padding: 8px 10px;
    }

        .book-viewer-header strong {
            max-width: 190px;
            font-size: 10px;
        }

    .viewer-download {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 8px;
    }

    .viewer-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .book-viewer-footer {
        padding: 8px;
    }

        .book-viewer-footer .btn {
            min-width: 110px;
            min-height: 36px;
            font-size: 9px;
        }
}

/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 390px) {

    .hero-buttons {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 225px;
    }

    .category-image {
        height: 130px;
    }

    .book-card {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .book-cover {
        min-height: 160px;
    }
}

/* =========================================================
   ACCESSIBILITY / REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
