/* =========================================================
   PGR Ho.Re.Ca — stili frontend
   Palette arancione: #f97316 (primary) / #ea580c (hover)
   ========================================================= */

/* --- PUNTO 4: collassa completamente il widget carosello
       quando non produce output (cliente non autorizzato) --- */
.elementor-widget-pgr_horeca_carousel > .elementor-widget-container:empty { display: none !important; }
.elementor-widget-pgr_horeca_carousel:has(> .elementor-widget-container:empty) { display: none !important; margin: 0 !important; padding: 0 !important; }

/* Nota mostrata solo nell'editor Elementor */
.pgr-horeca-editor-note {
    padding: 18px 20px;
    border: 1px dashed #f97316;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   CAROSELLO — fallback a griglia se lo slick del tema
   non è caricato su questa pagina (le card restano quelle
   del tema, quindi identiche a "Imballo e Spedizioni").
   ========================================================= */
.pgr-horeca-carousel .pgr-horeca-track:not(.slick-initialized) {
    display: grid;
    grid-template-columns: repeat(var(--pgr-cols, 5), 1fr);
    gap: 30px;
}
.pgr-horeca-carousel .pgr-horeca-track.slick-initialized {
    display: block;
}
.pgr-horeca-carousel .pgr-horeca-track:not(.slick-initialized) .slider-item {
    width: auto !important;
}
@media (max-width: 1024px) {
    .pgr-horeca-carousel .pgr-horeca-track:not(.slick-initialized) {
        grid-template-columns: repeat(var(--pgr-cols-t, 3), 1fr);
    }
}
@media (max-width: 767px) {
    .pgr-horeca-carousel .pgr-horeca-track:not(.slick-initialized) {
        grid-template-columns: repeat(var(--pgr-cols-m, 1), 1fr);
    }
}

/* =========================================================
   CATALOGO PER CATEGORIA — stile "premi" in ARANCIONE
   ========================================================= */
.pgr-horeca-catalog { margin: 20px 0; }

.pgr-horeca-cat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 34px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fed7aa;
}
.pgr-horeca-catalog .pgr-horeca-cat-head:first-child { margin-top: 0; }
.pgr-horeca-cat-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #9a3412;
    line-height: 1.2;
}
.pgr-horeca-cat-count {
    font-size: 13px;
    font-weight: 600;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 4px 12px;
    border-radius: 50px;
    white-space: nowrap;
}

.pgr-horeca-grid {
    display: grid;
    gap: 24px;
    margin: 0 0 10px;
}
.pgr-horeca-cols-2 .pgr-horeca-grid { grid-template-columns: repeat(2, 1fr); }
.pgr-horeca-cols-3 .pgr-horeca-grid { grid-template-columns: repeat(3, 1fr); }
.pgr-horeca-cols-4 .pgr-horeca-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .pgr-horeca-cols-3 .pgr-horeca-grid,
    .pgr-horeca-cols-4 .pgr-horeca-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .pgr-horeca-grid { grid-template-columns: 1fr !important; }
}

.pgr-horeca-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.pgr-horeca-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(249,115,22,.18);
}

.pgr-horeca-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    background: #f97316;
    color: #fff;
    box-shadow: 0 2px 6px rgba(249,115,22,.35);
}

.pgr-horeca-card-img {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
}
.pgr-horeca-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.pgr-horeca-card:hover .pgr-horeca-card-img img { transform: scale(1.04); }

.pgr-horeca-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    text-align: center;
}
.pgr-horeca-card-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}
.pgr-horeca-card-title a { color: #111827; text-decoration: none; }
.pgr-horeca-card-title a:hover { color: #ea580c; }

.pgr-horeca-card-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #c2410c;
    font-weight: 800;
    font-size: 20px;
    line-height: 1.1;
}
.pgr-horeca-card-price .woocommerce-Price-amount { color: #c2410c; }
.pgr-horeca-iva {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.pgr-horeca-card-btn {
    margin-top: auto;
    display: inline-block;
    background: #f97316;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: background .15s ease;
}
.pgr-horeca-card-btn:hover { background: #ea580c; }
.pgr-horeca-card-btn.is-view { background: #fb923c; }
.pgr-horeca-card-btn.is-view:hover { background: #f97316; }
