/* 패키지 카테고리 상세 페이지 전용 CSS - v1.0.15 */

.pkg-cat-section {
    padding: 72px 0 96px;
    background: linear-gradient(165deg, #f8f9fc 0%, #f0f2f7 40%, #fafbff 100%);
    min-height: 70vh;
}

.pkg-cat-section .container {
    max-width: 1280px;
}

/* 상단: 카테고리명만 */
.pkg-cat-header {
    text-align: center;
    margin-bottom: 48px;
}

.pkg-cat-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: #1a1d2e;
    margin: 0;
    letter-spacing: -0.02em;
}

/* 블록 공통 */
.pkg-cat-block {
    margin-bottom: 56px;
}

.pkg-cat-block-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1d2e;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eaed;
}

/* 단일 그리드 - 그룹명·제품이 한 줄에 6개씩 연속 배치 (행 높이 = 해당 행 최대 콘텐츠, 셀 세로 맞춤) */
.pkg-cat-module-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .pkg-cat-module-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 992px) {
    .pkg-cat-module-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .pkg-cat-module-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .pkg-cat-module-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 그룹 헤더 - 카드와 같은 그리드 행에서 세로로 꽉 채움 (가변 높이 행과 정렬 맞춤) */
.pkg-cat-group-header {
    height: 100%;
    min-height: 0;
    background: #fff9e6;
    color: #1a1d2e;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 14px;
    border: 1px solid #d4d8de;
    border-radius: 12px;
    box-sizing: border-box;
}

/* 옵션 추천: 동일 그리드(.pkg-cat-module-grid) 내 그룹 헤더 셀 — 일반 분류 노랑 톤과 구분 */
.pkg-cat-option-rec-header {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 45%, #e9d5ff 100%);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    border-color: #7dd3fc;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.1);
}

.pkg-cat-option-rec-card {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #fafdff 0%, #fff 55%);
}

.pkg-cat-option-rec-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

/* 제품 카드 - 그리드 셀 높이 100% 채움, 하단 메타 고정·이미지 영역이 남는 높이 사용 */
.pkg-cat-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #fff;
    border: 1px solid #d4d8de;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.pkg-cat-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #c5cae9;
}

.pkg-cat-product-img-wrap {
    flex: 1 1 auto;
    width: 100%;
    min-height: 76px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pkg-cat-product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pkg-cat-product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b5c0;
    font-size: 32px;
}

.pkg-cat-product-detail {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 10px 10px 11px;
    flex: 0 0 auto;
    border-top: 1px solid #e8eaed;
    background: #f8f9fb;
}

.pkg-cat-product-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pkg-cat-product-name {
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 0;
    margin: 0;
    color: #1a1d2e;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.pkg-cat-product-subtitle {
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
}

.pkg-cat-product-subtitle:empty {
    display: none;
}

.pkg-cat-product-qty-cell {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.75rem;
    padding: 5px 9px;
    background: #fff;
    border: 1px solid #d8def0;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.pkg-cat-product-qty {
    font-size: 12px;
    font-weight: 700;
    color: #3949ab;
    text-align: right;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

@media (max-width: 480px) {
    .pkg-cat-product-detail {
        padding: 8px 8px 9px;
        gap: 8px;
    }

    .pkg-cat-product-name {
        font-size: 12px;
    }

    .pkg-cat-product-subtitle {
        font-size: 10px;
    }

    .pkg-cat-product-qty {
        font-size: 11px;
    }
}

/* 빈 상태 */
.pkg-cat-empty {
    padding: 48px 24px !important;
}

/* 푸터 안내 문구 */
.pkg-cat-footer-note {
    font-size: 13px;
    color: #6b7280;
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e8eaed;
}

/* 조감도 섹션 */
.pkg-cat-perspective-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 576px) {
    .pkg-cat-perspective-grid {
        grid-template-columns: 1fr;
    }
}

.pkg-cat-perspective-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #e0e3e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pkg-cat-perspective-thumb:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: #c5cae9;
}

.pkg-cat-perspective-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

/* 라이트박스 */
.pkg-cat-lightbox .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

.pkg-cat-lightbox .carousel-inner img {
    max-height: 75vh;
    object-fit: contain;
}

.pkg-cat-lightbox .carousel-control-prev,
.pkg-cat-lightbox .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    opacity: 0.9;
}

.pkg-cat-lightbox .carousel-control-prev { left: 16px; }
.pkg-cat-lightbox .carousel-control-next { right: 16px; }

.pkg-cat-lightbox .carousel-indicators {
    bottom: 12px;
}

.pkg-cat-back-wrap {
    text-align: center;
}

/* 패키지 구성 - 세로형 카드 4열 */
.pkg-cat-config-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .pkg-cat-config-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .pkg-cat-config-grid { grid-template-columns: 1fr; }
}

.pkg-cat-config-card {
    background: #fff;
    border: 1px solid #e0e3e8;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pkg-cat-config-header {
    width: calc(100% + 48px);
    margin: -24px -24px 16px -24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-bottom: 2px solid #f0e6c8;
    border-radius: 12px 12px 0 0;
}

