/* ===== Pretendard 로컬 웹폰트 ===== */
@font-face {
    font-family: 'Pretendard';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/PretendardVariable.woff2') format('woff2-variations');
}

/* ===== MaruBuri 웹폰트 ===== */
@font-face {
    font-family: 'MaruBuri';
    src: url('../fonts/OTF/MaruBuri-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MaruBuri';
    src: url('../fonts/OTF/MaruBuri-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MaruBuri';
    src: url('../fonts/OTF/MaruBuri-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MaruBuri';
    src: url('../fonts/OTF/MaruBuri-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-dark-green: #2D432E;
    --color-text-dark: #1A2D1C;
    --color-gray: #666666;
    --color-white: #FFFFFF;
    --color-point: #CAAB7A;
    --color-point-60: rgba(202, 171, 122, 0.6);
    --header-height: 55px;
    --footer-height: 122px;
}

html, body {
    width: 100%;
    font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    background-color: var(--color-gray);
    -webkit-tap-highlight-color: transparent;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-dark-green);
    z-index: 100;
}

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

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

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

.nav-item {
    font-family: 'MaruBuri', serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-white);
    text-decoration: none;
    padding: 0 20px;
    transition: opacity 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.nav-item:active {
    opacity: 0.6;
}

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

/* ===== Main Hero ===== */
.site-main {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

.main-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.main-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 60px 40px 100px;
}

/* ===== Section Title ===== */
.section-title {
    font-family: 'MaruBuri', serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--color-text-dark);
    text-align: center;
    line-height: 1.35;
    margin-bottom: 40px;
}

/* ===== Service Cards ===== */
.service-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
}

.service-card {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 340px;
    background-color: var(--color-dark-green);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

/* 클릭(터치) 피드백 */
.service-card:active {
    transform: scale(0.97);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.service-card:active .card-arrow-wrap {
    border-color: var(--color-point);
}

.card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 0;
    height: 260px;
}

.card-image {
    width: 120px;
    height: 115px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

/* 텍스트 그룹 기본(세로) */
.card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.card-title {
    font-family: 'MaruBuri', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-white);
    text-align: center;
    margin-top: 16px;
}

.card-divider {
    width: 30px;
    height: 1px;
    background-color: var(--color-point);
    margin: 14px auto 0;
    flex-shrink: 0;
}

.card-desc {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.5;
    margin-top: 14px;
}

.card-arrow-wrap {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: 1.5px solid var(--color-point-60);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease;
}

.icon-right {
    width: 21px;
    height: 9px;
    display: block;
}

/* ===== Footer ===== */
.site-footer {
    width: 100%;
    min-height: var(--footer-height);
    background-color: var(--color-gray);
    display: flex;
    align-items: center;
}

.footer-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 40px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.footer-links {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}

.footer-link {
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.footer-link:active {
    opacity: 0.6;
}

.footer-company,
.footer-copyright {
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--color-white);
    line-height: 1.5;
}

/* ===== 클릭 하이라이트 애니메이션 ===== */
@keyframes cardPress {
    0%   { box-shadow: 0 0 0 0 rgba(202, 171, 122, 0.5); }
    50%  { box-shadow: 0 0 0 10px rgba(202, 171, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(202, 171, 122, 0); }
}

.service-card.is-highlighted {
    animation: cardPress 0.6s ease;
}

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

/* 1024~769px — 카드 4개 한 줄 */
@media (max-width: 1024px) and (min-width: 769px) {
    .service-cards {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .service-card {
        flex: 1;
        min-width: 0;
        min-height: 300px;
    }

    .card-inner {
        height: auto;
        min-height: 220px;
        padding: 14px 10px 0;
    }

    .card-image {
        width: 90px;
        height: 86px;
    }

    .card-title {
        font-size: 17px;
        margin-top: 12px;
    }

    .card-divider {
        margin-top: 10px;
    }

    .card-desc {
        font-size: 13px;
        margin-top: 10px;
    }

    .card-arrow-wrap {
        right: 12px;
        bottom: 12px;
        width: 32px;
        height: 32px;
    }
}

/* ===== 사이트 바로가기 (최고관리자 / 매장관리자 / 본사) ===== */
.site-switch {
    position: relative;
    margin-left: 10px;
    flex-shrink: 0;
}

.site-switch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 20px;
    color: var(--color-white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease;
}

.site-switch-btn:hover,
.site-switch-btn[aria-expanded="true"] {
    border-color: var(--color-point);
    color: var(--color-point);
}

.site-switch-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 268px;
    background: #ffffff;
    border: 1px solid #e0d9cc;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    padding: 6px;
    z-index: 200;
}

.site-switch-panel[hidden] { display: none; }

.ss-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 10px;
    border-radius: 8px;
}

.ss-row + .ss-row { margin-top: 2px; }
.ss-row:hover { background: rgba(26, 45, 28, .05); }

.ss-link {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-decoration: none;
}

.ss-name {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark-green);
    line-height: 1.3;
}

.ss-desc {
    font-family: 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    color: #718472;
    line-height: 1.3;
}

.ss-install {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 5px 9px;
    border: 1px solid rgba(202, 171, 122, .5);
    border-radius: 100px;
    background: rgba(202, 171, 122, .12);
    color: #96703a;
    font-family: 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.ss-install:hover {
    background: var(--color-point);
    border-color: var(--color-point);
    color: #ffffff;
}

.ss-note {
    font-family: 'Pretendard', sans-serif;
    font-size: 11px;
    color: #93a394;
    text-align: center;
    padding: 8px 6px 4px;
    margin-top: 4px;
    border-top: 1px solid #eee7db;
    line-height: 1.4;
}

/* 768px 이하 (iPad portrait, 소형 태블릿) */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 24px;
    }

    .nav-item {
        font-size: 14px;
        padding: 0 12px;
    }

    .main-content {
        padding: 48px 24px 80px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .service-cards {
        gap: 24px;
    }

    .service-card {
        width: calc(50% - 12px);
        min-width: 200px;
    }

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

    .card-title {
        font-size: 20px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px 24px;
    }

    .footer-logo {
        margin-right: 0;
    }

    .footer-company {
        font-size: 11px;
    }

    .site-footer {
        display: none;
    }
}

/* 480px 이하 (스마트폰) — 가로 레이아웃 카드 */
@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }

    .logo-img {
        height: 26px;
    }

    .nav-item {
        font-size: 12px;
        padding: 0 7px;
    }


    .main-content {
        padding: 24px 16px 12px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 28px;
    }

    .service-cards {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    /* 카드: 가로 레이아웃 */
    .service-card {
        width: 100%;
        min-height: auto;
        padding-bottom: 0;
    }

    .card-inner {
        flex-direction: row;
        align-items: center;
        height: auto;
        padding: 16px 16px;
        gap: 14px;
    }

    /* 이미지: 왼쪽 고정 — 작게 줄여서 텍스트 공간 확보 */
    .card-image {
        width: 76px;
        height: 76px;
        flex-shrink: 0;
    }

    /* 텍스트 그룹: 오른쪽 — 화살표(36px) + 여백(8px) */
    .card-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-right: 44px;
        min-width: 0;
    }

    .card-title {
        font-size: 17px;
        margin-top: 0;
        text-align: left;
    }

    /* 구분선: 480px 디자인에 없음 */
    .card-divider {
        display: none;
    }

    .card-desc {
        text-align: left;
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.6;
        word-break: keep-all;
        color: #888;
    }

    .card-desc br {
        display: none;
    }

    /* 화살표: 카드 패딩에 맞춰 우중앙 */
    .card-arrow-wrap {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        right: 16px;
        width: 36px;
        height: 36px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .footer-logo {
        margin-right: 0;
    }

    .footer-company {
        font-size: 10px;
        word-break: keep-all;
    }
}

