.catalog-container{
	display: flex;
	max-width: 1535px;
	margin: 0 auto;
	gap: 30px;
	align-items: flex-start
}
.search-results-container{
	flex-grow: 1;
	min-width: 0; /* ✅ Allow shrinking */
	overflow-x: hidden; /* ✅ Prevent horizontal scroll */
}
.brand-item{
	margin-bottom: 6px;
	cursor: pointer;
	padding: 2px 10px;
	border-radius: 4px
}
.brand-item a{
	text-decoration: none;
	color: #333
}
.brand-item.active,.brand-item:hover{
	background: #eaf3ff;
	color: #007bff
}

.brand-item.active {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-container{
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
	gap: 20px;
	justify-content: flex-start;
}
.result-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  position: relative;
}

.result-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  transform: translateY(-4px);
  border-color: #007bff;
}
/* ✅ IMPROVED: Better image container */
.img-container {
  height: 180px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-bottom: 16px;
  border-radius: 8px;
  position: relative;
}

.img-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.1) 50%, transparent 51%);
  pointer-events: none;
}

.img-container img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.result-info{
	display: flex;
	flex-direction: column;
	padding: 5px 10px 0 10px;
	flex: 1; /* Take remaining space */
	justify-content: space-between;
	font-family: 'Segoe UI',Tahoma,sans-serif
}
.result-info h3{
	font-size: 18px;
	margin: 0 0 8px;
	color: #17215b;
	line-height: 1.3;
	max-height: 3.9em; /* Allow up to 3 lines */
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3; /* Show max 3 lines */
	-webkit-box-orient: vertical;
	word-wrap: break-word;
}
.result-info p{
	font-size: 16px;
	color: #555;
	margin-bottom: 6px;
	line-height: 1.4;
	max-height: 2.8em; /* Allow up to 2 lines */
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2; /* Show max 2 lines */
	-webkit-box-orient: vertical;
	word-wrap: break-word;
}
.result-info .result-price{
    font-weight: 700;
	color: #0074c7 !important;
	font-size: 19px;
	margin-top: auto;
	flex-shrink: 0; /* Don't shrink price */
}
.results-wrapper{
	max-width: 1200px;
	margin: 0 auto;
	padding: 5px
}
.sort-bar{
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-bottom: 20px
}
.sort-bar label{
	margin-right: 10px;
	font-weight: 700;
	font-size: 14px
}
.sort-bar select{
	padding: 6px 10px;
	border-radius: 4px;
	border: 1px solid #ccc;
	font-size: 14px
}
.card-name{
	font-size: 14px;
	font-weight: 500;
	margin: 4px 0;
	line-height: 1.3;
	max-height: 2.6em; /* Allow up to 2 lines */
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-wrap: break-word;
}
.card-price{
	font-weight: 700;
	color: #003087;
	font-size: 16px
}
.card-body{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	padding: 0px;
}
.card-title{
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 4px
}
.card-brand,.card-price{
	font-size: 13px;
	color: #333
}
.bottom-meta{
	margin-top: auto
}
.sidebar-filters{
	width: 300px!important;
	padding: 16px;
	background-color: none;
	font-family: 'Segoe UI',sans-serif;
	flex-shrink: 0
}
#brand-search{
	width: 100%;
	padding: 6px;
	font-size: 14px;
	margin-top: 10px;
	margin-bottom: 10px;
	box-sizing: border-box
}
.search-description-form button{
	margin-top: 6px;
	padding: 6px 12px;
	font-size: 14px;
	cursor: pointer
}
.sort-form select{
	width: 100%;
	padding: 6px;
	font-size: 14px;
	margin-top: 8px;
	margin-bottom: 12px
}
.brand-scroll{
	max-height: 500px;
	overflow-y: auto;
	border: 1px solid #ccc;
	padding: 6px;
	border-radius: 4px;
	background-color: #fff
}
.brand-item{
	margin-bottom: 6px
}
.brand-item a{
	text-decoration: none;
	color: #333
}
.brand-item a.active{
	font-weight: 700;
	color: #007bff
}
.pagination{
	text-align: center;
	margin-top: 30px
}
.pagination a,.pagination span{
	display: inline-block;
	padding: 8px 12px;
	margin: 2px;
	border-radius: 5px;
	text-decoration: none;
	background-color: #003087;
	color: #fff;
	font-weight: 700
}
.pagination a.active{
	background-color: #f44336
}
.pagination span{
	background-color: transparent;
	color: #333;
	font-weight: 400
}
.page-btn{
	padding: 8px 14px;
	background-color: #003087;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	transition: background .2s ease
}
.page-btn:hover{
	background-color: #001c57
}
.page-btn.active{
	background-color: #f44336;
	font-weight: 700
}
.input-group>.form-control{
	width: 1%;
	min-width: 0
}
.centered-stripe{
	width: 120px;
	height: 6px;
	margin: 20px auto;
	background: linear-gradient(-45deg,#f44336 0,#f44336 33%,#2e2d77 33%,#2e2d77 66%,#0af 66%,#0af 100%);
	border-radius: 5px
}
.filter-toggle-btn{
	font-size: 1rem;
	padding: .55rem 1.1rem;
	border-radius: 2rem;
	letter-spacing: .01em;
	box-shadow: 0 1px 4px rgba(44,62,80,.06);
	font-weight: 500;
	background: #fff;
	color: #001c57;
	border: 1.5px solid #001c57;
	transition: background .15s,color .15s,border .15s;
	margin-top: 18px
}
.filter-toggle-btn:focus,.filter-toggle-btn:hover{
	background: #001c57;
	color: #fff;
	border-color: #001c57;
	text-decoration: none
}
@media (max-width: 992px){
	.catalog-container{
		display: block;
		max-width: 1535px;
		margin: 0 auto;
		gap: 30px;
		align-items: flex-start
}
	.sidebar-filters{
		width: 95%!important;
		padding: 16px;
		margin: auto;
		background-color: none;
		font-family: 'Segoe UI',sans-serif;
		flex-shrink: 0
}
}


/* ✅ Breadcrumb Styling */
.product-crumbs {
  background: transparent;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 0;
  list-style: none;
  background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  display: inline-block;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  color: #6c757d;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: #001c57;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* ✅ Mobile responsive breadcrumb */
@media (max-width: 992px) {
  .product-crumbs nav {
    margin: 10px 15px 15px 15px !important;
  }
  
  .breadcrumb {
    font-size: 0.8em !important;
    flex-wrap: wrap;
  }
  
  .breadcrumb-item {
    margin-bottom: 2px;
  }

	.result-card {
		min-height: 380px;
	}
  
  /* Stack breadcrumb items on very small screens */
  @media (max-width: 480px) {
	.result-card {
		min-height: 300px;
	}
    .breadcrumb {
      flex-direction: column;
      gap: 4px;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
      content: "↳";
      padding-right: 0.25rem;
      padding-left: 0;
    }
  }
}

/* ✅ Adjust container spacing to account for breadcrumb */
.account-container {
  min-height: 100vh;
  padding: 20px 20px 40px 20px; /* Reduced top padding since breadcrumb provides spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ✅ Mobile search container styling */
.mobile-search-container {
  margin: 0 15px 15px 15px;
  width: calc(100% - 30px); /* ✅ Ensure full width minus margins */
}

.mobile-search-container .input-group {
  width: 100%; /* ✅ Ensure input group takes full width */
  display: flex; /* ✅ Force flex layout */
  flex-wrap: nowrap; /* ✅ Prevent wrapping */
}

.mobile-search-container .form-control {
  border-radius: 0.375rem 0 0 0.375rem;
  border: 2px solid #007bff;
  font-size: 18px; /* ✅ INCREASED: Bigger text for mobile readability */
  font-weight: 500; /* ✅ ADDED: Slightly bolder text */
  padding: 12px 16px; /* ✅ INCREASED: More padding for bigger touch target */
  flex: 1; /* ✅ Take available space */
  min-width: 0; /* ✅ Allow shrinking */
  width: auto; /* ✅ Override any fixed width */
  line-height: 1.4; /* ✅ ADDED: Better line height */
}

.mobile-search-container .form-control::placeholder {
  font-size: 16px; /* ✅ ADDED: Slightly smaller placeholder text */
  color: #6c757d;
  font-weight: 400;
}

.mobile-search-container .btn-outline-secondary {
  border-radius: 0 0.375rem 0.375rem 0;
  border: 2px solid #007bff;
  background-color: #007bff;
  color: white;
  flex-shrink: 0; /* ✅ Prevent button from shrinking */
  white-space: nowrap; /* ✅ Prevent text wrapping */
  font-size: 12px; /* ✅ ADDED: Bigger button text */
  font-weight: 600; /* ✅ ADDED: Bolder button text */
}

.mobile-search-container .btn-outline-secondary:hover {
  background-color: #001c57;
  border-color: #001c57;
}

/* ✅ FIXED: Override any conflicting input-group styles */
.mobile-search-container .input-group > .form-control {
  width: auto !important; /* ✅ Override the 1% width rule */
  min-width: 0 !important; /* ✅ Allow proper sizing */
  flex: 1 1 auto !important; /* ✅ Proper flex behavior */
}

/* ✅ FIXED: Ensure proper mobile display */
@media (max-width: 768px) {
  .mobile-search-container {
    margin: 0 10px 15px 10px;
    width: calc(100% - 20px);
  }
  
  .mobile-search-container .input-group {
    width: 100%;
    min-width: 280px; /* ✅ Minimum width to prevent collapse */
  }
  
  .mobile-search-container .form-control {
    min-width: 180px; /* ✅ Minimum input width */
    font-size: 16px; /* ✅ Prevent iOS zoom */
  }
  
  .mobile-search-container .btn-primary {
    min-width: 60px; /* ✅ Minimum button width */
    padding: 0.5rem 0.75rem;
  }
}

/* ✅ FIXED: Very small screens */
@media (max-width: 480px) {
	.breadcrumb {
	display:none;
  }


  .mobile-search-container {
    margin: 0 5px 15px 5px;
    width: calc(100% - 10px);
  }
  
  .mobile-search-container .input-group {
    min-width: 260px;
  }
  
  .mobile-search-container .form-control {
    min-width: 160px;
    font-size: 16px;
  }
  
  .mobile-search-container .btn-primary {
    min-width: 50px;
    padding: 0.5rem;
  }
  
  /* ✅ Stack search on very small screens if needed */
  @media (max-width: 320px) {
    .mobile-search-container .input-group {
      flex-direction: column;
      min-width: auto;
    }
    
    .mobile-search-container .form-control {
      border-radius: 0.375rem 0.375rem 0 0;
      border-bottom: 1px solid #007bff;
      min-width: auto;
      width: 100%;
    }
    
    .mobile-search-container .btn-primary {
      border-radius: 0 0 0.375rem 0.375rem;
      border-top: none;
      min-width: auto;
      width: 100%;
    }
  }
}

/* ✅ FIXED: Remove conflicting input-group styles that cause collapse */
.input-group > .form-control {
  width: 1%; /* ✅ This was causing the issue - override it for mobile search */
  min-width: 0;
}

/* ✅ Override specifically for mobile search */
.mobile-search-container .input-group > .form-control {
  width: auto !important; /* ✅ Override the 1% rule */
  flex: 1 1 auto !important;
  min-width: 150px !important; /* ✅ Ensure minimum width */
}

/* ✅ FIXED: Improved filter toggle button responsive behavior */
.filter-toggle-btn {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap; /* ✅ Prevent text wrapping */
  min-width: 120px; /* ✅ Minimum width */
}

.filter-toggle-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.filter-toggle-btn i {
  margin-right: 0.5rem;
}

/* ✅ FIXED: Mobile responsive adjustments */
@media (max-width: 992px) {
  .catalog-container {
    padding: 0 10px;
  }
  
  .filter-toggle-btn {
    width: auto;
    min-width: 150px;
    margin: 10px auto; /* ✅ Center the button */
    display: block; /* ✅ Make it block level for centering */
  }

  #pn-text {
    font-size:100%;
  }
}

/* ✅ FIXED: Ensure desktop search is properly hidden on mobile */
@media (max-width: 991.98px) {
  .d-none.d-lg-block {
    display: none !important;
  }
}

/* ✅ FIXED: Prevent search container from overflowing */
.search-results-container {
  flex-grow: 1;
  min-width: 0; /* ✅ Allow shrinking */
  overflow-x: hidden; /* ✅ Prevent horizontal scroll */
}

/* ✅ FIXED: Ensure catalog container doesn't cause overflow */
.catalog-container {
  display: flex;
  max-width: 1535px;
  margin: 0 auto;
  gap: 30px;
  align-items: flex-start;
  overflow-x: hidden; /* ✅ Prevent horizontal overflow */
}

@media (max-width: 992px) {
  .catalog-container {
    display: block;
    max-width: 100%; /* ✅ Use full width on mobile */
    margin: 0 auto;
    gap: 15px; /* ✅ Smaller gap on mobile */
    padding: 0 5px; /* ✅ Small padding to prevent edge touching */
  }
}

/* ✅ MOBILE: Featured items style - 2+ items per row */
@media (max-width: 992px) {
  .results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* ✅ Smaller min-width for 2+ items */
    gap: 12px; /* ✅ Smaller gap like featured items */
    padding: 0 10px;
    justify-content: center;
  }
  
  .result-card {
    min-height: 320px; /* ✅ Shorter cards for mobile grid */
    padding: 12px;
    border-radius: 10px;
  }
  
  .img-container {
    height: 120px; /* ✅ Smaller image container */
    margin-bottom: 10px;
    border-radius: 6px;
  }
  
  .result-info h3 {
    font-size: 16px; /* ✅ Smaller title */
    line-height: 1.2;
    max-height: 2.4em; /* ✅ Max 2 lines */
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
  }
  
  .result-info p {
    font-size: 13px; /* ✅ Smaller description */
    line-height: 1.3;
    max-height: 2.6em;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }
  
  .result-info .result-price {
    font-size: 16px; /* ✅ Smaller price */
    margin-top: 8px;
  }
  
  .centered-stripe {
    width: 60px; /* ✅ Smaller stripe */
    height: 4px;
    margin: 12px auto;
  }
}

/* ✅ TABLET: 2-3 items per row */
@media (max-width: 768px) and (min-width: 481px) {
	.container{
		padding-left: 0px;
		padding-right:0px;
	}
  .results-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    padding: 0 8px;
  }
  
  .result-card {
    min-height: 300px;
    padding: 10px;
  }
  
  .img-container {
    height: 110px;
  }
  
  .result-info h3 {
    font-size: 15px;
  }
  
  .result-info p {
    font-size: 12px;
  }
  
  .result-info .result-price {
    font-size: 15px;
  }
}

