:root {
    --header-h: clamp(56px, 8vh, 72px);
  }
  
  /* Base */
  #previewInner {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    margin: 0;
    padding: 0;
    overflow: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #previewInner::-webkit-scrollbar {
    display: none;
  }
  #previewInner #prodDetailHtml * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Header */
  #banner-wrapper:hover #banner-img-preview {
    transform: scale(1.02); /* 약간 확대 효과로 인터랙션 */
  }



  #previewInner .header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, .95) !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: var(--header-h);
  }
  #previewInner .header-sticky .container-fluid {
    height: 100%;
    box-sizing: border-box;
    padding-block: 8px;
  }
  #previewInner .header-sticky h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #previewInner .header-sticky .fit-image {
    height: 100%;
    width: auto;
    object-fit: contain;
  }
  @media (max-width: 576px) {
    #previewInner .header-sticky {
      height: clamp(52px, 9vh, 64px);
    }
    #previewInner .header-sticky .container-fluid {
      padding-block: 6px;
    }
  }
  
  /* Logo */
  #previewInner .logo-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
  }
  
  /* Profile */
  #previewInner .profile-image-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    border-radius: 50%;
    padding: 2px;
  }
  #previewInner .profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
  }
  
  /* Story highlights */
  #previewInner .story-highlights {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  #previewInner .story-highlights::-webkit-scrollbar {
    display: none;
  }
  #previewInner .story-highlight {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform .2s ease;
  }
  #previewInner .story-highlight:active {
    transform: scale(.95);
  }
  #previewInner .story-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    padding: 2px;
  }
  #previewInner .story-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
  }
  
  /* Product grid */
  #previewInner .product-card {
    position: relative;
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease;
    margin: 1.5px;
  }
  #previewInner .product-card:active {
    transform: scale(.95);
  }
  #previewInner .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Product preview panel */
  #previewInner .product-preview {
    position: fixed;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1050;
    overflow-y: hidden;
    transform: translateY(100%);
    transition: transform .3s ease;
    top: var(--header-h);
    bottom: 0;
    height: calc(100vh - var(--header-h));
  }
  #previewInner #previewContent {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }
  #previewInner .product-preview.show {
    transform: translateY(0);
  }
  #previewInner .product-preview-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  #previewInner .preview-handle {
    width: 40px;
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
  }
  #previewInner .preview-product-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
  }
  #previewInner .preview-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #previewInner .preview-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
  }
  
  /* Options */
  #previewInner .size-option,
  #previewInner .color-option {
    cursor: pointer;
    transition: all .2s ease;
  }
  #previewInner .size-option {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
  }
  #previewInner .size-option.active {
    border-color: #212529;
    background: #212529;
    color: #fff;
  }
  #previewInner .color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    margin-right: 8px;
    display: inline-block;
  }
  #previewInner .color-option.active {
    border-color: #212529;
    transform: scale(1.1);
  }
  #previewInner .quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  #previewInner .quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease;
  }
  #previewInner .quantity-btn:hover {
    background: #f8f9fa;
  }
  #previewInner .quantity-value {
    font-size: 18px;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
  }
  
  /* Story viewer (scaffold) */
  #previewInner .story-viewer {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
  }
  #previewInner .story-viewer.show {
    display: flex;
  }
  #previewInner .story-progress {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    z-index: 1061;
  }
  #previewInner .story-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, .3);
    border-radius: 1px;
    overflow: hidden;
  }
  #previewInner .story-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width .3s ease;
  }
  #previewInner .story-progress-fill.active {
    width: 100%;
  }
  #previewInner .story-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 24px;
    z-index: 1061;
    cursor: pointer;
  }
  #previewInner .story-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  #previewInner .story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #previewInner .story-info {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 16px;
    color: #fff;
  }
  #previewInner .story-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
  }
  #previewInner .story-description {
    font-size: 14px;
    opacity: .9;
  }
  #previewInner .story-navigation {
    position: absolute;
    inset: 0;
    display: flex;
  }
  #previewInner .story-nav-left,
  #previewInner .story-nav-right {
    flex: 1;
    cursor: pointer;
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  #previewInner .fade-in {
    animation: fadeIn .3s ease;
  }
  #previewInner .slide-up {
    animation: slideUp .3s ease;
  }
  
  /* Slider */
  #previewInner .preview-product-image {
    position: relative;
    overflow: hidden;
  }
  #previewInner .preview-slider-track {
    height: 100%;
    display: flex;
    transition: transform .3s ease;
    will-change: transform;
  }
  #previewInner .preview-slide {
    min-width: 100%;
    flex: 0 0 100%;
    user-select: none;
  }
  #previewInner .preview-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
  
  /* Thumbnails */
  #previewInner .preview-thumbs {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
  }
  #previewInner .preview-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: .5;
    border: 2px solid transparent;
  }
  #previewInner .preview-thumb img {
    width: 100%;
  /* height: 100%;
  object-fit: cover; */
  height: auto;
  object-fit: contain;
  }
  #previewInner .preview-thumb.active {
    opacity: 1;
    border-color: #fff;
  }
  











  /* 테스트 영역 */

  
  
  
