:root {
    --c-main: #32A53E;
    --c-main-dark: #077A43;
    --c-main-darker: #096036;
    --c-sub: #488B58;

    --t-1: #111111;
    --t-2: #333333;
    --t-3: #555555;

    --bg: #F7F7F7;
    --white: #FFFFFF;
    --border: #E1EAE3;
    --placeholder-bg: #EEF3EF;

    --overlay-white-08: rgba(255, 255, 255, 0.08);
    --overlay-white-16: rgba(255, 255, 255, 0.16);
    --overlay-white-35: rgba(255, 255, 255, 0.35);
    --overlay-white-75: rgba(255, 255, 255, 0.75);
    --overlay-white-88: rgba(255, 255, 255, 0.88);
    --shadow-main: rgba(7, 122, 67, 0.12);

    --modal-bg: #1A1A1A;
    --modal-overlay: rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif;
    color: var(--t-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 12px;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo-img {
    height: 28px;
    width: auto;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity .15s ease, transform .15s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-login {
    background: var(--c-main);
    color: var(--white);
}

.btn-login:hover {
    background: var(--c-main-dark);
}

.btn-join {
    background: var(--t-1);
    color: var(--white);
}

.btn-join:hover {
    opacity: .85;
}

/* nav */
.gnb {
    background: var(--c-main);
}

.gnb-inner {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.gnb-inner::-webkit-scrollbar {
    display: none;
}

.gnb-menu-btn {
    display: flex;
    align-items: center;
    padding: 14px 14px 14px 0;
    color: var(--white);
    flex-shrink: 0;
}

.gnb-menu-btn svg {
    width: 22px;
    height: 22px;
}

.gnb ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex: 1;
}

.gnb li {
    flex-shrink: 0;
}

.gnb-link {
    display: block;
    padding: 14px 16px;
    color: var(--overlay-white-88);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .15s ease, background .15s ease;
}

.gnb-link:hover,
.gnb-link.active {
    color: var(--white);
    font-weight: 700;
    background: var(--overlay-white-08);
}

/* breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--t-3);
    margin: 20px 0 8px;
}

.breadcrumb-icon {
    display: block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* banner */
.banner {
    border-radius: 16px;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    display: block;
}

.banner-img-mobile {
    display: none;
}

/* sort */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 32px 0 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.sort-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--t-3);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.sort-link.active {
    color: var(--c-main-dark);
    border-bottom-color: var(--c-main);
}

/* grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 12px 0 40px;
}

.item-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow .2s ease, transform .2s ease;
}

.item-card:hover {
    box-shadow: 0 8px 16px var(--shadow-main);
}

.card-body {
    padding: 20px 16px 22px;
    letter-spacing: -0.2px;
}

.card-img {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* image placeholder (실제 상품 이미지가 들어갈 자리) */
.img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    background: var(--placeholder-bg);
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--t-3);
}

.img-placeholder svg {
    width: 34px;
    height: 34px;
    stroke: var(--c-sub);
}

.img-placeholder span {
    font-size: 12px;
    font-weight: 600;
}

.card-sub-title {
    font-size: 13px;
    color: var(--t-3);
    margin-bottom: 4px;
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--t-1);
    margin-bottom: 14px;
}

.card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.card-actions .btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 13.5px;
}

.btn-gift {
    background: var(--c-sub);
    color: var(--white);
}

.btn-gift:hover {
    background: var(--c-main-darker);
}

.btn-buy {
    background: var(--c-main);
    color: var(--white);
}

.btn-buy:hover {
    background: var(--c-main-dark);
}

/* pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 8px 0 48px;
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--t-2);
    font-size: 13.5px;
    font-weight: 600;
}

.page-btn.active {
    background: var(--c-main);
    border-color: var(--c-main);
    color: var(--white);
}

.page-btn:hover:not(.active) {
    border-color: var(--c-main);
    color: var(--c-main-dark);
}

/* footer */
footer {
    background: var(--white);
    color: var(--t-3);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    font-size: 12.5px;
    line-height: 1.7;
}

footer strong {
    color: var(--t-1);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-logo-img {
    height: 22px;
    width: auto;
    margin-bottom: 10px;
}

.footer-info-row {
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
}

.footer-info-item {
    margin-right: 10px;
    white-space: nowrap;
}

.footer-copyright {
    margin-top: 6px;
}

.footer-contact {
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-contact .fs9 {
    font-size: 17px;
    font-weight: 700;
    color: var(--t-1);
}

.footer-contact-btn {
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    padding: 14px 32px;
    border-radius: 999px;
    background: var(--c-main);
    border: none;
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    box-shadow: 0 0 0 0 rgba(50, 165, 62, 0.6), 0 8px 20px rgba(0, 0, 0, 0.25);
    animation: btn-pulse 2s ease-in-out infinite;
    transition: background .15s ease, box-shadow .15s ease;
}

@keyframes btn-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(50, 165, 62, 0.55), 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(50, 165, 62, 0), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

.footer-contact-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
}

.footer-contact-btn:hover {
    background: var(--c-main-dark);
}

.footer-contact-btn:hover::before {
    left: 130%;
}

.footer-contact-btn:active {
    background: var(--c-main-darker);
}

/* auth (로그인/회원가입 등 인증 페이지) */
.auth-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 24px 0 48px;
    padding: 48px 16px;
}

.auth-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--c-main-dark);
    margin: 0 0 40px;
}

.auth-form {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.auth-row label {
    flex-shrink: 0;
    width: 64px;
    font-size: 14px;
    font-weight: 600;
    color: var(--t-2);
}

.auth-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--t-1);
}

.auth-row input:focus {
    outline: none;
    border-color: var(--c-main);
}

.auth-row input::placeholder {
    color: var(--t-3);
}

.auth-submit-btn {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border-radius: 8px;
    background: var(--c-main);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
}

.auth-submit-btn:hover {
    background: var(--c-main-dark);
}

.auth-helper {
    text-align: center;
    margin-top: 32px;
}

.auth-helper p {
    font-size: 13.5px;
    color: var(--t-3);
    margin: 0 0 10px;
}

.auth-helper-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 13.5px;
}

.auth-helper-links a {
    color: var(--c-main-dark);
    font-weight: 600;
}

.auth-helper-links a:hover {
    text-decoration: underline;
}

.auth-helper-links .divider {
    color: var(--border);
}

/* 로그인 유도 모달 */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--modal-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    width: 100%;
    max-width: 440px;
    background: var(--modal-bg);
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: scale(.95);
    transition: transform .2s ease;
}

.modal-overlay.is-open .modal-box {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 2px solid var(--c-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--c-main);
}

.modal-message {
    color: var(--white);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0 0 24px;
}

.modal-confirm-btn {
    padding: 10px 32px;
    border-radius: 8px;
    background: var(--c-main);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.modal-confirm-btn:hover {
    background: var(--c-main-dark);
}

/* floating contact card (항상 우측 하단에 고정) */
.floating-contact {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.floating-contact .fs9 {
    font-size: 13px;
    font-weight: 700;
    color: var(--t-2);
}

/* media queries (breakpoint 내림차순) */
@media (max-width: 992px) {
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 550px) {
    .banner-img-desktop {
        display: none;
    }

    .banner-img-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .floating-contact {
        right: 12px;
        bottom: 12px;
        padding: 12px 14px;
    }

    .auth-row label {
        display: none;
    }
}

@media (max-width: 420px) {
    .card-sub-title .csx-denom {
        display: block;
    }
}

@media (max-width: 370px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-contact {
        order: -1;
    }
}

@media (max-width: 360px) {
    .item-grid {
        gap: 10px;
    }

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