/***************************************

  Theme Name: Partytent
  Theme URI: https://partytent.webdevia.com
  Description: Event Rentals WooCommerce Theme

  Author: Mymoun
  Author URI: http://www.webdevia.com/
  Version: 2.5
  Text Domain: partytent
  Domain Path: /languages
  License: Envato
  License URI: https://themeforest.net/licenses

  Tags: two-columns, custom-background, threaded-comments, translation-ready, custom-menu
  
***************************************/
/* ----------------------------------------------------------------------------

  Unfortunately WordPress will require a style.css file
  located in the theme's root folder for stuff to work.

  However, we will not be using vanilla CSS. We're using Sass.

  Sass is a superset of CSS that adds in amazing features
  such as variables, nested selectors and loops..

  All Sass files are located in the /scss folder.
  Please note that none of your scss files will be compiled to /css/app.css before you run
  'npm run watch', 'npm run build', "compass compile" or "compass watch",

  More info on how to use Sass with Foundation can be found here:
  http://foundation.zurb.com/docs/sass.html

  For Define a table of contents please check /scss/app.scss.

  If you for some reason would like to write plain css instead of using Sass,
  you could just enqueue this file (style.css) to the header and add your styles in this file

---------------------------------------------------------------------------- */


/* ==========================================================================
   KILL-SWITCH DEFINITIVO: RIMOZIONE TOTALE CERCHIO E HOVER ICONE
   ========================================================================== */
html body .text-icon::before,
html body .text-icon::after,
html body .text-icon *::before,
html body .text-icon *::after,
html body .text-icon__container::before,
html body .text-icon__container::after,
html body .text-icon__icon-box::before,
html body .text-icon__icon-box::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .text-icon,
html body .text-icon *,
html body .text-icon__container,
html body .text-icon__icon-box {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    filter: none !important;
}

html body .text-icon:hover,
html body .text-icon:hover *,
html body .text-icon__container:hover,
html body .text-icon__container:hover *,
html body .text-icon__icon-box:hover,
html body .text-icon__icon-box:hover * {
    background: transparent !important;
    background-color: transparent !important;
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
    filter: none !important;
}

html body .text-icon__icon-box > *:not(svg) {
    display: none !important;
}

.woocommerce-products-header__title {
	display:none!important;
}

/* ==========================================================================
   RESTYLING PREMIUM FOOTER (OLTREILGIARDINO)
   ========================================================================== */
section.first-footer {
    background-color: #662D8B !important; 
    padding: 70px 0 50px 0 !important;
    color: #ffffff !important;
    position: relative !important;
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}
section.first-footer .wp-block-columns {
    gap: 40px !important;
    align-items: flex-start !important;
}
section.first-footer h2.wp-block-heading {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 25px !important;
    padding-bottom: 12px !important;
    position: relative !important;
    letter-spacing: 0.5px !important;
}
section.first-footer h2.wp-block-heading::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 35px !important;
    height: 2px !important;
    background-color: #fdf8f2 !important; 
    border-radius: 2px !important;
    transition: width 0.3s ease !important;
}
section.first-footer .wp-block-column:hover h2.wp-block-heading::after {
    width: 55px !important;
}
section.first-footer p.wp-block-paragraph {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    font-weight: 400 !important;
}
section.first-footer .wp-block-column:nth-child(2) p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    margin-bottom: 8px !important;
}
section.first-footer .wp-block-column:nth-child(2) b {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-right: 4px !important;
}
section.first-footer .wd-footer-links p {
    margin: 8px 0 !important;
}
section.first-footer .wd-footer-links a {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    display: inline-block !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative !important;
}
section.first-footer .wd-footer-links a:hover {
    color: #ffffff !important;
    transform: translateX(6px) !important; 
}
section.first-footer .wd-footer-links a::before {
    content: '›' !important;
    position: absolute !important;
    left: -12px !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    color: #fdf8f2 !important;
    font-size: 16px !important;
}
section.first-footer .wd-footer-links a:hover::before {
    opacity: 1 !important;
    left: -10px !important;
}
footer.second-footer {
    background-color: #fdf8f2 !important; 
    border-top: 1px solid rgba(102, 45, 139, 0.1) !important;
    padding: 22px 0 !important;
}
footer.second-footer .copyright {
    color: #662D8B !important; 
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    text-align: center !important;
    width: 100% !important;
}
@media (max-width: 768px) {
    section.first-footer { padding: 45px 20px 35px 20px !important; }
    section.first-footer .wp-block-columns { flex-direction: column !important; gap: 30px !important; }
    section.first-footer h2.wp-block-heading { margin-bottom: 15px !important; font-size: 20px !important; }
    footer.second-footer .copyright { font-size: 11px !important; line-height: 1.5 !important; padding: 0 15px !important; }
}

