/*
 * Theme Name:  Worktops & Doors Child
 * Description: Child theme for Worktops & Doors. Built on the Divi parent theme.
 *              All site-specific CSS, navigation, and customisation lives here.
 *              Never edit the Divi parent theme directly.
 * Template:    Divi
 * Version:1.0.142
 * License:     GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: worktopsanddoors-child
 */

/*
 * No @import of parent styles needed here.
 * Divi enqueues its own stylesheet; the child stylesheet is enqueued
 * after it via functions.php.
 *
 * Add any global overrides or utility rules below.
 */

/* =========================
   SPEC TABLE
   ========================= */
.wtd-spec-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    font-size: 14px !important;
}

.wtd-spec-table thead tr {
    background: #263540 !important;
    color: #ffffff !important;
}

.wtd-spec-table thead th {
    padding: 12px 16px !important;
    text-align: left !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
}

.wtd-spec-table tbody tr {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.wtd-spec-table tbody tr:nth-child(even) {
    background: #f7f7f7 !important;
}

.wtd-spec-table tbody td {
    padding: 11px 16px !important;
    color: #263540 !important;
    vertical-align: top !important;
}

.wtd-spec-table tbody td:first-child {
    font-weight: 600 !important;
    width: 40% !important;
    color: #263540 !important;
}

/* =========================
   WOOCOMMERCE ATTRIBUTES TABLE
   ========================= */
table.shop_attributes {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
}

table.shop_attributes tr {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

table.shop_attributes tr:nth-child(even) {
    background: #f7f7f7 !important;
}

table.shop_attributes th {
    padding: 11px 16px !important;
    font-weight: 600 !important;
    color: #263540 !important;
    width: 40% !important;
    text-align: left !important;
    background: transparent !important;
}

table.shop_attributes td {
    padding: 11px 16px !important;
    color: #657a8d !important;
    background: transparent !important;
}

/* -----------------------------------------------------------------------
 * Hide Divi's legacy header when the new nav is active.
 * body.wtd-nav-active is added by wtd_nav_body_class() in functions.php.
 * --------------------------------------------------------------------- */

body.wtd-nav-active #main-header,
body.wtd-nav-active #top-header {
    display: none !important;
}

/* CLS fix — Divi's fixed-nav JS applies padding-top to #page-container equal
 * to header height. Our nav does not use the Divi header, so no offset needed. */
body.wtd-nav-active #page-container,
body.wtd-nav-active .et_fixed_nav #page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* CLS — reserve full nav bar height before navigation-v2.js renders.
   Bar: padding 30px top/bottom + links min-height 66px = 126px total.
   Without this the sticky nav grows from ~59px (Loading…) to ~126px causing layout shift. */
.wtd-nav {
    min-height: 126px;
}

/* CLS — prevent Divi's JS page-container padding recalculation from propagating
   into inner content when our nav replaces the Divi header. */
body.wtd-nav-active .et_builder_inner_content {
    contain: layout;
}

/* CLS — prevent Montserrat FOUT reflow from propagating outside hero text section */
body.home .et_pb_section_2 {
    contain: layout style;
}

/* CLS — reserve space for the 562x562 product image to prevent layout shift */
.wp-image-5004 {
    width: 562px;
    height: 562px;
}

/* CLS — reserve explicit dimensions for JS-injected nav logo (299x112 native, 167x62 rendered) */
.wtd-nav__brand-logo {
    width: 167px;
    height: 62px;
    max-height: 62px;
}

/* Checkout — hide shipping methods and order-summary shipping line until
   the customer enters a valid postcode. Body class added/removed by
   checkout-postcode-checker.js. */
body.wtd-checkout-no-postcode .wp-block-woocommerce-checkout-shipping-methods-block,
body.wtd-checkout-no-postcode .wc-block-checkout__shipping-method {
    display: none !important;
}
body.wtd-checkout-no-postcode .wp-block-woocommerce-checkout-order-summary-shipping-block {
    display: none !important;
}

/* =========================
   MOBILE PRODUCT GRID — 2 COLUMNS
   ========================= */

@media (max-width: 767px) {
    /* 2-column grid */
    body #main-content .col-mob-1 ul.products.loop-grid {
        grid-template-columns: repeat(2, minmax(10px, 1fr)) !important;
    }

    /* Card gap */
    .divi-filter-loop-container ul.products.loop-grid {
        gap: 12px !important;
    }

    /* Meta — centre align, consistent min-height */
    .dmach-grid-item .et_pb_db_meta {
        text-align: center !important;
        min-height: 44px !important;
        height: auto !important;
        font-size: 10px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Title — centre align, allow full text wrap, consistent min-height.
       No flex: justify-content:center on a flex row shrinks .et_pb_module_inner
       to intrinsic width, preventing text from wrapping on narrow cards. */
    .dmach-grid-item .et_pb_db_product_title {
        font-size: 11px !important;
        line-height: 1.3 !important;
        height: auto !important;
        min-height: 66px !important;
        text-align: center !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Target the h1 directly — Divi inline CSS sets 18px on the title module,
       needs specificity to override it */
    .dmach-grid-item .et_pb_db_product_title h1,
    .dmach-grid-item .et_pb_db_product_title h2,
    .dmach-grid-item .et_pb_db_product_title h3,
    .dmach-grid-item .et_pb_db_product_title .et_pb_module_inner {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    /* Ensure the inner wrapper fills full card width so text wraps correctly */
    .dmach-grid-item .et_pb_db_meta .et_pb_module_inner,
    .dmach-grid-item .et_pb_db_product_title .et_pb_module_inner {
        width: 100% !important;
    }

    /* Price — centre align, label and value on separate lines */
    .dmach-grid-item .et_pb_db_price {
        text-align: center !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        min-height: 44px !important;
    }

    .dmach-grid-item .bc-price-before {
        display: block !important;
        text-align: center !important;
    }

    /* Button — centre text, full width, no wrapping.
       Needs #page-container .et_pb_section in selector to beat Divi's inline
       padding:15px 30px !important from the loop layout module settings. */
    body #page-container .et_pb_section .dmach-grid-item .et_pb_db_shop_button .et_pb_button,
    body #page-container .et_pb_section .dmach-grid-item .dbc_view_product {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        font-size: 11px !important;
        padding: 10px 6px !important;
        letter-spacing: 0.5px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Button wrapper — contain within card column */
    .dmach-grid-item .et_pb_db_shop_button {
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-bottom: 8px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* =========================
   ADVICE ARTICLES — CLEAN LAYOUT
   ========================= */

/* Hide post meta — author, date, categories, tags */
.single-post .post-meta,
.single-post .entry-meta,
.single-post .et_post_meta_wrapper .post-meta,
.single-post span.published,
.single-post span.author,
.single-post .et-single-post-meta,
.single-post .et_pb_extra_postinfo,
.single-post .et_post_meta_wrapper > a,
.single-post .post-meta-author,
.single-post .post-meta-date,
.single-post .post-categories,
.single-post .post-tags {
    display: none !important;
}

/* Hide comments section */
.single-post #comments,
.single-post .comments-area,
.single-post #respond,
.single-post .comment-respond {
    display: none !important;
}

/* H1 bold */
.single-post .entry-title,
.single-post h1.entry-title {
    font-weight: 800 !important;
}

/* Advice sidebar */
.single-post #sidebar .widget_custom_html ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-post #sidebar .widget_custom_html ul li {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0 !important;
}

.single-post #sidebar .widget_custom_html ul li a {
    color: #263540 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.single-post #sidebar .widget_custom_html ul li a:hover {
    color: #567434 !important;
}

/* =========================
   CONTACT PAGE
   ========================= */

.page-id-242730 .entry-content h2 {
    color: #263540 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    margin-top: 32px !important;
}

.page-id-242730 .entry-content ul {
    list-style: none !important;
    padding: 0 !important;
}

.page-id-242730 .entry-content ul li {
    padding: 8px 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    font-size: 15px !important;
}

.page-id-242730 .entry-content a {
    color: #567434 !important;
}

.page-id-242730 .entry-content input,
.page-id-242730 .entry-content textarea {
    width: 100% !important;
    max-width: 600px !important;
    padding: 12px !important;
    border: 1px solid #96b0c0 !important;
    border-radius: 4px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
    display: block !important;
}

.page-id-242730 .entry-content input[type="submit"],
.page-id-242730 .entry-content button[type="submit"] {
    background: #263540 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    width: auto !important;
    max-width: none !important;
}

.page-id-242730 .entry-content input[type="submit"]:hover,
.page-id-242730 .entry-content button[type="submit"]:hover {
    background: #567434 !important;
}

.page-id-242730 .entry-content label {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #263540 !important;
    display: block !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* =========================
   WOOCOMMERCE NOTICES
   ========================= */

.woocommerce-message,
.wc-block-components-notice-banner.is-success,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-page .woocommerce-message {
    background: #263540 !important;
    border-top: 3px solid #567434 !important;
    border-left: none !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 16px 24px !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-page .woocommerce-message a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-message::before {
    color: #567434 !important;
}

.woocommerce-message .button,
.woocommerce-notices-wrapper .woocommerce-message .button,
.woocommerce-page .woocommerce-message .button {
    background: #567434 !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    float: right !important;
    margin-top: -4px !important;
    border-radius: 0 !important;
}

/* =========================
   PRODUCT PAGE HEADER
   ========================= */

/* Header section background — Divi TB section 0 */
.single-product .et_pb_section_0_tb_body {
    background-color: #f7f8f9 !important;
    padding: 20px 0 !important;
    box-shadow: none !important;
}

/*
 * Reorder breadcrumbs above the title inside section 0.
 * The TB layout shortcode places et_pb_text (dynamic title) first,
 * then et_pb_db_breadcrumbs. Flex + order reverses that visually.
 */
.single-product .et_pb_section_0_tb_body .et_pb_column_0_tb_body {
    display: flex !important;
    flex-direction: column !important;
}

.single-product .et_pb_db_breadcrumbs_0_tb_body {
    order: -1 !important;
}

/* Breadcrumbs — higher specificity than Divi TB inline styles */
.single-product .et_pb_db_breadcrumbs_0_tb_body .woocommerce-breadcrumb {
    font-size: 11px !important;
    color: #657a8d !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.single-product .et_pb_db_breadcrumbs_0_tb_body .woocommerce-breadcrumb a {
    color: #657a8d !important;
    text-decoration: none !important;
}

.single-product .et_pb_db_breadcrumbs_0_tb_body .woocommerce-breadcrumb a:hover {
    color: #567434 !important;
}

/*
 * Section 0 title — TB layout uses et_pb_text (dynamic post_title),
 * not et_pb_wc_title. Target the text inner wrapper and its paragraph.
 */
.single-product .et_pb_text_0_tb_body .et_pb_text_inner,
.single-product .et_pb_text_0_tb_body .et_pb_text_inner p {
    color: #263540 !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.2 !important;
    margin-bottom: 0 !important;
}

/* WC title module (section 1, the purchase panel — actual product <h1>) */
.single-product .et_pb_wc_title_0_tb_body h1 {
    color: #263540 !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif !important;
    margin-bottom: 8px !important;
}

/* =========================
   CATEGORY INTRO TEXT
   ========================= */

.wtd-category-intro {
    max-width: 760px !important;
    margin: 24px auto 24px !important;
    padding: 0 40px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #657a8d !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    text-align: center !important;
    display: block !important;
}

@media (max-width: 767px) {
    .wtd-category-intro {
        padding: 24px 20px !important;
        font-size: 14px !important;
    }
}

/* =========================
   CATEGORY INTRO — LAMINATE & SOLID WOOD ONLY
   Scoped to page IDs 238902 and 239319. Do not apply elsewhere.
   ========================= */

.page-id-238902 .wtd-category-intro,
.page-id-239319 .wtd-category-intro {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 50px 40px !important;
    text-align: left !important;
}

.page-id-238902 .wtd-category-intro h1,
.page-id-239319 .wtd-category-intro h1 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 32px !important;
    line-height: 1.2 !important;
    color: #263540 !important;
    text-align: left !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.page-id-238902 .wtd-category-intro p,
.page-id-239319 .wtd-category-intro p {
    text-align: left !important;
}

@media (max-width: 980px) {
    .page-id-238902 .wtd-category-intro,
    .page-id-239319 .wtd-category-intro {
        padding: 40px 30px !important;
    }
}

@media (max-width: 767px) {
    .page-id-238902 .wtd-category-intro,
    .page-id-239319 .wtd-category-intro {
        padding: 30px 20px !important;
    }

    .page-id-238902 .wtd-category-intro h1,
    .page-id-239319 .wtd-category-intro h1 {
        font-size: 24px !important;
    }
}

/* =============================================================
   SEARCH RESULTS PAGE
   ============================================================= */

/* Page title */
.search-results .woocommerce-products-header__title {
    color: #263540 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-transform: none !important;
}

/* Result count + ordering row */
.search-results .woocommerce-result-count {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    color: #657a8d !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 0 !important;
}

.search-results .woocommerce-ordering select {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    color: #263540 !important;
    border-color: #d0d8de !important;
    border-radius: 3px !important;
}

/* Product grid — 3 columns (sidebar takes ~1/3 width on this layout) */
.search-results ul.products.columns-3,
.search-results ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    float: none !important;
    width: 100% !important;
}

/* WooCommerce injects clearfix ::before/::after on ul.products for float layouts.
   In CSS Grid these become real grid items and consume cells, causing a blank
   offset in position 1. Suppress them so products fill the grid cleanly. */
.search-results ul.products::before,
.search-results ul.products::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 980px) {
    .search-results ul.products.columns-3,
    .search-results ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .search-results ul.products.columns-3,
    .search-results ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* Product card */
.search-results ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e0e6ea !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    text-align: center !important;
    transition: box-shadow 0.2s !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: auto !important;
}

.search-results ul.products li.product:hover {
    box-shadow: 0 4px 16px rgba(38, 53, 64, 0.12) !important;
    border-color: #c1d0d9 !important;
}

/* Product image */
.search-results ul.products li.product .et_shop_image {
    display: block !important;
    overflow: hidden !important;
    height: 180px !important;
    position: relative !important;
}

.search-results ul.products li.product .et_shop_image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s !important;
}

.search-results ul.products li.product:hover .et_shop_image img {
    transform: scale(1.03) !important;
}

/* Remove Divi overlay tint on search results */
.search-results ul.products li.product .et_overlay {
    display: none !important;
}

/* Product title */
.search-results ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    padding: 10px 10px 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

/* Price */
.search-results ul.products li.product .price {
    color: #567434 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 2px 10px 10px !important;
    display: block !important;
    margin: 0 !important;
}

/* "Select options" / "Add to basket" button (simple products) */
.search-results ul.products li.product .button {
    display: block !important;
    background: #263540 !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 10px !important;
    width: calc(100% - 20px) !important;
    margin: 0 10px 10px !important;
    border-radius: 2px !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    text-align: center !important;
}

.search-results ul.products li.product .button:hover {
    background: #567434 !important;
}

/* Card link — make whole card clickable without extra padding */
.search-results ul.products li.product .woocommerce-LoopProduct-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

/* WooCommerce info banner (no-results fallback text) */
.search-results .woocommerce-info {
    border-top: 3px solid #567434 !important;
    background: #f7f9fa !important;
    color: #263540 !important;
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 0 !important;
}

/* ---- No-results block ---- */
.wtd-no-results {
    text-align: center !important;
    padding: 40px 20px !important;
    font-family: 'Montserrat', sans-serif !important;
    color: #263540 !important;
}

.wtd-no-results p {
    font-size: 16px !important;
    margin-bottom: 16px !important;
    color: #657a8d !important;
}

.wtd-no-results strong {
    color: #263540 !important;
}

.wtd-no-results .button {
    display: inline-block !important;
    background: #263540 !important;
    color: #ffffff !important;
    padding: 12px 22px !important;
    margin: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    text-decoration: none !important;
    border-radius: 2px !important;
    transition: background 0.2s !important;
    width: auto !important;
}

.wtd-no-results .button:hover {
    background: #567434 !important;
}

/* ---- Pagination ---- */
.search-results .woocommerce-pagination {
    width: 100% !important;
    text-align: center !important;
    margin-top: 32px !important;
    clear: both !important;
}

.search-results .woocommerce-pagination ul.page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.search-results .woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
}

.search-results .woocommerce-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border: 1px solid #d0d8de !important;
    border-radius: 3px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #263540 !important;
    text-decoration: none !important;
    background: #ffffff !important;
    transition: background 0.15s, border-color 0.15s !important;
}

