/*
Theme Name: VroomVroom Theme Storefront Child
Theme URI: #
Description: Tema child per Storefront in VroomVroom
Author: SYE-ADTECH
Template: storefront
Version: 1.0
*/

/* ==========================
   VARIABILI GLOBALI COLORI
   ========================== */
:root {
    --color-primary: #046bd2;    /* blu principale */
    --color-accent: #fba926;     /* arancio accent */
    --color-text-dark: #000000;  /* testo nero */
    --color-text-light: #ffffff; /* testo bianco */
}

/* Importa lo stile del tema genitore */
@import url("../storefront/style.css");

/* ==========================
   GENERAL
   ========================== */
   
a:focus{
    outline:none !important;
}

/* ==========================
   HEADER E NAVBAR
   ========================== */
.site-header {
    background: none !important;
}

.storefront-primary-navigation {
    background: var(--color-accent);
    transition: all 0.3s ease;
}
.storefront-primary-navigation.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 9999;
}

.storefront-primary-navigation a {
    color: var(--color-text-light) !important;
}
/* Se sei loggato con la barra di amministrazione */
.admin-bar .storefront-primary-navigation {
    top: 32px; /* evita sovrapposizione con la WP admin bar */
}

/* ==========================
   HOMEPAGE
   ========================== */
.page-template-template-homepage:not(.has-post-thumbnail) .site-main {
    padding-top: 0;
}

.page-template-template-homepage .entry-content,
.page-template-template-homepage .entry-header {
    max-width: 100% !important;
}

.page-template-template-homepage .type-page {
    padding-bottom: 0;
}

/* ==========================
   PRODOTTI
   ========================== */
ul.products li.product img.attachment-woocommerce_thumbnail {
    border: 3px dashed var(--color-primary);
    border-radius: 20px;
    margin-bottom: 18px;
    transition: border-color 0.3s ease;
}

ul.products li.product:hover img.attachment-woocommerce_thumbnail {
    border-color: var(--color-accent);
}

ul.products li.product .button {
    font-weight: 600;
    border-style: dotted;
    border-radius: 30px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

ul.products li.product .button:hover {
    color: var(--color-text-dark);
}

ul.products li.product .price {
    color: var(--color-text-dark) !important;
    font-weight: 600 !important;
    font-size: 25px;
}

ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* numero di righe visibili */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.4em;
    max-height: 2.8em;
    min-height: 2.8em;
}
p.price span.woocommerce-Price-amount{
    font-size: 45px;
    font-weight: 600;
    font-style: normal;
    text-decoration: none;
    line-height: 1.1em;
    letter-spacing: 0px;
    word-spacing: 0em;
}

/* Prezzi scontati - prezzo scontato con sfondo dorato */
p.price ins {
    text-decoration: none;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    padding: 5px 12px;
    border-radius: 8px;
    display: inline-block;
}

p.price ins span.woocommerce-Price-amount {
    font-size: 45px;
    color: var(--color-text-light);
}

/* Prezzi scontati - prezzo originale barrato 25% più piccolo */
p.price del {
    text-decoration: line-through;
    opacity: 0.7;
    display: inline-block;
    margin-right: 10px;
}

p.price del span.woocommerce-Price-amount {
    font-size: 33.75px; /* 75% di 45px = 25% più piccolo */
    font-weight: 400;
    color: var(--color-text-dark);
}

/* Stili per liste prodotti con prezzo scontato */
ul.products li.product .price ins {
    text-decoration: none;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    padding: 3px 8px;
    border-radius: 6px;
}

ul.products li.product .price ins span.woocommerce-Price-amount {
    color: var(--color-text-light);
}

ul.products li.product .price del {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 8px;
}

ul.products li.product .price del span.woocommerce-Price-amount {
    font-size: 18.75px; /* 75% di 25px = 25% più piccolo */
    font-weight: 400;
}

