:root{
    --rev-red:#e51b23;
    --rev-black:#0b0b0b;
    --rev-line:rgba(255,255,255,.18);
}

html.rev-book-open,
body.rev-book-open{
    overflow:hidden !important;
}

/* Catalogue listing */
.rev-catalogue-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
    width:100%;
}
.rev-catalogue-tile{
    margin:0;
}
.rev-open-book{
    width:100%;
    padding:0;
    border:0;
    background:transparent;
    cursor:pointer;
    text-align:left;
}
.rev-open-book > img,
.rev-cover-placeholder{
    width:100%;
    aspect-ratio:3/4;
    object-fit:cover;
    display:block;
    background:#f2f2f2;
    border-radius:8px;
}
.rev-cover-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#111;
    font-weight:800;
}
.rev-catalogue-info{
    padding:10px 2px 0;
}
.rev-catalogue-info h3{
    margin:0;
    color:#111;
    font-size:18px;
    line-height:1.2;
}
.rev-catalogue-info p{
    margin:4px 0;
    color:#777;
    font-size:13px;
}
.rev-catalogue-info span{
    display:inline-block;
    margin-top:4px;
    color:var(--rev-red);
    font-size:11px;
    font-weight:800;
}

/* Fullscreen modal book */
.rev-book-modal{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
}
.rev-book-modal.is-open{
    display:block;
}
.rev-book-shell{
    position:relative;
    width:100%;
    height:100%;
}
.rev-modal-backdrop{
    position:absolute;
    inset:0;
    background:#0b0b0b;
}
.rev-book-app{
    position:relative;
    z-index:2;
    width:100%;
    height:100%;
    background:#0b0b0b;
    color:#fff;
    display:flex;
    flex-direction:column;
    box-sizing:border-box;
    padding:10px 16px 16px;
    font-family:Arial,Helvetica,sans-serif;
}
.rev-book-topbar{
    flex:0 0 auto;
    min-height:42px;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:14px;
    width:min(100%,1600px);
    margin:0 auto 8px;
}
.rev-brand-mark{
    justify-self:start;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
}
.rev-brand-mark span{
    color:var(--rev-red);
}
.rev-book-heading{
    text-align:center;
    line-height:1.15;
}
.rev-book-heading strong{
    display:block;
    font-size:14px;
    text-transform:uppercase;
}
.rev-book-heading small{
    display:block;
    margin-top:4px;
    color:#ffffff;
    font-size:10px;
    font-weight:700;
}
.rev-close-book{
    justify-self:end;
    width:36px;
    height:36px;
    padding:0;
    border-radius:50%;
    border:1px solid var(--rev-line);
    background:#151515;
    color:#fff;
    font-size:25px;
    line-height:1;
    cursor:pointer;
}
.rev-close-book:hover{
    color:var(--rev-red);
    border-color:var(--rev-red);
}
.rev-topbar-placeholder{
    width:36px;
    justify-self:end;
}

.rev-book-viewport{
    flex:1 1 auto;
    min-height:0;
    display:grid;
    grid-template-columns:52px minmax(0,1fr) 52px;
    align-items:center;
    gap:14px;
    width:min(100%,1700px);
    margin:0 auto;
}
.rev-page-arrow{
    width:44px;
    height:44px;
    border-radius:50%;
    border:1px solid var(--rev-line);
    background:#151515;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:31px;
    cursor:pointer;
}
.rev-page-arrow:hover{
    color:var(--rev-red);
    border-color:var(--rev-red);
}
.rev-page-arrow.is-disabled,
.rev-footer-prev.is-disabled,
.rev-footer-next.is-disabled{
    opacity:.28;
    cursor:default;
}

