/* Marketplace pagination — professional Previous / Next */
.rt-catalog-pagination__btn--prev {
    background: #fff;
    color: #1A2B56;
    border-color: rgba(26, 43, 86, 0.22);
}
.rt-catalog-pagination__btn--prev:hover {
    background: #f4f6fb;
    border-color: rgba(26, 43, 86, 0.4);
    color: #1A2B56;
}
.rt-catalog-pagination__btn--next {
    background: linear-gradient(135deg, #F58220 0%, #e06e0c 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(245, 130, 32, 0.32);
}
.rt-catalog-pagination__btn--next:hover {
    color: #fff;
    filter: brightness(1.05);
}
.rt-catalog-pagination__page.is-active {
    background: #1A2B56;
    color: #fff;
    box-shadow: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rt-mp-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.75rem;
    margin: 0 0 1.65rem;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid rgba(26, 43, 86, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(26, 43, 86, 0.06);
    overflow-x: auto;
}
.rt-mp-toolbar__search {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
}
.rt-mp-toolbar__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8a7a66;
    pointer-events: none;
}
.rt-mp-toolbar__input {
    width: 100%;
    min-height: 3.05rem;
    padding: 0.75rem 2.6rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    background: #faf8f4;
    border: 1px solid #ece6dc;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.rt-mp-toolbar__input::placeholder {
    color: #9a8f80;
    font-weight: 500;
}
.rt-mp-toolbar__input:focus {
    background: #fff;
    border-color: rgba(197, 160, 89, 0.7);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.16);
}
.rt-mp-toolbar__input::-webkit-search-cancel-button {
    display: none;
}
.rt-mp-toolbar__clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    color: #64748b;
    background: #efe9de;
    text-decoration: none;
    font-size: 1.15rem;
    line-height: 1;
}
.rt-mp-toolbar__clear:hover {
    color: #0f172a;
    background: #e4dccf;
}
.rt-mp-toolbar__aside {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.65rem;
}
.rt-mp-toolbar__price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 10.5rem;
    position: relative;
}
.rt-mp-toolbar__label {
    position: absolute;
    left: 0.95rem;
    top: -0.45rem;
    z-index: 1;
    padding: 0 0.28rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1A2B56;
    background: #fff;
}
.rt-mp-toolbar__select {
    appearance: none;
    min-height: 3.05rem;
    min-width: 11.5rem;
    padding: 0.7rem 2.4rem 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: #1A2B56;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, transparent 50%, #1A2B56 50%),
        linear-gradient(135deg, #1A2B56 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    border: 1px solid #ece6dc;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rt-mp-toolbar__select:focus {
    border-color: rgba(197, 160, 89, 0.7);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.16);
}
.rt-mp-toolbar__submit {
    flex-shrink: 0;
    min-height: 3.05rem;
    padding: 0 1.45rem;
    border: 0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #F58220 0%, #d96a0f 100%);
    box-shadow: 0 10px 22px rgba(245, 130, 32, 0.28);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.rt-mp-toolbar__submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    color: #fff;
}
@media (max-width: 720px) {
    .rt-mp-toolbar {
        padding: 0.75rem;
        flex-wrap: wrap;
    }
    .rt-mp-toolbar__aside {
        flex-wrap: wrap;
        width: 100%;
    }
    .rt-mp-toolbar__price,
    .rt-mp-toolbar__select,
    .rt-mp-toolbar__submit {
        width: 100%;
    }
}

/* Catalog grid — leave room so 3D books are never clipped by the sidebar or card edges */
.rt-mp-portal,
.rt-mp-grid {
    overflow: visible;
}
.rt-mp-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.75rem 1.55rem;
    padding: 0.45rem 0.65rem 0.9rem;
}
@media (max-width: 1100px) {
    .rt-mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 639px) {
    .rt-mp-grid { grid-template-columns: minmax(0, 1fr) !important; padding-inline: 0.15rem; }
}

.rt-mp-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 16px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    text-decoration: none !important;
    color: #0f172a !important;
    box-shadow: 0 8px 22px rgba(26, 43, 86, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.rt-mp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 40px rgba(26, 43, 86, 0.14);
    color: #0f172a !important;
}
.rt-mp-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none !important;
    color: inherit;
    min-width: 0;
}

.rt-mp-cover {
    position: relative;
    min-height: 248px;
    height: 268px;
    aspect-ratio: auto;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(28, 25, 23, 0.07), transparent 58%),
        linear-gradient(180deg, #faf8f4 0%, #f1ece4 100%);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.85rem 1.15rem 0.95rem;
    border-radius: 16px 16px 0 0;
}

