:root {
  --bg: #f6f2e9;
  --surface: #fff8ef;
  --ink: #1f1c18;
  --muted: #6f665b;
  --accent: #c7772c;
  --accent-dark: #5b2f0f;
  --border: rgba(31, 28, 24, 0.12);
  --shadow: 0 18px 40px rgba(35, 24, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #fff6e6 0%, #f3ede1 50%, #efe7db 100%);
  color: var(--ink);
  margin: 0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero {
  display: flex;
  flex-wrap: wrap;

.modal.small-modal {
  max-width: 640px;
}
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  background: linear-gradient(120deg, #fff1d2 0%, #f6ddbf 55%, #f0c89f 100%);
  padding: 28px 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 8px 0 12px;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--accent-dark);
  text-transform: uppercase;
}

.subtitle {
  color: var(--muted);
  max-width: 520px;
}

.hero-chip {
  background: var(--ink);
  color: #fff6ea;
  padding: 16px 20px;
.quick-variant {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fffdf8;
  position: relative;
}

.quick-variant .remove-quick {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: #f8e1d1;
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
  border-radius: 14px;
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.hero-chip span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(199, 119, 44, 0.3);
}

.nav-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.nav-btn svg {
  flex-shrink: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 24px;
}

.layout:has(.panel[data-role="admin"][style*="display: none"]) {
  grid-template-columns: 1fr;
}

.layout:has(.panel[data-role="admin"]:not([style*="display: none"])) .panel:last-child {
  max-width: 480px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-alt {
  background: #fffaf4;
}

.panel-section {
  margin-bottom: 28px;
}

.panel-section h2 {
  font-family: "Unbounded", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 16px;
}

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

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: flex-start;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  margin-top: 6px;
}

.field span {
  font-size: 0.9rem;
  color: var(--muted);
}

input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  background: #fffefb;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.upload-area {
  border: 2px dashed rgba(91, 47, 15, 0.25);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: #fff3e2;
}

.upload-area input {
  width: 100%;
  padding: 10px;
  background: #fff;
}

.counter {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(199, 119, 44, 0.15);
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.preview-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.preview-tile img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.preview-tile button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(31, 28, 24, 0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.variant-list {
  display: grid;
  gap: 14px;
}

.variant-bulk-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf8;
}

.variant-bulk-toolbar .field {
  margin-bottom: 0;
}

.variant-bulk-toolbar .btn-secondary {
  align-self: end;
}

.bulk-only-empty {
  align-self: end;
}

.variant {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdf8;
}

.variant button {
  border: none;
  background: #f3dfc8;
  color: var(--accent-dark);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.variant-image-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #fdfbf7;
  border-radius: 10px;
  cursor: pointer;
  border: 1px dashed var(--border);
}

.variant-image-label span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.variant-image-label input {
  cursor: pointer;
}

.variant-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  border-radius: 10px;
  background: #fdfbf7;
  position: relative;
}

.variant-image-preview img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.color-panel-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff8ef;
}

.color-panel-input {
  display: none;
}

.color-panel-input.active {
  display: grid;
  gap: 8px;
}

.hex-picker-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.detect-swatch-field .detect-swatch-btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.detect-swatch-status {
  margin: 4px 0 0;
  color: var(--accent-dark);
  font-weight: 600;
}

.color-panel-image-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.color-panel-detected-hex {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 600;
}

.compact-field input[type="text"] {
  width: 100%;
  min-height: 48px;
}

.remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

button {
  font-family: inherit;
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.actions {
  margin-top: 20px;
}

.submitBtn {
  background: var(--accent);
  color: #fff7ec;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(199, 119, 44, 0.3);
}

.submitBtn.is-loading,
.btn-primary.is-loading,
.submitBtn:disabled,
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.product-list {
  display: grid;
  gap: 16px;
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.product-pagination[hidden] {
  display: none;
}

.product-pagination #productPaginationInfo {
  min-width: 110px;
  text-align: center;
}

.product-pagination .btn-secondary {
  min-width: 88px;
}

.product-item {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-item button {
  margin-top: 10px;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2d6c1;
  color: var(--accent-dark);
  cursor: pointer;
}

.product-item .add-color-btn {
  background: #dcebff;
  color: #0b3a74;
}

.product-item .edit-btn {
  background: #f2d6c1;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .upload-area {
    grid-template-columns: 1fr;
  }
}

/* Variant Type Input */
.variant input.variant-type {
  background: #fef9f0;
  border-color: rgba(199, 119, 44, 0.3);
}

.variant input.variant-type::placeholder {
  color: var(--accent);
  opacity: 0.7;
}

/* Secondary Image Label */
.variant .variant-image-label:nth-of-type(2) {
  background: #f9f5ee;
  border-style: dotted;
}

/* =========================
   EDIT MODAL
========================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 28, 24, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(35, 24, 16, 0.25);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, #fff1d2 0%, #f6ddbf 100%);
}

.modal-header h2 {
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(31, 28, 24, 0.1);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  max-height: calc(90vh - 160px);
  -webkit-overflow-scrolling: touch;
}

.modal-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.modal-section h3 {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  margin: 0 0 16px;
  color: var(--accent-dark);
}

.ta-preview-block {
  margin: 10px 0 16px;
}

.ta-preview-box {
  margin-top: 8px;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 10px;
}

.ta-preview-box img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
}

.ta-picker-wrap {
  margin: 12px 0 18px;
}

.ta-image-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.ta-image-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.ta-image-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

.ta-image-actions {
  display: grid;
  gap: 6px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: #fffaf4;
}

.btn-primary {
  background: var(--accent);
  color: #fff7ec;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(199, 119, 44, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(199, 119, 44, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(31, 28, 24, 0.05);
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(231, 76, 60, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(231, 76, 60, 0.35);
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.media-tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #fff;
  transition: opacity 0.2s, border-color 0.2s;
}

.media-tile img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.media-tile.marked-for-deletion {
  opacity: 0.4;
  border-color: #e74c3c;
}

.media-tile.marked-for-deletion::after {
  content: "Will be deleted";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  text-align: center;
  padding: 4px;
}

.delete-media-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.delete-media-btn:hover {
  transform: scale(1.1);
}

.marked-for-deletion .delete-media-btn {
  background: rgba(46, 204, 113, 0.9);
}

/* Edit Variant Styles */
.edit-variant {
  position: relative;
  border-left: 4px solid var(--accent);
}

.edit-variant.marked-for-deletion {
  opacity: 0.5;
  border-left-color: #e74c3c;
  background: #fef5f5;
}

.delete-variant-btn {
  background: #fce4e1;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.edit-variant.marked-for-deletion .delete-variant-btn {
  background: #e8f8f5;
  color: #27ae60;
  border-color: rgba(39, 174, 96, 0.2);
}

.new-variant {
  border-left: 4px solid #27ae60;
  background: #f0fff4;
}

.new-variant-badge {
  position: absolute;
  top: -8px;
  left: 10px;
  background: #27ae60;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.variant-current-images {
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 10px;
  background: #faf8f5;
  border-radius: 10px;
}

.current-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.current-img img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.current-img span {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Product Actions */
.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.product-item .edit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.product-item .edit-btn:hover {
  background: var(--accent-dark);
}

.product-item .delete-btn {
  background: #f2d6c1;
  color: var(--accent-dark);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.product-item .delete-btn:hover {
  background: #fce4e1;
  color: #c0392b;
}

/* Compact Upload Area */
.upload-area.compact {
  padding: 14px;
  grid-template-columns: 1fr;
  text-align: center;
}

.upload-area.compact p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.status-line {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Modal Scrollbar Styling */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f5f0e8;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

/* Button Loading State */
.edit-btn:disabled,
.delete-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Variant Scroll Indicator */
.variant-list {
  max-height: 200px;
  overflow-y: auto;
}

/* ============================================================
   Admin Navigation (RBAC)
   ============================================================ */

.admin-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-logo {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.menu-item:hover {
  background: rgba(199, 119, 44, 0.1);
  color: var(--accent);
}

.menu-item.active {
  background: linear-gradient(120deg, #fff1d2 0%, #f6ddbf 100%);
  color: var(--accent-dark);
}

.menu-icon {
  font-size: 1.1rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-role {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-user span:not(.user-role) {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #ffebee;
  border-color: #e57373;
  color: #c62828;
}

@media (max-width: 900px) {
  .admin-nav {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  
  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  .menu-item {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .menu-label {
    display: none;
  }
  
  .nav-user span:not(.user-role) {
    display: none;
  }
}

/* RBAC Data Attribute Helpers */
[data-role] {
  display: none;
}

[data-permission] {
  display: none;
}

[data-require-role].disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================
   COMPACT PRODUCTS TABLE
========================= */

.product-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.product-search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  background: #fffefb;
}

.product-search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 119, 44, 0.1);
}

.product-search-box .ghost {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 10px;
  cursor: pointer;
}

.products-table-wrapper {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  background: #fff;
  margin-bottom: 16px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead {
  background: linear-gradient(120deg, #fff1d2 0%, #f6ddbf 100%);
}

.products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.products-table th:last-child {
  text-align: center;
  width: 140px;
}

.products-table td {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.products-table tbody tr:hover {
  background: #fffaf4;
}

.product-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.product-category {
  font-size: 0.75rem;
  color: var(--muted);
}

.product-price {
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}

.product-actions-cell {
  text-align: center;
  white-space: nowrap;
}

.action-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
  padding: 0;
  line-height: 1;
}

.action-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-icon.edit {
  background: #2196f3;
  color: white;
}

.action-icon.edit:hover {
  background: #1976d2;
}

.action-icon.color {
  background: #4caf50;
  color: white;
}

.action-icon.color:hover {
  background: #388e3c;
}

.action-icon.delete {
  background: #f44336;
  color: white;
}

.action-icon.delete:hover {
  background: #d32f2f;
}

.products-table .loading-cell {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-style: italic;
}

/* Updated Pagination */
.product-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.product-pagination .btn-secondary {
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 8px;
}

.product-pagination .btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
