/*
 * Theme Name: Melanin & Magnolias
 * Version: 2.0
 * Description: Custom wordpress theme configured for sites made with Site Builder by Corporate Tools
 * Author: Melanin & Magnolias
 */

/**
 * Custom Styling for the FluentForm Submission Button
 */
form.fluent_form_3 .wpf_has_custom_css.ff-btn-submit {
    background-color: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--background) !important;
    border-color: var(--wp--preset--color--primary) !important;
    transition: filter 0.2s ease !important;
}

form.fluent_form_3 .wpf_has_custom_css.ff-btn-submit:hover {
    filter: brightness(1.1) !important;
}

/*
 * When clicking links, make the scrolling behavior smooth to improve the user experience.
 */
html {
    scroll-behavior: smooth;
}

.wp-block-site-title a:hover {
    opacity: 80%;
}

.wp-block-navigation-item {
    color: var(--wp--preset--color--text);
}

.wp-block-navigation-item:hover {
    opacity: 80%;
}

.wp-block-button:hover {
    opacity: 80%;
}

/*
Get rid of the padding above/below the blocks wrapper,
which was leaving whitespace above/below the header/footer
*/
.wp-site-blocks {
    padding: 0;
}

/*
Get rid of the default margin-top around all of the outer blocks (example: hero section after header),
changing here instead of theme.json so that global blockGap is not changed for inner blocks and elements
 */
:where(.wp-site-blocks)>* {
    margin-block-start: 0;
}

/*
Adjust positioning of the "details" block summary when it is an H4
 */
summary h4 {
    display: inline;
    margin-left: 10px;
}

.header-block {
    position: relative;
    z-index: 1;
    border-bottom: 2px solid;
}

/*
Hide an info box/block from the frontend of the site (like the info box on the contact page block pattern.
 */
.hide-from-site-frontend {
    display: none;
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
    outline-width: 2px;
    outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
    margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
    outline-offset: 4px;
}

/* Keep the desktop header navigation on a single row. */
@media screen and (min-width: 783px) {
    .site-header .wp-block-navigation__container {
        flex-wrap: nowrap !important;
        white-space: nowrap;
        gap: clamp(0.85rem, 1.6vw, 1.5rem);
    }

    .site-header .wp-block-navigation-item {
        flex: 0 0 auto;
    }

    .site-header .wp-block-navigation-item__label {
        white-space: nowrap;
    }
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
    text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
    display: block;
}

/*
 * Fix website header to always show at top of page and have colors from the theme
 */
.site-header {
    position: fixed;
    width: 100%;
    background-color: var(--wp--preset--color--background);
    z-index: 1000;
    border-bottom: 1px solid;
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.1),
        0 1px 2px -1px rgb(0 0 0 / 0.1);
    /* Add a bottom box shadow to the header block */
}

.site-header img {
    height: auto;
    width: calc(var(--wp--preset--spacing--40) * 2);
}

/* Adjust for admin bar on desktop */
.admin-bar .site-header {
    top: 32px !important;
    /* WordPress admin bar height on desktop */
}

/* Adjust for admin bar on mobile devices */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px !important;
        /* WordPress admin bar height on mobile */
    }
}

/* For very small screens where WP removes the admin bar */
@media screen and (max-width: 600px) {
    .admin-bar .site-header {
        top: 0 !important;
    }
}

/*
 * Make the separator between the footer and content, not so thick
 */
.wp-block-separator {
    border: none !important;
    border-top: 1px solid !important;
}

#products .wp-block-column {
    transition: scale 0.15s ease-in-out;
}

#products .wp-block-column:hover {
    scale: 105%;
}

/*Fix overflow of some unsplash images in certain browsers  */
img {
    width: 100%;
}

.footer-contact-columns .wp-block-group {
    text-align: center;
}

.footer-contact-columns {
    align-items: center;
}

/*
 * Melanin & Magnolias — WooCommerce storefront
 * Keeps Shop, product, Cart, and Checkout pages aligned with the existing
 * plum / green / gold / ivory site system.
 */
.woocommerce-page main,
.woocommerce-shop main,
.single-product main {
    padding-top: clamp(7rem, 10vw, 9rem);
    padding-bottom: clamp(3rem, 7vw, 6rem);
}

