/* ===== 서브페이지 공통 ===== */
.page-title-section {
    padding: 50px 0;
    text-align: center;
}

.page-title-inner h2 {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
    color: #ff6e0e;
}

.breadcrumb .current {
    color: #ff6e0e;
}

.sub-content {
    padding: 50px 0 80px;
}

.sub-section-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1a1a1a;
}

.sub-section-title i {
    color: #ff6e0e;
    margin-right: 8px;
}

/* ===== 시세 탭 ===== */
.price-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 40px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 0;
}

.price-tab-link {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.price-tab-link.active {
    color: #ff6e0e;
    border-bottom-color: #ff6e0e;
}

.price-tab-link:hover {
    color: #ff6e0e;
}

/* ===== 시세 상세 테이블 ===== */
.price-detail-section {
    margin-bottom: 50px;
}

.price-update-time {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

.price-detail-table-wrap {
    overflow-x: auto;
}

.price-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.price-detail-table thead th {
    background: #1a1a1a;
    color: #fff;
    padding: 14px 12px;
    font-weight: 600;
    text-align: center;
    font-size: 13px;
}

.price-detail-table tbody td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    font-weight: 600;
}

.price-detail-table tbody tr:hover {
    background: #fdf9f5;
}

/* ===== 차트 컨트롤 ===== */
.chart-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-type-btns {
    display: flex;
    gap: 5px;
}

.chart-type-btn {
    padding: 8px 20px;
    border: 2px solid #e5e5e5;
    background: #fff;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
}

.chart-type-btn.active {
    border-color: #ff6e0e;
    color: #ff6e0e;
    background: #fff5ef;
}

.chart-period-btns {
    display: flex;
    gap: 5px;
}

/* ===== 히스토리 테이블 ===== */
.history-controls {
    margin-bottom: 20px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input {
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Noto Sans KR', sans-serif;
    outline: none;
}

.date-input:focus {
    border-color: #ff6e0e;
}

.search-date-btn {
    padding: 8px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}

.search-date-btn:hover {
    background: #ff6e0e;
}

.history-table-wrap {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table thead th {
    background: #f7f7f7;
    padding: 12px 10px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    text-align: center;
}

.history-table tbody td {
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Roboto', sans-serif;
}

.history-table tbody tr:hover {
    background: #fdf9f5;
}

/* ===== 페이지네이션 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: #ff6e0e;
    color: #ff6e0e;
}

.pagination .active {
    background: #ff6e0e;
    color: #fff;
    border-color: #ff6e0e;
}

/* ===== 상품 리스트 (서브페이지) ===== */
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.product-count {
    font-size: 14px;
    color: #666;
}

.product-count strong {
    color: #ff6e0e;
}

.product-sort {
    display: flex;
    gap: 5px;
}

.sort-btn {
    padding: 6px 14px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #666;
    font-size: 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}

.sort-btn:hover {
    border-color: #ff6e0e;
    color: #ff6e0e;
}

.sort-btn.active {
    border-color: #ff6e0e;
    color: #fff;
    background: #ff6e0e;
    font-weight: 500;
}

.product-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    transition: opacity 0.25s ease;
}

/* ===== 가맹점 찾기 ===== */
.franchise-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.franchise-tab {
    padding: 8px 18px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
}

.franchise-tab.active {
    background: #ff6e0e;
    color: #fff;
    border-color: #ff6e0e;
}

.franchise-table-wrap {
    overflow-x: auto;
}

.franchise-table {
    width: 100%;
    border-collapse: collapse;
}

.franchise-table thead th {
    background: #1a1a1a;
    color: #fff;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.franchise-table tbody td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.franchise-table tbody tr:hover {
    background: #fdf9f5;
}

.franchise-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 600;
}

.badge-yes {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-no {
    background: #f5f5f5;
    color: #999;
}

/* ===== 뉴스 리스트 ===== */
.news-list-table {
    width: 100%;
    border-collapse: collapse;
}

.news-list-table thead th {
    background: #f7f7f7;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e5e5e5;
    text-align: center;
}

.news-list-table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    text-align: center;
}

.news-list-table tbody td.news-title-cell {
    text-align: left;
}

.news-list-table tbody td.news-title-cell a {
    color: #333;
    font-weight: 500;
}

.news-list-table tbody td.news-title-cell a:hover {
    color: #ff6e0e;
}

.news-list-table tbody tr:hover {
    background: #fdf9f5;
}

/* ===== 회사소개 ===== */
.company-hero {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, #f5e6c8 0%, #fdf3e0 100%);
    border-radius: 16px;
    margin-bottom: 50px;
}

.company-hero h3 {
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.company-hero p {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.company-values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.value-card {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #ff6e0e, #ff9a44);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.value-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.value-card p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

.company-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.company-info-card {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 16px;
}

.company-info-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6e0e;
}

.company-info-card table {
    width: 100%;
}

.company-info-card table td {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.company-info-card table td:first-child {
    font-weight: 600;
    color: #333;
    width: 120px;
}

/* ===== 다이아몬드 ===== */
.diamond-table {
    width: 100%;
    border-collapse: collapse;
}

.diamond-table thead th {
    background: #1a1a1a;
    color: #fff;
    padding: 14px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.diamond-table tbody td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
}

.diamond-table tbody tr:hover {
    background: #fdf9f5;
}

.sold-out {
    color: #e53935;
    font-weight: 700;
}

.available {
    color: #2e7d32;
    font-weight: 700;
}

.diamond-process {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.process-card {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 16px;
}

.process-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #fff;
    border-radius: 10px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: #ff6e0e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: #333;
}

/* ===== 상품 리스트 이미지 (서브) ===== */
.product-list-grid .product-card .product-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-list-grid .product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.4s ease;
}

.product-list-grid .product-card:hover .product-img img {
    transform: scale(1.05);
}

/* ===== 인증/마이페이지 폼 ===== */
.auth-wrap {
    max-width: 460px;
    margin: 50px auto 80px;
    padding: 40px 36px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.auth-wrap h3 {
    text-align: center;
    margin: 0 0 30px;
    font-size: 22px;
    color: #222;
}
.form-row { margin-bottom: 16px; }
.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: #ff6e0e;
}
.form-help {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 13px;
    background: #ff6e0e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: 'Noto Sans KR', sans-serif;
}
.btn-primary:hover { background: #e85a00; }
.btn-secondary {
    display: inline-block;
    padding: 9px 18px;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.15s;
}
.btn-secondary:hover { border-color: #ff6e0e; color: #ff6e0e; }
.btn-danger {
    padding: 7px 14px;
    background: #fff;
    color: #d33;
    border: 1px solid #d33;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
}
.btn-danger:hover { background: #d33; color: #fff; }
.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    font-family: 'Noto Sans KR', sans-serif;
}
.btn-small:hover { border-color: #ff6e0e; color: #ff6e0e; }
.auth-foot {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: #777;
}
.auth-foot a { color: #ff6e0e; font-weight: 500; }
.form-error {
    background: #fff5f5;
    border: 1px solid #ffd5d5;
    color: #c33;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.form-success {
    background: #f0f9ff;
    border: 1px solid #b8e0ff;
    color: #0c63d4;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.top-right .welcome {
    color: #ff6e0e;
    font-weight: 500;
    margin-right: 8px;
}

/* 마이페이지 */
.mypage-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin: 40px 0 80px;
}
.mypage-side {
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    padding: 24px 0;
}
.mypage-side .user-box {
    padding: 0 22px 18px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.mypage-side .user-box .nm { font-weight: 700; font-size: 16px; color: #222; }
.mypage-side .user-box .em { font-size: 12px; color: #888; margin-top: 4px; }
.mypage-side .user-box .pt {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff5ee;
    border-radius: 4px;
    text-align: center;
    color: #ff6e0e;
    font-weight: 600;
    font-size: 15px;
}
.mypage-nav a {
    display: block;
    padding: 11px 22px;
    color: #555;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.mypage-nav a:hover { background: #fafafa; color: #ff6e0e; }
.mypage-nav a.active {
    color: #ff6e0e;
    background: #fff8f3;
    border-left-color: #ff6e0e;
    font-weight: 500;
}
.mypage-panel {
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    padding: 30px 32px;
}
.mypage-panel h3 { margin: 0 0 24px; font-size: 18px; color: #222; }

/* 공통 데이터 테이블 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.data-table thead th {
    background: #fafafa;
    color: #555;
    font-weight: 600;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ddd;
}
.data-table tbody tr:hover { background: #fafafa; }
.empty-row td { padding: 30px; color: #999; text-align: center; }
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.badge-gray { background: #eee; color: #555; }
.badge-orange { background: #fff5ee; color: #ff6e0e; border:1px solid #ffd9bb;}
.badge-blue { background: #eaf4ff; color: #1571d8; }
.badge-green { background: #eafbe7; color: #2a8a2a; }
.badge-red { background: #fdecec; color: #d33; }

.delta-plus { color: #1571d8; font-weight: 600; }
.delta-minus { color: #d33; font-weight: 600; }

/* ===== 반응형 서브 ===== */
@media (max-width: 768px) {
    .page-title-inner h2 { font-size: 24px; }
    .company-values { grid-template-columns: repeat(2, 1fr); }
    .company-info-grid { grid-template-columns: 1fr; }
    .diamond-process { grid-template-columns: 1fr; }
    .product-list-grid { grid-template-columns: repeat(2, 1fr); }
    .franchise-table thead th,
    .franchise-table tbody td { font-size: 11px; padding: 10px 6px; }
    .price-tabs { overflow-x: auto; }
    .price-tab-link { white-space: nowrap; padding: 10px 18px; font-size: 13px; }
    .mypage-grid { grid-template-columns: 1fr; }
    .auth-wrap { margin: 30px 15px; padding: 30px 20px; }
}

@media (max-width: 480px) {
    .product-list-grid { grid-template-columns: 1fr; }
    .company-values { grid-template-columns: 1fr; }
}
