/* ============================================================
   Product / book shop (/Page/Product) — "Солонгос хэлний
   сурах бичиг". Scoped under .pr so it can't affect others.
   ============================================================ */

.pr {
    --pr-brand: #3f51b5;
    --pr-brand-d: #2c3a91;
    --pr-brand-l: #5c6bc0;
    --pr-accent: #ff7a59;
    --pr-accent-d: #f4623a;
    --pr-ink: #16225a;
    --pr-body: #4d5468;
    --pr-muted: #8a90a2;
    --pr-line: #e4e7f2;
    --pr-bg-soft: #f6f7fb;
    --pr-radius: 16px;
    --pr-shadow: 0 18px 40px -20px rgba(22, 27, 51, .3);
    --pr-shadow-sm: 0 10px 24px -16px rgba(22, 27, 51, .26);

    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    color: var(--pr-body);
    padding-bottom: 80px;
}
.pr * { box-sizing: border-box; }
.pr h1, .pr h2, .pr h3 { font-family: 'Montserrat', 'Roboto', sans-serif; color: var(--pr-ink); margin: 0; }
.pr__wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- Hero ---------- */
.pr-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #fff;
    padding: 60px 22px 78px;
    background: linear-gradient(130deg, var(--pr-brand-d), var(--pr-brand) 55%, var(--pr-brand-l));
}
.pr-hero::before,
.pr-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.pr-hero::before { width: 300px; height: 300px; top: -140px; right: -60px; }
.pr-hero::after { width: 220px; height: 220px; bottom: -120px; left: -50px; background: rgba(255, 122, 89, .18); }
.pr-hero__eyebrow {
    position: relative; display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: #fff; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25);
    padding: 7px 16px; border-radius: 999px; margin-bottom: 16px;
}
.pr-hero h1 { position: relative; color: #fff; font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; }
.pr-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.pr-hero__wave svg { width: 100%; height: 56px; display: block; }

/* ---------- Layout ---------- */
.pr-body { position: relative; margin-top: -42px; }
.pr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 900px) { .pr-layout { grid-template-columns: 1fr; } }

/* ---------- Products grid ---------- */
.pr-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 22px;
}

/* ---------- Product card ---------- */
.pr-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--pr-line);
    border-radius: var(--pr-radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--pr-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pr-card:hover { transform: translateY(-6px); box-shadow: var(--pr-shadow); border-color: transparent; text-decoration: none; }
.pr-card__media {
    position: relative;
    width: 100%;
    padding-top: 118%;          /* book-cover-ish portrait */
    background: var(--pr-bg-soft);
    overflow: hidden;
}
.pr-card__media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform .4s ease;
}
.pr-card:hover .pr-card__media img { transform: scale(1.04); }
.pr-card__noimg {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: 40px; color: var(--pr-line);
}
.pr-card__sale {
    position: absolute;
    top: 12px; left: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    color: #fff;
    background: linear-gradient(135deg, var(--pr-accent), var(--pr-accent-d));
    padding: 5px 12px; border-radius: 999px;
    box-shadow: 0 8px 16px -8px rgba(244, 98, 58, .9);
}
.pr-card__body { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; border-top: 1px solid var(--pr-line); }
.pr-card__name {
    font-size: 15px; font-weight: 700; color: var(--pr-ink); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.8em;
    margin-bottom: 12px;
}
.pr-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pr-card__price { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 17px; color: var(--pr-brand); }
.pr-card__buy {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--pr-accent-d);
    transition: gap .2s ease;
}
.pr-card:hover .pr-card__buy { gap: 9px; }

/* ---------- Empty ---------- */
.pr-empty {
    grid-column: 1 / -1;
    text-align: center;
    background: #fff;
    border: 1px solid var(--pr-line);
    border-radius: var(--pr-radius);
    box-shadow: var(--pr-shadow-sm);
    padding: 60px 28px;
}
.pr-empty__icon {
    width: 72px; height: 72px; margin: 0 auto 18px;
    display: grid; place-items: center; border-radius: 50%;
    font-size: 30px; color: var(--pr-brand); background: rgba(63, 81, 181, .1);
}
.pr-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.pr-empty p { margin: 0; color: var(--pr-body); font-size: 15.5px; }

/* ---------- Aside ---------- */
.pr-aside .aside-widet { margin-bottom: 22px; }
.pr-aside .aside-widet img { width: 100%; height: auto; border-radius: var(--pr-radius); box-shadow: var(--pr-shadow-sm); display: block; }

@media (max-width: 520px) {
    .pr-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
