/* =========================================================================
   VC Amazon.com Listing Manager Ver.1
   Style: Clean / Professional / Japanese Creative Brand
   ========================================================================= */

:root {
  /* Color palette --------------------------------------------------------- */
  --bg-app: #f4f2ee;          /* 全体背景：温かみのある薄グレー */
  --bg-sidebar: #ffffff;
  --bg-panel: #ffffff;
  --bg-muted: #faf9f6;
  --bg-inset: #f6f4f0;

  --border: #e7e3db;
  --border-strong: #d9d4c9;

  --text-primary: #2c2a26;
  --text-secondary: #6b665d;
  --text-muted: #9a948a;

  --accent: #9c6f4a;          /* 落ち着いた和のブラウン */
  --accent-soft: #f0e7dd;
  --accent-ink: #7a5638;

  /* Status colors --------------------------------------------------------- */
  --status-draft-bg: #ecebe8;
  --status-draft-fg: #7a756c;
  --status-reviewed-bg: #e6eef2;
  --status-reviewed-fg: #3f6b82;
  --status-ready-bg: #e4f0e6;
  --status-ready-fg: #3a7d4e;
  --status-published-bg: #e9e4f2;
  --status-published-fg: #63508f;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(44, 42, 38, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 42, 38, 0.07);

  --sidebar-w: 320px;

  --font-jp: "Noto Sans JP", sans-serif;
  --font-en: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-en), var(--font-jp);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   Layout
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* =========================================================================
   Sidebar
   ========================================================================= */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar__header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.sidebar__subtitle {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.sidebar__marketplace {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.product-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Product card in list --------------------------------------------------- */
.product-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease, transform 0.05s ease;
  font-family: inherit;
}

.product-item:hover {
  border-color: var(--border-strong);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.product-item:active {
  transform: translateY(1px);
}

.product-item.is-active {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-sm);
}

.product-item__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.product-item__number {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 1px 7px;
  letter-spacing: 0.02em;
}

.product-item__en {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 2px;
}

.product-item__jp {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* =========================================================================
   Status badge
   ========================================================================= */
.status-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}

.status-badge--draft {
  background: var(--status-draft-bg);
  color: var(--status-draft-fg);
}
.status-badge--reviewed {
  background: var(--status-reviewed-bg);
  color: var(--status-reviewed-fg);
}
.status-badge--ready {
  background: var(--status-ready-bg);
  color: var(--status-ready-fg);
}
.status-badge--published {
  background: var(--status-published-bg);
  color: var(--status-published-fg);
}

/* =========================================================================
   Detail area
   ========================================================================= */
.detail {
  overflow-y: auto;
  padding: 32px 40px 80px;
}

.detail__inner {
  max-width: 860px;
  margin: 0 auto;
}

/* Product header --------------------------------------------------------- */
.product-header {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.product-header__image {
  flex: 0 0 200px;
  width: 200px;
  height: 200px; /* 1:1 正方形（画像は object-fit: contain で歪みなく収める） */
  border-radius: var(--radius);
  background: var(--bg-inset);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-header__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 縦横比を崩さない */
}

.product-header__placeholder {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.product-header__info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.product-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.product-header__number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 9px;
}

.product-header__jp {
  font-family: var(--font-jp);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.product-header__en {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.product-header__attrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 18px;
  margin-top: 4px;
}

.product-header__attr {
  font-size: 12px;
  color: var(--text-muted);
}

.product-header__attr b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1px;
}

.product-header__attr span {
  color: var(--text-secondary);
  font-weight: 500;
}

.product-header__attr span.is-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Detail toolbar (Copy All) --------------------------------------------- */
.detail__toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 20px 0 4px;
}

/* =========================================================================
   Section cards
   ========================================================================= */
.section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
}

.section__actions {
  display: flex;
  gap: 8px;
}

/* Amazon Title body ------------------------------------------------------ */
.title-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Description ------------------------------------------------------------ */
.body-text p {
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.body-text p:last-child {
  margin-bottom: 0;
}

.features {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.features__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.features ul {
  list-style: none;
  display: grid;
  gap: 6px;
}
.features li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}
.features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Bullet points ---------------------------------------------------------- */
.bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bullet {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--bg-muted);
  transition: border-color 0.15s ease;
}
.bullet:hover {
  border-color: var(--border-strong);
}

.bullet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.bullet__heading {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.bullet__num {
  color: var(--accent);
  font-weight: 700;
}

.bullet__body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Specifications --------------------------------------------------------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table tr {
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child {
  border-bottom: none;
}
.spec-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 9px 16px 9px 0;
  width: 200px;
  vertical-align: top;
  white-space: nowrap;
}
.spec-table td {
  padding: 9px 0;
  color: var(--text-primary);
  vertical-align: top;
}

/* Important Notice ------------------------------------------------------- */
.section--notice {
  background: #fdf9f2;
  border-color: #ecdfc8;
}
.notice__heading {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  color: #8a6414;
  background: #f6ecd4;
  border-radius: 6px;
  padding: 5px 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.notice__body p {
  color: #6f6552;
  margin-bottom: 10px;
}
.notice__body p:last-child {
  margin-bottom: 0;
}

/* About the Artist ------------------------------------------------------- */
.section--artist {
  background: linear-gradient(180deg, #fbf9f5 0%, #ffffff 100%);
  border-color: var(--border);
}
.artist__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.artist__bio p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}
.artist__bio p:last-child {
  margin-bottom: 0;
}

/* Backend Search Terms --------------------------------------------------- */
.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.term {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 11px;
}
.terms__hint {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* =========================================================================
   Copy button
   ========================================================================= */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.copy-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.copy-btn:active {
  transform: translateY(1px);
}
.copy-btn.is-copied {
  color: var(--status-ready-fg);
  background: var(--status-ready-bg);
  border-color: #bcdcc5;
}

.copy-btn--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  padding: 7px 16px;
  font-size: 12.5px;
}
.copy-btn--primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}
.copy-btn--primary.is-copied {
  color: #fff;
  background: var(--status-ready-fg);
  border-color: var(--status-ready-fg);
}

.copy-btn--sm {
  font-size: 11px;
  padding: 3px 9px;
}

/* =========================================================================
   Empty / Draft states
   ========================================================================= */
.placeholder-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
}
.placeholder-view__inner {
  max-width: 420px;
}
.placeholder-view__icon {
  font-size: 34px;
  margin-bottom: 14px;
}
.placeholder-view__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.placeholder-view__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.draft-view__badge {
  margin-bottom: 18px;
}
.draft-view__hint {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =========================================================================
   Toast
   ========================================================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   Responsive — スマホでも最低限崩れないように
   ========================================================================= */
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 42vh;
  }
  .detail {
    padding: 22px 18px 60px;
  }
  .product-header {
    flex-direction: column;
    gap: 18px;
  }
  .product-header__image {
    flex-basis: auto;
    width: 160px;
    height: 160px; /* スマホでも 1:1 正方形を維持 */
  }
  .product-header__en {
    font-size: 21px;
  }
  .spec-table th {
    width: 140px;
    white-space: normal;
  }
}
