:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --accent-color: #10b981;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
    --bottom-nav-height: 58px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

/* Header */
.mobile-header {
    background: var(--bg-card);
    padding: 0.7rem 0.9rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

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

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.nav-item.active {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

/* Content Area */
#app {
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 0.9rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    width: 100%;
    overflow: hidden;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--accent-color);
    color: white;
    text-align: center;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 0.75rem;
    cursor: pointer;
}

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

.btn-sm {
    display: inline-block;
    width: auto;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: #fff;
    font-weight: 600;
    margin-top: 0;
    cursor: pointer;
}

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

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.cat-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

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

/* Search Bar */
.search-container {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    width: 100%;
}

.search-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent-color);
}

.search-btn {
    padding: 0 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.88rem;
    flex-shrink: 0;
    white-space: nowrap;
    cursor: pointer;
}

/* Product List */
.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.prod-info {
    flex: 1;
    min-width: 0;
}

.prod-name {
    font-weight: 500;
    margin-bottom: 0.15rem;
    font-size: 0.88rem;
    word-break: break-word;
}

.prod-brand {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 3px;
}

.prod-price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.98rem;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 1.5rem;
}

/* Inquiry */
.inquiry-list-item {
    background: var(--bg-card);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.65rem;
}

.input-field {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 360px;
    padding: 1.25rem;
    border-radius: 12px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:active {
    transform: scale(0.95);
    background: #f1f5f9;
}

/* ===================================================
   모바일 매입 현황 (Purchase Status) 블로그 스타일
=================================================== */

.mobile-purchase-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.mobile-blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mobile-blog-thumb-wrap {
    position: relative;
    width: 100%;
    height: 165px;
    background: #f1f5f9;
}

.mobile-blog-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-blog-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 600;
}

.mobile-blog-body {
    padding: 0.85rem;
}

.mobile-blog-chip {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.mobile-blog-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.38;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.mobile-blog-summary {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* Detail View in Mobile */
.mobile-detail-gallery-main {
    width: 100%;
    max-height: 240px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
}

.mobile-detail-gallery-main img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.mobile-gallery-thumbs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 1rem;
}

.mobile-thumb-item {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid transparent;
    opacity: 0.7;
}

.mobile-thumb-item.active {
    border-color: var(--accent-color);
    opacity: 1;
}

.mobile-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
