@charset "UTF-8";
/*
Theme Name: Stemtech – GeneratePress Child
Template: generatepress
Text Domain: stemtech
Version: 1.0.2
*/

/* =========================================================
   STEMTECH Header con Box Ricerca Esteso Stile Amazon
   ========================================================= */

:root {
    --header-spacing: 70px;
    --header-spacing-tablet: 25px;
    --header-spacing-mobile: 15px;
    --header-barra-ricerca: 1100px;
}

/* Reset base */
#st-header * {
    box-sizing: border-box;
}

#st-header ul, 
#st-header li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#st-header a {
    text-decoration: none;
}

/* ===== HEADER PRINCIPALE ===== */
#st-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
    width: 100%;
}

/* ===== RIGA 1: LAYOUT STILE AMAZON ===== */
.st-header-bar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--header-spacing);
    height: 70px;
    gap: 20px;
    border-bottom: 1px solid #eee;
    background-color: rgb(7, 55, 99);
}

.st-header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    width: 180px;
    gap: 10px;
}

.st-header-left .st-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.st-header-left .st-brand img {
    max-height: 45px;
    width: auto;
}

.st-header-left .site-branding-text {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.st-header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    margin: 0 var(--header-spacing);
    min-width: 0;
}

/* =========================================================
   MODIFICHE PER HEADER STICKY E SOTTOMENU
   ========================================================= */
#st-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100 !important;
}

.st-nav-bar {
    transition: all 0.4s ease-out;
    max-height: 100px;
    opacity: 1;
    overflow: visible;
}

#st-header.is-scrolling .st-nav-bar {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-bottom: none;
}

body.admin-bar #st-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #st-header {
        top: 46px;
    }
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0;
}

#page {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.site-footer {
    flex-shrink: 0;
}

.site-content {
   flex-grow: 1;
}

.st-search {
    width: 100%;
    max-width: var(--header-barra-ricerca);
    margin: 0 auto;
}

.st-search form {
    display: flex;
    background: #fff;
    border: 1px solid #000;
    border-radius: 50px;
    overflow: hidden;
    width: 100%;
    height: 48px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: relative;
}

.st-search input[type="search"] {
    flex: 1;
    border: none;
    padding: 0 20px;
    font-size: 17px;
    outline: none;
    background: transparent;
    min-width: 200px;
}

.st-search input[type="search"]::placeholder {
    color: #999;
    font-size: 16px;
}

.st-search button,
.st-search input[type="submit"] {
    background: #abcdef;
    border: none;
    padding: 0 20px;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0;
}

.st-search button::before,
.st-search input[type="submit"]::before {
    content: '';
    background-image: url('/wp-content/uploads/icone/icona_cerca.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 24px;
    height: 24px;
    display: block;
}

.st-search button:hover,
.st-search input[type="submit"]:hover {
    background: #c2e2ff;
}

.st-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    width: 160px;
    justify-content: flex-end;
}

.st-icons {
    display: flex;
    gap: 8px;
}

.user-icon.account,
.user-icon.login {
    order: 1;
}

.user-icon .cart-label,
.user-icon .account-label,
.user-icon .login-label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

#st-cart-link .cart-label {
    display: none !important;
}

body .cart-label {
    display: none !important;
}

#st-cart-link {
    order: 2;
}

.cart-badge:empty {
    display: none;
}

.user-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: relative;
    min-width: 65px;
    text-align: center;
}

.user-icon:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.user-icon svg {
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
}

.st-header .user-icon img {
    filter: brightness(0) invert(1) !important;
}

.st-header .user-icon:hover img {
    filter: brightness(0) invert(1) !important;
}

.st-header .user-icon svg {
    stroke: #fff !important;
    fill: none !important;
}

.st-header .user-icon:hover svg {
    stroke: #fff !important;
    fill: none !important;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: 4px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-badge:empty {
    display: none;
}

/* ===== RIGA 2: MENU CENTRATO ===== */
.st-nav-bar {
    background: #232f3e;
    border-bottom: 1px solid #1a242f;
    width: 100%;
}

.st-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

#st-primary-nav {
    display: block;
    position: relative;
}

.st-menu {
    display: flex;
    align-items: center;
    gap: 0;
    height: 50px;
    justify-content: center;
}

.st-menu > li {
    position: static;
}

