/* Phone Post Detail Page Styles */

/* Detail Page Layout (tips.detail.html 스타일 참고) */
.fpd-detail-page {
  max-width: 768px;
  margin: 0 auto;
  padding: 40px 20px 10px;
}

.fpd-detail-breadcrumb {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fpd-detail-breadcrumb-left {
  display: flex;
  align-items: center;
}

.fpd-detail-back-btn svg {
  width: 24px;
  height: 24px;
  color: var(--f-black);
}

.fpd-detail-breadcrumb-right {
  position: relative;
  display: flex;
  align-items: center;
}

.fpd-detail-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--f-black);
  cursor: pointer;
  transition: background-color 0.2s;
}


.fpd-detail-menu-toggle svg {
  width: 24px;
  height: 24px;
}

.fpd-detail-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 100;
  overflow: hidden;
}

.fpd-detail-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  background: transparent;
  border: none;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.fpd-detail-menu-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

.fpd-detail-menu-item span {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.fpd-detail-menu-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.fpd-detail-card {
  background: #fff;
  overflow: hidden;
  margin-bottom: 60px;
}

.fpd-detail-header {
  margin-bottom: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  position: relative;
}

.fpd-detail-header-content {
  flex: 1;
  min-width: 0;
}

.fpd-detail-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  letter-spacing: -1.2px;
  line-height: 1.25;
  margin: 0 0 8px 0;
}

.fpd-detail-title .fpl-item-prefix {
  font-size: 24px;
  color: var(--f-gray);
  font-weight: 500;
}

.fpd-detail-author {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  /* 그룹 간 간격 */
}

.fpd-detail-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fpd-detail-author-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fpd-detail-grade-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.fpd-detail-company-name {
  font-size: 14px;
}

.fpd-detail-no-addservice-icon,
.fpd-detail-verified-icon {
  width: 60px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.fpd-detail-price-plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--f-brand, #462cc5);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.fpd-detail-info {
  font-size: 13px;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fpd-detail-media {
  margin-bottom: 24px;
}

.fpd-detail-main-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #eef1f4;
  background: #fff;
  display: block;
}

.fpd-detail-gallery {
  margin-bottom: 24px;
}

.fpd-detail-gallery-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0 0 16px 0;
  letter-spacing: -0.6px;
}

.fpd-detail-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.fpd-detail-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.fpd-detail-gallery-item:hover {
  transform: translateY(-1px);
}

.fpd-detail-gallery-link {
  display: block;
  text-decoration: none;
}

.fpd-detail-gallery-image {
  width: 100%;
  height: auto;
  display: block;
}

.fpd-detail-content {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  word-break: break-word;
  margin-bottom: 24px;
}

.fpd-detail-content img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;  
}

.fpd-detail-content .article-caption {
  font-size: 12px;
  color: var(--f-gray);
  text-align: center;  
  line-height: 0;
}

.fpd-detail-content strong {
  font-size: 16px;
}

.fpd-detail-section {
  margin-bottom: 42px;
  padding: 0;

}

.fpd-detail-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
  letter-spacing: -0.6px;
  padding: 16px 0;
}

.fpd-detail-section-content {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  word-break: break-all;
}

/* 아코디언 스타일 */
.fpd-detail-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
}


.fpd-detail-accordion-header .fpd-detail-section-title {
  flex: 1;
  margin: 0;
}

.fpd-detail-accordion-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.fpd-detail-accordion.active .fpd-detail-accordion-icon {
  transform: rotate(180deg);
}

.fpd-detail-accordion-content {
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
  animation: slideDown 0.3s ease;
}

.fpd-detail-accordion-content .fpd-detail-section-content {
  margin-top: 0;
}

/* 사전승낙서 섹션 */
.fpd-detail-approval-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
  align-items: flex-start;
}

.fpd-detail-approval-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
  width: 60px;
}

.fpd-detail-approval-badge:hover {
  opacity: 0.8;
}