/* 3D hardcover: warm paper spine and pages, no navy wash around the cover */
.rt-mp-book3d {
    position: relative;
    width: min(120px, 52%);
    aspect-ratio: 3 / 4;
    transform: perspective(1600px) rotateY(-22deg) rotateX(7deg);
    transform-style: preserve-3d;
    filter: drop-shadow(12px 16px 18px rgba(28, 25, 23, 0.26));
    flex-shrink: 0;
    transition: transform 0.28s ease, filter 0.28s ease;
}
.rt-mp-card:hover .rt-mp-book3d {
    transform: perspective(1600px) rotateY(-12deg) rotateX(5deg) translateY(-6px);
    filter: drop-shadow(18px 28px 28px rgba(28, 25, 23, 0.32));
}
.rt-mp-book3d--hero {
    width: min(168px, 70%);
    transform: perspective(1800px) rotateY(-24deg) rotateX(8deg);
    filter: drop-shadow(22px 32px 36px rgba(28, 25, 23, 0.3));
}
.rt-mp-store__media:hover .rt-mp-book3d--hero {
    transform: perspective(1800px) rotateY(-14deg) rotateX(6deg) translateY(-4px);
}
.rt-mp-book3d__face {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    transform-style: preserve-3d;
    border-radius: 2px 6px 6px 1px;
    overflow: hidden;
    box-shadow:
        inset 8px 0 10px rgba(0, 0, 0, 0.12),
        inset -1px 0 0 rgba(255, 255, 255, 0.18);
}
.rt-mp-book3d__cover {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    border-radius: 2px 6px 6px 1px;
    position: relative;
    z-index: 2;
    background: #1c1917;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.rt-mp-book3d__sheen {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        118deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.04) 28%,
        transparent 48%,
        rgba(0, 0, 0, 0.08) 100%
    );
    mix-blend-mode: soft-light;
}
.rt-mp-book3d__shade {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, transparent 14%, transparent 86%, rgba(0, 0, 0, 0.08) 100%);
}
.rt-mp-book3d__spine {
    position: absolute;
    left: -13px;
    top: 1.5%;
    bottom: 1.5%;
    width: 14px;
    border-radius: 3px 0 0 3px;
    background:
        linear-gradient(90deg, #2a241c 0%, #5c4c38 42%, #c5a059 50%, #7a6550 100%);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.18),
        inset -2px 0 4px rgba(0, 0, 0, 0.28);
    z-index: 1;
}
.rt-mp-book3d__pages {
    position: absolute;
    right: -12px;
    top: 4px;
    bottom: 4px;
    width: 12px;
    border-radius: 0 2px 2px 0;
    background:
        repeating-linear-gradient(
            to right,
            #fffdf8 0 1px,
            #efe6d4 1px 2px
        );
    box-shadow: 2px 0 0 #ddd4c2, 3px 1px 6px rgba(28, 25, 23, 0.12);
    z-index: 1;
}

.rt-mp-body {
    padding: 0.95rem 1.05rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    background: #fff;
    position: relative;
    z-index: 2;
    border-radius: 0 0 16px 16px;
    min-width: 0;
}
.rt-mp-kicker {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #1A2B56 !important;
    margin: 0 !important;
}
.rt-mp-title,
.rt-mp-card h2.rt-mp-title,
.rt-mp-card p.rt-mp-title {
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rt-mp-seller {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}
.rt-mp-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    padding-top: 0.7rem;
    border-top: 1px solid #eef2f6;
}
.rt-mp-price,
.rt-mp-card .rt-mp-price {
    font-size: 1.12rem !important;
    font-weight: 800 !important;
    color: #F58220 !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.rt-mp-compare {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    text-decoration: line-through;
    font-weight: 600;
}
.instr-mp-card__actions {
    display: flex;
    gap: 0.55rem;
    padding: 0 1.05rem 1rem;
    border-top: 1px solid #eef2f6;
    padding-top: 0.75rem;
    background: #fff;
    border-radius: 0 0 16px 16px;
}
.instr-mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0 0.95rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.instr-mp-btn--edit {
    color: #1A2B56 !important;
    background: #fff;
    border: 1px solid rgba(26, 43, 86, 0.22);
    box-shadow: 0 4px 10px rgba(26, 43, 86, 0.06);
}
.instr-mp-btn--edit:hover {
    border-color: #1A2B56;
    background: #f4f6fb;
    transform: translateY(-1px);
}
.instr-mp-btn--view {
    color: #fff !important;
    background: linear-gradient(135deg, #F58220, #d96a0f);
    border: 1px solid transparent;
    box-shadow: 0 8px 16px rgba(245, 130, 32, 0.28);
}
.instr-mp-btn--view:hover {
    color: #fff !important;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.rt-mp-pdp {
    background: #fff;
    padding: 0.25rem 0 2.5rem;
}
.rt-mp-portal .rt-mp-pdp,
.adm-content .rt-mp-pdp { background: transparent; padding: 0; }
.rt-mp-pdp__inner { max-width: 1120px; margin: 0 auto; overflow: visible; }

.rt-mp-store {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
    gap: 2.75rem 3rem;
    align-items: start;
}
@media (max-width: 899px) {
    .rt-mp-store { grid-template-columns: 1fr; gap: 1.75rem; }
}
.rt-mp-store__media {
    background: linear-gradient(180deg, #faf8f4 0%, #f3efe8 100%);
    border-radius: 16px;
    padding: 2.25rem 1.75rem 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    overflow: visible;
}
.rt-mp-store__cover {
    display: block !important;
    width: 100%;
    max-width: 420px;
    height: auto !important;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(28, 25, 23, 0.18);
}
.rt-mp-store__offer { min-width: 0; }
.rt-mp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(26, 43, 86, 0.08);
    color: #1A2B56 !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rt-mp-pdp__title {
    font-size: clamp(1.7rem, 2.6vw, 2.15rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    line-height: 1.18 !important;
    color: #0f172a !important;
    margin: 0.85rem 0 1.15rem !important;
}
.rt-mp-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.15rem;
    max-width: 11.5rem;
}
.rt-mp-qty__btn {
    width: 2.4rem;
    border: 0;
    background: #fff;
    color: #1A2B56;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
}
.rt-mp-qty__btn:disabled { color: #cbd5e1; cursor: default; }
.rt-mp-qty__value {
    width: 3.2rem;
    border: 0;
    border-left: 1px solid #d7dee8;
    border-right: 1px solid #d7dee8;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
}
.rt-mp-store .rt-mp-buy__price-block {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.rt-mp-store .rt-mp-buy__price { font-size: 1.85rem !important; font-weight: 800 !important; color: #0f172a !important; }
.rt-mp-store .rt-mp-compare {
    font-size: 1rem !important;
    color: #94a3b8 !important;
    text-decoration: line-through;
    font-weight: 600;
}
.rt-mp-buy__cta {
    display: flex;
    width: 100%;
    max-width: 22rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 10px;
    background: #F58220;
    color: #fff !important;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
}
.rt-mp-buy__cta:hover { background: #d96d10; color: #fff !important; }
.rt-mp-details {
    margin-top: 2rem;
    padding-top: 0.35rem;
}
.rt-mp-details__tab {
    display: inline-block;
    margin: 0 0 1.1rem !important;
    padding-bottom: 0.45rem;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    text-transform: none;
    color: #0f172a !important;
    border-bottom: 3px solid #C5A059;
}
.rt-mp-details__highlight {
    display: inline;
    margin: 0 0 0.85rem;
    padding: 0.08rem 0.28rem;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.55;
    color: #0f172a;
    background: #C5A059;
}
.rt-mp-pdp__subtitle { font-size: 1.02rem; line-height: 1.55; color: #334155; margin: 0.85rem 0 0.75rem; }
.rt-mp-about__copy {
    font-size: 1rem;
    line-height: 1.75;
    color: #334155;
}
.rt-mp-about__copy p { margin: 0 0 0.85rem; }
.rt-mp-about__copy h2,
.rt-mp-about__copy h3 {
    margin: 1.1rem 0 0.45rem;
    color: #1A2B56;
    font-weight: 800;
}
.rt-mp-about__copy img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0.5rem 0 1rem;
}
.rt-mp-about__copy .rt-mp-video {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    margin: 0.75rem 0 1rem;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}
.rt-mp-about__copy .rt-mp-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.rt-mp-about__copy ul,
.rt-mp-about__copy ol { padding-left: 1.2rem; margin: 0 0 0.85rem; }
.rt-mp-about__copy a { color: #F58220; font-weight: 600; }

/* Compact marketplace listing covers */
.rt-mp-grid .rt-mp-cover {
    min-height: 220px !important;
    height: 232px !important;
    aspect-ratio: auto !important;
    padding: 0.8rem 0.7rem 0.95rem !important;
}
.rt-mp-grid .rt-mp-book3d:not(.rt-mp-book3d--hero) {
    width: min(110px, 48%) !important;
}