.st-menu > li > a {
    display: block;
    padding: 15px 22px;
    color: #fff;
    font-weight: 400;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.2s;
    height: 50px;
    line-height: 20px;
    border-radius: 2px;
}

.st-menu > li > a:hover,
.st-menu > li.has-mega:hover > a {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

@media (max-width: 992px) {
    .st-menu {
        min-height: 50px;
        height: auto;
        flex-wrap: wrap;
        padding-bottom: 5px; 
    }

    .st-menu > li > a {
        padding: 15px 18px;
    }
}

/* ===== MEGA MENU ===== */
.st-mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 99;
}

.st-menu > li.has-mega:hover .st-mega {
    display: block;
}

.st-mega-inner {
    padding: 35px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px 45px;
    align-items: start;
}

.mega-grid.cols-1 { grid-template-columns: 1fr; }
.mega-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mega-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mega-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.mega-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.mega-col {
    display: contents;
}

.mega-parent {
    display: block;
    break-inside: avoid;
    margin-bottom: 25px;
}

.mega-parent-link {
    display: block;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 8px;
    font-size: 17px;
    cursor: default;
    pointer-events: none;
    line-height: 1.3;
}

.mega-children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-children li {
    margin-bottom: 6px;
    list-style: none;
}

.mega-children a {
    color: #666;
    font-size: 15px;
    padding: 2px 0;
    display: block;
    transition: color 0.2s;
    line-height: 1.3;
}

.mega-children a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* ===== MOBILE TOGGLE ===== */
.st-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.st-burger {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    position: relative;
}

.st-burger::before,
.st-burger::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 3px;
    background: #fff;
    left: 0;
    transition: all 0.3s;
}

.st-burger::before { top: -9px; }
.st-burger::after { top: 9px; }

/* Notifiche carrello */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notices-wrapper,
.cart-notification,
.wc-block-components-notice-banner,
.added_to_cart_notification {
    z-index: 9999 !important;
    position: relative;
}

.cart-notification.success.show {
    position: fixed !important;
    top: 130px !important;
    z-index: 99999 !important;
}

/* ===== RESPONSIVE DESKTOP/TABLET ===== */
@media (max-width: 1200px) {
    .st-header-bar {
        padding: 0 var(--header-spacing-tablet);
        gap: 15px;
    }
    .st-header-center {
        margin: 0 var(--header-spacing-tablet);
    }
    #st-header .st-header-right .user-icon img {
        filter: brightness(0) invert(1) !important;
    }
    
    #st-header .st-header-right .user-icon svg {
        stroke: #fff !important;
        fill: none !important;
    }
}

@media (max-width: 992px) {
    .cart-notification.success.show {
        top: 125px !important;
    }
    .st-header-left {
        width: 160px;
    }
    
    .st-header-right {
        width: 140px;
    }
    
    .st-header-center {
        margin: 0 15px;
    }
}

/* =====================================================
   FIX Z-INDEX CONTENUTO PAGINA
   ===================================================== */

/* Assicura che il contenuto della pagina stia sotto il menu */
.site-content,
.stemtech-products-page,
#page,
.woocommerce,
main {
    position: relative;
    z-index: 1;
}

/* ===== MIGLIORAMENTI SPECIFICI STILE AMAZON ===== */
.st-search input[type="search"]:focus {
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
    border-color: #ff9900;
}

.st-search form:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.st-search form,
.st-search input[type="search"],
.st-search button {
    transition: all 0.2s ease;
}

/* ======================= Variabili layout ======================= */
:root{
  --st-page-gutter: clamp(16px, 4vw, 40px);
  --st-max: 1600px;
  --vw: calc(100vw - (100vw - 100%));
}

.grid-container{
    max-width: var(--st-max) !important;
}

html {
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Video Hero */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
}

.hero-section #hero-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contenitore-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.titolo-hero {
    color: white;
    text-align: center;
    padding: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .titolo-hero h1 {
        font-size: 2rem;
    }
}

.site-main{
    margin-top: 0px !important;
}

.site-content .grid-container,
.home .site-main .grid-container{
  max-width: 100%;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--st-page-gutter);
  box-sizing: border-box;
}

.separate-containers .inside-article,
.separate-containers .inside-page,
.one-container .inside-article{
  padding-top: 0px;
}

