body {
  background-color: #f9fafb; /* Off-White */
  color: #2a3342; /* Deep Slate */
}

.promo-banner-sellpg {
  background-color: #1e3a8a; /* User-specified color */
  color: #fff; /* White text */
  text-align: center;
  padding: 6px 0; /* Adjust padding as needed */
  font-size: 1rem; /* Adjust font size as needed */
  position: relative; /* Added for z-index context */
  z-index: 5; /* Ensure banner is below navbar if they overlap */
}

.navbar-sellpg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background: #f8f9fa;
  box-shadow: none;
  font-family: var(--font-primary);
  position: relative;
  z-index: 10;
  border-top: 5px solid #a16207;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px; /* Added margin to push content down */
}

.main-navbar {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

/* Styles for the main navbar logo */
.main-navbar .logo-sellpg {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Adjust space between icon and text */
}

.main-navbar .logo-sellpg svg {
  stroke: #161c24; /* Icon color */
}

.main-navbar .logo-text-sellpg {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem; /* Logo text size */
  font-weight: 700;
  color: #161c24; /* Logo text color */
}

.navbar-sellpg .logo-sellpg {
  display: flex;
  align-items: center;
  gap: 0rem;
  height: 100%; /* Fill available space */
  color: #ffffff; /* logo text white */
  font-size: 1rem;
  font-weight: 700;
  margin-left: 0px;
}

.navbar-sellpg .logo-sellpg svg {
  stroke: #ffffff;
  fill: #161c24;
}
.navbar-sellpg .logo-text-sellpg {
  font-family: "Inter", sans-serif;
  display: block; /* Or inline, depending on desired layout */
}

.nav-tabs {
  border-bottom: none; /* Remove the default bottom border */
  margin-bottom: 3rem; /* Custom margin */
  margin-top: 3rem; /* Custom margin */
  display: flex;
}
.nav-tabs .nav-link.active {
  background-color: #6c757d; /* User-specified active color */
  color: #fff; /* White text for active tab */
  border: 1px solid #6c757d; /* User-specified active color */
  background-image: none; /* Remove pattern from active tab */
  padding: 0.75rem 2.8rem; /* Match inactive tabs */
  border-radius: 0.2rem; /* Match inactive tabs */
  opacity: 0.65;
}
.nav-tabs .nav-item {
  margin-right: 30px; /* Apply margin to the list item */
}
.nav-tabs .nav-item:last-child {
  margin-right: 0; /* Remove margin from the last item */
}
.nav-tabs .nav-link {
  color: #ffffff; /* Deep Slate */
  background-color: #343a40; /* Mint White */
  border: 1px solid #343a40; /* Cool Grey */

  /* margin-right: 70px; */ /* Removed margin from here */
  border-radius: 0.2rem; /* Increased for rounder corners */
  padding: 0.75rem 2.8rem; /* Increased padding for height/width control */
  font-size: 1rem; /* Control font size */
  opacity: 1;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.nav-tabs .nav-link:hover:not(.active) {
  border-color: #5a6268; /* Aqua Green */
  background-color: #5a6268; /* Slightly off-white on hover */
  color: #ffffff;
}
.nav-tabs .nav-link:last-child {
  margin-right: 0; /* Remove margin from the last item */
}

.card {
  font-size: 1rem;
  /* margin-bottom: 20px; */ /* REMOVED to let grid gap control spacing */
  border: 1px solid #a1acb3; /* Cool Grey */
  border-radius: 0.4rem; /* Increased for rounder corners */
  padding: 0.75rem 1rem; /* Increased padding for height/width control */
  background-color: #ffffff;
  max-width: 570px; /* CHANGED: Example new max-width */
  width: 100%; /* ADDED: Ensure card tries to fill container up to max-width */
  box-sizing: border-box; /* ADDED: Consistent box model */
  margin-left: auto; /* To center the card if it's narrower than the column */
  margin-right: auto; /* To center the card if it's narrower than the column */
}

.btn-info {
  background-color: #f39c12; /* User-specified button color */
  border-color: #f39c12;
  border-radius: 0.2rem;
  font-weight: 700;
  font-size: 0.8rem;
}
.btn-info:hover {
  background-color: #e08e0b; /* Darker shade for hover */
  border-color: #e08e0b;
}

/* Removed .product-cards-row rule */
.custom-card-container {
  display: grid; /* Use grid for layout */
  grid-template-columns: repeat(
    auto-fit,
    minmax(550px, 1fr)
  ); /* Responsive grid columns */
  gap: 20px; /* Define the gap between cards */
  padding-left: 50px; /* Existing padding */
  padding-right: 50px; /* Existing padding */
}

.price {
  font-size: 2.2rem;
  font-weight: 700;
  color: #000;
  line-height: 1;
  vertical-align: middle;
}

.price .price-currency {
  font-size: 1.2rem;
  vertical-align: super;
  font-weight: 300;
}

.price sup {
  font-size: 1.2rem;
  font-weight: 300;
  top: -0.8em;
  position: relative;
}

.card .card-title {
  font-weight: bold;
  color: #2a3342; /* Deep Slate */
  margin-bottom: 2rem;
}

.card .card-title a {
  color: #2a3342; /* Deep Slate */
  text-decoration: none;
}

.card .card-title a:hover {
  color: #20c4b6; /* Aqua Green */
  text-decoration: underline;
}

.card .card-text {
  font-size: 1rem; /* Reduced font size */
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  .promo-banner-sellpg {
    background-color: #1e3a8a; /* User-specified color */
    color: #fff; /* White text */
    text-align: center;
    padding: 4px 0; /* Adjust padding as needed */
    font-size: 0.8rem; /* Adjust font size as needed */
    position: relative; /* Added for z-index context */
    z-index: 5; /* Ensure banner is below navbar if they overlap */
  }
  .nav-tabs .nav-link:hover:not(.active) {
    border-color: #5a6268; /* Aqua Green */
    background-color: #5a6268; /* Slightly off-white on hover */
    color: #ffffff;
  }

  .nav-tabs .nav-link:last-child {
    margin-right: 0; /* Remove margin from the last item */
  }

  .custom-card-container {
    padding-left: 15px; /* Reduced padding for small screens */
    padding-right: 15px; /* Reduced padding for small screens */
    grid-template-columns: 1fr; /* Ensure single column taking full width */
    gap: 15px; /* Optional: adjust gap for smaller screens */
  }

  /* === BEGINNING OF NEW STYLES FOR CARD CONTENT AT <= 480px === */
  .card .row .col-md-4 {
    /* Image column */
    flex: 0 0 30% !important;
    max-width: 30% !important;
  }

  .card .row .col-md-8 {
    /* Content column */
    flex: 0 0 70% !important;
    max-width: 70% !important;
    display: flex;
    flex-direction: column;
  }

  .card .card-img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Ensure whole image is visible */
    max-height: 100px; /* Limit image height if it's very tall */
  }

  .card .card-body {
    padding: 0.5rem 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
  }

  .card .card-title {
    font-size: 0.85rem; /* Reduced font size */
    margin-bottom: 0.2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-weight: bold;
  }

  .card .card-title .price {
    font-size: 1.8rem; /* Reduced font size */
    float: none;
    margin-left: 5px;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
  }

  .card .card-title .price .price-currency {
    font-size: 0.8rem;
    vertical-align: super;
    font-weight: normal;
  }

  .card .card-title .price sup {
    font-size: 0.8rem;
    font-weight: normal;
    top: -0.8em;
    position: relative;
  }

  .card .card-text {
    font-size: 0.7rem; /* Reduced font size */
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-height: 32px; /* Approx 3 lines for 0.7rem font */
    padding-right: 0;
  }

  .card .row.no-gutters {
    /* For image vertical alignment */
    align-items: center;
  }

  .card div.form-inline {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
  }

  .card div.form-inline .form-control {
    display: none;
  }

  .card .form-inline .btn {
    display: inline-block;
    width: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
  }

  .card .badge-level {
    font-size: 0.7rem;
  }

  /* === END OF NEW STYLES FOR CARD CONTENT AT <= 480px === */
}
.badge-level,
.badge-language,
.badge-category {
  color: white;
  padding: 0.4em 0.8em;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  margin-right: 0.25rem;
  display: inline-block;
}
.badge-level {
  background-color: #2a3342; /* Dark Slate Grey */
}
.badge-language {
  background-color: #5a6268; /* Medium Grey */
}
.badge-category {
  background-color: #adb5bd; /* Light Grey */
  cursor: pointer;
}
.star-rating-display {
  display: flex;
  align-items: center;
}
.star-rating-display .star-icon {
  width: 1rem;
  height: 1rem;
  color: #ffc107; /* Bootstrap's warning color for yellow */
}
.star-rating-display .rating-value {
  margin-left: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.card .form-inline {
  width: fit-content;
}

@media (min-width: 770px) {
  .nav-tabs .nav-link:hover:not(.active) {
    border-color: #5a6268; /* Aqua Green */
    background-color: #5a6268; /* Slightly off-white on hover */
    color: #ffffff;
  }

  .card-body {
    position: relative;
  }
  .card-title .price {
    position: absolute;
    /* Aligned to be parallel with the first line of the description. */
    top: 5.4rem; /* Corrected value to align with the description's first line */
    right: 1.25rem; /* Aligned with card padding */
    float: none;
  }
  .card-text {
    /* Added padding to prevent text from flowing under the price. */
    padding-right: 6.5rem;
  }
}

@media (max-width: 445px) {
  .badge-level,
  .badge-language,
  .badge-category {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.15rem;
  }

  .main-navbar .logo-text-sellpg {
    font-family: "Inter", sans-serif;
    font-size: 1.2rem; /* Logo text size */
    font-weight: 700;
    color: #161c24; /* Logo text color */
  }

  .nav-tabs .nav-link:hover:not(.active) {
    border-color: #5a6268; /* Aqua Green */
    background-color: #5a6268; /* Slightly off-white on hover */
    color: #ffffff;
  }
}

@media (max-width: 400px) {
  .nav-tabs .nav-link:hover:not(.active) {
    border-color: #5a6268; /* Aqua Green */
    background-color: #5a6268; /* Slightly off-white on hover */
    color: #ffffff;
  }

  .badge-level,
  .badge-language,
  .badge-category {
    font-size: 0.58rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.15rem;
  }
}

@media (max-width: 376px) {
  .nav-tabs .nav-link:hover:not(.active) {
    border-color: #5a6268; /* Aqua Green */
    background-color: #5a6268; /* Slightly off-white on hover */
    color: #ffffff;
  }

  .badge-level,
  .badge-language,
  .badge-category {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.15rem;
  }
  .main-navbar .logo-text-sellpg {
    font-family: "Inter", sans-serif;
    font-size: 1rem; /* Logo text size */
    font-weight: 700;
    color: #161c24; /* Logo text color */
  }
}
