@import url('https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;700;900&display=swap');

.shop-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: #1f2937;
}

.shop-header {
    margin-bottom: 2rem;
}

.shop-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.shop-header p {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.shop-breadcrumb {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.shop-breadcrumb span {
    margin: 0 0.4rem;
}

.shop-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.shop-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-left: 0.8rem;
    margin-bottom: 1.5rem;
}

.shop-sort select {
    border: none;
    background: #ffffff;
    font-weight: 700;
    color: #1f2937;
    padding: 0.35rem 0.9rem 0.35rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.shop-balance i {
    color: #1d4ed8;
}

.shop-balance span {
    font-size: 1rem;
}

.shop-balance small {
    font-size: 0.75rem;
    font-weight: 800;
}

.shop-rank {
    margin-left: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #1e40af;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.shop-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.4rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(30, 58, 138, 0.12);
}

.shop-card-image {
    background: #f8fafc;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-card-body {
    padding: 1.2rem 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #0f172a;
}

.shop-card-body p {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.shop-remaining {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.8rem;
}

.shop-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.9rem;
    gap: 0.5rem;
}

.shop-price {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #1e3a8a;
    font-weight: 800;
}

.shop-price i {
    color: #3b82f6;
    font-size: 0.8rem;
}

.shop-price span {
    font-size: 1.1rem;
}

.shop-price small {
    font-size: 0.75rem;
}

.shop-buy {
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 0.9rem;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 8px 16px rgba(30, 58, 138, 0.2);
}

.shop-buy:disabled {
    opacity: 0.6;
    box-shadow: none;
}

.shop-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
}

.shop-modal {
    width: min(520px, 95vw);
    background: #ffffff;
    border-radius: 1.8rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.shop-modal-header {
    padding: 1.4rem 1.8rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.shop-modal-close {
    border: none;
    background: #f8fafc;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #94a3b8;
}

.shop-modal-body {
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.shop-modal-body label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.shop-modal-input,
.shop-modal-textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.shop-modal-textarea {
    resize: none;
}

.shop-modal-message {
    background: #fef3c7;
    color: #b45309;
    padding: 0.6rem 0.8rem;
    border-radius: 0.9rem;
    font-size: 0.8rem;
}

.shop-modal-result {
    background: #eef2ff;
    color: #1e3a8a;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.shop-modal-result-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    word-break: break-all;
}

.shop-modal-result strong {
    font-size: 0.95rem;
    word-break: break-all;
}

.shop-modal-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.8rem;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.shop-modal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
}

.shop-modal-meta strong {
    color: #0f172a;
    font-weight: 700;
}

.shop-modal-actions {
    padding: 0 1.8rem 1.6rem;
    display: flex;
    gap: 0.8rem;
}

.shop-modal-cancel {
    flex: 1;
    border: none;
    padding: 0.85rem;
    border-radius: 1rem;
    background: #e2e8f0;
    font-weight: 700;
    color: #475569;
}

.shop-modal-submit {
    flex: 1.2;
    border: none;
    padding: 0.85rem;
    border-radius: 1rem;
    background: #1e3a8a;
    color: #ffffff;
    font-weight: 700;
}
