* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Top Bar ===== */
.top-bar {
  background: #111;
  padding: 0 24px;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
}

.top-bar .logo a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.top-bar .nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.top-bar .nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.8em;
  transition: color 0.2s;
}

.top-bar .nav-links a:hover {
  color: #fff;
}

/* ===== Header ===== */
.site-header {
  padding: 32px 0 24px;
  margin-bottom: 40px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-inner h1 {
  font-size: 2em;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #111;
}

.header-inner .subtitle {
  color: #999;
  font-size: 0.9em;
  font-weight: 400;
  margin-top: 4px;
}

.admin-link {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.8em;
  text-decoration: none;
  z-index: 100;
  transition: opacity 0.2s;
}

.admin-link:hover {
  opacity: 0.75;
}

/* ===== Featured Layout (WIRED-style) ===== */
.featured-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .featured-section {
    grid-template-columns: 1fr;
  }
}

/* Featured Hero Card */
.card-hero {
  background: #111;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 420px;
}

.card-hero .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.card-hero .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}

.card-hero .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  z-index: 2;
}

.card-hero .card-badge {
  display: inline-block;
  background: #fff;
  color: #111;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.card-hero .card-title {
  font-size: 1.6em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.25;
}

.card-hero .card-desc {
  font-size: 0.92em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-hero .card-btn {
  display: inline-block;
  background: #fff;
  color: #111;
  text-decoration: none;
  padding: 10px 28px;
  font-size: 0.85em;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.card-hero .card-btn:hover {
  background: #e0e0e0;
}

/* Featured Side Cards */
.featured-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-side {
  background: #fff;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: border-color 0.2s;
}

.card-side:hover {
  border-color: #111;
}

.card-side .card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.card-side .card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-side .card-badge {
  display: inline-block;
  background: #111;
  color: #fff;
  font-size: 0.65em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  margin-bottom: 8px;
  align-self: flex-start;
}

.card-side .card-title {
  font-size: 1em;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-side .card-desc {
  font-size: 0.82em;
  color: #888;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-side .card-btn {
  display: inline-block;
  background: #111;
  color: #fff;
  text-decoration: none;
  padding: 8px 20px;
  font-size: 0.8em;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.card-side .card-btn:hover {
  opacity: 0.8;
}

/* ===== More Items Grid ===== */
.section-heading {
  font-size: 1.1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #111;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid #111;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 60px;
}

@media (max-width: 900px) {
  .more-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card-mini {
  background: #fff;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.card-mini:hover {
  border-color: #111;
}

.card-mini .card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.card-mini .card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-mini .card-title {
  font-size: 0.95em;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-mini .card-desc {
  font-size: 0.8em;
  color: #999;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-mini .card-btn {
  display: inline-block;
  background: #111;
  color: #fff;
  text-decoration: none;
  padding: 7px 18px;
  font-size: 0.78em;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.card-mini .card-btn:hover {
  opacity: 0.8;
}

/* Empty / No featured */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #bbb;
  font-size: 1em;
}

/* ===== Admin ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.login-box {
  background: #fff;
  padding: 40px;
  border: 1px solid #e0e0e0;
  width: 360px;
  max-width: 90%;
}

.login-box h1 {
  font-size: 1.3em;
  text-align: center;
  margin-bottom: 24px;
  color: #111;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85em;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 0.92em;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #111;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-primary:hover {
  background: #333;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8em;
}

.btn-block {
  width: 100%;
}

.error-msg {
  background: #fdecea;
  color: #c0392b;
  padding: 10px 14px;
  font-size: 0.85em;
  margin-bottom: 16px;
  text-align: center;
}

.success-msg {
  background: #eafaf1;
  color: #27ae60;
  padding: 10px 14px;
  font-size: 0.85em;
  margin-bottom: 16px;
  text-align: center;
}

.admin-page {
  background: #f5f5f5;
  min-height: 100vh;
}

.admin-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 0;
}

.admin-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-inner h1 {
  font-size: 1.2em;
  color: #111;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 60px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.change-password-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.change-password-form input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  font-size: 0.85em;
  width: 150px;
}

/* Admin Table */
.admin-table-wrap {
  background: #fff;
  border: 1px solid #e0e0e0;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.78em;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.admin-table td {
  padding: 12px 14px;
  font-size: 0.88em;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table .thumb {
  width: 56px;
  height: 38px;
  object-fit: cover;
}

.admin-table .col-actions {
  white-space: nowrap;
}

.admin-table .col-actions .btn {
  margin-right: 4px;
}

.admin-table .title-col {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table .desc-col {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #999;
}

.admin-table .featured-badge {
  display: inline-block;
  background: #111;
  color: #fff;
  font-size: 0.7em;
  padding: 2px 8px;
  font-weight: 700;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  padding: 32px;
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  position: relative;
}

.modal h2 {
  font-size: 1.15em;
  margin-bottom: 20px;
  color: #111;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.confirm-box {
  text-align: center;
}

.confirm-box p {
  margin-bottom: 20px;
  color: #888;
  font-size: 0.9em;
}

.confirm-box .modal-actions {
  justify-content: center;
}
