html {
    scrollbar-gutter: stable;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #fff;
    color: #111;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 80%;
    margin: 0 auto;
}

/* 상단 미니 */
.top-bar {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 15px 0;
    font-size: 13px;
}

/* 헤더 */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* 햄버거 */
.mobile-menu-btn {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 45px 0 18px;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 14px;
    outline: none;
    background: #fafafa;
    transition: .2s;
}

.search-box input:focus {
    border-color: #111;
    background: #fff;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn svg {
    width: 18px;
    height: 18px;
    color: #666;
}

.search-btn:hover svg {
    color: #111;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: .2s;
}

.icon-btn svg {
    width: 28px;
    height: 28px;
    opacity: .65;
    transition: .2s;
}

.icon-btn:hover {
    background: #f3f3f3;
}

.icon-btn:hover svg {
    opacity: 1;
}

/* 카테고리 */
.category-bar {
    display: flex;
    gap: 60px;
    padding: 8px;
    margin: 10px 0 18px;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    flex-wrap: wrap;
    scrollbar-width: none;
    justify-content: center;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-item {
    position: relative;
    flex: 0 0 auto;
    width: auto;
}

.category-item>a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    white-space: nowrap;
    transition: all .2s ease;
    opacity: 1;
    position: relative;
}

.category-item>a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    transform: scaleX(0);
    transform-origin: left;
    width: 100%;
    height: 3px;
    background: #1e293b;
    border-radius: 2px;
    transition: transform .25s ease;
}

.category-item:hover>a::after {
    transform: scaleX(1);
}

.category-item>a.active::after {
    transform: scaleX(1);
}

.sub-menu {
    position: absolute;
    top: 50px;
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .2s ease;
    z-index: 100;
}

.category-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu a {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.sub-menu a:hover {
    background: #f7f7f7;
    color: #111;
}

/* =========================
   FOOTER
========================= */

.footer {
    width: 100%;
    margin-top: 80px;
    padding: 50px 0 30px;
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
}

.footer-menu {
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.footer-menu a {
    color: #333;
    font-weight: 600;
    transition: .2s;
}

.footer-menu a:hover {
    color: #000;
}

.footer-menu span {
    margin: 0 12px;
    color: #ccc;
}

.footer-box-wrap {
    width: 100%;
    padding: 0 30px;
    display: flex;
    gap: 20px;
}

.footer-box {
    flex: 1;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 22px;
    min-height: 160px;
    transition: .2s;
}

.footer-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
}

.footer-box h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #111;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.footer-box p {
    margin: 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.7;
}

.footer-copy {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e5;
    font-size: 12px;
    color: #999;
}

.footer-tel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin-bottom: 15px;
}

.footer-tel svg {
    flex-shrink: 0;
}

.footer-tel-mobile {
    display: none;
    color: #111;
    text-decoration: none;
}

.footer-tel-pc {
    display: inline;
}

/* =========================
   모바일 푸터
========================= */

@media (max-width:768px) {

    .footer {
        padding: 30px 15px 20px;
    }

    .footer-menu {
        margin-bottom: 20px;
        line-height: 2;
    }

    .footer-box-wrap {
        display: block;
        padding: 0;
    }

    .footer-box:first-child,
    .footer-box:last-child {
        display: none;
    }

    .footer-box:nth-child(2) {
        display: block;
        min-height: auto;
        padding: 20px;
        text-align: center;
        border-radius: 12px;
        background: #fff;
        border: 1px solid #e5e5e5;
    }

    .footer-box:nth-child(2) h4 {
        display: none;
    }

    .footer-tel {
        justify-content: center;
        font-size: 30px;
        margin-bottom: 15px;
    }

    .footer-box:nth-child(2) p {
        display: block;
        margin: 6px 0;
        font-size: 13px;
        color: #666;
    }

    .footer-mobile-info {
        display: block;
        margin-top: 18px;
        text-align: center;
        font-size: 11px;
        color: #888;
        line-height: 1.8;
    }

    .footer-copy {
        margin-top: 18px;
        padding-top: 15px;
        font-size: 11px;
    }

    .footer-tel-pc {
        display: none;
    }

    .footer-tel-mobile {
        display: inline;
    }
}

@media (min-width:769px) {
    .footer-mobile-info {
        display: none;
    }
}

/* =========================
   모바일 사이드 메뉴
========================= */

/* =========================
   모바일 사이드 메뉴
========================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* 메뉴 본체 */
.side-menu {
    position: fixed;
    top: 0;
    left: -88%;
    width: 88%;
    max-width: 390px;
    height: 100dvh;

    background: #fff;

    overflow-x: hidden;
    overflow-y: auto;

    transition: left .28s ease;

    z-index: 1000;

    padding-bottom: 35px;

    -webkit-overflow-scrolling: touch;
}

