/**
* Theme Name: Autosoe Child
* Description: This is a child theme of Autosoe, generated by Merlin WP.
* Author: <a href="https://wpopal.com/">Opalthemes</a>
* Template: autosoe
* Version: 1.3.4
*/

/* Homepage "Nos Marques Partenaires" brand wall (autosoe-brand widget
   8e255c8). The 24 logo files have wildly different native sizes and
   aspect ratios (thin wordmarks vs tall square badges), and the widget
   renders them at natural size, so cells stretched unevenly and rows
   broke ragged. This forces every cell to one uniform box, centres the
   logo, and caps its dimensions so all 24 read at a consistent visual
   weight. Logos sit muted/greyscale and reveal full colour on hover,
   which also stops the clashing brand palettes fighting each other. */
.elementor-element-8e255c8 .grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    padding: 20px 24px;
    box-sizing: border-box;
    background: #fff;
    transition: background .25s ease;
}
.elementor-element-8e255c8 .elementor-brand-item,
.elementor-element-8e255c8 .elementor-brand-image,
.elementor-element-8e255c8 .elementor-brand-image a,
.elementor-element-8e255c8 .elementor-animation-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}
.elementor-element-8e255c8 .elementor-brand-image img {
    display: block;
    max-width: 100%;
    max-height: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .7;
    transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.elementor-element-8e255c8 .grid-item:hover {
    background: #fafafa;
}
.elementor-element-8e255c8 .grid-item:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.06);
}
/* The General Tire file is a white-on-transparent logo (meant for dark
   backgrounds) and vanishes on the white cell - render it dark instead.
   Kept dark on hover too, since "full colour" for this file is white. */
.elementor-element-8e255c8 .elementor-brand-image img[src*="brand-general-tire"],
.elementor-element-8e255c8 .grid-item:hover img[src*="brand-general-tire"] {
    filter: brightness(0) opacity(.72);
}
.elementor-element-8e255c8 .grid-item:hover img[src*="brand-general-tire"] {
    filter: brightness(0) opacity(1);
}
/* neutralise the demo theme's red hover glow on brand cells */
.elementor-element-8e255c8 .elementor-brand-item,
.elementor-element-8e255c8 .elementor-brand-item:hover {
    box-shadow: none !important;
}
@media (max-width: 767px) {
    .elementor-element-8e255c8 .grid-item {
        height: 92px;
        padding: 14px 16px;
    }
    .elementor-element-8e255c8 .elementor-brand-image img {
        max-height: 46px;
    }
}

/* Services mega-menu on mobile: the theme's .handheld-navigation panel
   (hamburger menu) already has a working tap-to-toggle button and
   slideToggle for submenus (nav-mobile.js), but the Services mega-menu
   content only ever gets injected into the desktop nav copy. A clone is
   inserted into the mobile copy on load (peh_clone_mobile_services_menu
   in functions.php); this just makes that cloned panel render as a
   normal static accordion section instead of the desktop hover-float
   positioning (which collapses to 0x0 outside a real :hover). */
@media (max-width: 1024px) {
    .handheld-navigation .mega-menu {
        display: none;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        top: auto !important;
    }
}

/* Services mega-menu: force each service thumbnail to a fixed square box.
   Elementor's container width/height settings weren't taking effect
   reliably in this widget context, so the size is controlled directly
   via this CSS class (set via the container's "css_classes" field)
   instead of Elementor's own size controls. */
.peh-mm-thumb {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    border-radius: 10px !important;
    overflow: hidden;
}

/* Services mega-menu: force a compact list width instead of the theme's
   "container width" mode (full nav-container width), which left huge
   empty margins now that the content is a single vertical column of
   rows rather than a 3-column grid. !important overrides the JS that
   sets width/left as inline styles on hover. */
#menu-item-7509 .mega-containerwidth {
    width: 380px !important;
    left: 0 !important;
    max-width: 90vw;
}
#menu-item-7509 .mega-menu-item > div[data-elementor-type] a {
    text-decoration: none;
    display: block;
}
#menu-item-7509 .mega-menu-item > div[data-elementor-type] a:hover .elementor-heading-title {
    color: var(--e-global-color-primary, #F5A302);
}

/* Uniform product thumbnail sizing: fixes inconsistent card heights caused by
   varying source-image aspect ratios, and centers every image in its box. */
