:root {
  /* Apple Design Colors */
  --bg-color: #f5f5f7;
  --surface-color: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-blue: #0066cc;
  --accent-blue-hover: #004499;
  --accent-light: #e8f2fc;
  --border-color: #e5e5ea;

  /* Styling & Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --border-radius-xl: 20px;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Nav Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  display: flex;
  justify-content: center;
  transition: border-bottom 0.3s ease;
}

.navbar.scrolled {
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.logo {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-blue);
}

.nav-actions .btn {
  font-size: 14px;
}

/* Typography Classes */
.typography-hero {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

@media (max-width: 768px) {
  .typography-hero {
    font-size: 40px;
  }
}

.typography-headline {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.typography-body {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-blue-hover);
  transform: scale(1.02);
}

.btn-secondary {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
  padding-top: 120px;
  text-align: center;
  margin-bottom: 60px;
}

.hero p {
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Category Grid (Homepage) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  margin-top: 100px;
  margin-bottom: 80px;
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.category-card {
  background: var(--surface-color);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 102, 204, 0.2);
}

.cat-icon-wrapper {
  margin-bottom: 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-sketch {
  width: auto;
  max-width: 100%;
  height: 85px;
  /* scale to fit well inside the wrapper */
  object-fit: contain;
  transition: var(--transition);
  mix-blend-mode: darken;
  /* removes perfectly the light grey background from the sketch if any remains */
}

.category-card:hover .cat-sketch {
  transform: scale(1.03);
}

.cat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cat-count {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  position: absolute;
  top: 12px;
  right: 12px;
}

/* Showcase Section */
.showcase-section {
  margin-top: 60px;
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}

.showcase-link {
  color: var(--accent-blue);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: var(--transition);
}

.showcase-link:hover {
  color: var(--accent-blue-hover);
}

/* Cards / Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}

.product-card {
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background-color: #f0f0f0;
}

.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.product-price {
  font-size: 17px;
  font-weight: 600;
  margin-top: auto;
}

.product-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  background: var(--bg-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Listings Page Layout */
.listings-container {
  display: flex;
  gap: 40px;
  margin-top: 100px;
  margin-bottom: 80px;
}

@media (max-width: 900px) {
  .listings-container {
    flex-direction: column;
  }
}

/* Sidebar Filters */
.listings-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.filter-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.filter-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  margin-bottom: 16px;
  font-size: 14px;
  transition: var(--transition);
}

.filter-search:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  background: var(--surface-color);
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-list li label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-list li input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 12px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.filter-count {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 13px;
}

.filter-show-all {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.filter-show-all:hover {
  color: var(--text-primary);
}

/* Year Slider Styling Mockup */
.year-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.year-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
}

.range-slider {
  position: relative;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 24px;
}

.range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--accent-blue);
}

.range-thumb {
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Accordion */
.accordion-title {
  cursor: pointer;
  margin-bottom: 0;
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: var(--transition);
}

/* Main Listings Area */
.listings-main {
  flex-grow: 1;
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.listings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Horizontal Listing Card */
.listing-card {
  display: flex;
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  border: 1px solid transparent;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  height: 220px;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 102, 204, 0.2);
}

.listing-image-wrapper {
  width: 280px;
  max-width: 30%;
  flex-shrink: 0;
  position: relative;
  margin-right: 24px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

@media (max-width: 768px) {
  .listing-card {
    flex-direction: column;
    height: auto;
  }

  .listing-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 16px;
  }
}

.listing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #f0f0f0;
}

.listing-image-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.listing-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.listing-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-blue);
  line-height: 1.3;
}

.listing-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.listing-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.listing-specs-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: auto;
}

.spec-chip {
  background: var(--bg-color);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.spec-chip strong {
  color: var(--text-primary);
  font-weight: 500;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--bg-color);
}

