* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #f5f5f7;
    color: #111827;
}

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

/* ===========================
   Header & GNB
   =========================== */

.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 모바일 메뉴 토글 버튼 기본 (데스크톱에서는 숨김) */
.mobile-menu-toggle {
    display: none; /* 기본: 안 보이게 */
    border: none;
    background: transparent;
    cursor: pointer;
    width: 36px;
    height: 32px;
    padding: 0;
    margin-left: auto;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-toggle span + span {
    margin-top: 5px;
}

/* 메뉴가 열린 상태에서 햄버거를 X 모양으로 */
html.nav-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
html.nav-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}
html.nav-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.logo a {
    font-weight: 700;
    font-size: 22px;
}
.logo span {
    color: #3b82f6;
}

.search-box form {
    display: flex;
    flex: 1;
    max-width: 520px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    background: transparent;
    font-size: 14px;
}
.search-box button {
    border: none;
    padding: 0 18px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.user-menu {
    display: flex;
    gap: 12px;
    font-size: 13px;
}
.user-menu a {
    padding: 6px 10px;
    border-radius: 999px;
}
.user-menu .cart-link {
    background: #111827;
    color: #fff;
}
.user-name {
    font-size: 13px;
    color: #4b5563;
}

/* GNB */
.gnb {
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}
.gnb-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    gap: 24px;
    list-style: none;
}
.gnb-item {
    position: relative;
}
.gnb-item > a {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
}
.gnb-item:hover > a {
    color: #3b82f6;
}
.mega-menu {
    position: absolute;
    left: 0;
    top: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    padding: 16px 20px;
    display: none;
    gap: 24px;
}
.gnb-item:hover .mega-menu {
    display: flex;
}
.mega-col h4 {
    font-size: 14px;
    margin-bottom: 8px;
}
.mega-col ul {
    list-style: none;
}
.mega-col li {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

/* ===========================
   Layout & Common UI
   =========================== */

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}
.section {
    margin-bottom: 40px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}
.link-more {
    font-size: 13px;
    color: #6b7280;
}

/* buttons */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
}
.btn-primary.full {
    width: 100%;
}
.btn-outline {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}
.btn-coupanglink {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #6294ff;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
}
.btn-coupanglink.full {
    width: 100%;
}

/* ===========================
   Hero
   =========================== */

.hero {
    display: grid;
    grid-template-columns: 2fr 1.4fr;
    gap: 20px;
    margin-bottom: 32px;
}
.hero-text {
    background: #111827;
    color: #fff;
    border-radius: 24px;
    padding: 32px 28px;
}
.hero-text h1 {
    font-size: 28px;
    margin-bottom: 8px;
}
.hero-text p {
    font-size: 14px;
    margin-bottom: 18px;
    color: #e5e7eb;
}
.hero-banner {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    border-radius: 24px;
    padding: 24px 20px;
    color: #fff;
}
.hero-banner .badge {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    margin-bottom: 10px;
}

/* ===========================
   Product Grid / Category
   =========================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-thumb {
    width: 100%;
    padding-top: 100%;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}
.skeleton {
    background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease infinite;
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.product-title {
    font-size: 14px;
    height: 36px;
    overflow: hidden;
}
.product-price {
    font-weight: 600;
    font-size: 15px;
}
.product-badge {
    font-size: 11px;
    color: #6b7280;
}

/* category cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.category-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    font-size: 14px;
}
.category-card h3 {
    margin-bottom: 4px;
}

/* filter bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 13px;
}
.filter-btn {
    border: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
}
.filter-btn.is-active {
    background: #111827;
    color: #fff;
}
.filter-bar select {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}

/* pagination */
.pagination {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.page-link {
    min-width: 28px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    color: #4b5563;
}
.page-link.is-active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* ===========================
   Auth
   =========================== */

.auth-section {
    display: flex;
    justify-content: center;
}
.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.auth-card h2 {
    font-size: 20px;
    margin-bottom: 16px;
}
.form-row {
    margin-bottom: 12px;
    font-size: 13px;
}
.form-row label {
    display: block;
    margin-bottom: 4px;
}
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}
.form-grid .full {
    grid-column: 1 / -1;
}
.address-row {
    display: flex;
    gap: 8px;
}
.checkbox-row input {
    width: auto;
}
.auth-links {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}
.auth-links a {
    color: #4b5563;
}

