/* ============================================
   Catalog & Catalog Detail — Page Styles
   Extracted from inline styles + embedded blocks
   ============================================ */

/* === Shared: Sidebar Logo === */
.logo-full--sidebar {
  height: 38px;
  margin: 0 auto;
}
.logo-mark--sidebar {
  height: 28px;
  margin: 0 auto;
  display: none;
}

/* === Shared: Topbar User === */
.topbar-user-trigger {
  cursor: pointer;
}

/* === Shared: Table Header (blue header row) === */
.th-catalog {
  background: #ececed;
  color: #2a60ac;
  font-weight: 700;
}
.th-catalog--empty {
  background: #ececed;
  width: 32px;
}
.th-catalog--narrow {
  background: #ececed;
  width: 36px;
}

/* === Shared: Table Header Flex Layout === */
.th-flex {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Shared: Add Button (small circle in table header) === */
.th-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 5px;
  text-decoration: none;
  flex-shrink: 0;
}

/* === Shared: Header count muted === */
.th-count-muted {
  font-weight: 400;
  color: #94a3b8;
}

/* === Shared: Badge with border variants === */
.badge--bordered-success {
  border: 1px solid #bbf7d0;
}
.badge--bordered-warning {
  border: 1px solid #fde68a;
}
.badge--bordered-neutral {
  border: 1px solid #d0d5dd;
}
.badge--bordered-info {
  border: 1px solid #bdd7f1;
}

/* === Shared: Dropdown archive action === */
.dropdown-item--danger {
  color: #ef4444;
}

/* === Shared: Product name link in table === */
.catalog-product-link {
  font-size: 0.9375rem;
  line-height: 1.3;
  color: inherit;
  text-decoration: none;
}

/* === Shared: Product description in table row === */
.catalog-product-desc {
  margin-top: 2px;
  line-height: 1.4;
}

/* === Shared: Product meta row (badges + material type) === */
.catalog-product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* Badge type variants moved to global styles.css */

/* === Shared: Service name + fee type row === */
.service-row-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.service-name {
  font-size: 0.875rem;
  line-height: 1.3;
}
.service-fee-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #94a3b8;
  font-size: 0.7rem;
}
.service-desc {
  margin-top: 1px;
  line-height: 1.4;
}

/* ============================================
   catalog.html — List Page Styles
   ============================================ */

/* === Type Filter Pills === */
.type-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.type-filter {
  padding: 7px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.type-filter--all {
  padding: 7px 16px;
}
.type-filter.tf-active {
  background: #d0e4f7;
  color: var(--primary);
  border-color: var(--primary);
}

/* === Search Row === */
.catalog-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.catalog-search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.catalog-search-input {
  padding: 10px 40px 10px 14px;
  font-size: 0.875rem;
  width: 100%;
  border-color: #cbd5e1;
}
.catalog-search-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* === Table column widths — Products === */
.col-pricing {
  width: 90px;
}
.col-stock {
  width: 90px;
}

/* === Table column widths — Variants === */
.col-sku {
  width: 120px;
}
.col-price-mod {
  width: 120px;
}
.col-status {
  width: 90px;
}

/* === Table column widths — Stock === */
.col-dimensions {
  width: 130px;
}
.col-area {
  width: 80px;
}
.col-location {
  width: 140px;
}
.col-batch {
  width: 130px;
}

/* === Table column widths — Pricing === */
.col-calc {
  width: 140px;
}
.col-price {
  width: 120px;
}
.col-effective-price {
  width: 130px;
}

/* ============================================
   catalog-detail.html — Detail Page Styles
   ============================================ */

/* === Stat Cards (from embedded <style>) === */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: 7px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-value-unit {
  font-size: 0.875rem;
  font-weight: 500;
}

/* === Detail Tabs (from embedded <style>) === */
.detail-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.detail-tab {
  display: none;
}
.detail-tab.active {
  display: block;
}

/* === Two Column Grid (from embedded <style>) === */
.two-col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
}

/* === Attribute Row (from embedded <style>) === */
.attr-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.attr-row:last-child {
  border-bottom: none;
}

/* === Tag Chip (from embedded <style>) === */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #f1f5f9;
  border: 1px solid #d0d5dd;
  border-radius: 5px;
  font-size: 0.75rem;
  color: var(--text-primary);
}