.woocommerce-page .wp-block-post-title,
.woocommerce-shop .wp-block-query-title,
.single-product .wp-block-post-title {
    color: var(--wp--preset--color--primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.woocommerce-page .woocommerce-breadcrumb,
.woocommerce-shop .woocommerce-breadcrumb,
.single-product .woocommerce-breadcrumb {
    color: var(--wp--preset--color--paragraph-text);
    font-size: 0.875rem;
}

.woocommerce-page .woocommerce-breadcrumb a,
.woocommerce-shop .woocommerce-breadcrumb a,
.single-product .woocommerce-breadcrumb a {
    color: var(--wp--preset--color--primary);
}

.wc-block-product-template,
.wc-block-grid__products {
    gap: clamp(1.25rem, 3vw, 2.25rem);
}

.wc-block-product,
.wc-block-grid__product {
    background: var(--wp--preset--color--background);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 18%, transparent);
    border-radius: 14px;
    overflow: hidden;
    padding-bottom: 1.25rem;
    box-shadow: 0 12px 34px rgb(0 0 0 / 0.07);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.wc-block-product:hover,
.wc-block-grid__product:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgb(0 0 0 / 0.11);
}

.wc-block-components-product-image img,
.woocommerce-product-gallery img {
    border-radius: 10px;
}

.wc-block-components-product-title,
.wc-block-grid__product-title,
.woocommerce-loop-product__title,
.single-product .product_title {
    color: var(--wp--preset--color--primary);
    font-weight: 700;
}

.wc-block-components-product-price,
.wc-block-grid__product-price,
.woocommerce-Price-amount {
    color: var(--wp--preset--color--secondary);
    font-weight: 700;
}

.wp-element-button,
.wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.single_add_to_cart_button {
    background: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--background) !important;
    border: 1px solid var(--wp--preset--color--primary) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    transition: transform 160ms ease, filter 160ms ease !important;
}

.wp-element-button:hover,
.wc-block-components-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.single_add_to_cart_button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.wc-block-cart,
.wc-block-checkout,
.woocommerce-MyAccount-content,
.woocommerce-MyAccount-navigation {
    background: color-mix(in srgb, var(--wp--preset--color--background) 92%, white);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 16%, transparent);
    border-radius: 16px;
    box-shadow: 0 14px 38px rgb(0 0 0 / 0.06);
}

.wc-block-cart,
.wc-block-checkout {
    padding: clamp(1rem, 3vw, 2rem);
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 24%, transparent);
    border-radius: 10px;
}

.wc-block-components-text-input input:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus,
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--primary) 15%, transparent);
    outline: none;
}

.wc-block-components-sale-badge,
.onsale {
    background: var(--wp--preset--color--accent) !important;
    color: var(--wp--preset--color--primary) !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
}

.wc-block-components-order-summary,
.wc-block-components-totals-wrapper {
    border-color: color-mix(in srgb, var(--wp--preset--color--primary) 15%, transparent) !important;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.wc-block-components-notice-banner {
    background: color-mix(in srgb, var(--wp--preset--color--background) 94%, white) !important;
    border-color: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--primary) !important;
}

@media screen and (max-width: 782px) {
    .woocommerce-page main,
    .woocommerce-shop main,
    .single-product main {
        padding-top: 6.5rem;
    }

    .wc-block-cart,
    .wc-block-checkout {
        padding: 1rem;
        border-radius: 12px;
    }
}

.mm-store-shell {
    min-height: 55vh;
}

.mm-shop-shell .woocommerce,
.mm-product-shell .woocommerce {
    width: 100%;
}

.mm-shop-shell ul.products li.product {
    overflow: hidden;
    background: var(--wp--preset--color--background);
    border-radius: 12px;
    padding: 0 0 30px;
    box-shadow: var(--wp--preset--shadow--natural);
}

.mm-shop-shell ul.products li.product img {
    margin-bottom: 24px;
    border-radius: 12px 12px 0 0;
}

.mm-shop-shell ul.products li.product .woocommerce-loop-product__title {
    margin: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
    color: var(--wp--preset--color--primary);
    text-align: center;
    font-weight: 700;
    line-height: 1.6;
}

.mm-shop-shell ul.products li.product .price {
    margin-inline: var(--wp--preset--spacing--50);
    color: var(--wp--preset--color--paragraph-text);
    text-align: center;
}

.mm-shop-shell ul.products li.product .button {
    display: table;
    margin: 1rem auto 0;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background);
    border-radius: 5px;
}

.mm-product-shell .product {
    background: var(--wp--preset--color--background);
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: var(--wp--preset--shadow--natural);
}

.mm-product-shell .product .product_title,
.mm-cart-shell .wp-block-post-title {
    color: var(--wp--preset--color--primary);
    font-weight: 700;
    line-height: 1.6;
}

.mm-product-shell .product .price,
.mm-product-shell .product .woocommerce-product-details__short-description {
    color: var(--wp--preset--color--paragraph-text);
}

.mm-product-shell .product .single_add_to_cart_button,
.mm-cart-shell .wc-block-cart__submit-button,
.mm-checkout-shell .wc-block-components-checkout-place-order-button {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background);
    border-radius: 5px;
}