/* ===========================
   Product Detail
   =========================== */

.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 24px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}
.pd-thumb {
    width: 100%;
    padding-top: 100%;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
}
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pd-title {
    font-size: 22px;
    font-weight: 600;
}
.pd-price {
    font-size: 20px;
    font-weight: 700;
}
.pd-meta {
    font-size: 13px;
    color: #6b7280;
}
.pd-form {
    margin-top: 8px;
}
.pd-qty {
    margin-bottom: 10px;
}
.pd-qty input {
    width: 80px;
}
.pd-buttons {
    display: flex;
    gap: 8px;
}
.pd-extra {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}
.pd-desc {
    background: #fff;
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.pd-desc h2 {
    font-size: 18px;
    margin-bottom: 10px;
}
.pd-desc-body {
    font-size: 14px;
    color: #4b5563;
}

/* ===========================
   Cart
   =========================== */

.cart-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 20px;
}
.cart-item {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

/* 썸네일 (cart + checkout 공통) */
.co-thumb,
.cart-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.cart-info h3 {
    font-size: 14px;
    margin-bottom: 4px;
}
.cart-option {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}
.cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qty-control {
    display: flex;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    overflow: hidden;
}
.qty-control button {
    border: none;
    background: #f3f4f6;
    padding: 4px 10px;
    cursor: pointer;
}
.qty-control input {
    width: 36px;
    text-align: center;
    border: none;
    font-size: 13px;
}
.cart-price {
    font-weight: 600;
    font-size: 14px;
}
.link-remove {
    border: none;
    background: transparent;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
}
.cart-summary {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.cart-summary h3 {
    font-size: 16px;
    margin-bottom: 12px;
}
.cart-summary ul {
    list-style: none;
    font-size: 14px;
    margin-bottom: 12px;
}
.cart-summary li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cart-summary li.total span:last-child {
    font-size: 18px;
    font-weight: 700;
}

/* ===========================
   Checkout / Order Pages
   =========================== */

/* 주문 레이아웃(좌: 주문 정보, 우: 요약) */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
}

.checkout-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.checkout-box h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* 주문 상품 리스트 */
.checkout-items {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* 각 상품 한 줄 */
.checkout-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    align-items: flex-start;
}

/* skeleton 있을 때 (썸네일용) */
.skeleton-thumb {
    background-color: #f3f4f6;
}

/* 상품 텍스트 영역 */
.co-info {
    flex: 1;
    min-width: 0;
}
.co-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.co-meta,
.co-line {
    font-size: 13px;
    color: #6b7280;
}

/* 주문 금액 요약 박스 */
.checkout-price {
    list-style: none;
    font-size: 14px;
    margin: 0;
    padding: 0;
}
.checkout-price li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.checkout-price li.total span:last-child {
    font-size: 18px;
    font-weight: 700;
}

/* 추가 요약 (상품/할인/배송/총금액) */
.checkout-summary {
    list-style: none;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}
.checkout-summary li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.checkout-summary li.total {
    margin-top: 4px;
    font-weight: 600;
}

/* 주문 폼 안 input 길이 */
.checkout-box .form-row input[type="text"],
.checkout-box .form-row input[type="email"] {
    width: 100%;
}

/* 주소 검색 버튼 줄 */
.addr-row {
    display: flex;
    gap: 8px;
}
.addr-row input[type="text"] {
    flex: 1;
}

/* 결제수단 pill */
.checkout-pay-box .pay-pill:hover {
    border-color: #2563eb;
    background-color: #eff6ff;
}
.checkout-pay-box input[type="radio"] {
    transform: scale(1.05);
}

/* 상품상세 이미지처리 (PG사 상세 이미지 등) */
.sp_product-detail {
    display: block !important;
}
.sp_product-detail img {
    width: 100% !important;
    height: auto;
    display: block;
}

/* ===========================
   My Page
   =========================== */

.mypage-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}
.mypage-menu {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.mypage-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 999px;
}
.mypage-menu a.is-active {
    background: #111827;
    color: #fff;
}
.mypage-user {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
    margin-bottom: 8px;
}
.mypage-name {
    font-weight: 600;
}
.mypage-email {
    font-size: 12px;
    color: #6b7280;
}
.mypage-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===========================
   CS (고객센터)
   =========================== */