/* === Page Title Row === */
.catalog-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* === Back Button === */
.catalog-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  text-decoration: none;
  flex-shrink: 0;
}

/* === Detail Badge (type badge in title) === */
.badge--detail-type {
  background: #e8f2fb;
  color: #0364B1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #bdd7f1;
}

/* === Subtitle muted text === */
.catalog-detail-subtitle {
  font-weight: 400;
}

/* === Description below title === */
.catalog-detail-desc {
  margin-top: 4px;
}

/* === Overview Grid Rows === */
.catalog-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.catalog-detail-grid--no-mb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* === Card Body Compact === */
.card-body--compact {
  padding: 12px 16px;
}

/* === Textarea styling === */
.textarea--description {
  font-size: 0.8125rem;
  resize: vertical;
}

/* === Photo Grid === */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: 7px;
  overflow: hidden;
}
.photo-thumb--1 { background: linear-gradient(135deg, #e8d5b7, #c4a882); }
.photo-thumb--2 { background: linear-gradient(135deg, #d4c4a8, #b8a080); }
.photo-thumb--3 { background: linear-gradient(135deg, #cdb99a, #a89070); }
.photo-thumb--4 { background: linear-gradient(135deg, #dcc8a8, #bea882); }

/* === Photo count text === */
.photo-count {
  margin-top: 6px;
}

/* === Form Group Compact === */
.form-group--compact {
  margin-bottom: 10px;
}
.form-group--flush {
  margin-bottom: 0;
}

/* === Form Label Small === */
.form-label-sm {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

/* === Input Row with Button === */
.input-row-with-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* === Form Control Small === */
.form-control--sm {
  font-size: 0.8125rem;
}
.form-control--sm-flex {
  font-size: 0.8125rem;
  flex: 1;
}

/* === Inline Add Button (small square) === */
.btn-add-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 5px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* === Two Column Sub-Grid === */
.attr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* === Tags Container === */
.tag-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* === Tag Removable === */
.tag-removable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font-size: 0.75rem;
}
.tag-remove-btn {
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* === Locked Properties Header Icon === */
.locked-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === Card Body No Padding === */
.card-body--none {
  padding: 0;
}

/* === Locked Properties List Container === */
.locked-list {
  padding: 0 16px;
}

/* === Card Footer Note === */
.card-footer-note {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  border-radius: 0 0 7px 7px;
}
.card-footer-note-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === Storefront Settings Toggle Row === */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* === Variant Label Font Size === */
.variant-label {
  font-size: 0.9375rem;
}

/* === Stock Serial Font Size === */
.stock-serial {
  font-size: 0.875rem;
}

/* === Pricing Calc Badge === */
.pricing-calc-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 7px;
}
.pricing-calc-badge--straight {
  background: #e8f2fb;
  color: #0364B1;
  border: 1px solid #93c5fd;
}
.pricing-calc-badge--discount {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

/* === Pricing Input === */
.pricing-input {
  width: 80px;
  padding: 5px 8px;
  font-size: 0.8125rem;
  border: 1px solid #94a3b8;
  border-radius: 5px;
  background: #fff;
}

/* === Pricing Footer === */
.pricing-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pricing-save-btn {
  font-size: 0.8125rem;
  padding: 7px 16px;
}

/* === Responsive (from embedded <style>) === */
@media (max-width: 900px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .catalog-detail-grid,
  .catalog-detail-grid--no-mb {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   storefront-manager.html — Storefront Manager
   ============================================ */

/* === Global Settings Card === */
.sf-global-settings {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.sf-setting-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
}
.sf-setting-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.sf-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sf-setting-row:last-child {
  margin-bottom: 0;
}
.sf-setting-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}
.sf-setting-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* === Toggle Switch === */
.sf-switch {
  width: 36px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sf-switch.on {
  background: var(--primary);
}
.sf-switch__knob {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.sf-switch.on .sf-switch__knob {
  left: 18px;
}

/* === Small Select === */
.sf-select-sm {
  padding: 5px 28px 5px 8px;
  font-size: 0.8125rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #fff;
  color: var(--text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%2364748b' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
}

/* === Product Type Section === */
.sf-type-section {
  margin-bottom: 16px;
}
.sf-type-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  cursor: pointer;
  transition: background 0.15s;
}
.sf-type-header:hover {
  background: #f0f4f8;
}
.sf-type-header__chevron {
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sf-type-header__chevron.open {
  transform: rotate(180deg);
}
.sf-type-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}
.sf-type-header__count {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.sf-type-header__settings {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.sf-type-setting {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.sf-type-setting__label {
  font-weight: 500;
  white-space: nowrap;
}
.sf-type-body {
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
  overflow: hidden;
}

/* === Eye Toggle Button === */
.sf-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--primary);
  border-radius: 5px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sf-toggle-btn:hover {
  background: #f0f7ff;
}
.sf-toggle-btn--hidden {
  color: #94a3b8;
}
.sf-toggle-btn--hidden:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* === Checkbox === */
.sf-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* === Excluded Row === */
.tr-excluded {
  opacity: 0.45;
}
.tr-excluded .sf-toggle-btn {
  color: #94a3b8;
}

/* === Table Columns === */
.col-sf-toggle {
  width: 48px;
  text-align: center;
}
.col-sf-checkbox {
  width: 40px;
  text-align: center;
}

/* === Summary Bar === */
.sf-mgmt-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}
.sf-mgmt-summary__count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.sf-mgmt-summary__count strong {
  color: var(--primary);
  font-weight: 700;
}
.sf-mgmt-summary__actions {
  display: flex;
  gap: 8px;
}

/* === Filter Bar (search + type pills) === */
.sf-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sf-filter-bar .type-filter-bar {
  margin-bottom: 0;
}
.sf-filter-bar__search {
  position: relative;
  width: 240px;
  flex-shrink: 0;
}
.sf-filter-bar__input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: #fff;
}
.sf-filter-bar__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(60,138,204,0.12);
}
.sf-filter-bar__search-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* === Product row compact === */
.sf-product-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sf-product-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === Table column widths === */
.sf-col-batches { width: 70px; }
.sf-col-avail { width: 80px; }
.sf-col-price { width: 110px; text-align: center; }
.sf-col-custom-price { width: 160px; text-align: center; }
.sf-col-override { width: 65px; }

/* === Custom Price Inline Input === */
.sf-custom-price {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.sf-custom-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sf-custom-input-wrap__symbol {
  position: absolute;
  left: 7px;
  font-size: 0.8125rem;
  color: #94a3b8;
  pointer-events: none;
}
.sf-custom-input {
  width: 100px;
  padding: 5px 8px 5px 18px;
  font-size: 0.8125rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: var(--text-primary);
  text-align: right;
}
.sf-custom-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(60,138,204,0.12);
}
.sf-custom-input::placeholder {
  color: #cbd5e1;
  text-align: center;
}
.sf-custom-save {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.sf-custom-save:hover {
  text-decoration: underline;
}

/* === Checkbox indeterminate state === */
.sf-checkbox--indeterminate {
  accent-color: #f59e0b;
}

/* === Two-line column header label === */
.sf-col-header-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.sf-col-header-label__sub {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
}

/* === Override Badge === */
.sf-override-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  cursor: pointer;
  white-space: nowrap;
}
.sf-override-badge:hover {
  background: #e2e8f0;
  color: var(--text-secondary);
}
.sf-override-badge--hide {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}
.sf-override-badge--show {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* (sf-price-select removed — replaced by plain price + custom input) */

/* === Page Header Actions === */
.page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Publish Confirmation Modal === */
.sf-publish-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
}
.sf-publish-overlay.show {
  display: block;
}
.sf-publish-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 28px 32px;
  z-index: 1001;
  width: 440px;
  max-width: 90vw;
}
.sf-publish-modal.show {
  display: block;
}
.sf-publish-modal__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.sf-publish-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.sf-publish-modal__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.sf-publish-modal__realtime {
  font-weight: 700;
}
.sf-publish-modal__summary {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 7px;
  border: 1px solid var(--border-color);
}
.sf-publish-modal__stat {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.sf-publish-modal__stat strong {
  color: var(--text-primary);
}
.sf-publish-modal__confirm-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.sf-publish-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === Publish Button (gold, prominent) === */
.btn--publish {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(217,119,6,0.3);
}
.btn--publish:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 4px 12px rgba(217,119,6,0.4);
}
.btn--publish-sm {
  padding: 18px 24px;
  font-size: 0.8125rem;
}
.btn--publish-sm .btn--publish-word {
  font-size: 1.0625rem;
}