.rev-book-frame{
    min-width:0;
    min-height:0;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.rev-book{
    position:relative;
    height:min(82vh,940px);
    max-width:100%;
    aspect-ratio:1.414/1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    background:#e9e9e9;
    box-shadow:0 20px 55px rgba(0,0,0,.65);
    overflow:hidden;
    perspective:2000px;
}
.rev-book.single-spread{
    grid-template-columns:1fr;
    aspect-ratio:.707/1;
}
.rev-book:not(.single-spread)::after{
    content:"";
    position:absolute;
    z-index:10;
    top:0;
    bottom:0;
    left:50%;
    width:18px;
    transform:translateX(-50%);
    background:linear-gradient(90deg,rgba(0,0,0,.18),rgba(255,255,255,.15),rgba(0,0,0,.18));
    pointer-events:none;
}
.rev-paper{
    display:none;
    position:relative;
    min-width:0;
    min-height:0;
    background:#fff;
    overflow:hidden;
    transform-origin:center;
    backface-visibility:hidden;
}
.rev-paper.is-visible{
    display:block;
}
.rev-paper.is-single{
    width:100%;
}
.rev-paper.turn-next{
    animation:revTurnNext .38s ease;
}
.rev-paper.turn-prev{
    animation:revTurnPrev .38s ease;
}
@keyframes revTurnNext{
    0%{transform:rotateY(0deg);filter:brightness(1)}
    45%{transform:rotateY(-13deg);filter:brightness(.82)}
    100%{transform:rotateY(0deg);filter:brightness(1)}
}
@keyframes revTurnPrev{
    0%{transform:rotateY(0deg);filter:brightness(1)}
    45%{transform:rotateY(13deg);filter:brightness(.82)}
    100%{transform:rotateY(0deg);filter:brightness(1)}
}

/* Full page image */
.rev-image-page{
    width:100%;
    height:100%;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
}
.rev-page-image{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    background:#fff;
}
.rev-page-placeholder{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#999;
    font-weight:800;
    letter-spacing:.06em;
}

/* 4 products filling one book page */
.rev-product-page{
    width:100%;
    height:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:1fr 1fr;
    background:#fff;
}
.rev-product-card{
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
    text-decoration:none;
    color:#111;
    background:#fff;
    border:1px solid #ececec;
    overflow:hidden;
}
.rev-product-image{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f4f4f4;
    padding:4%;
    overflow:hidden;
}
.rev-product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.rev-product-meta{
    flex:0 0 auto;
    text-align:center;
    padding:8px 7px 10px;
    background:#fff;
}
.rev-product-meta h3{
    margin:0;
    color:#111;
    font-size:clamp(9px,.85vw,14px);
    line-height:1.15;
    text-transform:uppercase;
}
.rev-sku{
    margin-top:3px;
    color:#777;
    font-size:9px;
}
.rev-product-empty{
    align-items:center;
    justify-content:center;
    color:#999;
    font-size:11px;
    font-weight:800;
}

/* Footer controls */
.rev-book-footer{
    flex:0 0 auto;
    width:min(100%,1200px);
    margin:10px auto 0;
    display:grid;
    grid-template-columns:110px 1fr 110px;
    gap:14px;
    align-items:center;
}
.rev-footer-prev,
.rev-footer-next{
    border:1px solid var(--rev-line);
    background:#151515;
    color:#fff;
    border-radius:4px;
    padding:9px 10px;
    font-size:10px;
    font-weight:800;
    cursor:pointer;
}
.rev-dots{
    text-align:center;
    line-height:1;
}
.rev-dot{
    width:7px;
    height:7px;
    border:0;
    padding:0;
    margin:0 4px;
    border-radius:50%;
    background:#4a4a4a;
    cursor:pointer;
}
.rev-dot.active{
    background:var(--rev-red);
}
.rev-empty{
    max-width:1100px;
    margin:20px auto;
    padding:16px 18px;
    border:1px solid #efb8bb;
    background:#fff3f3;
    color:#7f151a;
    font-weight:700;
}

/* Embedded single shortcode, not modal */
.rev-book-shell:not(.rev-book-shell-modal) .rev-book-app{
    min-height:760px;
}

@media(max-width:1024px){
    .rev-catalogue-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .rev-book{
        height:min(76vh,760px);
    }
}

@media(max-width:767px){
    .rev-catalogue-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px;
    }
    .rev-catalogue-info h3{
        font-size:14px;
    }
    .rev-catalogue-info p{
        font-size:11px;
    }

    .rev-book-app{
        padding:7px 0 10px;
    }
    .rev-book-topbar{
        min-height:38px;
        padding:0 8px;
        box-sizing:border-box;
    }
    .rev-brand-mark{
        font-size:8px;
    }
    .rev-book-heading strong{
        font-size:12px;
    }
    .rev-book-heading small{
        font-size:9px;
    }
    .rev-close-book{
        width:32px;
        height:32px;
        font-size:22px;
    }

    .rev-book-viewport{
        grid-template-columns:38px minmax(0,1fr) 38px;
        gap:3px;
        width:100%;
    }
    .rev-page-arrow{
        width:34px;
        height:34px;
        font-size:25px;
    }
    .rev-book{
        height:auto;
        width:100%;
        max-width:calc(100vw - 82px);
        aspect-ratio:.707/1;
        display:block;
    }
    .rev-book.single-spread{
        aspect-ratio:.707/1;
    }
    .rev-book::after{
        display:none !important;
    }
    .rev-paper{
        width:100%;
        height:100%;
    }
    .rev-product-meta{
        padding:5px 4px 6px;
    }
    .rev-product-meta h3{
        font-size:8.5px;
    }
    .rev-sku{
        font-size:7.5px;
    }
    .rev-book-footer{
        grid-template-columns:86px 1fr 86px;
        gap:6px;
        padding:0 7px;
        box-sizing:border-box;
    }
    .rev-footer-prev,
    .rev-footer-next{
        padding:8px 4px;
        font-size:8px;
    }
}