.site-header {
  margin-inline: auto;
  padding-inline: var(--st-page-gutter);
}

.entry-content .wp-block-video video,
.entry-content video{
  width: 100% !important;
  max-width: 100%;
  height: auto;
  display: block;
}

.entry-content .wp-block-embed__wrapper iframe,
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="vimeo"],
.entry-content iframe[src*="dailymotion"]{
  width: 100% !important;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.entry-content:not(:first-child) {
  margin-top: 0px !important;
}

.wp-block-video,
.wp-block-embed{ width: 100%; }

@media (max-width: 768px){
  :root{ --st-page-gutter: 16px; }
}

.home .entry-title,
.home .page-title,
.home h1.entry-title{ display:none !important; }

.page .entry-title {
    display: none;
}

.custom-cart-container .add-to-favorites,
.custom-cart-container .add-to-favorites:hover,
.custom-cart-container .add-to-favorites:focus,
.custom-cart-container .add-to-favorites:active {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Rimuove lo sfondo del contenitore solo nella pagina My Account */
body.woocommerce-account.separate-containers .inside-article {
  background-color: transparent;
}

.wp-block-woocommerce-checkout {
   max-width:1600px !important;
}


/* ===================================================
   FOOTER FULL SCREEN & LAYOUT BASE
   =================================================== */
.site-footer .grid-container,
.site-footer .footer-widgets-container,
.site-footer .inside-footer-widgets,
.site-footer .site-info,
.site-footer .inside-site-info {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding-inline: 0;
    box-sizing: border-box;
}

.site-footer .site-info { 
    border-top: 0; 
}

/* ===================================================
   FOOTER STEMTECH (ISI SETTINGS)
   =================================================== */
.st-footer {
    background-color: #073763;
    color: #ffffff;
    padding: 60px var(--st-page-gutter, 20px) 30px;
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
}

.footer-container {
    max-width: var(--st-max, 1200px);
    margin: 0 auto;
}

/* Griglia Link Desktop */
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
    margin: 0 auto 50px;
    align-items: start;
}

.st-footer .footer-section h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.st-footer .footer-section ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.st-footer .footer-section li {
    margin: 0 0 10px 0 !important;
}

.st-footer a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.st-footer a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ===================================================
   FOOTER BOTTOM: LOGO E DATI DINAMICI (PLUGIN)
   =================================================== */
.st-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 30px;
    text-align: center;
}

.st-footer .footer-logo {
    margin-bottom: 20px;
}

.st-footer .st-footer-logo-img {
    max-width: 220px;
    height: auto;
}

/* Dati Aziendali Dinamici */
.st-footer .company-data address {
    color: #d1d5db;
    font-size: 14px;
    font-style: normal;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    line-height: 1.4;
}

.st-footer .company-data .data-item {
    display: inline-flex;
    align-items: center;
}

/* Separatore verticale tra i dati (Solo Desktop) */
@media (min-width: 769px) {
    .st-footer .company-data .data-item:not(:last-child)::after {
        content: "|";
        margin-left: 10px;
        opacity: 0.4;
    }
}

.st-footer .company-data a {
    font-weight: 500;
}

/* ===================================================
   RESPONSIVE & ACCORDION MOBILE
   =================================================== */

/* Icona Toggle (+/-) */
.st-toggle {
    display: none; /* Nascosta su desktop */
}

@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .st-footer { padding: 40px 20px 30px; }
    
    .footer-content { display: block; margin-bottom: 30px; }
    
    .footer-section { border-bottom: 1px solid rgba(255,255,255,0.1); }

    .st-footer .footer-section h3 {
        cursor: pointer;
        padding: 20px 0;
        margin: 0;
    }

    /* Mostra + su mobile */
    .st-toggle {
        display: block;
        width: 12px;
        height: 12px;
        position: relative;
    }
    
    .st-toggle::before, .st-toggle::after {
        content: '';
        position: absolute;
        background-color: #fff;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        transition: transform 0.3s ease;
    }
    .st-toggle::before { width: 100%; height: 2px; }
    .st-toggle::after { width: 2px; height: 100%; }

    /* Logica Accordion */
    .footer-links {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.4s ease;
    }

    .footer-section.active .footer-links {
        max-height: 500px;
        opacity: 1;
        padding-bottom: 20px;
    }

    .footer-section.active .st-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
    .footer-section.active .st-toggle { transform: rotate(180deg); }

    /* Dati Aziendali Mobile */
    .st-footer .company-data address {
        flex-direction: column;
        gap: 8px;
    }
    .st-footer .company-data .data-item::after { display: none; }
}



