/* =========================================================
 * Phase 1 Popup CSS
 * Normal posts / CPT popup only
 * ========================================================= */
:root{
  --fpg-popup-image-width:42%;
  --fpg-popup-content-padding:32px;
  --fpg-popup-title-color:#111827;
  --fpg-popup-text-color:#374151;
  --fpg-popup-meta-color:#6b7280;
  --fpg-popup-button-bg:#120c7a;
  --fpg-popup-button-text:#ffffff;
  --fpg-popup-loader-color:#120c7a;
  --fpg-popup-loader-track-color:rgba(17,24,39,.12);
  --fpg-popup-close-color:#111827;
  --fpg-popup-close-bg:#ffffff;
  --fpg-popup-close-size:42px;
  --fpg-popup-image-fit:cover;
  --fpg-popup-image-position-y:center;
  --fpg-popup-button-hover-bg:#0f0a63;
  --fpg-popup-button-hover-text:#ffffff;
  --fpg-popup-image-padding:12px;
  --fpg-popup-content-bottom-space:32px;

  --fpg-product-popup-sale-price-color:#111111;
  --fpg-product-popup-regular-price-color:#8a8a8a;
  --fpg-product-popup-price-font-size:24px;
  --fpg-product-popup-regular-price-font-size:16px;
  --fpg-product-popup-rating-star-color:#f5b301;
  --fpg-product-popup-rating-empty-star-color:#d7d2dc;
  --fpg-product-popup-rating-count-color:#8a8a8a;
  --fpg-product-popup-rating-count-font-size:14px;
  --fpg-product-popup-option-label-color:#222222;
  --fpg-product-popup-option-label-font-size:12px;
  --fpg-product-popup-option-text-color:#7a7a7a;
  --fpg-product-popup-option-bg-color:#ffffff;
  --fpg-product-popup-option-border-color:#d9d9d9;
  --fpg-product-popup-option-border-radius:10px;
  --fpg-product-popup-option-active-text-color:#ffffff;
  --fpg-product-popup-option-active-bg-color:#17181d;
  --fpg-product-popup-option-active-border-color:#17181d;
  --fpg-product-popup-color-selected-ring-width:2px;
  --fpg-product-popup-qty-button-color:#7a7a7a;
  --fpg-product-popup-qty-button-bg:#ffffff;
  --fpg-product-popup-qty-button-border:#d9d9d9;
  --fpg-product-popup-qty-number-color:#17181d;
  --fpg-product-popup-qty-number-font-size:20px;
  --fpg-product-popup-qty-border-radius:10px;
  --fpg-product-popup-wishlist-icon-size:18px;
  --fpg-product-popup-wishlist-icon-color:#17181d;
  --fpg-product-popup-wishlist-icon-active-color:#be123c;
  --fpg-product-popup-wishlist-bg:#ffffff;
  --fpg-product-popup-wishlist-border-color:#d9d9d9;
  --fpg-product-popup-wishlist-border-radius:10px;
  --fpg-product-popup-zoom-icon-size:18px;
  --fpg-product-popup-zoom-icon-color:#111111;
  --fpg-product-popup-zoom-icon-bg:rgba(255,255,255,92);
  --fpg-product-popup-zoom-btn-size:42px;
  --fpg-product-popup-zoom-btn-border-color:#d9d9d9;
  --fpg-product-popup-zoom-btn-border-radius:12px;

  --fpg-popup-countdown-alignment:flex-start;
  --fpg-popup-countdown-gap:8px;
  --fpg-popup-countdown-min-width:72px;
  --fpg-popup-countdown-box-padding:10px 10px 10px 10px;
  --fpg-popup-countdown-box-bg:#8b3dff;
  --fpg-popup-countdown-box-border-color:rgba(255,255,255,0.14);
  --fpg-popup-countdown-box-border-width:1px;
  --fpg-popup-countdown-box-radius:10px;
  --fpg-popup-countdown-value-color:#ffffff;
  --fpg-popup-countdown-label-color:rgba(255,255,255,0.82);
  --fpg-popup-countdown-expired-bg:#fef2f2;
  --fpg-popup-countdown-expired-color:#991b1b;

  --fpg-popup-countdown-value-font-family:inherit;
  --fpg-popup-countdown-value-font-size:22px;
  --fpg-popup-countdown-value-font-weight:700;
  --fpg-popup-countdown-value-text-transform:none;
  --fpg-popup-countdown-value-font-style:normal;
  --fpg-popup-countdown-value-line-height:1.1;
  --fpg-popup-countdown-value-letter-spacing:0;

  --fpg-popup-countdown-label-font-family:inherit;
  --fpg-popup-countdown-label-font-size:11px;
  --fpg-popup-countdown-label-font-weight:600;
  --fpg-popup-countdown-label-text-transform:uppercase;
  --fpg-popup-countdown-label-font-style:normal;
  --fpg-popup-countdown-label-line-height:1.2;
  --fpg-popup-countdown-label-letter-spacing:.06em;
}

