/* ==========================================================================
   SINGLE PRODUCT – ELASTIC LAYOUT, TYPOGRAPHY & RACING BADGES
   Layout: Dinamico | Badge: In linea sotto Titolo | Style: Specialized Inspired
   ========================================================================== */

/* 1. CONTENITORE E STRUTTURA DINAMICA 
   ========================================================================== */
.single-product .ast-woocommerce-container {
    max-width: 85% !important; 
    margin: 0 auto !important;
    width: 100%;
}

.single-product .product {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Pulizia Categorie */
.single-product-category a,
.woocommerce-js div.product div.summary .single-product-category {
    display: none;
}

/* 2. BADGES SYSTEM (SOTTO IL TITOLO)
   ========================================================================== */
.custom-badge-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem; /* 10px */
    margin: 0.5rem 0 1.5rem 0; 
    line-height: 1;
    clear: both;
}

/* Stile Base Badge Elastic */
.badge-discount, 
.badge-latest,
.badge-blackfriday {
    font-family: 'Oswald', sans-serif !important;
    padding: 0.4em 0.9em; 
    font-size: 1.1rem !important; /* Mantenuta tua dimensione generosa */
    font-weight: 800;
    font-style: italic !important; /* Look Racing */
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 0.125rem !important; /* Angoli netti stile tecnico */
    display: inline-flex;
    align-items: center;
    height: fit-content;
    width: fit-content;
    box-shadow: 0 0.15rem 0.3rem rgba(0,0,0,0.1);
}

/* Badge Sconto e Novità: Gradiente Orange-Yellow */
.badge-discount, 
.badge-latest {
    background: linear-gradient(135deg, #ff5b00 0%, #ffcc00 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

/* Badge Black Friday: Nero e Giallo */
.badge-blackfriday {
    background-color: #000000 !important;
    color: #ffcc00 !important;
    border: 0.0625rem solid #ffcc00 !important;
}

/* 3. TIPOGRAFIA TITOLO E META 
   ========================================================================== */
h1.product_title.entry-title {
    font-family: 'Oswald', sans-serif !important;
    font-size: 2.25rem !important;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 1em 0 0.5em 0 !important; /* Ridotto margine bottom per vicinanza badge */
}

.posted_in a {
    font-style: italic;
    color: #3e3d3d !important;
    transition: all 0.2s ease;
}

.posted_in a:hover {
    font-weight: 700 !important;
    color: #ff5b00 !important;
}

/* 4. TIPOGRAFIA PREZZO 
   ========================================================================== */
.single-product p.price {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline !important;
    gap: 0.75rem; 
    margin: 1.5rem 0 !important;
}

.single-product p.price del {
    font-size: 1.25rem !important;
    color: #888 !important;
    text-decoration: line-through;
    font-weight: 400;
}

.single-product p.price ins,
.single-product p.price > .woocommerce-Price-amount {
    font-size: 2.2rem !important;
    font-weight: 900;
    text-decoration: none;
    color: #111111; /* Colore base */
    line-height: 1;
}

/* Prezzo scontato in Arancione */
.single-product p.price ins .woocommerce-Price-amount {
    color: #ff5b00 !important;
}

/* 5. DESCRIZIONE E FORM CARRELLO (Personalizzati)
   ========================================================================== */
.woocommerce-product-details__short-description {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: #3d3d3d;
    margin: 2em 0;
    text-align: justify;
}

/* Nasconde Carrello e Quantità come richiesto */
.quantity .qty,
.button.single_add_to_cart_button {
    display: none !important;
}    

label, legend {
    color: #000000;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 600 !important;
    line-height: 1.3em;
    margin-top: 0.75em !important;
}

.woocommerce-js div.product form.cart .variations td,
.woocommerce-js div.product form.cart .variations th {
    border: 0;
    vertical-align: baseline;
    line-height: 2em;
    padding: 0;
    display: inline; 
}


/* 7. RESPONSIVE DESIGN 
   ========================================================================== */
@media (max-width: 921px) {
    .single-product .ast-woocommerce-container {
        max-width: 95% !important;
    }
    
    h1.product_title.entry-title {
        font-size: 1.8rem !important;
    }
    
    .single-product p.price ins,
    .single-product p.price > .woocommerce-Price-amount {
        font-size: 1.9rem !important;
    }
}

@media (max-width: 544px) {
    .custom-badge-wrapper {
        gap: 0.5rem;
    }
    
    .badge-discount, 
    .badge-latest, 
    .badge-blackfriday {
        font-size: 0.9rem !important; /* Scalato per mobile */
        padding: 0.3em 0.7em;
    }
}