/* PATCH_ID: b2c_detail_experience_safe_v2_20260709 */

/*
  Safe V2:
  - Does NOT change outer detail layout.
  - Does NOT set grid/flex/width on unknown containers.
  - Only polishes precise image/info/button elements.
*/

body.b2c-detail-safe-active{
  background:
    radial-gradient(circle at 12% 18%, rgba(246,235,255,.34), transparent 30%),
    radial-gradient(circle at 86% 36%, rgba(255,234,246,.30), transparent 34%),
    linear-gradient(180deg, #fff, #fffafc 68%, #fff);
}

/* main image only */
.b2c-detail-safe-media{
  position:relative !important;
  isolation:isolate;
  overflow:hidden !important;
  border-radius:28px !important;
  box-shadow:
    0 24px 70px rgba(44,33,58,.11),
    0 0 0 1px rgba(255,255,255,.78) inset,
    0 0 0 1px rgba(237,226,244,.50) !important;
}

.b2c-detail-safe-img{
  display:block !important;
  max-width:100% !important;
  border-radius:inherit !important;
  transition:
    transform .62s cubic-bezier(.22,.8,.2,1),
    filter .34s ease !important;
  will-change:transform;
}

.b2c-detail-safe-media:hover .b2c-detail-safe-img{
  transform:scale(1.035);
  filter:saturate(1.03) contrast(1.015);
}

.b2c-detail-safe-zoom{
  position:absolute;
  right:16px;
  bottom:16px;
  z-index:3;
  padding:8px 11px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.1em;
  color:rgba(45,35,57,.62);
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.76);
  box-shadow:0 12px 30px rgba(44,33,58,.10);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:0;
  transform:translateY(8px);
  transition:
    opacity .28s ease,
    transform .32s cubic-bezier(.22,.8,.2,1);
}

.b2c-detail-safe-media:hover .b2c-detail-safe-zoom{
  opacity:1;
  transform:translateY(0);
}

/* info panel: visual polish only, no layout movement */
.b2c-detail-safe-info{
  box-sizing:border-box !important;
  border-radius:28px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,250,253,.66)) !important;
  border:1px solid rgba(244,235,248,.78) !important;
  box-shadow:
    0 22px 64px rgba(44,33,58,.08),
    0 1px 0 rgba(255,255,255,.88) inset !important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.b2c-detail-safe-info::before{
  content:"PRODUCT DETAIL";
  display:block;
  margin-bottom:12px;
  font-size:10px;
  font-weight:950;
  letter-spacing:.22em;
  color:rgba(88,72,102,.50);
}

.b2c-detail-safe-title{
  font-size:clamp(28px, 3.1vw, 44px) !important;
  line-height:1.03 !important;
  letter-spacing:-.052em !important;
  font-weight:950 !important;
  color:#1f1727 !important;
  text-wrap:balance;
  word-break:keep-all;
  overflow-wrap:anywhere;
}

.b2c-detail-safe-price{
  font-size:clamp(24px, 2.4vw, 36px) !important;
  line-height:1 !important;
  font-weight:950 !important;
  letter-spacing:-.04em !important;
  color:#201728 !important;
}

.b2c-detail-safe-status{
  display:inline-flex !important;
  align-items:center;
  gap:7px;
  width:max-content;
  max-width:100%;
  padding:7px 11px !important;
  border-radius:999px !important;
  font-size:11px !important;
  font-weight:900 !important;
  background:rgba(246,239,255,.72) !important;
  color:#59446e !important;
  border:1px solid rgba(232,220,244,.88) !important;
}

.b2c-detail-safe-status::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#7dca9b;
  box-shadow:0 0 0 4px rgba(125,202,155,.16);
}

.b2c-detail-safe-add{
  position:relative !important;
  overflow:hidden !important;
  border-radius:18px !important;
  font-weight:950 !important;
  transition:
    transform .22s cubic-bezier(.22,.8,.2,1),
    box-shadow .22s ease,
    filter .22s ease !important;
}

.b2c-detail-safe-add:hover{
  transform:translateY(-2px);
}

.b2c-detail-safe-add:active{
  transform:translateY(0) scale(.985);
}

.b2c-detail-safe-add.is-added::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255,255,255,.42) 42%, transparent 70%);
  transform:translateX(-120%);
  animation:b2cDetailSafeSweep .72s cubic-bezier(.22,.8,.2,1) both;
}

@keyframes b2cDetailSafeSweep{
  to{transform:translateX(120%);}
}

.b2c-detail-safe-notice{
  border-radius:26px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,250,253,.62)) !important;
  border:1px solid rgba(244,235,248,.78) !important;
  box-shadow:0 16px 46px rgba(44,33,58,.055) !important;
}

/* add feedback */
.b2c-safe-add-toast{
  position:fixed;
  right:clamp(16px, 3vw, 34px);
  top:clamp(76px, 10vh, 112px);
  z-index:99999;
  width:min(340px, calc(100vw - 32px));
  padding:13px 15px;
  border-radius:20px;
  background:rgba(255,255,255,.84);
  border:1px solid rgba(244,235,248,.82);
  box-shadow:
    0 22px 66px rgba(44,33,58,.14),
    0 1px 0 rgba(255,255,255,.90) inset;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  display:grid;
  grid-template-columns:42px 1fr;
  gap:11px;
  align-items:center;
  opacity:0;
  transform:translateY(-12px) scale(.982);
  animation:b2cSafeToastIn .38s cubic-bezier(.22,.8,.2,1) forwards;
}

.b2c-safe-add-toast.is-out{
  animation:b2cSafeToastOut .30s ease forwards;
}

.b2c-safe-toast-thumb{
  width:42px;
  height:42px;
  border-radius:13px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 9px 20px rgba(44,33,58,.10);
}

.b2c-safe-toast-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.b2c-safe-toast-title{
  font-size:13px;
  font-weight:950;
  color:#21182a;
  line-height:1.2;
  margin-bottom:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.b2c-safe-toast-sub{
  font-size:12px;
  font-weight:800;
  color:rgba(86,70,99,.62);
}

@keyframes b2cSafeToastIn{
  to{opacity:1; transform:translateY(0) scale(1);}
}

@keyframes b2cSafeToastOut{
  to{opacity:0; transform:translateY(-10px) scale(.985);}
}

.b2c-safe-add-flyer{
  position:fixed;
  z-index:99998;
  pointer-events:none;
  width:70px;
  height:70px;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow:
    0 20px 50px rgba(44,33,58,.20),
    0 0 0 1px rgba(255,255,255,.72) inset;
}

.b2c-safe-add-flyer img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.b2c-safe-cart-pulse{
  animation:b2cSafeCartPulse .54s cubic-bezier(.22,.8,.2,1) both;
}

@keyframes b2cSafeCartPulse{
  0%{transform:scale(1);}
  42%{transform:scale(1.10);}
  100%{transform:scale(1);}
}

@media(max-width:760px){
  .b2c-detail-safe-title{
    font-size:clamp(26px, 7.5vw, 38px) !important;
  }

  .b2c-detail-safe-media{
    border-radius:24px !important;
  }

  .b2c-safe-add-toast{
    right:16px;
    left:16px;
    top:auto;
    bottom:18px;
    width:auto;
  }
}

@media(prefers-reduced-motion: reduce){
  .b2c-detail-safe-img,
  .b2c-detail-safe-add,
  .b2c-safe-add-toast,
  .b2c-safe-add-flyer,
  .b2c-safe-cart-pulse{
    animation:none !important;
    transition:none !important;
  }
}