.fpg-popup-overlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:999999;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .25s ease, visibility .25s ease;
}

.fpg-popup-overlay.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

/*.fpg-popup-dialog{
  width:min(100%, 920px);
  max-height:90vh;
  overflow:hidden;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  position:relative;
  transform:translateY(18px) scale(.98);
  opacity:0;
  transition:transform .28s ease, opacity .28s ease;
}*/

.fpg-popup-dialog{
  width:min(100%, 920px);
  max-height:var(--fpg-popup-max-height);
  overflow:hidden;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  position:relative;
  transform:translateY(18px) scale(.98);
  opacity:0;
  transition:transform .28s ease, opacity .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.fpg-popup-overlay.is-loading .fpg-popup-dialog{
  opacity:0;
  transform:translateY(18px) scale(.98);
  border-width:0 !important;
  box-shadow:none !important;
}

.fpg-popup-overlay.is-open .fpg-popup-dialog{
  transform:translateY(0) scale(1);
  opacity:1;
}

/* FULLSCREEN LOADER (separate from popup box) */
.fpg-popup-loader{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:14px;
  z-index:1000000;
  text-align:center;
  pointer-events:none;
}

/* show loader only while loading */
.fpg-popup-overlay.is-loading .fpg-popup-loader{
  display:flex;
}

/* error remains inside popup */
.fpg-popup-error{
  min-height:220px;
  padding:56px 28px;
  text-align:center;
  font-size:15px;
  color:#4b5563;
  display:flex;
  align-items:center;
  justify-content:center;
}

.fpg-popup-spinner{
  width:48px;
  height:48px;
  border:3px solid var(--fpg-popup-loader-track-color);
  border-top-color:var(--fpg-popup-loader-color);
  border-radius:50%;
  animation:fpgPopupSpin .8s linear infinite;
}

@keyframes fpgPopupSpin{
  to{ transform:rotate(360deg); }
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-close{
  -webkit-appearance:none !important;
  appearance:none !important;
  box-sizing:border-box;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:absolute;
  top:14px;
  right:14px;
  width:var(--fpg-popup-close-size) !important;
  height:var(--fpg-popup-close-size) !important;
  min-width:var(--fpg-popup-close-size) !important;
  min-height:var(--fpg-popup-close-size) !important;
  padding:0 !important;
  margin:0 !important;
  border:none !important;
  border-radius:999px !important;
  background:var(--fpg-popup-close-bg) !important;
  color:var(--fpg-popup-close-color) !important;
  cursor:pointer;
  z-index:4;
  box-shadow:0 8px 24px rgba(15,23,42,.16) !important;
  font-size:calc(var(--fpg-popup-close-size) * .86) !important;
  font-family:inherit;
  font-weight:500 !important;
  line-height: 0 !important;
  text-align:center !important;
  text-decoration:none !important;
  transform:translateY(-1px);
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-close:hover,
body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-close:focus{
  background:var(--fpg-popup-close-bg) !important;
  color:var(--fpg-popup-close-color) !important; 
  border:none !important;
  outline:none;
}

.fpg-popup-scroll{
  max-height:var(--fpg-popup-max-height);
  overflow:hidden;
}

.fpg-popup-shell{
  display:grid;
  grid-template-columns:var(--fpg-popup-image-width) minmax(0, 1fr);
  align-items:stretch;
  min-height:420px;
  max-height:var(--fpg-popup-max-height);
}

.fpg-popup-media{
  height:100%;
  min-height:420px;
  max-height:var(--fpg-popup-max-height);
  overflow:hidden;
  padding:var(--fpg-popup-image-padding, 0);
  padding-right:0;
}

.fpg-popup-media img{
  width:100%;
  height:100%;
  object-fit:var(--fpg-popup-image-fit);
  object-position:center var(--fpg-popup-image-position-y);
  display:block;
  border-radius:0;
}

.fpg-popup-content{
  padding:var(--fpg-popup-content-padding);
  padding-bottom:calc(var(--fpg-popup-content-bottom-space, 32px) + 8px);
  color:var(--fpg-popup-text-color);
  min-width:0;
  min-height:0;
  height:100%;
  max-height:var(--fpg-popup-max-height);
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(18,12,122,.45) rgba(17,24,39,.08);
}

.fpg-popup-content::-webkit-scrollbar{
  width:10px;
}

.fpg-popup-content::-webkit-scrollbar-track{
  background:rgba(17,24,39,.08);
  border-radius:999px;
}

.fpg-popup-content::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(175,14,157,.72), rgba(18,12,122,.72));
  border-radius:999px;
  border:2px solid rgba(255,255,255,.65);
}

.fpg-popup-title{
  margin:0 0 10px;
  font-size:clamp(24px,2.4vw,34px);
  line-height:1.2;
  color:var(--fpg-popup-title-color);
}

.fpg-popup-title a{
  color:inherit;
  text-decoration:none;
}

.fpg-popup-categories{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}

.fpg-popup-category-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:13px;
  font-weight:600;
}

