/* ========================================
   구제맵 스타일 - onzgram 디자인 시스템
   ======================================== */

:root {
    /* Colors — onzgram tokens */
    --primary: #17191a;        /* gray900 - text/헤더 */
    --primary-light: #2f3133;  /* gray800 */
    --accent: #2c79ff;         /* blue700 - primary CTA */
    --accent-light: #5ebcff;   /* blue300 */
    --accent-hover: #3067ec;   /* blue800 */
    --green: #25a36a;          /* secondary1 */
    --orange: #fa7226;         /* secondary2 */
    --bg: #f2f4f6;             /* gray50 */
    --card: #ffffff;
    --border: #e5eaee;         /* gray100 */
    --border-strong: #cad3d8;  /* gray200 */
    --text: #17191a;           /* gray900 */
    --text-secondary: #464a4d; /* gray700 */
    --text-tertiary: #757b80;  /* gray500 */
    --kakao: #FEE500;
    --naver: #03C75A;
    --danger: #e1322e;         /* red600 */
    --success: #1b8a4a;        /* green700 */
    --warning: #ffbf00;        /* yellow500 */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows — onzgram soft diffusion */
    --shadow-sm: 0 0 8px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 0 16px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 20px 4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 32px 8px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.2s ease;
}

/* ========================================
   Reset & Base
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    min-height: calc(100vh - 60px - 70px); /* header + tab bar */
    padding-bottom: 80px;
}

/* ========================================
   Header
   ======================================== */

.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    display: none;
}

@media (min-width: 640px) {
    .logo-text {
        display: inline;
    }
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

/* ========================================
   Tab Bar
   ======================================== */

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    flex: 1;
}

.tab-item svg {
    width: 24px;
    height: 24px;
}

.tab-item.active {
    color: var(--accent);
    font-weight: 500;
}

.tab-item:hover {
    color: var(--accent);
}

.tab-register .register-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -20px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.tab-register.active .register-icon {
    background: var(--primary);
}

@media (min-width: 640px) {
    .tab-bar {
        display: none;
    }
}

/* ========================================
   Map Page
   ======================================== */

.map-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.map-container {
    width: 100%;
    height: 100%;
}

.filter-bar {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.875rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .filter-bar {
        left: 1rem;
        right: auto;
        width: 360px;
    }
}

.filter-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: white;
}

.search-box .btn-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.category-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: white;
    font-size: 0.813rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--accent);
}

.chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.price-filter {
    flex: 1;
}

.price-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.813rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.price-slider-container {
    display: flex;
    gap: 0.5rem;
}

.price-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--border);
    outline: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

/* Shop List Sheet */
.shop-list-sheet {
    position: absolute;
    bottom: 82px; /* above tab bar + gap */
    left: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    z-index: 20;
    max-height: 38vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: max-height 0.25s ease;
}

