/* =====================================================
   GLOBAL STYLES
===================================================== */
body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 0;
}

/* =====================================================
   NAVIGATION BAR
===================================================== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #1a2537;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.nav-container {
  width: 95%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 45px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  background: #24324b;
  padding: 8px 14px;
  border-radius: 6px;
  transition: 0.3s;
}

.nav-btn:hover {
  background: red;
  color: white;
}

.cart-link {
  position: relative;
}

.cart-count {
  background: red;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  right: -10px;
}

.nav-user {
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-btn, .login-btn {
  background: red;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
}

.logout-btn:hover, .login-btn:hover {
  background: darkred;
}

/* =====================================================
   MAIN CONTAINERS
===================================================== */
.main-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 100px 30px 30px;
}

/* =====================================================
   SIDEBAR / FILTERS
===================================================== */
.filters {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: fit-content;
}

.filters h3 {
  margin-top: 0;
}

.filters input, .filters select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.filter-btn {
  width: 100%;
  background: red;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

.filter-btn:hover {
  background: darkred;
}

/* =====================================================
   PRODUCT LISTING
===================================================== */
.product-area {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.search-form {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.search-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 4px;
}

.search-form button {
  background: red;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
}

.product-card {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.product-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.product-mid h3 { margin: 0; color: #222; }
.product-mid p { margin: 2px 0; color: #555; }

.add-btn {
  background: red;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.add-btn:hover { background: darkred; }

.info-box {
  text-align: center;
  color: #666;
  padding: 40px;
}

/* =====================================================
   CART PAGE
===================================================== */
.cart-page {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  padding: 100px 30px 30px;
}

.cart-items, .cart-summary {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cart-card {
  display: grid;
  grid-template-columns: 100px 1fr 180px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.cart-img img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.cart-info h3 { margin: 0; }
.cart-info p { margin: 2px 0; }

.cart-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cart-controls input[type="number"] {
  width: 60px;
  text-align: center;
  margin-bottom: 5px;
}

.cart-controls button {
  background: red;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.cart-controls button:hover {
  background: darkred;
}

.remove-btn {
  background: #555;
  margin-top: 5px;
}

.summary-box {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.checkout-btn {
  width: 100%;
  background: red;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
}

.checkout-btn:hover {
  background: darkred;
}

.empty-cart {
  text-align: center;
  color: #777;
  padding: 40px;
}

/* =====================================================
   CATALOG PAGE (NEW)
===================================================== */
.catalog-container {
  margin-top: 100px;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

/* Filter bar */
.filter-bar {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.filter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-width: 180px;
}

.filter-form select {
  background: white;
  cursor: pointer;
}

.filter-form select:focus {
  border-color: red;
  outline: none;
}

.apply-btn {
  background: red;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
}
.apply-btn:hover { background: darkred; }

.reset-btn {
  background: #444;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.reset-btn:hover { background: #222; }

/* Product cards */
.result-count {
  font-weight: 600;
  margin-bottom: 20px;
}

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.product-card img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  margin-right: 15px;
}

.product-details {
  flex: 1;
  color: #333;
}

.add-cart {
  background: red;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.add-cart:hover {
  background: darkred;
}

.no-results {
  text-align: center;
  color: #888;
  margin: 30px 0;
}
/* ===== PRODUCT ROW STYLE (CATALOG VIEW) ===== */
.product-card {
  display: grid;
  grid-template-columns: 120px 1fr 220px;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-left img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 6px;
}

.product-center {
  color: #333;
}

.product-center h4 {
  margin: 0 0 5px 0;
  color: #111;
}

.product-center p {
  margin: 2px 0;
  color: #555;
  font-size: 14px;
}

.product-right {
  text-align: right;
}

.product-right p {
  margin: 4px 0;
  font-size: 14px;
  color: #333;
}

.product-right .qty {
  width: 50px;
  padding: 5px;
  text-align: center;
  margin-right: 5px;
}

.add-btn {
  background: red;
  color: #fff;
  border: none;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.add-btn:hover {
  background: darkred;
}
/* ===== MAIN LAYOUT ===== */
.main-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  margin-top: 100px;
  padding: 20px;
}

/* ===== LEFT SEARCH PANEL ===== */
.left-search {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: fit-content;
}

.left-search h3 {
  margin-top: 0;
  color: #111;
}

.left-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
}

.left-search button {
  width: 100%;
  background: red;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.left-search button:hover {
  background: darkred;
}

.left-search .tip {
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

/* ===== PRODUCT DISPLAY ===== */
.product-display {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-display h2 {
  margin-bottom: 20px;
}

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.product-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 15px;
}

.product-info {
  flex: 1;
  color: #333;
}

.product-info h4 {
  margin: 0;
  color: #222;
}

.product-info p {
  margin: 4px 0;
  color: #555;
}

.qty {
  width: 60px;
  padding: 5px;
  text-align: center;
  margin-top: 5px;
}

.add-btn {
  background: red;
  color: white;
  border: none;
  padding: 7px 12px;
  border-radius: 5px;
  margin-top: 5px;
  cursor: pointer;
  font-weight: bold;
}

.add-btn:hover {
  background: darkred;
}

.no-result {
  text-align: center;
  color: #777;
  padding: 40px;
}
.main-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.search-box {
  width: 25%;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-results {
  width: 75%;
  background: #f8f8f8;
  padding: 20px;
  border-radius: 10px;
}

.product-card {
  display: flex;
  justify-content: space-between;
  background: white;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.product-left img {
  border-radius: 6px;
}

.add-btn {
  background: red;
  color: white;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 5px;
}

