/* z-index: 애드픽 하단메뉴(.btm-nav 3000~3010) 위, 공유/토스트(10060+) 아래 */
:root {
    --myshop-z-popup: 3500;
    --myshop-z-popup-detail: 3510;
}

/* 마이숍 배너 상단 여백 (헤더 표시 여부와 무관하게 동일) */
.myshop-hero {
    padding-top: 1.625rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 11rem;
    /* flex 컬럼(body)에서 컨트롤바 등 다른 요소 때문에 배너가 압축되지 않도록 고정
       → 편집/미리보기 모드에서 배경(배너) 높이 동일 유지 */
    flex: 0 0 auto;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.myshop-hero.has-bg-photo {
    background-image: none !important;
    background-color: #111827;
}
.myshop-hero.has-bg-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--myshop-hero-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}
.myshop-hero .bg-cover-overlay {
    z-index: 1;
    pointer-events: none;
    background: transparent;
    transition: background 0.2s ease;
}
/* 배경 오버레이 — --myshop-overlay-strength 1=어두움, 0=투명 (stops는 libs_shop.php myshop_main_photo_overlay_stops 와 동기화) */
.myshop-hero .bg-cover-overlay,
.myshop-banner-picker__preview-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, calc(0.58 * var(--myshop-overlay-strength, 1))) 0%,
        rgba(0, 0, 0, calc(0.48 * var(--myshop-overlay-strength, 1))) 15%,
        rgba(0, 0, 0, calc(0.38 * var(--myshop-overlay-strength, 1))) 32%,
        rgba(0, 0, 0, calc(0.32 * var(--myshop-overlay-strength, 1))) 50%,
        rgba(0, 0, 0, calc(0.54 * var(--myshop-overlay-strength, 1))) 68%,
        rgba(0, 0, 0, calc(0.74 * var(--myshop-overlay-strength, 1))) 82%,
        rgba(0, 0, 0, calc(0.92 * var(--myshop-overlay-strength, 1))) 100%
    );
}
.myshop-hero.has-bg-photo .myshop-hero-content,
.myshop-hero.has-hero-overlay .myshop-hero-content,
.myshop-hero.has-bg-photo .myshop-hero-content h1,
.myshop-hero.has-hero-overlay .myshop-hero-content h1,
.myshop-hero.has-bg-photo .myshop-hero-content p,
.myshop-hero.has-hero-overlay .myshop-hero-content p,
.myshop-hero.has-bg-photo .myshop-hero-content .share-btn,
.myshop-hero.has-hero-overlay .myshop-hero-content .share-btn,
.myshop-hero.has-bg-photo .myshop-hero-content .share-btn span,
.myshop-hero.has-hero-overlay .myshop-hero-content .share-btn span {
    color: #fff !important;
}
.myshop-hero.has-bg-photo .myshop-hero-content h1,
.myshop-hero.has-hero-overlay .myshop-hero-content h1,
.myshop-hero.has-bg-photo .myshop-hero-content p,
.myshop-hero.has-hero-overlay .myshop-hero-content p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.45);
}
.myshop-hero.has-bg-photo .myshop-hero-content .edit-mode-icon,
.myshop-hero.has-hero-overlay .myshop-hero-content .edit-mode-icon,
.myshop-hero.has-bg-photo .myshop-hero-content .edit-mode-icon i,
.myshop-hero.has-hero-overlay .myshop-hero-content .edit-mode-icon i {
    color: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
.myshop-hero.has-bg-photo .myshop-hero-content .share-btn,
.myshop-hero.has-hero-overlay .myshop-hero-content .share-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}
.myshop-hero.has-bg-photo .myshop-hero-content .share-btn:hover,
.myshop-hero.has-hero-overlay .myshop-hero-content .share-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* 히어로 우측 상단 편집 컨트롤바 (편집모드 전용): 정렬·팔레트·배경 */
.myshop-hero-controls {
    display: none;
}
body.edit-mode .myshop-hero-controls {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.myshop-hero-controls__bar {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0 0.125rem;
    box-sizing: border-box;
    background: rgba(17, 24, 39, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.myshop-hero-controls .myshop-hero-controls__exit.myshop-admin-icon-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.myshop-hero-controls .myshop-hero-controls__exit.myshop-admin-icon-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
}
.myshop-hero-controls .header-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    color: rgba(255, 255, 255, 0.85);
}
.myshop-hero-controls .header-btn svg,
.myshop-hero-controls .header-btn i {
    width: 1rem;
    height: 1rem;
}
.myshop-hero-controls__exit svg,
.myshop-hero-controls__exit i {
    width: 1rem;
    height: 1rem;
}
.myshop-hero-controls .header-btn:hover,
.myshop-hero-controls .header-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.myshop-hero-controls__divider {
    flex-shrink: 0;
    width: 1px;
    height: 1.25rem;
    margin: 0 0.2rem;
    background: rgba(255, 255, 255, 0.25);
}
/* 우측 끝 버튼 툴팁은 히어로 오른쪽 경계(overflow:hidden) 밖으로 잘리지 않게 우측 정렬 */
.myshop-hero-controls__exit::after,
.myshop-hero-controls__bar .header-btn:last-child::after {
    left: auto;
    right: 0;
    transform: none;
}

/* 관리자 전용 상단 헤더 (소유자만 노출) — 문서 흐름에서 영역 차지, 콘텐츠 덮지 않음 */
.myshop-admin-header {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.myshop-admin-header__inner {
    width: 100%;
    max-width: 100%;
    padding: 0.375rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: auto;
    box-sizing: border-box;
}
/* 편집 전(nav) 고정 높이 */
.myshop-admin-header__nav {
    align-items: center;
    width: 100%;
    height: 2.5rem;
    min-height: 2.5rem;
    max-height: 2.5rem;
    box-sizing: border-box;
    flex-wrap: nowrap;
    overflow: hidden;
    padding: 0;
    margin: 0;
}
.myshop-admin-header__nav {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}
.myshop-admin-header__left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}
.myshop-admin-url-card {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}
.myshop-admin-url-card__label {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.myshop-admin-url-card__label-icon {
    width: 0.6875rem;
    height: 0.6875rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.myshop-admin-url {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    height: 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.myshop-admin-url:hover {
    border-color: #7dd3fc;
}
.myshop-admin-url__link {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 0.25rem 0 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}
.myshop-admin-url__link:hover {
    color: #0369a1;
}
.myshop-admin-url__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.myshop-admin-url__edit,
.myshop-admin-url__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 100%;
    padding: 0;
    color: #64748b;
    background: #f8fafc;
    border: none;
    border-left: 1px solid #e5e7eb;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.myshop-admin-url__edit:hover,
.myshop-admin-url__share:hover {
    color: #0369a1;
    background: #f0f9ff;
}
/* 마이홈 주소 수정 팝업 */
.myshop-handle-edit-popup__desc {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}
.myshop-handle-edit-popup__label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.myshop-handle-edit-popup__input-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}
.myshop-handle-edit-popup__prefix {
    flex-shrink: 0;
    padding-left: 0.625rem;
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}
.myshop-handle-edit-popup__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.625rem 0.625rem 0.625rem 0.25rem;
    font-size: 0.875rem;
    color: #111827;
    outline: none;
}
.myshop-handle-edit-popup__input::placeholder {
    color: #9ca3af;
}
.myshop-handle-edit-popup__status {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
}
.myshop-handle-edit-popup__status.hidden {
    display: none;
}
.myshop-handle-edit-popup__status.is-checking {
    color: #6b7280;
}
.myshop-handle-edit-popup__status.is-ok {
    color: #059669;
}
.myshop-handle-edit-popup__status.is-error {
    color: #dc2626;
}
.myshop-admin-url-card__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.myshop-admin-url-card__actions .myshop-admin-icon-btn,
.myshop-admin-header__right .myshop-admin-icon-btn {
    width: 2rem;
    height: 2rem;
}
.myshop-admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: #4b5563;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.myshop-admin-icon-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}
.myshop-admin-icon-btn--primary {
    color: #0369a1;
    background: #f0f9ff;
    border-color: #bae6fd;
}
.myshop-admin-icon-btn--primary:hover {
    background: #e0f2fe;
    color: #075985;
    border-color: #7dd3fc;
}
.myshop-admin-icon-btn--exit {
    color: #dc2626;
}
.myshop-admin-icon-btn--exit:hover {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.myshop-admin-header__right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
/* 소유자: 편집 모드에서만 관리 헤더 표시 */
body.shopadmin:not(.edit-mode) .myshop-admin-header {
    display: none !important;
}
body.myshop-admin-header-hidden .myshop-admin-header {
    display: none !important;
}
.myshop-admin-float-actions {
    display: none;
    position: fixed;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: auto;
    bottom: auto;
    z-index: 3600;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    touch-action: manipulation;
}
.myshop-admin-float-actions > * {
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
body.shopadmin:not(.edit-mode) .myshop-admin-float-actions {
    display: inline-flex;
}
body.sort-mode .myshop-admin-float-actions {
    display: none !important;
}
.myshop-admin-restore-btn,
.myshop-admin-float-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.375rem 0.625rem;
    color: #374151;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.myshop-admin-restore-btn {
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.myshop-admin-float-close {
    width: 2rem;
    min-width: 2rem;
    padding: 0;
}
.myshop-admin-restore-btn__label {
    letter-spacing: -0.01em;
}
.myshop-admin-restore-btn:hover {
    color: #0369a1;
    background: rgba(240, 249, 255, 0.9);
    border-color: rgba(186, 230, 253, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.myshop-admin-float-close:hover {
    color: #1f2937;
    background: rgba(243, 244, 246, 0.92);
    border-color: rgba(209, 213, 219, 0.95);
}

.layout-btn.active {
    background-color: #f3f4f6;
    color: #1f2937;
}
.header-toolbar {
    display: none;
}
.header-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem;
    min-width: 0;
}
.header-toolbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    flex-shrink: 0;
}
.header-toolbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 1.875rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 0.4rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.header-toolbar-action--add {
    color: #ffffff;
    background: linear-gradient(to right, #3b82f6, #2563eb);
    border-color: #2563eb;
}
.header-toolbar-action--add:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
}
.header-toolbar-action--delete {
    color: #ffffff;
    background: linear-gradient(to right, #ef4444, #dc2626);
    border-color: #dc2626;
}
.header-toolbar-action--delete:hover {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    border-color: #b91c1c;
}
.header-toolbar-action--group {
    color: #475569;
    background: #ffffff;
    border-color: #e2e8f0;
}
.header-toolbar-action--group:hover {
    color: #334155;
    background: #f8fafc;
    border-color: #cbd5e1;
}
.header-toolbar-action--handle {
    color: #2563eb;
    background: #ffffff;
    border-color: #bfdbfe;
    max-width: 100%;
}
.header-toolbar-action--handle:hover {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}
.myshop-edit-control-bar__handle {
    display: inline-block;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* 편집모드 상품 영역 콘트롤 바 (검색 필드 위) */
.myshop-products-top {
    margin: 0.75rem 0 0.5rem;
}
.myshop-products-intro-block {
    margin: 0 0 1.25rem;
}
.myshop-products-intro-block:not(.hidden) + .myshop-product-search {
    margin-top: 0.25rem;
}
.myshop-products-intro-block.hidden {
    display: none !important;
}
.myshop-products-intro-wrap {
    position: relative;
}
.myshop-products-intro__inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}
.myshop-products-intro__text {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    color: var(--item-text-color, #334155);
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
}
.myshop-products-intro-actions {
    display: none;
    flex-shrink: 0;
    align-items: center;
}
body.edit-mode .myshop-products-intro-wrap .myshop-products-intro-actions {
    display: flex;
}
.myshop-products-intro__text a {
    color: #2563eb;
    text-decoration: underline;
}
.myshop-products-intro__text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.375rem 0;
    border-radius: 0.375rem;
}
.myshop-products-intro-edit-btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.myshop-products-intro-add-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px dashed rgba(100, 116, 139, 0.45);
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.55);
    color: var(--item-text-color, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.edit-mode .myshop-products-intro-block.is-empty .myshop-products-intro-add-btn {
    display: flex;
}
body.sort-mode .myshop-products-intro-add-btn,
body.sort-mode .myshop-products-intro-actions {
    display: none !important;
}
.myshop-products-intro-add-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(37, 99, 235, 0.45);
    color: #2563eb;
}
.myshop-products-intro-add-btn i,
.myshop-products-intro-add-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.myshop-products-top .myshop-edit-control-bar {
    margin: 0 0 0.5rem;
}
.myshop-products-top .myshop-product-search {
    margin: 0;
}
.myshop-edit-control-bar {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0 0 0.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}
body.edit-mode .myshop-edit-control-bar {
    display: flex;
}
body.sort-mode .myshop-edit-control-bar,
.sortable .myshop-edit-control-bar {
    display: none !important;
}
.myshop-edit-control-bar__toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem 0.25rem;
    min-width: 0;
    flex: 1 1 auto;
}
.myshop-edit-control-bar__toggles .price-toggle:first-child {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}
.myshop-edit-control-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    flex-shrink: 0;
}
@media (max-width: 639px) {
    .myshop-edit-control-bar {
        gap: 0.375rem;
    }
}
.myshop-admin-header .header-btn,
.myshop-admin-header .layout-btn {
    width: 1.875rem;
    height: 1.875rem;
    flex-shrink: 0;
}
.header-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}
.header-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}
.header-btn.active {
    background-color: #f3f4f6;
    color: #1f2937;
}
.header-btn.exit {
    color: #ef4444;
}
.header-btn.exit:hover {
    background-color: #fee2e2;
    color: #dc2626;
}
.layout-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}
.layout-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}
/* 리스트형 상품 — 카드 배경 없음, 구분선만 */
.myshop-grid-view.hidden,
.myshop-list-view.hidden,
.myshop-photo-view.hidden {
    display: none !important;
}
.myshop-list-view.list-view:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.list-item-wrap {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.list-item-wrap:last-child {
    border-bottom: none;
}
.list-view .list-product-card {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: opacity 0.2s ease;
    overflow: visible;
}
.list-view .list-product-card:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 0.92;
}
.list-view .list-product-card:hover .list-product-thumb {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.list-view .list-product-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    min-height: 6.25rem;
}
.list-view .list-product-thumb {
    position: relative;
    width: 6rem;
    height: 6rem;
    padding-bottom: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
    transition: box-shadow 0.2s ease;
}
.list-view .list-product-thumb-img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.list-view .list-product-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.125rem 0;
}
.list-view .list-product-mall {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.125rem;
    min-width: 0;
}
.list-view .list-product-mall-main {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}
.list-view .list-product-mall-icon {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.list-view .list-product-mall-name {
    display: inline-flex;
    align-items: center;
    height: 1.125rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateY(1px);
}
.list-view .list-product-title {
    width: 100%;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-view .list-product-title.has-tagline {
    -webkit-line-clamp: 1;
}
.list-view .list-product-tagline {
    width: 100%;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.myshop-grid-view .grid-product-tagline {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-view .photo-product-tagline {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 상품 제목·한줄소개 굵기 — 모든 레이아웃 공통 */
.product-title {
    font-weight: 700;
}
.product-tagline {
    font-weight: 400;
}

.list-view .list-product-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.125rem;
}
.list-view .list-product-price {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.list-view .list-product-price-unit {
    font-size: 0.875rem;
    font-weight: 700;
    margin-left: 0.0625rem;
    opacity: 0.9;
}
.list-view .list-product-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    align-self: stretch;
    padding-left: 0.25rem;
}
.list-view .list-product-action-btns {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.list-view .list-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 9999px;
    transition: background 0.2s ease;
}
.list-view .list-share-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}
/* 리스트형 편집: 제목 아래 통계 태그 */
.list-view .list-product-meta {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.125rem;
    width: 100%;
}
.edit-mode .list-view .list-product-meta {
    display: flex;
}
.myshop-list-view .list-edit-stats {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    height: auto;
    padding: 0;
    margin: 0;
    text-align: left;
    background: transparent;
    flex-shrink: 0;
}
.edit-mode .myshop-list-view .list-product-price-row .list-edit-stats {
    display: inline-flex;
    align-items: center;
}
.myshop-list-view .list-stat-tag {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.06);
    color: #4b5563;
    white-space: nowrap;
}
.edit-mode .myshop-list-view .list-stat-tag {
    background: #e5e7eb;
    color: #374151;
}
/* 리스트형 액션버튼 — 그리드형과 동일 패턴 */
.myshop-list-view .list-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.myshop-list-view .list-card-actions .product-preview-btn,
.myshop-list-view .list-card-actions .product-edit-icon,
.myshop-list-view .list-card-actions .card-delete-btn,
.myshop-list-view .list-card-actions .delete-product-btn {
    margin: 0 !important;
    position: static !important;
    padding: 0.3rem;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 0;
}
.myshop-list-view .list-card-actions .product-preview-btn i,
.myshop-list-view .list-card-actions .product-edit-icon i,
.myshop-list-view .list-card-actions .card-delete-btn i {
    width: 0.875rem;
    height: 0.875rem;
}
.edit-mode .myshop-list-view .list-card-actions .product-preview-btn,
.edit-mode .myshop-list-view .list-card-actions .product-edit-icon,
.edit-mode .myshop-list-view .list-card-actions .card-delete-btn,
.edit-mode .myshop-list-view .list-card-actions .delete-product-btn {
    display: inline-flex !important;
}
.myshop-list-view .list-card-actions .card-delete-btn:hover i {
    color: #ef4444 !important;
}
/* 그리드·사진형 액션버튼 — 공유버튼과 동일 크기·간격 */
.myshop-grid-view .product-card-actions,
.myshop-photo-view.photo-gallery .product-card-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}
.myshop-grid-view .product-card-actions .product-preview-btn,
.myshop-grid-view .product-card-actions .product-edit-icon,
.myshop-grid-view .product-card-actions .card-delete-btn,
.myshop-grid-view .product-card-actions .delete-product-btn,
.myshop-grid-view .product-card-actions .product-share-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn,
.myshop-photo-view.photo-gallery .product-card-actions .delete-product-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-share-btn {
    margin: 0 !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    padding: 0.25rem;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    line-height: 0;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
}
.myshop-grid-view .product-card-actions .product-preview-btn,
.myshop-grid-view .product-card-actions .product-edit-icon,
.myshop-grid-view .product-card-actions .card-delete-btn,
.myshop-grid-view .product-card-actions .delete-product-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn,
.myshop-photo-view.photo-gallery .product-card-actions .delete-product-btn,
.myshop-list-view .list-product-action-btns .product-preview-btn,
.myshop-list-view .list-product-action-btns .product-edit-icon,
.myshop-list-view .list-product-action-btns .card-delete-btn,
.myshop-list-view .list-product-action-btns .delete-product-btn,
.myshop-list-view .list-product-action-btns .product-sort-handle {
    display: none;
}
.myshop-grid-view .grid-product-info .flex.items-center.justify-between {
    gap: 0.125rem;
}
.myshop-grid-view .grid-product-info .flex.items-center.justify-between .product-card-actions {
    margin-left: auto;
}
.myshop-grid-view .product-card-actions .product-preview-btn i,
.myshop-grid-view .product-card-actions .product-edit-icon i,
.myshop-grid-view .product-card-actions .card-delete-btn i,
.myshop-grid-view .product-card-actions .product-share-btn i,
.myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn i,
.myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon i,
.myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn i,
.myshop-photo-view.photo-gallery .product-card-actions .product-share-btn i {
    width: 0.75rem;
    height: 0.75rem;
}
.myshop-grid-view .product-card-actions .card-delete-btn:hover {
    color: #ef4444;
    background: transparent;
    transform: none;
}
.myshop-grid-view .product-card-actions .card-delete-btn:hover i {
    color: #ef4444 !important;
}
/* 사진형 갤러리 — 카드 살짝 간격 + 라운드·그림자로 가시성 개선 */
.myshop-products-section.myshop-layout-photo {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.myshop-products-section.myshop-layout-photo #search-results {
    gap: 0;
}
.myshop-photo-view.photo-gallery {
    gap: 0.5rem;
}
.myshop-photo-view.photo-gallery > .photo-gallery-cell {
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}
.myshop-photo-view.photo-gallery .photo-gallery-card {
    width: 100%;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.myshop-photo-view.photo-gallery > .photo-gallery-cell:hover .photo-gallery-card {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18), 0 18px 36px rgba(15, 23, 42, 0.12);
}
.myshop-photo-view.photo-gallery .product-item {
    border-radius: 0;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
}
.myshop-photo-view.photo-gallery .product-item .aspect-square {
    border-radius: 0;
}
.myshop-photo-view.photo-gallery .product-item .photo-product-img {
    border-radius: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.myshop-photo-view.photo-gallery > .photo-gallery-cell:hover .photo-product-img {
    transform: scale(1.06);
}
.myshop-photo-view.photo-gallery .photo-card-actions-bar {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 6;
    gap: 0.25rem;
}
body:not(.edit-mode) .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-preview-btn i,
body:not(.edit-mode) .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-edit-icon i,
body:not(.edit-mode) .myshop-photo-view.photo-gallery .photo-card-actions-bar .card-delete-btn i,
body:not(.edit-mode) .myshop-photo-view.photo-gallery .photo-card-actions-bar .delete-product-btn i,
body:not(.edit-mode) .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-share-btn i {
    color: #fff !important;
}
.myshop-photo-view.photo-gallery .product-item .photo-cp-icon {
    border-radius: 50%;
    object-fit: cover;
}
.myshop-photo-view.photo-gallery .photo-card-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}
.myshop-photo-view.photo-gallery .photo-price-badge {
    margin: 0 0.5rem 0.3rem;
    padding: 0.2rem 0.45rem;
    border-radius: 0.3125rem;
    background: rgba(255, 255, 255, 0.75);
    color: #111827;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: none;
}
.myshop-photo-view.photo-gallery .product-info {
    position: static;
    width: 100%;
    z-index: 2;
    padding: 0.6rem 2.5rem 0.6rem 0.6rem;
    background: rgba(0, 0, 0, 0.65);
    box-sizing: border-box;
}
.myshop-photo-view.photo-gallery .product-info .product-title {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 5px rgba(0, 0, 0, 0.45);
}
.myshop-photo-view.photo-gallery .product-info .product-title.has-tagline {
    -webkit-line-clamp: 1;
}
.myshop-photo-view.photo-gallery .product-info .product-price {
    display: none;
}
.myshop-photo-view.photo-gallery .photo-info-row {
    align-items: flex-end;
}
.myshop-photo-view.photo-gallery .photo-info-text {
    min-width: 0;
    padding-right: 0;
}
.myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn,
.myshop-photo-view.photo-gallery .product-card-actions .product-share-btn {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
.myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn:hover i {
    color: #fca5a5 !important;
}
/* 그리드형 편집: 커미션·클릭 — 이미지 우상단 뱃지 (2행) */
.myshop-grid-view .grid-edit-stats {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    max-width: calc(100% - 0.75rem);
    height: auto;
    padding: 0;
    margin: 0;
    text-align: right;
    background: transparent;
    pointer-events: none;
}
.edit-mode .myshop-grid-view .aspect-square .grid-edit-stats {
    display: flex;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
}
.myshop-grid-view .grid-stat-tag {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    text-shadow: none;
    white-space: nowrap;
}
.myshop-direct-badge-wrap {
    display: flex;
    pointer-events: none;
}
.edit-mode .myshop-direct-badge-wrap {
    display: none;
}
.myshop-mall-direct-tag {
    display: none;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}
body:not(.edit-mode) .myshop-mall-direct-tag {
    display: none !important;
}
body.edit-mode .myshop-mall-direct-tag {
    display: inline-block;
}
.myshop-direct-tag {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fcd34d;
}
.myshop-photo-view.photo-gallery .myshop-direct-tag {
    text-shadow: none;
}

/* 사진형 편집: 커미션·클릭 — 이미지 우상단 뱃지 (2행) */
.myshop-photo-view.photo-gallery .photo-edit-stats {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    max-width: calc(100% - 0.75rem);
    height: auto;
    padding: 0;
    margin: 0;
    text-align: right;
    background: transparent;
    pointer-events: none;
}
.edit-mode .myshop-photo-view.photo-gallery .aspect-square .photo-edit-stats {
    display: flex;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 6;
}
.myshop-photo-view.photo-gallery .photo-stat-tag {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    text-shadow: none;
    white-space: nowrap;
}
.myshop-photo-view.photo-gallery .sortable-ghost {
    background: transparent;
    opacity: 0.5;
}
.edit-mode .myshop-photo-view.photo-gallery > .photo-gallery-cell {
    margin-bottom: 0;
    align-items: stretch;
}
.edit-mode .myshop-photo-view.photo-gallery .photo-gallery-card {
    width: 100%;
}
.edit-mode .myshop-photo-view.photo-gallery > .photo-gallery-cell:hover .photo-gallery-card {
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.1);
}
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar {
    position: static;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0.3125rem 0 0;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    filter: none;
}
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-preview-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-edit-icon,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .card-delete-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .delete-product-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-share-btn {
    filter: none;
}
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .card-delete-btn:hover i {
    color: #ef4444 !important;
}
.edit-mode .myshop-photo-view.photo-gallery .product-item {
    margin-bottom: 0;
}
body.edit-mode .myshop-photo-view.photo-gallery .product-info {
    padding: 0.6rem;
}

/* ===== 편집모드 상품 컨트롤 바 (그리드·사진·리스트 공통) ===== */
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar,
body.edit-mode .list-view .list-product-action-btns {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0.28rem 0.3rem 0.32rem;
    background: rgba(128, 128, 140, 0.1);
    border: 1px solid rgba(128, 128, 140, 0.14);
    border-radius: 0.9rem;
    box-sizing: border-box;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-body,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-body,
body.edit-mode .list-view .list-product-action-btns .product-control-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    row-gap: 0;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-btns,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-btns,
body.edit-mode .list-view .list-product-action-btns .product-control-btns {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    gap: 0;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-btns > *,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-btns > *,
body.edit-mode .list-view .list-product-action-btns .product-control-btns > * {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0 !important;
    margin: 0;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-sort-handle,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-sort-handle,
body.edit-mode .list-view .list-product-action-btns .product-sort-handle {
    align-self: stretch;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 1.75rem;
    height: auto;
    margin: 0;
    padding: 0 0.3rem !important;
    border-right: 1px solid rgba(128, 128, 140, 0.16);
    border-radius: 0;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-btns button,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-btns button,
body.edit-mode .list-view .list-product-action-btns .product-control-btns button {
    width: auto;
    height: auto;
    margin: 0 !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    padding: 0.15rem 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    cursor: pointer;
    box-sizing: border-box;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-btns button i,
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-control-btns button svg,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-btns button i,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-control-btns button svg,
body.edit-mode .list-view .list-product-action-btns .product-control-btns button i,
body.edit-mode .list-view .list-product-action-btns .product-control-btns button svg {
    width: 0.875rem;
    height: 0.875rem;
}
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-sort-handle i,
body.edit-mode .myshop-grid-view .grid-product-info .product-card-actions .product-sort-handle svg,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-sort-handle i,
body.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-sort-handle svg,
body.edit-mode .list-view .list-product-action-btns .product-sort-handle i,
body.edit-mode .list-view .list-product-action-btns .product-sort-handle svg {
    width: 1rem;
    height: 1rem;
}
/* 그리드형: 가격 줄 아래 전체폭 */
.edit-mode .myshop-grid-view .grid-product-info > .grid-product-footer-row,
.edit-mode .myshop-grid-view .grid-product-info > .flex.items-center.justify-between {
    flex-wrap: wrap;
    row-gap: 0.4rem;
}
.edit-mode .myshop-grid-view .grid-product-info .product-card-actions {
    flex-basis: 100%;
    width: 100%;
    margin-left: 0 !important;
    margin-top: 0;
}

/* ===== 컨트롤바 (편집모드) — 커미션·클릭은 카드 외부 뱃지로 표시 ===== */
.product-control-stats {
    display: none !important;
}
.product-control-body,
.product-control-btns {
    display: contents;
}

/* 리스트형: 우측 하단 컨트롤 바 배치 */
.edit-mode .list-view .list-product-aside {
    position: absolute;
    right: 0;
    bottom: 0.5rem;
    align-self: auto;
    justify-content: flex-end;
    padding: 0;
    z-index: 20;
}
body.edit-mode .list-view .list-product-action-btns {
    width: 11.5rem;
    min-width: 11.5rem;
    max-width: 11.5rem;
    flex-shrink: 0;
}

.myshop-photo-view.sortable .product-item:hover {
    background-color: transparent;
}

.photo-view .product-item {
    position: relative;
}
.photo-view .product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 0.8rem 3.5rem 0.5rem 0.5rem;
}
.myshop-photo-view.photo-gallery .product-info {
    position: static;
    padding: 0.6rem 2.5rem 0.6rem 0.6rem;
}
.photo-view .product-info .product-title {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.65);
}
.photo-view .product-info .product-price:not(.photo-price-badge) {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.65);
}
.photo-view .product-edit-icon {
    color: white;
}
/* 방문 환영 메시지 — 하단 슬라이드 팝업 (5초) */
.myshop-welcome-popup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    justify-content: center;
    padding: 0 1rem calc(4.5rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    visibility: hidden;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        visibility 0.45s;
}
.myshop-welcome-popup.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.myshop-welcome-popup__panel {
    position: relative;
    width: 100%;
    max-width: min(520px, 100%);
    padding: 0.875rem 2.5rem 0.875rem 1.125rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.55;
    text-align: center;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.14), 0 8px 24px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}
.myshop-welcome-popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.myshop-welcome-popup__close:hover {
    background: rgba(255, 255, 255, 0.28);
}
body.edit-mode .myshop-welcome-popup__close {
    display: none;
}
body.edit-mode .myshop-welcome-popup__panel {
    padding-right: 1.125rem;
}
/* 표시 안 함(공개 미노출): 편집모드에서만 흐리게 미리보기 */
body.edit-mode .myshop-welcome-popup.is-public-hidden .myshop-welcome-popup__panel {
    opacity: 0.45;
}
body.edit-mode .myshop-welcome-popup.is-public-hidden .myshop-welcome-popup__text {
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.55);
}
.myshop-welcome-popup.is-pinned {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.myshop-welcome-popup.is-visible .myshop-welcome-popup__panel,
.myshop-welcome-popup.is-pinned .myshop-welcome-popup__panel {
    pointer-events: auto;
}
.myshop-welcome-popup__content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
}
.myshop-welcome-popup__text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.myshop-welcome-popup__edit {
    flex-shrink: 0;
    margin-top: 0.125rem;
}
.myshop-welcome-popup__edit,
.myshop-welcome-popup__edit i {
    color: inherit;
}
body.sort-mode .myshop-welcome-popup {
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.sort-mode .myshop-welcome-popup.is-visible,
body.sort-mode .myshop-welcome-popup.is-pinned {
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    visibility: hidden;
}
.myshop-welcome-duration-select {
    font-size: 0.875rem;
}
.myshop-welcome-popup__text strong,
.myshop-welcome-popup__text b {
    font-weight: 700;
}
.price-toggle {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.3rem;
    padding-left: 0.3rem;
    border-left: 1px solid #e5e7eb;
    position: relative;
}
.price-toggle label {
    font-size: 0.75rem;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    transition: all 0.2s ease;
}
.price-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.price-toggle input[type="checkbox"]:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}
.price-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.25rem;
    height: 0.5rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}
