/* ======================================================
   BASE / UTIL
   ====================================================== */

.wgp-error {
  color: #d32f2f;
  padding: 20px;
  text-align: center;
  font-weight: 600;
  margin: 0;
}

/* ======================================================
     BOX COMPLETO [gold_price_info]
     ====================================================== */

.wgp-gold-info {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  margin: 20px 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 100%;
}

.wgp-gold-info-header {
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid #ededed;
}

.wgp-gold-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wgp-gold-info-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wgp-gold-icon {
  font-size: 18px;
}

.wgp-gold-info-content {
  padding: 20px;
}

.wgp-gold-prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.wgp-gold-price-item {
  background: #f9f9f9;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.wgp-gold-price-item:hover {
  transform: translateY(-1px);
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, .15);
}

.wgp-gold-carat {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  margin-bottom: 6px;
  letter-spacing: .3px;
}

.wgp-gold-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.2;
}

/* chip countdown nel box */
.wgp-gold-countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 8px 12px;
}

.wgp-gold-countdown-label {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.wgp-countdown-badge {
  background: #1e3a8a;
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.1;
  min-width: 60px;
  text-align: center;
  display: inline-block;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(30, 58, 138, .3);
}

/* ======================================================
     BANNER PILL [gold_price_countdown] (SHOP)
     ====================================================== */

.wgp-countdown-banner {
  position: relative;
  margin: 22px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wgp-countdown-banner:before,
.wgp-countdown-banner:after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 220px);
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-50%);
}

.wgp-countdown-banner:before {
  left: 0;
}

.wgp-countdown-banner:after {
  right: 0;
}

.wgp-countdown-pill {
  background: rgba(40, 40, 40, 0.88);
  border-radius: 999px;
  padding: 16px 22px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
}

.wgp-countdown-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wgp-countdown-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin: 0;
}

.wgp-countdown-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.1;
  margin: 0;
}

.wgp-countdown-badge-yellow {
  background: #f3d54e;
  border-radius: 999px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.wgp-countdown-time {
  font-size: 28px;
  font-weight: 900;
  color: #111;
  letter-spacing: .5px;
}

.wgp-fixing-time-badge {
  font-size: 17px;
  font-weight: 900;
  color: #111;
  white-space: nowrap;
  letter-spacing: .3px;
}

.wgp-fixing-badge-text {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

/* responsive pill */
@media (max-width: 768px) {

  .wgp-countdown-banner:before,
  .wgp-countdown-banner:after {
    width: calc(50% - 160px);
  }

  .wgp-countdown-title {
    font-size: 22px;
  }

  .wgp-countdown-subtitle {
    font-size: 15px;
  }

  .wgp-countdown-time {
    font-size: 22px;
  }

  .wgp-countdown-badge-yellow {
    min-width: 96px;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {

  .wgp-countdown-banner:before,
  .wgp-countdown-banner:after {
    display: none;
  }

  .wgp-countdown-pill {
    width: 100%;
    justify-content: space-between;
    border-radius: 18px;
  }
}

/* ======================================================
     LINEA PREZZI [gold_price_line]
     ====================================================== */

.wgp-gold-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  margin: 10px 0 0;
}

.wgp-gold-line-label {
  font-weight: 900;
  color: #111;
  margin-right: 6px;
}

.wgp-gold-line-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #111;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f7f7f7;
  border: 1px solid #ededed;
}

.wgp-gold-line-carat {
  font-weight: 800;
  color: #444;
}

.wgp-gold-line-value {
  font-weight: 900;
  color: #1e3a8a;
}

/* ======================================================
     SHOP CARD + BADGE TIMER (UNA SOLA VERSIONE)
     ====================================================== */

/* Assicura che la card sia relativa */
.woocommerce ul.products li.product {
  position: relative;
}

/* Badge top-right */
.wgp-shop-product-timer {
  /* position:absolute; */
  top: 12px;
  right: 12px;
  background: #a0a1a529;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  z-index: 9;
}

.wgp-shop-product-timer-time {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .5px;
  color: #f3d54e;
  display: inline-block;
  min-width: 54px;
  text-align: center;
}

/* Evita “tutto attaccato” nella card Woo (senza stravolgere il tema) */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 12px 16px 8px !important;
  line-height: 1.35;
}

.woocommerce ul.products li.product .price {
  margin: 0 16px 14px !important;
}

.woocommerce ul.products li.product .button {
  margin: 0 16px 16px !important;
}

/* Se il tema ha elementi stretti, aggiungiamo aria */
.woocommerce ul.products li.product {
  overflow: hidden;
  border-radius: 12px;
}

/* FIX TEMA: assicura visibilità badge su immagine prodotto */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product .woocommerce-product-thumbnail,
.woocommerce ul.products li.product .wc-product-image {
  position: relative;
  overflow: visible !important;
}

/* badge sempre sopra */
.wgp-shop-product-timer {
  z-index: 999 !important;
}

/* stato "urgente" */
.wgp-shop-product-timer.is-urgent {
  animation: wgpPulse 0.8s ease-in-out infinite;
}

.wgp-shop-product-timer.is-urgent .wgp-shop-product-timer-time {
  color: #ffea00;
}

/* animazione pulse */
@keyframes wgpPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

/* =========================
  VARIANT: PRODUCT (dettaglio)
========================= */

.wgp-variant-product.wgp-countdown-banner {
  margin: 14px 0 18px;
  justify-content: flex-start;
}

.wgp-variant-product .wgp-countdown-banner:before,
.wgp-variant-product .wgp-countdown-banner:after {
  display: none;
}

.wgp-variant-product .wgp-countdown-pill {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  padding: 14px 16px;
  gap: 14px;
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.wgp-variant-product .wgp-countdown-title {
  font-size: 18px;
  font-weight: 900;
}

.wgp-variant-product .wgp-countdown-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.wgp-variant-product .wgp-countdown-badge-yellow {
  min-width: 92px;
  padding: 10px 14px;
}

.wgp-variant-product .wgp-countdown-time {
  font-size: 18px;
}

/* Wrapper immagine nel Product Template (metti classe "wgp-media" al Group) */
.wgp-media {
  position: relative;
}

/* Timer overlay */
.wgp-media .wgp-shop-product-timer {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;

  background: rgba(20, 20, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.wgp-media .wgp-shop-product-timer-time {
  color: #f3d54e;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .4px;
}