/* MercadilloGeek 3.9.1 · compra y oferta visibles bajo la galería */

.mg-gallery-commerce {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0, rgba(34, 211, 238, .2), transparent 34%),
    radial-gradient(circle at 0 100%, rgba(139, 92, 246, .2), transparent 40%),
    linear-gradient(145deg, #0b1227, #172554 58%, #111b3f);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .22);
  color: #fff;
}

.mg-gallery-commerce::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.mg-gallery-commerce-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 3px 5px;
}

.mg-gallery-commerce-title > span {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 16px;
  background: linear-gradient(135deg, #22d3ee, #7c3aed);
  box-shadow: 0 8px 24px rgba(34, 211, 238, .28);
  font-size: 25px;
  animation: mg-commerce-bolt 2s ease-in-out infinite;
}

.mg-gallery-commerce-title div {
  display: grid;
  gap: 2px;
}

.mg-gallery-commerce-title small {
  color: #67e8f9;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
}

.mg-gallery-commerce-title b {
  color: #fff;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.1;
}

.mg-gallery-commerce > .mg-buy-now-box,
.mg-gallery-commerce > .mg-offer-box {
  position: relative;
  width: 100%;
  margin: 0;
}

.mg-gallery-commerce > .mg-buy-now-box {
  border-width: 3px;
  border-color: #34d399;
  background: linear-gradient(145deg, #f0fdf4, #fff);
  box-shadow: 0 14px 32px rgba(16, 185, 129, .23);
}

.mg-gallery-commerce > .mg-offer-box {
  border: 2px solid #a78bfa;
  box-shadow: 0 12px 28px rgba(76, 29, 149, .2);
}

.mg-gallery-commerce > details.mg-offer-box > summary {
  min-height: 78px;
  background: linear-gradient(135deg, #faf5ff, #eef2ff);
}

.mg-gallery-commerce > .mg-offer-guest,
.mg-gallery-commerce > .mg-offer-pending {
  background: linear-gradient(135deg, #faf5ff, #eef2ff);
}

.mg-gallery-commerce .mg-buy-now-submit {
  min-height: 72px;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 14px 28px rgba(4, 120, 87, .32);
}

.mg-gallery-commerce .mg-buy-now-submit b {
  font-size: 21px;
}

.mg-gallery-commerce .mg-order-state {
  color: #14251f;
}

@keyframes mg-commerce-bolt {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}

@media (max-width: 900px) {
  .mg-gallery-commerce {
    margin-bottom: 8px;
  }
}

@media (max-width: 620px) {
  .mg-gallery-commerce {
    gap: 10px;
    margin-top: 14px;
    padding: 13px;
    border-radius: 19px;
  }

  .mg-gallery-commerce-title > span {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 22px;
  }

  .mg-gallery-commerce-title small {
    font-size: 10px;
  }

  .mg-gallery-commerce-title b {
    font-size: 21px;
  }

  .mg-gallery-commerce .mg-buy-now-submit b {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-gallery-commerce-title > span {
    animation: none;
  }
}
