/**
 * Phase 8 book listing/detail page UI pattern -- romanceebookdeals.
 * Brand accent uses this theme's own --primary (#b74533, css/style.css),
 * not Bootstrap's --bs-primary (#EAA451) which doesn't match the site logo.
 */

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

/* ---------- Book card (list + detail) ---------- */
.book-item {
    margin: 0 0 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    padding: 25px 25px 20px;
    overflow: hidden;
}
.book-item-img img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}
.book-item-book h2 {
    margin: 6px 0 2px;
}
.book-item-book h2 a {
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}
.book-item-author {
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.book-item-price {
    margin: 0 0 8px;
}
.book-item-price .price-current {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}
.book-item-price .price-regular {
    font-size: 18px;
    color: #999;
    margin-left: 8px;
    font-weight: 400;
    text-decoration: line-through;
}
.book-item-date {
    color: #444;
    margin: 0 0 12px;
}
.book-item-desc {
    color: #333;
    line-height: 1.6;
    margin: 0 0 16px;
}
.book-item-desc.collapsed {
    max-height: 220px;
    overflow: hidden;
    position: relative;
}
.book-item-desc.collapsed:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}
.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    padding: 0;
    margin: -4px 0 20px;
    display: block;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
}
.read-more-btn:hover {
    text-decoration: underline;
}

/* ---------- Store buttons + Other Stores modal ---------- */
.book-item-links {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
}
.book-item-links .btn-store {
    background: #f0f0f0;
    color: #333 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .3px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.6;
}
.book-item-links .btn-store:hover {
    background: #e2e2e2;
}
.book-item-links a.btn-store {background: var(--primary);color: #fff !important;border: 1px solid var(--primary);}
.book-item-links a.btn-store:hover {background: var(--primary-hover);border: 1px solid var(--primary-hover);}
.book-item-links .btn-other-stores {background: #6c757d;color: #fff !important;border: 1px solid #6c757d;}
.book-item-links .btn-other-stores:hover {background: #5c636a;border: 1px solid #5c636a;}

.other-stores {
    position: relative;
}
.other-stores-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
}
.other-stores.open .other-stores-backdrop {
    display: block;
}
.other-stores-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
    padding: 40px 24px 16px;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
}
.other-stores.open .other-stores-box {
    display: block;
}
.other-stores-box h4 {
    margin: 0 0 15px;
    text-align: center;
}
.other-stores-links {
    column-count: 3;
    column-gap: 0;
}
.other-stores-links a {
    display: block;
    padding: 8px 10px;
    color: #333;
    white-space: nowrap;
    background: none;
    font-weight: 400;
    text-transform: none;
    border-radius: 0;
    margin: 0;
    break-inside: avoid;
}
.other-stores-links a:hover {
    background: #f5f5f5;
}
.other-stores-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px 10px;
    font-family: inherit;
}
.other-stores-close:hover {
    color: #333;
}

/* ---------- Meta row (genre + length) ---------- */
.book-item-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    margin: 0 0 6px;
}
.book-item-genre a,
.book-item-tags a {
    color: var(--primary);
}

/* ---------- Signup section (one per page) ---------- */
.site-signup-section {
    margin: 40px 0 40px;
    padding: 40px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 6px;
    text-align: center;
}
.site-signup-section h3 {
    margin: 0 0 10px;
    color: #161616;
    font-size: 22px;
    font-weight: 700;
}
.site-signup-section .cst-subscribe {
    max-width: 460px;
    margin: 0 auto;
}
.site-signup-section .cst-subscribe .emailSub {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-wrap: wrap;
}
.site-signup-section .cst-subscribe .expemail {
    order: 1;
    flex: 1 1 auto;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    margin: 0 !important;
    padding: 0 15px;
    height: 46px;
}
.site-signup-section .cst-subscribe .subBtn {
    order: 2;
    flex: 0 0 auto;
    border-radius: 0 6px 6px 0;
    height: 46px;
}
.site-signup-section .cst-subscribe p {
    order: 3;
    flex: 1 1 100%;
    text-align: left;
    margin: 10px 0 0 !important;
}
.site-signup-section .cst-subscribe .subBtn,
.sidebar-item .cst-subscribe .subBtn {
    background: var(--primary) !important;
    color: #fff !important;
    border: 1px solid var(--primary) !important;
}
.site-signup-section .cst-subscribe .subBtn:hover,
.sidebar-item .cst-subscribe .subBtn:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