.fpg-popup-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 0;
  margin-bottom:18px;
  color:var(--fpg-popup-meta-color);
  font-size:14px;
}

/*.fpg-popup-meta span:not(:last-child)::after{
  content:"|";
  margin:0 8px;
  color:var(--fpg-popup-meta-color);
  opacity:0.6;
}*/

.fpg-popup-meta > *:not(:last-child)::after{
  content:"|";
  margin:0 8px;
  color:var(--fpg-popup-meta-color);
  opacity:0.6;
}

.fpg-popup-content-text{
  color:var(--fpg-popup-text-color);
  font-size:15px;
  line-height:1.75;
  margin-bottom:18px;
}

.fpg-popup-custom-fields{
  margin:18px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}

.fpg-popup-custom-fields li{
  display:flex;
  gap:8px;
  align-items:flex-start;
  color:var(--fpg-popup-text-color);
  font-size:14px;
}


.fpg-popup-custom-field-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  flex:0 0 18px;
  line-height:1;
  color:var(--fpg-popup-title-color);
  margin-top:2px;
}

.fpg-popup-custom-field-icon i,
.fpg-popup-custom-field-icon svg{
  width:16px;
  height:16px;
  display:block;
}

.fpg-popup-custom-fields strong{
  margin-right:4px;
}

.fpg-popup-shortcode{
  margin-top:18px;
}

.fpg-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.fpg-popup-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:12px 18px;
  border-radius:10px;
  border:0;
  text-decoration:none;
  background:var(--fpg-popup-button-bg);
  color:var(--fpg-popup-button-text);
  font-weight:600;
}

.fpg-popup-btn:hover{
  background:var(--fpg-popup-button-hover-bg, var(--fpg-popup-button-bg));
  color:var(--fpg-popup-button-hover-text, var(--fpg-popup-button-text));
}

body.fpg-popup-open{
  overflow:hidden;
}

/* =========================================================
 * Desktop / Tablet (>=768px)
 * ========================================================= */
@media (min-width:768px) and (orientation:landscape){
  :root{
    --fpg-popup-max-height:70vh;
  }
}

@media (min-width:768px) and (orientation:portrait){
  :root{
    --fpg-popup-max-height:60vh;
  }
}

/* =========================================================
 * Mobile base (<=767px)
 * ========================================================= */
@media (max-width:767px){
  :root{
    --fpg-popup-max-height:min(70vh, 600px);
  }
}

/* =========================================================
 * Mobile large height override (MUST come AFTER mobile base)
 * ========================================================= */
