/* Homepage WP Bakery Post Grid - equal height cards & button alignment */
body.home .vc_grid .vc_pageable-slide-wrapper.vc_clearfix {
    display: flex;
    flex-wrap: wrap;
}

body.home .vc_grid .vc_pageable-slide-wrapper.vc_clearfix>.vc_clearfix:not(.vc_grid-item) {
    display: none;
}

body.home .vc_grid .vc_grid-item.vc_clearfix.vc_col-sm-4 {
    display: flex;
    flex-direction: column;
}

body.home .vc_grid .vc_grid-item.vc_clearfix.vc_col-sm-4>.vc_grid-item-mini {
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.home .vc_grid .vc_grid-item .vc_gitem-zone-c {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.home .vc_grid .vc_gitem-zone-c .vc_gitem-zone-mini,
body.home .vc_grid .vc_gitem-zone-c .vc_gitem_row,
body.home .vc_grid .vc_gitem-zone-c .vc_gitem-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.home .vc_grid .vc_gitem-zone-c .vc_btn3-container {
    margin-top: auto;
}

/* Reduce stacked margins in homepage post grid */
body.home .vc_grid .vc_gitem-post-data-source-post_title {
    margin-bottom: 0;
}

body.home .vc_grid .vc_gitem-post-data-source-post_title h4 {
    margin-bottom: 10px;
}

body.home .vc_grid .vc_gitem-post-data-source-post_excerpt {
    margin-bottom: 0;
}

body.home .vc_grid .vc_gitem-post-data-source-post_excerpt>p:empty {
    display: none;
}

/* Post Grid image ratio 388:258 - homepage only */
.home .vc-gitem-zone-height-mode-auto.vc-gitem-zone-height-mode-auto-1-1:before {
    padding-top: 66.49% !important;
}

/* Blog Grid design - equal height rows */
.blog-grid-row {
    display: flex;
    flex-wrap: wrap;
}

.blog-grid-row .blog-design-grid {
    display: flex;
    margin-bottom: 30px;
}

.blog-grid-row .blog-design-grid .article-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.blog-grid-row .blog-design-grid .article-body-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-grid-row .blog-design-grid .article-body-container .entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-grid-row .blog-design-grid .article-body-container .read-more-section {
    margin-top: auto;
    padding-top: 1rem;
}

.blog-grid-row .blog-design-grid .hovered-social-icons {
    display: none;
}

.blog-grid-row .blog-design-grid .post-img-wrapp {
    position: relative;
    padding-top: 66.49%;
    /* 258/388 */
    overflow: hidden;
}

.blog-grid-row .blog-design-grid .post-img-wrapp a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.blog-grid-row .blog-design-grid .post-img-wrapp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Home page WP Bakery Post Grid: date badge ── */
/* Match the Woodmart blog date badge (.woodmart-post-date) style */
.od-home-blog-grid-item .od-home-blog-post-date {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    min-width: 53px;
    background-color: #FFF;
    box-shadow: 0 0 9px rgba(0, 0, 0, 0.1);
    color: #333;
    text-align: center;
    line-height: 1;
    padding: 0;
}

.od-home-blog-grid-item .od-home-blog-post-date .post-date-day {
    display: block;
    padding-top: 6px;
    padding-bottom: 4px;
    font-size: 24px;
}

.od-home-blog-grid-item .od-home-blog-post-date .post-date-month {
    display: block;
    padding-top: 2px;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 600;
    font-size: 12px;
}

/* ── Blog listing: center pagination ── */
.d-blog-main-wrapper + .blog-footer {
    width: 100%;
    margin-top: 2em;
}

/* ── Single post: Return to Blog Home link ── */
.return-to-blog {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #888;
    text-decoration: none;
    text-align: left;
}
.return-to-blog:hover {
    color: #333;
    text-decoration: underline;
}

/* ── Blog listing: search bar + per-page dropdown row ── */
.d-blog-search-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 1.5em;
    padding-left: 0;
    padding-right: 0;
}

.d-blog-search-group {
    flex: 1;
    min-width: 0;
}

/* Bootstrap input-group component CSS is not loaded on this site,
   so we provide the flex layout for the search input + button inline. */
.d-blog-search-row .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.d-blog-search-row .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    height: 44px;
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.2s;
}

.d-blog-search-row .input-group .form-control:focus {
    border-color: #008000;
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.1);
}

.d-blog-search-row .input-group .input-group-append {
    display: flex;
}

/* Search button — site primary green, clean design */
.d-blog-search-row .input-group .input-group-append .btn {
    white-space: nowrap;
    height: 44px;
    padding: 0 16px;
    background-color: #008000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid #008000;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.d-blog-search-row .input-group .input-group-append .btn:hover {
    background-color: #006a00;
    border-color: #006a00;
}

