* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        "Pretendard",
        "Noto Sans KR",
        Arial,
        sans-serif;

    background: #f7f7fb;
    color: #202124;
    min-height: 100vh;
}


/* =========================
   Header
========================= */

header {
    background: white;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 900px;
    margin: auto;

    height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo > span {
    font-size: 32px;
}

.logo h1 {
    font-size: 21px;
    font-weight: 800;
}

.logo p {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}


/* 알림 버튼 */

.notification-btn {
    width: 45px;
    height: 45px;

    border: none;
    border-radius: 50%;

    background: #f5f5f7;

    font-size: 20px;

    cursor: pointer;

    position: relative;

    transition: 0.2s;
}

.notification-btn:hover {
    background: #eeeeee;
}

.notification-btn span {
    position: absolute;

    top: -2px;
    right: -2px;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: #ff4d4d;
    color: white;

    font-size: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================
   Main
========================= */

main {
    max-width: 900px;
    margin: auto;
    padding: 45px 20px 60px;
}


/* Welcome */

.welcome {
    margin-bottom: 30px;
}

.location {
    display: inline-block;

    background: #fff3e8;
    color: #e87500;

    padding: 8px 13px;

    border-radius: 20px;

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 17px;
}

.welcome h2 {
    font-size: 32px;
    line-height: 1.35;

    letter-spacing: -1px;

    margin-bottom: 12px;
}

.welcome h2 strong {
    color: #ff7a00;
}

.description {
    color: #777;
    font-size: 14px;
    line-height: 1.7;
}


/* =========================
   Search
========================= */

.search-section {
    margin-bottom: 25px;
}

.search-box {
    height: 58px;

    background: white;

    border: 1px solid #e8e8ec;

    border-radius: 15px;

    display: flex;
    align-items: center;

    padding: 0 18px;

    box-shadow: 0 3px 15px rgba(0,0,0,0.03);
}

.search-box span {
    font-size: 20px;
    margin-right: 10px;
}

.search-box input {
    flex: 1;

    border: none;
    outline: none;

    font-size: 15px;

    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
}


/* =========================
   Status
========================= */

.status-section {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 40px;
}

.status-card {
    background: white;

    border: 1px solid #eeeeee;

    border-radius: 15px;

    padding: 17px;

    display: flex;
    align-items: center;

    gap: 12px;
}

.status-icon {
    font-size: 15px;
}

.status-icon.green {
    color: #2dbb65;
}

.status-icon.yellow {
    color: #f5ad24;
}

.status-icon.red {
    color: #ff5252;
}

.status-card strong {
    display: block;

    font-size: 20px;
}

.status-card small {
    color: #888;

    font-size: 11px;
}


/* =========================
   Section title
========================= */

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;
}

.section-title h3 {
    font-size: 20px;

    margin-bottom: 4px;
}

.section-title p {
    font-size: 12px;
    color: #999;
}

.refresh-btn {
    border: none;

    background: white;

    border: 1px solid #e5e5e5;

    border-radius: 10px;

    padding: 9px 13px;

    font-size: 12px;

    cursor: pointer;

    transition: 0.2s;
}

.refresh-btn:hover {
    background: #f1f1f1;
}


/* =========================
   Snack list
========================= */

.snack-list {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;
}

.snack-card {
    background: white;

    border-radius: 18px;

    padding: 20px;

    border: 1px solid #eeeeee;

    cursor: pointer;

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.snack-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.07);
}

.snack-top {
    display: flex;
    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 18px;
}

.snack-image {
    width: 65px;
    height: 65px;

    border-radius: 15px;

    background: #f7f7f7;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 38px;
}

.star-btn {
    border: none;

    background: #f5f5f5;

    width: 35px;
    height: 35px;

    border-radius: 50%;

    cursor: pointer;

    font-size: 17px;
}

.star-btn.active {
    background: #fff2d9;
}

.snack-name {
    font-size: 17px;

    font-weight: 700;

    margin-bottom: 7px;
}

.snack-price {
    color: #777;

    font-size: 12px;

    margin-bottom: 15px;
}

.stock-row {
    display: flex;

    justify-content: space-between;

    align-items: center;
}

.stock-number {
    font-size: 13px;

    color: #555;
}

.status-badge {
    padding: 6px 9px;

    border-radius: 8px;

    font-size: 10px;

    font-weight: 700;
}

.badge-green {
    background: #e7f8ed;
    color: #19924a;
}

.badge-yellow {
    background: #fff4d9;
    color: #bd7c00;
}

.badge-red {
    background: #ffe8e8;
    color: #e13d3d;
}


/* 품절 카드 */

.snack-card.sold-out {
    opacity: 0.65;
}

.snack-card.sold-out .snack-image {
    filter: grayscale(1);
}


/* =========================
   Update time
========================= */

.update-time {
    text-align: center;

    margin-top: 25px;

    font-size: 11px;

    color: #aaa;
}


/* =========================
   Modal
========================= */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.45);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 200;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;

    width: 100%;
    max-width: 430px;

    border-radius: 20px;

    padding: 25px;

    max-height: 80vh;

    overflow-y: auto;
}

.modal-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 19px;
}

.modal-header button,
.close-detail {
    border: none;

    background: #f4f4f4;

    width: 35px;
    height: 35px;

    border-radius: 50%;

    cursor: pointer;
}


/* 알림 목록 */

.notification-item {
    border-bottom: 1px solid #eeeeee;

    padding: 15px 0;

    display: flex;

    align-items: center;

    gap: 12px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: #fff3e5;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
}

.notification-item strong {
    display: block;

    font-size: 14px;

    margin-bottom: 4px;
}

.notification-item p {
    font-size: 11px;

    color: #888;
}


/* =========================
   Detail
========================= */

.snack-detail {
    text-align: center;

    position: relative;
}

.close-detail {
    position: absolute;

    right: 20px;
    top: 20px;
}

.detail-image {
    font-size: 80px;

    margin: 25px 0 15px;
}

.detail-name {
    font-size: 25px;

    margin-bottom: 8px;
}

.detail-price {
    color: #777;

    margin-bottom: 25px;
}

.detail-stock {
    padding: 20px;

    border-radius: 15px;

    background: #f7f7f7;

    margin-bottom: 20px;
}

.detail-stock strong {
    display: block;

    font-size: 30px;

    margin-bottom: 5px;
}

.detail-stock span {
    color: #888;

    font-size: 12px;
}

.alert-btn {
    width: 100%;

    border: none;

    padding: 15px;

    border-radius: 13px;

    background: #ff7a00;

    color: white;

    font-weight: 700;

    cursor: pointer;

    font-size: 14px;
}

.alert-btn.cancel {
    background: #eee;

    color: #555;
}


/* =========================
   Footer
========================= */

footer {
    background: white;

    border-top: 1px solid #eee;

    text-align: center;

    padding: 30px;

    color: #aaa;

    font-size: 11px;
}

footer p {
    color: #555;

    font-weight: 700;

    margin-bottom: 5px;
}


/* =========================
   Mobile
========================= */

@media (max-width: 600px) {

    main {
        padding-top: 30px;
    }

    .welcome h2 {
        font-size: 26px;
    }

    .status-section {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .status-card {
        padding: 12px;

        gap: 7px;
    }

    .status-card strong {
        font-size: 17px;
    }

    .status-card small {
        font-size: 9px;
    }

    .snack-list {
        grid-template-columns: 1fr;
    }

}