/* // 상품 편집 모달창=================================================================== S */
#productEditModal .modal-content{border-radius:16px;overflow:hidden}
#productEditModal .insta-label{font-size:.85rem;font-weight:600;color:#333}
#productEditModal .form-soft{border-radius:12px;border:1px solid #e9ecef;background:#fff}
#productEditModal .form-soft:focus{border-color:#c7d2fe;box-shadow:0 0 0 .2rem rgba(79,91,213,.15)}

#productEditModal .insta-section{background:#fff;border:1px solid #eef0f3;border-radius:14px;padding:14px 14px;margin-bottom:14px}
#productEditModal .insta-section-title{font-weight:700;color:#111;display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}

  /* Phone preview */
#productEditModal .phone-frame{width:380px;max-width:100%;border:1px solid #e5e7eb;border-radius:22px;background:#fff;box-shadow:0 15px 40px rgba(0,0,0,.08);overflow:hidden}
#productEditModal .phone-notch{height:22px;background:linear-gradient(180deg,#eceff3,#dfe3e8)}
#productEditModal  .phone-screen{height:640px;overflow:auto;background:#fafafa}
#productEditModal  .preview-card .preview-img-wrap{width:100%;padding-bottom:100%;position:relative;background:#f5f6f8}
#productEditModal  .preview-card .preview-img-wrap img{position:absolute;inset:0;object-fit:cover;border-bottom:1px solid #f0f2f5}
#productEditModal  .preview-avatar{width:36px;height:36px;background:#111;color:#fff;display:flex;align-items:center;justify-content:center}

  /* Image tiles */
#productEditModal  .tiles-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:12px}
#productEditModal  .tile{position:relative;border-radius:12px;overflow:hidden;background:#f6f7f9;border:1px solid #eceff3;height:120px}
#productEditModal  .tile img{
  width:100%;
  /* height: 100%;
  object-fit: cover; */
  height: auto;
  object-fit: contain;
}
#productEditModal  .tile .overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.45),rgba(0,0,0,.0) 50%);opacity:0;transition:.2s}
#productEditModal  .tile:hover .overlay{opacity:1}
#productEditModal  .tile .btns{position:absolute;top:6px;left:6px;right:6px;display:flex;justify-content:space-between}
#productEditModal  .tile .btns .btn{padding:2px 8px;border-radius:999px;border:none}
#productEditModal  .tile .index-badge{position:absolute;bottom:6px;left:6px;background:rgba(255,255,255,.9);font-weight:700;border-radius:999px;padding:2px 8px;font-size:.75rem}
#productEditModal  .tile-edit{position:absolute;right:6px;bottom:6px;left:6px;display:none}
#productEditModal  .tile.show-editor .tile-edit{display:block}
#productEditModal  .tile-edit .form-control{border-radius:10px}
#productEditModal  .handle{cursor:move;background:rgba(255,255,255,.85)}
#productEditModal  .delbtn{background:rgba(255,70,70,.9);color:#fff}






#productEditModalImgList{
    flex: 1 1 auto;                 /* 남은 공간 모두 차지 */
    overflow-y: auto;               /* 내부 스크롤 */
    -webkit-overflow-scrolling: touch;
    min-height: 0;                  /* flex 자식 스크롤 필수 */
}


/* 이미지 */
#productEditModal .preview-product-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
#productEditModal .preview-product-image{position:relative;overflow:hidden}
#productEditModal .preview-slider-track{
  height: 100%;
  display:flex;
  transition:transform .3s ease;
  will-change:transform
}
#productEditModal .preview-slide{
  min-width:100%;
  flex:0 0 100%;
  user-select:none;
  align-content: center;
}
#productEditModal .preview-slide img{
  width:100%;
  height:100%;
  display:block;
  object-fit: contain;
}

/* 하단 점 표시 */
#productEditModal .preview-dots{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);display:flex;gap:6px}
#productEditModal .preview-dot{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55);border:1px solid rgba(0,0,0,.18)}
#productEditModal .preview-dot.active{background:#fff}

#productEditModal .preview-thumbs {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
#productEditModal .preview-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: .5;
  border: 2px solid transparent;
}
#productEditModal .preview-thumb img {
  width: 100%;
  /* height: 100%;
  object-fit: cover; */
  height: auto;
  object-fit: contain;
}
#productEditModal .preview-thumb.active {
  opacity: 1;
  border-color: #fff;
}


/* // 상품 편집 모달창=================================================================== E */
