/**
 * WooCommerce Remote Products - Frontend CSS
 * Design compatto, pulito e minimalista
 */

/* Container Grid - colonne via CSS custom property --wrp-cols (default 4) */
.wrp-products-grid,
.wrp-categories-grid,
.wrp-items-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--wrp-cols, 4), 1fr) !important;
    gap: 16px !important;
    margin: 30px 0 !important;
}

/* Card Compatta e Pulita con bordi più arrotondati */
.wrp-item-card {
    background: #ffffff !important;
    border: .0625rem solid #d9d9d9!important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Link */
.wrp-item-link {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
}

/*
 * Tema (es. .post-content a:after barra rossa su mobile): il link card
 * copre tutta la card; width:100% sul ::after crea una riga enorme.
 * Specificita >= tema: .post-content a:not(...):after (0,3,2) + !important.
 */
.post-content .wrp-products-grid .wrp-item-card a.wrp-item-link::before,
.post-content .wrp-products-grid .wrp-item-card a.wrp-item-link::after,
.post-content .wrp-categories-grid .wrp-item-card a.wrp-item-link::before,
.post-content .wrp-categories-grid .wrp-item-card a.wrp-item-link::after,
.post-content .wrp-items-grid .wrp-item-card a.wrp-item-link::before,
.post-content .wrp-items-grid .wrp-item-card a.wrp-item-link::after,
.post-content .wrp-products-grid .wrp-item-card a.wrp-book-now-button::before,
.post-content .wrp-products-grid .wrp-item-card a.wrp-book-now-button::after,
.post-content .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::before,
.post-content .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::after,
.post-content .wrp-items-grid .wrp-item-card a.wrp-book-now-button::before,
.post-content .wrp-items-grid .wrp-item-card a.wrp-book-now-button::after,
.wrp-block-wrapper .wrp-products-grid .wrp-item-card a.wrp-item-link::before,
.wrp-block-wrapper .wrp-products-grid .wrp-item-card a.wrp-item-link::after,
.wrp-block-wrapper .wrp-categories-grid .wrp-item-card a.wrp-item-link::before,
.wrp-block-wrapper .wrp-categories-grid .wrp-item-card a.wrp-item-link::after,
.wrp-block-wrapper .wrp-items-grid .wrp-item-card a.wrp-item-link::before,
.wrp-block-wrapper .wrp-items-grid .wrp-item-card a.wrp-item-link::after,
.wrp-block-wrapper .wrp-products-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-block-wrapper .wrp-products-grid .wrp-item-card a.wrp-book-now-button::after,
.wrp-block-wrapper .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-block-wrapper .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::after,
.wrp-block-wrapper .wrp-items-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-block-wrapper .wrp-items-grid .wrp-item-card a.wrp-book-now-button::after,
.elementor-widget-container .wrp-products-grid .wrp-item-card a.wrp-item-link::before,
.elementor-widget-container .wrp-products-grid .wrp-item-card a.wrp-item-link::after,
.elementor-widget-container .wrp-categories-grid .wrp-item-card a.wrp-item-link::before,
.elementor-widget-container .wrp-categories-grid .wrp-item-card a.wrp-item-link::after,
.elementor-widget-container .wrp-items-grid .wrp-item-card a.wrp-item-link::before,
.elementor-widget-container .wrp-items-grid .wrp-item-card a.wrp-item-link::after,
.elementor-widget-container .wrp-products-grid .wrp-item-card a.wrp-book-now-button::before,
.elementor-widget-container .wrp-products-grid .wrp-item-card a.wrp-book-now-button::after,
.elementor-widget-container .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::before,
.elementor-widget-container .wrp-categories-grid .wrp-item-card a.wrp-book-now-button::after,
.elementor-widget-container .wrp-items-grid .wrp-item-card a.wrp-book-now-button::before,
.elementor-widget-container .wrp-items-grid .wrp-item-card a.wrp-book-now-button::after {
    content: none !important;
    display: none !important;
    background: none !important;
    background-color: transparent !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    transform: none !important;
    transition: none !important;
}

/* Carosello: stessa barra tema su ::after (specificita 0,4,2) */
.post-content .wrp-carousel-container .wrp-item-card a.wrp-item-link::before,
.post-content .wrp-carousel-container .wrp-item-card a.wrp-item-link::after,
.post-content .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::before,
.post-content .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::after,
.wrp-block-wrapper .wrp-carousel-container .wrp-item-card a.wrp-item-link::before,
.wrp-block-wrapper .wrp-carousel-container .wrp-item-card a.wrp-item-link::after,
.wrp-block-wrapper .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::before,
.wrp-block-wrapper .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::after,
.elementor-widget-container .wrp-carousel-container .wrp-item-card a.wrp-item-link::before,
.elementor-widget-container .wrp-carousel-container .wrp-item-card a.wrp-item-link::after,
.elementor-widget-container .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::before,
.elementor-widget-container .wrp-carousel-container .wrp-item-card a.wrp-book-now-button::after,
.wrp-carousel-container.wrp-products-grid .wrp-item-card a.wrp-item-link::before,
.wrp-carousel-container.wrp-products-grid .wrp-item-card a.wrp-item-link::after,
.wrp-carousel-container.wrp-categories-grid .wrp-item-card a.wrp-item-link::before,
.wrp-carousel-container.wrp-categories-grid .wrp-item-card a.wrp-item-link::after,
.wrp-carousel-container.wrp-items-grid .wrp-item-card a.wrp-item-link::before,
.wrp-carousel-container.wrp-items-grid .wrp-item-card a.wrp-item-link::after,
.wrp-carousel-container.wrp-products-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-carousel-container.wrp-products-grid .wrp-item-card a.wrp-book-now-button::after,
.wrp-carousel-container.wrp-categories-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-carousel-container.wrp-categories-grid .wrp-item-card a.wrp-book-now-button::after,
.wrp-carousel-container.wrp-items-grid .wrp-item-card a.wrp-book-now-button::before,
.wrp-carousel-container.wrp-items-grid .wrp-item-card a.wrp-book-now-button::after {
    content: none !important;
    display: none !important;
    background: none !important;
    background-color: transparent !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    transform: none !important;
    transition: none !important;
}

/* Immagine Più Compatta */
.wrp-item-image {
    width: 100% !important;
    height: 250px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f9fafb !important;
}

.wrp-item-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

/* Contenuto Compatto */
.wrp-item-content {
    padding: 10px 12px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
}

/* Titolo Compatto */
.wrp-item-title {
    font-family: 'Balto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Prezzo Compatto */
.wrp-item-price {
    font-family: 'Balto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    color: #dd3333 !important;
    margin: 0 !important;
    margin-top: auto !important;
}

/* Pulsante Book Now */
.wrp-book-now-button {
    display: block !important;
    width: calc(100% - 24px) !important;
    padding: 12px 16px !important;
    margin: 12px 12px 16px 12px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    text-align: center !important;
    text-decoration: none !important;
    font-family: 'Balto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 2px solid #1f2937 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.wrp-book-now-button:hover {
    background: #dd3333 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-color: #dd3333 !important;
}

.wrp-book-now-button:active {
    background: #dd3333 !important;
    border-color: #dd3333 !important;
    color: #ffffff !important;
}

/* ============================================================
   CAROSELLO — stili attivi non appena JS aggiunge la classe
   (indipendente dal breakpoint, è il JS a decidere quando farlo)
   ============================================================ */

/* Container del carosello — overflow visible: le frecce non vanno ritagliate */
.wrp-carousel-container {
    position: relative !important;
    overflow: visible !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 20px 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: 100% !important;
    direction: ltr !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    isolation: isolate !important;
}

/* Solo il track viene clippato (Safari / frecce intatte) */
.wrp-carousel-viewport {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    -webkit-overflow-scrolling: touch !important;
}

/*
 * Blocco Gutenberg + carosello: la regola .wrp-block-wrapper .wrp-products-grid
 * impone display:grid (0,2,0) e batte .wrp-carousel-container (0,1,0).
 * Senza display:block il viewport e le frecce diventano item di griglia → layout rotto.
 */
.wrp-block-wrapper .wrp-products-grid.wrp-carousel-container,
.wrp-block-wrapper .wrp-categories-grid.wrp-carousel-container,
.wrp-block-wrapper .wrp-items-grid.wrp-carousel-container {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Wrapper controlli - sovrapposto al container */
.wrp-carousel-controls-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-arrow {
    pointer-events: auto !important;
}

/* Wrapper track — prefissi WebKit (Safari iOS); gap da JS via margin-right */
.wrp-carousel-wrapper {
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-align-items: flex-start !important;
    align-items: flex-start !important;
    -webkit-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    transition: -webkit-transform 0.3s ease-in-out, transform 0.3s ease-in-out !important;
    will-change: transform !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    font-size: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Larghezza slide impostata da JS con !important inline (peek) */
.wrp-carousel-wrapper--peek {
    width: auto !important;
}

.wrp-carousel-wrapper .wrp-item-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    -webkit-align-self: flex-start !important;
    align-self: flex-start !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
    -webkit-flex-shrink: 0 !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    transition: none !important;
}

.wrp-carousel-wrapper > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Nascondi le card originali nel container carosello */
.wrp-carousel-container > .wrp-item-card {
    display: none !important;
}

/* Frecce di navigazione */
.wrp-carousel-controls-wrapper .wrp-carousel-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 100 !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    padding: 0 !important;
    color: #1f2937 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-arrow:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: #d1d5db !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-arrow:active {
    background: rgba(249, 250, 251, 1) !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-prev {
    left: 8px !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-next {
    right: 8px !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-arrow svg {
    width: 18px !important;
    height: 18px !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-arrow:disabled {
    opacity: 0.35 !important;
    cursor: default !important;
    pointer-events: none !important;
}

.wrp-carousel-controls-wrapper .wrp-carousel-pagination {
    display: none !important;
}

/* Card nel carosello */
.wrp-carousel-container .wrp-item-card {
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    height: auto !important;
}

.wrp-carousel-container .wrp-item-image {
    flex: 0 0 auto !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    max-height: 220px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f9fafb !important;
}

.wrp-carousel-container .wrp-item-image img {
    width: 100% !important;
    height: 100% !important;
    max-height: 220px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: none !important;
}

.wrp-carousel-container .wrp-item-content {
    flex: 0 1 auto !important;
    padding: 8px 10px 10px !important;
    margin: 0 !important;
}

.wrp-carousel-container .wrp-item-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    margin: 0 0 4px 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.wrp-carousel-container .wrp-item-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #dd3333 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.wrp-carousel-container .wrp-item-link {
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 1 auto !important;
}

.wrp-carousel-container .wrp-book-now-button {
    width: calc(100% - 50px) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    margin: 10px 25px 14px 25px !important;
    outline: none !important;
    box-shadow: none !important;
}

.wrp-carousel-container .wrp-book-now-button:focus-visible {
    outline: 2px solid #1f2937 !important;
    outline-offset: 2px !important;
}

/* ============================================================
   MOBILE — shortcode fallback griglia 2 colonne senza JS
   ============================================================ */
@media (max-width: 768px) {
    .wrp-products-grid:not(.wrp-carousel-container),
    .wrp-categories-grid:not(.wrp-carousel-container),
    .wrp-items-grid:not(.wrp-carousel-container) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin: 20px 0 !important;
    }

    .wrp-products-grid:not(.wrp-carousel-container) .wrp-item-image,
    .wrp-categories-grid:not(.wrp-carousel-container) .wrp-item-image,
    .wrp-items-grid:not(.wrp-carousel-container) .wrp-item-image {
        height: 200px !important;
    }

    .wrp-products-grid:not(.wrp-carousel-container) .wrp-item-content,
    .wrp-categories-grid:not(.wrp-carousel-container) .wrp-item-content,
    .wrp-items-grid:not(.wrp-carousel-container) .wrp-item-content {
        padding: 8px 10px 10px !important;
    }

    .wrp-products-grid:not(.wrp-carousel-container) .wrp-item-title,
    .wrp-categories-grid:not(.wrp-carousel-container) .wrp-item-title,
    .wrp-items-grid:not(.wrp-carousel-container) .wrp-item-title {
        font-size: 16px !important;
        font-weight: 500 !important;
    }

    .wrp-products-grid:not(.wrp-carousel-container) .wrp-item-price,
    .wrp-categories-grid:not(.wrp-carousel-container) .wrp-item-price,
    .wrp-items-grid:not(.wrp-carousel-container) .wrp-item-price {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #dd3333 !important;
    }
}

/* ============================================================
   BLOCCO GUTENBERG — wrapper con CSS custom properties
   Ha specificità più alta degli shortcode, sovrascrive tutto
   ============================================================ */
.wrp-block-wrapper {
    box-sizing: border-box;
}

/* Reset margini card nella griglia del blocco */
.wrp-block-wrapper .wrp-item-card {
    margin: 0 !important;
    padding: 0 !important;
}

.wrp-block-wrapper .wrp-item-card .wrp-item-image {
    margin: 0 !important;
}

.wrp-block-wrapper .wrp-item-card .wrp-item-image img {
    margin: 0 !important;
    padding: 0 !important;
}

/* Desktop — layout griglia */
.wrp-block-wrapper .wrp-products-grid,
.wrp-block-wrapper .wrp-categories-grid,
.wrp-block-wrapper .wrp-items-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--wrp-cols-desktop, 3), 1fr) !important;
    padding-left: var(--wrp-offset-h, 0px) !important;
    padding-right: var(--wrp-offset-h, 0px) !important;
    box-sizing: border-box !important;
    gap: 16px !important;
    margin: 30px 0 !important;
}

/* Desktop — tipografia
   Specificita 0,5,1 batte Elementor (0,4,0) grazie al selettore raddoppiato */
.wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content h3.wrp-item-title,
.wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link h3.wrp-item-title,
.wrp-block-wrapper.wrp-block-wrapper h3.wrp-item-title {
    font-size: var(--wrp-title-fs-d, 16px) !important;
    font-weight: var(--wrp-title-fw, 500) !important;
    line-height: var(--wrp-title-lh, 1.3) !important;
}

.wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content p.wrp-item-price,
.wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link p.wrp-item-price,
.wrp-block-wrapper.wrp-block-wrapper p.wrp-item-price {
    font-size: var(--wrp-price-fs-d, 21px) !important;
    font-weight: var(--wrp-price-fw, 700) !important;
    line-height: 1.2 !important;
}

.wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-book-now-button,
.wrp-block-wrapper.wrp-block-wrapper .wrp-book-now-button {
    font-size: var(--wrp-btn-fs-d, 16px) !important;
    font-weight: var(--wrp-btn-fw, 600) !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .wrp-block-wrapper .wrp-products-grid,
    .wrp-block-wrapper .wrp-categories-grid,
    .wrp-block-wrapper .wrp-items-grid {
        grid-template-columns: repeat(var(--wrp-cols-tablet, 2), 1fr) !important;
        gap: 14px !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content h3.wrp-item-title,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link h3.wrp-item-title,
    .wrp-block-wrapper.wrp-block-wrapper h3.wrp-item-title {
        font-size: var(--wrp-title-fs-t, 15px) !important;
        line-height: var(--wrp-title-lh, 1.3) !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content p.wrp-item-price,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link p.wrp-item-price,
    .wrp-block-wrapper.wrp-block-wrapper p.wrp-item-price {
        font-size: var(--wrp-price-fs-t, 19px) !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-book-now-button,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-book-now-button {
        font-size: var(--wrp-btn-fs-t, 15px) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wrp-block-wrapper .wrp-products-grid:not(.wrp-carousel-container),
    .wrp-block-wrapper .wrp-categories-grid:not(.wrp-carousel-container),
    .wrp-block-wrapper .wrp-items-grid:not(.wrp-carousel-container) {
        display: grid !important;
        grid-template-columns: repeat(var(--wrp-cols-mobile, 1), 1fr) !important;
        gap: 12px !important;
        margin: 20px 0 !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content h3.wrp-item-title,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link h3.wrp-item-title,
    .wrp-block-wrapper.wrp-block-wrapper h3.wrp-item-title {
        font-size: var(--wrp-title-fs-m, 14px) !important;
        line-height: var(--wrp-title-lh, 1.3) !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-content p.wrp-item-price,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-item-link p.wrp-item-price,
    .wrp-block-wrapper.wrp-block-wrapper p.wrp-item-price {
        font-size: var(--wrp-price-fs-m, 16px) !important;
    }

    .wrp-block-wrapper.wrp-block-wrapper .wrp-item-card .wrp-book-now-button,
    .wrp-block-wrapper.wrp-block-wrapper .wrp-book-now-button {
        font-size: var(--wrp-btn-fs-m, 14px) !important;
    }
}

/* ============================================================
   EDITOR GUTENBERG — carosello senza JS (iframe non esegue frontend.js)
   Classe .wrp-block-wrapper--carousel-editor solo in anteprima REST
   ============================================================ */
.wrp-block-wrapper--carousel-editor .wrp-products-grid:not(.wrp-carousel-container),
.wrp-block-wrapper--carousel-editor .wrp-categories-grid:not(.wrp-carousel-container),
.wrp-block-wrapper--carousel-editor .wrp-items-grid:not(.wrp-carousel-container) {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch !important;
    gap: var(--wrp-carousel-gap-px, 12px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    grid-template-columns: none !important;
    margin: 16px 0 !important;
    padding-left: max(8px, calc((100% - var(--wrp-carousel-pct-d, 33%)) / 2)) !important;
    padding-right: max(8px, calc((100% - var(--wrp-carousel-pct-d, 33%)) / 2)) !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.wrp-block-wrapper--carousel-editor .wrp-item-card {
    flex: 0 0 var(--wrp-carousel-pct-d, 33%) !important;
    min-width: var(--wrp-carousel-pct-d, 33%) !important;
    max-width: var(--wrp-carousel-pct-d, 33%) !important;
    scroll-snap-align: center !important;
    box-sizing: border-box !important;
    height: auto !important;
}

.block-editor-block-preview__content .wrp-block-wrapper--carousel-editor .wrp-products-grid:not(.wrp-carousel-container),
.block-editor-block-preview__content .wrp-block-wrapper--carousel-editor .wrp-categories-grid:not(.wrp-carousel-container),
.block-editor-block-preview__content .wrp-block-wrapper--carousel-editor .wrp-items-grid:not(.wrp-carousel-container) {
    display: flex !important;
    flex-flow: row nowrap !important;
    gap: var(--wrp-carousel-gap-px, 12px) !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    grid-template-columns: none !important;
    padding-left: max(8px, calc((100% - var(--wrp-carousel-pct-d, 33%)) / 2)) !important;
    padding-right: max(8px, calc((100% - var(--wrp-carousel-pct-d, 33%)) / 2)) !important;
}

.block-editor-block-preview__content .wrp-block-wrapper--carousel-editor .wrp-item-card {
    flex: 0 0 var(--wrp-carousel-pct-d, 33%) !important;
    min-width: var(--wrp-carousel-pct-d, 33%) !important;
    max-width: var(--wrp-carousel-pct-d, 33%) !important;
    scroll-snap-align: center !important;
    height: auto !important;
}