/* ✅ MOBILE: 2+ items per row (like featured items) */
@media (max-width: 480px) {
  .results-container {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); /* ✅ 2-3 items per row */
    gap: 8px;
    padding: 0 5px;
    margin: 0 auto;
  }

  .container{
		padding-left: 0px;
		padding-right:0px;
	}
  
  .result-card {
    min-height: 225px; /* ✅ Compact height */
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }
  
  .result-card:hover {
    transform: translateY(-2px); /* ✅ Smaller hover effect */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .img-container {
    height: 100px; /* ✅ Featured items size */
    margin-bottom: 8px;
    border-radius: 4px;
  }
  
  .img-container img {
    max-height: 85%;
    max-width: 85%;
  }
  
  .result-info {
    padding: 2px 4px 0 4px; /* ✅ Tighter padding */
  }
  
  .result-info h3 {
    font-size: 14px; /* ✅ Compact title */
    line-height: 1.2;
    max-height: 2.4em;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
    font-weight: 600;
  }
  
  .result-info p {
    font-size: 11px; /* ✅ Very compact description */
    line-height: 1.2;
    max-height: 2.4em;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
    color: #666;
  }
  
  .result-info .result-price {
    font-size: 14px; /* ✅ Compact price */
    font-weight: 700;
    margin-top: 6px;
	color: #0074c7 !important;
  }
  
  .centered-stripe {
    width: 40px; /* ✅ Tiny stripe */
    height: 3px;
    margin: 8px auto;
  }
  
  .bottom-meta {
    margin-top: 6px;
  }
}