/* =========================================================
   Revenco Catalogue Home — reference-matched landing layout
   ========================================================= */
.rev-catalogue-home{
    width:100vw;
    max-width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    background:#fff;
    box-sizing:border-box;
    padding:56px 24px 64px;
    color:#111;
}
.rev-catalogue-home-inner{
    width:min(1180px,100%);
    margin:0 auto;
}
.rev-catalogue-home-heading{
    text-align:center;
    margin:0 0 48px;
}
.rev-catalogue-home-heading h2{
    margin:0;
    color:#111;
    font-family:Arial,Helvetica,sans-serif;
    font-size:clamp(34px,3.2vw,54px);
    line-height:1.05;
    font-weight:900;
    letter-spacing:-1.8px;
}
.rev-catalogue-home-heading p{
    margin:18px 0 0;
    color:#7c7c7c;
    font-size:16px;
    line-height:1.5;
}

.rev-catalogue-home .rev-catalogue-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:34px;
    align-items:start;
}
.rev-catalogue-home .rev-catalogue-tile{
    overflow:visible;
}
.rev-catalogue-home .rev-open-book{
    display:block;
}
.rev-catalogue-home .rev-open-book > img,
.rev-catalogue-home .rev-cover-placeholder{
    width:100%;
    aspect-ratio:1.28 / 1;
    object-fit:contain;
    background:#f7f7f7;
    border-radius:7px;
    padding:0;
    box-shadow:0 10px 28px rgba(0,0,0,.08);
}
.rev-catalogue-home .rev-catalogue-info{
    text-align:center;
    padding:13px 0 0;
}
.rev-catalogue-home .rev-catalogue-info h3{
    margin:0;
    color:#111;
    font-size:18px;
    line-height:1.2;
    font-weight:800;
}
.rev-catalogue-home .rev-catalogue-info p{
    margin:6px 0 0;
    color:#8a8a8a;
    font-size:14px;
    line-height:1.3;
}
.rev-catalogue-home .rev-catalogue-info span{
    display:none;
}

/* bottom 01–04 information block */
.rev-catalogue-steps{
    margin:76px auto 0;
    width:100%;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    background:#f7f7f7;
    border:1px solid #e4e4e4;
}
.rev-step-item{
    padding:42px 54px 44px;
    min-height:180px;
    box-sizing:border-box;
}
.rev-step-item + .rev-step-item{
    border-left:1px solid #e7e7e7;
}
.rev-step-num{
    color:#e51b23;
    font-size:35px;
    line-height:1;
    font-weight:900;
    margin-bottom:22px;
}
.rev-step-item h3{
    margin:0 0 9px;
    color:#111;
    font-size:16px;
    line-height:1.25;
    font-weight:700;
}
.rev-step-item p{
    margin:0;
    color:#7b7b7b;
    font-size:13px;
    line-height:1.55;
}

@media(max-width:1024px){
    .rev-catalogue-home{
        padding:46px 20px 54px;
    }
    .rev-catalogue-home .rev-catalogue-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:30px 22px;
    }
    .rev-catalogue-steps{
        grid-template-columns:repeat(2,minmax(0,1fr));
        margin-top:56px;
    }
    .rev-step-item{
        padding:32px 30px;
        min-height:160px;
    }
    .rev-step-item:nth-child(3){
        border-left:0;
        border-top:1px solid #e7e7e7;
    }
    .rev-step-item:nth-child(4){
        border-top:1px solid #e7e7e7;
    }
}