.side-menu.active {
    left: 0;
}


/* =========================
   헤더
========================= */

.side-menu-header {
    position: sticky;
    top: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 65px;

    padding: 0 20px;

    background: rgba(255, 255, 255, .97);

    border-bottom: 1px solid #eee;

    z-index: 5;
}

.side-menu-logo {
    display: flex;
    align-items: center;
}

.side-menu-logo img {
    display: block;
    width: auto;
    max-width: 105px;
    max-height: 36px;
}

.side-close {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    background: transparent;

    color: #222;

    font-size: 21px;
    line-height: 1;

    cursor: pointer;
}


/* =========================
   회원 영역
========================= */

.side-member-box {
    margin: 18px 16px 0;
    padding: 19px 18px;

    border-radius: 16px;

    background: #f7f8fa;
}


/* 로그인 상태 */

.side-member-name {
    font-size: 16px;
    color: #222;
    line-height: 1.4;
}

.side-member-name strong {
    font-size: 18px;
    font-weight: 800;
}

.side-member-mypage {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 7px;

    color: #777;
    font-size: 12px;
}

.side-member-mypage span {
    color: #999;
    font-size: 20px;
    line-height: 1;
}

.side-member-point {
    margin-top: 14px;
    padding-top: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #e7e7e7;

    font-size: 13px;
    color: #666;
}

.side-member-point strong {
    font-size: 14px;
    color: #111;
}


/* 비로그인 */

.side-member-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.side-member-desc {
    margin-top: 6px;

    color: #777;
    font-size: 12px;
    line-height: 1.5;
}

.side-member-buttons {
    display: flex;
    gap: 8px;

    margin-top: 15px;
}

.side-member-buttons a {
    flex: 1;

    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;
}

.side-login-btn {
    background: #111;
    color: #fff;
}

.side-join-btn {
    background: #fff;
    color: #111;

    border: 1px solid #ddd;
}


/* =========================
   퀵메뉴
========================= */

.side-quick-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin: 22px 16px 4px;

    border: 1px solid #ececec;
    border-radius: 15px;

    overflow: hidden;
}

.side-quick-item {
    position: relative;

    min-width: 0;

    height: 86px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: #fff;

    color: #222;

    font-size: 12px;
}

.side-quick-item+.side-quick-item {
    border-left: 1px solid #eee;
}

.side-quick-icon {
    position: relative;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.side-quick-icon svg {
    width: 25px;
    height: 25px;
}

.side-quick-text {
    white-space: nowrap;
}

.side-quick-icon-badge {
    position: relative;
}

.side-quick-badge {
    position: absolute;

    top: -8px;
    right: -11px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #e60023;
    color: #fff;

    font-size: 10px;
    font-weight: 700;

    line-height: 18px;
}


/* =========================
   섹션 공통
========================= */

.side-section {
    margin: 28px 16px 0;
}

.side-section-title {
    margin-bottom: 9px;

    color: #999;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;
}

.side-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-menu-chevron {
    color: #aaa;

    font-size: 21px;
    font-weight: 300;

    line-height: 1;
}


/* =========================
   SHOP / SERVICE
========================= */

.side-shop-menu {
    border-top: 1px solid #eee;
}

.side-shop-menu>a {
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #f1f1f1;

    color: #222;

    font-size: 15px;
    font-weight: 500;
}


/* =========================
   CATEGORY
========================= */

.side-category-list {
    border-top: 1px solid #eee;
}

.side-menu-item {
    border-bottom: 1px solid #f1f1f1;
}

.side-menu-link {
    min-height: 51px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #222;

    font-size: 15px;
    font-weight: 500;
}

.side-menu-link.has-children {
    cursor: pointer;
}

.side-arrow {
    width: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #777;

    font-size: 20px;
    font-weight: 300;

    line-height: 1;
}


/* 하위 카테고리 */

.side-sub-menu {
    max-height: 0;

    overflow: hidden;

    background: #f8f8f8;

    transition: max-height .28s ease;
}

.side-sub-menu a {
    min-height: 42px;

    display: flex;
    align-items: center;

    padding: 0 15px;

    color: #666;

    font-size: 13px;

    border-top: 1px solid #f1f1f1;
}

.side-sub-menu a:first-child {
    border-top: 0;
}

.side-sub-menu .side-sub-all {
    color: #222;
    font-weight: 700;
}

.side-menu-item.active .side-menu-link {
    font-weight: 700;
}

.side-menu-item.active .side-arrow {
    color: #111;
}


/* =========================
   최근 본 상품
========================= */

.side-recent-section {
    margin-top: 30px;
}

.side-recent-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 8px;
}

.side-recent-item {
    min-width: 0;
}

