/**
 * Ongyul 상품 목록 페이지 스타일
 * - 필터 탭
 * - 상품 카드
 * - Pretendard 폰트 + #3182F6 블루 강조색
 */

/* =========================================
   CSS 변수 정의
   ========================================= */
:root {
    --color-primary: #3182F6;
    --color-primary-dark: #1a6be8;
    --color-primary-light: #e8f3ff;
    --color-primary-gradient: #3182F6;

    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-border: #e5e8eb;

    --color-text-primary: #191f28;
    --color-text-secondary: #4e5968;
    --color-text-tertiary: #8b95a1;


    --shadow-card: none;
    --shadow-card-hover: none;
    --shadow-filter: none;

    --radius-card: 14px;
    --radius-pill: 100px;
    --radius-chip: 8px;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   전역 리셋
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: #f7f9fc;
    color: var(--color-text-primary);
    line-height: 1.6;
    /* -webkit-font-smoothing: antialiased; */
}

/* 앱 환경에서 하단 네비게이션 공간 확보 */
body.lb-platform-android,
body.lb-platform-ios {
    padding-bottom: 72px;
}

/* =========================================
   모바일 헤더 (앱 환경)
   ========================================= */
.header {
    background: white;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header__content {
    max-width: 640px;
    margin: 0 auto;
}

.header__top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.header__back {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.header__back:hover {
    background: var(--color-bg);
}

.header__back svg {
    width: 24px;
    height: 24px;
}

.header__branch {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__branch-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.header__change-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.header__change-btn:hover {
    background: var(--color-bg);
    border-color: #d1d6db;
}

/* =========================================
   페이지 헤더 영역 (PC / 웹 환경)
   ========================================= */
.page-hero {
    display: none;
    position: relative;
    overflow: hidden;
    min-height:fit-content;
    max-width:1440px;
    margin:0 auto;
    border-radius:20px;
    padding: 0 20px;
}

.page-hero figure {
    border-radius:20px;
    min-height:220px;
    max-width:1400px;
    background: url(https://d1hcalb01xyt9n.cloudfront.net/static/images/bg-products.png);
    background-position: center;
    background-size:cover;
}

.page-hero__inner {
    max-width: 1440px;
    padding:0 40px;
    margin: 50px auto 30px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 32px;
    text-transform: uppercase;
    color: #333;
    font-weight:700;
    margin-bottom: 12px;
    line-height:1.5;
} 

.page-hero__title {
    font-size: 20px;
    font-weight: 400;
    color: #888;
    letter-spacing: -0.01em;
    line-height: 1.2; 
}

.page-hero__subtitle {
    font-size: 20px;
    color: #888;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* =========================================
   필터 섹션
   ========================================= */
.filter-section {
    background: #f7f9fc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    position: static;
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/* 카테고리 탭 */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.category-tab {
    flex-shrink: 0;
    background: #eef2f7;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #5d6a7d;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0;
}

.category-tab:hover {
    background: #e7edf6;
    color: #223047;
}

/* 활성 탭: 블루 단색 */
.category-tab--active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.category-tab--active:hover {
    background: var(--color-primary);
    color: white;
}

/* 지역 필터 */
.region-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.filter-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.region-filter-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.region-filter-row__label,
.filter-row__label {
    color: #7a8799;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.region-filter-row__options,
.type-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.region-filter-row__options::-webkit-scrollbar {
    display: none;
}

.region-filter {
    flex: 0 0 auto;
    background: #f3f6fa;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 800;
    color: #526173;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    font-family: inherit;
    letter-spacing: 0;
    white-space: nowrap;
}

.region-filter:hover {
    background: #e8eef7;
}

.region-filter span {
    margin-left: 4px;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.region-filter--active {
    background: #eef6ff;
    border-color: rgba(49, 130, 246, 0.38);
    color: #1b64da;
}

.region-filter--active span {
    color: var(--color-primary);
}

.type-filters {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.type-filters::-webkit-scrollbar {
    display: none;
}

.filter-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 10px 0;
}

.filter-row--category {
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.filter-row--search {
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.product-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.product-search__icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #8b95a1;
    pointer-events: none;
}

.product-search__input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--color-text-primary);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.product-search__input::placeholder {
    color: #9aa4b2;
}

.product-search__input:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

.filter-row--type {
    padding-bottom: 10px;
}

.region-meta-notice {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: #f7fbff;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.region-meta-notice[hidden] {
    display: none;
}

.type-filter {
    flex: 0 0 auto;
    min-width: 74px;
    background: #f3f6fa;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 800;
    color: #526173;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    font-family: inherit;
    letter-spacing: 0;
}

.type-filter:hover {
    background: #e8eef7;
}

.type-filter--active {
    background: #eef6ff;
    border-color: rgba(49, 130, 246, 0.38);
    color: #1b64da;
}

/* =========================================
   메인 컨테이너
   ========================================= */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 32px;
}

/* =========================================
   상품 그리드
   ========================================= */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* =========================================
   상품 카드
   ========================================= */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    overflow: hidden;
    border:1px solid #eee;
    padding:10px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #eee;
    position: relative;
}

.product-card:hover { 
    border-color: rgba(49, 130, 246, 0.12);
    transition:0.2s;
}

.product-card:active {
    transform: translateY(-1px);
}

.product-card--branch {
    cursor: default;
}

.product-card__visual {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: clamp(104px, 14vw, 148px);
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #edf2f7;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 -34px 48px rgba(15, 23, 42, 0.14);
}

.product-card__visual--fallback {
    background-image: linear-gradient(135deg, rgba(247, 250, 252, 0.94) 0%, rgba(219, 230, 243, 0.78) 52%, rgba(201, 214, 231, 0.84) 100%);
}

.product-card__visual--fallback::before,
.product-card__visual--fallback::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.product-card__visual--fallback::before {
    left: 16px;
    right: 16px;
    bottom: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 -34px 0 rgba(255, 255, 255, 0.34), 0 28px 0 rgba(255, 255, 255, 0.30);
}

.product-card__visual--fallback::after {
    right: 16px;
    bottom: 18px;
    width: 52px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: -78px -48px 0 rgba(255, 255, 255, 0.28);
}

/* 유형 뱃지 */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.product-badge--subscription {
    background: #3182F6;
    color: white;
}

.product-badge--period {
    background: #10B981;
    color: white;
}

.product-badge--general {
    background: #0369A1;
    color: white;
}

/* 카드 본문 */
.product-card__content {
    padding: 14px;
}

.product-card__name {
    font-size: 20px;
    font-weight: 600;
    color: #191f28;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.product-card__branch {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 20px;
    color: #3182f6;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card__location {
    display: none;
}

.product-board {
    width: 100%;
    overflow: hidden;
    border: 1px solid #e5e8eb;
    border-radius: 14px;
    background: #fff;
}

.product-board__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f4;
}

.product-board__title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-board__branch {
    margin: 0;
    color: #191f28;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-board__count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1b64da;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.product-board__columns,
.product-board__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 138px 52px;
    align-items: center;
    gap: 16px;
}

.product-board__columns {
    padding: 10px 22px;
    background: #fafbfc;
    border-bottom: 1px solid #eef1f4;
    color: #8b95a1;
    font-size: 12px;
    font-weight: 900;
}

.product-board__list {
    display: flex;
    flex-direction: column;
}

.product-board__row {
    min-height: 70px;
    padding: 12px 22px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.product-board__row + .product-board__row {
    border-top: 1px solid #f2f4f6;
}

.product-board__row:hover {
    background: #f8fbff;
}

.product-board__product {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.product-board__row--no-thumb .product-board__product {
    grid-template-columns: minmax(0, 1fr);
}

.product-board__product-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-board__product-name {
    min-width: 0;
    color: #191f28;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-board__product-subtitle {
    min-width: 0;
    color: #6b7684;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-board__price {
    color: #191f28;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
}

.product-board__row > .plan-type-badge {
    justify-self: start;
}

.product-board__row .product-card__cart-btn {
    justify-self: end;
}


/* =========================================
   빈 상태
   ========================================= */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #e8edf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aafc8;
}

.empty-state__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.empty-state__sub {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* =========================================
   PC(웹) 레이아웃 - lb-platform-web
   ========================================= */

/* 모바일 헤더 숨김 */
body.lb-platform-web .header { display: none !important; }

/* 필터 섹션: PC에서 최상단 고정, 다크 히어로 아래 */
body.lb-platform-web .filter-section {
    max-width: 1440px;
    padding: 28px 60px 26px;
    margin: 0 auto;
    border-bottom: 0;
}

body.lb-platform-web .filter-content {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

body.lb-platform-web .category-tabs {
    flex: 1;
    padding: 16px 0;
    gap: 8px;
}

body.lb-platform-web .type-filters {
    padding: 0;
    gap: 8px;
    flex-shrink: 0;
    width: auto;
    justify-content: flex-start;
}

body.lb-platform-web .region-filters {
    max-width: 860px;
    justify-content: flex-start;
}

body.lb-platform-web .region-meta-notice {
    max-width: 640px;
    text-align: left;
}

body.lb-platform-web .type-filter {
    flex: none;
    padding: 8px 18px;
}

body.lb-platform-web .region-filter {
    padding: 8px 18px;
}

body.lb-platform-web .region-filter-row__label {
    flex-basis: 82px;
}

/* 페이지 히어로: PC에서 표시 */
body.lb-platform-web .page-hero {
    display: block;
}

/* 컨테이너: PC에서 넓히기 */
body.lb-platform-web .container {
    max-width: 1440px;
    padding:40px;
    margin: 0 auto;
    background:#fff;
    border-top: 1px solid var(--color-border);
}

/* 그리드: PC에서 3열 */
body.lb-platform-web .products-grid {
    max-width: 1320px;
    margin: 0 auto;
    gap: 16px;
}
/* 1280px 이상에서 4열 */
@media (min-width: 1280px) {
    body.lb-platform-web .products-grid {
        max-width: 1320px;
    }
}

/* 모바일/앱에서 page-hero 숨김 */
body:not(.lb-platform-web) .page-hero,
body.lb-platform-android .page-hero,
body.lb-platform-ios .page-hero {
    display: none;
}

body:not(.lb-platform-web) .page-hero__inner,
body.lb-platform-android .page-hero__inner,
body.lb-platform-ios .page-hero__inner {
    display: none;
}

@media (max-width: 768px) {
    .page-hero,
    .page-hero__inner {
        display: none !important;
    }
}

/* =========================================
   요금제 목록 (카드 내 개별 플랜 표시)
   ========================================= */
.product-card__plan-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #f2f4f6;
}

.product-card__plan-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: background var(--transition-fast);
}

.product-card__plan-item:hover {
    background: #f8fbff;
}

.product-card__plan-item--no-thumb {
    grid-template-columns: minmax(0, 1fr) auto;
}

.plan-item__thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #e5eaf1;
    background: linear-gradient(135deg, #f6f9fc 0%, #e8eef6 100%);
    overflow: hidden;
}

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

.product-card__plan-item + .product-card__plan-item {
    border-top: 1px solid #f2f4f6;
}

.plan-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.plan-item__top,
.plan-item__bottom {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.product-card__cart-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border: 1px solid rgba(49, 130, 246, 0.18);
    border-radius: 12px;
    background: rgba(49, 130, 246, 0.06);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    font-family: inherit;
    flex: 0 0 38px;
}

.product-card__cart-btn svg {
    width: 19px;
    height: 19px;
}

.product-card__cart-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.product-card__cart-btn:focus-visible {
    outline: 2px solid rgba(49, 130, 246, 0.28);
    outline-offset: 2px;
}

.product-card__cart-btn:active {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.plan-item__desc {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.plan-item__price {
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.plan-item__meta {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1.35;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.plan-cap {
    font-size: 14px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.plan-cap--available {
    background: #e8f5e9;
    color: #2e7d32;
}

.plan-cap--full {
    background: #ffebee;
    color: #c62828;
}

/* 요금제 타입 미니 뱃지 */
.plan-type-badge {
    font-size: 14px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.plan-type-badge--subscription { background: #EDE9FE; color: #7C3AED; }
.plan-type-badge--period { background: #FEF3C7; color: #D97706; }
.plan-type-badge--general { background: #E0F2FE; color: #0369A1; }

.cart-added-modal .lb-modal-body {
    display: grid;
    gap: 6px;
    padding-bottom: 4px;
}

.cart-added-modal__title {
    color: #191f28;
    font-size: 17px;
    line-height: 1.45;
}

.cart-added-modal__desc {
    color: #6b7684;
    font-size: 14px;
    line-height: 1.5;
}

.cart-added-modal__footer {
    justify-content: stretch;
}

.cart-added-modal__footer button {
    flex: 1;
    white-space: nowrap;
}


/* =========================================
   지점 검색 모달
   ========================================= */
.branch-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.branch-modal-overlay--active {
    display: flex;
}

.branch-modal {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: branchModalSlideUp 0.25s ease-out;
}

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

.branch-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.branch-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.branch-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-modal__close:hover {
    background: #f2f4f6;
}

.branch-modal__search {
    position: relative;
    padding: 0 20px 16px;
    flex-shrink: 0;
}

.branch-modal__search-icon {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(calc(-50% - 8px));
    color: var(--color-text-tertiary);
    pointer-events: none;
}

.branch-modal__input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text-primary);
    background: #f8f9fa;
    outline: none;
    transition: border-color 0.2s;
}

.branch-modal__input:focus {
    border-color: var(--color-primary);
    background: #fff;
}

.branch-modal__input::placeholder {
    color: var(--color-text-tertiary);
}

.branch-modal__list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 20px;
}

.branch-modal__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-tertiary);
    font-size: 14px;
}

/* 지점 아이템 */
.branch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.branch-item:hover {
    background: #f5f6f8;
}

.branch-item--selected {
    background: var(--color-primary-light);
}

.branch-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
}

.branch-item--selected .branch-item__icon {
    background: var(--color-primary);
    color: #fff;
}

.branch-item__info {
    flex: 1;
    min-width: 0;
}

.branch-item__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.branch-item__address {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.branch-item__phone {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.branch-item__check {
    flex-shrink: 0;
    color: var(--color-primary);
}

/* PC에서 모달 중앙 정렬 */
@media (min-width: 768px) {
    .branch-modal-overlay {
        align-items: center;
    }

    .branch-modal {
        border-radius: 16px;
        max-height: 560px;
    }

    @keyframes branchModalSlideUp {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }
}


/* =========================================
   반응형: ~1024px (태블릿)
   ========================================= */
@media (max-width: 1024px) {
    body.lb-platform-web .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap:10px;
    }

    body.lb-platform-web .filter-content { 
    }

    body.lb-platform-web .filter-section {
        padding: 12px 24px;
    }

    body.lb-platform-web .category-tabs {
        padding: 14px 0 8px;
    }

    body.lb-platform-web .container {
        padding: 24px;
    }

    .page-hero__label {
        font-size: 28px;
    }

    .page-hero__title,
    .page-hero__subtitle {
        font-size: 18px;
    }

    .page-hero__inner {
        padding: 0 24px;
        margin: 36px auto 24px;
    }

    .page-hero {
        padding: 0 16px;
    }

    .page-hero figure {
        min-height: 180px;
    }
}

/* =========================================
   반응형: ~768px (모바일 대형)
   ========================================= */
@media (max-width: 768px) {
    body.lb-platform-web .container {
        padding: 16px;
    }

    body.lb-platform-web .filter-section {
        padding: 10px 16px;
    }

    body.lb-platform-web .filter-content {
        padding: 0;
        flex-direction: column;
        gap:10px;
        align-items: flex-start;
    }

    .branch-modal {max-width:100%;}

    .container {
        padding: 16px;
    }

    .page-hero__label {
        font-size: 32px;
    }

    .page-hero__title,
    .page-hero__subtitle {
        font-size: 16px;
    }

    .page-hero__inner {
        margin: 28px auto 20px;
    }

    .page-hero figure {
        min-height: 150px;
    }

    .product-card__name {
        font-size: 17px;
    }

    .product-card__content {
        padding: 10px;
    }

    .product-card__plan-item {
        font-size: 14px;
    }

    .product-board__header {
        padding: 16px;
    }

    .product-board__columns {
        display: none;
    }

    .product-board__branch {
        font-size: 17px;
    }

    .product-board__row {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 6px 12px;
        min-height: 76px;
        padding: 14px 16px;
    }

    .product-board__product {
        grid-column: 1;
        grid-row: 1;
    }

    .product-board__row > .plan-type-badge {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .product-board__price {
        grid-column: 1;
        grid-row: 3;
        font-size: 15px;
    }

    .product-board__row .product-card__cart-btn {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
    }

    .plan-item__price {
        font-size: 14px;
    }

    .type-filter {
        font-size: 15px;
        padding: 8px 12px;
    }
}


/* =========================================
   반응형: ~600px 
   ========================================= */

@media (max-width: 600px) {

    body.lb-platform-web .products-grid {
        display: flex;
    }

    .product-card__cart-btn {
        justify-self: end;
    }

    .product-card__plan-item {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
    }

    .product-board__title-wrap {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .product-board__count {
        height: 23px;
        font-size: 12px;
    }

    .product-card__plan-item--no-thumb {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .plan-item__thumb {
        width: 44px;
        height: 44px;
    }


}



/* =========================================
   반응형: ~480px (모바일 소형)
   ========================================= */
@media (max-width: 480px) {
    body.lb-platform-web .container {
        padding: 14px;
    }

    body.lb-platform-web .filter-section {
        padding: 8px 14px;
    }

    .container {
        padding: 14px;
    }

    .products-grid {
        gap: 10px;
    }

    .product-board {
        border-radius: 12px;
    }

    .product-board__header {
        padding: 14px;
    }

    .product-board__row {
        padding: 13px 14px;
    }

    .product-board__product {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .product-board__row--no-thumb .product-board__product {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-board__product-name {
        font-size: 15px;
    }

    .product-board__product-subtitle {
        display: -webkit-box;
        overflow: hidden;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-card {
        padding: 8px;
    }

    .product-card__visual {
        height: 112px;
        border-radius: 10px;
        margin-bottom: 6px;
    }

    .product-card__visual--fallback::before {
        left: 12px;
        right: 12px;
        bottom: 24px;
        box-shadow: 0 -26px 0 rgba(255, 255, 255, 0.34), 0 22px 0 rgba(255, 255, 255, 0.28);
    }

    .product-card__visual--fallback::after {
        right: 12px;
        bottom: 14px;
        width: 44px;
        height: 26px;
        box-shadow: -62px -38px 0 rgba(255, 255, 255, 0.28);
    }

    .product-card__content {
        padding: 8px;
    }

    .product-card__name {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .product-card__category {
        font-size: 14px;
    }

    .product-card__plan-item {
        font-size: 14px;
    }

    .plan-item__price {
        font-size: 14px;
    }

    .type-filter {
        font-size: 14px;
        padding: 7px 10px;
    }

    .page-hero__label {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .page-hero__title,
    .page-hero__subtitle {
        font-size: 14px;
    }

    .page-hero__inner {
        padding: 0 16px;
        margin: 24px auto 16px;
    }

    .page-hero figure {
        min-height: 120px;
        border-radius: 14px;
    }

    .page-hero {
        border-radius: 14px;
        padding: 0 14px;
    }

    .empty-state {
        padding: 48px 16px;
    }

    .empty-state__text {
        font-size: 15px;
    }
}

/* =========================================
   상품 페이지 최종 톤 정리
   ========================================= */
body.lb-platform-web {
    background: #f7f9fc;
}

.pc-header,
.mobile-header,
.bottom-nav,
.filter-panel,
.product-card,
body.lb-platform-web .page-hero figure {
    box-shadow: none;
}

body.lb-platform-web .page-hero {
    padding: 0 40px;
}

body.lb-platform-web .page-hero__inner {
    max-width: 1320px;
    padding: 0;
    margin: 44px auto 28px;
}

body.lb-platform-web .page-hero figure {
    max-width: 1320px;
    min-height: 210px;
    margin: 0 auto;
    border-radius: 22px;
}

body.lb-platform-web .filter-section {
    padding: 28px 40px 18px;
    background: #f7f9fc;
}

body.lb-platform-web .filter-content {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    gap: 14px;
}

body.lb-platform-web .category-tabs {
    width: auto;
    flex: 1;
    padding: 0;
    margin: 0;
}

body.lb-platform-web .filter-panel {
    max-width: 1320px;
    width: 100%;
    padding: 8px 18px;
    border-radius: 16px;
    background: #fff;
}

body.lb-platform-web .region-filters {
    max-width: none;
}

body.lb-platform-web .type-filters {
    width: auto;
    flex: 1;
    justify-content: flex-start;
}

body.lb-platform-web .type-filter,
body.lb-platform-web .region-filter {
    padding: 8px 15px;
    font-size: 14px;
}

body.lb-platform-web .container {
    max-width: 1320px;
    padding: 28px 0 72px;
    margin: 0 auto 80px;
    background: transparent;
    border-top: 0;
}

body.lb-platform-web .products-grid {
    width: 100%;
    max-width: 1320px;
    gap: 16px;
}

.product-card {
    border-color: rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #fff;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.product-card:hover {
    border-color: rgba(49, 130, 246, 0.28);
    background: #fbfdff;
}

.product-card__name {
    font-weight: 800;
    letter-spacing: 0;
}

@media (max-width: 768px) {
    .filter-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .region-filter-row,
    .filter-row {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .region-filter-row__label,
    .filter-row__label {
        flex-basis: auto;
    }

    .category-tabs,
    .region-filter-row__options,
    .type-filters {
        width: 100%;
    }
}

/* 필터 탭 공통 톤 */
.category-tabs,
.region-filter-row__options,
.type-filters,
body.lb-platform-web .category-tabs,
body.lb-platform-web .region-filter-row__options,
body.lb-platform-web .type-filters {
    gap: 10px;
}

.category-tab,
.region-filter,
.type-filter,
body.lb-platform-web .category-tab,
body.lb-platform-web .region-filter,
body.lb-platform-web .type-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: #eef2f7;
    color: #526173;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.category-tab:hover,
.region-filter:hover,
.type-filter:hover {
    background: #e7edf6;
    color: #223047;
}

.category-tab--active,
.region-filter--active,
.type-filter--active,
.category-tab--active:hover,
.region-filter--active:hover,
.type-filter--active:hover,
body.lb-platform-web .category-tab--active,
body.lb-platform-web .region-filter--active,
body.lb-platform-web .type-filter--active,
body.lb-platform-web .category-tab--active:hover,
body.lb-platform-web .region-filter--active:hover,
body.lb-platform-web .type-filter--active:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.region-filter--active span {
    color: #fff;
}

.region-filter-row__label,
.filter-row__label {
    width: 72px;
    color: #758196;
    font-size: 13px;
    font-weight: 900;
}

/* =========================================
   모바일 여백 정렬 보정
   ========================================= */
@media (max-width: 767px) {
    :root {
        --products-mobile-gutter: 18px;
    }

    body.lb-platform-web .filter-section.section-default,
    body.lb-platform-web .container.section-default,
    .filter-section.section-default,
    .container.section-default {
        width: 100%;
        max-width: none;
        padding-left: var(--products-mobile-gutter);
        padding-right: var(--products-mobile-gutter);
    }

    body.lb-platform-web .filter-section,
    .filter-section {
        padding-top: 24px;
        padding-bottom: 18px;
        border-bottom: 0;
    }

    body.lb-platform-web .filter-content,
    body.lb-platform-web .filter-panel,
    body.lb-platform-web .products-grid,
    .filter-content,
    .filter-panel,
    .products-grid {
        width: 100%;
    }

    body.lb-platform-web .filter-panel,
    .filter-panel {
        padding: 14px 16px;
    }

    body.lb-platform-web .container,
    .container {
        padding-top: 18px;
        padding-bottom: 36px;
    }

    body.lb-platform-web .products-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    body.lb-platform-web .product-card,
    .product-card {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    body.lb-platform-web .filter-section.section-default,
    body.lb-platform-web .container.section-default,
    .filter-section.section-default,
    .container.section-default {
        padding-left: 18px;
        padding-right: 18px;
    }

    body.lb-platform-web .products-grid,
    .products-grid {
        gap: 18px;
    }
}