.search-results .woocommerce-pagination .page-numbers:hover {
    background: #f0f4f6 !important;
    border-color: #96b0c0 !important;
}

.search-results .woocommerce-pagination .page-numbers.current {
    background: #263540 !important;
    border-color: #263540 !important;
    color: #ffffff !important;
}

.search-results .woocommerce-pagination .page-numbers.next,
.search-results .woocommerce-pagination .page-numbers.prev {
    font-size: 16px !important;
}

/* =========================
   ADVICE HUB PAGE — CARD GRID
   ========================= */

.wtd-advice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 40px 0;
}

.wtd-advice-card {
    background: #ffffff;
    border: 1px solid #e5eaee;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.wtd-advice-card:hover {
    box-shadow: 0 4px 20px rgba(38, 53, 64, 0.12);
}

.wtd-advice-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

.wtd-advice-card__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.wtd-advice-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wtd-advice-card__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    line-height: 1.35 !important;
    margin: 0 0 10px !important;
}

.wtd-advice-card__excerpt {
    font-size: 14px !important;
    color: #657a8d !important;
    line-height: 1.6 !important;
    margin: 0 0 16px !important;
    flex: 1;
}

.wtd-advice-card__cta {
    font-size: 13px;
    font-weight: 700;
    color: #567434;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wtd-advice-card:hover .wtd-advice-card__cta {
    text-decoration: underline;
}

