/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Child theme for Blocksy to control compositions (patterns) and keep the front-end clean and maintainable.
Author: Local
Template: blocksy
Text Domain: blocksy-child
*/

/* ------------------------------------------------------------
   HEADER ADJUSTMENTS
------------------------------------------------------------ */

/* Header height for 2-column layout */
#header [data-column-set="2"] > div {
    height: 70px;
}

/* Vertically center header title */
.gspb_row #gspb_col-id-gsbp-aec53b2.gspb_row__col--6 {
    justify-content: center;
}

/* Fix image scaling inside header */
#gspb_image-id-gspb-408287b img {
    height: auto !important;
    max-height: none !important;
}

/* Block button hover state */
.wp-block-button__link:hover {
    background-color: var(--theme-button-background-hover-color) !important;
}

/* Limit hero row height */
.gspb_row-id-gsbp-0852d9b {
    max-height: 600px;
}

/* Nudges Greenshift columns upward */
div[id^=gspb_col-id] {
    top: -3%;
}

/* ------------------------------------------------------------
   FOOTER ADJUSTMENTS
------------------------------------------------------------ */

/* Move footer logo upward */
#footer #block-91 img {
    transform: translateY(-50%);
    position: relative;
}

/* Correct footer big image size */
#footer #block-91 img.wp-image-1668 {
    width: 800px !important;
    height: auto !important;
    max-width: none !important;
}

/* Footer column vertical alignment */
.ct-footer [data-column] {
    top: 16%;
}

/* Reduce spacing in middle footer row */
[data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
    --container-spacing: 10px;
}

/* Remove margin from Legal widget in footer */
footer [data-column="widget-area-5"] #nav_menu-5, #nav_menu-6, #nav_menu-3 {
    margin-top: 2px !important;
}

/* Footer heading margin */
footer .gspb_heading {
    margin-bottom: 5px !important;
}

/* Footer menu first item styling */
footer .menu > li:first-child > a {
    font-weight: 700;
    font-family: Ribeye, Sans-Serif;
    text-transform: none;
    font-size: 16px;
    pointer-events: none;
}

/* Underline footer menu links on hover */
.ct-footer [data-id="menu"] > ul > li > a:hover,
.ct-footer [data-id="menu-secondary"] > ul > li > a:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   SPECIAL SECTION BACKGROUNDS & HERO IMAGES
------------------------------------------------------------ */

/* Allow Greenshift sections to overflow correctly */
section.wp-block-greenshift-blocks-row {
    position: relative;
    overflow: visible;
}

/* Hero image layering */
#gspb-image-id-gspb-40828b7 {
    position: relative;
    z-index: 1;
}

/* Absolute-positioned dinosaure image */
.id-dinos {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 800px;
    pointer-events: none;
}

/* Stack icon box content predictably */
.gspb_iconBox {
    display: block !important;
}

/* Underline Greenshift text links on hover */
.gspb_text a:hover {
    text-decoration: underline !important;
}

/* Greenshift row with flex layout */
.gspb_row-id-gsbp-f410560 .gspb_row__content {
    display: flex;
}

/* Offset several column images inside Greenshift rows */
#gspb_col-id-gsbp-bb558f6,
#gspb_col-id-gsbp-ff83ab7,
#gspb_col-id-gsbp-3383517 img {
    position: relative;
    transform: translateY(-35%);
}

#gspb_col-id-gsbp-608ff91 {
    overflow: visible !important;
    position: relative !important;
}

.gspb_image-id-gsbp-73c16fd img {
    position: absolute !important;
    bottom: -250px !important;
    right: 20px !important;
    z-index: 50 !important;
    pointer-events: none;
}

/* ------------------------------------------------------------
   SIDEBAR & WIDGETS
------------------------------------------------------------ */

/* Sidebar widget spacing */
.ct-sidebar .ct-widget:not(:last-child) {
    margin-bottom: var(--sidebar-widgets-spacing, 20px);
}

/* Widget menu styling */
.widget-menu {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 400;
}

/* Widget menu list items spacing */
.widget-menu li {
    margin-bottom: 10px;
}

/* Underline widget menu items on hover */
.widget-menu .menu-item:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   WOOCOMMERCE – GENERAL
------------------------------------------------------------ */

