/* Обёртка */
.wgc-wrapper{
  border: 1px solid #ececec;
  padding: 14px;
  margin: 16px 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wgc-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}
.wgc-note{
  font-size:13px;
  color:#7a7a83;
}

/* Прогресс-бар */
.wgc-progress{
  font-size:13px;
  color:#2f2f35;
  margin:8px 0 10px;
}
.wgc-pbar{
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f6f2fb;
  margin-top: 8px;
  box-shadow: inset 0 0 0 1px #efe9fb;
}
.wgc-pbar-fill{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:0;
  background: linear-gradient(90deg, #ffdbe7 0%, #f3e4ff 100%);
  box-shadow: inset 0 0 6px rgba(255,255,255,.5);
  transition: width .8s ease;
}
.wgc-pbar-fill::after{
  content:"";
  position:absolute;
  top:0;
  left:-12%;
  width:24px;
  height:100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 100%);
  mix-blend-mode: screen;
  opacity:.9;
  pointer-events:none;
  animation: wgc-spark 2.1s linear infinite;
}
@keyframes wgc-spark {
  0%   { left: -12%; }
  100% { left: 100%; }
}

/* Кнопка "Elegir regalos" */
button.button.wgc-open-modal{
  margin: 10px 0 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #f7d9e6 0%, #eadcf6 100%) !important;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(238,203,225,.55);
  color:#2b2b30 !important;
}
button.button.wgc-open-modal::before{
  content: "🎁";
  display: inline-block;
}

/* Заглушка, когда порог не достигнут */
.wgc-locked{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px dashed #efe9fb;
  background: #fbf8ff;
  padding: 10px 12px;
  border-radius: 14px;
}
.wgc-locked-icon{ font-size:18px; line-height:1; }
.wgc-locked-text{
  font-size:14px;
  color:#3a2f54;
}

/* Подпись */
.wgc-help{
  font-size:12px;
  color:#7a7a83;
  margin-top:8px;
}

/* Карточка подарка */
.wgc-card{
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #f0f0f3;
  border-radius: 16px;
  padding: 10px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  box-sizing: border-box;
}

.wgc-thumb{
  width: 100%;
  height: 160px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
}
.wgc-thumb img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display:block;
  border-radius: 12px;
}

.wgc-title{
  font-size:14px;
  font-weight:600;
  color:#2b2b30;
  margin:10px 0 6px;
  min-height:36px;
}

.wgc-stock{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#f7f7fb;
  color:#6b6b74;
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  margin-bottom:8px;
}
.wgc-stock-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#9bd18b;
}
.wgc-stock-low .wgc-stock-dot{
  background:#f5a623;
}