/* ==========================================================================
   STILIZZAZIONE MODERNA FORM DI CONTATTO (VIOLA STYLE)
   ========================================================================== */
.contact_style_1 input[type="text"],
.contact_style_1 input[type="email"],
.contact_style_1 input[type="tel"],
.contact_style_1 textarea {
    background-color: #f7f2fa !important; 
    color: #151816 !important; 
    border: none !important; 
    border-bottom: 2px solid #662D8B !important; 
    border-radius: 6px 6px 0 0 !important; 
    padding: 14px 18px !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    width: 100% !important;
}
.contact_style_1 input::placeholder,
.contact_style_1 textarea::placeholder {
    color: #92849a !important;
    opacity: 1 !important;
}
.contact_style_1 input:focus,
.contact_style_1 textarea:focus {
    background-color: #f1e7f7 !important; 
    border-bottom: 2px solid #4a1e66 !important; 
    outline: none !important; 
}
.contact_style_1 label {
    font-weight: 600 !important;
    color: #151816 !important;
    margin-bottom: 6px !important;
    display: block !important;
}
.contact_style_1 input[type="submit"].btn-contact {
    background-color: #662D8B !important; 
    color: #ffffff !important;
    border: none !important;
    padding: 14px 36px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 30px !important; 
    cursor: pointer !important;
    display: inline-block !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 12px rgba(102, 45, 139, 0.2) !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important; 
}
.contact_style_1 input[type="submit"].btn-contact:hover {
    background-color: #532373 !important; 
    box-shadow: 0 6px 16px rgba(102, 45, 139, 0.3) !important;
    transform: translateY(-1px) !important;
}
.contact_style_1 input[type="submit"].btn-contact:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 6px rgba(102, 45, 139, 0.2) !important;
}

/* ==========================================================================
   STILIZZAZIONE COMPATTA "CATALOGO" NEL MENU MOBILE (STILE BADGE)
   ========================================================================== */
@media screen and (max-width: 768px) {
    #mobile-menu ul li.menu-catalogo-bold {
        background: transparent !important;
        padding: 4px 0 !important;
        display: block !important;
    }
    #mobile-menu ul li.menu-catalogo-bold > a {
        background: #662D8B !important; 
        color: #ffffff !important; 
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        font-size: 14px !important;
        display: inline-block !important;
        width: auto !important;
        max-width: max-content !important;
        padding: 10px 22px !important;
        border-radius: 30px !important; 
        margin: 6px 0 6px 16px !important; 
        text-align: center !important;
        box-shadow: 0 4px 10px rgba(102, 45, 139, 0.2) !important;
        transition: all 0.2s ease !important;
    }
    #mobile-menu ul li.menu-catalogo-bold > a:active {
        transform: scale(0.96) !important;
        opacity: 0.9 !important;
    }
}

/* ==========================================================================
   STILIZZAZIONE FILTRO CATEGORIE COOMMERCE (SIDEBAR)
   ========================================================================== */
.shop-sidebar .wc-block-product-categories {
    background-color: #fdf8f2 !important; 
    padding: 30px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
}
ul.wc-block-product-categories-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.wc-block-product-categories-list-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(102, 45, 139, 0.1) !important; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.wc-block-product-categories-list-item:last-child {
    border-bottom: none !important;
}
.wc-block-product-categories-list-item a {
    color: #151816 !important; 
    font-size: 15px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}