/* Advice hub intro */
.wtd-advice-intro {
    font-size: 17px;
    line-height: 1.7;
    color: #263540;
    max-width: 680px;
    margin-bottom: 8px;
}

@media (max-width: 980px) {
    .wtd-advice-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .wtd-advice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================
   ACCESSORIES HUB
   ========================= */
.wtd-hub-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    max-width: 1080px !important;
    margin: 40px auto !important;
    padding: 0 30px !important;
}
@media (max-width: 980px) {
    .wtd-hub-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 767px) {
    .wtd-hub-grid { grid-template-columns: 1fr !important; padding: 0 20px !important; }
}
.wtd-hub-card {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    padding: 28px !important;
    transition: box-shadow 0.2s !important;
}
.wtd-hub-card:hover {
    box-shadow: 0 4px 16px rgba(38,53,64,0.1) !important;
}
.wtd-hub-card h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    margin-bottom: 10px !important;
}
.wtd-hub-card h2 a {
    color: #263540 !important;
    text-decoration: none !important;
}
.wtd-hub-card p {
    color: #657a8d !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}
.wtd-hub-card .button {
    background: #263540 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background 0.2s !important;
}
.wtd-hub-card .button:hover {
    background: #567434 !important;
}

/* =========================
   FREE SAMPLE BUTTON
   ========================= */
.wtd-sample-wrap {
    margin: 10px 0 20px !important;
}
.wtd-sample-btn {
    display: inline-block !important;
    background: transparent !important;
    color: #263540 !important;
    border: 2px solid #263540 !important;
    padding: 12px 28px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    width: auto !important;
    line-height: 1 !important;
}
.wtd-sample-btn:hover:not(:disabled) {
    background: #263540 !important;
    color: #ffffff !important;
}
.wtd-sample-btn.wtd-sample-added {
    background: #567434 !important;
    border-color: #567434 !important;
    color: #ffffff !important;
}
.wtd-sample-btn.wtd-sample-limit {
    background: #c0c0c0 !important;
    border-color: #c0c0c0 !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
}
.wtd-sample-counter {
    display: none;
    margin-top: 8px !important;
    font-size: 13px !important;
    color: #657a8d !important;
}

/* =========================
   BASKET & CHECKOUT STYLING
   ========================= */

/* Table headers */
.woocommerce-cart table.cart thead th,
.woocommerce-checkout table.shop_table thead th {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #263540 !important;
    border-bottom: 2px solid #263540 !important;
}

/* Cart product name */
.woocommerce-cart table.cart td.product-name a,
.woocommerce-cart table.cart td.product-name {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    color: #263540 !important;
    font-size: 14px !important;
}

/* Cart totals heading */
.woocommerce-cart .cart_totals h2,
.woocommerce-cart .cross-sells h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 20px !important;
}