.price-toggle input[type="checkbox"]:hover {
    border-color: #0ea5e9;
}
.price-toggle input[type="checkbox"]:checked + label {
    color: #0ea5e9;
}
.price-toggle label:hover {
    color: #0ea5e9;
}

/* 정렬 체크박스 특별 스타일 */
.price-toggle input[type="checkbox"]:checked + label i {
    color: #0ea5e9;
    transform: scale(1.1);
}

.price-toggle label i {
    transition: all 0.2s ease;
}

.price-toggle input[type="checkbox"]:checked + label i {
    transform: rotate(45deg);
}

/* 정렬 체크박스 숨기기 */
.price-toggle input[type="checkbox"]#sortToggle {
    display: none;
}

.price-toggle label[for="sortToggle"] {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.price-toggle label[for="sortToggle"]:hover {
    background-color: #f3f4f6;
}

.profile-container {
    position: relative;
}
/* 기본 프로필 아이콘 — 흰 원 배경이므로 팔레트와 무관하게 고정 색 */
.profile-container .noprofile {
    color: #64748b;
}
.profile-container .noprofile svg {
    stroke: #64748b;
}
.profile-container .edit-icon i,
.profile-container .edit-icon svg {
    color: #4b5563;
    stroke: #4b5563;
}
.edit-icon {
    position: absolute;
    top: -3px;
    left: -3px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    border: 2px solid #e5e7eb;
}
.edit-icon:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.edit-mode .edit-icon {
    display: none;
}
.edit-mode .edit-mode-icon {
    display: inline-flex;
}
/* 편집모드 상단(hero) 편집아이콘: 텍스트 너비에 영향 주지 않고 좌측에 겹쳐 표시
   → 미편집모드와 동일한 줄바꿈/배너 높이 유지 (가로 advance 0) */
.edit-mode .myshop-hero-content .edit-mode-icon {
    width: 0.75rem;
    min-width: 0.75rem;
    margin-left: -1rem;
    margin-right: 0.25rem;
    overflow: visible;
}
.edit-mode-icon {
    display: none;
    margin-right: 0.5rem;
    vertical-align: middle;
    color: inherit;
}
.edit-mode-icon i {
    color: inherit;
}
.profile-edit-icon {
    display: none;
}
.edit-mode .profile-edit-icon {
    display: block;
}
.product-edit-icon {
    display: none;
    margin-right: 0.5rem;
    color: #6b7280;
}
.edit-mode .product-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* 그리드·사진·리스트 액션바 — 전역 margin-right 제거 (겹침 방지) */
.myshop-grid-view .product-card-actions .product-edit-icon,
.myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.myshop-list-view .list-product-action-btns .product-edit-icon {
    margin-right: 0 !important;
}
.edit-mode .myshop-grid-view .product-card-actions .product-preview-btn,
.edit-mode .myshop-grid-view .product-card-actions .product-edit-icon,
.edit-mode .myshop-grid-view .product-card-actions .card-delete-btn,
.edit-mode .myshop-grid-view .product-card-actions .delete-product-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .delete-product-btn,
.edit-mode .myshop-list-view .list-product-action-btns .product-preview-btn,
.edit-mode .myshop-list-view .list-product-action-btns .product-edit-icon,
.edit-mode .myshop-list-view .list-product-action-btns .card-delete-btn,
.edit-mode .myshop-list-view .list-product-action-btns .delete-product-btn,
.edit-mode .myshop-list-view .list-product-action-btns .product-sort-handle {
    display: inline-flex !important;
    position: static !important;
}
/* 편집 모드 액션 버튼 — 간격 유지, 보이지 않는 영역만 클릭 확대 */
.edit-mode .myshop-grid-view .product-card-actions,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions,
.edit-mode .myshop-list-view .list-card-actions,
.edit-mode .list-product-action-btns,
.edit-mode .list-product-aside {
    position: relative;
    z-index: 20;
    pointer-events: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
/* 사진형 컨트롤바 — static 유지 + absolute 잔여 offset(right/bottom) 제거 */
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar {
    position: static !important;
    z-index: 20;
    pointer-events: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
}
.edit-mode .myshop-grid-view .product-card-actions .product-preview-btn,
.edit-mode .myshop-grid-view .product-card-actions .product-edit-icon,
.edit-mode .myshop-grid-view .product-card-actions .card-delete-btn,
.edit-mode .myshop-grid-view .product-card-actions .delete-product-btn,
.edit-mode .myshop-grid-view .product-card-actions .product-share-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .product-preview-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .product-edit-icon,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .card-delete-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .delete-product-btn,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions .product-share-btn,
.edit-mode .myshop-list-view .list-card-actions .product-preview-btn,
.edit-mode .myshop-list-view .list-card-actions .product-edit-icon,
.edit-mode .myshop-list-view .list-card-actions .card-delete-btn,
.edit-mode .myshop-list-view .list-card-actions .delete-product-btn,
.edit-mode .list-product-action-btns .product-preview-btn,
.edit-mode .list-product-action-btns .product-edit-icon,
.edit-mode .list-product-action-btns .card-delete-btn,
.edit-mode .list-product-action-btns .delete-product-btn,
.edit-mode .list-share-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-preview-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-edit-icon,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .card-delete-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .delete-product-btn,
.edit-mode .myshop-photo-view.photo-gallery .photo-card-actions-bar .product-share-btn {
    position: relative !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    pointer-events: auto !important;
}
.edit-mode .product-preview-btn,
.edit-mode .product-edit-icon,
.edit-mode .delete-product-btn,
.edit-mode .card-delete-btn {
    pointer-events: auto !important;
}
.edit-mode .edit-mode-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2.25rem;
    height: 2.25rem;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.edit-mode .myshop-grid-view .product-card-actions button svg,
.edit-mode .myshop-grid-view .product-card-actions button i,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions button svg,
.edit-mode .myshop-photo-view.photo-gallery .product-card-actions button i,
.edit-mode .myshop-list-view .list-card-actions button svg,
.edit-mode .myshop-list-view .list-card-actions button i,
.edit-mode .list-product-action-btns button svg,
.edit-mode .list-product-action-btns button i,
.edit-mode .list-share-btn svg,
.edit-mode .list-share-btn i,
.edit-mode .edit-mode-icon svg,
.edit-mode .edit-mode-icon i {
    pointer-events: none;
    position: relative;
    z-index: 1;
}
.edit-mode .edit-mode-icon {
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
}

/* ── 상품 순서변경 드래그 핸들 (편집모드 전용) ── */
.product-sort-handle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 9999px;
    line-height: 0;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}
.edit-mode .product-sort-handle {
    display: inline-flex;
    pointer-events: auto !important;
}
.product-sort-handle:active {
    cursor: grabbing;
}
.product-sort-handle i,
.product-sort-handle svg {
    pointer-events: none;
    position: relative;
    z-index: 1;
    opacity: 0.55;
}
/* 편집모드 상품 드래그 미리보기 — 공통 파란 점선 테두리 */
.edit-mode .myshop-sortable-item.myshop-card-ghost,
.edit-mode .myshop-sortable-item.myshop-cross-layout-preview:not(.myshop-sort-relayout-pending) {
    outline: 2px dashed rgba(59, 130, 246, 0.55);
    outline-offset: 3px;
    border-radius: 12px;
    box-shadow: none !important;
    pointer-events: none;
}
/* 같은 레이아웃 드래그 고스트 */
.edit-mode .myshop-sortable-item.myshop-card-ghost:not(.myshop-cross-layout-preview) {
    opacity: 0.35;
}
/* 다른 레이아웃 그룹 — 대상 레이아웃 미리보기(드래그 중만 흐리게) */
.edit-mode .myshop-sortable-item.myshop-cross-layout-preview:not(.myshop-sort-relayout-pending) {
    opacity: 0.52 !important;
    filter: saturate(0.88);
}
.edit-mode .myshop-sortable-item.myshop-cross-layout-preview.myshop-card-ghost:not(.myshop-sort-relayout-pending) {
    opacity: 0.52 !important;
}
.edit-mode .myshop-sortable-item.myshop-cross-layout-preview:not(.myshop-sort-relayout-pending) .product-item {
    opacity: 0.95;
}
/* 드롭 직후 저장 대기 — 실제 카드처럼 선명하게 */
.edit-mode .myshop-sortable-item.myshop-sort-relayout-pending {
    opacity: 1 !important;
    filter: none;
    outline: none;
}
/* 드래그 — Sortable fallback 숨기고 공통 썸네일 오버레이 (PC·모바일, grid/list/photo) */
body.edit-mode .myshop-sort-fallback.myshop-sort-fallback--thumb-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
body.edit-mode .myshop-sort-drag-thumb {
    position: fixed;
    left: 0;
    top: 0;
    width: 4rem;
    height: 4rem;
    margin: 0;
    padding: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    outline: 2px dashed rgba(59, 130, 246, 0.55);
    outline-offset: 2px;
    pointer-events: none;
    z-index: 10050;
    will-change: left, top;
}
body.edit-mode .myshop-sort-drag-thumb__inner {
    width: 100%;
    height: 100%;
}
body.edit-mode .myshop-sort-drag-thumb__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 빈 그룹도 드롭 영역이 되도록 최소 높이 확보 (편집모드) */
.edit-mode .myshop-group-products {
    min-height: 2.75rem;
}
body.edit-mode .myshop-group-section.is-empty .myshop-group-body,
body.edit-mode .myshop-group-section.is-empty .myshop-group-products {
    min-height: 6.5rem;
}
.myshop-group-body {
    position: relative;
}
html.light,
html.light body {
    color-scheme: light;
}

/* 알림 토스트 — 공유 모달(10060)·검색 팝업(2000)보다 위 */
.simp-alert-container {
    z-index: 10200 !important;
    top: 50% !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    max-width: 92vw;
    pointer-events: none;
}
.simp-alert-container .simp-alert {
    pointer-events: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e5e7eb !important;
    animation: simpAlertPop 0.2s ease-out;
}
.simp-alert-container.is-fading .simp-alert,
.simp-alert-container.hidden .simp-alert {
    pointer-events: none;
}
.simp-alert-container.hidden {
    display: none !important;
    pointer-events: none !important;
}
.simp-alert-container .simp-alert p {
    font-size: 0.95rem;
    line-height: 1.5;
}
@keyframes simpAlertPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 팝업 관련 스타일 (shotalk.ai 동일, 라이트 전용) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--myshop-z-popup);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.popup-overlay.active {
    opacity: 1;
}
.popup-container {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color-scheme: light;
}
@media (max-width: 640px) {
    .popup-container {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .popup-container {
        width: 80%;
        max-width: 600px;
    }
}
@media (min-width: 1025px) {
    .popup-container {
        width: 70%;
        max-width: 700px;
    }
}
.popup-overlay.active .popup-container {
    transform: translateY(0);
}
.popup-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}
.popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}
.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
}
.popup-close:hover {
    color: #1f2937;
}
.popup-content {
    padding: 16px;
    color: #4b5563;
}
.popup-content input:not(.myshop-group-settings-popup__switch),
.popup-content textarea,
.popup-content select {
    background-color: #ffffff;
    color: #1f2937;
    color-scheme: light;
}
.popup-content input::placeholder,
.popup-content textarea::placeholder {
    color: #9ca3af;
}