.wc-block-product-categories-list-item:hover a {
    color: #662D8B !important; 
    padding-left: 6px !important; 
}
.wc-block-product-categories-list-item-count {
    background-color: rgba(102, 45, 139, 0.07) !important; 
    color: #662D8B !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important; 
    min-width: 32px !important;
    text-align: center !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    margin-left: 10px !important;
}
.wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item-count {
    background-color: #662D8B !important;
    color: #ffffff !important; 
}

@media (max-width: 768px) {
    .shop-sidebar .wc-block-product-categories {
        background-color: transparent !important;
        padding: 10px 0 !important;
        box-shadow: none !important;
        overflow: visible !important; 
        display: flex !important;
        flex-direction: column !important;
    }
    .shop-sidebar .wc-block-product-categories::before {
        content: "Filtra per Categoria:" !important;
        display: block !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #5f5f5f !important; 
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-bottom: 12px !important;
        padding-left: 15px !important; 
    }
    ul.wc-block-product-categories-list {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 10px !important;
        padding: 8px 15px 12px 15px !important; 
        margin: 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }
    ul.wc-block-product-categories-list::-webkit-scrollbar {
        display: none !important;
    }
    .wc-block-product-categories-list-item {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        background-color: #fdf8f2 !important;
        padding: 8px 16px !important; 
        border-radius: 30px !important;
        margin: 0 !important;
        border: 1px solid rgba(102, 45, 139, 0.25) !important;
        border-bottom: 1px solid rgba(102, 45, 139, 0.25) !important;
    }
    .wc-block-product-categories-list-item a {
        width: auto !important;
        white-space: nowrap !important;
        font-size: 15px !important; 
        font-weight: 600 !important;
        color: #151816 !important;
    }
    .wc-block-product-categories-list-item:hover a {
        padding-left: 0 !important;
    }
    .wc-block-product-categories-list-item-count {
        margin-left: 8px !important;
        padding: 2px 7px !important;
        min-width: auto !important;
        font-size: 12px !important;
        background-color: rgba(102, 45, 139, 0.08) !important;
        color: #662D8B !important;
    }
}

/* ==========================================================================
   REGOLAZIONE MENU MOBILE: LOGO CENTRATO 120x120px
   ========================================================================== */