@media(max-width:767px){
    .rev-catalogue-home{
        padding:34px 14px 40px;
    }
    .rev-catalogue-home-heading{
        margin-bottom:30px;
    }
    .rev-catalogue-home-heading h2{
        font-size:31px;
        letter-spacing:-1px;
    }
    .rev-catalogue-home-heading p{
        margin-top:10px;
        font-size:13px;
    }
    .rev-catalogue-home .rev-catalogue-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:24px 12px;
    }
    .rev-catalogue-home .rev-catalogue-info{
        padding-top:9px;
    }
    .rev-catalogue-home .rev-catalogue-info h3{
        font-size:13px;
    }
    .rev-catalogue-home .rev-catalogue-info p{
        font-size:11px;
    }
    .rev-catalogue-steps{
        grid-template-columns:1fr 1fr;
        margin-top:42px;
    }
    .rev-step-item{
        padding:24px 18px;
        min-height:155px;
    }
    .rev-step-num{
        font-size:28px;
        margin-bottom:15px;
    }
    .rev-step-item h3{
        font-size:13px;
    }
    .rev-step-item p{
        font-size:11px;
    }
}

/* Revenco color corrections */
.rev-book-heading small,
.rev-page-status{
    color:#ffffff !important;
}
.rev-step-num{
    color:#e51b23 !important;
}


/* =========================================================
   Final hard overrides: remove every blue link/hover/focus
   ========================================================= */
.rev-catalogue-home a,
.rev-catalogue-home a:link,
.rev-catalogue-home a:visited,
.rev-catalogue-home a:hover,
.rev-catalogue-home a:active,
.rev-catalogue-browser a,
.rev-catalogue-browser a:link,
.rev-catalogue-browser a:visited,
.rev-catalogue-browser a:hover,
.rev-catalogue-browser a:active,
.rev-book-app a,
.rev-book-app a:link,
.rev-book-app a:visited,
.rev-book-app a:hover,
.rev-book-app a:active,
.rev-open-book,
.rev-open-book:hover,
.rev-open-book:focus,
.rev-open-book:active,
.rev-product-card,
.rev-product-card:hover,
.rev-product-card:focus,
.rev-product-card:active,
.rev-catalogue-info h3,
.rev-catalogue-info p,
.rev-book-heading,
.rev-book-heading strong,
.rev-book-heading small{
    color:inherit !important;
    text-decoration:none !important;
}

.rev-catalogue-home .rev-catalogue-info h3,
.rev-catalogue-browser .rev-catalogue-info h3,
.rev-product-meta h3,
.rev-step-item h3{
    color:#111 !important;
}

.rev-catalogue-home .rev-catalogue-info p,
.rev-catalogue-browser .rev-catalogue-info p,
.rev-step-item p{
    color:#7c7c7c !important;
}

.rev-catalogue-home .rev-catalogue-info span,
.rev-catalogue-browser .rev-catalogue-info span{
    color:#e51b23 !important;
}

.rev-book-app,
.rev-book-app *,
.rev-catalogue-home,
.rev-catalogue-home *{
    outline-color:#e51b23;
}

.rev-book-app a:focus,
.rev-book-app button:focus,
.rev-catalogue-home a:focus,
.rev-catalogue-home button:focus,
.rev-catalogue-browser a:focus,
.rev-catalogue-browser button:focus{
    outline:1px solid #e51b23 !important;
    box-shadow:none !important;
}

.rev-open-book:hover .rev-catalogue-info h3,
.rev-open-book:hover .rev-catalogue-info p,
.rev-open-book:hover .rev-catalogue-info span,
.rev-open-book:focus .rev-catalogue-info h3,
.rev-open-book:focus .rev-catalogue-info p,
.rev-open-book:focus .rev-catalogue-info span{
    color:inherit !important;
}

.rev-open-book:hover .rev-catalogue-info h3,
.rev-open-book:focus .rev-catalogue-info h3{
    color:#111 !important;
}

.rev-open-book:hover .rev-catalogue-info p,
.rev-open-book:focus .rev-catalogue-info p{
    color:#7c7c7c !important;
}

.rev-open-book:hover .rev-catalogue-info span,
.rev-open-book:focus .rev-catalogue-info span{
    color:#e51b23 !important;
}

.rev-page-arrow:hover,
.rev-close-book:hover,
.rev-footer-prev:hover,
.rev-footer-next:hover{
    color:#e51b23 !important;
    border-color:#e51b23 !important;
}

.rev-dot:hover,
.rev-dot:focus{
    background:#e51b23 !important;
}


