/* =========================================================
   TESTIMONIAL LISTING + DETAIL PAGE
========================================================= */

.testimonial-view-all {
    display: flex;
    justify-content: center;
    margin: 28px auto 10px;
}

.view-all-testimonials-btn {
    background: #e35486;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s ease;
}

.view-all-testimonials-btn:hover {
    background: #a3154d;
    transform: translateY(-2px);
}

.testimonial-card[role="button"] {
    cursor: pointer;
}

.testimonials-page {
    min-height: 60vh;
    padding: 35px 5%;
}

.testimonials-page-header {
    text-align: center;
    margin: 10px auto 30px;
}

.testimonials-page-header .blog-back-btn {
    display: block;
    margin: 0 auto 25px 0;
}

.testimonials-page-header h1 {
    margin: 14px 0 8px;
}

.testimonials-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-list-card {
    width: auto !important;
    min-width: 0;
    flex: initial !important;
    transform: none;
    height: auto;
    min-height: 250px;
}

.testimonial-list-card:hover {
    transform: translateY(-4px);
}

.testimonial-read-more {
    display: inline-block;
    margin-top: 14px;
    color: #c2185b;
    font-weight: 700;
}

.testimonial-details-view {
    max-width: 900px;
    margin: 20px auto;
}

.testimonial-detail-card {
    margin: 25px auto;
    padding: 35px;
    max-width: 760px;
    text-align: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,.08);
}

.testimonial-detail-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 18px;
}

.testimonial-detail-card h1 {
    margin: 8px 0;
}

.testimonial-detail-rating {
    font-size: 25px;
    color: #f5a623;
    margin: 12px 0 20px;
}

.testimonial-detail-message {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .testimonials-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .testimonial-detail-card {
        padding: 22px 16px;
    }

    .testimonial-detail-message {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .testimonials-list-grid {
        grid-template-columns: 1fr;
    }

    .view-all-testimonials-btn {
        width: 90%;
    }
}
/* TESTIMONIAL BUTTON — MATCH BLOG BUTTON SIZE */
.view-all-testimonials-btn {
    display: inline-block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 10px 20px !important;
    margin: 0 !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* =========================================================
   TESTIMONIAL PAGE — STANDARD SPACING AND BUTTONS
   View All Testimonials button intentionally untouched
========================================================= */

#testimonialsPage.testimonials-page {
    padding: 20px 4%;
    min-height: auto;
}

#testimonialsPage .testimonials-page-header {
    margin: 0 auto 20px;
}

#testimonialsPage .testimonials-page-header .blog-back-btn,
#testimonialsPage .testimonial-details-view > .blog-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 9px 16px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.3;
    box-sizing: border-box;
}

#testimonialsPage .testimonials-list-grid {
    gap: 18px;
}

#testimonialsPage .testimonial-list-card {
    min-height: 0;
    padding: 20px;
    box-sizing: border-box;
}

#testimonialsPage .testimonial-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 14px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
}

#testimonialsPage .testimonial-details-view {
    margin: 12px auto;
}

#testimonialsPage .testimonial-detail-card {
    margin: 12px auto;
    padding: 28px 24px;
}

@media (max-width: 768px) {
    #testimonialsPage.testimonials-page {
        padding: 16px 4%;
    }

#testimonialsPage .testimonial-detail-card {
        padding: 20px 16px;
    }
}

/* TESTIMONIAL PAGE — LAPTOP VIEWPORT FIX */
@media (min-width: 769px) {
    #testimonialsPage.testimonials-page {
        box-sizing: border-box;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 24px;
    }

    #testimonialsPage .testimonials-list-grid {
        width: 100%;
        box-sizing: border-box;
    }
}
/* TESTIMONIAL PAGE — MATCH BLOGS HEADER SPACING */
#testimonialsPage.testimonials-page {
    position: relative !important;
    top: 0 !important;
    transform: none !important;
    margin-top: 0 !important;
    padding-top: 130px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    #testimonialsPage.testimonials-page {
        padding-top: 125px !important;
    }
}

@media (max-width: 560px) {
    #testimonialsPage.testimonials-page {
        padding-top: 105px !important;
    }
}
/* TESTIMONIAL BACK HOME — BLOG STYLE LEFT ALIGNMENT */
#testimonialsPage .testimonials-page-header .blog-back-btn {
    display: block !important;
    width: fit-content !important;
    margin: 0 auto 16px 0 !important;
    text-align: left !important;
}
/* TESTIMONIAL MOBILE — ALWAYS TWO CARDS PER ROW */
@media (max-width: 768px) {
    #testimonialsPage .testimonials-list-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    #testimonialsPage .testimonial-list-card {
        min-width: 0 !important;
        width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
}
/* RISHTABOX COMMON RESPONSIVE BACK TO HOME BUTTON */
.rb-page-home-back-btn {
    display: block !important;
    width: fit-content !important;
    max-width: 92% !important;
    margin: 12px 4% 16px !important;
    padding: 9px 16px !important;
    text-align: left !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

@media (min-width: 769px) {
    .rb-page-home-back-btn {
        font-size: 14px !important;
    }
}

@media (max-width: 768px) {
    .rb-page-home-back-btn {
        margin: 10px 4% 14px !important;
        padding: 8px 13px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .rb-page-home-back-btn {
        margin: 8px 4% 12px !important;
        padding: 8px 11px !important;
        font-size: 12px !important;
    }
}

/* ===== Corporate Gifting =====
   Cards, pinned grid and slider reuse the Gifts by Relationship classes
   (shop-card / pinned-shop-grid / shop-slider-track), so sizes match exactly.
   Only the items below are corporate-specific. */
.corporate-card > img.img-failed {
    visibility: hidden;
    background: #f3e1e7;
}

.corporate-card > .category-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.corporate-card {
    cursor: pointer;
}

/* In-site PDF viewer */
html.corporate-pdf-open,
html.corporate-pdf-open body {
    overflow: hidden;
}

.corporate-pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(40, 20, 28, 0.6);
}

.corporate-pdf-overlay[hidden] {
    display: none;
}

.corporate-pdf-panel {
    display: flex;
    flex-direction: column;
    width: min(960px, 100%);
    height: min(92vh, 100%);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.corporate-pdf-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #ead4dc;
}

.corporate-pdf-title {
    margin: 0;
    color: #4a2635;
    font-size: 17px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corporate-pdf-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f3e1e7;
    color: #4a2635;
    font-size: 16px;
    cursor: pointer;
}

.corporate-pdf-close:hover {
    background: #e35486;
    color: #fff;
}

.corporate-pdf-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    padding: 8px;
    background: #efe7ea;
}