/* 상품 추가 · 검색 결과 팝업 — 동일 크기 */
.popup-container.myshop-add-popup-container,
.popup-container.myshop-search-result-popup-container {
    width: min(96vw, 920px);
    max-width: 920px;
    max-height: 94vh !important;
}
.popup-container.myshop-add-popup-container .popup-content,
.popup-container.myshop-search-result-popup-container .popup-content {
    max-height: calc(94vh - 120px) !important;
    overflow-x: hidden;
    padding: 1.25rem;
}
.popup-container.myshop-add-popup-container .myshop-recent-link-list {
    max-height: min(68vh, 680px);
}
.popup-container.myshop-search-result-popup-container .myshop-search-results-scroll {
    max-height: min(calc(94vh - 240px), 680px);
}
.popup-container.myshop-add-popup-container .myshop-product-search-recent {
    z-index: 20;
}
.myshop-add-popup {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.myshop-add-search-wrap {
    position: relative;
}
.myshop-add-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
}
.myshop-add-tab {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.myshop-add-tab:hover {
    color: #374151;
}
.myshop-add-tab.is-active {
    background: #fff;
    color: #0284c7;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.myshop-add-tab-panel.is-hidden {
    display: none;
}
.myshop-recent-link-list {
    max-height: 360px;
    overflow-y: auto;
    margin-top: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}
.myshop-recent-link-list .search-item:last-child {
    border-bottom: none;
}
.myshop-recent-link-loading,
.myshop-recent-link-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}
#myshopUrlPreview.is-hidden {
    display: none;
}
.myshop-add-action-btn {
    width: 100%;
    padding: 0.625rem;
    border: none;
    border-radius: 0.5rem;
    background: #0284c7;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.myshop-add-action-btn:hover:not(:disabled) {
    background: #0369a1;
}
.myshop-add-action-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}
.myshop-add-action-btn.is-secondary {
    background: #e5e7eb;
    color: #374151;
}
.myshop-add-action-btn.is-secondary:hover:not(:disabled) {
    background: #d1d5db;
}
#myshopSearchInputArea.is-hidden {
    display: none;
}
.myshop-url-preview-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.myshop-url-preview-actions .myshop-add-action-btn {
    flex: 1;
    margin-top: 0;
}
.myshop-url-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 0.8125rem;
    color: #6b7280;
}
.myshop-url-preview-empty {
    padding: 0.875rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}