/* 360px 이하 (소형 스마트폰) */
@media (max-width: 360px) {
    .logo-img {
        height: 22px;
    }

    .nav-item {
        font-size: 11px;
        padding: 0 5px;
    }
}

/* ===== 매장 안내 문구 ===== */
.store-notice {
    background: #fffbeb;
    border: 1px solid #f0d885;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    color: #7a5c00;
    line-height: 1.6;
    margin-bottom: 20px;
    word-break: keep-all;
}

/* ===== 자동 로그아웃 모달 ===== */
#auto-logout-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 10, 0.72);
    backdrop-filter: blur(4px);
}

.alo-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 56px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    max-width: 380px;
    width: 90%;
    animation: alo-pop 0.22s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes alo-pop {
    from { transform: scale(0.82); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.alo-icon {
    font-size: 52px;
    margin-bottom: 16px;
    line-height: 1;
}

.alo-title {
    font-family: 'MaruBuri', serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a2d1c;
    margin: 0 0 14px;
}

.alo-desc {
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    color: #666;
    margin: 0 0 28px;
    line-height: 1.6;
}

#alo-count {
    font-size: 28px;
    font-weight: 800;
    color: #c0392b;
    display: inline-block;
    min-width: 2ch;
}

.alo-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #2d432e;
    color: #caab7a;
    border: none;
    border-radius: 100px;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    -webkit-user-select: none;
    user-select: none;
}