.titolo-pagineinterne {
    text-align: center;
}

/* ===============================================
   FIX DIMENSIONE ICONA PREFERITI HEADER
   =============================================== */
.user-icon.favorites img,
.user-icon.favorites svg,
.user-icon.favorites i {
    width: 34px !important;
    height: 34px !important;
}

/* Stile per il plugin STEMTECH Wishlist */
.stemtech-wishlist-button { 
    text-decoration: none; 
    border: 1px solid #ccc; 
    padding: 8px 12px;
    border-radius: 5px; 
    display: inline-block;
    margin-top: 10px; 
}

.stemtech-wishlist-button.in-wishlist { 
    background-color: #f0f0f0; 
    border-color: #999; 
}

.product-card-wishlist { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    z-index: 5; 
}

.product-card-wishlist .stemtech-wishlist-button { 
    font-size: 0; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    background: #fff; 
    text-align: center; 
    line-height: 32px; 
}

.product-card-wishlist .stemtech-wishlist-button:before { 
    content: '♡'; 
    font-size: 20px; 
    color: #000; 
}

.product-card-wishlist .stemtech-wishlist-button.in-wishlist:before { 
    content: '♥'; 
    color: red; 
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.product-actions .stemtech-wishlist-button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 1px !important;
    color: #666 !important; 
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
    order: -1;
}

.product-actions .stemtech-wishlist-button:hover {
   color: blue;
}

/* ===============================================
   STILE CONTATORE WISHLIST HEADER
   =============================================== */
.user-icon.favorites {
    position: relative;
}

.wishlist-counter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: auto;
    height: auto;
    box-shadow: none;
    padding: 0;
    line-height: 1;
}

.wishlist-counter:empty {
    display: none;
}

/* ===============================================
   STILE PAGINA WISHLIST PERSONALIZZATA
   =============================================== */
.stemtech-wishlist-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wishlist-product-row::before {
    display: none;
}

.wishlist-product-row {
    display: flex;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 30px;
    padding-left: 10px; 
    position: relative;
    transition: border-color 0.3s ease;
}

.wishlist-product-row:hover {
    border-color: #ddd;
}

.stemtech-wishlist-container > .wishlist-product-row:last-child {
    border-bottom: none;
}

.wishlist-item-image {
    flex-shrink: 0;
    width: 150px;
}

.wishlist-item-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.wishlist-item-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wishlist-item-title {
    margin: 0;
    font-size: 20px;
}

.wishlist-item-title a {
    text-decoration: none;
    color: #333;
}

.wishlist-item-title a:hover {
    color: #0073e6;
}

.wishlist-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #111;
}

.wishlist-item-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wishlist-item-actions .button {
    background-color: #073763 !important;
    color: #fff !important;
    border-radius: 5px !important;
    padding: 8px 16px !important;
    font-weight: bold !important;
}

.wishlist-item-actions .stemtech-wishlist-button {
    background: none !important;
    border: none !important;
    color: #555 !important;
    text-decoration: underline;
    padding: 0 !important;
    font-size: 14px;
}

.wishlist-item-actions .quote-button {
    background-color: #073763 !important;
    color: #fff !important;
    border-radius: 5px !important;
    padding: 8px 16px !important;
    font-weight: bold !important;
    text-decoration: none;
    border: none;
    line-height: normal;
    display: inline-block;
    text-align: center;
}

.wishlist-item-actions .quote-button:hover {
    background-color: #1d4ed8 !important;
    color: #fff !important;
}

.wishlist-item-actions .add_to_cart_button + .quote-button,
.wishlist-item-actions .added_to_cart + .quote-button,
.wishlist-item-actions .wc-variation-selection-needed + .quote-button {
    margin-left: 10px;
}

.wishlist-item-actions .stemtech-wishlist-button {
    background: none !important;
    border: none !important;
    color: #cc0000 !important;
    text-decoration: underline;
    padding: 0 !important;
    font-size: 14px;
    font-weight: normal !important;
    margin-left: 15px;
    display: inline-block;
}