.d-blog-per-page-group {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.d-blog-per-page-group label {
    font-size: 14px;
    color: #555;
    margin-bottom: 0;
}

.d-blog-per-page-group select {
    height: 44px;
    min-width: 70px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.d-blog-per-page-group select:focus {
    border-color: #008000;
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.1);
}

@media (max-width: 767px) {
    .d-blog-search-row {
        flex-wrap: wrap;
    }
    .d-blog-search-group,
    .d-blog-per-page-group {
        width: 100%;
    }
}

/* ── Knowledge Base search: form + results list ── */
.d-kb-search-row {
    margin-bottom: 1.5em;
}

/* Bootstrap input-group component CSS is not loaded on this site,
   so we provide the flex layout for the search input + button inline. */
.d-kb-search-group .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.d-kb-search-group .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    box-sizing: border-box;
    height: 44px;
    padding: 8px 16px;
    font-size: 14px;
    /* Woodmart's global input[type=search] rule forces color:#FFF,
       background:transparent, border:2px, border-radius:0 — override here. */
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.d-kb-search-group .input-group .form-control:focus {
    border-color: #008000;
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.1);
}

.d-kb-search-group .input-group .input-group-append {
    display: flex;
}

.d-kb-search-group .input-group .input-group-append .btn {
    white-space: nowrap;
    height: 44px;
    padding: 0 22px;
    background-color: #008000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid #008000;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.d-kb-search-group .input-group .input-group-append .btn:hover,
.d-kb-search-group .input-group .input-group-append .btn:focus {
    background-color: #006a00;
    border-color: #006a00;
    outline: none;
}

/* Results list */
.d-kb-search-summary {
    margin: 0 0 1em;
    color: #555;
    font-size: 14px;
}

.d-kb-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.d-kb-result {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.d-kb-result:last-child {
    border-bottom: 0;
}

.d-kb-result-breadcrumb {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.d-kb-result-breadcrumb a {
    color: #777;
}

.d-kb-result-title {
    font-size: 18px;
    margin: 0 0 6px;
}

.d-kb-result-title a {
    color: #004c11;
}

.d-kb-result-title a:hover {
    color: #008000;
}

.d-kb-result-excerpt {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.d-kb-result mark {
    background: #fff2a8;
    padding: 0 2px;
    color: inherit;
}

/* No-results state */
.d-kb-no-results {
    padding: 30px 0;
    margin-bottom: 40px;
    color: #555;
}

/* Breathing room between the results list and the Contact Us form below
   when there's no pagination (single page of results). */
.d-kb-results {
    margin-bottom: 40px;
}

/* Pagination */
.d-kb-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0 40px;
}

.d-kb-pagination a,
.d-kb-pagination span {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.d-kb-pagination a:hover {
    background: #f4f4f4;
}

.d-kb-pagination a:focus {
    outline: none;
    border-color: #008000;
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.2);
}

.d-kb-pagination .current {
    background: #008000;
    color: #fff;
    border-color: #008000;
}

.d-kb-pagination span.d-kb-pagination-ellipsis {
    border: 0;
    background: transparent;
    cursor: default;
}

@media (max-width: 767px) {
    /* Horizontal page padding. Woodmart's stripped-down Bootstrap omits
       padding on .col-md-* columns, so content in .d-main-content hugs
       the viewport edge on narrow screens. Restore 15px gutters here. */
    .d-main-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Search button: tighter padding so the input has more room */
    .d-kb-search-group .input-group .input-group-append .btn {
        padding: 0 14px;
    }

    /* Result summary: slightly smaller, tighter */
    .d-kb-search-summary {
        font-size: 13px;
        margin-bottom: 0.75em;
    }

    /* Result rows: a bit less vertical padding, keep dividers */
    .d-kb-result {
        padding: 14px 0;
    }

    /* Title scales down — long titles still wrap cleanly on narrow screens */
    .d-kb-result-title {
        font-size: 16px;
        line-height: 1.35;
    }

    /* Breadcrumb: hide the uppercase/letterspacing treatment on mobile
       where horizontal room is tight; still show the path so the user
       knows which section a result belongs to. */
    .d-kb-result-breadcrumb {
        letter-spacing: 0;
        font-size: 11px;
    }

    /* Pagination: bigger tap targets (≥44px tall) */
    .d-kb-pagination {
        gap: 8px;
        margin-bottom: 30px;
    }
    .d-kb-pagination a,
    .d-kb-pagination span {
        padding: 10px 14px;
        min-width: 44px;
        min-height: 44px;
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Checkout order summary shipping method list
 * -------------------------------------------
 * Layout: reset list/label spacing and size so everything aligns with the
 * surrounding order summary rows.
 * Styling: real calculated rates render bold + green (theme accent). The
 * "preferred courier" fallback instances render as plain body text to match
 * WooCommerce's native "no shipping options available" styling — they are
 * not a calculated rate, just an instruction to the customer. */
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li label,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li .amount {
    font-size: inherit;
    line-height: inherit;
    text-align: inherit;
    margin: 0;
    padding: 0;
}

.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li {
    margin-bottom: 6px;
}

.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:last-child {
    margin-bottom: 0;
}

/* Default: available/calculated rates shown bold + green */
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li label,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li .amount {
    color: #008000;
    font-weight: 700;
}

/* "Preferred courier" fallback instances (8, 9, 17): render as plain body
 * text, consistent with the "no shipping options" default appearance. */
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:8"]) label,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:9"]) label,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:17"]) label,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:8"]) .amount,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:9"]) .amount,
.woocommerce-checkout .woocommerce-shipping-totals ul#shipping_method li:has(input[value="free_shipping:17"]) .amount {
    color: inherit;
    font-weight: normal;
}