@media (max-width:767px) and (min-height:800px){
  :root{
    --fpg-popup-max-height:min(70vh, 700px);
  }
}

/* =========================================================
 * Mobile small height fix
 * If height <= 600px → use 90% height
 * ========================================================= */
@media (max-width:767px) and (max-height:600px){
  :root{
    --fpg-popup-max-height:90vh;
  }
}

@media (max-width:767px){
  .fpg-popup-overlay{
    padding:10px;
    align-items: center;
    justify-content: center;
  }

  .fpg-popup-dialog{
    width:100%;
    max-height:var(--fpg-popup-max-height);
    border-radius:16px;
    margin:0 auto;
  }

  .fpg-popup-scroll{
    max-height:var(--fpg-popup-max-height);
    overflow:auto;
  }

  .fpg-popup-shell{
    grid-template-columns:1fr;
    min-height:auto;
    max-height:none;
  }

  .fpg-popup-media{
    height:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
    padding:var(--fpg-popup-image-padding, 0);
  }

  .fpg-popup-media img{
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
    object-position:center center;
    display:block;
  }

  .fpg-popup-content{
    padding:20px 16px;
    padding-bottom:calc(var(--fpg-popup-content-bottom-space, 32px) + 12px);
    max-height:none;
    overflow:visible;
  }

  .fpg-popup-scroll::-webkit-scrollbar{
    width:8px;
  }

  .fpg-popup-scroll::-webkit-scrollbar-track{
    background:rgba(17,24,39,.08);
    border-radius:999px;
  }

  .fpg-popup-scroll::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg, rgba(175,14,157,.72), rgba(18,12,122,.72));
    border-radius:999px;
  }
}

/* =========================================================
 * Phase 3 Product Quick View Popup
 * Final merged design
 * ========================================================= */

.fpg-popup-shell-product{
  grid-template-columns:minmax(340px, var(--fpg-popup-image-width)) minmax(0, 1fr);
  min-height:560px;
  background:transparent;
}

.fpg-popup-product-content{
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:36px 32px 32px;
}

.fpg-popup-product-header{
  display:block;
}

.fpg-popup-product-heading{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fpg-popup-shell-product .fpg-popup-title{
  margin:0;
  font-size:clamp(24px, 2vw, 34px);
  line-height:1.15;
  font-weight:700;
  letter-spacing:-0.02em;
  color:var(--fpg-popup-title-color);
}

.fpg-popup-price{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  font-size:var(--fpg-product-popup-price-font-size);
  line-height:1.1;
  font-weight:700;
  color:var(--fpg-product-popup-sale-price-color);
}

.fpg-popup-price .amount,
.fpg-popup-price ins,
.fpg-popup-price ins .amount,
.fpg-popup-price ins bdi,
.fpg-popup-price > bdi{
  color:var(--fpg-product-popup-sale-price-color);
  font-size:var(--fpg-product-popup-price-font-size);
  font-weight:700;
  text-decoration:none;
}

.fpg-popup-price del,
.fpg-popup-price del .amount,
.fpg-popup-price del bdi{
  color:var(--fpg-product-popup-regular-price-color);
  font-size:var(--fpg-product-popup-regular-price-font-size);
  font-weight:500;
  opacity:1;
}

.fpg-popup-price ins{
  background:transparent;
  padding:0;
}

/* =========================
 * RATING
 * ========================= */
.fpg-popup-rating-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  color:#8a8a8a;
}

.fpg-popup-rating-count{
  font-size:var(--fpg-product-popup-rating-count-font-size);
  line-height:1;
  color:var(--fpg-product-popup-rating-count-color);
  font-weight:400;
}

.fpg-popup-rating-wrap .star-rating{
  float:none;
  overflow:hidden;
  position:relative;
  width:5.4em;
  height:1.1em;
  margin:0;
  line-height:1;
  font-size:1em;
  font-family:WooCommerce;
}

.fpg-popup-rating-wrap .star-rating::before{
  content:"sssss";
  color:var(--fpg-product-popup-rating-empty-star-color);
  float:left;
  top:0;
  left:0;
  position:absolute;
}

.fpg-popup-rating-wrap .star-rating span{
  overflow:hidden;
  float:left;
  top:0;
  left:0;
  position:absolute;
  padding-top:1.5em;
}