@media screen and (max-width: 768px) {
    .site-title-bar {
        height: 140px !important; 
        position: relative !important; 
        display: flex !important;
        align-items: center !important;
        padding: 0 15px !important;
        background: #fff !important;
    }
    .site-title-bar .menu-icon {
        position: relative !important;
        z-index: 10 !important;
    }
    .site-title-bar .title-bar-title {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 5 !important;
    }
    .site-title-bar .title-bar-title a {
        margin: 0 !important;
        display: block !important;
        width: 120px !important;
        height: 120px !important;
    }
    .site-title-bar .title-bar-title a img {
        width: 120px !important;
        height: 120px !important;
        max-height: 120px !important;
        object-fit: contain !important; 
        display: block !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   PRODOTTO SINGOLO: LAYOUT
   ========================================================================== */
body.single-product div.product,
body.single-product #main,
body.single-product .site-main {
    padding-top: 50px !important; 
}
body.single-product div.product {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
}
body.single-product .images {
    width: 70% !important;
    max-width: 80% !important;
    float: left !important;
    display: flex !important;
    flex-direction: column !important; 
}
body.single-product .product_title {
    width: 100% !important;
    margin-top: 25px !important;
    margin-bottom: 15px !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
    display: block !important;
}
body.single-product .images .thumbnails,
body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    margin-top: 15px !important;
    clear: both !important;
}
body.single-product .images .thumbnails li {
    width: 75px !important;
    height: auto !important;
}
body.single-product .summary,
body.single-product .entry-summary {
    width: 50% !important;
    max-width: 50% !important;
    float: right !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media print, screen and (min-width: 64em) {
    .single-product.woocommerce .sngle-prd-style-1 div.product div.summary{ top:25px; }
}

.woocommerce #content div.product div.summary, 
.woocommerce div.product div.summary, 
.woocommerce-page #content div.product div.summary, 
.woocommerce-page div.product div.summary{
	width:50%!important;
}

@media (max-width: 768px){
	.woocommerce #content div.product div.summary, 
    .woocommerce div.product div.summary, 
    .woocommerce-page #content div.product div.summary, 
    .woocommerce-page div.product div.summary{
	    width:100%!important;
    }
}

.summary.entry-summary {
    display: block !important;
    position: relative !important;
}
.summary.entry-summary .yith-ywraq-add-to-quote {
    position: relative !important;
    display: block !important;
    float: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 3px 0 !important;
    padding: 0 !important;
    width: 70% !important;
    background: transparent !important;
    border: none !important;
    z-index: 1 !important;
}
.yith-ywraq-add-to-quote a.add-request-quote-button {
    display: inline-block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #662D8B !important; 
    color: #fff !important;
    padding: 15px !important;
    text-align: center !important;
    border-radius: 5px !important;
    text-transform: uppercase !important;
    font-size:15px !important;
    font-weight: 400 !important;
}
.product_meta, 
.woocommerce-product-details__short-description {
    display: block !important;
    clear: both !important;
    margin-top: 10px !important;
    position: relative !important;
}

@media (max-width: 768px) {
    body.single-product div.product {
        flex-direction: column !important;
        align-items: center !important; 
    }
    body.single-product .images {
        width: 90% !important;
        max-width: 90% !important;
        float: none !important;
        margin: 0 auto !important; 
    }
    body.single-product .summary,
    body.single-product .entry-summary {
        width: 90% !important;
        max-width: 90% !important;
        float: none !important;
        margin-top: 5% !important;
        margin-left: 5% !important;
        margin-right: 5% !important; 
        margin-bottom: 20px !important;
    }
    body.single-product .woocommerce-product-details__short-description {
        width: 100% !important;
        display: block !important;
    }
    body.single-product .summary.entry-summary .yith-ywraq-add-to-quote {
        width: 100% !important;
    }
}

:root {
	--wp--preset--color--gray-4: var(--gray-4-color);
    --wp--preset--color--gray-3: var(--gray-3-color);
    --wp--preset--color--gray-2: var(--gray-2-color);
    --wp--preset--color--gray-1: var(--gray-1-color);
}
header.l-header .top-bar-container.sticky .site-navigation.top-bar .top-bar-right .menu li a {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 14px;
}
.wd-product__title * { margin: .5rem 0 .125rem; font-size: 1.5875rem; }
.c-accordion__title { background: var(--gray-2-color); padding: .5em; }
.c-accordion__content { padding-inline: .7em; }

input[type="email"]:not([type="submit"]), 
input[type="text"]:not([type="submit"]), 
textarea:not([type="submit"]), 
select:not([type="submit"]) {
    margin-top: 9px;
    padding: 15px 20px;
}

.single-product .wp-block-webdevia-rental-add-to-card { margin: 0; }
.wp-block-webdevia-rental-dates__list input.flatpickr-input { margin: 0; }
input[readonly] { background-color: var(--gray-3-color); }

.menu-catalogo-bold a {
	background: #662D8B!important;
    font-weight: 600 !important; 
    color: #fff !important;   
    font-size: 1em !important; 
    transition: all 0.3s ease;
}
.menu-catalogo-bold a:hover {
    letter-spacing: 2px; 
    opacity: 0.8;
}

/* ==========================================================================
   RESTYLING CATALOGO OLTREILGIARDINO (GRID ONLY, NO LIST)
   ========================================================================== */

/* 1. Nascondi totalmente i bottoni grid/list e altri elementi di disturbo */
.woocommerce-page nav.gridlist-toggle,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    display: none !important;
}

/* 2. Forza la griglia a 3 colonne su Desktop e 2 su Mobile */
body.woocommerce-page ul.products,
body.woocommerce-page ul.products.grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
}

@media (max-width: 1200px) {
    body.woocommerce-page ul.products,
    body.woocommerce-page ul.products.grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body.woocommerce-page ul.products,
    body.woocommerce-page ul.products.grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 16px !important;
    }
}

/* Elimina vecchi clearfix del tema */
body.woocommerce-page ul.products::before,
body.woocommerce-page ul.products::after {
    display: none !important;
}

/* 3. Stile della Card Prodotto */
body.woocommerce-page ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
body.woocommerce-page ul.products li.product:hover {
    transform: translateY(-4px) !important;
}

