/*
Theme Name: SwissDelight Child
Theme URI: https://swissdelight.qodeinteractive.com
Description: A child theme of SwissDelight
Author: Elated Themes
Author URI: https://qodeinteractive.com
Version: 1.0.0
Text Domain: swissdelight
Template: swissdelight
*/






/* =========================================================
   PRODUCT SEARCH PAGE — HEADER OVERLAP FIX
   Covers searches with products and searches with no products.
   ========================================================= */

/* Reset any inherited page offset */
body.search.search-results #qodef-page-outer,
body.search.search-no-results #qodef-page-outer {
    position: relative !important;
    top: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    transform: none !important;
}

/* Desktop and laptop */
@media only screen and (min-width: 1025px) {

    body.search.search-results #qodef-page-inner,
    body.search.search-no-results #qodef-page-inner {
        padding-top: 36px !important;
    }

    /* No-product message */
    body.search.search-no-results .woocommerce-info,
    body.search.search-no-results .woocommerce-no-products-found {
        margin-top: 0 !important;
        margin-bottom: 30px !important;
    }
}

/* Tablet and mobile */
@media only screen and (max-width: 1024px) {

    body.search.search-results #qodef-page-inner,
    body.search.search-no-results #qodef-page-inner {
        padding-top: 24px !important;
    }

    body.search.search-no-results .woocommerce-info,
    body.search.search-no-results .woocommerce-no-products-found {
        margin-top: 0 !important;
        margin-bottom: 24px !important;
    }
}

/* =========================================================
   DAVID BRADLEY CATEGORY GRID
   RESPONSIVE EQUAL CARD HEIGHT FIX

   Applies to:
   - Home Shop Chocolate
   - Home Gift Ideas
   - Shop Chocolate
   - Occasions
   - Gift Ideas

   Desktop styling is untouched.
   ========================================================= */

@media only screen and (max-width: 1024px) {

    /* =====================================================
       GRID CONTAINERS

       Make every grid item stretch inside its row.
       ===================================================== */

    .elementor-element-911eeb6 > .e-con-inner,
    .elementor-element-dd27877 > .e-con-inner,
    .elementor-element-b8d3b3f > .e-con-inner,
    .elementor-element-41f8dfe > .e-con-inner,
    .elementor-element-98976fe > .e-con-inner {
        align-items: stretch !important;
    }


    /* =====================================================
       ELEMENTOR IMAGE WIDGET
       ===================================================== */

    .elementor-element-911eeb6 > .e-con-inner > .elementor-widget-image,
    .elementor-element-dd27877 > .e-con-inner > .elementor-widget-image,
    .elementor-element-b8d3b3f > .e-con-inner > .elementor-widget-image,
    .elementor-element-41f8dfe > .e-con-inner > .elementor-widget-image,
    .elementor-element-98976fe > .e-con-inner > .elementor-widget-image {
        width: 100% !important;

        align-self: stretch !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }


    /* =====================================================
       WIDGET CONTAINER
       ===================================================== */

    .elementor-element-911eeb6 .elementor-widget-image .elementor-widget-container,
    .elementor-element-dd27877 .elementor-widget-image .elementor-widget-container,
    .elementor-element-b8d3b3f .elementor-widget-image .elementor-widget-container,
    .elementor-element-41f8dfe .elementor-widget-image .elementor-widget-container,
    .elementor-element-98976fe .elementor-widget-image .elementor-widget-container {
        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }


    /* =====================================================
       CARD

       IMPORTANT:
       Do not use height:100%.

       The card itself now has exactly:
       Row 1 = image
       Row 2 = caption

       This prevents a wrapped title from changing the
       overall card height.
       ===================================================== */

    .elementor-element-911eeb6 figure.wp-caption,
    .elementor-element-dd27877 figure.wp-caption,
    .elementor-element-b8d3b3f figure.wp-caption,
    .elementor-element-41f8dfe figure.wp-caption,
    .elementor-element-98976fe figure.wp-caption {
        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows:
            auto
            82px !important;

        align-content: start !important;

        box-sizing: border-box !important;

        overflow: hidden !important;
    }


    /* =====================================================
       IMAGE WRAPPER

       Equal image ratio regardless of source image dimensions.
       ===================================================== */

    .elementor-element-911eeb6 figure.wp-caption > a,
    .elementor-element-dd27877 figure.wp-caption > a,
    .elementor-element-b8d3b3f figure.wp-caption > a,
    .elementor-element-41f8dfe figure.wp-caption > a,
    .elementor-element-98976fe figure.wp-caption > a {
        width: 100% !important;

        aspect-ratio: 3 / 2 !important;

        display: block !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;

        box-sizing: border-box !important;
    }


    /* =====================================================
       IMAGE
       ===================================================== */

    .elementor-element-911eeb6 figure.wp-caption > a img,
    .elementor-element-dd27877 figure.wp-caption > a img,
    .elementor-element-b8d3b3f figure.wp-caption > a img,
    .elementor-element-41f8dfe figure.wp-caption > a img,
    .elementor-element-98976fe figure.wp-caption > a img {
        width: 100% !important;
        height: 100% !important;

        min-width: 100% !important;
        min-height: 100% !important;

        display: block !important;

        margin: 0 !important;
        padding: 0 !important;

        object-fit: cover !important;
        object-position: center center !important;

        box-sizing: border-box !important;
    }


    /* =====================================================
       CAPTION AREA

       Fixed grid row = 82px.

       Both:
       Barks

       and:
       Buttercreams & Soft
       centers

       occupy the SAME caption height.
       ===================================================== */

    .elementor-element-911eeb6 .widget-image-caption,
    .elementor-element-dd27877 .widget-image-caption,
    .elementor-element-b8d3b3f .widget-image-caption,
    .elementor-element-41f8dfe .widget-image-caption,
    .elementor-element-98976fe .widget-image-caption {
        width: 100% !important;

        height: 82px !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;
        padding: 9px 10px 8px !important;

        display: flex !important;
        flex-direction: column !important;

        align-items: center !important;
        justify-content: center !important;

        gap: 0 !important;

        text-align: center !important;

        line-height: 1.2 !important;

        box-sizing: border-box !important;

        overflow: hidden !important;
    }


    /* =====================================================
       GOLD UNDERLINE

       Always stays underneath the category title.
       ===================================================== */

    .elementor-element-911eeb6 .widget-image-caption::after,
    .elementor-element-dd27877 .widget-image-caption::after,
    .elementor-element-b8d3b3f .widget-image-caption::after,
    .elementor-element-41f8dfe .widget-image-caption::after,
    .elementor-element-98976fe .widget-image-caption::after {
        content: "" !important;

        position: static !important;

        display: block !important;

        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;

        height: 2px !important;
        min-height: 2px !important;
        max-height: 2px !important;

        margin: 9px auto 0 !important;
        padding: 0 !important;

        flex: 0 0 2px !important;

        transform: none !important;
    }
}


