/*
 Theme Name:   Flatsome Child
 Theme URI:    https://semuu.com
 Description:  Child theme for Flatsome
 Author:       Semuu
 Author URI:   https://semuu.com
 Template:     flatsome
 Version:      1.0.1
*/

/* =========================================
   PART 1: Global and Portfolio Base Styles
   ======================================== */

/* 1. Global Fundamentals */
html body #wrapper .purchase-link {
    margin-left: 8%; 
    text-align: left;
}

.normal-title  {
    padding-top: 22px;
    padding-bottom: 22px;
}

.page-wrapper  {
    padding-top: 0;
    padding-bottom: 0;
}

body {
    background-color: #fff;
}

/* Button Container */
.yrm-btn-wrapper {
    position: relative;
    display: block;
    width: 200px;
    margin: 0 auto;
    text-align: center;
    height: 32px;
    line-height: 1;
}

/* Mobile (< 849px) — Top Buttons Centered */
@media (max-width: 849px) {
    html body #wrapper .purchase-link {
        margin-left: 0 !important; 
        width: 100% !important; 
        display: flex !important;
        justify-content: center !important; 
        align-items: center !important;
        flex-wrap: wrap !important;
    }

    html body #wrapper .purchase-link .button {
        float: none !important; 
        margin: 5px 6px !important;
    }
}

/* ========================================
   PART 2: Single Post & Title Typography
   ======================================= */

.portfolio-page .col, 
.portfolio-page .columns, 
.portfolio-page .gallery-item {
    padding: 0;
}
    
html body.single-post #wrapper #main #content > .row {
    padding-top: 45px;
}

@media (max-width: 849px) {
    html body.single-post #wrapper #main #content > .row {
        padding-top: 25px;
    }
}

/* Main Image and Container Rounded Corners */
body.single-post article .wp-post-image,
body.single-post .article-inner .entry-content img {
    border-radius: 10px;
    overflow: hidden;
}

body.single-post article .post-thumbnail,
body.single-post .article-inner .entry-content .wp-block-image {
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
}

/* Global Title Display Control */
.page-title {
    display: none;
}

body.single-featured_item .page-title,
body.archive.category .page-title,
body .portfolio-breadcrumb-title {
    display: block;
    visibility: visible;
    height: auto;
}

/* Read More Button */
html body .yrm-toggle-expand {
    display: inline-block;
    background-color: #f1f1f1;
    padding: 8px 25px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    border: 1px solid #bbbbbb; 
    position: relative;
    z-index: 10;
}

html body .yrm-toggle-expand .yrm-button-text-span {
    color: #000000;            
    font-weight: 900;          
    font-size: 13px;           
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.3px;
    opacity: 1;                
}

/* Portfolio H1 Heading Spacing */
body.page-template-page-blank-title-center-php main#main #content .entry-header .entry-title {
    margin-top: 25px;
    font-size: clamp(20px, 5vw, 25px);
}

@media (max-width: 768px) {
    body.page-template-page-blank-title-center-php main#main #content .entry-header .entry-title {
        font-size: 20px;
    }
}


/* ==================================================
   PART 3: Forms and Native Search Box Optimization
   ================================================= */

/* Fluent Form */
html body #wrapper .fluentform .ff-el-form-control {
    border-radius: 5px; 
    background-clip: padding-box;
    box-shadow: none;
    -webkit-appearance: none !important; 
    appearance: none !important;
}

html body #wrapper .fluentform .ff-btn-submit {
    border-radius: 5px;
    -webkit-appearance: none !important;
}

/* Flatsome Search Box */
html body #wrapper .searchform .search-field,
html body #wrapper .widget_search .search-field {
    border-radius: 5px 0 0 5px;
    box-shadow: none;
    -webkit-appearance: none !important;
    appearance: none !important;
}

html body #wrapper .searchform .submit-button,
html body #wrapper .widget_search button {
    border-radius: 0 5px 5px 0;
    -webkit-appearance: none !important;
}

/* =============================================================
   PART 4: Portfolio (Mobile) — Swapping Fixed-Bottom Buttons
   ============================================================ */
@media only screen and (max-width: 768px) {
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky {
        position: fixed;
        top: auto;
        bottom: 0;
        min-height: 0;
        left: 0;
        width: 100%;
        z-index: 99999; 
        background-color: #fff;
        margin: 0;
        height: auto;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.08); 
        border-radius: 2px 2px 0 0;
        padding-top: 13px;
        padding-bottom: calc(13px + env(safe-area-inset-bottom));
        animation: slideUpFade 0.3s ease-out forwards;
    }

    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .flex-left,
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .flex-right {
        display: none !important;
    }

    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .page-title-inner {
        min-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link {
        width: 100% !important;
        display: flex !important; 
        flex-direction: row !important; 
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 20px !important; 
    }

    /* Buy Button  */
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(1) {
        order: 2 !important; 
        float: none !important;
        margin: 0 !important;
        color: #C05530 !important;
        border: 2px solid #C05530 !important;
        background-color: transparent !important;
        font-size: 15px !important;       
        padding: 8px 30px !important;     
        height: auto !important;          
        line-height: 1.2 !important;      
    }
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(1):hover,
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(1):focus,
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(1):active {
        background-color: #C05530 !important; 
        color: #ffffff !important;            
        border-color: #C05530 !important;
    }

    /* Wholesale Button */
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(2) {
        order: 1 !important; 
        float: none !important;
        margin: 0 !important;
        color: #666666 !important;
        border: 2px solid #666666 !important;
        background-color: transparent !important;
        font-size: 15px !important;       
        padding: 8px 30px !important;     
        height: auto !important;          
        line-height: 1.2 !important;      
    }
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(2):hover,
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(2):focus,
    html body.single-featured_item #wrapper .portfolio-breadcrumb-title.mobile-mini-sticky .purchase-link a:nth-of-type(2):active {
        background-color: #666666 !important; 
        color: #ffffff !important;            
        border-color: #666666 !important;
    }
}