/* ✅ VERY SMALL SCREENS: Force 2 items per row minimum */
@media (max-width: 360px) {
  .results-container {
    grid-template-columns: 1fr 1fr; /* ✅ Exactly 2 items per row */
    gap: 6px;
    padding: 0 3px;
  }
  
  .result-card {
    min-height: 260px;
    padding: 6px;
  }
  
  .img-container {
    height: 85px;
    margin-bottom: 6px;
  }
  
  .result-info h3 {
    font-size: 14px;
    margin-bottom: 3px;
  }
  
  .result-info p {
    font-size: 10px;
    margin-bottom: 4px;
  }
  
  .result-info .result-price {
    font-size: 14px;
  }
  
  .centered-stripe {
    width: 30px;
    height: 2px;
    margin: 6px auto;
  }
}

/* ✅ LANDSCAPE MOBILE: More items per row */
@media (max-width: 768px) and (orientation: landscape) {
  .results-container {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* ✅ More items in landscape */
    gap: 8px;
  }
  
  .result-card {
    min-height: 240px;
  }
  
  .img-container {
    height: 80px;
  }
}

/* ✅ ENSURE: Grid layout works well with different content lengths */
.results-container {
  align-items: stretch; /* ✅ Make all cards same height in row */
}

.result-card {
  display: flex;
  flex-direction: column;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ✅ OPTIONAL: Add subtle grid lines for better separation on small screens */
@media (max-width: 480px) {
  .results-container {
    background: linear-gradient(to right, transparent 49%, #f0f0f0 50%, transparent 51%);
    background-size: calc(50% + 4px) 100%;
    background-repeat: repeat-x;
  }
}