/* =========================================================
   SMALL MOBILE

   Slightly smaller caption block because the cards
   themselves become narrower.
   ========================================================= */

@media only screen and (max-width: 600px) {

    .elementor-element-911eeb6 figure.wp-caption,
    .elementor-element-dd27877 figure.wp-caption,
    .elementor-element-b8d3b3f figure.wp-caption,
    .elementor-element-41f8dfe figure.wp-caption,
    .elementor-element-98976fe figure.wp-caption {
        grid-template-rows:
            auto
            76px !important;
    }

    .elementor-element-911eeb6 .widget-image-caption,
    .elementor-element-dd27877 .widget-image-caption,
    .elementor-element-b8d3b3f .widget-image-caption,
    .elementor-element-41f8dfe .widget-image-caption,
    .elementor-element-98976fe .widget-image-caption {
        height: 76px !important;

        padding: 8px 8px 7px !important;

        line-height: 1.18 !important;
    }

    .elementor-element-911eeb6 .widget-image-caption::after,
    .elementor-element-dd27877 .widget-image-caption::after,
    .elementor-element-b8d3b3f .widget-image-caption::after,
    .elementor-element-41f8dfe .widget-image-caption::after,
    .elementor-element-98976fe .widget-image-caption::after {
        margin-top: 7px !important;
    }
}

/* =========================================================
   DAVID BRADLEY - CART PAGE FOOTER SPACING
   Adds space after Cart Totals / Proceed to Checkout
   ========================================================= */

body.woocommerce-cart .cart-collaterals {
    margin-bottom: 70px !important;
    padding-bottom: 0 !important;
}


/* Fallback for SwissDelight / WooCommerce layouts */
body.woocommerce-cart .cart_totals {
    margin-bottom: 70px !important;
}


/* Make sure checkout area does not collapse the spacing */
body.woocommerce-cart .wc-proceed-to-checkout {
    margin-bottom: 0 !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media only screen and (max-width: 1024px) {

    body.woocommerce-cart .cart-collaterals,
    body.woocommerce-cart .cart_totals {
        margin-bottom: 50px !important;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media only screen and (max-width: 767px) {

    body.woocommerce-cart .cart-collaterals,
    body.woocommerce-cart .cart_totals {
        margin-bottom: 35px !important;
    }
}








/* DAVID BRADLEY HOME BANNER - SHOW FULL IMAGE WITHOUT CROPPING */
.elementor-element-c29b2c7 .qodef-qi-image-slider,
.elementor-element-c29b2c7 .swiper,
.elementor-element-c29b2c7 .swiper-wrapper,
.elementor-element-c29b2c7 .swiper-slide,
.elementor-element-c29b2c7 .qodef-e-inner,
.elementor-element-c29b2c7 .qodef-e-inner-holder,
.elementor-element-c29b2c7 .qodef-e-inner-holder > a{
    height:500px!important;
}

.elementor-element-c29b2c7 .qodef-e-inner-holder{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:#fff!important;
}

.elementor-element-c29b2c7 .qodef-e-inner-holder > a{
    width:100%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}

.elementor-element-c29b2c7 .qodef-e-inner-holder img{
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    display:block!important;
}






















