/* ====== RESET ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  min-height: 100vh;
  padding: 0;
}

/* ====== SIDEBAR NAVIGATION ====== */
.sidebar {
  width: 220px;
  background-color: #0d0145;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 20px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 30px;
  text-align: center;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  margin-bottom: 12px;
}

.nav-links .nav-item {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-links .nav-item:hover,
.nav-links .nav-item.active {
  background-color: #130161;
}

/* ====== MAIN LAYOUT ====== */
.main-content {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-content {
  padding: 30px;
}

/* ====== HEADER BAR ====== */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  height: 60px;
}

.profile-icon img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* ====== CONTAINER (Card Style) ====== */
.container {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* ====== FORMS ====== */
form {
  margin-bottom: 20px;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 10px 20px;
  background-color: #0d0145;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #130161;
}

/* ====== TABLE ====== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table thead {
  background-color: #0d0145;
  color: white;
}

table th, table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.editable-text {
  background-color: #fefefe;
}

/* ====== CATEGORY TREE ====== */
ul.category-list {
  list-style: none;
  padding-left: 20px;
}

.category-item {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: #fafafa;
  margin-bottom: 6px;
  border-radius: 4px;
  cursor: move;
}

/* ====== BUTTON STATES ====== */
.btn-active {
  background-color: green;
}

.btn-inactive {
  background-color: red;
}

/* ====== PAGINATION ====== */
#pagination {
  margin-top: 20px;
  text-align: center;
}

#pagination a {
  margin: 0 5px;
  text-decoration: none;
  color: #0d0145;
}

#pagination a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* Product management */
.product-block {
  display: flex;
  gap: 40px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 20px;
  padding: 16px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  align-items: flex-start;
}

.product-left {
  flex: 0 0 250px;
}

.product-right {
  flex: 1;
}

.product-thumb {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 4px;
  margin-top: 10px;
}

.section-a h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #0d0145;
}

.section-b-summary,
.section-c,
.section-d {
  margin-top: 20px;
  padding-left: 0;
}

.section-b-summary p,
.section-c p,
.section-d p {
  margin: 4px 0;
  font-size: 14px;
}

.section-b-summary a {
  margin-left: 10px;
  font-size: 12px;
  text-decoration: underline;
  color: #0077cc;
}

.toggle-details {
  margin-top: 10px;
  padding: 5px 10px;
  font-size: 13px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.section-c {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #bbb;
}

.section-c h4,
.section-d h4 {
  margin-top: 10px;
  font-size: 16px;
  color: #333;
}

.section-d table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.section-d table th,
.section-d table td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: left;
  font-size: 13px;
}

.section-d table th {
  background-color: #f9f9f9;
  font-weight: bold;
}

.product-details {
  margin-top: 12px;
  padding: 10px;
  background-color: #fdfdfd;
  border-top: 1px solid #eee;
  width: 100%;
}

/* Compact filter bar */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.filter-bar label {
  display: block;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 4px;
}

.filter-bar input[type="text"],
.filter-bar select,
.filter-bar input[type="number"] {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.filter-checkboxes label {
  font-weight: normal;
  font-size: 13px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  justify-content: end;
  grid-column: 1 / -1;
  margin-top: 6px;
}

.filter-buttons button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #eee;
  cursor: pointer;
}

.filter-buttons button:hover {
  background-color: #ddd;
}

/* ====== CATEGORY STYLING ====== */
.category-pill {
  display: inline-flex;
  align-items: center;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 16px;
  padding: 6px 10px;
  margin: 4px 6px 4px 0;
  font-size: 13px;
  border: 1px solid #ccc;
  animation: fadeIn 0.3s ease-in-out;
}

.category-pill button.remove-category {
  background: transparent;
  color: #888;
  border: none;
  margin-left: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.category-pill button.remove-category:hover {
  color: #cc0000;
}

.category-controls select,
.category-controls .suggest-category {
  font-size: 13px;
  padding: 6px 10px;
  background-color: #f9f9f9;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 8px;
  cursor: pointer;
}

.category-controls .suggest-category:hover {
  background-color: #eaeaea;
}

/* ========================================= */
/* PRODUCT DETAIL PAGE (Original Layout)     */
/* ========================================= */

body.product-detail { 
  font-family: Arial, sans-serif; 
  background: #f4f4f4; 
  margin: 0; 
  padding: 0; 
}

.product-detail-page { 
  max-width: 1200px; 
  margin: auto; 
  background: #fff; 
  padding: 20px; 
}

.product-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 20px; 
}

.product-title-input { 
  font-size: 20px; 
  padding: 8px; 
  flex: 1; 
  margin-right: 20px; 
}

.product-meta { 
  font-size: 14px; 
}

.product-content { 
  display: flex; 
  gap: 20px; 
}

.product-images { 
  flex: 1; 
}

.main-image { 
  background: #eaeaea; 
  height: 300px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.thumbnail-gallery { 
  display: flex; 
  gap: 10px; 
  margin-top: 10px; 
}

.thumbnail-gallery div { 
  background: #ccc; 
  width: 60px; 
  height: 60px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

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

.product-info section { 
  background: #fafafa; 
  padding: 15px; 
  border-radius: 6px; 
}

.product-info h3 { 
  margin-top: 0; 
  font-size: 16px; 
}

.product-info input, 
.product-info textarea, 
.product-info select, 
.product-info button { 
  width: 100%; 
  padding: 8px; 
  margin-top: 6px; 
}

.product-info table { 
  width: 100%; 
  border-collapse: collapse; 
}

.product-info table, 
.product-info th, 
.product-info td { 
  border: 1px solid #ddd; 
}

.product-info th, 
.product-info td { 
  padding: 8px; 
  text-align: center; 
}

.product-info .controls button { 
  width: auto; 
  margin-right: 10px; 
}

.product-info footer { 
  font-size: 12px; 
  color: #666; 
  margin-top: 10px; 
}