.cs-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
}
.cs-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    margin-bottom: 6px;
}
.cs-menu a.is-active {
    background: #111827;
    color: #fff;
}
.cs-list {
    list-style: none;
    font-size: 14px;
}
.cs-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* 고객센터 - 정책 탭 전용 */
.policy-section {
    margin-bottom: 24px;
}
.policy-box {
    border: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 12px 14px;
    border-radius: 4px;
}
.policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.policy-table th,
.policy-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e9e9e9;
}
.policy-table th {
    width: 140px;
    background: #f3f3f3;
    text-align: left;
    font-weight: 500;
}
.policy-list {
    margin-left: 18px;
    font-size: 13px;
    line-height: 1.6;
}
.cs-subtitle {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

/* ===========================
   Orders
   =========================== */

.orders-search {
    margin-bottom: 16px;
}
.orders-search form {
    display: flex;
    gap: 8px;
}
.orders-search input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}
.orders-list .order-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    margin-bottom: 10px;
}
.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}
.order-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
}
.order-body {
    font-size: 14px;
}
.order-items-detail {
    margin-top: 8px;
    font-size: 13px;
}
.order-items-detail ul {
    list-style: none;
    padding-left: 0;
}
.order-items-detail li {
    margin-bottom: 4px;
}

/* ===========================
   Admin
   =========================== */

.admin-table {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow-x: auto;
}
.admin-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th,
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.admin-table th {
    background: #f9fafb;
    font-weight: 600;
}

/* ===========================
   Footer
   =========================== */

.footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px 16px 30px;
    background: #ffffff;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
    color: #6b7280;
}
.footer-links a {
    display: block;
    margin-bottom: 4px;
}

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

@media (max-width: 768px) {
    /* 헤더 레이아웃 재정렬 */
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        align-items: center;
    }

    .logo a {
        font-size: 18px;
    }

    .search-box {
        order: 3;
        flex: 1 0 100%;
    }
    .search-box form {
        width: 100%;
    }

    .user-menu {
        order: 2;
        flex: 1 0 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px 8px;
        font-size: 12px;
    }
    .user-menu a,
    .user-menu .user-name {
        font-size: 12px;
    }

    /* 모바일에서 햄버거 버튼 보이기 */
    .mobile-menu-toggle {
        display: inline-flex;
    }

    /* GNB(카테고리 메뉴)를 모바일에서는 접어두기 */
    .gnb {
        display: none;
        border-top: 1px solid #e5e7eb;
        background: #ffffff;
    }

    /* 메뉴 열렸을 때만 보이도록 */
    html.nav-open .gnb {
        display: block;
    }

    .gnb-list {
        max-width: 100%;
        padding: 8px 12px 12px;
        flex-direction: column;
        gap: 10px;
    }

    .gnb-item > a {
        display: block;
        padding: 6px 0;
    }

    /* 모바일에서는 mega-menu(3단 카테고리 드롭다운)를 제거하고
       1차 카테고리 링크만 사용 */
    .mega-menu {
        display: none !important;
    }

    /* 본문 레이아웃: 2단 → 1단 */
    .hero {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-layout,
    .cs-layout,
    .checkout-layout,
    .mypage-layout {
        grid-template-columns: 1fr;
    }

    .section {
        margin-bottom: 28px;
    }

    /* 상품 카드 여백 약간 줄이기 */
    .product-grid {
        gap: 12px;
    }

    /* 푸터 세로 정렬 */
    .footer-inner {
        flex-direction: column;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }
}

/* 주문 상세 라벨/값 좌우 레이아웃 */
.order-info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

/* 왼쪽 라벨: 폭 고정 + 줄바꿈 금지 */
.order-info-label {
    flex: 0 0 100px;   /* ← 폭 증가 (가독성 향상) */
    max-width: 100px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

/* 오른쪽 값: 항상 같은 시작선에서 정렬 */
.order-info-value {
    flex: 1;
    text-align: left;   /* ← 좌측 정렬 → 읽기 쉬움 */
    color: #111827;
}