.fpg-popup-rating-wrap .star-rating span::before{
  content:"SSSSS";
  top:0;
  left:0;
  position:absolute;
  color:var(--fpg-product-popup-rating-star-color);
}

.fpg-popup-shell-product .fpg-popup-content-text{
  margin:0;
  color:var(--fpg-popup-text-color);
  font-size:15px;
  line-height:1.65;
}

/* =========================
 * ATTRIBUTE GROUPS
 * ========================= */
.fpg-popup-shell-product .fpg-popup-attribute-groups{
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:0;
}

.fpg-popup-shell-product .fpg-popup-option-group{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fpg-popup-shell-product .fpg-popup-qty-label,
.fpg-popup-shell-product .fpg-popup-option-label{
  margin:0;
  font-size:var(--fpg-product-popup-option-label-font-size);
  line-height:1.2;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--fpg-product-popup-option-label-color);
}

.fpg-popup-shell-product .fpg-popup-option-list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

/* =========================
 * SIZE BUTTONS
 * ========================= */
.fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color){
  min-width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border:1px solid var(--fpg-product-popup-option-border-color);
  border-radius:var(--fpg-product-popup-option-border-radius);
  background:var(--fpg-product-popup-option-bg-color);
  color:var(--fpg-product-popup-option-text-color);
  font-size:15px;
  font-weight:500;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
  transition:all .2s ease;
}

.fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color):hover{
  border-color:#cfcfcf;
  background:#ffffff;
  color:#222222;
}

.fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color).is-active,
.fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color).active,
.fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color)[aria-pressed="true"]{
  background:var(--fpg-product-popup-option-active-bg-color);
  border-color:var(--fpg-product-popup-option-active-border-color);
  color:var(--fpg-product-popup-option-active-text-color);
}

/* =========================
 * COLOR BUTTONS
 * ========================= */
.fpg-popup-shell-product .fpg-popup-attr-option--color{
  width:40px;
  min-width:40px;
  height:40px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid #d9d9d9;
  border-radius:999px;
  background:#ffffff;
  box-shadow:none;
  cursor:pointer;
  transition:all .2s ease;
}

.fpg-popup-shell-product .fpg-popup-attr-option--color:hover{
  border-color:#cfcfcf;
  background:#ffffff;
}

.fpg-popup-shell-product .fpg-popup-color-dot{
  width:30px;
  height:30px;
  border-radius:999px;
  display:block;
  border:none;
  box-shadow:none;
}

.fpg-popup-shell-product .fpg-popup-attr-option--color.is-active,
.fpg-popup-shell-product .fpg-popup-attr-option--color.active,
.fpg-popup-shell-product .fpg-popup-attr-option--color[aria-pressed="true"]{
  border-color:var(--fpg-product-popup-option-active-border-color);
  box-shadow:0 0 0 var(--fpg-product-popup-color-selected-ring-width) var(--fpg-product-popup-option-active-border-color);
  background:#ffffff;
}

/* =========================
 * QUANTITY
 * ========================= */
.fpg-popup-shell-product .fpg-popup-quantity-wrap{
  display:flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.fpg-popup-shell-product .fpg-popup-qty-box{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:none;
  padding:0;
  background:transparent;
}

.fpg-popup-shell-product .fpg-popup-qty-btn{
  width:44px;
  min-width:44px;
  height:44px;
  border:1px solid var(--fpg-product-popup-qty-button-border);
  border-radius:var(--fpg-product-popup-qty-border-radius);
  background:var(--fpg-product-popup-qty-button-bg);
  color:var(--fpg-product-popup-qty-button-color);
  font-size:28px;
  font-weight:400;
  line-height:1;
  cursor:pointer;
  padding:0;
  box-shadow:none;
  transition:all .2s ease;
}

.fpg-popup-shell-product .fpg-popup-qty-btn:hover{
  border-color:#cfcfcf;
  color:#222222;
  background:#ffffff;
}

.fpg-popup-shell-product .fpg-popup-qty-input{
  -webkit-appearance:none;
  appearance:none;
  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;
  height:44px !important;
  min-height:44px !important;
  padding:0 !important;
  border:none !important;
  background:transparent !important;
  color:var(--fpg-product-popup-qty-number-color) !important;
  font-size:var(--fpg-product-popup-qty-number-font-size) !important;
  font-weight:600 !important;
  text-align:center !important;
  box-shadow:none !important;
}

.fpg-popup-shell-product .fpg-popup-qty-input::-webkit-outer-spin-button,
.fpg-popup-shell-product .fpg-popup-qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

/* =========================
 * ACTIONS
 * ========================= */
.fpg-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:8px;
}