.myshop-url-preview-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}
.myshop-url-preview-thumb {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #f3f4f6;
}
.myshop-url-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.myshop-url-preview-info {
    flex: 1;
    min-width: 0;
}
.myshop-url-preview-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#myshopDirectDetail.is-hidden {
    display: none;
}
.myshop-direct-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10.5rem;
    height: 10.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f3f4f6;
    border-radius: 0.75rem;
    border: 1px dashed #d1d5db;
}
.myshop-direct-photo-placeholder.is-hidden {
    display: none;
}
#myshopDirectPhotoCard .product-edit-photo-img.is-hidden {
    display: none;
}
#myshopDirectPhotoCard .product-edit-photo-img:not(.is-hidden) + .myshop-direct-photo-placeholder,
#myshopDirectPhotoCard .product-edit-photo-img:not(.is-hidden) ~ .myshop-direct-photo-placeholder {
    display: none;
}

/* 상품 수정 팝업 — 이미지 선택 */
.product-edit-photo-area {
    margin-bottom: 0.25rem;
}
.product-edit-photo-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.product-edit-photo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.product-edit-photo-card {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 0.75rem;
}
.product-edit-photo-card.is-selected .product-edit-photo-img {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.product-edit-photo-img {
    display: block;
    width: 10.5rem;
    height: 10.5rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-edit-photo-edit-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.product-edit-photo-edit-btn:hover {
    background: #fff;
    color: #0284c7;
}
.product-edit-photo-edit-btn i {
    width: 1rem;
    height: 1rem;
}
.product-edit-photo-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    color: transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.product-edit-photo-check i {
    width: 1rem;
    height: 1rem;
}
.product-edit-photo-check.is-checked {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.product-edit-photo-card.is-hidden {
    display: none;
}

.popup-container.product-edit-popup {
    width: min(96vw, 640px);
    max-width: 640px;
}
.product-edit-sale-period-panel.is-hidden {
    display: none;
}
.product-edit-description-panel.is-hidden {
    display: none;
}
.product-edit-sale-date {
    min-width: 9.5rem;
}
.product-edit-sale-time-select {
    min-width: 8.5rem;
    padding-right: 1.75rem;
}
.product-edit-sale-period input:disabled,
.product-edit-sale-period select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.myshop-sale-period-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0.18rem 0.5rem;
    border-radius: 0.3125rem;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    border: none;
    box-shadow: none;
}
.myshop-sale-period-badge--grid,
.myshop-sale-period-badge--photo {
    background: rgba(15, 23, 42, 0.72);
    color: #f1f5f9;
}
.myshop-sale-period-badge--grid {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 4;
    max-width: calc(100% - 0.75rem);
}
.myshop-sale-period-badge--photo {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 0.2rem;
    vertical-align: top;
}
.list-view .list-product-mall-row {
    margin-bottom: 0.1rem;
}
.myshop-sale-period-badge--list {
    flex-shrink: 0;
    max-width: none;
    background: #f1f5f9;
    color: #475569;
}

.popup-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.popup-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.popup-button.primary {
    background-color: var(--myshop-accent, #0284c7);
    color: white;
}
.popup-button.primary:hover {
    filter: brightness(0.92);
}
.popup-button.secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}
.popup-button.secondary:hover {
    background-color: #e5e7eb;
}
.popup-button.danger {
    background-color: #fef2f2;
    color: #dc2626;
}
.popup-button.danger:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}
.popup-container.myshop-hero-edit-info-popup .popup-footer .popup-button--footer-left {
    margin-right: auto;
}
.popup-button.is-disabled,
.popup-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}
.popup-button.primary.is-disabled:hover,
.popup-button.primary:disabled:hover {
    filter: none;
}

