.sfpg-embed {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

/*
 * Le pagine album gestite possono usare il monitor senza restare vincolate
 * alla colonna editoriale del tema. Gli shortcode usati altrove conservano
 * invece la larghezza naturale del proprio contenitore.
 */
.sfpg-managed-album-page .sfpg-embed {
  position: relative;
  left: 50%;
  width: min(1480px, calc(100vw - 48px));
  max-width: none;
  transform: translateX(-50%);
}

.sfpg-custom-block {
  width: 100%;
  margin: 18px 0;
}

.sfpg-custom-block > :first-child {
  margin-top: 0;
}

.sfpg-custom-block > :last-child {
  margin-bottom: 0;
}

.sfpg-album-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 240px;
  border: 0;
  background: transparent;
  transition: height .18s ease;
}

.sfpg-cart-notice {
  position: fixed;
  z-index: 999999;
  top: 18px;
  left: 50%;
  width: min(560px, calc(100% - 28px));
  padding: 13px 16px;
  border: 1px solid #1f1f1f;
  background: #1f1f1f;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity .16s ease, transform .16s ease;
  text-align: center;
  font-weight: 700;
}

.sfpg-cart-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sfpg-cart-notice.is-success {
  border-color: #26734d;
  background: #26734d;
}

.sfpg-cart-notice.is-error {
  border-color: #8b2d21;
  background: #8b2d21;
}

/* Il tema può renderizzare la featured image: sulle pagine album va usata solo nelle tessere. */
.sfpg-managed-album-page .post-thumbnail,
.sfpg-managed-album-page .entry-thumbnail,
.sfpg-managed-album-page .featured-image,
.sfpg-managed-album-page .elementor-widget-theme-post-featured-image {
  display: none !important;
}

.sfpg-error {
  padding: 14px 16px;
  border: 1px solid #b64636;
  background: #fff0ed;
  color: #76271d;
}

.sfpg-login-required {
  padding: 18px;
  border: 1px solid #222;
  background: #f4f4f4;
  text-align: center;
}

.sfpg-cart-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #eee;
}

.sfpg-managed-events {
  clear: both;
  margin: 28px 0;
}