.wishlist-item-actions .remove-wishlist-link.stemtech-wishlist-button:hover {
    color: #990000 !important;
}

.wishlist-item-sku {
    font-size: 0.9em;
    color: #666;
    margin-top: -5px;
    margin-bottom: 5px;
}

.wishlist-empty {
    text-align: center;
    padding: 40px 0;
}

.wishlist-empty p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.wishlist-header {
    margin-bottom: 30px;
    padding-top: 20px;
    text-align: center;
}

h1.wishlist-title {
    font-size: 2.5rem;
    color: #073763;
    font-weight: bold;
}

.stemtech-wishlist-container {
    margin-top: 20px;
}

/* ===============================================================
 * WISHLIST - MODALITÀ SELEZIONE MULTIPLA
 * =============================================================== */
#stemtech-wishlist-main-container {
}

.wishlist-item-selector {
    display: block;
    flex-shrink: 0;
    margin-right: 15px;
    align-self: center;
}

.wishlist-item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.wishlist-product-row {
    display: flex;
    align-items: flex-start;
}

.wishlist-item-actions .single-quote-button,
.wishlist-item-actions form.cart {
    display: none !important;
}

.wishlist-actions-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

#enable-wishlist-selection,
#submit-selected-quote {
   background-color: #073763 !important;
   color: #fff !important;
   padding: 10px 20px;
   border-radius: 5px;
}

#enable-wishlist-selection:hover,
#submit-selected-quote:hover {
    background-color: #1d4ed8 !important;
}

.wishlist-btn.loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.wishlist-btn.loading .wishlist-icon {
    animation: pulse-wishlist 1s infinite;
}

@keyframes pulse-wishlist {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}


/* ===============================================
   VERSIONE MOBILE (RESPONSIVE)
   =============================================== */
@media (max-width: 768px) {

    /* 1. Trasforma la riga del prodotto in colonna */
    .wishlist-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 20px;
        padding-left: 0; /* Rimuove padding extra */
    }

    /* 2. Gestione Checkbox (Selezione Multipla) su Mobile */
    /* Lo posizioniamo in alto a sinistra sopra l'immagine */
    .wishlist-item-selector {
        position: absolute;
        top: 0;
        left: 0;
        margin-right: 0;
        z-index: 10;
    }

    /* 3. Ridimensionamento Immagine */
    .wishlist-item-image {
        width: 100%; /* Contenitore full width */
        max-width: 120px; /* Dimensione massima immagine */
        margin-left: 30px; /* Lascia spazio per la checkbox se presente */
    }

    /* 4. Dettagli Prodotto */
    .wishlist-item-details {
        width: 100%;
    }

    .wishlist-item-title {
        font-size: 18px; /* Testo leggermente più piccolo */
        line-height: 1.3;
    }

    /* 5. Azioni (Pulsanti) */
    .wishlist-item-actions {
        flex-direction: column; /* Impila i pulsanti verticalmente */
        align-items: stretch; /* Allarga i pulsanti a tutta larghezza */
        width: 100%;
        gap: 10px;
        margin-top: 15px;
    }

    /* Pulsanti "Aggiungi al carrello" e "Preventivo" full width */
    .wishlist-item-actions .button,
    .wishlist-item-actions .quote-button {
        width: 100%;
        text-align: center;
        padding: 12px !important; /* Touch target più grande */
    }

    /* Reset margini per pulsanti impilati */
    .wishlist-item-actions .add_to_cart_button + .quote-button,
    .wishlist-item-actions .added_to_cart + .quote-button,
    .wishlist-item-actions .wc-variation-selection-needed + .quote-button {
        margin-left: 0;
    }

    /* Link "Rimuovi" */
    .wishlist-item-actions .stemtech-wishlist-button {
        margin-left: 0;
        text-align: center;
        padding-top: 10px !important;
        display: block;
        width: 100%;
    }

    /* 6. Intestazione Azioni (Pulsanti globali in alto) */
    .wishlist-actions-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #enable-wishlist-selection,
    #submit-selected-quote {
        width: 100%;
        text-align: center;
        display: block;
    }
    
    /* Titolo Pagina */
    h1.wishlist-title {
        font-size: 1.8rem; /* Riduce dimensione titolo */
    }
}



