/* 구매내역 — clean minimal layout */
.purchases-body {
    background: #fafafc;
}

.purchases-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.purchases-hero {
    margin-bottom: 32px;
}

.purchases-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6e6e73;
    margin-bottom: 10px;
}

.purchases-title {
    font-family: "SF Pro Display", "Apple SD Gothic Neo", system-ui, -apple-system, sans-serif;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #1d1d1f;
    margin: 0 0 12px;
}

.purchases-lead {
    font-size: 17px;
    line-height: 1.5;
    color: #6e6e73;
    margin: 0;
    max-width: 540px;
}

.purchases-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.purchases-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    transition: background 0.15s ease, color 0.15s ease;
}

.purchases-tab:hover {
    color: #1d1d1f;
    background: #f5f5f7;
}

.purchases-tab.is-active {
    color: #1d1d1f;
    background: #f5f5f7;
    box-shadow: inset 0 0 0 1px #e8e8ed;
}

.purchases-tab svg {
    flex-shrink: 0;
    opacity: 0.75;
}

.purchases-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 13px;
    color: #86868b;
}

.purchases-tz {
    font-size: 12px;
    color: #aeaeb2;
}

.purchases-count b {
    color: #1d1d1f;
    font-weight: 700;
}

.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchases-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.purchases-item:hover {
    border-color: #d2d2d7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.purchases-item-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
}

.purchases-item-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 6px;
    background: #eef4ff;
    color: #2563eb;
}

.purchases-item--pet .purchases-item-badge {
    background: #f3e8ff;
    color: #9333ea;
}

.purchases-item--gear .purchases-item-badge {
    background: #e0f2fe;
    color: #0284c7;
}

.purchases-item-body {
    min-width: 0;
}

.purchases-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.purchases-item-qty {
    color: #2563eb;
    font-weight: 700;
}

.purchases-item--pet .purchases-item-qty { color: #9333ea; }
.purchases-item--gear .purchases-item-qty { color: #0284c7; }

.purchases-item-user {
    font-size: 13px;
    color: #86868b;
    margin-top: 3px;
}

.purchases-item-user b {
    color: #1d1d1f;
    font-weight: 600;
}

.purchases-item-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 132px;
    text-align: right;
}

.purchases-item-time-rel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #1d1d1f;
    background: #f5f5f7;
    white-space: nowrap;
}

.purchases-item-time-kst {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: #86868b;
    white-space: nowrap;
}

.purchases-item-time-tz {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #aeaeb2;
}

.purchases-empty {
    text-align: center;
    padding: 56px 24px;
    background: #fff;
    border: 1px dashed #d2d2d7;
    border-radius: 12px;
}

.purchases-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f5f5f7;
    color: #86868b;
    margin-bottom: 16px;
}

.purchases-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 6px;
}

.purchases-empty-desc {
    font-size: 14px;
    color: #86868b;
    margin: 0 0 20px;
}

.purchases-empty-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 980px;
    background: #1d1d1f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.purchases-empty-cta:hover {
    background: #333;
}

.purchases-loading {
    height: 2px;
    margin-top: -2px;
    margin-bottom: 12px;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.purchases-loading.is-active {
    opacity: 1;
}

.purchases-loading-bar {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    animation: purchases-load 1.2s ease-in-out infinite;
}

@keyframes purchases-load {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.purchases-notice {
    margin-top: 48px;
    padding: 24px;
    background: #fff;
    border: 1px solid #ffe8cc;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffbf5 0%, #fff 100%);
}

.purchases-notice h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 12px;
}

.purchases-notice ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchases-notice li {
    font-size: 14px;
    line-height: 1.55;
    color: #6e6e73;
}

.purchases-notice strong {
    color: #1d1d1f;
    font-weight: 600;
}

@media (max-width: 560px) {
    .purchases-shell {
        padding: 32px 16px 64px;
    }

    .purchases-title {
        font-size: 32px;
    }

    .purchases-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .purchases-tabs::-webkit-scrollbar {
        display: none;
    }

    .purchases-tab {
        flex: 0 0 auto;
    }

    .purchases-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .purchases-item-time {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px 8px;
        max-width: none;
        width: 100%;
        padding-top: 2px;
        border-top: 1px solid #f0f0f5;
    }

    .purchases-item-time-kst {
        font-size: 12px;
    }

    .purchases-stats {
        gap: 6px 12px;
    }

    .purchases-tz {
        width: 100%;
    }
}