.fpg-popup-product-actions{
  flex-direction:row;
  align-items:center;
  flex-wrap:nowrap;
}

.fpg-popup-product-actions .fpg-popup-buy-now{
  flex:1 1 auto;
  width:auto;
}

.fpg-popup-product-actions .fpg-popup-wishlist-wrap{
  order:2;
  flex:0 0 auto;
  display:flex;
  align-items:center;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn{
  -webkit-appearance:none !important;
  appearance:none !important;
  width:64px !important;
  min-width:64px !important;
  height:64px !important;
  min-height:64px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:var(--fpg-product-popup-wishlist-border-radius) !important;
  background:var(--fpg-product-popup-wishlist-bg) !important;
  color:var(--fpg-product-popup-wishlist-icon-color) !important;
  padding:0 !important;
  margin:0 !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:0 !important;
  border:1px solid var(--fpg-product-popup-wishlist-border-color) !important;
  box-shadow:none !important;
  text-decoration:none !important;
  vertical-align:middle !important;
  cursor:pointer !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn svg{
  width:var(--fpg-product-popup-wishlist-icon-size) !important;
  height:var(--fpg-product-popup-wishlist-icon-size) !important;
  display:block !important;
  flex:0 0 auto !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-icon{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  height:100% !important;
  line-height:0 !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-icon--active{
  display:none !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn.is-active{
  color:var(--fpg-product-popup-wishlist-icon-active-color) !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn.is-active .fpg-popup-wishlist-icon--normal{
  display:none !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn.is-active .fpg-popup-wishlist-icon--active{
  display:inline-flex !important;
}

.fpg-popup-shell-product .fpg-popup-btn.fpg-popup-buy-now,
.fpg-popup-shell-product .fpg-popup-product-actions .fpg-popup-btn{
  width:100%;
  min-height:64px;
  border:none;
  border-radius:18px;
  background:var(--fpg-popup-button-bg);
  color:var(--fpg-popup-button-text);
  font-size:18px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:0;
  padding:16px 22px 16px 24px;
  box-shadow:none;
  text-align:left;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
}

.fpg-popup-buy-now-text{
  flex:1 1 auto;
}

.fpg-popup-buy-now-icon{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.fpg-popup-shell-product .fpg-popup-btn.fpg-popup-buy-now:hover,
.fpg-popup-shell-product .fpg-popup-product-actions .fpg-popup-btn:hover{
  background:var(--fpg-popup-button-hover-bg, var(--fpg-popup-button-bg));
  color:var(--fpg-popup-button-hover-text, var(--fpg-popup-button-text));
}

.fpg-popup-buy-now.is-disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* =========================
 * BOTTOM META
 * ========================= */
.fpg-popup-bottom-meta{
  display:grid;
  gap:8px;
  margin-top:2px;
  padding-top:8px;
  border-top:none;
}

.fpg-popup-bottom-item{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  align-items:flex-start;
  font-size:13px;
  line-height:1.5;
  color:#777777;
}

.fpg-popup-bottom-item .fpg-popup-meta-label{
  color:#222222;
  font-weight:600;
}

.fpg-popup-bottom-item a{
  color:#777777;
  text-decoration:none;
}

.fpg-popup-bottom-item a:hover{
  color:#111111;
}

/* =========================
 * GALLERY
 * ========================= */
.fpg-product-gallery{
  display:flex;
  flex-direction:column;
  gap:14px;
  height:100%;
}

.fpg-product-gallery-main{
  position:relative;
  min-height:420px;
  height:100%;
  border-radius:0;
  overflow:hidden;
  background:#f8f8f8;
}

.fpg-product-gallery-main img{
  width:100%;
  height:100%;
  display:block;
  object-fit:var(--fpg-popup-image-fit);
  object-position:center var(--fpg-popup-image-position-y);
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-image-zoom-btn{
  -webkit-appearance:none !important;
  appearance:none !important;
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  width:var(--fpg-product-popup-zoom-btn-size, 42px) !important;
  height:var(--fpg-product-popup-zoom-btn-size, 42px) !important;
  min-width:var(--fpg-product-popup-zoom-btn-size, 42px) !important;
  min-height:var(--fpg-product-popup-zoom-btn-size, 42px) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  line-height:0 !important;
  border:1px solid var(--fpg-product-popup-zoom-btn-border-color, #d9d9d9) !important;
  border-radius:var(--fpg-product-popup-zoom-btn-border-radius, 12px) !important;
  background:var(--fpg-product-popup-zoom-icon-bg) !important;
  color:var(--fpg-product-popup-zoom-icon-color) !important;
  box-shadow:none !important;
  text-decoration:none !important;
  vertical-align:middle !important;
  cursor:pointer !important;
  z-index:3 !important;
}

body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-image-zoom-btn svg{
  width:var(--fpg-product-popup-zoom-icon-size) !important;
  height:var(--fpg-product-popup-zoom-icon-size) !important;
  display:block !important;
  flex:0 0 auto !important;
}

.fpg-product-gallery-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.fpg-product-gallery-thumb{
  width:72px;
  height:72px;
  border:1px solid #e5e5e5;
  border-radius:14px;
  overflow:hidden;
  background:#ffffff;
  padding:0;
  cursor:pointer;
  transition:all .2s ease;
}

.fpg-product-gallery-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.fpg-product-gallery-thumb:hover,
.fpg-product-gallery-thumb.is-active{
  border-color:#111111;
  box-shadow:none;
  transform:none;
}

/* =========================
 * TABLET
 * ========================= */
@media (max-width:1024px){
  .fpg-popup-shell-product{
    grid-template-columns:1fr;
    min-height:auto;
  }

  .fpg-product-gallery-main{
    min-height:320px;
  }

  .fpg-popup-product-content{
    padding:26px 22px 24px;
  }
}

/* =========================
 * MOBILE
 * ========================= */
@media (max-width:767px){
  .fpg-popup-shell-product{
    grid-template-columns:1fr;
    min-height:auto;
  }

  .fpg-product-gallery-main{
    min-height:260px;
  }

  .fpg-popup-product-content{
    padding:22px 16px 22px;
    gap:16px;
  }

  .fpg-popup-shell-product .fpg-popup-title{
    font-size:20px;
  }

  .fpg-popup-price{
    font-size:20px;
  }

  .fpg-popup-shell-product .fpg-popup-option-list{
    gap:10px;
  }

  .fpg-popup-shell-product .fpg-popup-attr-option:not(.fpg-popup-attr-option--color){
    min-width:44px;
    height:44px;
    padding:0 14px;
    font-size:15px;
  }

  .fpg-popup-shell-product .fpg-popup-attr-option--color{
    width:40px;
    min-width:40px;
    height:40px;
  }

  .fpg-popup-shell-product .fpg-popup-color-dot{
    width:24px;
    height:24px;
  }

  .fpg-popup-shell-product .fpg-popup-qty-btn{
    width:40px;
    min-width:40px;
    height:40px;
    font-size:24px;
  }

  .fpg-popup-shell-product .fpg-popup-qty-input{
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    height:40px !important;
    min-height:40px !important;
    font-size:18px !important;
  }

  .fpg-popup-shell-product .fpg-popup-btn.fpg-popup-buy-now,
  .fpg-popup-shell-product .fpg-popup-product-actions .fpg-popup-btn{ 
    min-height:58px;
    border-radius:16px;
    font-size:17px;
  }

  .fpg-popup-product-actions{
    gap:12px;
  }

  body .fpg-popup-overlay .fpg-popup-dialog .fpg-popup-wishlist-btn{
    width:58px !important;
    min-width:58px !important;
    height:58px !important;
    min-height:58px !important;
  }
}

@media (min-width:768px) and (max-height:760px){
  .fpg-popup-media{
    overflow:auto;
  }

  .fpg-product-gallery{
    height:auto;
  }

  .fpg-product-gallery-main{
    height:auto;
    min-height:0;
  }

  .fpg-product-gallery-main img{
    height:auto;
    max-height:none;
    object-fit:contain;
  }
}


/* =========================================================
 * Phase 2 Event Popup - event info layout
 * ========================================================= */
.fpg-popup-event-block{
  margin:18px 0 18px;
}

.fpg-popup-event-info{
  display:grid;
  gap:10px;
}

.fpg-popup-event-item{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  font-size:14px;
  color:var(--fpg-popup-text-color);
}

.fpg-popup-event-item strong{
  color:var(--fpg-popup-title-color);
}

/* =========================================================
 * Phase 2 Event Popup - Compact Countdown Design
 * ========================================================= */
.fpg-popup-countdown-block{
  margin:14px 0 16px;
}

.fpg-popup-countdown{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  justify-content:var(--fpg-popup-countdown-alignment);
  gap:var(--fpg-popup-countdown-gap);
}

.fpg-popup-countdown-item{
  min-width:var(--fpg-popup-countdown-min-width);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:var(--fpg-popup-countdown-box-padding);
  background:var(--fpg-popup-countdown-box-bg);
  border:var(--fpg-popup-countdown-box-border-width) solid var(--fpg-popup-countdown-box-border-color);
  border-radius:var(--fpg-popup-countdown-box-radius);
  box-sizing:border-box;
}

.fpg-popup-countdown-value{
  color:var(--fpg-popup-countdown-value-color);
  font-family:var(--fpg-popup-countdown-value-font-family);
  font-size:var(--fpg-popup-countdown-value-font-size);
  font-weight:var(--fpg-popup-countdown-value-font-weight);
  text-transform:var(--fpg-popup-countdown-value-text-transform);
  font-style:var(--fpg-popup-countdown-value-font-style);
  line-height:var(--fpg-popup-countdown-value-line-height);
  letter-spacing:var(--fpg-popup-countdown-value-letter-spacing);
}

.fpg-popup-countdown-label{
  margin-top:4px;
  color:var(--fpg-popup-countdown-label-color);
  font-family:var(--fpg-popup-countdown-label-font-family);
  font-size:var(--fpg-popup-countdown-label-font-size);
  font-weight:var(--fpg-popup-countdown-label-font-weight);
  text-transform:var(--fpg-popup-countdown-label-text-transform);
  font-style:var(--fpg-popup-countdown-label-font-style);
  line-height:var(--fpg-popup-countdown-label-line-height);
  letter-spacing:var(--fpg-popup-countdown-label-letter-spacing);
}

.fpg-popup-countdown.is-expired{
  display:block;
}

.fpg-popup-countdown-expired{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  background:var(--fpg-popup-countdown-expired-bg);
  color:var(--fpg-popup-countdown-expired-color);
  font-weight:600;
}


@media (max-width:767px){
    .fpg-popup-countdown{ 
      gap:6px;
    }

    .fpg-popup-countdown-item{
      min-width:60px;
      padding:8px;
    }

    .fpg-popup-countdown-value{
      font-size:18px;
    }

    .fpg-popup-countdown-label{
      font-size:10px;
    }
}

.fpg-popup-buy-now-text{
  display:inline-flex;
  align-items:center;
  flex:1 1 auto; 
}

.fpg-popup-buy-now-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:auto;
  line-height:0;
}

.fpg-popup-buy-now-icon svg{
  display:block;
  width:18px;
  height:18px;
}

.fpg-popup-buy-now-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:4px;
}

.fpg-popup-image-zoom-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.86);
  z-index:1000001;
  padding:24px;
}

.fpg-popup-image-zoom-overlay.is-open{
  display:flex;
}

.fpg-popup-image-zoom-target{
  max-width:min(92vw, 1200px);
  max-height:90vh;
  width:auto;
  height:auto;
  display:block;
  object-fit:contain;
}

.fpg-popup-image-zoom-close{
  position:absolute;
  top:20px;
  right:20px;
  width:44px;
  height:44px;
  border:none;
  border-radius:999px;
  background:#ffffff;
  color:#111827;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(15,23,42,.16);
}

.fpg-popup-hidden-form{
  display: none !important;
}