.fpd-detail-approval-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.fpd-detail-approval-text {
  display: inline-block;
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.fpd-detail-accordion-content .fpd-detail-section-content:not(:last-child) {
  margin-bottom: 16px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.fpd-detail-back-section {
  text-align: center;
  margin-bottom: 24px;
}

.fpd-detail-back-section .fpd-detail-back-btn:hover {
  background: #e8e8e8;
}

.breadcrumb-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.breadcrumb-back {
  flex-shrink: 0;
}

.breadcrumb-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #333;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  background: #fff;
  transition: background 0.2s ease;
}


.breadcrumb-product-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.breadcrumb-product-name-line1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.breadcrumb-product-name-line1 .breadcrumb-icon {
  width: 16px;
  height: 16px;
  color: var(--f-brand-2, #7d65f2);
  flex-shrink: 0;
}

.breadcrumb-product-name-line1 .breadcrumb-grade-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.breadcrumb-product-name-line1 .breadcrumb-company {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.breadcrumb-product-name-line2 {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-product-name-line2 .breadcrumb-time,
.breadcrumb-product-name-line2 .breadcrumb-hits {
  font-size: 12px;
}

.breadcrumb-product-name-line2 .breadcrumb-sep {
  margin: 0 4px;
  color: #999;
}

.breadcrumb-product-name-line2 img {
  width: 60px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.breadcrumb-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-top: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-actions {
  flex-shrink: 0;
  position: relative;
}

.breadcrumb-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #333;
  border: none;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.breadcrumb-menu-toggle:hover {
  background: #f5f5f5;
}

.breadcrumb-menu-toggle i {
  font-size: 18px;
}

.breadcrumb-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}

.breadcrumb-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #333;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.breadcrumb-menu-item:hover {
  background: #f5f5f5;
}

.breadcrumb-menu-item i {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

/* 하단 고정 바로 문의하기 버튼 */
.fpd-consult-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  padding: 40px 0;
  z-index: 5;
  max-width: 728px;
  margin: 0 auto;
}

.fpd-consult-btn {
  width: 100%;
  background-color: var(--f-kakao-bg-color);
  color: var(--f-kakao-font-color);
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fpd-consult-btn img {
  width: 18px;
  height: 18px;
}

.fpd-consult-btn:hover {
  background-color: var(--f-kakao-bg-hover);
}

.fpd-page {
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .breadcrumb-container {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    padding: 10px 0;
  }

  .breadcrumb-product-name-line1 {
    font-size: 13px;
  }

  .breadcrumb-product-name-line2 {
    font-size: 11px;
  }

  .breadcrumb-title {
    font-size: 14px;
    margin-top: 0;
  }

  .fpd-consult-bar {
    padding: 0;
  }

  .fpd-consult-btn {
    padding: 20px 0;
    font-size: 16px;
    border-radius: 0;
  }

  .fpd-page {
    padding-bottom: 90px;
  }
}


/* 부가서비스 스타일 */
.fpd-detail-addservices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fpd-detail-addservice-item {
  display: flex;
  padding: 14px;
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 12px;
}

.fpd-detail-addservice-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.fpd-detail-provider-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.fpd-detail-addservice-name {
  font-size: 14px;
  color: #333;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.fpd-detail-addservice-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--f-brand, #462cc5);
  flex-shrink: 0;
  white-space: nowrap;
}

/* 테이블 스타일 (wiki.css 참조) */
.fpd-detail-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.fpd-detail-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.fpd-detail-table thead {
  border: 1px solid #e9ecef;
}

.fpd-detail-table tr {
  font-size: 14px;
  color: #33333380;
  text-align: center;
}

.fpd-detail-table th {
  padding: 12px 8px;
  background: #f6f5ff;
  border: 1px solid #e9ecef;
  font-weight: 700;
  color: #33333380;
  font-size: 14px;
}

.fpd-detail-table td {
  background: #fff;
  border: 1px solid #e9ecef;
  font-size: 14px;
  color: #333;
  padding: 10px;
}

.fpd-detail-table-provider {
  width: 60px;
  text-align: center;
}

.fpd-detail-table-provider .fpd-detail-provider-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.fpd-detail-table-price {
  font-weight: 500;
  color: var(--f-brand, #462cc5);
  white-space: nowrap;
}

/* 아코디언 미리보기 스타일 (3줄 + 강한 페이드 효과) */
.fpd-detail-accordion-content {
  position: relative;
  padding: 24px 32px;
  border-radius: 12px;
  background: #f8f9fa;
  animation: slideDown 0.3s ease;
}

.fpd-detail-accordion:not(.active) .fpd-detail-accordion-content {
  display: block !important;
  max-height: 120px;
  overflow: hidden;
}

.fpd-detail-accordion:not(.active) .fpd-detail-accordion-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      rgba(248, 249, 250, 0) 0%,
      rgba(248, 249, 250, 0) 20%,
      rgba(248, 249, 250, 0.3) 40%,
      rgba(248, 249, 250, 0.6) 60%,
      rgba(248, 249, 250, 0.85) 80%,
      rgba(248, 249, 250, 1) 100%);
  pointer-events: none;
}

.fpd-detail-accordion.active .fpd-detail-accordion-content {
  max-height: none;
  overflow: visible;
}

.fpd-detail-accordion.active .fpd-detail-accordion-content::after {
  display: none;
}

.fpd-detail-approval-section-mobile {
  display: none;
}


@media (max-width: 768px) {
  .fpd-detail-page {
    padding: 20px 16px 10px;
  }

  .fpd-detail-title .fpl-item-prefix,
  .fpd-detail-title {
    font-size: 18px;
    letter-spacing: -0.6px;
  }

  .fpd-detail-grade-icon {
    width: 20px;
    height: 20px;
  }

  .fpd-detail-verified-icon {
    width: 50px;
  }

  .fpd-detail-addservice-item {
    padding: 12px;
  }

  .fpd-detail-provider-logo {
    width: 20px;
    height: 20px;
  }

  .fpd-detail-addservice-name {
    font-size: 13px;
  }

  .fpd-detail-addservice-price {
    font-size: 13px;
  }

  .fpd-detail-addservice-content {
    gap: 8px;
  }

  .fpd-detail-page {
    padding-bottom: 40px;
  }

  .fpd-detail-card {
    margin-bottom: 0;
  }

  .fpd-detail-section-title {
    font-size: 16px;
  }

  .fpd-detail-table th,
  .fpd-detail-table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .fpd-detail-table-provider {
    width: 50px;
  }

  .fpd-detail-table-provider .fpd-detail-provider-logo {
    width: 20px;
    height: 20px;
  }

  /* 모바일: 데스크탑 approval-badges 숨기기 */
  .fpd-detail-approval-badges-desktop {
    display: none;
  }

  /* 모바일: 모바일 approval-section 표시 */
  .fpd-detail-approval-section-mobile {
    display: block;
  }
}