/* 4. Il quadrato dell'immagine */
body.woocommerce-page ul.products li.product .product_item_thumbnail,
body.woocommerce-page ul.products li.product a img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    background-color: #fcfcfc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
body.woocommerce-page ul.products li.product a img {
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
    object-fit: contain !important;
    mix-blend-mode: multiply !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
body.woocommerce-page ul.products li.product:hover .product_item_thumbnail {
    border-color: rgba(102, 45, 139, 0.15) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.04) !important;
}
body.woocommerce-page ul.products li.product:hover a img {
    transform: scale(1.05) !important;
}

/* 5. Titolo del prodotto elegante */
body.woocommerce-page ul.products li.product h2.woocommerce-loop-product__title {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #2B252E !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    transition: color 0.3s ease !important;
}
body.woocommerce-page ul.products li.product:hover h2.woocommerce-loop-product__title {
    color: #662D8B !important;
}
@media (max-width: 768px) {
    body.woocommerce-page ul.products li.product h2.woocommerce-loop-product__title {
        font-size: 1.15rem !important;
    }
}

/* ==========================================================================
   IL FIX: BARRA STRUMENTI CATALOGO (RICERCA E ORDINAMENTO)
   ========================================================================== */

/* Nascondi il testo "Visualizzazione di X risultati" e i messaggi vuoti */
.woocommerce-products-header + .woocommerce-notices-wrapper + p.woocommerce-result-count,
.woocommerce-products-header ~ p.woocommerce-result-count,
.woocommerce-page p.woocommerce-result-count {
    display: none !important;
}

/* DISTRUZIONE DEL MEGA-BLOCCO BEIGE E AFFIANCAMENTO */
.ojg-custom-search-wrapper,
form.woocommerce-ordering {
    float: right !important;
    margin: 0 0 30px 15px !important;
    background: transparent !important; /* Rimuove il beige dal container */
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    height: 48px !important;
}

.ojg-custom-search-wrapper {
    margin-left: 0 !important;
}

/* Uccidiamo lo sfondo nativo del tag form che il tema inietta a forza */
.ojg-custom-search-wrapper form {
    display: flex !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important; /* Nessuno sfondo beige */
    border: none !important;
    box-shadow: none !important;
}

/* Nascondi il tasto Invia nativo per un look pulito */
.ojg-custom-search-wrapper button,
.ojg-custom-search-wrapper input[type="submit"] {
    display: none !important;
}

/* STILE CAMPO DI RICERCA (Larghezza fissa) */
.ojg-custom-search-wrapper input.search-field,
.ojg-custom-search-wrapper input[type="search"] {
    width: 280px !important;
    height: 48px !important;
    background-color: #ffffff !important; /* Sfondo bianco del campo */
    border: 1px solid #E8DEEE !important;
    border-radius: 8px !important;
    padding: 0 16px 0 42px !important; /* Spazio per la lente */
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.95rem !important;
    color: #2B252E !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 0 !important; /* Reset margini extra del tema */
    
    /* Icona Lente d'ingrandimento SVG sicura */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23662D8B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 14px center !important;
    background-size: 16px !important;
}

.ojg-custom-search-wrapper input.search-field::placeholder,
.ojg-custom-search-wrapper input[type="search"]::placeholder {
    color: #9d93a3 !important;
}

/* STILE MENU A TENDINA ORDINAMENTO (Larghezza fissa) */
form.woocommerce-ordering select.orderby {
    width: 240px !important;
    height: 48px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    border: 1px solid #E8DEEE !important;
    border-radius: 8px !important;
    padding: 0 40px 0 16px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.95rem !important;
    color: #2B252E !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 0 !important;
    
    /* Freccina Viola SVG sicura */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='292.4' height='292.4' viewBox='0 0 292.4 292.4'%3E%3Cpath fill='%23662D8B' d='M287 69.4a17.6 17.6 0 0 0-13-5.4H18.4c-5 0-9.3 1.8-12.9 5.4A17.6 17.6 0 0 0 0 82.2c0 5 1.8 9.3 5.4 12.9l128 127.9c3.6 3.6 7.8 5.4 12.8 5.4s9.2-1.8 12.8-5.4L287 95c3.5-3.5 5.4-7.8 5.4-12.8 0-5-1.9-9.2-5.5-12.8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 10px auto !important;
}

