/* =============================================
   마이페이지 커스텀 섹션 (Page Custom Sections)
   ============================================= */

.page-custom-sections {
    --custom-primary: var(--primary);
    --bt-ds-primary: var(--primary, #f8384b);
    --bt-ds-primary-dark: var(--primary-dark, #d41f34);
    --bt-ds-bg: var(--bg, #ffffff);
    --bt-ds-bg-light: var(--bg-light, #f8f9fa);
    --bt-ds-text: var(--text, #111827);
    --bt-ds-text-light: var(--text-light, #6b7280);
    --bt-ds-border: var(--border, #e5e7eb);
    --bt-ds-radius: 8px;
    --bt-ds-transition: 0.2s ease;
    padding: 40px 24px 72px;
    box-sizing: border-box;
}

body.botari-seller-store-route {
    --bt-ds-primary: var(--primary, #f8384b);
    --bt-ds-primary-dark: var(--primary-dark, #d41f34);
    --bt-ds-bg: var(--bg, #ffffff);
    --bt-ds-bg-light: var(--bg-light, #f8f9fa);
    --bt-ds-text: var(--text, #111827);
    --bt-ds-text-light: var(--text-light, #6b7280);
    --bt-ds-border: var(--border, #e5e7eb);
    --bt-ds-radius: 8px;
    --bt-ds-transition: 0.2s ease;
}

body.admin-bar.botari-seller-store-route {
    padding-top: 64px;
}

@media screen and (max-width: 782px) {
    body.admin-bar.botari-seller-store-route {
        padding-top: 56px;
    }
}

.seller-private-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(560px, 70vh);
    padding: 72px 20px;
    background: var(--bt-ds-bg);
}

.seller-private-profile__card {
    width: min(100%, 480px);
    padding: 32px;
    border: 1px solid var(--bt-ds-border);
    border-radius: var(--bt-ds-radius);
    background: var(--bt-ds-bg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.seller-private-profile__eyebrow {
    margin: 0 0 8px;
    color: var(--bt-ds-primary);
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
    letter-spacing: .12em;
}

.seller-private-profile__card h1 {
    margin: 0 0 10px;
    color: var(--bt-ds-text);
    font-size: var(--bt-font-size-display);
}

.seller-private-profile__card p {
    margin: 0 0 20px;
    color: var(--bt-ds-text-light);
}

.seller-private-profile__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: var(--bt-ds-radius);
    background: var(--bt-ds-primary);
    color: #fff;
    font-weight: var(--bt-font-weight-bold);
    text-decoration: none;
}

.seller-profile-privacy {
    align-items: flex-start;
    gap: 10px;
    width: min(100%, 420px);
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--bt-ds-border);
    border-radius: var(--bt-ds-radius);
    background: var(--bt-ds-bg);
    color: var(--bt-ds-text);
    text-align: left;
}

.seller-profile-privacy:not(.bt-hidden) {
    display: flex;
}

.seller-profile-privacy input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--bt-ds-primary);
}

.seller-profile-privacy span {
    display: grid;
    gap: 2px;
}

.seller-owner-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.seller-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.seller-action-separator {
    color: var(--bt-ds-text-light);
    font-size: var(--bt-font-size-small);
    line-height: 1;
    opacity: .65;
    user-select: none;
}

.seller-profile-privacy strong {
    font-size: var(--bt-font-size-small);
}

.seller-profile-privacy small {
    color: var(--bt-ds-text-light);
    font-size: var(--bt-font-size-small);
    line-height: 1.45;
}

.seller-profile-privacy--custom {
    margin: 14px auto 0;
}

.page-custom-sections > div[data-bt-section] {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.page-custom-sections > div[data-bt-section="profile"] {
    margin-top: 8px;
}

@media (min-width: 768px) {
    .page-custom-sections > div[data-bt-section="profile"] {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

.page-custom-sections .bt-tabs {
    width: 100%;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.page-custom-sections .bt-tabs-nav {
    display: flex;
    gap: 32px;
    padding: 0;
    margin: 0 0 24px;
    background: transparent;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.page-custom-sections .bt-tabs-nav::-webkit-scrollbar {
    display: none;
}

.page-custom-sections .bt-tabs-content {
    padding: 0;
    background: transparent;
}

.page-custom-sections .bt-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--text-light, #6b7280);
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.page-custom-sections .bt-tab-button:hover {
    background: transparent;
    color: var(--primary);
}

.page-custom-sections .bt-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.page-custom-sections .bt-profile {
    background: transparent;
    border: 0;
    box-shadow: none;
    width: 100%;
}


.page-custom-sections .bt-profile-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-custom-sections .bt-profile-centered {
    text-align: center;
}

.page-custom-sections .bt-profile-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 24px;
}

.page-custom-sections .bt-profile-left .bt-profile-avatar-wrap {
    align-self: flex-start;
}

.page-custom-sections .bt-profile-avatar {
    flex-shrink: 0;
    width: var(--bt-avatar-size, 120px);
    height: var(--bt-avatar-size, 120px);
}

.page-custom-sections .bt-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--bt-avatar-radius, 50%);
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: block;
}

.page-custom-sections .bt-profile-info {
    flex: 1;
}

.page-custom-sections .bt-profile-name {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 10px;
    color: var(--text, #111827);
}

.page-custom-sections .bt-profile-username {
    font-size: var(--bt-font-size-body);
    color: var(--text-light, #6b7280);
    margin: 0 0 16px;
}

.page-custom-sections .bt-profile-bio {
    font-size: var(--bt-font-size-body);
    line-height: 1.7;
    color: #374151;
    margin: 0 0 20px;
    max-width: 620px;
}

.page-custom-sections .bt-profile-stats {
    display: flex;
    gap: 24px;
    font-size: var(--bt-font-size-small);
    color: var(--text-light, #6b7280);
    margin-top: 12px;
}

.page-custom-sections .bt-profile-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.page-custom-sections .bt-profile.is-editing {
    outline: 2px dashed rgba(248, 56, 75, 0.35);
    outline-offset: 10px;
}

.page-custom-sections .bt-profile-edit-input,
.page-custom-sections .bt-profile-edit-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    box-sizing: border-box;
}

.page-custom-sections .bt-profile-edit-input {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    padding: 12px 14px;
    margin: 0 0 10px;
}

.page-custom-sections .bt-profile-edit-label {
    width: 100%;
    margin: 8px 0 6px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
    color: var(--text-light);
    text-align: left;
}

.page-custom-sections .bt-profile-edit-textarea {
    min-height: 128px;
    font-size: var(--bt-font-size-body);
    line-height: 1.7;
    padding: 14px 16px;
    margin: 0 0 20px;
    resize: vertical;
}

@media (min-width: 769px) {
    .page-custom-sections .bt-profile.is-editing .bt-profile-info {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
        column-gap: 24px;
        row-gap: 6px;
        align-items: start;
        width: 100%;
    }

    .page-custom-sections .bt-profile.is-editing .bt-profile-edit-input,
    .page-custom-sections .bt-profile.is-editing .bt-profile-edit-label,
    .page-custom-sections .bt-profile.is-editing .bt-profile-edit-textarea {
        grid-column: 1;
    }

    .page-custom-sections .bt-profile.is-editing .seller-profile-privacy--custom,
    .page-custom-sections .bt-profile.is-editing .bt-permission-center--in-profile {
        grid-column: 2;
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    .page-custom-sections .bt-profile.is-editing .seller-profile-privacy--custom {
        grid-row: 1;
        margin-top: 0;
        margin-bottom: 0;
    }

    .page-custom-sections .bt-profile.is-editing .bt-permission-center--in-profile {
        grid-row: 2;
        margin-top: 4px;
    }
}

@media (max-width: 768px) {
    .page-custom-sections .bt-profile.is-editing .bt-profile-info {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .page-custom-sections .bt-profile-centered.is-editing .bt-profile-info {
        align-items: center;
    }

    .page-custom-sections .seller-profile-privacy--custom,
    .page-custom-sections .bt-permission-center--in-profile {
        width: min(100%, 560px);
        margin-left: 0;
        margin-right: 0;
    }

    .page-custom-sections .bt-profile-centered.is-editing .seller-profile-privacy--custom,
    .page-custom-sections .bt-profile-centered.is-editing .bt-permission-center--in-profile {
        margin-left: auto;
        margin-right: auto;
    }

    .page-custom-sections .seller-profile-privacy--custom {
        order: 30;
        margin-top: 10px;
        margin-bottom: 0;
    }

    .page-custom-sections .bt-permission-center--in-profile {
        order: 31;
        margin-top: 4px;
    }
}

.page-custom-sections .bt-profile-avatar {
    position: relative;
}

.page-custom-sections .bt-profile-avatar-edit-overlay {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    border: 0;
    border-radius: var(--bt-ds-radius);
    background: var(--primary);
    color: #ffffff;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(248, 56, 75, 0.25);
}

.page-custom-sections .bt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: var(--bt-font-weight-semibold);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.page-custom-sections .bt-button.btn-primary {
    background: var(--bt-ds-primary);
    color: #fff;
    border-color: var(--bt-ds-primary);
}

.page-custom-sections .bt-button.btn-primary:hover {
    background: var(--bt-ds-primary-dark);
    color: #fff;
    border-color: var(--bt-ds-primary-dark);
}

.page-custom-sections .bt-button.btn-outline {
    background: white;
    color: #6b7280;
    border-color: #e5e7eb;
}

.page-custom-sections .bt-button.btn-outline:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.page-custom-sections .bt-button.btn-text {
    background: transparent;
    color: var(--primary);
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.page-custom-sections .bt-selling-products,
.page-custom-sections .bt-purchased-products {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.page-custom-sections .bt-section-header {
    margin-bottom: 18px;
}

.page-custom-sections .bt-section-title:empty {
    display: none;
}

.page-custom-sections .bt-section-header:has(.bt-section-title:empty) {
    display: none;
}

.page-custom-sections .bt-section-title {
    margin: 0;
    font-size: var(--bt-font-size-display);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #111827;
}

.page-custom-sections .bt-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.page-custom-sections .bt-products-grid.bt-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-custom-sections .bt-products-grid.bt-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-custom-sections .bt-products-grid.bt-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-custom-sections .bt-product-card {
    min-width: 0;
}

.page-custom-sections .bt-product-card > a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.page-custom-sections .bt-card-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background-color: #eef2ff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.page-custom-sections .bt-card-thumbnail--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bt-font-size-display);
    color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.page-custom-sections .bt-card-body {
    padding-top: 12px;
}

.page-custom-sections .bt-card-type {
    margin-bottom: 6px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #64748b;
}

.page-custom-sections .bt-card-title {
    margin: 0;
    font-size: var(--bt-font-size-body);
    line-height: 1.45;
    color: #111827;
    word-break: keep-all;
}

.page-custom-sections .bt-no-products {
    margin: 0;
    color: #64748b;
    font-size: var(--bt-font-size-body);
}

.page-custom-sections .bt-product-filters {
    margin-bottom: 22px;
}

/* accent 색상 오버라이드 */
.page-custom-sections .pcs__link--btn-primary,
.page-custom-sections .pcs__social-icon:hover {
    background: var(--custom-primary);
    border-color: var(--custom-primary);
}
.page-custom-sections .pcs__link--btn-outline {
    border-color: var(--custom-primary);
    color: var(--custom-primary);
}
.page-custom-sections .pcs__link--btn-outline:hover {
    background: var(--custom-primary);
    color: white;
}
.page-custom-sections .pcs--banner-primary {
    background: var(--custom-primary);
}
.page-custom-sections .pcs__title {
    color: var(--custom-primary);
}

/* dark 테마 */
.page-custom-sections.theme-dark {
    background: #111827;
    color: #f9fafb;
}
.page-custom-sections.theme-dark .pcs__bio-text,
.page-custom-sections.theme-dark .pcs__text-content {
    color: #e5e7eb;
}

/* 공통 섹션 */
.pcs {
    padding: 32px 0;
}

/* bio */
.pcs__bio-text {
    font-size: var(--bt-font-size-body);
    line-height: 1.8;
    color: #374151;
    max-width: 680px;
}

/* text */
.pcs__title {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 12px;
    border-bottom: 2px solid var(--custom-primary);
    padding-bottom: 8px;
    display: inline-block;
}
.pcs__text-content {
    font-size: var(--bt-font-size-body);
    line-height: 1.8;
    color: #374151;
    white-space: pre-line;
    max-width: 720px;
}

/* links */
.pcs__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pcs__links--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.pcs__link-item {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: var(--bt-font-weight-semibold);
    font-size: var(--bt-font-size-small);
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}
.pcs__link--btn-primary {
    background: var(--custom-primary);
    color: white;
    border: 2px solid var(--custom-primary);
}
.pcs__link--btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.pcs__link--btn-outline {
    background: transparent;
    border: 2px solid var(--custom-primary);
    color: var(--custom-primary);
}
.pcs__link--text {
    background: none;
    border: none;
    color: var(--custom-primary);
    text-decoration: underline;
    padding: 12px 8px;
}
.pcs__link--text:hover {
    opacity: 0.7;
}

/* social */
.pcs__social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.pcs__social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}
.pcs__social-icon:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* banner */
.pcs--banner {
    padding: 48px 0;
    text-align: center;
}
.pcs--banner-primary {
    background: var(--custom-primary);
    color: white;
}
.pcs--banner-dark {
    background: #1f2937;
    color: white;
}
.pcs--banner-light {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111827;
}
.pcs--banner-gradient {
    background: linear-gradient(135deg, var(--custom-primary) 0%, #8b5cf6 100%);
    color: white;
}
.pcs__banner-title {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 10px;
}
.pcs__banner-subtitle {
    font-size: var(--bt-font-size-body);
    opacity: 0.85;
    margin: 0;
    max-width: 560px;
    display: inline-block;
}

/* divider */
.pcs--divider { padding: 0; }
.pcs__hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 8px 0;
}

/* empty */
.pcs__empty {
    color: #9ca3af;
    text-align: center;
    padding: 40px 0;
    font-size: var(--bt-font-size-body);
}

@media (max-width: 768px) {
    .page-custom-sections {
        padding: 34px 14px 44px;
    }

    .page-custom-sections > div[data-bt-section="profile"] {
        margin-top: 10px;
    }

    .page-custom-sections .bt-profile-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .page-custom-sections .bt-profile-left .bt-profile-avatar-wrap,
    .page-custom-sections .bt-profile-avatar-wrap {
        align-self: center;
        margin-left: auto;
        margin-right: auto;
    }

    .page-custom-sections .bt-profile-info {
        width: 100%;
    }

    .page-custom-sections .bt-profile-name {
        font-size: var(--bt-font-size-title);
    }

    .page-custom-sections .bt-profile-edit-input {
        font-size: var(--bt-font-size-title);
    }

    .page-custom-sections .bt-profile-buttons {
        justify-content: center;
    }

    .page-custom-sections .bt-selling-products,
    .page-custom-sections .bt-purchased-products {
        padding: 0;
        border-radius: 0;
    }

    .page-custom-sections .bt-section-header {
        margin-bottom: 14px;
    }

    .page-custom-sections .bt-section-title {
        font-size: var(--bt-font-size-title);
    }

    .page-custom-sections .bt-product-filters {
        margin-bottom: 16px;
        gap: 6px;
    }

    .page-custom-sections .bt-tabs-nav {
        display: flex;
        width: 100%;
        gap: 18px;
        margin-bottom: 18px;
    }

    .page-custom-sections .bt-tab-button {
        flex: 1;
        justify-content: center;
        padding: 12px 0;
        font-size: var(--bt-font-size-small);
    }

    .pcs__links--grid {
        grid-template-columns: 1fr;
    }
    .pcs__banner-title { font-size: var(--bt-font-size-title); }
}

/* =============================================
   모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--bt-font-size-display);
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* 판매자 프로필 */
.seller-store-page {
    background: var(--bg-light);
}

.seller-profile {
    background: var(--bg-light);
    padding: 0;
}

.seller-profile-inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.seller-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.seller-avatar {
    flex-shrink: 0;
}

.seller-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

/* 쪽지 보내기 아이콘 버튼 (프로필 이미지 하단 중앙) */
.message-icon-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
}

.message-icon-btn:hover {
    transform: translate(-50%, 50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.message-icon-btn:active {
    transform: translate(-50%, 50%) scale(0.95);
}

.message-icon-btn svg {
    flex-shrink: 0;
}

/* 톱니바퀴 설정 메뉴 */
.seller-settings-menu {
    position: absolute;
    top: 0;
    right: 0;
}

.settings-icon-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: var(--bt-font-size-body);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-icon-btn:hover {
    background: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.settings-menu-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
    font-size: var(--bt-font-size-small);
}

.settings-menu-item:last-child {
    border-bottom: none;
}

.settings-menu-item:hover {
    background: #f9fafb;
}

.settings-menu-item.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.settings-menu-item.disabled:hover {
    background: white;
}

 .seller-info {
    flex: 1;
}

.seller-name {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 10px 0;
    color: var(--text, #111827);
}

.seller-username {
    font-size: var(--bt-font-size-body);
    color: var(--text-light, #6b7280);
    margin: 0 0 16px 0;
}

.seller-bio {
    font-size: var(--bt-font-size-body);
    line-height: 1.7;
    color: #374151;
    margin: 0 0 20px 0;
    max-width: 620px;
}

.seller-stats {
    display: flex;
    gap: 24px;
    font-size: var(--bt-font-size-small);
    color: var(--text-light, #6b7280);
}

.seller-stats .stat strong {
    font-weight: var(--bt-font-weight-semibold);
    margin-right: 4px;
}

/* 제품 섹션 */
.seller-products-section {
    padding: 0;
}

.seller-products-section .container {
    padding-bottom: 60px;
}

.seller-products-section .section-title {
    font-size: var(--bt-font-size-display);
}

.seller-products-section .section-description {
    font-size: var(--bt-font-size-body);
    color: #6b7280;
}

.products-header {
    width: 100%;
}

/* 카드 스타일은 product-card.css에서 관리 */

.product-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.products-header .section-actions {
    justify-content: flex-end;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-height: 36px;
    border: 1px solid var(--bt-ds-border);
    background: var(--bt-ds-bg);
    border-radius: var(--bt-ds-radius);
    color: var(--bt-ds-text);
    cursor: pointer;
    transition: color var(--bt-ds-transition), border-color var(--bt-ds-transition), background var(--bt-ds-transition), transform var(--bt-ds-transition);
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
}

.filter-btn:hover {
    border-color: var(--bt-ds-primary);
    color: var(--bt-ds-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--bt-ds-primary);
    color: #fff;
    border-color: var(--bt-ds-primary);
}

/* 제품 그리드 및 카드 스타일은 product-card.css에서 관리 */

.home-product-tile-wrap {
    position: relative;
    isolation: isolate;
    z-index: 1;
}

.home-product-tile-wrap:hover,
.home-product-tile-wrap:focus-within {
    z-index: 30;
}

.home-product-tile-wrap .home-product-tile {
    position: relative;
    z-index: 1;
}

/* 판매자 스토어 전용 카드 기능 */
.card__edit-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--bt-ds-border);
    padding: 6px 12px;
    border-radius: var(--bt-ds-radius);
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    color: var(--bt-ds-text-light);
    text-decoration: none;
    z-index: 40;
    transition: color var(--bt-ds-transition), border-color var(--bt-ds-transition), background var(--bt-ds-transition), transform var(--bt-ds-transition), box-shadow var(--bt-ds-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card__edit-btn:hover {
    background: var(--bt-ds-bg);
    color: var(--bt-ds-primary);
    border-color: var(--bt-ds-primary);
    transform: translateY(-1px);
}

.card__quick-play {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: var(--bt-ds-primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: var(--bt-ds-radius);
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    cursor: pointer;
    transition: background var(--bt-ds-transition), transform var(--bt-ds-transition), box-shadow var(--bt-ds-transition);
    box-shadow: 0 4px 12px rgba(248, 56, 75, 0.3);
    z-index: 10;
}

.card__quick-play:hover {
    background: var(--bt-ds-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(248, 56, 75, 0.4);
}

.card__quick-play--bottariapp {
    background: #ec4899;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.card__quick-play--bottariapp:hover {
    background: #db2777;
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}

.card__quick-play--webapp {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.card__quick-play--webapp:hover {
    background: #2563eb;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* 빈 상태 */
.no-products {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.no-products p {
    font-size: var(--bt-font-size-body);
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: var(--bt-ds-radius);
    text-decoration: none;
    font-weight: var(--bt-font-weight-semibold);
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--bt-ds-transition), color var(--bt-ds-transition), border-color var(--bt-ds-transition), transform var(--bt-ds-transition), box-shadow var(--bt-ds-transition);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-small,
.btn-sm {
    padding: 8px 12px;
    min-height: 36px;
    font-size: var(--bt-font-size-small);
}

.btn-primary {
    background: var(--bt-ds-primary);
    color: #fff;
    border-color: var(--bt-ds-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--bt-ds-primary-dark);
    color: #fff;
    border-color: var(--bt-ds-primary-dark);
}

.btn-secondary {
    background: var(--bt-ds-bg);
    color: var(--bt-ds-primary);
    border-color: var(--bt-ds-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bt-ds-primary);
    color: #fff;
    border-color: var(--bt-ds-primary);
}

/* 반응형 */
@media (max-width: 768px) {
    .seller-profile-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px;
    }

    .seller-name {
        font-size: var(--bt-font-size-title);
    }

    .seller-stats {
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

/* 탭 컨텐츠 */
.tab-content {
    display: block;
}

/* 보따리템 필터 영역 */
.bt-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 30px;
}

.purchased-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.bt-filter-row .purchased-filters {
    margin-bottom: 0;
}

.bt-add-product-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 8px 16px;
    min-height: 36px;
    border: 1px solid var(--bt-ds-primary);
    border-radius: var(--bt-ds-radius);
    background: var(--bt-ds-primary);
    color: #fff;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
    cursor: pointer;
    transition: transform var(--bt-ds-transition), box-shadow var(--bt-ds-transition), background var(--bt-ds-transition);
}

.bt-add-product-filter-btn:hover {
    background: var(--bt-ds-primary-dark);
    border-color: var(--bt-ds-primary-dark);
    box-shadow: 0 8px 18px rgba(248, 56, 75, .22);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .page-custom-sections .bt-profile {
        overflow: visible;
        padding-bottom: 76px;
    }

    .page-custom-sections .bt-profile-corner-actions {
        display: flex !important;
        visibility: visible !important;
        bottom: 18px !important;
        z-index: 12 !important;
    }

    #open-page-customize,
    #open-page-customize-custom,
    .bt-profile-corner-link[data-bt-action="customize-page"] {
        display: none !important;
    }

    .seller-action-separator {
        display: none;
    }

    .seller-action-buttons,
    .seller-owner-tools {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .seller-owner-tools {
        gap: 0;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .seller-owner-tools .btn,
    .seller-owner-tools a.btn {
        min-height: auto;
        padding: 0 !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--bt-ds-primary);
        line-height: 1.4;
        transform: none;
    }

    .seller-owner-tools .btn:hover:not(:disabled),
    .seller-owner-tools a.btn:hover:not(:disabled) {
        background: transparent;
        box-shadow: none;
        color: var(--bt-ds-primary-dark);
        transform: none;
    }

    .seller-owner-tools .btn:not(#toggle-edit-mode):not(#toggle-edit-mode-custom)::before,
    .seller-owner-tools a.btn:not(#toggle-edit-mode):not(#toggle-edit-mode-custom)::before {
        content: "|";
        display: inline-block;
        margin: 0 10px;
        color: var(--bt-ds-text-light);
        font-size: var(--bt-font-size-small);
        font-weight: var(--bt-font-weight-normal);
        opacity: .65;
    }

    .bt-profile-corner-actions {
        left: 50% !important;
        right: auto !important;
        bottom: 18px !important;
        justify-content: center !important;
        gap: 0 !important;
        max-width: calc(100% - 28px);
        transform: translateX(-50%);
        flex-wrap: nowrap !important;
        white-space: nowrap;
    }

    .bt-profile-corner-link {
        min-height: auto !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .bt-profile-corner-link[data-bt-action="profile-edit"] {
        order: 10;
    }

    .bt-profile-corner-link[data-bt-action="speech-bubbles"] {
        order: 20;
    }

    .bt-profile-corner-link[data-bt-action="customize-page"] {
        order: 30;
    }

    .bt-profile-corner-link[data-bt-action="admin"] {
        order: 40;
    }

    .bt-profile-corner-link[data-bt-action="dashboard"] {
        order: 50;
    }

    .bt-profile-corner-link[data-bt-action="logout"] {
        order: 60;
    }

    .bt-profile-corner-separator {
        display: none !important;
    }

    .bt-profile-corner-link[data-bt-action="speech-bubbles"]::before,
    .bt-profile-corner-link[data-bt-action="dashboard"]::before,
    .bt-profile-corner-link[data-bt-action="logout"]::before,
    .bt-profile-corner-link[data-bt-action="admin"]::before {
        content: "|";
        display: inline-block;
        margin: 0 10px;
        color: rgba(0, 0, 0, .28);
        font-size: var(--bt-font-size-small);
        font-weight: var(--bt-font-weight-normal);
        line-height: 1;
    }

    .bt-filter-row {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .purchased-filters {
        justify-content: center;
        margin-bottom: 24px;
    }

    .bt-filter-row .purchased-filters {
        margin-bottom: 0;
    }

    .bt-add-product-filter-btn {
        width: 100%;
    }
}

/* 빠른 실행 버튼 */
.quick-play-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: var(--bt-font-weight-semibold);
    font-size: var(--bt-font-size-body);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quick-play-btn--bottariapp {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.35);
}

.quick-play-btn--webapp {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.25);
}

.quick-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.15);
}

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

/* 구매한 제품 카드 */
.purchased-product {
    position: relative;
}

.purchased-product .product-link {
    display: block;
}

.filter-btn-purchased {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-height: 36px;
    background: var(--bt-ds-bg-light);
    border: 1px solid var(--bt-ds-border);
    border-radius: var(--bt-ds-radius);
    font-size: var(--bt-font-size-small);
    color: var(--bt-ds-text);
    font-weight: var(--bt-font-weight-semibold);
    cursor: pointer;
    transition: color var(--bt-ds-transition), border-color var(--bt-ds-transition), background var(--bt-ds-transition), transform var(--bt-ds-transition);
}

.filter-btn-purchased:hover {
    background: var(--bt-ds-border);
    transform: translateY(-1px);
}

.filter-btn-purchased.active {
    background: var(--bt-ds-primary);
    color: #fff;
    border-color: var(--bt-ds-primary);
}

.page-custom-sections .purchased-filters .filter-btn-purchased:hover {
    background: #fff;
    color: var(--bt-ds-primary);
    border-color: var(--bt-ds-primary);
}

.page-custom-sections .purchased-filters .filter-btn-purchased.active {
    background: #fff;
    color: var(--bt-ds-primary);
    border-color: var(--bt-ds-primary);
}

/* 탭 제목 스타일 */
.tab-titles {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-title {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin: 0;
    padding: 0 0 12px 0;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    position: relative;
}

.tab-title:hover {
    color: #6b7280;
}

.tab-title.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   쪽지 보내기 버튼
   ============================================ */

.seller-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--bt-ds-primary);
    color: #fff;
    border: none;
    border-radius: var(--bt-ds-radius);
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
    cursor: pointer;
    transition: background var(--bt-ds-transition), transform var(--bt-ds-transition), box-shadow var(--bt-ds-transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-custom-sections .bt-profile-message-btn:not(.bt-profile-message-btn--avatar) {
    align-self: flex-start;
    margin-top: 8px;
}

.page-custom-sections .bt-profile-centered .bt-profile-message-btn:not(.bt-profile-message-btn--avatar) {
    align-self: center;
}

.page-custom-sections .bt-profile-message-btn--avatar {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
}

.page-custom-sections .bt-profile-message-btn--avatar:hover {
    transform: translate(-50%, 50%) scale(1.08);
}

.page-custom-sections .bt-profile-message-btn--avatar:active {
    transform: translate(-50%, 50%) scale(0.95);
}

.seller-action-btn:hover {
    background: var(--bt-ds-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.seller-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 다크 테마 */
.bt-theme-dark .seller-action-btn {
    background: var(--bt-ds-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bt-theme-dark .seller-action-btn:hover {
    background: var(--bt-ds-primary-dark);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}



/* Profile edit mode keeps the save/exit action focused. */
.page-custom-sections .bt-profile.is-editing .bt-profile-corner-separator,
.page-custom-sections .bt-profile.is-editing .bt-profile-corner-link:not([data-bt-action="profile-edit"]) {
    display: none !important;
}

.page-custom-sections .bt-profile.is-editing .bt-profile-corner-link[data-bt-action="profile-edit"] {
    display: inline-flex !important;
}

/* Mobile profile edit spacing: keep privacy control close to bio and clear of bottom actions. */
@media (max-width: 768px) {
    .page-custom-sections .bt-profile.is-editing {
        padding-bottom: 96px;
    }

    .page-custom-sections .bt-profile-edit-label {
        margin: 8px 0 4px;
    }

    .page-custom-sections .bt-profile-edit-textarea {
        min-height: 88px;
        margin-bottom: 2px;
    }

    .page-custom-sections .seller-profile-privacy--custom {
        margin: 2px auto 0;
    }

    .page-custom-sections .bt-profile.is-editing .bt-profile-corner-actions {
        bottom: 16px !important;
    }
}


.bt-permission-center {
  display: none;
  width: 100%;
  margin: 6px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.bt-profile-editing .bt-permission-center {
  display: block;
}

.bt-permission-center--in-profile,
.bt-permission-center--in-actions {
  position: static;
  z-index: auto;
  width: 100%;
  max-width: 560px;
  margin: 4px 0 0;
  padding: 0;
  box-shadow: none;
}

.page-custom-sections .bt-profile-centered .bt-permission-center--in-profile {
  margin-left: auto;
  margin-right: auto;
}

.bt-permission-center__head {
  display: block;
  margin-bottom: 5px;
}

.bt-permission-center__head h2 {
  margin: 0;
  font-size: var(--bt-font-size-small);
  line-height: 1.25;
  color: #111827;
}

.bt-permission-center__head p {
  display: none;
}

.bt-permission-center__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.bt-permission-card {
  display: flex;
  min-height: 32px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  text-align: left;
}

.bt-permission-card:hover,
.bt-permission-card:focus-visible {
  border-color: #111827;
  outline: none;
}

.bt-permission-card__label {
  min-width: 0;
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-bold);
  white-space: nowrap;
}

.bt-permission-card__state {
  flex: 0 0 auto;
  font-size: var(--bt-font-size-small);
  color: #6b7280;
  white-space: nowrap;
}

.bt-permission-card[data-state="granted"] .bt-permission-card__state { color: #15803d; }
.bt-permission-card[data-state="denied"] .bt-permission-card__state { color: #dc2626; }
.bt-permission-card[data-state="not_supported"] { opacity: .55; }

@media (min-width: 769px) {
    .page-custom-sections .bt-profile.is-editing .bt-permission-center--in-profile {
        display: block;
        max-width: 560px;
    }

    .page-custom-sections .bt-profile.is-editing .bt-permission-center--in-profile .bt-permission-center__head {
        margin: 0 0 6px;
        white-space: nowrap;
    }

    .page-custom-sections .bt-profile.is-editing .bt-permission-center--in-profile .bt-permission-center__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bt-permission-center__notice {
  display: block;
  margin: 10px 0 0;
  font-size: var(--bt-font-size-small);
  line-height: 1.45;
  color: #6b7280;
}

@media (max-width: 768px) {
  .bt-permission-center__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bt-permission-card {
    min-height: 36px;
    padding: 8px 10px;
  }
}