.side-recent-image {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    border: 1px solid #eee;
    border-radius: 9px;

    background: #f7f7f7;
}

.side-recent-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.side-recent-noimage {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #aaa;
    font-size: 8px;
}

.side-recent-name {
    margin-top: 6px;

    overflow: hidden;

    color: #555;

    font-size: 10px;
    line-height: 1.35;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-recent-empty {
    padding: 17px 0;

    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;

    color: #aaa;

    font-size: 12px;
    text-align: center;
}


/* =========================
   하단
========================= */

.side-bottom-menu {
    margin: 28px 16px 0;
    padding-top: 16px;

    border-top: 1px solid #eee;

    text-align: right;
}

.side-bottom-menu a {
    color: #888;
    font-size: 12px;
}


/* 메뉴 열릴 때 body 스크롤 차단 */
body.side-menu-open {
    overflow: hidden;
}


/* PC에서는 사이드 메뉴 사용 안 함 */
@media (min-width: 769px) {

    .side-menu,
    .menu-overlay {
        display: none !important;
    }
}

/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
    z-index: 17;
    font-family: Arial, sans-serif;
}

.errtoast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffbbbb;
    color: #ff0000;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
    z-index: 17;
    font-family: Arial, sans-serif;
    border: 1px solid #f30404;
}

.toast.show {
    opacity: 1;
    bottom: 40px;
}

.toast.hidden {
    opacity: 0;
    bottom: 20px;
}

.errtoast.show {
    opacity: 1;
    bottom: 40px;
}

.errtoast.hidden {
    opacity: 0;
    bottom: 20px;
}

/* =========================
   반응형
========================= */

@media (max-width:1100px) {

    .category-bar {
        gap: 6px;
        padding: 6px;
    }

    .category-item>a {
        padding: 0 14px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width:900px) {

    .header-right {
        width: 100%;
        margin-top: 15px;
        justify-content: flex-end;
    }

    .search-box {
        flex: 1;
        max-width: 100%;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width:768px) {

    .container {
        width: 95%;
    }

    .category-bar {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 10px;
        left: 12px;
        z-index: 10;
    }

    .header-right {
        gap: 0px;
    }

    .search-box {
        margin-right: 10px;
        width: 100%;
    }

    .logo img {
        display: block;
    }
}

/* =========================
   페이지네이션
========================= */

.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 6px;
}

.page-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: #fff;
    color: #111;
    transition: all 0.2s ease;
}

.page-btn:hover {
    border-color: #111;
}

.page-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* =========================
   타마타마 모바일 카테고리
   기존 PC 카테고리와 완전 분리
========================= */

.tm-mobile-category {
    display: none;
}

@media (max-width: 768px) {

    .tm-mobile-category {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 0 18px;
    }

    .tm-mobile-category-scroll {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 18px;

        width: 100%;
        min-width: 0;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 5px 2px 10px;

        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;

        scrollbar-width: none;
    }

    .tm-mobile-category-scroll::-webkit-scrollbar {
        display: none;
    }

    .tm-mobile-category-btn {
        flex: 0 0 auto;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-width: max-content;
        height: 38px;

        padding: 0 2px;

        border: 0;
        border-radius: 0;
        background: transparent;

        color: #555;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;

        white-space: nowrap;
        text-decoration: none;
        cursor: pointer;

        position: relative;
        appearance: none;
        -webkit-appearance: none;
    }

    .tm-mobile-category-btn::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;

        height: 2px;
        background: #111;

        transform: scaleX(0);
        transform-origin: center;
        transition: transform .2s ease;
    }

    .tm-mobile-category-btn.active {
        color: #111;
        font-weight: 700;
    }

    .tm-mobile-category-btn.active::after {
        transform: scaleX(1);
    }

    .tm-mobile-subcategory {
        display: none;

        width: 100%;
        min-width: 0;

        margin-top: 2px;
        padding-top: 9px;

        border-top: 1px solid #ececec;
    }

    .tm-mobile-subcategory.active {
        display: block;
    }

    .tm-mobile-subcategory-scroll {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;

        width: 100%;
        min-width: 0;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 0 2px 7px;

        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;

        scrollbar-width: none;
    }

    .tm-mobile-subcategory-scroll::-webkit-scrollbar {
        display: none;
    }

    .tm-mobile-subcategory-link {
        flex: 0 0 auto;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-width: max-content;
        height: 34px;

        padding: 0 13px;

        border: 1px solid #e2e2e2;
        border-radius: 18px;
        background: #fff;

        color: #555;
        font-size: 13px;
        font-weight: 500;
        line-height: 1;

        white-space: nowrap;
        text-decoration: none;
    }

    .tm-mobile-subcategory-all {
        border-color: #111;
        background: #111;
        color: #fff;
    }
}