.titolo-articolo-corpo {
    color: #073763;
    font-size: 28px;
    font-weight: bold;
}

.sottotitolo-articolo-corpo {
    color: #073763;
    font-size: 24px;
    font-weight: 600;
}

.ul-articolo-corpo {
    margin: 0 0 0 40px;
    font-style: sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #222;
}

.tabella-articolo-corpo{
    border-collapse: collapse;
    border: none;
    width: fit-content !important
}

.tabella-articolo-corpo th,
.tabella-articolo-corpo td {
  border: none;
}

p{
    color: #222;
}

.category-hero {
    display: none;
}

/* ===============================================================
  PAGINA PREVENTIVO (STYLE PER CF7)
 * =============================================================== */
.page-template-page-richiedi-preventivo .preventivo-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
}

.page-template-page-richiedi-preventivo .preventivo-content h1.entry-title {
    text-align: center;
    font-size: 2.5rem;
    color: #073763;
    margin-bottom: 20px;
    display: block !important;
}

.page-template-page-richiedi-preventivo .preventivo-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #444;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.page-template-page-richiedi-preventivo .preventivo-form-wrapper {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.preventivo-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.preventivo-form label .required {
    color: #d9534f;
    margin-left: 4px;
}

.preventivo-form .wpcf7-form-control-wrap {
    display: block;
    margin-top: 5px;
}

.preventivo-form input[type="text"],
.preventivo-form input[type="email"],
.preventivo-form input[type="tel"],
.preventivo-form textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; 
    background-color: #fff;
}

.preventivo-form textarea {
    min-height: 150px;
    resize: vertical;
}

.preventivo-form input#product-name,
.preventivo-form input#product-sku {
    background-color: #eee !important;
    cursor: not-allowed;
    border-color: #ddd;
}

.preventivo-form .wpcf7-not-valid-tip {
    font-size: 0.8em;
    margin-top: 3px;
}

.preventivo-form input[type="submit"].wpcf7-submit {
    display: inline-block !important; 
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    width: auto !important; 
    text-align: center !important; 
    cursor: pointer;
    font-size: 1rem;
    margin-top: 15px;
}

.preventivo-form input[type="submit"].wpcf7-submit:hover {
    background-color: #2563eb !important;
}

.preventivo-form .wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* ============================================
   STEMTECH Preventivo Manager - Plugin Styles
   ============================================ */
.stemtech-preventivo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.stemtech-preventivo-container h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

.form-intro {
    margin-bottom: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
}

.prodotti-selezionati {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.prodotti-selezionati h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.prodotti-selezionati ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prodotti-selezionati li {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prodotti-selezionati li:last-child {
    border-bottom: none;
}

.prodotti-selezionati li strong {
    font-weight: 600;
    color: #333;
}

.prodotti-selezionati .sku {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    font-style: italic;
}

#form-preventivo {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

#form-preventivo .form-group {
    margin-bottom: 25px;
}

#form-preventivo .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#form-preventivo .form-group input,
#form-preventivo .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

#form-preventivo .form-group input:focus,
#form-preventivo .form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

#form-preventivo .form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.btn-invia-preventivo {
    background: #0073aa;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 20px auto 0;
}

.btn-invia-preventivo:hover {
    background: #005177;
    transform: translateY(-2px);
}

.btn-invia-preventivo:active {
    transform: translateY(0);
}

.messaggio-successo {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
    font-size: 16px;
    text-align: center;
    animation: slideDown 0.5s ease;
}

.messaggio-errore {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    font-size: 16px;
    text-align: center;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .stemtech-preventivo-container {
        padding: 15px;
    }
    
    #form-preventivo {
        padding: 20px;
    }
    
    .prodotti-selezionati li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prodotti-selezionati .sku {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .btn-invia-preventivo {
        width: 100%;
        max-width: none;
    }
}

#form-preventivo .form-group label::after {
    content: "";
}

#form-preventivo .form-group input[required] + label::after,
#form-preventivo .form-group textarea[required] + label::after {
    content: " *";
    color: #d63638;
}

#form-preventivo .form-group input:invalid:not(:placeholder-shown),
#form-preventivo .form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #d63638;
}

