/* Dashboard Category View Styles */

.category-hero {
  margin-bottom: 1.5rem;
}

.back-to-dashboard {
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 0.75rem;
}

.back-to-dashboard:hover {
  text-decoration: underline;
}

.category-header {
  margin: 0;
}

.category-description {
  margin: 6px 0 0 0;
  color: #94a3b8;
}

.category-controls {
  margin-bottom: 1.5rem;
}

.category-control-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-control-section {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.9rem;
  color: #94a3b8;
}

.items-per-page-select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.view-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-label {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-right: 4px;
}

.view-button {
  padding: 6px 12px;
}

/* Card View */
.card-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card-view.hidden {
  display: none;
}

.card-view-item {
  padding: 16px;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.card-image-placeholder {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.card-title {
  margin: 0 0 8px 0;
  font-size: 1rem;
  line-height: 1.3;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.card-price-placeholder {
  font-size: 0.9rem;
  color: #64748b;
}

.card-view-link {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.empty-state-card {
  grid-column: 1 / -1;
  padding: 3rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-text {
  color: #94a3b8;
}

/* Pagination */
.pagination-container {
  margin-top: 2rem;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-button-disabled {
  opacity: 0.5;
}

.pagination-button-active {
  background: var(--primary);
}

.pagination-ellipsis {
  padding: 0 0.5rem;
  color: #94a3b8;
}

/* List View */
.list-view {
  display: none;
  position: relative;
  overflow-x: auto;
}

.list-view.active {
  display: block;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.table-header-row {
  text-align: left;
  color: #94a3b8;
  font-size: 0.9rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.table-header {
  padding: 12px 8px;
  position: sticky;
  left: 0;
  background: #1e293b;
  z-index: 10;
}

.table-header-right {
  padding: 12px 8px;
}

.table-header-wide {
  padding: 12px 8px;
  min-width: 220px;
}

.table-body-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-cell {
  padding: 8px;
}

.table-cell-sticky {
  padding: 8px;
  color: #94a3b8;
  position: sticky;
  left: 0;
  background: #1e293b;
  z-index: 5;
}

.table-cell-image {
  padding: 8px;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.table-image-placeholder {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.table-cell-bold {
  padding: 8px;
  font-weight: 500;
}

.table-actions {
  padding: 8px;
  position: sticky;
  right: 0;
  background: #1e293b;
  z-index: 5;
  display: flex;
  gap: 8px;
}

/* Icon View */
.icon-view {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.icon-view.active {
  display: grid;
}

.icon-view-link {
  text-decoration: none;
  color: inherit;
}

.icon-view-card {
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.icon-view-card:hover {
  transform: scale(1.05);
}

.icon-view-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.icon-view-placeholder {
  width: 100%;
  height: 120px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.icon-view-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-view-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.control-item-count {
  font-weight: 600;
}

.table-cell-price {
  font-weight: 600;
  color: var(--primary);
}

.table-cell-description {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-unavailable {
  font-size: 0.85rem;
  color: #64748b;
}

.action-button {
  white-space: nowrap;
}
/* ===== MOBILE RESPONSIVENESS ===== */

@media (max-width: 768px) {
    .category-hero {
        margin-bottom: 1rem;
    }
    
    .category-header {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.9rem;
    }
    
    .category-controls {
        margin-bottom: 1rem;
    }
    
    .category-control-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-control-section {
        width: 100%;
        gap: 6px;
    }
    
    .control-group {
        width: 100%;
        gap: 6px;
    }
    
    .category-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-header {
        min-width: 600px;
    }
    
    .table-cell-image {
        width: 60px;
        height: 80px;
    }
    
    .table-cell-name {
        min-width: 150px;
        font-size: 0.9rem;
    }
    
    .table-cell-price {
        min-width: 80px;
        font-size: 0.9rem;
    }
    
    .table-cell-actions {
        min-width: 100px;
    }
    
    .action-button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .view-mode-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .pagination-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .back-to-dashboard {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .category-header {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
    
    .category-table {
        overflow-x: auto;
    }
    
    .table-header {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .table-row {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .table-cell-image {
        width: 50px;
        height: 70px;
    }
    
    .table-cell-name {
        min-width: 120px;
        font-size: 0.85rem;
    }
    
    .table-cell-price {
        min-width: 70px;
        font-size: 0.85rem;
    }
    
    .table-cell-actions {
        min-width: 80px;
    }
    
    .table-cell-description {
        font-size: 0.75rem;
        max-width: 100px;
    }
    
    .action-button {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .control-group select,
    .control-group input {
        font-size: 0.9rem;
        padding: 8px;
    }
    
    .view-mode-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .pagination-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}