/* Center WooCommerce store notice */
.woocommerce-store-notice {
    text-align: center;
}

/* ------------------------------------------------------------
   WOOCOMMERCE – PRODUCT CARD LAYOUT
------------------------------------------------------------ */

.woocommerce-loop-product__title {
    margin-top: 20px;
}

[data-products=type-2] .ct-woo-card-actions .button {
    width: auto !important;
    min-width: 100px !important;
    flex: 0 0 auto !important;
}

/* Adjust spacing inside product card footer */
.ct-woo-card-actions {
    padding: 10px 20px 5px;
}

/* Make product content align top-left */
[data-products=type-2] .product {
    align-items: flex-start;
}

/* Remove border from card actions */
[data-products=type-2] .ct-woo-card-actions {
    border: none;
}

/* Global spacing between elements inside cards */
[data-products] .product > * {
    margin-bottom: 5px;
}

/* Style Add to Cart button */
[data-products=type-2] .ct-woo-card-actions .button,
[data-products=type-2] .ct-woo-card-actions .added_to_cart {
    background-color: #92B341;
    border-radius: 30px;
    color: #ffffff;
    min-height: 40px !important;
    padding: 0 20px;
    font-size: 16px;
}

/* Price aligned to the left */
[data-products=type-2] .ct-woo-card-actions .price {
    justify-content: flex-start;
}

/* Force product title to be full width and left-aligned */
[data-products] .product .woocommerce-loop-product__title {
    width: 100%;
    text-align: left;
}

/* Increase horizontal space between card columns */
ul.products.columns-3[data-products="type-2"]:first-of-type {
    --grid-columns-gap: 80px !important;
}

/* Remove default Woo "separator" between price and button */
[data-products=type-2] .ct-woo-card-actions .price:not(:only-child):after {
    display: none;
}

/* Hover state for Add to Cart button */
[data-products=type-2] .ct-woo-card-actions .button:hover,
[data-products=type-2] .ct-woo-card-actions .added_to_cart:hover {
    background-color: var(--theme-button-background-hover-color);
    color: #ffffff;
}

/* ------------------------------------------------------------
   GOODIES – IMAGE CENTERING
------------------------------------------------------------ */

/* Fix image container dimensions and center goodies thumbnail */
.product_cat-goodies .ct-media-container {
    width: 150px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    padding-top: 30px !important;
    padding-bottom: 20px !important;
    box-sizing: content-box !important;
}

/* Prevent goodies images from overflowing */
.product_cat-goodies .ct-media-container img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* ------------------------------------------------------------
   PRODUCT SHORT DESCRIPTION
------------------------------------------------------------ */

/* Style for WooCommerce short description inside product cards */
.products .product .entry-excerpt p {
    color: #B6C590 !important;
    font-size: 15px;
    font-weight: 400;
    text-align: left !important;
}

/* Short green separator line above the price + button area */

.products[class*="columns-"] .ct-woo-card-actions {
    border-top: none !important;
    position: relative;
    margin-top: 5px !important;
}

/* Base pseudo element */
.products[class*="columns-"] .ct-woo-card-actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 1px;
    background-color: #92B341;
    border-radius: 2px;
}

/* Width depending on columns */
.products.columns-2 .ct-woo-card-actions::before { width: 70%; }
.products.columns-3 .ct-woo-card-actions::before { width: 90%; }
.products.columns-4 .ct-woo-card-actions::before { width: 90%; }
.products.columns-5 .ct-woo-card-actions::before { width: 80%; }

.products .product {
    position: relative;
}

.products .product .entry-excerpt {
    min-height: 28px !important;
    display: flex;
    align-items: center;
}

.products .product:not(:has(.entry-excerpt)) .woocommerce-loop-product__title {
    margin-bottom: 28px !important;
}

/* ------------------------------------------------------------
   FAVORITE BLOCK
------------------------------------------------------------ */

.wp-block-post-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;   
    height: 3.2em;
    margin-bottom: 15px !important;
    text-align: center;
}

.wc-block-components-product-price {
    margin-top: auto !important;
}

.wc-block-product-template .wc-block-product {
    border: 1px solid #92B341 !important;
    border-radius: 24px !important;
    padding: 10px;
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
}

.woocommerce-Price-amount, .amount {
    font-size: 18px;
    font-weight: 500;
}

