/* ============================================
   소룸 SOROOM - 인테리어 소품 쇼핑몰
   모바일 퍼스트 (390px 기준)
   ============================================ */

:root {
    --bg: #FAFAF8;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray-50: #F7F7F5;
    --gray-100: #EFEFEB;
    --gray-200: #E0DED8;
    --gray-300: #C8C5BC;
    --gray-400: #A8A49A;
    --gray-500: #85817A;
    --gray-600: #6B6860;
    --gray-700: #4A4840;
    --primary: #3D3830;
    --accent: #B8926A;
    --accent-light: #D4B896;
    --danger: #C75050;
    --success: #5A9E6F;
    --sale: #C75050;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --nav-height: 64px;
    --header-height: 52px;
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--black);
    font-size: 14px;
    line-height: 1.6;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

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

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

/* ---- 상단 헤더 ---- */
.top-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--header-height);
    background: rgba(250,250,248,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--gray-100);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

.header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
}

.logo-img {
    width: 26px;
    height: 26px;
    border-radius: 5px;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--accent);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- 메인 콘텐츠 ---- */
.main-content {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--nav-height) + 16px);
    min-height: 100vh;
}

/* ---- 하단 네비게이션 ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--nav-height);
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--gray-400);
    font-size: 10px;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item svg {
    transition: transform var(--transition);
}

.nav-item.active svg {
    transform: scale(1.1);
}

/* ---- 배너/슬라이드 ---- */
.hero-banner {
    margin: 12px 16px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #3D3830 0%, #6B6860 100%);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    color: var(--white);
}

.hero-text .sub {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 6px;
}

.hero-text h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

/* ---- 섹션 제목 ---- */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 16px 12px;
}

.section-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.section-title .more {
    font-size: 12px;
    color: var(--gray-400);
}

/* ---- 상품 그리드 ---- */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:active {
    transform: scale(0.98);
}

.product-card .thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-50);
}

.product-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card .badge-wrap {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge.best {
    background: var(--primary);
    color: var(--white);
}

.badge.new {
    background: var(--accent);
    color: var(--white);
}

.badge.sale {
    background: var(--sale);
    color: var(--white);
}

.product-card .info {
    padding: 10px 12px 14px;
}

.product-card .info .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-card .info .price-area {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 12px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.current-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.discount-rate {
    font-size: 14px;
    font-weight: 700;
    color: var(--sale);
}

/* ---- 카테고리 바 ---- */
.category-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--white);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition);
}

.cat-chip.active, .cat-chip:active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ---- 상품 상세 ---- */
.product-detail-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--gray-50);
}

.product-detail-info {
    padding: 20px 16px;
}

.product-detail-info .cat-label {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.product-detail-info .pname {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.product-detail-info .price-wrap {
    margin-bottom: 20px;
}

.product-detail-info .price-wrap .orig {
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.product-detail-info .price-wrap .final {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-info .price-wrap .rate {
    font-size: 24px;
    font-weight: 700;
    color: var(--sale);
    margin-right: 8px;
}

.detail-desc {
    padding: 20px 16px;
    border-top: 8px solid var(--gray-50);
}

.detail-desc h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.detail-desc p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.8;
}

/* 수량 선택 */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 36px;
}

.qty-selector button {
    width: 36px;
    height: 36px;
    background: var(--gray-50);
    font-size: 18px;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-selector input {
    width: 48px;
    height: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
}

/* 하단 고정 버튼 바 */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    display: flex;
    gap: 10px;
    z-index: 90;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    height: 48px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    flex: 1;
}

.btn-primary:active {
    background: #2E2B24;
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 0 20px;
}

.btn-outline:active {
    background: var(--gray-50);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    flex: 1;
}

.btn-danger {
    background: var(--white);
    color: var(--danger);
    border: 1.5px solid var(--danger);
    flex: 1;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 40px;
    font-size: 13px;
}

.btn-icon {
    width: 48px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    color: var(--gray-600);
}

/* ---- 폼 스타일 ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    transition: border-color var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--gray-300);
}

textarea.form-input {
    height: auto;
    min-height: 80px;
    padding: 12px 14px;
    resize: vertical;
}

/* ---- 카드/박스 ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 16px 12px;
    box-shadow: var(--shadow-sm);
}

.page-section {
    padding: 16px;
}

/* ---- 장바구니 아이템 ---- */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}

.cart-item .cart-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-50);
}

