/*
 * Piggy Pet Style — piggypet-style.css
 * Palette: #f959c4 (brand pink), #ee3a77 (CTA primaria), #d12f69 (hover)
 * Font: Nunito (Google Fonts)
 * Version: 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════
   1. FONT — Nunito su tutto il sito
   (il font viene caricato da Elementor/Minimog via functions.php,
    non da questo plugin)
   ═══════════════════════════════════════════════════════════════════ */

body,
h1, h2, h3, h4, h5, h6,
p, a, li, td, th, label,
button, input, select, textarea,
.entry-summary,
.woocommerce-product-details__short-description,
.minimog-size-guide,
.woocommerce-tabs,
.woocommerce-Reviews {
    font-family: 'Nunito', sans-serif !important;
}
/* span è escluso intenzionalmente: gli icon-font (LightGallery, admin bar, ecc.)
   usano <span> con font-family propri. I nostri blocchi .pp-* hanno già
   font-family: Nunito esplicito. I <span> generici ereditano da body. */

.product_title.entry-title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}

.woocommerce-Price-amount.amount {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
}


/* ═══════════════════════════════════════════════════════════════════
   2. NASCONDE rating nativo WooCommerce sulla PDP
      (sostituito da pp-store-rating-badge)
   ═══════════════════════════════════════════════════════════════════ */