/* 상품 정보 팝업 — 내용에 따라 높이 가변, 최대 90vh */
.popup-container.myshop-product-detail-popup {
    --myshop-product-detail-chrome: calc(3.5rem + 4.25rem + env(safe-area-inset-bottom, 0px));
    max-width: 420px;
    width: 90%;
    height: auto !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}
.popup-container.myshop-product-detail-popup .popup-header {
    flex: 0 0 auto;
}
.popup-container.myshop-product-detail-popup .popup-header.myshop-product-detail-header--edit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 12px;
}
.popup-container.myshop-product-detail-popup .popup-header.myshop-product-detail-header--edit .myshop-product-detail__edit-actions {
    padding: 0;
}
.popup-container.myshop-product-detail-popup .popup-title {
    font-size: 1rem;
    line-height: 1.45;
    padding: 0 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.popup-container.myshop-product-detail-popup .popup-title.myshop-product-detail__buy-trigger {
    cursor: pointer;
}
.popup-container.myshop-product-detail-popup .popup-title.myshop-product-detail__buy-trigger:hover {
    color: var(--myshop-accent, #0284c7);
}
.popup-container.myshop-product-detail-popup .popup-content {
    padding: 0;
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(90vh - var(--myshop-product-detail-chrome)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}
.popup-container.myshop-product-detail-popup .popup-footer {
    flex: 0 0 auto;
    justify-content: stretch;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.popup-container.myshop-product-detail-popup .popup-footer.myshop-product-detail-footer {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
}
.popup-container.myshop-product-detail-popup .popup-footer .popup-button {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
}
.popup-container.myshop-product-detail-popup .myshop-product-detail-share-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 52px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: #374151;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.popup-container.myshop-product-detail-popup .myshop-product-detail-share-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
.popup-container.myshop-product-detail-popup .myshop-product-detail-share-btn svg {
    width: 14px;
    height: 14px;
}
.popup-overlay.myshop-product-detail-overlay {
    z-index: var(--myshop-z-popup-detail);
}
.myshop-product-detail__edit-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
}
.myshop-product-detail-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.myshop-product-detail-edit-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}
.myshop-product-detail-edit-btn.is-delete {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.myshop-product-detail-edit-btn.is-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.myshop-product-detail-edit-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.myshop-product-detail__hero {
    background: #f8fafc;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    overflow: hidden;
}
.myshop-product-detail__hero .myshop-search-thumb {
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    background: transparent;
}
.myshop-product-detail__img,
.myshop-product-detail__hero .myshop-search-thumb__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(52vw, 360px);
    object-fit: contain;
    margin: 0 auto;
    border-radius: 8px;
}
.myshop-product-detail__hero .myshop-search-thumb__fallback {
    min-height: 120px;
    min-width: 120px;
    background: #f3f4f6;
    border-radius: 8px;
}
.myshop-product-detail__img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #cbd5e1;
}
.myshop-product-detail__img-placeholder svg {
    width: 3rem;
    height: 3rem;
}
.myshop-product-detail__body {
    padding: 16px 16px 16px;
}
.myshop-product-detail__mall-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
}
.myshop-product-detail__mall-row .myshop-product-detail__mall {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 auto;
}
.myshop-sale-period-badge--detail {
    flex: 0 0 auto;
    margin-left: auto;
    background: #f1f5f9;
    color: #475569;
    max-width: 58%;
    white-space: normal;
    text-align: right;
    line-height: 1.35;
}
.myshop-product-detail__mall {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.myshop-product-detail__mall-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.myshop-product-detail__mall-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.myshop-product-detail__mall-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
}
.myshop-product-detail__hero.myshop-product-detail__buy-trigger {
    cursor: pointer;
}
.myshop-product-detail__hero.myshop-product-detail__buy-trigger:hover {
    background: #f1f5f9;
}
.myshop-product-detail__tagline {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.45;
    color: #475569;
    margin: 0 0 0.25rem;
    word-break: break-word;
}
.myshop-product-detail__title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.45;
    color: #111827;
    margin: 0 0 0.5rem;
    word-break: break-word;
}
.myshop-product-detail__title.myshop-product-detail__buy-trigger {
    cursor: pointer;
}
.myshop-product-detail__title.myshop-product-detail__buy-trigger:hover {
    color: var(--myshop-accent, #0284c7);
}
.myshop-product-detail__price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.375rem;
}
.myshop-product-detail__price span {
    font-size: 0.9375rem;
    font-weight: 700;
}
.myshop-product-detail__notice {
    margin: 0.875rem 0 0;
    padding-top: 0.875rem;
    border-top: 1px solid #e5e7eb;
}
.myshop-product-detail__desc {
    margin-top: 0.75rem;
    padding: 0.875rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #334155;
    word-break: break-word;
}
.myshop-product-detail__desc strong,
.myshop-product-detail__desc b {
    font-weight: 700;
}
.myshop-product-detail__notice p {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: #94a3b8;
}
.myshop-product-detail__notice p + p {
    margin-top: 0.25rem;
}