#form-preventivo .form-group input:valid:not(:placeholder-shown),
#form-preventivo .form-group textarea:valid:not(:placeholder-shown) {
    border-color: #00a32a;
}

/* =========================================================
   MEDIA QUERY MOBILE UNIFICATA (HEADER FIX + MENU FUNZIONANTE)
   ========================================================= */
@media (max-width: 768px) {

    /* --- 1. CONFIGURAZIONE ALTEZZA HEADER --- */
    :root {
        --h-mobile: 170px; /* Altezza precisa per l'header */
    }

    /* Padding al body per compensare l'header fisso */
    body {
        padding-top: var(--h-mobile) !important;
    }

    /* Notifica carrello posizionata correttamente */
    .cart-notification.success.show {
        top: 80px !important;
    }

    /* --- 2. HEADER FISSO (LIVELLO ALTO) --- */
    #st-header {
        position: fixed !important;
        top: 0 !important; 
        margin-top: 0 !important;
        left: 0;
        width: 100%;
        height: auto;
        min-height: var(--h-mobile); 
        /* Z-INDEX 100001: Sopra al menu e all'overlay */
        z-index: 100001 !important; 
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Fix per Admin Bar di WordPress */
    body.admin-bar #st-header { top: 0 !important; }
    html { margin-top: 0 !important; }

    .st-header-bar {
        height: auto;
        min-height: var(--h-mobile);
        padding: 5px 15px;
        flex-wrap: wrap;
        gap: 10px;
        background-color: rgb(7, 55, 99);
        display: flex;
        align-items: center;
    }

    /* Elementi Header */
    .st-header-left { width: auto; order: 1; flex: 0 0 auto; }
    .st-header-left .st-brand img { max-height: 35px; }
    .st-header-left .site-branding-text { font-size: 18px; }

    /* --- TOGGLE MENU (LIVELLO MASSIMO) --- */
    .st-nav-toggle {
        display: block !important;
        order: 2;
        margin-left: auto;
        margin-right: 0;
        /* Z-INDEX 100002: L'elemento più in alto di tutti per essere cliccabile */
        z-index: 100002 !important; 
        background: transparent;
        width: 40px;
        height: 40px;
        padding: 5px;
    }

    .st-header-right { order: 3; width: auto; flex: 0 0 auto; }

    /* Nascondi icone desktop */
    .st-header-right .st-icons .user-icon.account,
    .st-header-right .st-icons .user-icon.login,
    .st-header-right .st-icons .user-icon.favorites { display: none !important; }
    
    #st-header .st-header-right .user-icon.cart-link img,
    #st-header .st-header-right .user-icon.cart-link svg {
        width: 24px; height: 24px; filter: brightness(0) invert(1) !important; stroke: #fff !important;
    }

    .st-header-center { order: 4; width: 100%; margin: 5px 0; flex: 1 1 100%; }
    .st-search form { height: 40px; }

    /* --- 3. OVERLAY (LIVELLO BASSO) --- */
    /* Assicuriamoci che l'overlay stia SOTTO il menu */
    .menu-mobile-overlay {
        z-index: 99999 !important; /* Sotto al menu (100000) */
    }
    
    /* --- 4. CONTENITORE MENU (CASSETTO - LIVELLO MEDIO) --- */
    #st-header.is-scrolling .st-nav-bar,
    .st-nav-bar {
        position: fixed !important;
        top: 0 !important;
        padding-top: var(--h-mobile) !important; /* Parte sotto l'header */
        left: -100% !important; /* Nascosto a sinistra */
        width: 100% !important;
        height: 100vh !important;
        max-height: none !important;
        opacity: 1 !important;
        background: #fff !important;
        /* Z-INDEX 100000: Sopra l'overlay, Sotto l'header */
        z-index: 100000 !important; 
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: block !important;
        visibility: visible !important;
        margin: 0 !important;
        border-right: 1px solid #ddd;
    }

    /* QUANDO ATTIVO: Si sposta a sinistra */
    .st-nav-bar.active {
        left: 0 !important;
    }

    .st-nav-container, #st-primary-nav {
        width: 100% !important; padding: 0 !important; margin: 0 !important; display: block !important;
    }

    /* --- 5. STILE MENU LIVELLO 1 --- */
    .st-menu {
        flex-direction: column !important; width: 100% !important; height: auto !important;
        padding-bottom: 80px !important; transition: transform 0.3s ease;
    }

    .st-menu.sub-open { transform: translateX(-20%); }

    .st-menu > li { width: 100% !important; border-bottom: 1px solid #eee !important; display: block !important; }

    .st-menu > li > a {
        display: flex !important; justify-content: space-between; align-items: center;
        padding: 16px 20px !important; color: #333 !important;
        font-size: 16px !important; font-weight: 600 !important;
        background: transparent !important; height: auto !important;
    }

    .st-menu > li.has-mega > a::after {
        content: '›'; font-size: 24px; color: #999; line-height: 1;
    }

    /* --- 6. SOTTOMENU (MEGA MENU) --- */
    .st-mega {
        display: block !important; position: fixed !important; top: 0 !important;
        padding-top: var(--h-mobile) !important; left: 0 !important; width: 100% !important;
        height: 100vh !important; background: #fff !important;
        z-index: 100001 !important; /* Sopra livello 1 */
        overflow-y: auto !important; transform: translateX(100%);
        transition: transform 0.3s ease; visibility: hidden;
    }

    .st-mega.is-active-mobile { transform: translateX(0); visibility: visible; }
    
    .st-mega-inner { padding: 0 !important; }
    .mega-grid { display: block !important; gap: 0 !important; }
    .mega-col { display: block !important; }
    .mega-parent { margin: 0 !important; }

    .mega-parent-link {
        display: flex !important; justify-content: space-between; align-items: center;
        padding: 16px 20px; border-bottom: 1px solid #f1f1f1;
        font-size: 16px !important; color: #073763 !important;
        font-weight: 600 !important; cursor: pointer; pointer-events: auto !important; width: 100%;
    }
    .mega-parent-link::after { content: '›'; font-size: 24px; color: #999; }

    /* --- 7. LIVELLO 3 --- */
    .mega-children {
        position: fixed !important; top: 0 !important; padding-top: var(--h-mobile) !important;
        left: 0 !important; width: 100% !important; height: 100vh !important;
        background: #fff !important;
        z-index: 100002 !important; /* Sopra livello 2 */
        overflow-y: auto !important; transform: translateX(100%);
        transition: transform 0.3s ease; visibility: hidden; border-top: 1px solid #eee;
    }

    .mega-children.is-active-mobile { transform: translateX(0); visibility: visible; }

    .mega-children li a {
        padding: 14px 25px !important; border-bottom: 1px solid #f9f9f9;
        font-size: 15px !important; color: #555 !important; display: block;
    }

    /* --- 8. TASTO INDIETRO --- */
    .mobile-back-btn {
        position: sticky; top: 0; width: 100%; height: 50px;
        background: #f4f4f4; border-bottom: 1px solid #ddd;
        display: flex; align-items: center; padding-left: 15px;
        font-weight: bold; color: #333; text-transform: uppercase;
        font-size: 14px; cursor: pointer; z-index: 10;
    }
    .mobile-back-btn::before { content: '‹'; font-size: 24px; margin-right: 10px; line-height: 0.8; }

    /* --- 9. ICONE UTENTE DENTRO MENU --- */
    .st-mobile-user-menu {
        display: flex !important; flex-direction: column;
        background: #f8fafc; border-bottom: 1px solid #e1e1e1;
    }
    .mobile-user-link {
        padding: 15px 20px; color: #073763; border-bottom: 1px solid #eee;
        display: flex; align-items: center; gap: 10px; font-weight: 600;
    }
}

@media (max-width: 480px) {
    .cart-notification.success.show {
        top: 110px !important;
    }
    
    .st-header-bar {
        padding: 8px 10px;
    }
    
    .st-header-left .site-branding-text {
        font-size: 16px;
    }
    
    .st-search form {
        height: 38px;
    }
    
    .st-search input[type="search"] {
        font-size: 15px;
        padding: 0 12px;
    }
    
    .st-search button,
    .st-search input[type="submit"] {
        padding: 0 15px;
        min-width: 50px;
        font-size: 14px;
    }
}

/* =========================================================
   FIX: NASCONDI ICONE UTENTE MOBILE SU DESKTOP
   ========================================================= */
@media (min-width: 901px) {
    .st-mobile-user-menu {
        display: none !important;
    }
}