.single-product .woocommerce-product-rating {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   2b. SWATCHES — raggruppati per linea (Bassotto / Standard / Bulldog)
   ═══════════════════════════════════════════════════════════════════ */

/* Il container insight-swatches diventa un flex colonna quando ci sono gruppi */
.isw-swatch[data-attribute="pa_taglie"]:has(.pp-swatch-group) {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.pp-swatch-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    text-align: left;
}

.pp-swatch-group__label {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.pp-swatch-group--bassotto .pp-swatch-group__label { color: #ee3a77; }
.pp-swatch-group--bulldog  .pp-swatch-group__label { color: #d12f69; }
.pp-swatch-group--standard .pp-swatch-group__label { color: #888; }

.pp-swatch-group__options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════════
   3. CTA — gerarchia bottoni
   Minimog usa CSS custom properties per i colori dei bottoni.
   Sovrascriviamo le variabili direttamente invece di usare !important
   su background/color, così vinciamo il sistema Redux del tema.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Primario: Aggiungi al carrello ─────────────────────────────────
   Override delle CSS vars Minimog + fallback con proprietà dirette  */
.single-product .single_add_to_cart_button:not(.button-buy-now) {
    --minimog-color-button-background:       #ee3a77;
    --minimog-color-button-border:           #ee3a77;
    --minimog-color-button-text:             #fff;
    --minimog-color-button-hover-background: #d12f69;
    --minimog-color-button-hover-border:     #d12f69;
    --minimog-color-button-hover-text:       #fff;
    /* Fallback espliciti per sicurezza */
    background-color: #ee3a77 !important;
    border-color:     #ee3a77 !important;
    color:            #fff    !important;
    font-family:      'Nunito', sans-serif !important;
    font-weight:      700 !important;
    letter-spacing:   0.3px !important;
}
.single-product .single_add_to_cart_button:not(.button-buy-now):hover {
    background-color: #d12f69 !important;
    border-color:     #d12f69 !important;
    color:            #fff    !important;
    box-shadow: 0 0 0 0.2rem rgba(209, 47, 105, 0.35) !important;
}

/* ── Secondario: Acquista Ora — outline ─────────────────────────────
   button-buy-now usa .button-2 che eredita --minimog-color-button2-*
   Li sovrascriviamo tutti per ottenere lo stile outline brand        */
.single-product .single_add_to_cart_button.button-buy-now {
    --minimog-color-button-background:       #fff;
    --minimog-color-button-border:           #ee3a77;
    --minimog-color-button-text:             #ee3a77;
    --minimog-color-button-hover-background: #f959c4;
    --minimog-color-button-hover-border:     #f959c4;
    --minimog-color-button-hover-text:       #fff;
    --minimog-color-button2-background:       #fff;
    --minimog-color-button2-border:           #ee3a77;
    --minimog-color-button2-text:             #ee3a77;
    --minimog-color-button2-hover-background: #f959c4;
    --minimog-color-button2-hover-border:     #f959c4;
    --minimog-color-button2-hover-text:       #fff;
    /* Fallback espliciti */
    background-color: #fff     !important;
    color:            #ee3a77  !important;
    border:           2px solid #ee3a77 !important;
    font-family:      'Nunito', sans-serif !important;
    font-weight:      700 !important;
    box-shadow:       none !important;
}
.single-product .single_add_to_cart_button.button-buy-now:hover {
    background-color: #f959c4 !important;
    color:            #fff    !important;
    border-color:     #f959c4 !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 89, 196, 0.35) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   3. STORE RATING BADGE
   ═══════════════════════════════════════════════════════════════════ */

.pp-store-rating-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff0f8;
    border: 1px solid #f8c6e8;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 10px 0 14px;
    font-size: 13px;
    color: #333;
    font-family: 'Nunito', sans-serif;
}
.pp-store-rating-badge .pp-stars {
    color: #f959c4;
    font-size: 16px;
}
.pp-store-rating-badge .pp-rating-label {
    font-size: 11px;
    color: #999;
}


/* ═══════════════════════════════════════════════════════════════════
   4. BANNER APERTURA PRODOTTO
   ═══════════════════════════════════════════════════════════════════ */

.pp-opening-banner {
    background: #fff0f8;
    border-left: 4px solid #ee3a77;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    font-family: 'Nunito', sans-serif;
}
.pp-opening-banner strong {
    color: #1a1a1a;
    font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════════
   5a. INTRO "TAGLIA SENZA PENSIERI" — blocco sopra il wizard
   ═══════════════════════════════════════════════════════════════════ */

.pp-taglia-intro {
    background: linear-gradient(135deg, #fff0f8 0%, #fde8f7 100%);
    border: 1.5px solid #f5c2d4;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 14px 0 10px;
    font-family: 'Nunito', sans-serif;
}
.pp-taglia-intro__title {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.pp-taglia-intro__list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 14px;
    color: #444;
    line-height: 2;
}
.pp-taglia-intro__list li {
    padding: 0;
}
.pp-taglia-intro__cta {
    display: inline-block;
    background: #ee3a77;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    font-family: 'Nunito', sans-serif;
    transition: background .2s;
}
.pp-taglia-intro__cta:hover {
    background: #d12f69;
}

/* ═══════════════════════════════════════════════════════════════════
   5b. WIZARD TAGLIA + ACCORDION TABELLA MISURE
   ═══════════════════════════════════════════════════════════════════ */

/* ── Wrapper wizard ─────────────────────────────────────────────── */
.pp-size-wizard {
    background: linear-gradient(135deg, #fff0f8 0%, #fde8f7 100%);
    border: 1.5px solid #f5c2d4;
    border-radius: 14px;
    padding: 22px 22px 18px;
    margin: 18px 0 12px;
    font-family: 'Nunito', sans-serif;
}
.pp-size-wizard__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.pp-size-wizard__subtitle {
    font-size: 13px;
    color: #777;
    margin-bottom: 16px;
}

/* ── Inputs: razza + peso ───────────────────────────────────────── */
.pp-size-wizard__inputs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.pp-size-wizard__field--breed { flex: 2; min-width: 160px; }
.pp-size-wizard__field--weight { flex: 1; min-width: 100px; }

.pp-size-wizard__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pp-size-wizard__select,
.pp-size-wizard__input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #f8c6e8;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    font-family: 'Nunito', sans-serif;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .2s;
    padding: 10px;
}
.pp-size-wizard__select:focus,
.pp-size-wizard__input:focus {
    border-color: #ee3a77;
}

/* ── Box risultato ──────────────────────────────────────────────── */
.pp-size-wizard__result {
    margin-top: 16px;
    background: #fff;
    border: 2px solid #ee3a77;
    border-radius: 10px;
    padding: 14px 18px;
    font-family: 'Nunito', sans-serif;
}


/* ── Pulsante (i) info taglia ───────────────────────────────────── */
.pp-info-btn {
    background: none;
    border: 1.5px solid #ee3a77;
    border-radius: 50%;
    color: #ee3a77;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    width: 16px;
    height: 16px;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    font-family: 'Nunito', sans-serif;
}
.pp-info-btn:hover {
    background: #ee3a77;
    color: #fff;
}

/* ── Popup informativo ──────────────────────────────────────────── */
.pp-info-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1.5px solid rgba(238,58,119,0.2);
    border-radius: 12px;
    padding: 16px 18px 14px;
    font-size: 13px;
    line-height: 1.65;
    color: #444;
    box-shadow: 0 8px 32px rgba(0,0,0,0.11);
    width: 270px;
    font-family: 'Nunito', sans-serif;
}
.pp-info-popup p {
    margin: 0 0 8px;
}
.pp-info-popup p:last-child {
    margin: 0;
}
.pp-info-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #bbb;
    line-height: 1;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    transition: color .2s;
}
.pp-info-popup__close:hover {
    color: #555;
}

/* ── Fallback WhatsApp ──────────────────────────────────────────── */
.pp-size-wizard__wa-fallback {
    margin-top: 14px;
    font-size: 13px;
    color: #777;
    text-align: center;
}

/* ── Bottone Aggiungi al carrello nel wizard — rosa CTA primaria ── */
.pp-btn-cart {
    display: inline-block;
    background: #ee3a77;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 0px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    font-family: 'Nunito', sans-serif;
    transition: background .2s;
    white-space: nowrap;
}
.pp-btn-cart:hover { background: #d12f69; }

.pp-btn-cart--loading {
    background: #c8c8c8 !important;
    cursor: not-allowed !important;
    opacity: 0.85;
}
.pp-btn-cart--done {
    background: #2ecc71 !important;
    cursor: default !important;
}

/* ── Bottone WhatsApp — verde brand ─────────────────────────────── */
.pp-btn-wa {
    display: inline-block;
    background: #25D366;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    font-family: 'Nunito', sans-serif;
    transition: background .2s;
}
.pp-btn-wa:hover { background: #1ebe5a; }

/* ── Accordion tabella misure ───────────────────────────────────── */
.pp-tabella-accordion-wrap {
    margin-bottom: 8px;
}
.pp-tabella-toggle {
    width: 100%;
    background: none;
    border: 1px solid #f8c6e8;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 13px;
    color: #c2006e;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: background .2s;
}
#pp-arrow {
    font-size: 11px;
    transition: transform .2s;
}
.pp-tabella-accordion {
    margin-top: 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.pp-tabella-inner {
    padding: 8px;
    overflow-x: auto;
}

/* ── Tabella misure ─────────────────────────────────────────────── */
.pp-tabella-misure {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
}
.pp-tabella-misure thead tr {
    background: #f8f8f8;
}
.pp-tabella-misure th {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
    font-weight: 700;
    color: #333;
}
.pp-tabella-misure td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.pp-tabella-misure .pp-row-alt td {
    background: #fafafa;
}
.pp-col-size {
    font-weight: 700 !important;
    white-space: nowrap;
}
.pp-col-breed {
    color: #777 !important;
}

/* Intestazioni di sezione nella tabella */
.pp-section-row td {
    padding: 6px 10px !important;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.pp-section-bassotto td { background: #fff0f8; color: #ee3a77; }
.pp-section-bulldog  td { background: #fde8f7; color: #d12f69; }
.pp-section-standard td { background: #fdf4fb; color: #c2006e; }


/* ═══════════════════════════════════════════════════════════════════
   6. MINI RECENSIONI (vicino alla selezione taglia)
   ═══════════════════════════════════════════════════════════════════ */

.pp-mini-reviews {
    margin: 14px 0 6px;
    font-family: 'Nunito', sans-serif;
}
.pp-mini-reviews__label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.pp-mini-review-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}
.pp-mini-review-item .pp-stars {
    color: #f959c4;
}
.pp-mini-review-item .pp-reviewer {
    color: #aaa;
    font-size: 11px;
    margin-left: 6px;
}


/* ═══════════════════════════════════════════════════════════════════
   7. MICROCOPY WHATSAPP sotto CTA
   ═══════════════════════════════════════════════════════════════════ */

.pp-wa-microcopy {
    text-align: center;
    margin: 10px 0 4px;
    font-size: 14px;
    color: #555;
    font-family: 'Nunito', sans-serif;
}
.pp-wa-link {
    color: #25D366 !important;
    font-weight: 700;
    text-decoration: none !important;
}
.pp-wa-link:hover {
    text-decoration: underline !important;
}


/* ═══════════════════════════════════════════════════════════════════
   8. TABELLA MISURE — dati reali da minimog_size_guide, UI custom
   ═══════════════════════════════════════════════════════════════════ */

/* Titolo e descrizione della tabella (es. "Abbigliamento") */
.pp-size-table__name {
    font-size: 12px;
    font-weight: 700;
    color: #ee3a77;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0 4px;
    font-family: 'Nunito', sans-serif;
}
.pp-size-table__desc {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    font-family: 'Nunito', sans-serif;
}
.pp-size-table__info {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    font-family: 'Nunito', sans-serif;
}

/* Wrapper scrollabile su mobile */
.pp-size-table__wrapper {
    overflow-x: auto;
}

/* La tabella */
.pp-tabella-misure {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
}
.pp-tabella-misure thead tr {
    background: #f8f8f8;
}
.pp-tabella-misure th {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 2px solid #eee;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}
.pp-tabella-misure td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.pp-tabella-misure .pp-row-alt td {
    background: #fafafa;
}
/* Prima colonna = nome taglia, grassetto */
.pp-tabella-misure .pp-col-size {
    font-weight: 700;
    white-space: nowrap;
}

/* ── Righe intestazione di sezione (Bassotto / Bulldog / Standard) ── */
.pp-tabella-misure .pp-section-row td {
    padding: 8px 10px 6px !important;
    border-bottom: none !important;
    line-height: 1.3;
}
.pp-section-bassotto td { background: #fff0f8; }
.pp-section-bulldog  td { background: #fde8f7; }
.pp-section-standard td { background: #fdf4fb; }

.pp-section-row__label {
    display: block;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.pp-section-bassotto .pp-section-row__label { color: #ee3a77; }
.pp-section-bulldog  .pp-section-row__label { color: #d12f69; }
.pp-section-standard .pp-section-row__label { color: #c2006e; }

.pp-section-row__sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    margin-top: 1px;
}
.pp-section-bassotto .pp-section-row__sub { color: #c2006e; }
.pp-section-bulldog  .pp-section-row__sub { color: #b02060; }
.pp-section-standard .pp-section-row__sub { color: #a0005a; }


/* ═══════════════════════════════════════════════════════════════════
   9. RESPONSIVE — wizard su mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .pp-size-wizard {
        padding: 16px 16px 14px;
    }
    .pp-size-wizard__inputs {
        flex-direction: row;
    }
    .pp-size-wizard__field--breed,
    .pp-size-wizard__field--weight {
        flex: unset;
        width: 100%;
        min-width: unset;
    }
    .pp-tabella-misure {
        font-size: 12px;
    }
    .pp-tabella-misure th,
    .pp-tabella-misure td {
        padding: 6px 7px;
    }
}