.wc-block-product-template .wp-block-button__link {
    font-size: 16px !important;
}

.wc-block-components-product-button__button, .wc-block-components-product-button__button {
    padding: 0 20px;
}

/* Structure générale des cartes */
ul.products li.product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ========================= */
/* LIVRES (avec description) */
/* ========================= */

/* Titre limité à 2 lignes uniquement pour les produits
   qui ne sont PAS dans la catégorie goodies */
ul.products li.product:not(.product_cat-goodies) .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

/* Description limitée à 2 lignes */
ul.products li.product .entry-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

/* ========================= */
/* GOODIES (plus naturel) */
/* ========================= */

/* Pas de hauteur forcée pour les goodies */
ul.products li.product.product_cat-goodies .woocommerce-loop-product__title {
    min-height: auto;
}

/* ========================= */
/* Bouton toujours aligné */
/* ========================= */

ul.products li.product .ct-woo-card-actions {
    margin-top: auto;
}

/* ------------------------------------------------------------
   SINGLE PRODUCT PAGE
------------------------------------------------------------ */

/* Colors for buttons in floating footer */
.ct-floating-bar {
    --theme-button-background-initial-color: red !important;
    --theme-button-background-color: red !important;
    --theme-palette-color-6: red !important;
}

.ct-floating-bar button.single_add_to_cart_button {
    background: #92B341;
}

/* Hover color */
.ct-floating-bar .button:hover,
.ct-floating-bar .ct-ajax-add-to-cart .button:hover {
    background-color: #1A3F1E;
    border-color: #7c9b32;
}

/* Change color of button for quantity +/- */
.ct-floating-bar .quantity[data-type="type-1"] .ct-increase,
.ct-floating-bar .quantity[data-type="type-1"] .ct-decrease {
    background-color: #92B341;
    border-color: #7c9b32;
}

.ct-floating-bar .quantity[data-type="type-1"] input[type="number"] {
    border-color: #92B341;
}

/* Cart basket buttons */
#woo-cart-panel .woocommerce-mini-cart__buttons .button {
    background-color: #92B341 !important;
    border-color: #92B341 !important;
    color: #fff !important;
}

/* Hover */
#woo-cart-panel .woocommerce-mini-cart__buttons .button:hover {
    background-color: #1A3F1E !important;
    border-color: #1A3F1E !important;
}

/* ------------------------------------------------------------
   Product page quantity buttons (+/-)
   Match floating bar green style
------------------------------------------------------------ */

/* Base style for increment/decrement buttons */
.single-product .quantity[data-type="type-1"] .ct-increase,
.single-product .quantity[data-type="type-1"] .ct-decrease {
    background-color: #92B341 !important;
    border-color: #92B341 !important;
    color: #fff !important;
}

/* Hover state */
.single-product .quantity[data-type="type-1"] .ct-increase:hover,
.single-product .quantity[data-type="type-1"] .ct-decrease:hover {
    background-color: #1A3F1E !important;
    border-color: #1A3F1E !important;
}

/* Match border of the number input field */
.single-product .quantity[data-type="type-1"] input[type="number"] {
    border-color: #92B341 !important;
}

/* ------------------------------------------------------------
   Suggested products "Add to Cart" button
   Inside the offcanvas mini-cart (green)
------------------------------------------------------------ */

#woo-cart-panel .ct-suggested-products--mini-cart .button,
#woo-cart-panel .ct-suggested-products--mini-cart .add_to_cart_button {
    background-color: #92B341 !important;
    border-color: #92B341 !important;
    color: #fff !important;
}

/* Hover effect */
#woo-cart-panel .ct-suggested-products--mini-cart .button:hover,
#woo-cart-panel .ct-suggested-products--mini-cart .add_to_cart_button:hover {
    background-color: #1A3F1E !important;
    border-color: #1A3F1E !important;
}

/* ------------------------------------------------------------
   LANGUAGE SWITCHER
------------------------------------------------------------ */