/* ANIMAZIONI HOVER E FOCUS (Bordo viola e sollevamento) */
.ojg-custom-search-wrapper input.search-field:hover,
.ojg-custom-search-wrapper input[type="search"]:hover,
form.woocommerce-ordering select.orderby:hover {
    border-color: #662D8B !important;
    box-shadow: 0 6px 16px rgba(102, 45, 139, 0.08) !important;
    transform: translateY(-2px) !important;
}

.ojg-custom-search-wrapper input.search-field:focus,
.ojg-custom-search-wrapper input[type="search"]:focus,
form.woocommerce-ordering select.orderby:focus {
    border-color: #662D8B !important;
    box-shadow: 0 0 0 3px rgba(102, 45, 139, 0.12) !important;
    transform: translateY(0) !important;
}

/* SICUREZZA: Assicuriamoci che la griglia prodotti scenda SOTTO i filtri flottanti */
ul.products {
    clear: both !important;
}

/* ADATTAMENTO MOBILE */
@media (max-width: 768px) {
    .ojg-custom-search-wrapper,
    form.woocommerce-ordering {
        float: none !important;
        margin: 0 0 12px 0 !important;
        width: 100% !important;
        height: 48px !important;
    }
    .ojg-custom-search-wrapper input.search-field,
    .ojg-custom-search-wrapper input[type="search"],
    form.woocommerce-ordering select.orderby {
        width: 100% !important;
    }
}










/* ==========================================================================
   OVERRIDE DEFINITIVO: CATALOGO FULL-WIDTH A 5 COLONNE (STILE RISTORENT)
   ========================================================================== */

/* 1. Rimuove la sidebar delle categorie dal catalogo */
.post-type-archive-product #sidebar,
.tax-product_cat #sidebar,
.woocommerce-page #sidebar,
.shop-sidebar,
aside.sidebar,
.sidebar-container {
    display: none !important;
}

/* 2. Estende l'area prodotti al 100% della larghezza della pagina */
.post-type-archive-product .content-area,
.tax-product_cat .content-area,
.woocommerce-page .content-area,
.post-type-archive-product #main,
.tax-product_cat #main,
.woocommerce-page #main,
.site-main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
}

/* 3. Forza la griglia esplosa a 5 Colonne su Desktop */
body.woocommerce-page ul.products,
body.woocommerce-page ul.products.grid,
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 30px 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 0 !important;
}

/* 4. Adattamento Responsive della griglia */
@media (max-width: 1200px) {
    body.woocommerce-page ul.products,
    .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 900px) {
    body.woocommerce-page ul.products,
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    body.woocommerce-page ul.products,
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px 10px !important;
    }
}






/* ==========================================================================
   BARRA CATEGORIE A PILLOLA ORIZZONTALE IN ALTO (SOLO 14 MACRO-CATEGORIE)
   ========================================================================== */

/* 1. Riattiva la sidebar e la posiziona IN ALTO sopra i prodotti */
.post-type-archive-product #sidebar,
.tax-product_cat #sidebar,
.woocommerce-page #sidebar,
.shop-sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 0 25px 0 !important;
    clear: both !important;
}

