* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #1f2937;
}

.top-header {
  background: #ff5a00;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
}

.search-box {
  flex: 1;
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  border: none;
  padding: 13px;
  font-size: 15px;
  outline: none;
}

.search-box button,
.sidebar button,
.checkout-btn,
.seller-form button,
.hero-btn,
.card button {
  border: none;
  background: #1f2937;
  color: white;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
}

.search-box button {
  border-radius: 0;
}

.top-nav a {
  color: white;
  text-decoration: none;
  margin-left: 14px;
  font-weight: bold;
}

#cartCount {
  background: #1f2937;
  padding: 3px 7px;
  border-radius: 20px;
}

.promo-bar {
  background: #fff3e8;
  color: #9a3412;
  text-align: center;
  padding: 10px;
  font-weight: bold;
}

.hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  padding: 50px 8%;
  background: linear-gradient(120deg, #ffffff, #ffe2cc);
}

.hero h1 {
  font-size: 44px;
  max-width: 650px;
  margin: 0 0 12px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 28px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 30px 8%;
}

.sidebar {
  background: white;
  border-radius: 14px;
  padding: 20px;
  height: fit-content;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.sidebar button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  background: #f3f4f6;
  color: #111827;
  text-align: left;
}

.sidebar button:hover {
  background: #ffedd5;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
}

.section-title select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-3px);
}

.card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  background: #e5e7eb;
}

.card h3 {
  min-height: 48px;
  margin-bottom: 6px;
}

.category {
  color: #6b7280;
  font-size: 14px;
}

.price {
  font-size: 24px;
  font-weight: 800;
  color: #ff5a00;
}

.description {
  font-size: 14px;
  color: #4b5563;
  min-height: 42px;
}

.card button {
  width: 100%;
  background: #ff5a00;
}

.cart-panel,
.seller-panel,
.info-section {
  margin: 30px 8%;
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.cart-total {
  font-size: 24px;
  font-weight: 800;
  margin: 18px 0;
}

.checkout-btn {
  background: #16a34a;
}

.seller-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.seller-form input,
.seller-form textarea {
  padding: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
}

.seller-form textarea {
  grid-column: span 2;
  min-height: 90px;
}

.seller-form button {
  background: #ff5a00;
  grid-column: span 2;
}

.info-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-section div {
  background: #f9fafb;
  border-radius: 12px;
  padding: 18px;
}



.admin-panel,
.login-panel {
  margin: 30px 8%;
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.admin-card {
  background: #fff3e8;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.admin-card h3 {
  margin-top: 0;
  font-size: 16px;
}

.admin-card p {
  margin-bottom: 0;
  color: #ff5a00;
  font-size: 28px;
  font-weight: bold;
}

.admin-actions {
  margin-top: 24px;
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
}

.admin-actions button {
  border: none;
  background: #16a34a;
  color: white;
  padding: 11px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 8px;
}

.admin-actions .remove-btn {
  background: #dc2626;
}

.login-form {
  display: grid;
  gap: 14px;
  max-width: 500px;
}

.login-form input {
  padding: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
}

.login-form button {
  border: none;
  background: #ff5a00;
  color: white;
  padding: 13px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.social-links {
  margin-top: 14px;
}

.social-links a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
}

.social-links a:hover {
  color: #ff5a00;
}

footer {
  background: #111827;
  color: white;
  text-align: center;
  padding: 24px;
  margin-top: 40px;
}

@media (max-width: 850px) {
  .top-header {
    flex-direction: column;
    align-items: stretch;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .seller-form,
  .info-section,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .seller-form textarea,
  .seller-form button {
    grid-column: span 1;
  }

  .hero h1 {
    font-size: 34px;
  }
}