/* Base button style */
div[data-id="language-switcher"] a {
    background-color: #92B341 !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Hover state for language switcher links */
div[data-id="language-switcher"] a:hover {
    background-color: #1A3F1E !important;
}

/* Active language pill shape */
.ct-language-switcher[data-type="dropdown"] .ct-language.ct-active-language {
    background-color: #92B341;
    border-radius: 999px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Text inside language button */
.ct-language-switcher[data-type="dropdown"] .ct-language.ct-active-language .ct-label {
    color: #ffffff;
    font-weight: 600;
}

/* White arrow icon */
.ct-language-switcher[data-type="dropdown"] .ct-dropdown-icon {
    fill: #ffffff;
}

/* Dropdown repositioning */
.ct-language-switcher[data-type="dropdown"] ul[data-placement] {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    top: calc(100% + 6px) !important;
}

/* Tighter spacing between dropdown items */
div[data-id="language-switcher"] ul li {
    margin-bottom: 2px;
}

/* ------------------------------------------------------------
   BLOC CONTENT TITLE
------------------------------------------------------------ */

.title-highlight {
    position: relative;
    padding: 0.2em 0.5em;
    z-index: 1;
}

.title-highlight {
    background-image: url("/app/uploads/2025/10/paint-effect.svg");
    background-repeat: no-repeat;
    background-size: contain;
    padding-bottom: 10px;
}

h2.ct-module-title {
    background-image: url("/app/uploads/2025/10/paint-effect.svg");
    background-repeat: no-repeat;
    background-size: contain;
    padding-bottom: 10px;
}

.gspb_row #gspb_col-id-gsbp-608ff91.gspb_row__col--6 {
    overflow: visible !important;
}
.gspb_row #gspb_col-id-gsbp-36e149e.gspb_row__col--6{
    overflow: visible !important;
}

/* ------------------------------------------------------------
   MOBILE & TABLET ADJUSTMENTS
------------------------------------------------------------ */

@media (max-width: 1024px) {

    /* Reset footer vertical offsets on tablet/mobile */
    .ct-footer [data-column] {
        top: 0;
    }

    /* Restore visible spacing in the footer middle row */
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] .ct-container {
        --container-spacing: 24px !important;
        --widgets-gap: 24px !important;
        row-gap: 24px !important;
    }

    /* Keep Greenshift columns in normal flow on smaller screens */
    div[id^=gspb_col-id] {
        top: 0;
    }

    /* Let tall blocks expand naturally */
    .gspb_row-id-gsbp-0852d9b {
        max-height: none;
    }

    /* Prevent decorative image from overlapping the next section */
    .gspb_image-id-gsbp-73c16fd img {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        display: block;
        margin: 20px auto 0;
    }

    /* Add breathing room between stacked sections and columns */
    .wp-block-greenshift-blocks-row {
        margin-bottom: 24px;
    }

    .gspb_row .gspb_row__content {
        row-gap: 24px;
    }

    /* Footer image scaling on smaller screens */
    #footer #block-91 img.wp-image-1668 {
        margin-top: 20%;
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
    }

    /* Dino image scaling on smaller screens */
    .id-dinos {
        width: 300px !important;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .wp-block-post-title {
        height: auto !important;
        min-height: 0 !important;
    }

    .wc-block-product-template .wc-block-product {
        padding-bottom: 20px !important;
    }
    .wc-block-product-template__responsive.columns-5  {
        grid-template-columns: 1fr !important;
    }

    .wc-block-product-template__responsive > li:last-child {
        margin-block-end: var(--theme-content-spacing) !important;
        margin-bottom: var(--theme-content-spacing) !important;
    }
}
/* ------------------------------------------------------------
   BACK IN STOCK NOTIFIER (plugin back-in-stock-notifier-for-woocommerce)
   Align the subscribe panel with the site palette
------------------------------------------------------------ */

.cwginstock-panel-heading {
    background-color: #1A3F1E !important;
    border-color: #1A3F1E !important;
    color: #fff !important;
}

.cwginstock-panel-primary {
    border-color: #1A3F1E !important;
}

.cwginstock-panel-body input[type="text"],
.cwginstock-panel-body input[type="email"] {
    border-radius: 8px;
    border-color: #B6C590;
}

.cwgstock_button,
.cwg_popup_submit {
    background-color: #1A3F1E !important;
    border-color: #1A3F1E !important;
    color: #fff !important;
    border-radius: 30px;
}

.cwgstock_button:hover,
.cwg_popup_submit:hover {
    background-color: #143017 !important;
    border-color: #143017 !important;
}