.listing-location {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Details Page */
.detail-hero {
  padding-top: 100px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  margin-bottom: 80px;
}

@media (max-width: 900px) {
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image {
  width: 100%;
  max-width: 100%;
  height: 500px;
  border-radius: var(--border-radius-lg);
  object-fit: cover;
}

.thumbnail-strip {
  display: flex;
  gap: 16px;
}

.thumbnail {
  width: 100px;
  height: 70px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-blue);
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-title {
  font-size: 40px;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-price {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.detail-specs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.spec-label {
  color: var(--text-secondary);
}

.spec-val {
  font-weight: 500;
}

.detail-actions {
  margin-top: auto;
  display: flex;
  gap: 16px;
}

.detail-actions .btn {
  flex-grow: 1;
}

/* Features */
.features-section {
  padding: 80px 0;
  background: var(--surface-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

/* Footer */
footer {
  background: var(--bg-color);
  padding: 60px 0 40px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-column ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
  display: block;
}

.footer-column ul li a:hover {
  text-decoration: underline;
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal-links {
  display: flex;
  gap: 16px;
}

.footer-legal-links a {
  border-left: 1px solid var(--border-color);
  padding-left: 16px;
}

.footer-legal-links a:first-child {
  border-left: none;
  padding-left: 0;
}

.footer-legal-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-country {
  color: var(--text-primary);
}

@media (max-width: 1024px) {
  .footer-directory {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-directory {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-legal-links a {
    border-left: none;
    padding-left: 0;
    margin-right: 16px;
  }
}

/* ADMIN SPECIFIC STYLES */
.admin-container {
  padding-top: 100px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  min-height: 80vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

/* Admin Table */
.admin-table-wrapper {
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 40px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th,
.admin-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: #fafafc;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

.admin-table td {
  font-size: 15px;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table img.table-img {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* Form Styles */
.admin-form-container {
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  margin-bottom: 60px;
  display: none;
  /* Hidden by default */
}

.admin-form-container.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fafafc;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.action-btns {
  display: flex;
  gap: 12px;
}

.btn-danger {
  background-color: #ff3b30;
  color: white;
}

.btn-danger:hover {
  background-color: #d7140a;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}
/* Wizard Layout */
.wizard-layout {
  display: flex;
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  position: absolute;
  top: 100px; /* Below header */
  left: 0;
  right: 0;
  z-index: 100;
  min-height: 600px;
}

.admin-form-container.active.wizard-layout {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  position: relative;
  z-index: auto;
  top: auto;
  margin-top: 24px;
}

.wizard-sidebar {
  width: 250px;
  background-color: #f9f9fb;
  border-right: 1px solid var(--border-color);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  transition: var(--transition);
}

.wizard-step.active {
  opacity: 1;
}

.wizard-step.completed {
  opacity: 1;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.wizard-step.active .step-circle {
  background-color: var(--accent-blue);
  color: white;
}

.wizard-step.completed .step-circle {
  background-color: #34c759; /* Green for completed steps */
  color: white;
}

.step-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.wizard-step-line {
  width: 2px;
  height: 24px;
  background-color: var(--border-color);
  margin-left: 13px;
}

.wizard-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: white;
  min-width: 0; /* Important for flex children to not overflow */
}

.wizard-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.wizard-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

.wizard-panel {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.wizard-footer-right {
  display: flex;
  gap: 16px;
}

/* Category Grid (Wizard Step 1) */
.category-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.category-card-small {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-card-small:hover, .category-card-small.active {
  border-color: var(--accent-blue);
  background-color: var(--accent-light);
}

.category-card-small img {
  height: 40px;
  margin-bottom: 8px;
  object-fit: contain;
  mix-blend-mode: darken;
}

.category-card-small span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Subcategory Layout */
.search-bar-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.search-bar-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-bar-wrapper .search-input {
  padding-left: 36px;
}

.subcategory-selected-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.selected-cat-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-cat-info img {
  height: 32px;
  mix-blend-mode: darken;
}

.selected-cat-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.subcategory-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.subcategory-item {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-color);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
}

.subcategory-item:hover {
  background: var(--surface-color);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.subcategory-item.selected {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.back-btn-wrapper {
  margin-top: auto;
}

/* Media Upload Box */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--bg-color);
  position: relative;
}

.upload-area:hover {
  border-color: var(--accent-blue);
  background-color: var(--accent-light);
}

.upload-icon {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