.cart-item .cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .cart-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item .cart-info .ci-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item .cart-info .ci-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item .cart-info .ci-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.cart-remove {
    background: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

/* 장바구니 합계 */
.cart-summary {
    padding: 20px 16px;
    border-top: 8px solid var(--gray-50);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.summary-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--gray-200);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* ---- 빈 상태 ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 16px;
    text-align: center;
}

.empty-state svg {
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--gray-400);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ---- 주문/결제 ---- */
.checkout-section {
    padding: 16px;
    border-bottom: 8px solid var(--gray-50);
}

.checkout-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.checkout-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.checkout-item .ci-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-50);
}

.checkout-item .ci-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item .ci-info .ci-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.checkout-item .ci-info .ci-detail {
    font-size: 12px;
    color: var(--gray-400);
}

/* ---- 마이페이지 ---- */
.mypage-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 16px;
}

.mypage-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
}

.mypage-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.mypage-email {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

.mypage-menu {
    background: var(--white);
    border-radius: var(--radius);
    margin: 0 16px 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.mypage-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--gray-50);
    transition: background var(--transition);
}

.mypage-menu-item:last-child {
    border-bottom: none;
}

.mypage-menu-item:active {
    background: var(--gray-50);
}

.mypage-menu-item .label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.mypage-menu-item .label svg {
    color: var(--gray-400);
}

.mypage-menu-item .arrow {
    color: var(--gray-300);
}

/* ---- 주문 내역 ---- */
.order-card {
    background: var(--white);
    border-radius: var(--radius);
    margin: 0 16px 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.order-card .order-date {
    font-size: 12px;
    color: var(--gray-400);
}

.order-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.status-pending { background: #FFF3E0; color: #E67E22; }
.status-paid { background: #E3F2FD; color: #2196F3; }
.status-shipping { background: #E8F5E9; color: #4CAF50; }
.status-delivered { background: var(--gray-100); color: var(--gray-600); }
.status-cancelled { background: #FFEBEE; color: var(--danger); }

.order-item-row {
    display: flex;
    gap: 10px;
    padding: 6px 0;
}

.order-item-row .oi-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-50);
}

.order-item-row .oi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-row .oi-info {
    flex: 1;
}

.order-item-row .oi-name {
    font-size: 13px;
    font-weight: 500;
}

.order-item-row .oi-detail {
    font-size: 12px;
    color: var(--gray-400);
}

.order-total {
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

/* ---- 로그인/회원가입 ---- */
.auth-page {
    padding: 40px 24px;
}

.auth-page .auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-page .auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--primary);
}

.auth-page .auth-logo p {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
    letter-spacing: 1px;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--gray-400);
}

.auth-link a {
    color: var(--accent);
    font-weight: 600;
}

/* ---- 알림 메시지 ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error {
    background: #FFF0F0;
    color: var(--danger);
    border: 1px solid #FFD6D6;
}

.alert-success {
    background: #F0FFF4;
    color: var(--success);
    border: 1px solid #C6F6D5;
}

/* ---- 토스트 ---- */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(26,26,26,0.9);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- 유틸리티 ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }

.divider {
    height: 8px;
    background: var(--gray-50);
}

/* ---- 페이지 타이틀 (서브) ---- */
.page-title-area {
    padding: 20px 16px 8px;
}

.page-title-area h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.page-title-area p {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ---- 주문완료 ---- */
.order-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.order-complete .check-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.order-complete h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.order-complete p {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 32px;
}

.order-complete .btns {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* 탈퇴 확인 */
.delete-confirm {
    padding: 40px 24px;
    text-align: center;
}

.delete-confirm .warn-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FFF0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--danger);
}

.delete-confirm h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.delete-confirm p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* ---- 쇼핑몰 정보 푸터 ---- */
.shop-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 28px 16px 20px;
    margin-top: 24px;
}

.shop-footer-inner {
    max-width: 430px;
    margin: 0 auto;
}

.shop-footer-logo {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gray-500);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.shop-footer-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.shop-footer-item {
    display: flex;
    font-size: 11px;
    line-height: 1.6;
    color: var(--gray-500);
    gap: 4px;
}

.sfi-label {
    flex-shrink: 0;
    color: var(--gray-400);
    min-width: 90px;
}

