/* ============================================================
   1. RESTORED ORIGINAL CAROUSEL & CTA (UNTOUCHED)
   ============================================================ */

.catalogue-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.carousel-item {
    flex: 0 0 auto;
    width: 220px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
}

.carousel-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-info {
    padding: 10px;
}

.carousel-title {
    font-size: 15px;
    margin-bottom: 6px;
    font-family: Georgia, serif;
}

.carousel-summary {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.carousel-footer-cta a {
    display: inline-block;
    margin-top: 6px;
    font-size: 18px !important;
    font-family: Georgia, serif;
    text-decoration: underline;
    color: #2b2116;
    letter-spacing: 0.3px;
    line-height: 1.4 !important;
}

/* ============================================================
   2. ISOLATED CATALOGUE FIXES (MOBILE ONLY)
   ============================================================ */

.gc-catalogue-search, 
.gc-catalogue-grid {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.gc-catalogue-search *, 
.gc-catalogue-grid * {
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .gc-catalogue-search {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .gc-search-wrapper {
        width: 100%;
        margin-bottom: 8px;
    }

    .gc-search-wrapper input {
        font-size: 16px;
        width: 100%;
    }

    .gc-filter-wrapper {
        width: 100%;
        justify-content: space-between;
    }

    .gc-filter-wrapper select {
        flex: 1;
        font-size: 16px;
    }
}

.gc-catalogue-search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    background: #f7f2e7;
    border: 1px solid #d8c7a6;
    border-radius: 4px;
}

.gc-search-wrapper input {
    padding: 11px 12px;
    border: 1px solid #cbb894;
    border-radius: 3px;
    font-family: Georgia, serif;
}

.gc-catalogue-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

@media (max-width: 480px) {
    .gc-catalogue-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.gc-book-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d8c7a6;
    border-radius: 6px;
    padding: 10px;
}

.gc-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.gc-info h3 {
    font-size: 16px;
    margin: 10px 0 4px;
    text-align: center;
    font-family: Georgia, serif;
    color: #2b2116;
}

/* ============================================================
   3. SAFE GLOBAL OVERFLOW PROTECTION (NEW — NON-DESTRUCTIVE)
   ============================================================ */

/* Prevent horizontal scroll WITHOUT breaking layout */
html, body {
    overflow-x: hidden;
}

/* Prevent accidental viewport overflow from ANY Gutenberg block */
.wp-site-blocks {
    overflow-x: hidden;
}

/* ONLY constrains rogue full-width elements (safe override) */
.wp-block-group.alignfull,
.wp-block-media-text.alignfull,
.wp-block-cover.alignfull {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Ensure images never force layout overflow */
img {
    max-width: 100%;
    height: auto;
}