.corporate-pdf-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
}

.corporate-pdf-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.corporate-pdf-tools[hidden] {
    display: none;
}

.corporate-pdf-pageinfo {
    min-width: 54px;
    color: #4a2635;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.corporate-pdf-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e35486;
    border-radius: 50%;
    background: #fff;
    color: #e35486;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.corporate-pdf-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.corporate-pdf-page {
    flex: 0 0 auto;
    margin: 0 0 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    max-width: 100%;
}

.corporate-pdf-page canvas {
    display: block;
    max-width: 100%;
}

.corporate-pdf-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.corporate-pdf-message {
    margin: 40px 0;
    color: #4a2635;
}

.corporate-pdf-fallback {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 2;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 20px;
    background: #e35486;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 600px) {
    .corporate-pdf-overlay {
        padding: 0;
    }

    .corporate-pdf-panel {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .corporate-pdf-body {
        padding: 8px;
    }
}

/* Corporate catalogue admin cards */
.corporate-admin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin: 12px 0;
    border: 1px solid #ead4dc;
    border-radius: 10px;
    background: #fff;
}
.corporate-admin-card h3,
.corporate-admin-card p {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
}
.corporate-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
@media (max-width: 600px) {
    .corporate-admin-card {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ===== End Corporate Gifting ===== */


/* TESTIMONIAL READ MORE — TOUCH DEVICES */
@media (max-width: 768px) {
    #testimonialsPage .testimonial-list-card {
        position: relative;
        box-sizing: border-box;
    }

    #testimonialsPage .testimonial-list-card .testimonial-read-more {
        position: relative;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 8px 10px !important;
        margin-top: 10px;
        touch-action: manipulation;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }

    #testimonialsPage .testimonial-details-view,
    #testimonialsPage .testimonial-detail-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #testimonialsPage .testimonial-detail-photo {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }

    #testimonialsPage .testimonial-detail-message {
        overflow-wrap: anywhere;
        word-break: normal;
    }
}

/* MOBILE/TABLET TESTIMONIAL DETAIL FIX */
@media screen and (max-width: 768px) {
    #testimonialsPage {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    #testimonialsPage .testimonial-details-view,
    #testimonialsPage #testimonialDetailsContent,
    #testimonialsPage .testimonial-detail-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    #testimonialsPage .testimonial-detail-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-wrap: anywhere !important;
    }

    #testimonialsPage .testimonial-detail-message {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.7 !important;
    }

    #testimonialsPage .testimonial-detail-photo {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    #testimonialsPage button,
    #testimonialsPage .testimonial-read-more {
        touch-action: manipulation !important;
    }

    #testimonialsPage .testimonial-details-view {
        padding-bottom: 100px !important;
    }
}


/* FIX: MOBILE TESTIMONIAL DETAIL MUST REPLACE LISTING */
@media screen and (max-width: 768px) {
    #testimonialsPage:has(#testimonialDetailsView[style*="display: block"])
    .testimonials-list-grid {
        display: none !important;
    }

    #testimonialsPage:has(#testimonialDetailsView[style*="display: block"])
    .testimonial-list-card {
        display: none !important;
    }

    #testimonialsPage #testimonialDetailsView {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #testimonialsPage #testimonialDetailsContent {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}


/* RB_COMPACT_CORPORATE_CATALOGUE_MOBILE_TABLET_20261111 */
@media (min-width: 601px) and (max-width: 768px) {
  #corporateGifting #corporateGiftingGrid {
    gap: 9px !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card,
  #corporateGifting #corporateGiftingGrid .corporate-card {
    flex: 0 0 145px !important;
    width: 145px !important;
    min-width: 145px !important;
    box-sizing: border-box !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card > img,
  #corporateGifting #corporateGiftingGrid .corporate-card > img {
    max-height: 100px !important;
    object-fit: cover !important;
  }
}

@media (max-width: 600px) {
  #corporateGifting #corporateGiftingGrid {
    gap: 7px !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card,
  #corporateGifting #corporateGiftingGrid .corporate-card {
    flex: 0 0 126px !important;
    width: 126px !important;
    min-width: 126px !important;
    box-sizing: border-box !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card > img,
  #corporateGifting #corporateGiftingGrid .corporate-card > img {
    max-height: 88px !important;
    object-fit: cover !important;
  }
}

@media (max-width: 380px) {
  #corporateGifting #corporateGiftingGrid {
    gap: 6px !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card,
  #corporateGifting #corporateGiftingGrid .corporate-card {
    flex-basis: 112px !important;
    width: 112px !important;
    min-width: 112px !important;
  }

  #corporateGifting #corporateGiftingGrid .shop-card > img,
  #corporateGifting #corporateGiftingGrid .corporate-card > img {
    max-height: 78px !important;
  }
}
/* END RB_COMPACT_CORPORATE_CATALOGUE_MOBILE_TABLET_20261111 */