@keyframes slideUpFade {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* =============================================
   PART 5:  Sticky Footer Horizontal Bar Spacer
   ============================================ */
    
    html body.single-featured_item .joinchat,
    html body.single-featured_item .joinchat.joinchat--show {
        bottom: 90px !important;     
        --bottom: 90px;   
        z-index: 9999 !important;    
    }
    html body.single-featured_item .fct-cart-drawer-open-btn {
        bottom: 155px !important; 
        z-index: 9999 !important;   
        display: block;
    }
    html body.single-featured_item #wrapper {
        padding-bottom: 65px; 
    }
}

@media screen and (min-width: 768px) {
    html body .joinchat {
        right: 11px;
        bottom: 80px !important; 
        --bottom: 80px;
        z-index: 9990 !important;
    }
    html body .fct-cart-drawer-container,
    html body .fct-cart-drawer-open-btn {
        position: fixed;
        z-index: 9999 !important;
        display: block;
        right: 5px;       
        bottom: 150px !important;    
        top: auto; 
    }
}


/* ======================================
   PART 6: Site Reviews Waterfall Layout
   ===================================== */

html body #wrapper .glsr-reviews-wrap .glsr-reviews {
    display: block; 
    column-count: 3; 
    column-gap: 20px;
    orphans: 1;
    widows: 1;
}

html body #wrapper .glsr-reviews-wrap .glsr-review {
    display: inline-flex; 
    flex-direction: column; 
    width: 100%;
    break-inside: avoid; 
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-author {
    order: 1;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-author::after {
    content: "Verified";
    display: inline-block;
    background: #000;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    margin-left: 8px;
    border-radius: 2px;
    text-transform: uppercase;
    line-height: 1;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-date {
    order: 2;
    display: block;
    font-size: 12px;
    color: #767676;
    margin-bottom: 12px;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-rating {
    order: 3;
    display: flex;
    justify-content: flex-start;
    padding: 0;
    margin-bottom: 10px;
}

html body #wrapper .glsr-reviews-wrap .glsr-star {
    width: 16px;
    height: 16px;
    background-size: contain;
    margin-right: 2px;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-title {
    order: 4;
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.4;
}

html body #wrapper .glsr-reviews-wrap .glsr-review-content {
    order: 5; 
    font-size: 14px;
    line-height: 1.6;
    color: #424242;
    text-align: left;
    word-break: break-word; 
    overflow-wrap: break-word;
}

@media (max-width: 991px) {
    html body #wrapper .glsr-reviews-wrap .glsr-reviews { column-count: 2; }
}
@media (max-width: 767px) {
    html body #wrapper .glsr-reviews-wrap .glsr-reviews { column-count: 1; }
}


/* ===========================================
  PART 7: Site Reviews – Minimalist Paginator
   ========================================== */
html body #wrapper .glsr-reviews-wrap .glsr-pagination .pagination,
html body #wrapper .glsr-reviews-wrap .pagination {
    border: none;       
    background: transparent; 
    box-shadow: none;   
    padding: 0;
    margin: 40px auto 20px auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto; 
}

html body #wrapper .glsr-reviews-wrap .pagination .nav-links {
    display: flex;
    gap: 8px; 
    border: none;
}

html body #wrapper .glsr-reviews-wrap .pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 38px;  
    height: 38px;     
    padding: 0;
    margin: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0; 
    border-radius: 4px;
    color: #1a1a1a;
    font-size: 16px; 
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 1; 
}

html body #wrapper .glsr-reviews-wrap .pagination a.page-numbers:hover {
    border-color: #000;
    background-color: #f5f5f5;
    color: #000;
}

html body #wrapper .glsr-reviews-wrap .pagination .page-numbers.current {
    background: transparent;
    border: none; 
    box-shadow: none;
    font-size: 24px; 
    font-weight: 800;
    color: #000;
    cursor: default;
    min-width: auto; 
    padding: 0 8px;
}

html body #wrapper .glsr-reviews-wrap .pagination .next,
html body #wrapper .glsr-reviews-wrap .pagination .prev {
    font-size: 0;
    color: transparent;
}

html body #wrapper .glsr-reviews-wrap .pagination .next::before {
    content: "›";
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    line-height: 36px;
    display: block;
}

html body #wrapper .glsr-reviews-wrap .pagination .prev::before {
    content: "‹";
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    line-height: 36px;
    display: block;
}