.pkg-cat-config-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1d2e;
    margin-bottom: 4px;
}

.pkg-cat-config-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.pkg-cat-config-divider {
    width: 100%;
    height: 1px;
    background: #e8eaed;
    margin: 12px 0;
}

.pkg-cat-config-row {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pkg-cat-config-row.pkg-cat-config-row-desc .pkg-cat-config-value {
    text-align: center;
    white-space: pre-line;
}

.pkg-cat-config-label {
    font-size: 12px;
    color: #6b7280;
}

.pkg-cat-config-value {
    font-size: 14px;
    color: #1a1d2e;
    line-height: 1.5;
}

.pkg-cat-config-value-html {
    text-align: center;
}
.pkg-cat-config-value-html a {
    color: #0058a3;
}

.pkg-cat-config-pricing {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pkg-cat-config-price-block {
    text-align: center;
}

.pkg-cat-config-price-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.pkg-cat-config-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1d2e;
}

.pkg-cat-config-price-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.pkg-cat-config-btn {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #5c6bc0 0%, #7986cb 100%);
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.pkg-cat-config-btn:hover {
    color: #fff;
    opacity: 0.95;
    box-shadow: 0 4px 16px rgba(92, 107, 192, 0.4);
}

/* 동일한 할인률로 추가 가능한 상품 - 공통 섹션 (카드마다 동일, 구분된 디자인) */
.pkg-cat-config-add-products {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fc 100%);
    border: 1px solid #e0e6f5;
    border-radius: 10px;
    text-align: left;
}

.pkg-cat-config-add-label {
    font-size: 12px;
    color: #5c6bc0;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pkg-cat-config-add-label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: linear-gradient(180deg, #5c6bc0, #7986cb);
    border-radius: 2px;
}

/* 패키지 구성 카드 내 옵션 상품: 제품 그리드 카드와 동일 정보, 1행 1개 세로 목록 */
.pkg-cat-option-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pkg-cat-option-line {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    background: #fff;
    border: 1px solid #d4d8de;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.pkg-cat-option-line:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    border-color: #c5cae9;
}

.pkg-cat-option-line-img {
    flex: 0 0 auto;
    width: clamp(76px, 22vw, 104px);
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #e8eaed;
}

.pkg-cat-option-line-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pkg-cat-option-line-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b5c0;
    font-size: 28px;
}

.pkg-cat-option-line-detail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px 10px 10px;
    background: #f8f9fb;
}

.pkg-cat-option-line-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.pkg-cat-option-line-name {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: #1a1d2e;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.pkg-cat-option-line-subtitle {
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.pkg-cat-option-line-subtitle:empty {
    display: none;
}

.pkg-cat-option-line-qty-cell {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.75rem;
    padding: 5px 9px;
    background: #fff;
    border: 1px solid #d8def0;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.pkg-cat-option-line-qty {
    font-size: 12px;
    font-weight: 700;
    color: #3949ab;
    text-align: right;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

@media (max-width: 480px) {
    .pkg-cat-option-line-detail {
        padding: 8px 10px 8px 8px;
        gap: 8px;
    }

    .pkg-cat-option-line-name {
        font-size: 12px;
    }

    .pkg-cat-option-line-subtitle {
        font-size: 10px;
    }

    .pkg-cat-option-line-qty {
        font-size: 11px;
    }
}

.pkg-cat-config-add-empty {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    font-style: italic;
}

/* 패키지 구성: 일시납 안내 (제목 하단) */
.pkg-cat-payment-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 0 0 28px;
    padding: 18px 20px 18px 18px;
    background: linear-gradient(135deg, #e8f0fe 0%, #f5f7ff 50%, #fef9f0 100%);
    border: 1px solid #c5d4f0;
    border-left: 4px solid #3949ab;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(57, 73, 171, 0.08);
}

.pkg-cat-payment-notice-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #3949ab, #5c6bc0);
    color: #fff;
    font-size: 1.25rem;
}

.pkg-cat-payment-notice-body {
    min-width: 0;
    flex: 1;
}

.pkg-cat-payment-notice-lead {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1d2e;
    line-height: 1.55;
    letter-spacing: -0.02em;
}

.pkg-cat-payment-em {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: #1a1d2e;
}

.pkg-cat-payment-notice-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pkg-cat-payment-notice-list li {
    position: relative;
    padding-left: 0;
    margin-bottom: 8px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #283593;
    line-height: 1.5;
}

.pkg-cat-payment-notice-list li:last-child {
    margin-bottom: 0;
}

.pkg-cat-payment-notice-mark {
    color: #c62828;
    font-weight: 800;
    margin-right: 4px;
}

@media (max-width: 576px) {
    .pkg-cat-payment-notice {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .pkg-cat-payment-notice-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .pkg-cat-payment-notice-lead {
        font-size: 1rem;
    }

    .pkg-cat-payment-notice-list li {
        font-size: 0.9375rem;
    }
}