@media (min-width: 641px) {
    .popup-container.myshop-product-detail-popup {
        max-width: 600px;
        width: 88%;
    }
}

@media (min-width: 768px) {
    .popup-container.myshop-product-detail-popup {
        max-width: 760px;
        width: 75%;
    }
    .myshop-product-detail__img,
    .myshop-product-detail__hero .myshop-search-thumb__img {
        max-height: min(52vh, 480px);
    }
}

@media (min-width: 1025px) {
    .popup-container.myshop-product-detail-popup {
        max-width: 840px;
        width: 68%;
    }
    .myshop-product-detail__img,
    .myshop-product-detail__hero .myshop-search-thumb__img {
        max-height: min(58vh, 520px);
    }
}

@media (max-width: 640px) {
    .popup-overlay.myshop-product-detail-overlay {
        align-items: flex-end;
        justify-content: center;
    }
    .popup-overlay.myshop-product-detail-overlay .popup-container.myshop-product-detail-popup {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 16px 16px 0 0;
        height: auto !important;
        max-height: 90vh !important;
        transform: translateY(100%);
    }
    .popup-overlay.myshop-product-detail-overlay.active .popup-container.myshop-product-detail-popup {
        transform: translateY(0);
    }
    .myshop-product-detail__hero {
        padding: 10px 12px;
    }
    .myshop-product-detail__img,
    .myshop-product-detail__hero .myshop-search-thumb__img {
        max-height: min(68vw, 300px);
    }
}

.popup-container.myshop-add-product-popup {
    max-width: 560px;
}
.myshop-add-product-confirm {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.myshop-add-product-preview {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #fff;
}
.myshop-add-product-preview-thumb {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}
.myshop-add-product-preview-thumb .myshop-search-thumb,
.myshop-add-product-preview-thumb .myshop-search-thumb__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.myshop-add-product-preview-info {
    flex: 1;
    min-width: 0;
}
.myshop-add-product-preview-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.myshop-add-product-preview-price {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0284c7;
}
.myshop-add-product-preview-price span {
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.0625rem;
}
.myshop-add-product-preview-price.is-empty {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
}
.myshop-add-product-question {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1f2937;
    text-align: center;
}
.myshop-add-product-price-note {
    margin: -0.25rem 0 0;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #6b7280;
    text-align: center;
    word-break: keep-all;
}
.myshop-add-product-group-field {
    margin-top: 0.125rem;
}
.myshop-add-product-group-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.myshop-add-product-group-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.myshop-add-policy-section {
    margin-top: 0.125rem;
    padding-top: 0.875rem;
    border-top: 1px solid #e5e7eb;
}
.myshop-add-policy-mall-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #374151;
    word-break: keep-all;
}
.myshop-add-policy-mall-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.myshop-add-policy-body {
    max-height: 42vh;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.55;
    color: #4b5563;
}
.myshop-add-policy-body p {
    margin: 0 0 0.5rem;
}
.myshop-add-policy-label {
    font-weight: 600;
    color: #374151;
}
.myshop-add-policy-warn {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 700;
}
.myshop-add-policy-block + .myshop-add-policy-block {
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid #f3f4f6;
}
.myshop-add-policy-subtitle {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}
.myshop-add-policy-text {
    word-break: break-word;
}
.myshop-add-policy-common {
    margin-top: 0.35rem;
}
.myshop-add-policy-foot {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem;
}
.myshop-add-policy-foot a {
    color: #6b7280;
    text-decoration: underline;
}
.focusbtn {
    animation: myshop-heartbeat 1.5s ease-in-out infinite;
}
@keyframes myshop-heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.05); }
    28% { transform: scale(1); }
    42% { transform: scale(1.05); }
    70% { transform: scale(1); }
}

/* 마이숍 팔레트 테마 (검색·팝업 UI) */
:root {
    --myshop-accent: #0284c7;
    --myshop-accent-light: #e0f2fe;
    --myshop-item-bg: #ffffff;
    --myshop-item-text: #1f2937;
    --myshop-surface: #f9fafb;
    --myshop-border: #e5e7eb;
}
.myshop-theme-sort-active {
    background-color: var(--myshop-accent-light) !important;
    color: var(--myshop-accent) !important;
}
.myshop-theme-accent {
    color: var(--myshop-accent) !important;
}
.myshop-theme-accent-border {
    border-color: var(--myshop-accent) !important;
}
.myshop-theme-item-bg {
    background-color: var(--myshop-item-bg) !important;
}
.myshop-theme-item-text {
    color: var(--myshop-item-text) !important;
}
.myshop-theme-surface {
    background-color: var(--myshop-surface) !important;
}
/* 검색 중 기존 상품 리스트·그룹·수수료 안내 숨김 */
.myshop-products-section.is-searching .myshop-grid-view,
.myshop-products-section.is-searching .myshop-list-view,
.myshop-products-section.is-searching .myshop-photo-view,
.myshop-products-section.is-searching .myshop-groups {
    display: none !important;
}

/* 상품 리스트 상단 검색 */
.myshop-product-search {
    position: relative;
    margin: 0.75rem 0 1rem;
}
.myshop-products-section .myshop-products-top .myshop-product-search {
    margin: 0;
}
.myshop-product-search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.myshop-product-search-inner:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.myshop-product-search-submit,
.myshop-product-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.myshop-product-search-submit:hover {
    color: #0284c7;
    background: #f0f9ff;
}
.myshop-product-search-clear:hover {
    color: #374151;
    background: #f3f4f6;
}
.myshop-product-search-clear.hidden {
    display: none;
}
.myshop-product-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1f2937;
    outline: none;
}
.myshop-product-search-input::placeholder {
    color: #9ca3af;
}
.myshop-product-search-recent {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.myshop-product-search-recent.hidden {
    display: none;
}
.myshop-product-search-recent--embedded {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0.625rem;
    z-index: auto;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.myshop-product-search-recent__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    padding: 0 0.25rem;
}
.myshop-product-search-recent__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}
.myshop-product-search-recent__clear {
    border: none;
    background: transparent;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
    cursor: pointer;
}
.myshop-product-search-recent__clear:hover {
    color: #374151;
}
.myshop-product-search-recent__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 16rem;
    overflow-y: auto;
}
.myshop-product-search-recent__item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.myshop-product-search-recent__keyword {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.875rem;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
}
.myshop-product-search-recent__keyword span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.myshop-product-search-recent__keyword:hover {
    background: #f3f4f6;
}
.myshop-product-search-recent__keyword i,
.myshop-product-search-recent__remove i {
    flex-shrink: 0;
    color: #9ca3af;
}
.myshop-product-search-recent__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}
.myshop-product-search-recent__remove:hover {
    background: #f3f4f6;
    color: #374151;
}
.myshop-products-section.myshop-layout-photo .myshop-product-search {
    margin-left: 0;
    margin-right: 0;
}
.myshop-products-section.myshop-layout-photo .myshop-products-top {
    margin-left: 0;
    margin-right: 0;
}
.myshop-search-toolbar {
    background-color: var(--myshop-surface);
}
/* 검색 결과 — 리스트형과 동일 UI */
#search-results-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}
#search-results-list .list-product-aside {
    align-items: center;
}
#search-results-list .myshop-search-commission-aside {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.35rem;
}
#search-results-list .myshop-search-commission-aside .list-stat-tag {
    display: inline-block;
    padding: 0;
    background: transparent;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.3;
    color: #6b7280;
    white-space: nowrap;
    text-align: center;
}
#search-results .list-search-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #9ca3af;
}
.myshop-inline-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    border: none;
    border-radius: 0.5rem;
    background: #0284c7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.myshop-inline-add-btn:hover {
    background: #0369a1;
}
.myshop-inline-added-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    border-radius: 0.5rem;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.22);
}
.myshop-inline-added-label svg {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}
.search-item:hover {
    background-color: var(--myshop-surface);
}
#search-results h3 {
    color: var(--myshop-item-text);
}
/* 검색 결과 — 상품 이미지 깨짐 시 기본 아이콘 */
.myshop-search-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}
.myshop-search-thumb__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.myshop-search-thumb__fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
}
.myshop-search-thumb.is-broken .myshop-search-thumb__img {
    display: none !important;
}
.myshop-search-thumb.is-broken .myshop-search-thumb__fallback {
    display: flex;
}
.myshop-search-thumb__icon {
    width: 1.75rem;
    height: 1.75rem;
    stroke-width: 1.5;
}
/* 상품 리스트(그리드·리스트·사진형) 썸네일 */
.aspect-square .myshop-search-thumb,
.list-product-thumb .myshop-search-thumb {
    position: absolute;
    inset: 0;
}
.photo-view .myshop-search-thumb__fallback {
    color: rgba(255, 255, 255, 0.75);
}
.photo-view .myshop-search-thumb.is-broken {
    background-color: rgba(0, 0, 0, 0.35);
}

/* 상품 아이템 컨테이너 스타일 */
.myshop-grid-view .product-item {
    position: relative;
    border-radius: 0;
    overflow: visible;
    border: none;
    box-shadow: none;
}

/* 삭제 버튼 — 편집 모드에서만 표시 */
.delete-product-btn {
    display: none !important;
    position: absolute;
    z-index: 30;
    background-color: white;
    padding: 0.25rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    box-sizing: border-box;
}
/* 리스트형 삭제버튼 — 수정버튼과 동일 아이콘 스타일 */
.myshop-grid-view .grid-cp-icon {
    border-radius: 50%;
    object-fit: cover;
}

/* 상품 카드 컨테이너 */
.relative {
    position: relative;
}

