/* ==========================================================================
   Blog reading + editor experience
   Arch Design by B — editorial, readable, image-friendly
   ========================================================================== */

.blog-page {
  --blog-paper: #f7f3f1;
  --blog-card: #ffffff;
  --blog-ink: #1d1d1b;
  --blog-muted: #6f6a67;
  --blog-line: rgba(29, 29, 27, 0.08);
  --blog-rose: #c8a5ad;
  --blog-rose-deep: #b8919a;
  --blog-shadow: 0 18px 50px rgba(29, 29, 27, 0.06);
}

.blog-page .main-content {
  background:
    radial-gradient(circle at top left, rgba(200, 165, 173, 0.12), transparent 28%),
    var(--blog-paper);
}

.blog-toolbar {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--blog-ink);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(29, 29, 27, 0.06);
  text-decoration: none;
}

.blog-back-link:hover {
  background: var(--blog-ink);
  color: #fff;
}

.read-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 2.5rem;
  max-width: 1180px;
  margin: 0 auto 3rem;
  background: transparent;
  border-radius: 0;
  padding: 0;
  align-items: start;
}

.read-left,
.read-right {
  min-height: 0;
  height: auto;
}

.read-left {
  flex: unset;
  align-items: stretch;
  border-right: 0;
  padding-right: 0;
  background: var(--blog-card);
  border-radius: 28px;
  box-shadow: var(--blog-shadow);
  padding: 2.5rem 2.75rem 3rem;
}

.read-right {
  flex: unset;
  padding-left: 0;
  overflow: visible;
  background: var(--blog-card);
  border-radius: 28px;
  box-shadow: var(--blog-shadow);
  padding: 1.75rem 1.5rem 2rem;
  position: sticky;
  top: 6.5rem;
}

.blog-article-header {
  margin-bottom: 1.75rem;
}

.blog-article-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(200, 165, 173, 0.16);
  color: #7a5960;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-chip-style {
  background: #1d1d1b;
  color: #fff;
}

#post-title,
.blog-article-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: left;
  margin: 0 0 0.75rem;
  color: var(--blog-ink);
}

.blog-article-date,
#post-content > .text-base.text-accent {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blog-muted);
  margin-bottom: 1.5rem;
}

.blog-moodboard,
#moodboard {
  margin: 0 0 2rem;
}

#moodboard > div,
.moodboard-center,
.moodboard-container {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
}

.moodboard-container {
  padding: 0;
  display: block;
}

.moodboard-wrapper {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
  aspect-ratio: 11 / 17;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(29, 29, 27, 0.1);
}

.moodboard-image,
.moodboard-preview {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(29, 29, 27, 0.1);
}

#post-content,
.blog-article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #2b2927;
  max-width: 40rem;
}

#post-content p,
.blog-article-body p,
#post-content .blog-block {
  margin: 0 0 1.35rem;
  white-space: pre-wrap;
}

#post-content h2,
#post-content h3,
.blog-article-body h2,
.blog-article-body h3 {
  font-family: "Playfair Display", serif;
  color: var(--blog-ink);
  line-height: 1.25;
  margin: 2.25rem 0 0.85rem;
}

#post-content h2 { font-size: 1.7rem; }
#post-content h3 { font-size: 1.35rem; }

#post-content strong { font-weight: 600; }
#post-content em { font-style: italic; }

#post-content a {
  color: #8d6a72;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

#post-content a:hover { color: var(--blog-ink); }

#post-content ul,
#post-content ol {
  margin: 0 0 1.5rem 1.25rem;
}

#post-content li { margin: 0.4rem 0; }

#post-content img,
.blog-figure img,
.blog-pair img,
.wysiwyg-editor img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(29, 29, 27, 0.1);
  margin: 0.35rem 0 0.5rem;
  background: #efeae7;
  object-fit: cover;
}

#post-content img.size-small,
.blog-figure--small img,
.size-small {
  width: min(100%, 30rem);
  max-width: 100%;
  height: auto !important;
}

#post-content img.size-medium,
.blog-figure--medium img,
.size-medium {
  width: min(100%, 32rem);
  max-width: 100%;
  height: auto !important;
}

#post-content img.size-large,
.blog-figure--large img,
.size-large {
  width: 100%;
  max-width: 100%;
  height: auto !important;
}

#post-content img + p,
.blog-figure figcaption {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--blog-muted);
  font-style: italic;
  margin: 0 0 2rem;
}

.blog-figure,
.blog-block,
.blog-pair,
#post-content [data-aos] {
  margin: 0 0 2rem;
}

.blog-pair,
.img-text-row,
#post-content .img-text-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

.blog-pair img,
.img-text-row img {
  margin: 0;
}

.blog-pair-text p,
.img-text-row p {
  margin: 0;
}

.post-meta {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blog-muted);
  text-align: left;
  margin: 2.5rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--blog-line);
}

#about-bea {
  background: var(--blog-paper);
  border-radius: 22px;
  box-shadow: none;
  padding: 2rem 1.5rem;
}

.shop-header {
  margin-bottom: 1.25rem;
}

.shop-title {
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  margin: 0;
}