.alo-btn:hover  { opacity: 0.85; }
.alo-btn:active { opacity: 0.70; transform: scale(0.97); }


/* ===== 매장코드 입력 화면 ===== */
.store-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e1f10;
}
.store-login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(202,171,122,0.25);
    border-radius: 16px;
    width: 360px;
    max-width: 90vw;
}
.store-login-logo {
    width: 160px;
}
.store-login-title {
    color: #caab7a;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Noto Serif KR', serif;
    text-align: center;
    margin: 0;
}
.store-login-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(202,171,122,0.4);
    border-radius: 8px;
    color: #f0e6d0;
    font-size: 18px;
    letter-spacing: 2px;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}
.store-login-input::placeholder { color: rgba(240,230,208,0.35); letter-spacing: 0; }
.store-login-input:focus { border-color: #caab7a; }
.store-login-btn {
    width: 100%;
    padding: 14px;
    background: #caab7a;
    color: #0e1f10;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.store-login-btn:hover { opacity: 0.88; }
.store-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.store-login-error {
    color: #e57373;
    font-size: 13px;
    text-align: center;
    margin: 0;
    padding: 4px 0;
}

/* ===== 하단 탭바 (모바일 전용) ===== */
.bottom-nav {
    display: none;
}

@media (max-width: 480px) {
    /* 헤더 nav 숨김 */
    .header-nav .nav-item {
        display: none;
    }
    /* 앱설치 버튼: 모바일 헤더에 그대로 표시 */
    #pwaInstallBtn {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* 사이트 바로가기: 모바일에서 축소 */
    .site-switch { margin-left: 6px; }

    .site-switch-btn {
        font-size: 12px;
        padding: 5px 10px;
        gap: 4px;
    }

    .site-switch-btn span { display: none; }

    .site-switch-panel {
        width: 244px;
        right: -6px;
    }

    /* 메인 콘텐츠 하단 탭바 높이만큼 padding */
    .site-main {
        padding-bottom: 64px;
        min-height: 0;
    }

    /* 하단 탭바 */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: #2d432e;
        border-top: 1px solid rgba(202,171,122,0.2);
        z-index: 200;
        align-items: stretch;
    }

    .bn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255,255,255,0.55);
        text-decoration: none;
        font-size: 10px;
        font-family: 'Pretendard', sans-serif;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .bn-item.bn-active {
        color: #caab7a;
    }

    .bn-item:active {
        color: #caab7a;
        opacity: 0.8;
    }

    .site-footer {
        display: none;
    }
}