/* 상품 추가 버튼 스타일 */
.add-product-btn {
    display: none;
    background-color: #0ea5e9;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.add-product-btn:hover {
    background-color: #0284c7;
}
.edit-mode .add-product-btn {
    display: inline-flex;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-message {
    color: #374151;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 툴팁 스타일 */
.header-btn::after, .layout-btn::after, .price-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.header-btn:hover::after, .layout-btn:hover::after, .price-toggle:hover::after {
    opacity: 1;
    visibility: visible;
    animation: tooltipFadeOut 2s forwards;
}

@keyframes tooltipFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    80% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* 첫·마지막 툴팁 위치 조정 */
.myshop-edit-control-bar__toggles > .price-toggle:first-of-type::after {
    left: 0;
    transform: none;
}
@media (min-width: 640px) {
    .header-toolbar > .header-btn:first-child::after,
    .header-toolbar > .layout-btn:first-of-type::after {
        left: 0;
        transform: none;
    }
}

/* 편집 모드 통계 정보 스타일 */
.edit-mode-stats {
    display: none;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.1rem;
    text-align: center;
    padding: 0.25rem;
    background-color: transparent;
    border-radius: 0.375rem;
    height: 1.5rem;
}

/* 그리드 뷰에서 상품 아이템 컨테이너 스타일 */
.myshop-grid-view .product-item {
    margin-bottom: 0;
    position: relative;
    border-radius: 0;
    overflow: visible;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none;
}
.myshop-grid-view .product-item .grid-product-info {
    padding-top: 0.75rem;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}
.myshop-grid-view .grid-product-info .product-price {
    font-size: 0.9375rem;
    line-height: 1.3;
}
.myshop-grid-view .grid-product-mall-row {
    margin-bottom: 0.25rem;
}
.myshop-grid-view .grid-product-mall {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.125rem;
    min-width: 0;
}
.myshop-grid-view .grid-product-mall-main {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}
.myshop-grid-view .grid-product-mall-icon {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.myshop-grid-view .grid-product-mall-name {
    display: inline-flex;
    align-items: center;
    height: 1.125rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateY(1px);
}
.myshop-grid-view .sortable-ghost {
    background: transparent;
    box-shadow: none;
}
.myshop-grid-view .product-item .aspect-square {
    border-radius: 0.75rem;
    overflow: hidden;
}
.myshop-grid-view .product-item .grid-product-img {
    border-radius: 0.75rem;
}

/* 리스트 뷰에서 상품 아이템 컨테이너 스타일 */
.myshop-list-view .product-item {
    margin-bottom: 0;
}

/* 포토 뷰에서 상품 아이템 컨테이너 스타일 */
.myshop-photo-view .product-item {
    margin-bottom: 0;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

/* 에디트 모드일 때 상품 아이템 컨테이너 스타일 */
.edit-mode .myshop-grid-view .product-item {
    margin-bottom: 1rem;
}
/* 편집모드 그리드 — 제목·한줄소개 높이 차이와 무관하게 콘트롤바 하단 정렬 */
body.edit-mode .myshop-grid-view {
    align-items: stretch;
}
body.edit-mode .myshop-grid-view > .myshop-sortable-item {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
body.edit-mode .myshop-grid-view > .myshop-sortable-item > .product-item {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}
body.edit-mode .myshop-grid-view .grid-product-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
body.edit-mode .myshop-grid-view .grid-product-mall-slot {
    flex-shrink: 0;
    min-height: 1.375rem;
}
body.edit-mode .myshop-grid-view .grid-product-text-block {
    flex: 1 1 auto;
    min-height: 2.75rem;
}
body.edit-mode .myshop-grid-view .grid-product-footer-row {
    flex-shrink: 0;
    margin-top: auto;
}
.edit-mode .myshop-photo-view .product-item {
    margin-bottom: 0;
}
.edit-mode .myshop-list-view .product-item {
    margin-bottom: 0;
}

/* 편집 모드 — 가로 스크롤만 방지 (body position:fixed·html overflow 잠금은 iOS 스크롤/터치 깨짐) */
body.edit-mode {
    overflow-x: hidden;
}

/* 편집 모드: 카드 전체 클릭보다 액션 버튼 터치 우선 (iOS) */
.edit-mode .product-item {
    pointer-events: none;
}
.edit-mode .product-item .list-product-body,
.edit-mode .product-item .grid-product-info,
.edit-mode .product-item .aspect-square,
.edit-mode .product-item .product-card-actions,
.edit-mode .product-item .product-control-body,
.edit-mode .product-item .product-control-btns,
.edit-mode .product-item .list-product-action-btns,
.edit-mode .photo-gallery-cell .photo-card-actions-bar {
    pointer-events: auto;
}

/* 상품 이미지 기본 스타일 */
.product-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 리스트 뷰 상품 이미지 */
.list-view .product-image.list-product-thumb {
    width: 6rem;
    height: 6rem;
    padding-bottom: 0;
}

/* 정렬 모드 스타일 */
.sortable {
    cursor: move;
}

.sortable-ghost {
    opacity: 0.5;
    background: #f3f4f6;
}

.sortable .product-item {
    cursor: move;
}

.myshop-list-view.sortable .list-product-card:hover {
    opacity: 1;
}
.edit-mode .myshop-list-view.list-view {
    gap: 0.25rem;
}
.edit-mode .list-item-wrap {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
.edit-mode .list-view .list-product-body {
    padding: 0.75rem 0;
}
@media (max-width: 480px) {
    .list-view .list-product-body {
        gap: 0.75rem;
        padding: 0.75rem 0;
        min-height: 5.5rem;
    }
    .list-view .list-product-thumb,
    .list-view .product-image.list-product-thumb {
        width: 5rem;
        height: 5rem;
    }
    .list-view .list-product-aside {
        padding-left: 0;
    }
}

/* 정렬 모드일 때 상품 클릭 비활성화 */
.sortable .product-item {
    pointer-events: none;
}

/* 정렬 완료 버튼 스타일 */
.sort-complete-btn {
    display: none;
    position: fixed;
    bottom: max(4.5rem, calc(1.25rem + env(safe-area-inset-bottom, 0px)));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1300;
    width: 90%;
    max-width: 500px;
    text-align: center;
    pointer-events: auto;
}
body.sort-mode .sort-complete-btn {
    display: block !important;
}

.complete-btn {
    background: #0ea5e9;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.complete-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.complete-btn:active {
    transform: translateY(0);
}

/* 정렬 모드 안내 메시지 스타일 */
.sort-guide-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInOut 2s ease-in-out forwards;
}

.guide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.guide-content p {
    font-size: 0.875rem;
    line-height: 1.5;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 정렬 모드에서 삭제 버튼과 편집 모드 버튼 숨기기 */
.sortable .delete-product-btn,
.sortable .edit-mode-icon,
.sortable .product-preview-btn,
.sortable .product-edit-icon,
.sortable .profile-edit-icon {
    display: none !important;
}

/* 정렬 모드에서 커미션과 클릭 데이터 숨기기 */
.sortable .edit-mode-stats {
    display: none !important;
}

/* 기본 레이아웃 스타일 */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    font-family: "IBM Plex Sans KR", "SUIT", "sans-serif";
}

body {
    display: flex;
    flex-direction: column;
}

/* 네이티브 앱 WebView — 100vh/Done 타이틀바로 인한 하단 잘림 방지 */
html:has(body.myshop-in-app) {
    height: -webkit-fill-available;
}
body.myshop-in-app {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.myshop-in-app > footer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
body.myshop-in-app .popup-container.myshop-product-detail-popup,
body.myshop-in-app .popup-overlay.myshop-product-detail-overlay .popup-container.myshop-product-detail-popup {
    max-height: min(90dvh, calc(100dvh - env(safe-area-inset-top, 0px))) !important;
}
body.myshop-in-app .popup-container.myshop-product-detail-popup .popup-content {
    max-height: calc(min(90dvh, 100dvh - env(safe-area-inset-top, 0px)) - var(--myshop-product-detail-chrome)) !important;
}

/* 마이숍 페이지·내부 스크롤 영역 — 얇은 스크롤바 */
html,
body,
body.edit-mode,
.popup-content,
#searchResultsContainer,
.myshop-edit-control-bar,
.myshop-welcome-popup__content {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body.edit-mode::-webkit-scrollbar,
.popup-content::-webkit-scrollbar,
#searchResultsContainer::-webkit-scrollbar,
.myshop-edit-control-bar::-webkit-scrollbar,
.myshop-welcome-popup__content::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
body.edit-mode::-webkit-scrollbar-track,
.popup-content::-webkit-scrollbar-track,
#searchResultsContainer::-webkit-scrollbar-track,
.myshop-edit-control-bar::-webkit-scrollbar-track,
.myshop-welcome-popup__content::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
body.edit-mode::-webkit-scrollbar-thumb,
.popup-content::-webkit-scrollbar-thumb,
#searchResultsContainer::-webkit-scrollbar-thumb,
.myshop-edit-control-bar::-webkit-scrollbar-thumb,
.myshop-welcome-popup__content::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.2);
    border-radius: 9999px;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
body.edit-mode::-webkit-scrollbar-thumb:hover,
.popup-content::-webkit-scrollbar-thumb:hover,
#searchResultsContainer::-webkit-scrollbar-thumb:hover,
.myshop-edit-control-bar::-webkit-scrollbar-thumb:hover,
.myshop-welcome-popup__content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(15, 23, 42, 0.38);
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
body.edit-mode::-webkit-scrollbar-corner {
    background: transparent;
}

footer {
    margin-top: auto;
    width: 100%;
    position: relative;
    bottom: 0;
}

.myshop-footer-visit-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    max-width: 100%;
}
.myshop-footer-visit-row .visit-stats {
    margin: 0;
}
.myshop-footer-visit-stats-btn {
    display: none;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    line-height: 1;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
body.edit-mode .myshop-footer-visit-stats-btn {
    display: inline-flex;
}
.myshop-footer-visit-stats-btn:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.myshop-footer-visit-stats-btn svg,
.myshop-footer-visit-stats-btn i {
    width: 0.6875rem;
    height: 0.6875rem;
}

/* footer 애드픽 마이숍 소개 팝업 */
.popup-container.myshop-footer-intro-popup {
    max-width: 420px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.myshop-footer-intro-popup .popup-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: none;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.myshop-footer-intro-popup .popup-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
}
.myshop-footer-intro-popup .popup-title b {
    color: #2563eb;
    font-weight: 800;
}
.myshop-footer-intro-popup .popup-content {
    padding: 0 1rem 0.75rem;
}
.myshop-footer-intro-popup .popup-footer {
    padding: 0 1rem 1.25rem;
    border-top: none;
    justify-content: stretch;
}
.myshop-footer-intro-popup .popup-footer .popup-button {
    flex: 1;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 700;
}
.myshop-footer-intro-popup .popup-footer .popup-button.primary {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}
.myshop-footer-intro-popup .popup-footer .popup-button.primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.myshop-footer-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.myshop-footer-intro__hero {
    text-align: center;
}
.myshop-footer-intro__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}
.myshop-footer-intro__badge svg {
    width: 0.875rem;
    height: 0.875rem;
}
.myshop-footer-intro__title {
    margin: 0;
    color: #0f172a;
    font-size: 1.375rem;
    line-height: 1.35;
    letter-spacing: -0.03em;
    font-weight: 800;
    word-break: keep-all;
}
.myshop-footer-intro__title em {
    font-style: normal;
    color: #2563eb;
}
.myshop-footer-intro__desc {
    margin: 0.625rem 0 0;
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.6;
    word-break: keep-all;
}
.myshop-footer-intro__features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.myshop-footer-intro__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #f8fafc;
}
.myshop-footer-intro__features li strong {
    display: block;
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
}
.myshop-footer-intro__features li span {
    display: block;
    margin-top: 0.125rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.35;
}
.myshop-footer-intro__feature-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
}
.myshop-footer-intro__feature-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}
.myshop-footer-intro__feature-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}
.myshop-footer-intro__feature-icon--green {
    background: #dcfce7;
    color: #16a34a;
}
.myshop-footer-intro__feature-icon--purple {
    background: #ede9fe;
    color: #7c3aed;
}
.myshop-footer-intro__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}
.myshop-footer-intro__hint svg {
    width: 0.9375rem;
    height: 0.9375rem;
    color: #2563eb;
}