.read-right .product-list {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.read-right .product-card {
  background: var(--blog-paper);
  border-radius: 16px;
  overflow: hidden;
}

.blog-nav {
  max-width: 1180px;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.blog-nav button {
  min-width: 140px;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--blog-ink);
  box-shadow: 0 8px 24px rgba(29, 29, 27, 0.06);
}

@media (max-width: 900px) {
  .read-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }

  .read-left,
  .read-right {
    padding: 1.5rem 1.15rem 2rem;
    border-radius: 22px;
    position: static;
    max-height: none;
  }

  .blog-pair,
  .img-text-row,
  #post-content .img-text-row,
  #post-content div[style*="display:flex"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left !important;
  }

  #post-content img.size-small,
  #post-content img.size-medium,
  #post-content img.size-large,
  .size-small,
  .size-medium,
  .size-large {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ==========================================================================
   Shared insert-content modal
   ========================================================================== */

.insert-shell,
.tips-shell {
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 24px 70px rgba(29, 29, 27, 0.18);
}

.insert-shell h2,
.tips-shell h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  margin: 0 0 0.35rem;
}

.insert-lead,
.tips-lead {
  color: var(--blog-muted);
  margin-bottom: 1.25rem;
}

.insert-tabs,
.insert-sizes,
.insert-layouts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.insert-tab,
.insert-choice {
  border: 1px solid var(--blog-line);
  background: #faf7f6;
  color: var(--blog-ink);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.insert-tab.active,
.insert-choice.active {
  background: var(--blog-ink);
  color: #fff;
  border-color: var(--blog-ink);
}

.insert-field {
  margin-bottom: 1rem;
}

.insert-field label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.insert-field input,
.insert-field textarea,
.insert-field select {
  width: 100%;
  border: 1px solid #e6dedb;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
}

.insert-preview {
  min-height: 140px;
  border: 1px dashed #d9cfcb;
  border-radius: 16px;
  background: #faf7f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 0.75rem;
}

.insert-preview img {
  max-width: 100%;
  max-height: 260px;
  width: auto;
  height: auto;
  border-radius: 12px;
}

.insert-preview-empty {
  color: var(--blog-muted);
  text-align: center;
  padding: 1.5rem;
}

.insert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.insert-actions button,
.editor-header-nav .btn-primary,
.editor-header-nav .btn-secondary {
  min-height: 44px;
}

.insert-note {
  font-size: 0.9rem;
  color: #7a5960;
  background: rgba(200, 165, 173, 0.14);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.tips-grid {
  display: grid;
  gap: 0.85rem;
}

.tip-card {
  background: #faf7f6;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.tip-card strong { display: block; margin-bottom: 0.25rem; }

.tip-card code {
  display: inline-block;
  margin-top: 0.35rem;
}

/* ==========================================================================
   CSV editor chrome + mobile cards
   ========================================================================== */

.editor-body.blog-editor-body {
  width: 100%;
  min-width: 0;
  padding: 1rem 1rem 3rem;
  background: #f7f3f1;
}

.editor-fixed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
}

.editor-header-title {
  font-family: "Playfair Display", serif;
  font-size: 1.65rem;
  flex: 1 1 auto;
}

.editor-menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #1d1d1b;
  color: #fff;
  font-weight: 700;
}

.editor-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.editor-mobile-list {
  display: none;
  gap: 1rem;
}

.editor-post-card {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(29, 29, 27, 0.06);
}

.editor-post-card.selected {
  outline: 2px solid #c8a5ad;
}

.editor-post-card-top {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: center;
}

.editor-post-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
}

.editor-post-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
}

.editor-post-card-meta {
  color: #6f6a67;
  font-size: 0.85rem;
}

.editor-post-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.editor-post-card-actions a,
.editor-post-card-actions button {
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  text-decoration: none;
}

.editor-card-primary {
  background: #1d1d1b;
  color: #fff;
}

.editor-card-secondary {
  background: #f3eeec;
  color: #1d1d1b;
}

.editor-card-fields {
  display: none;
  margin-top: 0.85rem;
}

.editor-post-card.expanded .editor-card-fields {
  display: grid;
  gap: 0.7rem;
}

.wysiwyg-toolbar {
  position: sticky;
  top: 4.5rem;
  z-index: 5;
}

.wysiwyg-editor {
  min-height: 420px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.wysiwyg-editor img {
  max-width: min(100%, 32rem);
}

@media (max-width: 768px) {
  .editor-menu-toggle { display: inline-flex; align-items: center; }
  .editor-header-nav { display: none; width: 100%; flex-direction: column; }
  .editor-header-nav.open { display: flex; }
  .editor-header-nav .editor-header-btn,
  .editor-header-nav a { width: 100%; text-align: center; }

  .editor-table-scroll { display: none; }
  .editor-mobile-list { display: grid; }

  .pagination-controls,
  .editor-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .insert-shell,
  .tips-shell,
  .modal-content {
    width: 96vw;
    max-height: 94vh;
    padding: 1.1rem;
    margin: 0;
  }

  .wysiwyg-toolbar {
    top: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .toolbar-btn { white-space: nowrap; }
}