/* ---------- Sidebar subscribe widget (single-books.php) ---------- */
.sidebar-item .fs-t1-inr {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 30px;
}
.sidebar-item .fs-t1-inr h3 {
    margin: 0 0 15px;
    color: #161616;
}
.sidebar-item .cst-subscribe .emailSub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sidebar-item .cst-subscribe .expemail {
    flex: 1 1 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 0 !important;
    padding: 0 15px;
    min-height: 46px;
}
.sidebar-item .cst-subscribe .subBtn {
    flex: 1 1 100%;
}
.sidebar-item .cst-subscribe p {
    text-align: left;
    margin: 10px 0 0 !important;
    font-size: 13px;
}

/* Known gotcha: the subscribe submit button was left completely unstyled
   (padding:10px, no background/color) after an earlier round of this work. */
input.subBtn {
    padding: 10px 20px !important;
    background: #EAA451;
    color: #fff !important;
    border: 1px solid #EAA451;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}
input.subBtn:hover {
    background: #BB8341;
    border-color: #BB8341;
}

/* ---------- Recent Books sidebar widget ---------- */
.recent-books-widget {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    margin: 0 0 30px;
}
.recent-books-widget h3 {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}
.recent-books-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.recent-books-list li {
    list-style: none !important;
    margin: 0 0 15px;
}
.recent-books-list li:last-child {
    margin: 0;
}
.recent-books-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    text-decoration: none;
}
.recent-books-list li a img {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.recent-books-list li a span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.recent-books-list li a:hover span {
    color: var(--primary);
}

/* ---------- Pagination (replaces WP-PageNavi plugin output) ---------- */
.easy-wp-page-navigation {
    clear: both;
    margin: 20px 0 0;
    display: inline-block;
    width: 100%;
    text-align: center;
}
ul.easy-wp-page-nav {
    list-style: none !important;
    display: inline-block;
    vertical-align: top;
    margin: 0;
    padding: 0;
}
ul.easy-wp-page-nav li {
    display: inline-block;
    float: left;
    margin: 0 3px 0 0;
}
ul.easy-wp-page-nav li:last-child {
    margin-right: 0;
}
.easy-wp-page-navigation a,
.easy-wp-page-navigation span {
    display: inline-block;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 30px;
    border-radius: 50%;
    text-align: center;
    border: 1px solid #ccc;
    color: #333;
    background: #fff;
    text-decoration: none;
    transition: all .2s;
}
.easy-wp-page-navigation a:hover,
.easy-wp-page-navigation span.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- Contact page (narrow, centered form) ---------- */
.contact_text {
    max-width: 700px;
    margin: 0 auto 30px;
    text-align: center;
}
.form-t1 {
    max-width: 480px;
    margin: 0 auto;
}

/* ---------- Container width (client design preference) ---------- */
@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1350px;
  }
}

/* ---------- Footer ---------- */
footer {
    background: #ccc;
}
footer .footer-bottom p {
    margin-bottom: 0;
    color: #000;
}

/* ---------- Quotes carousel (homepage) ----------
   The swiper now lives inside .container like the rest of the page, so the
   old bleed-left hack (margin-left: calc((100% - 1170px)/2), style.css) has
   to be neutralized or the slides drift off-center again. */
.testimonial-wrapper .container .swiper-container {
    margin-left: 0 !important;
}
.testimonial-wrapper .pagination-align.style-1 {
    justify-content: center;
    margin-top: 10px;
}


/* Detail page: avoid showing the subscribe form twice on mobile (main
   content column + sidebar) -- hide the sidebar copy once the sidebar
   stacks below the content, keeping the one in the main content column. */
@media (max-width: 991.98px) {
	body.single-books .fs-t1-inr {
		display: none;
	}
}
