:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --background-color: #f8f9fa;
  --text-color: #212529;
  --text-muted: #6c757d;
  --card-bg: #ffffff;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-primary: 'DM Sans', sans-serif;
  --font-secondary: 'Lato', sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-color);
}

/* Navbar */
.navbar {
  background-color: #1e287d !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  height: 57px;
  padding: 0;
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white !important;
}

.nav-link {
  font-size: 14px;
  margin: 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: color 0.2s;
  padding: 8px;
}

.nav-link:hover {
  color: #ffffff !important;
  opacity: 1;
}

/* Search Bar */
.search {
  height: 45px;
  border-radius: 50px;
  border: 1px solid #ced4da;
  padding: 0 20px;
  outline: none;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.sbtn {
  height: 45px;
  width: auto;
  min-width: 100px;
  border: none;
  border-radius: 50px;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  margin-left: -40px;
  padding: 0 20px;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.sbtn:hover {
  background-color: var(--primary-hover);
}

/* Sections */
#home {
  padding-top: 40px;
  padding-bottom: 40px;
}

.item,
.trending {
  padding-top: 40px;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  overflow: hidden;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.card-img-top {
  width: 100%;
  height: 150px;
  /* Adjusted height */
  object-fit: contain;
  /* Changed to contain to show full product */
  padding: 0.5rem;
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  color: var(--text-color);
  min-height: 35px;
  /* Ensure consistent height for titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 8px;
}

.store-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 6px;
  padding: 0.35rem 1rem;
  font-weight: 600;
  width: 100%;
  transition: all var(--transition-speed);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
}

.card-footer {
  background-color: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Login */
.login {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  margin: 100px auto;
  border-radius: var(--border-radius);
  background: white;
  box-shadow: var(--box-shadow);
}

.login-css {
  width: 100%;
  border-radius: 50px;
  padding: 10px 20px;
  border: 1px solid #ced4da;
  margin-bottom: 15px;
}

/* Star Rating */
.star-rating {
  direction: rtl;
  display: inline-block;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 2px;
  color: #ddd;
  transition: color 0.2s;
}

.star-rating input:checked~label,
.star-rating input:hover~label,
.star-rating label:hover~label {
  color: #f2b600;
}

/* Status Indicator */
#statusIndicator li {
  padding: 12px 15px;
  margin: 8px 0;
  background-color: #fff;
  color: var(--text-color);
  border-radius: 8px;
  border-left: 5px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

#statusIndicator li.active {
  background-color: #e7f1ff;
  color: var(--primary-color);
  border-left: 5px solid var(--primary-color);
}

.statusPopup {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.9rem;
}

#statusIndicator li.active div.statusPopup {
  display: block !important;
}

/* Fonts */
@font-face {
  font-family: 'OptimusPrinceps';
  src: url('fonts/OptimusPrinceps.eot');
  src: local('☺'),
    url('fonts/OptimusPrinceps.woff') format('woff'),
    url('fonts/OptimusPrinceps.ttf') format('truetype'),
    url('fonts/OptimusPrinceps.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

.style1 {
  font-family: 'OptimusPrinceps' !important;
}

/* Utilities */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-12 {
  font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.5rem;
  }

  .nav-link {
    margin: 0 5px;
    font-size: 1rem;
  }

  .card-img-top {
    height: 200px;
  }
}