/* 2. Trasforma il contenitore in una barra a scorrimento orizzontale */
.shop-sidebar .wc-block-product-categories,
.shop-sidebar .widget_product_categories,
.shop-sidebar .product-categories {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.shop-sidebar ul.wc-block-product-categories-list,
.shop-sidebar ul.product-categories {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding: 8px 5px 15px 5px !important;
    margin: 0 !important;
    list-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
}

/* 3. FILTRO RIGIDO: Mostra SOLO le 14 Macro-categorie (nasconde le sotto-categorie) */
.shop-sidebar ul.product-categories ul.children,
.shop-sidebar ul.wc-block-product-categories-list ul,
.shop-sidebar li.wc-block-product-categories-list-item-child,
.shop-sidebar li.cat-item ul.children,
.shop-sidebar .count {
    display: none !important;
}

/* 4. Stile delle "Pillole" per ciascuna Macro-categoria */
.shop-sidebar ul.product-categories > li,
.shop-sidebar ul.wc-block-product-categories-list > li {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: #fdf8f2 !important;
    border: 1px solid rgba(102, 45, 139, 0.25) !important;
    border-radius: 30px !important;
    padding: 10px 22px !important;
    margin: 0 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

/* Testo interno alla pillola */
.shop-sidebar ul.product-categories > li a,
.shop-sidebar ul.wc-block-product-categories-list > li a {
    color: #2B252E !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

/* Hover sulle pillole */
.shop-sidebar ul.product-categories > li:hover,
.shop-sidebar ul.wc-block-product-categories-list > li:hover {
    background-color: #662D8B !important;
    border-color: #662D8B !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 45, 139, 0.2) !important;
}

.shop-sidebar ul.product-categories > li:hover a,
.shop-sidebar ul.wc-block-product-categories-list > li:hover a {
    color: #ffffff !important;
}

/* Pillola della categoria attiva/selezionata */
.shop-sidebar ul.product-categories > li.current-cat,
.shop-sidebar ul.wc-block-product-categories-list > li.is-active {
    background-color: #662D8B !important;
    border-color: #662D8B !important;
}

.shop-sidebar ul.product-categories > li.current-cat a,
.shop-sidebar ul.wc-block-product-categories-list > li.is-active a {
    color: #ffffff !important;
}



/* ==========================================================================
   AGGIUSTAMENTO PAGINE CATEGORIA: NO SIDEBAR LATERALE + FILTRI IN ALTO
   ========================================================================== */

/* 1. Rimuove il float laterale e la larghezza stretta della Sidebar */
.tax-product_cat #sidebar,
.post-type-archive-product #sidebar,
.woocommerce-page #sidebar,
.shop-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 0 0 25px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 2. Forza la griglia dei prodotti a occupare il 100% della larghezza */
.tax-product_cat .content-area,
.post-type-archive-product .content-area,
.woocommerce-page .content-area,
.tax-product_cat #main,
.post-type-archive-product #main,
.woocommerce-page #main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* 3. Griglia esplosa a 5 Colonne (Stile Ristorent) */
.woocommerce ul.products,
.woocommerce-page ul.products,
body.woocommerce-page ul.products.grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 30px 20px !important;
    width: 100% !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
    clear: both !important;
}

/* 4. BARRA DELLE 14 MACRO-CATEGORIE A PILLOLE IN ALTO */
.shop-sidebar ul.wc-block-product-categories-list,
.shop-sidebar ul.product-categories {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 10px !important;
    padding: 10px 5px 15px 5px !important;
    margin: 0 0 15px 0 !important;
    list-style: none !important;
    -webkit-overflow-scrolling: touch !important;
}

/* NASCONDE LE SOTTOCATEGORIE (Mostra solo le 14 Macro) */
.shop-sidebar ul.product-categories ul.children,
.shop-sidebar ul.wc-block-product-categories-list ul,
.shop-sidebar li.wc-block-product-categories-list-item-child,
.shop-sidebar .count {
    display: none !important;
}

/* STILE SINGOLA PILLOLA */
.shop-sidebar ul.product-categories > li,
.shop-sidebar ul.wc-block-product-categories-list > li {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: #fdf8f2 !important;
    border: 1px solid rgba(102, 45, 139, 0.25) !important;
    border-radius: 30px !important;
    padding: 8px 20px !important;
    margin: 0 !important;
    transition: all 0.25s ease !important;
}

.shop-sidebar ul.product-categories > li a,
.shop-sidebar ul.wc-block-product-categories-list > li a {
    color: #2B252E !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
}

/* HOVER ED ELEZIONE PILLOLA */
.shop-sidebar ul.product-categories > li:hover,
.shop-sidebar ul.product-categories > li.current-cat {
    background-color: #662D8B !important;
    border-color: #662D8B !important;
}

.shop-sidebar ul.product-categories > li:hover a,
.shop-sidebar ul.product-categories > li.current-cat a {
    color: #ffffff !important;
}

/* 5. RESPONSIVE PER TABLET E MOBILE */
@media (max-width: 1200px) {
    .woocommerce ul.products { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 900px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 15px 10px !important; }
}