/* =========================================================
   Catalorg — Vanilla CSS Design System
   ========================================================= */

/* --- Variables --- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #64748b;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #0891b2;
  --info-light: #ecfeff;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  --sidebar-width: 240px;
  --topbar-height: 60px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--gray-800); background: var(--gray-50); line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5, h6 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }
small { font-size: .875rem; color: var(--gray-500); }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: .75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; } .gap-2 { gap: .5rem; } .gap-4 { gap: 1rem; }

/* --- App Shell (Sidebar + Main) --- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 1.25rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--gray-700);
  display: flex; align-items: center; gap: .5rem;
}
.sidebar-logo span { font-size: .7rem; font-weight: 500; background: var(--primary); color: #fff; padding: .15rem .4rem; border-radius: var(--radius-sm); }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav-section { padding: .25rem 1.5rem .5rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); }
.sidebar-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem 1.5rem;
  color: var(--gray-300);
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--gray-800); color: #fff; text-decoration: none;
}
.sidebar-nav a.active { border-left: 3px solid var(--primary); }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-700); }

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }

.page-content { padding: 1.5rem; flex: 1; }

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--gray-200); background: var(--gray-50); border-radius: 0 0 var(--radius) var(--radius); }

/* Stat Cards */
.stat-card { padding: 1.25rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-card .stat-label { font-size: .85rem; color: var(--gray-500); margin-top: .25rem; }
.stat-card .stat-change { font-size: .8rem; margin-top: .5rem; }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-yellow { background: var(--warning-light); color: var(--warning); }
.stat-icon-red { background: var(--danger-light); color: var(--danger); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  font-size: .9rem; font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: .5rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; color: var(--gray-700); margin-bottom: .4rem; }
.form-label .required { color: var(--danger); margin-left: .2rem; }
.form-control {
  display: block; width: 100%;
  padding: .5rem .75rem;
  font-size: .9rem; color: var(--gray-800);
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.is-invalid { border-color: var(--danger); }
.form-hint { font-size: .8rem; color: var(--gray-500); margin-top: .3rem; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: .3rem; }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* --- Tables --- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { text-align: left; padding: .75rem 1rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* --- Alerts / Flash --- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-success { background: var(--success-light); border: 1px solid #bbf7d0; color: #166534; }
.alert-danger { background: var(--danger-light); border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-light); border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: var(--info-light); border: 1px solid #a5f3fc; color: #155e75; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-yellow { background: var(--warning-light); color: var(--warning); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* --- Progress Bar --- */
.progress { height: 8px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s; }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--gray-500); margin-bottom: .3rem; }

/* --- Pagination --- */
.pagination { display: flex; gap: .3rem; align-items: center; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 .5rem;
  font-size: .875rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  transition: background .15s;
}
.pagination a:hover { background: var(--gray-100); text-decoration: none; }
.pagination span.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination span.disabled { opacity: .4; cursor: not-allowed; }

/* --- Auth Pages --- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gray-100); padding: 2rem 1rem; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo h1 { font-size: 1.75rem; color: var(--primary); font-weight: 800; }
.auth-logo p { color: var(--gray-500); font-size: .9rem; margin-top: .25rem; }
.auth-card h2 { font-size: 1.4rem; margin-bottom: 1.5rem; text-align: center; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--gray-500); }

/* --- Marketing Pages --- */
.marketing-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
  padding: 0 1.5rem;
}
.marketing-header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.marketing-logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.marketing-nav { display: flex; gap: 2rem; }
.marketing-nav a { color: var(--gray-600); font-size: .95rem; transition: color .15s; }
.marketing-nav a:hover { color: var(--primary); text-decoration: none; }
.marketing-hero { padding: 6rem 1.5rem; text-align: center; background: linear-gradient(135deg, #eff6ff 0%, #fff 60%); }
.marketing-hero h1 { font-size: 3rem; font-weight: 800; color: var(--gray-900); margin-bottom: 1rem; }
.marketing-hero p { font-size: 1.2rem; color: var(--gray-600); max-width: 600px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.marketing-section { padding: 5rem 1.5rem; }
.marketing-section-alt { background: var(--gray-50); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; margin-bottom: .75rem; }
.section-title p { color: var(--gray-500); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.marketing-footer { background: var(--gray-900); color: var(--gray-400); padding: 3rem 1.5rem; text-align: center; font-size: .875rem; }
.marketing-footer a { color: var(--gray-400); }
.marketing-footer a:hover { color: #fff; }

/* Pricing Cards */
.pricing-card { border: 2px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.pricing-card .badge-featured { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: .2rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); margin: 1rem 0; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--gray-500); }
.pricing-features { text-align: left; margin: 1.5rem 0; }
.pricing-features li { padding: .4rem 0; border-bottom: 1px solid var(--gray-100); font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.pricing-features li::before { content: "✓"; color: var(--success); font-weight: 700; }
.pricing-features li.disabled::before { content: "✗"; color: var(--gray-300); }
.pricing-features li.disabled { color: var(--gray-400); }

/* --- Catalog Public --- */
.catalog-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1.5rem;
}
.catalog-header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.catalog-logo { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: .5rem; }
.catalog-search-bar { display: flex; gap: .5rem; }
.catalog-search-bar input { padding: .45rem .85rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: .9rem; width: 260px; }
.catalog-search-bar input:focus { outline: none; border-color: var(--primary); }

.catalog-layout { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; display: flex; gap: 2rem; }
.catalog-sidebar { width: 220px; flex-shrink: 0; }
.catalog-main { flex: 1; min-width: 0; }

.catalog-filters h3 { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); margin-bottom: .75rem; }
.catalog-filters a { display: block; padding: .4rem 0; font-size: .9rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.catalog-filters a:hover, .catalog-filters a.active { color: var(--primary); text-decoration: none; }
.catalog-filters a.active { font-weight: 600; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.product-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.product-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); display: flex; align-items: center; justify-content: center; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .no-image { font-size: 2.5rem; color: var(--gray-300); }
.product-card-body { padding: .85rem; }
.product-card-name { font-weight: 600; color: var(--gray-800); font-size: .95rem; margin-bottom: .25rem; line-height: 1.3; }
.product-card-category { font-size: .78rem; color: var(--gray-500); }
.product-card-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-top: .5rem; }

.product-detail-layout { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

.product-main-image { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); }
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbnails { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.product-thumbnail { width: 70px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--gray-200); cursor: pointer; }
.product-thumbnail:hover, .product-thumbnail.active { border-color: var(--primary); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 1.75rem; margin-bottom: .5rem; }
.product-price { font-size: 1.75rem; font-weight: 700; color: var(--primary); margin: 1rem 0; }
.product-description { color: var(--gray-600); line-height: 1.7; }
.product-variants { margin: 1.5rem 0; }
.product-variants h4 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; color: var(--gray-600); }
.variant-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.variant-btn { padding: .4rem .85rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: .875rem; cursor: pointer; background: #fff; transition: border-color .15s; }
.variant-btn:hover { border-color: var(--primary); }
.variant-btn.active, .variant-btn:checked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* --- Tenant Product Card (manage) --- */
.product-row-img { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.active { background: var(--success); }
.status-dot.draft { background: var(--warning); }
.status-dot.archived { background: var(--gray-400); }

/* --- Upload zone --- */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone p { color: var(--gray-500); font-size: .9rem; margin-top: .5rem; }
.image-previews { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.image-preview { position: relative; width: 90px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-remove { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* --- Usage Bars --- */
.usage-item { margin-bottom: 1.25rem; }
.usage-item:last-child { margin-bottom: 0; }
.usage-label { display: flex; justify-content: space-between; font-size: .875rem; margin-bottom: .4rem; color: var(--gray-700); }
.usage-cta { font-size: .8rem; color: var(--primary); margin-top: .4rem; }

/* --- Dropdown (plain CSS) --- */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { cursor: pointer; }
.dropdown-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 4px);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  padding: .25rem 0;
}
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: block; width: 100%;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--gray-700);
  background: transparent; border: none; text-align: left; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); text-decoration: none; }
.dropdown-menu .dropdown-divider { height: 1px; background: var(--gray-200); margin: .25rem 0; }

/* --- Page Header --- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.4rem; font-weight: 700; }
.breadcrumb { font-size: .875rem; color: var(--gray-500); display: flex; gap: .5rem; align-items: center; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-500); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--gray-700); margin-bottom: .5rem; }
.empty-state p { max-width: 360px; margin: 0 auto 1.5rem; }

/* --- Modal --- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300; display: none; align-items: center; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 540px; width: 100%; margin: 1rem; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: .75rem; }
.modal-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--gray-400); }
.modal-close:hover { color: var(--gray-700); }

/* --- Misc --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--gray-200); margin: 1.5rem 0; }
.w-full { width: 100%; }
.hidden { display: none; }

/* --- Responsive Sidebar --- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .catalog-layout { flex-direction: column; }
  .catalog-sidebar { width: 100%; }
  .marketing-hero h1 { font-size: 2rem; }
}
