/*
 Theme Name:   Kiosko Child
 Theme URI:    https://wordpress.org/themes/kiosko/
 Description:  Child theme for Kiosko
 Author:       Jonny Jonster
 Author URI:   https://yourwebsite.com
 Template:     kiosko
 Version:      1.0.0
*/

/*
Jonny styling added for
*/

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    flex: 1;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

header {
    background-color: #E7E7E5;
}


/* Logo */
:root :where(.wp-block-site-title) {
    text-transform: none!important;
}

main {
    min-height: 50vh;
}

/* Lets get rid of the width restraints */
.is-layout-constrained > .alignwide {
    max-width: 1600px;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1600px;
}

.is-layout-constrained .entry-content p {
    max-width: 800px;
}

/* Home page specific */
.home .is-layout-constrained .entry-content{
    margin-top: 0;
}

.home .wp-block-post-title {display: none;}

/* products in columns on the home page */
.bpm-woocommerce-categories {
    display: none!important;
}

.bpm-woocommerce-categories.is-layout-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column, 8 rows */
    gap: 1rem;
}

/* Tablet: 2 columns, 4 rows */
@media (min-width: 640px) {
    .bpm-woocommerce-categories.is-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 columns, 2 rows */
@media (min-width: 1024px) {
    .bpm-woocommerce-categories.is-layout-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Optional: make images fill the category block */
.bpm-woocommerce-categories.is-layout-grid img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* or cover if you want cropping */
    display: block;
}

/* Optional: ensure all child blocks are equal height */
.bpm-woocommerce-categories.is-layout-grid > .wp-block-group {
    min-height: 250px; /* adjust as needed */
}

.woocommerce ul.products li.product {
    margin-bottom: 1rem !important;
}

.home ul.products li.product-category:nth-child(8) {
    display: none !important;
}

.home ul.products li.product-category:nth-child(9) {
    margin-right: 0;
}
.home .category-image-wrapper img {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

@media (max-width: 480px) {
    .home .woocommerce ul.products li.product,
    .home .woocommerce-page ul.products li.product {
        width: 100%;
        overflow: clip !important;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .home .woocommerce ul.products {
        display: block;
    }

    .home .woocommerce ul.products li.product,
    .home .woocommerce-page ul.products li.product {
        width: 48%;
        overflow: clip !important;
    }
}

@media (min-width: 769px) and (max-width: 960px) {
    .home .woocommerce ul.products li.product {
        overflow: clip !important;
    }

    .home .woocommerce ul.products li.product h2 {
        min-height: 100px;
        margin-bottom: 0;
    }
}

@media (min-width: 961px) {
    .home .woocommerce ul.products li.product {
        overflow: clip !important;
    }

    .home .woocommerce ul.products li.product h2 {
        min-height: 60px;
        margin-bottom: 0;
    }
}

/* Footer specific stuff */
.bpm-footer-content .wp-block-query.is-layout-flow.wp-block-query-is-layout-flow {
    width: 100%;
}

.bpm-footer-content .wp-block-post-template {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
}

.bpm-footer-content .wp-block-post-template .wp-block-post {
    margin-block-start: 0;
}

.bpm-footer-content .wp-block-post-template > * {
    flex: 0 0 100%;
}

@media (min-width: 768px) {
    .bpm-footer-content .wp-block-post-template > *:nth-child(4) {
        flex: 0 0 100%;
    }

    .bpm-footer-content .wp-block-post-template > *:nth-child(-n+3) {
        flex: 0 0 calc((100% - 2rem*2) / 3);
    }
}

@media (min-width: 1024px) {
    .bpm-footer-content .wp-block-post-template {
        flex-direction: row-reverse; // row-reverse layout
    flex-wrap: nowrap; // no wrapping
    }

    .bpm-footer-content .wp-block-post-template > *:nth-child(4) {
        flex: 0 0 calc(40% - 3 * 2rem / 4); // last child, 40%
    }

    .bpm-footer-content .wp-block-post-template > *:nth-child(-n+3) {
        flex: 0 0 calc(20% - 3 * 2rem / 4); // other 3 items, 20%
    }
}

/* ul within ul! (the footer menus) */
.bpm-footer-content ul .wp-block-navigation__container {
    align-items: flex-start;
    flex-direction: column;
    row-gap: .25rem;

}


.bpm-footer-content ul .wp-block-heading {
    text-transform: uppercase;
    font-size: 1.25rem;
}

.bpm-footer-content ul p {
    font-size: .875rem;
}

/* woocommerce product thumbnails in catalogue view all maintain height in a row */
.products-block-post-template .wp-block-post{
    display: flex;
    flex-direction: column;
    height: 100%;
}

.products-block-post-template .wc-block-components-product-image {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Bootstrap classes coz it's easier */
.d-none {
    display: none!important;
}

.lead {
    font-size: 1.5rem;
    line-height: 1.5;
}

.small {font-size: 0.875rem;}

.w-100 {width: 100%;}

.mx-auto {
    margin-right: auto;
    margin-left: auto;
}

.mt-0 {
    margin-top: 0!important;
    margin-block-start: 0!important;
}

.mt-6 {
    margin-top: 2rem!important;
}

.mb-4 {
    margin-bottom: 1rem!important;
}

.mb-5 {
    margin-bottom: 1.5rem!important;
}

.mb-7 {
    margin-bottom: 3rem!important;
}

.p-5 {
    padding: 1.25rem;
}

.rounded-sm {
    border-radius: 0.75rem;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.list-unstyled li {margin-bottom: .5rem;}

.bg-mishka {background-color: #d6dadf;}
.bg-light {
    background-color: #f4f4f4;
}
.bg-santas {background-color: #a2a2ac;}
.bg-grey {background-color: #E7E7E5;}
.bg-dark {background-color: #404040;}

.bg-dark p {margin-top: 0;}

.bg-dark p:last-child {margin-bottom: 0;}

.border {
    border: 2px solid #a2a2ac;
}

.text-white {color: #fff;}

/* Labels */
.form-label label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Inputs */
.form-control input,
.form-control select,
.form-control textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #444;
    background-color: #fff;

    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

.form-control input:focus,
.form-control select:focus
{
    border-color: #888;
}

/* Readonly field */
.form-control input[readonly] {
    opacity: 0.8;
}


/* Button */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-light {
    background-color: #f5f5f5;
    color: #000;
}

.btn-light:hover {
    background-color: #e0e0e0;
}

/* Bootstrap list-group  */
/* Base list reset
.wp-block-list {
    list-style: none;
    margin: 0;
    padding: 0;
}


.wp-block-list > li {
    background: #f2f2f2;
    border: 1px solid #d6d6d6;
    margin-bottom: 6px;
}


.wp-block-list > li > a {
    display: block;
    padding: 12px 14px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
}


.wp-block-list > li:hover {
    background: #e2e2e2;
}


.wp-block-list ul.wp-block-list {
    background: #fafafa;
    margin: 0;
    padding: 0;
}


.wp-block-list ul.wp-block-list > li {
    background: #ededed;
    border-top: 1px solid #dcdcdc;
    margin: 0;
}


.wp-block-list ul.wp-block-list > li > a {
    display: block;
    padding: 10px 16px;
    color: #111;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
}


.wp-block-list ul.wp-block-list > li:hover {
    background: #dddddd;
}
*/
/*
.is-layout-constrained .entry-content .notice {max-width: 800px;}
*/
.notice {
    max-width: 800px;
}

/* woocommerce product text width */
.product .wp-block-column p {
    max-width: 750px;
}

/* Related products row of images/text -ix the height  */
/* Fixes image container height and centers the image */
.wp-block-woocommerce-related-products .wc-block-components-product-image {
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    height: 200px;

}

.wp-block-woocommerce-related-products .wc-block-components-product-image img {
    max-height: 200px;
}

.product-category.product_cat-uncategorized {
    display: none;
}

/* Pagination */
.wp-block-query-pagination-numbers {display: flex; column-gap: .5rem;}
.wp-block-query-pagination-numbers .page-numbers {
    padding: .25rem;
    background-color: #fff;
}

/* Kiosko grid styling for products on home page */
.kiosko-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 1024px) {
    .kiosko-cat-grid {
        grid-template-columns: repeat(5, 1fr);
    }

}

.kiosko-cat-item {
    position: relative;
}

.kiosko-cat-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

.kiosko-cat-item:hover .kiosko-cat-image-wrap img {
    transform: scale(1.05);
}

.kiosko-cat-item h3 {
    font-size: 20px;
    text-align: center;
}

.home .kiosko-cat-item h3 {
    position: absolute;
    right: 0;
    bottom: 4rem;
    left: 0;
    margin: 2rem;
    margin-top: 8rem;
    padding: .5rem 1rem;
    text-align: center;
    font-size: 1.25rem;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.66);
}

@media (min-width: 1240px) {
    .home .kiosko-cat-item h3 {
        max-width: 280px;
        margin-right: auto;
        margin-left: auto;
    }
}

.kiosko-cat-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 17rem;
    box-sizing: border-box;
}

.kiosko-cat-image-wrap img {
    max-width: 100%;
    max-height: 15rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* mailchimp stuff */
.mc4wp-success {
    padding: 2px 12px;
    background-color: #1a6637;
    border-radius: 12px;
    color: #fff;

}