.sfpg-event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.sfpg-event-card {
  margin: 0;
  border: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.sfpg-event-card a {
  display: block;
  height: 100%;
  color: #171717;
  text-decoration: none;
  text-align: center;
}

.sfpg-event-card a:hover,
.sfpg-event-card a:focus-visible {
  color: #000;
  box-shadow: inset 0 0 0 2px #171717;
}

.sfpg-event-card__media {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
  align-items: center;
  justify-content: center;
}

.sfpg-event-card__live-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: rgba(18, 29, 22, .9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
  color: #fff;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  pointer-events: none;
}

.sfpg-event-card__live-dot {
  color: #42e879;
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 0 5px rgba(66, 232, 121, .68);
}

.sfpg-event-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sfpg-event-card__media--placeholder {
  color: #555;
}

.sfpg-event-card__icon {
  font-size: 40px;
  line-height: 1;
}

.sfpg-event-card__body {
  display: flex;
  min-height: 148px;
  padding: 14px 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.sfpg-event-card__description {
  font-size: 17px;
  font-weight: 700;
}

.sfpg-event-card__details {
  display: flex;
  margin-top: 9px;
  gap: 4px;
  align-items: center;
  flex-direction: column;
  color: #4d4d4d;
  font-size: 13px;
  line-height: 1.3;
}

.sfpg-event-card__date {
  color: #171717;
  font-weight: 700;
}

.sfpg-event-card__description,
.sfpg-event-card__type,
.sfpg-event-card__location {
  display: block;
}

.sfpg-event-card__notice {
  margin-top: 7px;
  color: #666;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .sfpg-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .sfpg-managed-album-page .sfpg-embed {
    position: static;
    left: auto;
    width: 100%;
    max-width: 100%;
    transform: none;
  }
}

@media (max-width: 600px) {
  .sfpg-event-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sfpg-event-card__live-badge {
    top: 8px;
    left: 8px;
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sfpg-album-frame,
  .sfpg-cart-notice {
    transition: none;
  }
}

/*
 * Carrello fotografico 3.2: presentazione coerente con il renderer album.
 * Prezzi, quantita e metadati WooCommerce restano visibili e invariati.
 */
.woocommerce .sfpg-photo-cart-item {
  --sfpg-cart-navy: #0d1b2a;
  --sfpg-cart-blue: #173a5e;
  --sfpg-cart-blue-light: #225786;
  --sfpg-cart-orange: #ff9f1c;
  --sfpg-cart-surface: #f7f9fb;
  --sfpg-cart-line: #d2dce6;
}

.woocommerce .sfpg-photo-cart-item > td {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--sfpg-cart-line);
  border-bottom: 1px solid var(--sfpg-cart-line);
  background: var(--sfpg-cart-surface);
  vertical-align: top;
}

.woocommerce .sfpg-photo-cart-item > td:first-child {
  border-left: 1px solid var(--sfpg-cart-line);
  border-radius: 14px 0 0 14px;
}

.woocommerce .sfpg-photo-cart-item > td:last-child {
  border-right: 1px solid var(--sfpg-cart-line);
  border-radius: 0 14px 14px 0;
}

.woocommerce .sfpg-photo-cart-item .product-thumbnail {
  width: 108px;
}

.sfpg-cart-thumb {
  width: 88px;
  height: 88px;
  padding: 5px;
  border: 1px solid #c5d1dc;
  border-radius: 12px;
  background: linear-gradient(145deg, #e7edf3, #fff);
  box-shadow: 0 5px 14px rgba(13, 27, 42, .12);
}

.sfpg-cart-photo-group {
  display: block;
  margin: 0 0 9px;
  color: #0d1b2a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.woocommerce .sfpg-photo-cart-item dl.variation,
.woocommerce-checkout-review-order dl.variation {
  display: grid;
  grid-template-columns: minmax(105px, auto) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid #dbe3eb;
  border-radius: 10px;
  background: #fff;
  color: #46596c;
  font-size: .88rem;
  line-height: 1.4;
}

.woocommerce-order-details .wc-item-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid #dbe3eb;
  border-radius: 10px;
  background: #fff;
  color: #46596c;
  font-size: .88rem;
  line-height: 1.4;
  list-style: none;
}

.woocommerce-order-details .wc-item-meta li {
  display: grid;
  grid-template-columns: minmax(105px, auto) minmax(0, 1fr);
  gap: 12px;
}

.woocommerce .sfpg-photo-cart-item dl.variation dt,
.woocommerce-checkout-review-order dl.variation dt,
.woocommerce-order-details .wc-item-meta strong {
  margin: 0;
  color: #173a5e;
  font-weight: 800;
}

.woocommerce .sfpg-photo-cart-item dl.variation dd,
.woocommerce-checkout-review-order dl.variation dd,
.woocommerce-order-details .wc-item-meta li,
.woocommerce-order-details .wc-item-meta p {
  margin: 0;
}

.woocommerce .sfpg-photo-cart-item dl.variation p,
.woocommerce-checkout-review-order dl.variation p {
  margin: 0;
}

.sfpg-remove-photo {
  display: inline-flex;
  min-height: 40px;
  margin: 6px 0 2px;
  padding: 7px 11px;
  border: 1px solid #d9a04a;
  border-radius: 9px;
  background: #fff8e8;
  color: #7a3f00;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.sfpg-remove-photo:hover,
.sfpg-remove-photo:focus-visible {
  border-color: #225786;
  background: #225786;
  color: #fff;
  outline: 3px solid #ff9f1c;
  outline-offset: 2px;
}

.woocommerce .sfpg-photo-cart-item .product-price,
.woocommerce .sfpg-photo-cart-item .product-quantity,
.woocommerce .sfpg-photo-cart-item .product-subtotal {
  color: #0d1b2a;
  font-weight: 800;
}

.woocommerce .sfpg-photo-cart-item .product-remove .remove {
  display: inline-grid;
  width: 44px;
  height: 44px;
  border: 1px solid #ddb1b1;
  border-radius: 50%;
  background: #fff5f5;
  place-items: center;
}

.woocommerce .sfpg-photo-cart-item .product-remove .remove:hover,
.woocommerce .sfpg-photo-cart-item .product-remove .remove:focus-visible {
  border-color: #b42323;
  background: #b42323;
  color: #fff !important;
  outline: 3px solid #ff9f1c;
  outline-offset: 2px;
}

@media (max-width: 782px) {
  .woocommerce table.shop_table_responsive tr.sfpg-photo-cart-item {
    margin-bottom: 18px;
    border: 1px solid #d2dce6;
    border-radius: 14px;
    background: #f7f9fb;
    box-shadow: 0 8px 22px rgba(13, 27, 42, .1);
    overflow: hidden;
  }

  .woocommerce table.shop_table_responsive tr.sfpg-photo-cart-item > td {
    min-height: 48px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #dce4ec;
    border-radius: 0;
    background: transparent;
  }

  .woocommerce table.shop_table_responsive tr.sfpg-photo-cart-item > td:last-child {
    border-bottom: 0;
  }

  .woocommerce table.shop_table_responsive tr.sfpg-photo-cart-item td.product-thumbnail {
    display: flex !important;
    width: auto;
    align-items: center;
    justify-content: flex-end;
  }

  .sfpg-cart-thumb {
    width: 80px;
    height: 80px;
  }

  .woocommerce .sfpg-photo-cart-item dl.variation,
  .woocommerce-checkout-review-order dl.variation,
  .woocommerce-order-details .wc-item-meta li {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .sfpg-remove-photo {
    min-height: 44px;
  }
}


/* SF WEB 4.2.1 — scoped album presentation; commerce markup stays compatible. */
.sfpg-embed{background:#f4f0e7}
.sfpg-event-grid{gap:24px;grid-template-columns:repeat(3,minmax(0,1fr))}
.sfpg-event-card{border:1px solid #d5d2c9;border-bottom:3px solid #014d9a;border-radius:0;background:#fffef9;box-shadow:none}
.sfpg-event-card a{text-align:left;color:#111318}
.sfpg-event-card a:hover,.sfpg-event-card a:focus-visible{box-shadow:none;outline:2px solid #014d9a;outline-offset:2px}
.sfpg-event-card__media{background:#f4f0e7}
.sfpg-event-card__image{object-fit:contain}
.sfpg-event-card__media--placeholder{background:#014d9a;color:#fff}
.sfpg-event-card__icon{font-size:48px}
.sfpg-event-card__body{align-items:flex-start;justify-content:flex-start;padding:22px}
.sfpg-event-card__description{font-size:24px;line-height:1.2;letter-spacing:-.035em;color:#111318}
.sfpg-event-card__details{align-items:flex-start;gap:7px;color:#646861;font-size:13px}
.sfpg-event-card__date{color:#014d9a}
.sfpg-login-required{background:#e6edf3;border:1px solid #d5d2c9;border-left:3px solid #014d9a;padding:20px}
.sfpg-login-required a{display:inline-flex;align-items:center;min-height:44px;color:#014d9a}
@media(max-width:1000px){.sfpg-event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.sfpg-event-grid{grid-template-columns:1fr}}