/* =========================================================
   HARD RESET: catalogue card must NEVER turn blue
   Overrides WoodMart/Elementor/theme button hover styles
   ========================================================= */
.rev-catalogue-home button.rev-open-book,
.rev-catalogue-home button.rev-open-book:link,
.rev-catalogue-home button.rev-open-book:visited,
.rev-catalogue-home button.rev-open-book:hover,
.rev-catalogue-home button.rev-open-book:focus,
.rev-catalogue-home button.rev-open-book:focus-visible,
.rev-catalogue-home button.rev-open-book:active,
.rev-catalogue-browser button.rev-open-book,
.rev-catalogue-browser button.rev-open-book:hover,
.rev-catalogue-browser button.rev-open-book:focus,
.rev-catalogue-browser button.rev-open-book:focus-visible,
.rev-catalogue-browser button.rev-open-book:active{
    background:transparent !important;
    background-color:transparent !important;
    background-image:none !important;
    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;
    color:#111 !important;
    opacity:1 !important;
    filter:none !important;
    transform:none !important;
    -webkit-appearance:none !important;
    appearance:none !important;
    -webkit-tap-highlight-color:transparent !important;
}

.rev-catalogue-home .rev-catalogue-tile,
.rev-catalogue-home .rev-catalogue-tile:hover,
.rev-catalogue-home .rev-catalogue-tile:focus-within,
.rev-catalogue-browser .rev-catalogue-tile,
.rev-catalogue-browser .rev-catalogue-tile:hover,
.rev-catalogue-browser .rev-catalogue-tile:focus-within{
    background:transparent !important;
    background-color:transparent !important;
    background-image:none !important;
    border-color:transparent !important;
    box-shadow:none !important;
}

.rev-catalogue-home .rev-catalogue-info,
.rev-catalogue-home .rev-open-book:hover .rev-catalogue-info,
.rev-catalogue-home .rev-open-book:focus .rev-catalogue-info,
.rev-catalogue-home .rev-open-book:active .rev-catalogue-info,
.rev-catalogue-browser .rev-catalogue-info,
.rev-catalogue-browser .rev-open-book:hover .rev-catalogue-info,
.rev-catalogue-browser .rev-open-book:focus .rev-catalogue-info,
.rev-catalogue-browser .rev-open-book:active .rev-catalogue-info{
    background:transparent !important;
    background-color:transparent !important;
    background-image:none !important;
    color:#111 !important;
}

.rev-catalogue-home .rev-open-book > img,
.rev-catalogue-home .rev-open-book:hover > img,
.rev-catalogue-home .rev-open-book:focus > img,
.rev-catalogue-home .rev-open-book:active > img,
.rev-catalogue-home .rev-cover-placeholder,
.rev-catalogue-home .rev-open-book:hover .rev-cover-placeholder,
.rev-catalogue-home .rev-open-book:focus .rev-cover-placeholder{
    background-color:#f7f7f7 !important;
    border-color:transparent !important;
    outline:0 !important;
    box-shadow:0 10px 28px rgba(0,0,0,.08) !important;
}

.rev-catalogue-home .rev-open-book:hover .rev-catalogue-info h3,
.rev-catalogue-home .rev-open-book:focus .rev-catalogue-info h3,
.rev-catalogue-home .rev-open-book:active .rev-catalogue-info h3{
    color:#111 !important;
    background:transparent !important;
}

/* No browser/theme blue focus ring anywhere in this plugin */
.rev-catalogue-home *:focus,
.rev-catalogue-home *:focus-visible,
.rev-catalogue-browser *:focus,
.rev-catalogue-browser *:focus-visible{
    outline-color:#e51b23 !important;
    box-shadow:none !important;
}

/* Revenco-only accent palette */
.rev-catalogue-home,
.rev-catalogue-browser,
.rev-book-app{
    accent-color:#e51b23 !important;
}


/* Catalogue listing image support */
.rev-catalogue-home .rev-catalogue-grid{
    justify-items:center;
    align-items:start;
}
.rev-catalogue-home .rev-catalogue-tile{
    width:100%;
    max-width:270px;
}
.rev-catalogue-home .rev-catalogue-cover-wrap{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.rev-catalogue-home .rev-catalogue-cover,
.rev-catalogue-home .rev-cover-placeholder{
    width:auto !important;
    max-width:100%;
    height:auto !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    display:block;
}
.rev-catalogue-home .rev-cover-placeholder{
    width:100% !important;
    min-height:210px;
}