/* Stili per sezioni related, upsells, cross-sells */
section.related.products ul.products li.product .price ins,
section.upsells.products ul.products li.product .price ins,
section.cross-sells ul.products li.product .price ins,
.storefront-product-section ul.products li.product .price ins {
    text-decoration: none !important;
    background-color: var(--color-accent) !important;
    color: var(--color-text-light) !important;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

section.related.products ul.products li.product .price ins span.woocommerce-Price-amount,
section.upsells.products ul.products li.product .price ins span.woocommerce-Price-amount,
section.cross-sells ul.products li.product .price ins span.woocommerce-Price-amount,
.storefront-product-section ul.products li.product .price ins span.woocommerce-Price-amount {
    color: var(--color-text-light) !important;
}

section.related.products ul.products li.product .price del,
section.upsells.products ul.products li.product .price del,
section.cross-sells ul.products li.product .price del,
.storefront-product-section ul.products li.product .price del {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 8px;
}

section.related.products ul.products li.product .price del span.woocommerce-Price-amount,
section.upsells.products ul.products li.product .price del span.woocommerce-Price-amount,
section.cross-sells ul.products li.product .price del span.woocommerce-Price-amount,
.storefront-product-section ul.products li.product .price del span.woocommerce-Price-amount {
    font-size: 18.75px;
    font-weight: 400;
    color: var(--color-text-dark);
}

/* ==========================
    SEZIONE TITOLI
   ========================== */
.storefront-product-section .section-title {
    font-size: 62px;
    font-weight: 700;
    letter-spacing: -2.8px;
    color: var(--color-text-dark);
}

.storefront-breadcrumb {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
}
.page-title,.entry-title{
    font-weight: 400;
 }
.product_title entry-title{
    font-weight: 600 !important;
    font-style: normal;
    text-decoration: none;
    line-height: 1em;
    letter-spacing: 0.5px;
}
/* ==========================
   WCFM STORE CATEGORIES SIDEBAR
   ========================== */
/* Stile per le categorie nella sidebar dello shop venditore */
#wcfmmp-store .categories_list ul li a {
    color: var(--color-text-dark);
    font-weight: 500;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

#wcfmmp-store .categories_list ul li a:hover,
#wcfmmp-store .categories_list ul li a.active {
    color: var(--color-accent) !important;
    font-weight: 600;
}

/* Titolo sezione categorie */
#wcfmmp-store .sidebar_heading h4 {
    color: var(--color-primary);
    font-weight: 600;
}

/* Stock/Disponibilità prodotti nello store */
#wcfmmp-store .stock,
.wcfmmp-store-page .stock {
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

#wcfmmp-store .stock.in-stock,
.wcfmmp-store-page .stock.in-stock {
    color: #28a745 !important; /* verde disponibile */
}

#wcfmmp-store .stock.out-of-stock,
.wcfmmp-store-page .stock.out-of-stock {
    color: #dc3545 !important; /* rosso non disponibile */
}

/* Badge di disponibilità nei prodotti */
#wcfmmp-store ul.products li.product .stock,
.wcfmmp-store-page ul.products li.product .stock {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

/* Categoria attiva con indicatore visivo */
#wcfmmp-store .categories_list ul li a.active::before {
    content: "›";
    margin-right: 5px;
    font-weight: bold;
    color: var(--color-accent);
}

/* Migliora spaziatura categorie figlie */
#wcfmmp-store .categories_list ul li.child_cat,
#wcfmmp-store .categories_list ul li.child2_cat,
#wcfmmp-store .categories_list ul li.child3_cat {
    font-size: 14px;
}

/* ==========================
   WCFM STORE SALE PRICES (prezzi scontati nello shop venditore)
   ========================== */
/* Prezzo scontato con sfondo dorato */
#wcfmmp-store ul.products li.product .price ins,
.wcfmmp-store-page ul.products li.product .price ins,
body.wcfmmp-store-page ul.products li.product .price ins {
    text-decoration: none !important;
    background-color: var(--color-accent) !important;
    color: var(--color-text-light) !important;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

#wcfmmp-store ul.products li.product .price ins span.woocommerce-Price-amount,
.wcfmmp-store-page ul.products li.product .price ins span.woocommerce-Price-amount,
body.wcfmmp-store-page ul.products li.product .price ins span.woocommerce-Price-amount {
    color: var(--color-text-light) !important;
    font-size: inherit;
}

/* Prezzo originale barrato */
#wcfmmp-store ul.products li.product .price del,
.wcfmmp-store-page ul.products li.product .price del,
body.wcfmmp-store-page ul.products li.product .price del {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 8px;
}

#wcfmmp-store ul.products li.product .price del span.woocommerce-Price-amount,
.wcfmmp-store-page ul.products li.product .price del span.woocommerce-Price-amount,
body.wcfmmp-store-page ul.products li.product .price del span.woocommerce-Price-amount {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-dark);
}

/* ==========================
    FOOTER
   ========================== */
footer .widget .widget-title{
        font-weight: 700;
}
.site-footer{
    padding:0px !important;
}