.woocommerce ul.products li.product .product-image.image-main {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.woocommerce ul.products li.product .product-image.image-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Single-product gallery: show the full image, centered, with breathing
   room around it, WITHOUT touching the wrapper/slide container elements
   (.woocommerce-product-gallery__wrapper, .woocommerce-product-gallery__image).
   WooCommerce's FlexSlider treats those as the slide track and initializes
   on them (see initFlexslider() in single-product.js) whenever a product has
   more than one image — an earlier version of this fix forced display:flex
   and fixed dimensions on those exact elements, which broke FlexSlider's own
   slide-positioning math and stopped multi-image galleries from sliding.
   Scoping every change to the <img> itself avoids that entirely: FlexSlider
   keeps full control of the slide containers, sliding keeps working, and the
   image inside each slide still renders contained/centered/padded. */
.woocommerce-product-gallery__wrapper img.wp-post-image {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Tyre size search (Largeur / Hauteur / Diamètre) — styled to match the
   site's Elementor kit (elementor-kit-7): primary orange #F5A302, dark
   accent #2A2F35, border #DBDFE1, on a floating white card, replicating the
   look of the original hero search widget it replaces. */
.elementor-widget-shortcode .elementor-widget-container,
.elementor-shortcode {
    width: 100% !important;
}
.peh-tyre-size-search {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    background: var(--e-global-color-background, #ffffff);
    border-radius: 10px;
    padding: 16px 28px;
    margin: 0 0 20px;
    box-shadow: 0 12px 40px rgba(31, 34, 41, 0.12);
}
.peh-tyre-size-search form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}
.peh-tss-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 190px;
    flex: 1 1 0;
}
.peh-tss-field label {
    font-weight: 700;
    font-size: 14px;
    color: var(--e-global-color-accent, #2a2f35);
    display: flex;
    align-items: center;
    gap: 6px;
}
.peh-tss-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--e-global-color-text_light, #999999);
    cursor: help;
    transition: color 0.2s ease;
}
.peh-tss-info:hover {
    color: var(--e-global-color-primary, #f5a302);
}
.peh-tss-field select {
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 36px 9px 16px;
    border: 1px solid var(--e-global-color-border, #dbdfe1);
    border-radius: 8px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232A2F35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    font-size: 14px;
    color: var(--e-global-color-accent, #2a2f35);
    min-height: 38px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.peh-tss-field select:hover,
.peh-tss-field select:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #f5a302);
}
.peh-tss-submit {
    background: var(--e-global-color-primary, #f5a302);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 26px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 38px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}
.peh-tss-submit:hover {
    background: var(--e-global-color-primary_hover, #e79e0f);
    color: #ffffff;
}
.peh-tss-submit::after {
    content: "";
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 2px;
}
@media (max-width: 767px) {
    .peh-tyre-size-search {
        padding: 20px;
    }
    .peh-tyre-size-search form {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .peh-tss-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Newsletter signup (footer) — stored locally, replaces the old Mailchimp
   widget. Styled to match the same input+button pairing already used
   elsewhere on the site (rounded-left input, rounded-right orange button). */
.peh-newsletter-form {
    width: 100%;
}
.peh-nf-message {
    font-size: 14px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 6px;
}
.peh-nf-success {
    color: var(--e-global-color-success, #03cb79);
    background: rgba(3, 203, 121, 0.08);
}
.peh-nf-error {
    color: #d9534f;
    background: rgba(217, 83, 79, 0.08);
}
.peh-nf-row {
    display: flex;
    width: 100%;
}
.peh-nf-input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 20px;
    border: 1px solid var(--e-global-color-border, #dbdfe1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 15px;
    color: var(--e-global-color-accent, #2a2f35);
}
.peh-nf-input:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #f5a302);
}
.peh-nf-submit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--e-global-color-primary, #f5a302);
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 26px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.peh-nf-submit:hover {
    background: var(--e-global-color-primary_hover, #e79e0f);
}
.peh-nf-arrow {
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}
.peh-nf-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--e-global-color-text, #666666);
    cursor: pointer;
}
.peh-nf-checkbox input {
    margin-top: 3px;
    flex-shrink: 0;
}
.peh-nf-checkbox a {
    color: var(--e-global-color-text, #666666);
    text-decoration: underline;
}

/* BeRocket AJAX filters (shop sidebar). The plugin's default widget markup
   inherits the theme's 32px h3 and has no spacing, so align it with the
   theme's own sidebar widgets (18px titles, dark labels, 40px gaps) both in
   the desktop sidebar and in the mobile off-canvas "Filter" drawer. */
.widget-area .berocket_single_filter_widget { margin-bottom: 40px; }
.bapf_sfilter .bapf_head h3 { font-size: 18px !important; line-height: 1.3; margin-bottom: 14px; }
.bapf_sfilter.bapf_ckbox label { color: #2a2f35; }
.bapf_sfilter.bapf_ckbox label:hover { color: #f7a600; }
.autosoe-canvas-filter-wrap .berocket_single_filter_widget { padding: 0 20px; margin-bottom: 26px; }
.autosoe-canvas-filter-wrap .berocket_single_filter_widget:first-child { padding-top: 26px; }

/* Selected-filters area, hooked into the sorting bar (the theme's
   archive template never fires woocommerce_archive_description). Render
   it as a full-width row of removable chips above the sort controls. */
.autosoe-sorting > .bapf_sfilter { flex: 1 1 100%; width: 100%; order: -1; padding: 0 0 10px !important; margin: 0; border-bottom: 1px solid #ececec; margin-bottom: 10px; }
.autosoe-sorting > .bapf_sfilter .bapf_head { display: none; }
.autosoe-sorting .berocket_aapf_widget_selected_filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.autosoe-sorting .bapf_sfa_taxonomy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.autosoe-sorting .bapf_sfa_taxonomy > span { font-weight: 600; color: #2a2f35; margin-right: 2px; }
.autosoe-sorting .bapf_sfa_taxonomy ul, .autosoe-sorting .bapf_sfa_unall { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.autosoe-sorting .bapf_sfa_taxonomy li, .autosoe-sorting .bapf_sfa_unall li { margin: 0; }
.autosoe-sorting .braapf_unselect { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid #f7a600; border-radius: 999px; background: #fff7e6; color: #2a2f35; font-size: 14px; line-height: 20px; text-decoration: none; }
.autosoe-sorting .braapf_unselect:hover { background: #f7a600; color: #fff; }
.autosoe-sorting .braapf_unselect_all { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #2a2f35; color: #fff; font-size: 14px; line-height: 20px; text-decoration: none; }
.autosoe-sorting .braapf_unselect_all:hover { background: #f7a600; color: #fff; }

/* Navbar spacing on WooCommerce taxonomy archives (product tag / category /
   brand / marque). The Customizer CSS only offsets the fixed header on the
   main shop page and static pages, so these archives rendered under the
   navbar. Same 150px as the shop page. */
body.woocommerce.archive:not(.post-type-archive-product) #content.site-content { padding-top: 150px; }