.shop-footer-copy {
    font-size: 10px;
    color: var(--gray-300);
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

/* ---- 주소 검색 ---- */
.addr-search-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.addr-search-wrap .form-input {
    flex: 1;
}

.btn-addr {
    flex-shrink: 0;
    padding: 0 14px;
    height: 46px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

/* ---- 레이어 팝업 (배송지 관리) ---- */
.layer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.layer-overlay.open {
    display: flex;
}

.layer-popup {
    width: 100%;
    max-width: 430px;
    max-height: 85vh;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.layer-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.layer-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.layer-body {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.layer-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    flex-shrink: 0;
}

/* 배송지 카드 */
.addr-card {
    padding: 16px;
    border-bottom: 1px solid var(--gray-50);
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.addr-card:active {
    background: var(--gray-50);
}

.addr-card.selected {
    background: #F5F0EB;
}

.addr-card .addr-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.addr-card .addr-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.addr-card .addr-default-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    background: #F5F0EB;
    padding: 2px 8px;
    border-radius: 10px;
}

.addr-card .addr-name-phone {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.addr-card .addr-text {
    font-size: 12px;
    color: var(--gray-400);
    line-height: 1.5;
}

.addr-card .addr-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.addr-card .addr-actions button {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 2px 4px;
}

.addr-card .addr-actions button:hover {
    color: var(--primary);
}

/* 배송지 등록 폼 (팝업 내부) */
.addr-form {
    padding: 16px;
}

.addr-form .form-group {
    margin-bottom: 12px;
}

.addr-form .form-group label {
    font-size: 12px;
}

.addr-form .form-input {
    height: 42px;
    font-size: 13px;
}

.addr-form .btn-addr {
    height: 42px;
    font-size: 12px;
    padding: 0 12px;
}

.addr-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--gray-400);
    font-size: 14px;
}

.mb-8 { margin-bottom: 8px; }

/* ---- 결제수단 선택 ---- */
.pay-method-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    text-align: center;
}

.pay-method-card.selected {
    border-color: var(--primary);
    background: #F8F6F3;
    color: var(--primary);
}

.pay-method-card svg {
    transition: color var(--transition);
}

.pay-method-card.selected svg {
    color: var(--accent);
}

/* ---- 배송타입 ---- */
.delivery-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--gray-200);
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
}

.delivery-badge.dt-store {
    background: #FFF3E0;
    color: #E67E22;
}

.delivery-badge.dt-pickup {
    background: #E8F5E9;
    color: #4CAF50;
}

.delivery-badge.dt-parcel {
    background: #E3F2FD;
    color: #2196F3;
}

.tracking-number {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-50);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
}

/* ---- PASS 본인인증 ---- */
.pass-auth-section {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 4px;
}

.pass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pass-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.pass-status.verified {
    background: #E8F5E9;
    color: #4CAF50;
}

.pass-status.unverified {
    background: #FFF3E0;
    color: #E67E22;
}

.pass-guide {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.7;
    text-align: center;
    padding: 12px 0 16px;
}

.pass-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.pass-info-item {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.pass-label {
    color: var(--gray-400);
    min-width: 65px;
    flex-shrink: 0;
}

.pass-value {
    color: var(--primary);
    font-weight: 600;
}

/* 카드폼 잠금 */
.card-form-locked {
    position: relative;
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.card-form-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
}

/* ---- 주문 상세 정보 ---- */
.detail-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-info-row {
    display: flex;
    font-size: 13px;
    line-height: 1.5;
}

.detail-label {
    color: var(--gray-400);
    min-width: 65px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--gray-600);
    word-break: break-all;
}

/* ---- 배너 슬라이더 ---- */
.banner-slider {
    margin: 12px 16px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.banner-track {
    display: flex;
    transition: transform 0.4s ease;
}

.banner-slide {
    min-width: 100%;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.banner-dots .dot.active {
    background: rgba(255,255,255,0.95);
    width: 18px;
    border-radius: 4px;
}

/* 업체 직접배송 상태 */
.status-direct_shipping { background: #FFF8E1; color: #F57F17; }
.status-direct_delivered { background: #F3E5F5; color: #7B1FA2; }

/* 직접배송 */
.delivery-badge.dt-direct {
    background: #FFF8E1;
    color: #F57F17;
}