.wgc-free{
  display:inline-block;
  margin:0 0 8px;
  font-weight:700;
  color:#2b2b30;
  background:#f5f5f9;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}

/* Кнопка, корзина и белый кружок */
.wgc-actions{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* Круглая кнопка-корзина */
.wgc-remove{
  flex:0 0 auto;
  width:36px;
  height:36px;
  border-radius:999px;
  border:none;
  background:#f5f5f7;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
  font-size:17px;
  line-height:1;
  padding:0;
  color:#777;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.wgc-remove.has-qty{
  background:#fff;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.wgc-remove:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}

/* Кнопка "Elegir" в стиле сайта */
.wgc-toggle.button{
  flex:1 1 auto;
  height:36px;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  border: none !important;
  background: linear-gradient(90deg, #f7d9e6 0%, #eadcf6 100%) !important;
  color:#2b2b30 !important;
  font-weight:600 !important;
  font-size:14px !important;
  box-shadow: 0 5px 12px rgba(238,203,225,.45);
  text-transform:none;
}
.wgc-toggle.button.is-selected{
  outline: 2px solid rgba(145,120,210,.35);
  box-shadow: 0 7px 16px rgba(205,185,230,.6);
}

/* Белый кружок-счётчик */
.wgc-qty-pill{
  flex:0 0 auto;
  min-width:28px;
  height:28px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #e4e4f3;
  font-size:13px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#34343b;
  cursor:pointer;
  transition: all .15s ease;
}
.wgc-qty-pill.has-qty{
  border-color:#c9b6ff;
  box-shadow:0 0 0 1px rgba(201,182,255,.3);
}
.wgc-qty-pill:hover{
  box-shadow:0 0 0 1px rgba(201,182,255,.55);
}

/* Внутренний контент для Elementor-попапа */
.wgc-popup-inner{
  width:100%;
  padding-bottom: 80px; /* большой отступ снизу */
}
.wgc-popup-title{
  font-size:18px;
  font-weight:600;
  margin:0 0 4px;
}
.wgc-popup-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.wgc-popup-sub{
  margin:0;
  font-size:13px;
  color:#757582;
}

/* Счётчик X/Y подарков */
.wgc-counter{
  padding: 4px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  background:#f5f2ff;
  color:#43316b;
  white-space:nowrap;
}

/* Сетка подарков: 2 на мобиле, 4 на десктопе */
.wgc-gift-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}
.wgc-gift-grid .wgc-card{
  flex:none;
  max-width:100%;
}

/* Лайтбокс */
.wgc-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
}
.wgc-lightbox.is-open{
  opacity:1;
  pointer-events:auto;
}
.wgc-lightbox[hidden]{ display:flex; }
.wgc-lightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
}
.wgc-lightbox__content{
  position:relative;
  z-index:1;
  max-width:92vw;
  max-height:90vh;
  width:auto;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 12px 32px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  align-items:center;
}
.wgc-lightbox__img{
  max-width:92vw;
  max-height:82vh;
  width:auto;
  height:auto;
  display:block;
  object-fit:contain;
  background:#fff;
}
.wgc-lightbox__title{
  width:100%;
  padding:10px 12px;
  font-size:14px;
  color:#2b2b30;
  background:#fafafa;
  border-top:1px solid #efefef;
}
.wgc-lightbox__close{
  position:absolute;
  right:8px;
  top:6px;
  width:32px;
  height:32px;
  border:0;
  border-radius:8px;
  background:#ffffff;
  box-shadow:0 2px 8px rgba(0,0,0,.16);
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

/* Мобильные правки */
@media (max-width: 768px){
  .wgc-wrapper{
    padding: 10px;
    border-radius: 16px;
  }
  .wgc-card{
    padding: 8px;
    border-radius: 14px;
  }
  .wgc-thumb{
    height: 120px;
  }
  .wgc-title{
    font-size:13px;
    min-height:30px;
    margin:8px 0 6px;
  }
  .wgc-progress{
    font-size:12.5px;
  }
  .wgc-pbar{
    height: 9px;
  }
  .wgc-pbar-fill::after{
    width:20px;
  }
}

@media (min-width: 1024px){
  .wgc-gift-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px){
  .wgc-thumb{
    height: 100px;
  }
}

/* ... остальной CSS оставь как в прошлой версии ... */

/* Шапка попапа */
.wgc-popup-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

/* Actions: кнопка + кружок */
.wgc-actions{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* кнопка Elegir (как раньше) */
.wgc-toggle.button{
  flex:1 1 auto;
  height:36px;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  border: none !important;
  background: linear-gradient(90deg, #f7d9e6 0%, #eadcf6 100%) !important;
  color:#2b2b30 !important;
  font-weight:600 !important;
  font-size:14px !important;
  box-shadow: 0 5px 12px rgba(238,203,225,.45);
  text-transform:none;
}
.wgc-toggle.button.is-selected{
  outline: 2px solid rgba(145,120,210,.35);
  box-shadow: 0 7px 16px rgba(205,185,230,.6);
}

/* Белый кружок-счётчик */
.wgc-qty-pill{
  flex:0 0 auto;
  min-width:28px;
  height:28px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #e4e4f3;
  font-size:13px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#34343b;
  cursor:pointer;
  transition: all .15s ease;
}
.wgc-qty-pill.has-qty{
  border-color:#c9b6ff;
  box-shadow:0 0 0 1px rgba(201,182,255,.3);
}
.wgc-qty-pill:hover{
  box-shadow:0 0 0 1px rgba(201,182,255,.55);
}

/* Внутренний контейнер попапа — большой отступ снизу */
.wgc-popup-inner{
  width:100%;
  padding-bottom: 80px;
}

/* Мобильная шапка попапа — всё в колонку, чтобы не съезжало */
@media (max-width: 768px){
  .wgc-popup-header-row{
    flex-direction:column;
    align-items:flex-start;
  }
  .wgc-counter{
    align-self:flex-start;
  }
	.wgc-popup-header-row {
    display: block;
}
	.wgc-counter {
    margin: 10px 0px 30px 0;
}
}