@media (min-width: 640px) {
    .shop-list-sheet {
        bottom: 1rem;
        left: 1rem;
        right: auto;
        width: 360px;
        max-height: 45vh;
    }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 0.75rem auto;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sheet-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.sheet-title span {
    color: var(--accent);
}

.sheet-content {
    overflow-y: auto;
    padding: 1rem;
    flex: 1;
}

.shop-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.shop-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.shop-card-link {
    display: flex;
    gap: 1rem;
}

.shop-card-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-image-placeholder-sm {
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.shop-card-content {
    flex: 1;
    min-width: 0;
}

.shop-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-card-address {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-card-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.shop-card-price {
    font-size: 0.813rem;
    color: var(--accent);
    font-weight: 500;
}

.shop-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

/* ========================================
   Shop Detail Page
   ======================================== */

.shop-detail-page {
    padding-top: 1rem;
}

.shop-header {
    background: var(--card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.shop-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.shop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 5rem;
    opacity: 0.5;
}

.shop-info {
    padding: 1.5rem;
}

.shop-category {
    margin-bottom: 0.5rem;
}

.shop-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.shop-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    font-size: 1.25rem;
}

.star-filled {
    color: var(--accent);
}

.star-empty {
    color: var(--border);
}

.rating-text {
    font-size: 1rem;
    font-weight: 600;
}

.shop-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

.shop-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header .section-title {
    margin: 0;
}

.detail-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.detail-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.938rem;
    line-height: 1.6;
}

.link {
    color: var(--accent);
    text-decoration: underline;
}

.mini-map {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Reviews */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.review-user {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.938rem;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.review-rating {
    display: flex;
    gap: 0.125rem;
}

.star-sm {
    font-size: 1rem;
}

.review-content {
    line-height: 1.7;
    margin: 0 0 0.75rem;
    white-space: pre-wrap;
}

.review-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.review-image img {
    width: 100%;
    height: auto;
    display: block;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-owner-actions {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   Forms
   ======================================== */

.page-header {
    text-align: center;
    padding: 2rem 0;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.shop-form,
.review-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.938rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-textarea {
    resize: vertical;
}

.form-help {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .form-input {
    flex: 1;
}

.price-input-group {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.price-input-group .form-input {
    padding-right: 3rem;
}

/* Image Upload */
.image-upload-area {
    position: relative;
}

.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.image-upload-label:hover {
    border-color: var(--accent);
    background: var(--bg);
}

.image-preview {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
}

/* ========================================
   MyPage
   ======================================== */

.mypage {
    padding-top: 1rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-card {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    color: white;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.profile-level {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.level-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.level-title {
    font-size: 0.938rem;
}

.exp-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.exp-label {
    font-weight: 600;
}

.exp-value {
    font-weight: 600;
    color: var(--accent);
}

.exp-bar {
    height: 12px;
    background: var(--bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.exp-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    transition: width 0.3s ease;
}

.exp-description {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.content-section {
    margin-bottom: 2rem;
}

.shop-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-shop-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-shop-name {
    font-weight: 600;
    color: var(--primary);
}

.review-shop-name:hover {
    color: var(--accent);
}

.review-likes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
}

.review-edit-actions {
    display: flex;
    gap: 0.75rem;
}

.settings-list {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.setting-item:hover {
    background: var(--bg);
}

/* ========================================
   Buttons
   ======================================== */

.btn-primary,
.btn-secondary,
.btn-primary-outline {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-primary-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-primary-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-icon:hover {
    border-color: var(--accent);
    background: var(--bg);
}

.btn-icon-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.btn-icon-text:hover {
    color: var(--accent);
    background: var(--bg);
}

.btn-icon-text.active {
    color: var(--danger);
}

.btn-text,
.btn-text-sm {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--primary);
}

.btn-text-sm {
    font-size: 0.875rem;
}

.btn-primary-sm {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-sm:hover {
    background: var(--primary);
}

.text-danger {
    color: var(--danger);
}

/* ========================================
   Badges
   ======================================== */

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    font-weight: 500;
}

.badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.badge-category {
    background: var(--accent);
    color: white;
}

/* ========================================
   Utilities
   ======================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0 0 1rem;
}

.text-secondary {
    color: var(--text-secondary);
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--accent);
    min-width: 250px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

/* ========================================
   Responsive
   ======================================== */

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }

    .shop-card-link {
        gap: 1.5rem;
    }

    .shop-card-image {
        width: 120px;
        height: 120px;
    }

    .stats-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .shop-list-sheet {
        max-height: 50vh;
    }
}

/* ========================================
   Compact overlay + My location + Modal
   ======================================== */

/* Minimal search overlay — map dominant */
.filter-bar {
    top: 0.6rem;
    padding: 0.6rem 0.7rem;
    gap: 0.45rem;
    width: auto;
    max-width: calc(100vw - 1.5rem);
}

@media (min-width: 640px) {
    .filter-bar {
        width: 320px;
    }
}

/* Hide price slider row — keep it minimal */
.filter-row-price {
    display: none;
}

/* Category chips: single-line horizontal scroll, small */
.category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.filter-bar .chip {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
}

.search-input {
    padding: 0.6rem 2.75rem 0.6rem 0.9rem;
}

.search-box .btn-icon {
    right: -0.35rem;
}

/* Current location floating button (bottom-right) */
.location-fab {
    position: absolute;
    right: 1rem;
    bottom: 5.5rem;        /* 줌 컨트롤(우하단 SMALL) 위 */
    z-index: 30;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--accent, #D4A574);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.location-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
}

.location-fab:active {
    transform: scale(0.96);
}

@media (min-width: 640px) {
    .location-fab {
        bottom: 6rem;
    }
}

/* My location marker — cute face pin */
.my-location {
    position: relative;
    width: 38px;
    height: 46px;
}

.my-location-pin {
    position: absolute;
    left: 0;
    top: 0;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 3px solid var(--accent, #D4A574);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: myloc-bounce 1.6s ease-in-out infinite;
    transform-origin: center bottom;
}

.my-location-face {
    transform: rotate(45deg);
    font-size: 18px;
    line-height: 1;
}

.my-location-pulse {
    position: absolute;
    left: 9px;
    bottom: 0;
    width: 20px;
    height: 8px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    animation: myloc-shadow 1.6s ease-in-out infinite;
}

@keyframes myloc-bounce {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-6px); }
}

@keyframes myloc-shadow {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(0.7); opacity: 0.2; }
}

/* Shop detail modal */
.shop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.shop-modal.open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.modal-panel {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    max-height: 82vh;
    overflow-y: auto;
    animation: modal-up 0.25s ease;
}

@media (min-width: 640px) {
    .modal-panel {
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 1.25rem;
        animation: none;
    }
}

@keyframes modal-up {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
    color: #333;
}

.modal-shop-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0.9rem;
    margin-bottom: 0.9rem;
    display: block;
}

.modal-shop-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card, #f5f0e8);
    font-size: 3rem;
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.modal-badge {
    background: var(--accent, #D4A574);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full, 999px);
    font-size: 0.75rem;
    font-weight: 500;
}

.modal-price {
    color: var(--accent, #D4A574);
    font-weight: 700;
    font-size: 0.9rem;
}

.modal-title {
    margin: 0 0 0.4rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-rating {
    color: var(--accent, #D4A574);
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.modal-rating span {
    color: #666;
    font-size: 0.85rem;
}

.modal-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.modal-row {
    display: flex;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: #444;
    line-height: 1.4;
}

.modal-row-icon {
    flex-shrink: 0;
}

.modal-row a {
    color: var(--accent, #D4A574);
    text-decoration: none;
}

.modal-detail-btn {
    display: block;
    text-align: center;
    background: var(--accent, #D4A574);
    color: #fff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
