/* ==========================================================================
   SKINORIVA — EDITORIAL ARTICLE & DETAIL LAYOUT STYLESHEET
   70/30 Editorial Layout, Product Blocks, Ad Placements, Table Styles
   ========================================================================== */

/* Reading Progress Indicator */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--cat-accent, var(--color-primary));
  width: 0%;
  z-index: 2100;
  transition: width 0.1s linear;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li::after {
  content: '/';
  color: var(--color-border);
}

.breadcrumbs li:last-child::after {
  display: none;
}

.breadcrumbs a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

.article-header {
  padding: var(--space-xl) 0 var(--space-md);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-xl);
}

/* Article Featured Hero Image */
.article-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-lg) 0 var(--space-xs);
  background: #F3ECE5;
  box-shadow: var(--shadow-card);
  position: relative;
}

.article-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.article-hero-caption {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-2xl);
  font-style: italic;
  text-align: right;
}

/* In-Content Visual Break Figures */
.content-figure {
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #F7F3EF;
  border: 1px solid var(--color-border-subtle);
}

.content-figure-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.content-figure-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.content-figure figcaption {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  background: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border-subtle);
  line-height: 1.5;
}

.article-header-inner {
  max-width: 860px;
}

.article-title {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin: var(--space-sm) 0 var(--space-md);
}

.article-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  font-size: 0.825rem;
  color: var(--color-text-muted);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-subtle);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
}

/* Editorial Layout Grid (70% content / 30% sidebar) */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-3xl);
  align-items: start;
}

.article-main {
  min-width: 0;
}

/* Article Typography & Formatting */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #2D2A28;
}

.article-body h2 {
  margin-top: 2.75rem;
  margin-bottom: 1.1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
  position: relative;
}

.article-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* Quick Answer / Takeaway Box */
.takeaway-box {
  background: var(--cat-bg, var(--color-surface-subtle));
  border-left: 4px solid var(--cat-accent, var(--color-primary));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-subtle);
}

.takeaway-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.takeaway-header svg {
  width: 18px;
  height: 18px;
  color: var(--cat-accent, var(--color-primary));
}

.takeaway-box p:last-child {
  margin-bottom: 0;
}

/* Callout Note / Caution Boxes */
.callout-box {
  background: #FFFDF9;
  border: 1px solid #EFE4D6;
  border-left: 4px solid #D4A373;
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout-box.caution {
  background: #FDF7F7;
  border-color: #F3D9D9;
  border-left-color: #D88A8A;
}

.callout-title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   PRODUCT RECOMMENDATION BLOCKS
   ========================================================================== */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color var(--transition-fast);
}

.product-card:hover {
  border-color: var(--color-primary);
}

.product-card-top {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.product-media {
  width: 120px;
  min-width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #FAF8F5;
  border: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.product-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.product-header-info {
  flex: 1;
}

@media (max-width: 600px) {
  .product-card-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.product-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  gap: var(--space-xs);
}

.product-order-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.product-name {
  font-size: 1.45rem;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}

.product-type {
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.product-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
  background: var(--color-surface-subtle);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.detail-item {
  font-size: 0.85rem;
}

.detail-label {
  font-weight: 600;
  color: var(--color-text);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.detail-value {
  color: var(--color-text-muted);
}

.product-description {
  font-size: 0.95rem;
  color: #3B3836;
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.product-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-subtle);
}

.product-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #232120;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.product-cta-btn:hover {
  background: var(--color-primary-dark);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.product-cta-disclosure {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: var(--space-xl) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
}

.editorial-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.editorial-table th {
  background: var(--color-surface-subtle);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.editorial-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  color: #4A4643;
}

.editorial-table tr:last-child td {
  border-bottom: none;
}

.editorial-table tr:hover td {
  background: rgba(250, 248, 245, 0.6);
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-section {
  margin: var(--space-3xl) 0 var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.faq-title {
  margin-bottom: var(--space-lg);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--color-primary);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  background: none;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--color-primary);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.4rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   AFFILIATE DISCLOSURE CALLOUT
   ========================================================================== */
.affiliate-callout {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-2xl) 0;
  font-size: 0.825rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.affiliate-callout strong {
  color: var(--color-text);
}

/* ==========================================================================
   ADSTERRA AD PLACEHOLDERS (Zero CLS & Collapsible)
   ========================================================================== */
.ad-slot {
  margin: var(--space-xl) auto;
  text-align: center;
  position: relative;
  background: var(--color-surface-subtle);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: height var(--transition-fast);
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin-bottom: 0.35rem;
}

.ad-top-banner {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
}

.ad-native {
  width: 100%;
  min-height: 120px;
}

.ad-sidebar {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
}

.ad-end-article {
  width: 100%;
  min-height: 90px;
}

.ad-slot.collapsed {
  display: none !important;
}

/* ==========================================================================
   SIDEBAR COMPONENTS
   ========================================================================== */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-subtle);
}

.sidebar-title {
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-subtle);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.toc-list a {
  color: var(--color-text-muted);
  display: block;
  line-height: 1.4;
  padding: 0.2rem 0;
}

.toc-list a:hover {
  color: var(--color-primary-dark);
}

.sidebar-article-item {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  align-items: center;
}

.sidebar-article-thumb {
  width: 65px;
  height: 65px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-subtle);
}

.sidebar-article-title {
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--color-text);
}

.sidebar-article-title:hover {
  color: var(--color-primary-dark);
}

/* ==========================================================================
   ARTICLE VISUAL MEDIA & PRODUCT ENHANCEMENTS
   ========================================================================== */

/* Article Hero Media */
.article-hero-media {
  width: 100%;
  max-width: 960px;
  margin: var(--space-md) auto var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
}

.article-hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-hero-caption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 0.6rem 1rem;
  background: var(--color-surface-subtle);
  text-align: center;
  font-style: italic;
  border-top: 1px solid var(--color-border-subtle);
}

/* In-Content Editorial Figures */
.content-figure {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.content-figure-media {
  width: 100%;
  overflow: hidden;
  background: var(--color-surface-subtle);
}

.content-figure-media img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.content-figure-caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 0.75rem 1.25rem;
  background: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border-subtle);
  font-style: italic;
  line-height: 1.45;
}

/* Product Card Media Upgrades */
.product-card-top {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.product-media {
  width: 130px;
  min-width: 130px;
  height: 130px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.product-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.product-header-info {
  flex: 1;
  min-width: 0;
}

.product-header-info .product-badge-row {
  margin-bottom: 0.4rem;
}

.product-header-info .product-name {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.product-header-info .product-type {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .product-card-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .product-media {
    width: 140px;
    height: 140px;
  }
  .product-header-info .product-badge-row {
    justify-content: center;
  }
}