/* Apply coupon button */
.woocommerce-cart .coupon .button,
.woocommerce button.button[name="apply_coupon"] {
    background: #263540 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 1px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 14px 28px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
.woocommerce-cart .coupon .button:hover,
.woocommerce button.button[name="apply_coupon"]:hover {
    background: #1a2630 !important;
}

/* Update basket button */
.woocommerce button.button[name="update_cart"] {
    background: transparent !important;
    color: #263540 !important;
    border: 2px solid #263540 !important;
    border-radius: 1px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 12px 28px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}
.woocommerce button.button[name="update_cart"]:hover {
    background: #263540 !important;
    color: #ffffff !important;
}

/* Proceed to checkout button */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce .wc-proceed-to-checkout .button {
    background: #263540 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 1px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 16px 30px !important;
    display: block !important;
    text-align: center !important;
    transition: background 0.2s !important;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #1a2630 !important;
    color: #ffffff !important;
}

/* Checkout headings */
.woocommerce-checkout h3,
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.wc-block-checkout__contact-fields > h2,
.wc-block-checkout__shipping-fields > h2,
.wc-block-checkout h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 16px !important;
}

/* Checkout input fields */
.woocommerce-checkout .input-text,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.wc-block-checkout input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.wc-block-checkout select,
.wc-block-checkout textarea {
    border: 1px solid #c5d0d8 !important;
    border-radius: 2px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: #263540 !important;
    padding: 12px 16px !important;
    width: 100% !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout input:focus,
.wc-block-checkout input:focus {
    border-color: #263540 !important;
    box-shadow: none !important;
}

/* Checkout labels */
.woocommerce-checkout label,
.wc-block-checkout label {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* Checkout checkboxes */
.woocommerce-checkout input[type="checkbox"],
.wc-block-checkout input[type="checkbox"] {
    accent-color: #263540 !important;
    width: 16px !important;
    height: 16px !important;
}

/* Fix: the generic ".wc-block-checkout label" rule above forces
   display:block, which collapses the WooCommerce Blocks checkbox's
   flex layout (input + SVG checkmark + text), causing the checkbox
   to overlap its label with no visible check state. Restore flex. */
.wc-block-checkout .wc-block-components-checkbox label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    cursor: pointer !important;
}
.wc-block-checkout .wc-block-components-checkbox__input {
    accent-color: #263540 !important;
    border-color: #263540 !important;
}
.wc-block-checkout .wc-block-components-checkbox__mark {
    fill: #263540 !important;
}

/* Add a note to your order — textarea */
.wc-block-checkout__add-note textarea {
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: #263540 !important;
    border: 1px solid #c5d0d8 !important;
    border-radius: 2px !important;
    padding: 12px 16px !important;
    box-shadow: none !important;
}
.wc-block-checkout__add-note textarea:focus {
    border-color: #263540 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Place Order button */
#place_order,
.wc-block-components-checkout-place-order-button,
.wc-block-checkout .wc-block-components-button {
    background: #263540 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 1px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 18px 30px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
#place_order:hover,
.wc-block-components-checkout-place-order-button:hover {
    background: #1a2630 !important;
}

/* Order summary sidebar */
.wc-block-order-summary__product-name,
.wc-block-components-order-summary__product-name {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    color: #263540 !important;
    font-size: 13px !important;
}

.wc-block-components-totals-item__label,
.wc-block-order-summary-totals__label {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #263540 !important;
}

/* Order total */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Coupon input in checkout */
.wc-block-components-totals-coupon__input input {
    border: 1px solid #c5d0d8 !important;
    border-radius: 2px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
}

.wc-block-components-totals-coupon__button,
.wc-block-components-button.wc-block-components-totals-coupon__button {
    background: #263540 !important;
    color: #ffffff !important;
    border-radius: 1px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Cart totals table */
.cart_totals table th {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #263540 !important;
}

.cart_totals table td {
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: #657a8d !important;
}

/* Calculate shipping link */
.woocommerce a.shipping-calculator-button {
    color: #263540 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Quantity input */
.woocommerce-cart .quantity input.qty {
    border: 1px solid #c5d0d8 !important;
    border-radius: 2px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: #263540 !important;
    text-align: center !important;
    padding: 8px !important;
}

/* =========================
   DELIVERY STRAPLINE BAR
   ========================= */
.wtd-strapline {
    background: #263540 !important;
    color: #ffffff !important;
    width: 100% !important;
    padding: 7px 0 !important;
    overflow: hidden !important;
}
.wtd-strapline__inner {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 16px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.wtd-strapline__inner::-webkit-scrollbar {
    display: none !important;
}
.wtd-strapline__item {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
@media (min-width: 768px) {
    .wtd-strapline__inner {
        justify-content: center !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        gap: 24px !important;
        padding: 0 30px !important;
    }
    .wtd-strapline__item {
        font-size: 11px !important;
    }
}

/* =========================
   HOMEPAGE TRUST BAR
   ========================= */
.wtd-trust-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 16px !important;
    padding: 4px 0 !important;
}
/* An odd item count (5) leaves one item stranded alone on the left of the
   last row — span it across both columns so it's centred instead. */
.wtd-trust-bar__item:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
}
.wtd-trust-bar__item {
    text-align: center !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    color: #263540 !important;
    line-height: 1.4 !important;
    padding: 4px !important;
}
.wtd-trust-bar__item strong {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #263540 !important;
    margin-bottom: 2px !important;
}
@media (min-width: 768px) {
    .wtd-trust-bar {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 16px !important;
    }
    .wtd-trust-bar__item:last-child:nth-child(odd) {
        grid-column: auto !important;
    }
    .wtd-trust-bar__item {
        font-size: 12px !important;
    }
    .wtd-trust-bar__item strong {
        font-size: 13px !important;
    }
}

/* =========================
   BASKET COUNT BADGE
   ========================= */
.wtd-nav__basket-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #c8a882 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: 'Montserrat', sans-serif !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 9px !important;
    padding: 0 5px !important;
    margin-left: 5px !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}
.wtd-nav__basket-count[data-count="0"] {
    display: none !important;
}

/* -----------------------------------------------------------------------
 * Door product variation selector.
 *
 * The global Variation Buttons CSS hides .variations select off-screen and
 * hides the labels, on the assumption that JS will draw button replacements.
 * That JS does not run for door products (see wtd_door_product_body_class in
 * functions.php), so doors are left with no selector.
 *
 * These rules are scoped to .wtd-door-product, which is only ever added to a
 * single product page in the kitchen-doors category. Higher specificity than
 * the global rules, so they win regardless of stylesheet order. Nothing here
 * can affect worktops or any other product.
 * --------------------------------------------------------------------- */
/* -----------------------------------------------------------------------
 * Door dropdown: cancel the uppercase transform.
 *
 * The Divi Theme Builder's WooCommerce Add-to-Cart module emits inline CSS
 *   .et_pb_wc_add_to_cart_0_tb_body select { text-transform: uppercase !important }
 * which renders "1245 × 297MM". That is a module design setting shared with
 * worktops, so it is overridden here rather than changed at source. Scoped to
 * .wtd-door-product and higher specificity than Divi's rule, so worktop
 * dropdowns keep their uppercase styling exactly as before.
 * --------------------------------------------------------------------- */
body.wtd-door-product .et_pb_wc_add_to_cart_0_tb_body select,
body.wtd-door-product .variations select,
body.wtd-door-product .variations option {
    text-transform: none !important;
}

body.wtd-door-product .variations select {
    position: static !important;
    left: auto !important;
    visibility: visible !important;
    display: block !important;
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    color: #263540;
    font-size: 15px;
}
body.wtd-door-product table.variations th.label,
body.wtd-door-product table.variations td.label,
body.wtd-door-product .variations label {
    display: table-cell !important;
    color: #263540;
    font-weight: 700;
}
body.wtd-door-product table.variations th.label,
body.wtd-door-product table.variations td.label {
    padding: 10px 12px 10px 0;
    vertical-align: middle;
}
body.wtd-door-product table.variations td.value {
    padding: 10px 0;
}
/* the buttons wrapper never renders for doors, but guard against it
   appearing alongside the selects if the AJAX threshold is ever raised */
body.wtd-door-product .wd-variation-buttons {
    display: none !important;
}