/* footer 마이숍 생성 팝업 */
.myshop-footer-create__textarea {
    min-height: 5.5rem;
}
.myshop-footer-create__switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 48px;
    height: 28px;
    margin: 0;
    border-radius: 9999px;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s ease;
}
.myshop-footer-create__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}
.myshop-footer-create__switch:checked {
    background: #2563eb;
}
.myshop-footer-create__switch:checked::after {
    transform: translateX(20px);
}

/* Font Awesome 폰트 설정 */
:root {
    --fa-font-solid: normal 900 1em / 1 "Font Awesome 6 Solid";
    --fa-font-regular: normal 400 1em / 1 "Font Awesome 6 Regular";
    --fa-font-light: normal 300 1em / 1 "Font Awesome 6 Light";
    --fa-font-thin: normal 100 1em / 1 "Font Awesome 6 Thin";
    --fa-font-duotone: normal 900 1em / 1 "Font Awesome 6 Duotone";
    --fa-font-sharp-solid: normal 900 1em / 1 "Font Awesome 6 Sharp";
    --fa-font-brands: normal 400 1em / 1 "Font Awesome 6 Brands";
}

/* 비활성 마이숍 — 소유자·관리자 미리보기 배너 */
.myshop-inactive-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 16px;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom: 1px solid #fdba74;
    color: #9a3412;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.myshop-inactive-banner__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 비활성·미존재 마이숍 공개 안내 */
.myshop-unavailable-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.08), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(99, 102, 241, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f1f5f9 100%);
}

.myshop-unavailable {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.myshop-unavailable__card {
    width: min(100%, 420px);
    padding: 36px 28px 32px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
    text-align: center;
    backdrop-filter: blur(8px);
}

.myshop-unavailable__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
}

.myshop-unavailable__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.myshop-unavailable__desc {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.myshop-unavailable__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    background: #0f172a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.myshop-unavailable__btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

/* ===================== 상품 그룹 ===================== */

/* 공개 모드 — 등록 상품 없음 */
.myshop-products-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem 4rem;
    min-height: 220px;
}
.myshop-products-empty__icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    color: var(--item-text-color, #94a3b8);
    opacity: 0.55;
}
.myshop-products-empty__title {
    margin: 0 0 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--item-text-color, #64748b);
}
.myshop-products-empty__desc {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--item-text-color, #94a3b8);
    opacity: 0.9;
}

/* 그룹 섹션 */
.myshop-groups {
    margin-top: 8px;
}
.myshop-group-section {
    margin-top: 26px;
}
/* 공개 모드에서는 상품이 없는 그룹 숨김 */
body:not(.edit-mode) .myshop-group-section.is-empty {
    display: none;
}
.myshop-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--group-divider, rgba(100, 116, 139, 0.25));
}
.myshop-group-sort-handle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    line-height: 0;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
    color: var(--item-text-color, #64748b);
    -webkit-tap-highlight-color: transparent;
}
body.edit-mode .myshop-group-sort-handle {
    display: inline-flex;
}
.myshop-group-sort-handle:active {
    cursor: grabbing;
}
.myshop-group-sort-handle i,
.myshop-group-sort-handle svg {
    pointer-events: none;
    opacity: 0.55;
}
.myshop-group-section-ghost {
    opacity: 0.55;
}
.myshop-group-section-ghost .myshop-group-products,
.myshop-group-section-drag .myshop-group-products,
body.myshop-group-section-dragging .myshop-group-section .myshop-group-products {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
}
body.myshop-group-section-dragging .myshop-group-section .myshop-group-header,
.myshop-group-section-ghost .myshop-group-header,
.myshop-group-section-drag .myshop-group-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom-color: transparent;
}
body.myshop-group-section-dragging .myshop-group-section {
    margin-top: 10px;
}
body.myshop-group-section-dragging .myshop-group-section:first-child {
    margin-top: 0;
}
body.myshop-group-section-dragging .myshop-group-section-ghost {
    opacity: 0.65;
}
body.edit-mode .myshop-group-section.is-empty .myshop-group-header {
    margin-bottom: 6px;
    padding-bottom: 6px;
}
.myshop-group-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--item-text-color, #0f172a);
    word-break: break-word;
}
/* 기본그룹 표시 태그 — 편집모드에서만 노출 */
.myshop-group-default-badge {
    display: none;
}
body.edit-mode .myshop-group-default-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 8px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 9999px;
    white-space: nowrap;
}
/* 타이틀 숨김: 공개 모드에서는 헤더 전체 숨김, 편집 모드에서는 흐리게 표시 */
body:not(.edit-mode) .myshop-group-section.is-title-hidden .myshop-group-header {
    display: none;
}
body.edit-mode .myshop-group-section.is-title-hidden .myshop-group-title-text {
    opacity: 0.45;
    text-decoration: line-through;
}
.myshop-group-actions {
    display: none;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
body.edit-mode .myshop-group-actions {
    display: flex;
}
body.sort-mode .myshop-group-actions {
    display: none;
}
.myshop-group-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: rgba(255, 255, 255, 0.7);
    color: var(--item-text-color, #475569);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.myshop-group-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}
.myshop-group-btn--del:hover {
    color: #ef4444;
    border-color: #fecaca;
}
.myshop-group-btn--add-product {
    width: auto;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.myshop-group-add-group-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    border: 1px dashed rgba(100, 116, 139, 0.45);
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.55);
    color: var(--item-text-color, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.edit-mode .myshop-group-add-group-btn {
    display: flex;
}
body.sort-mode .myshop-group-add-group-btn {
    display: none !important;
}
.myshop-group-add-group-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(37, 99, 235, 0.45);
    color: #2563eb;
}
.myshop-group-add-group-btn i,
.myshop-group-add-group-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
body.edit-mode .myshop-group-section.is-collapsed .myshop-group-products {
    display: none;
}
body.edit-mode .myshop-group-section.is-collapsed .myshop-group-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom-color: transparent;
}
body.edit-mode .myshop-group-section.is-collapsed {
    margin-top: 16px;
}
body.edit-mode .myshop-group-section.is-collapsed .myshop-group-btn--collapse {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.35);
    color: #2563eb;
}
body.edit-mode .myshop-group-section.is-collapsed .myshop-group-btn--collapse:hover {
    background: rgba(37, 99, 235, 0.22);
}

.myshop-group-empty {
    display: none;
    padding: 12px;
    border: 1px dashed rgba(100, 116, 139, 0.4);
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--item-text-color, #94a3b8);
    opacity: 0.85;
    min-height: 2.75rem;
    box-sizing: border-box;
    pointer-events: none;
}
.myshop-group-empty__lead {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--item-text-color, #64748b);
}
.myshop-group-empty__note {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--item-text-color, #94a3b8);
    opacity: 0.9;
}
body.edit-mode .myshop-group-section.is-empty .myshop-group-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    min-height: 6.5rem;
    padding: 20px 16px;
    text-align: center;
}
body.edit-mode .myshop-group-section.is-empty .myshop-group-products {
    position: relative;
    z-index: 2;
}
/* 드래그 중 상품이 들어오면 안내 오버레이 숨김 */
body.edit-mode .myshop-group-body:has(.myshop-sortable-item) .myshop-group-empty {
    display: none !important;
}

/* 그룹 레이아웃 변경 팝업 */
.myshop-group-layout-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.myshop-group-layout-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
}
.myshop-group-layout-opt:hover {
    border-color: #0ea5e9;
}
.myshop-group-layout-opt.is-active {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #0369a1;
}

/* 그룹 이름 수정 팝업 */
.myshop-group-edit-popup__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.myshop-group-edit-popup__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    color: #0f172a;
}
.myshop-group-edit-popup__input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* 그룹 설정 통합 팝업 */
.myshop-group-settings-popup {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.myshop-group-settings-popup__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.myshop-group-settings-popup__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.myshop-group-settings-popup__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.myshop-group-settings-popup__switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    margin: 0;
    border: none;
    border-radius: 9999px;
    background-color: #64748b;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.myshop-group-settings-popup__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease;
}
.myshop-group-settings-popup__switch:checked {
    background-color: #0ea5e9;
    box-shadow: inset 0 1px 2px rgba(2, 132, 199, 0.2);
}
.myshop-group-settings-popup__switch:checked::after {
    transform: translateX(18px);
}
.myshop-group-settings-layout-list {
    margin-top: 2px;
}

/* ===================== 정렬(순서변경) 통합 뷰 ===================== */
.myshop-sort-view {
    margin-top: 10px;
}
.myshop-sort-hint {
    font-size: 13px;
    color: var(--item-text-color, #64748b);
    margin-bottom: 12px;
    opacity: 0.9;
}
.myshop-sort-section {
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(100, 116, 139, 0.18);
    padding: 12px;
}
.myshop-sort-section__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--item-text-color, #0f172a);
}
.myshop-sort-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 48px;
}
.myshop-sort-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    cursor: grab;
}
.myshop-sort-item:active {
    cursor: grabbing;
}
.myshop-sort-grip {
    flex-shrink: 0;
    color: #94a3b8;
    display: inline-flex;
}
.myshop-sort-item__thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.myshop-sort-item__thumb .myshop-sort-item__img,
.myshop-sort-item__img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}
.myshop-sort-item__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.myshop-sort-empty {
    padding: 14px;
    border: 1px dashed rgba(100, 116, 139, 0.4);
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}
.myshop-sort-empty.hidden {
    display: none;
}
.myshop-sort-item.sortable-ghost {
    opacity: 0.5;
}

