.inquiry-body {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
  }

  .inquiry-product {
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid lightgray;
    background: ghostwhite;
    margin-top: 10px;
    margin-bottom: 14px;
  }

  .inquiry-product__image img {
    width: 90px;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
    padding: 5px;
  }

  .inquiry-product__details {
    padding: 5px 0px;
    flex: 1;
  }

  .inquiry-product__title {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0px;
  }

  .inquiry-product__part {
    font-size: 13px;
    color: #6c757d;
  }

  .inquiry-product__price {
    font-size: 15px;
    font-weight: 600;
    color: #198754;
  }

  @media (max-width: 768px) {
    .inquiry-product__image img {
      width: 110px;
    }

    .inquiry-product__title {
      font-size: 12px;
    }

    .modal-body input, .modal-body textarea {
      padding: 5px !important; 
    }

    .mb-1 {
      margin-bottom: 5px !important;
    }

    .btn-primary, .btn-buy-now {
      width: 50%;
      margin-top: 0px;
      padding: 8px 0px;
    }
  }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Product card */
.product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Image */
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  padding: 3px;
}

.product-info {
  margin-bottom: -25px;
  padding-top: 14px;
  flex-grow: 1;
}

.product-actions {
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Price */
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
}

.strike-price {
  font-size: 0.95rem;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 6px;
}

.status {
  font-weight: 600;
  padding: 2px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-block;
}


.part-no {
  font-size: 13px !important;
  color: var(--text-light);
  padding: 2px;
  margin-top: -16px;
  word-break: break-all; /* handles long PartNo nicely */
}
/* ------------------ Responsive ------------------ */

/* Tablets */
@media (max-width: 768px) {
  .product-title {
    font-size: 12px !important;
  }

  .product-price {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }

  .product-title {
    font-size: 12px !important;
  }

  .product-price {
    font-size: 1.1rem;
  }

  .product-actions {
    margin-top: 30px;
  }

                 
  .product-info {
    margin-bottom: -25px;
    padding-top: 5px;
    flex-grow: 1;
  }

}

.btn-add-to-cart-listing.inquiry-btn {
  background-color: var(--text-light);
}

.price-section-save {
  background: none;
  color: #28a745;
  font-weight: 600;
  margin-top: -12px;
  font-size: 12px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.category-item {
  padding: 0.35rem 0;
  line-height: 1.2;
  cursor: pointer;
  color: #444;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  transition: color 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* CATEGORY NAME + ICON */
.category-name {
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.toggle-icon {
  font-weight: bold;
  color: #999;
  width: 16px;
  display: inline-block;
  text-align: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.category-item:hover .category-name {
  color: var(--secondary-color);
}

.category-item.active .category-name {
  color: var(--primary-color);
  font-weight: 600;
}

.category-item.active .toggle-icon {
  color: var(--secondary-color);
}

.category-item.active .subcategory-list  .toggle-icon {
  color: var(--text-light);
}

.subcategory-list {
  list-style: none;
  padding-left: 0.3rem;
  margin-top: 0.2rem;
  display: none;
  border-left: 1px solid #e0e0e0;
}

.subcategory-list .third-lev-cat-list {
  list-style: none;
  padding-left: 0.5rem;
  
  display: none;
  border-left: 1px solid #e0e0e0;
}

.subcategory-item {
  padding: 0.25rem 0;
  line-height: 1.1;
  color: #555;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.subcategory-item:hover {
  color: var(--accent-color);
}

.subcategory-item.active {
  color: var(--accent-color);
  font-weight: 600;
}

.subcategory-item.active .third-lev-cat-list {
  color: var(--text-light);
}

@media (max-width: 768px) {
  .filter-container {
    padding: 0.5rem 0.6rem;
  }

  .filter-title {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }

  .category-item {
    font-size: 0.95rem;
    padding: 0.3rem 0;
  }

  .subcategory-item {
    font-size: 0.85rem;
    padding: 0.2rem 0;
  }
}

  .vehicle-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 1.5rem;
  }

  .filter-group {
    flex: 1 1 200px; /* responsive width — min 200px */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  } 

  .filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .filter-select:hover,
  .filter-select:focus {
    border-color: var(--accent-color);
    box-shadow: var(--accent-color);
    outline: none;
  }

  @media (max-width: 768px) {
    .vehicle-filter-container {
      align-items: stretch;
    }
  }

  #sidebarChangeVehicle {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
  }


.view-options__body--filters {
  margin-bottom: 1rem;
}

/* ===============================
   DESKTOP DEFAULT (NO CHANGE)
   =============================== */
.applied-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Filter pill */
.applied-filters__item {
  display: inline-flex;
  align-items: center;
  background-color: var(--error-color);
  color: var(--bg-white);
  font-size: 0.875rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.applied-filters__item:hover {
  background-color: var(--accent-color);
}

/* Button inside pill */
.applied-filters__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  padding: 6px 14px;
  background: none;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.applied-filters__button svg {
  width: 10px;
  height: 10px;
  fill: #fff;
}

/* Clear all */
.applied-filters__button--clear {
  border-radius: 20px;
  padding: 6px 12px;
}

/* ===============================
   MOBILE ONLY FIX
   =============================== */
@media (max-width: 768px) {

  /* No grid, no full width */
  .applied-filters__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Keep filter SMALL */
  .applied-filters__item {
    max-width: fit-content;
    font-size: 0.75rem;
  }

  .applied-filters__button {
    padding: 6px 10px;
    gap: 4px;
  }

  /* Prevent long text breaking layout */
  .applied-filters__button span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Clear button also small */
  .applied-filters__button--clear {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

.subcategory-item.active .third-lev-cat-list {
  display: block;
}

.third-lev-cat-list li {
    margin-bottom: var(--spacing-xs);
}

.third-lev-cat-list li a {
    color: var(--text-light);
    font-size: 0.9rem;
    /*padding: var(--spacing-xs) 0;*/
    display: block;
}

.third-lev-cat-list li:hover a {
    color: var(--secondary-color);
}

.third-lev-cat-list li.active-sub a {
    color: var(--accent-color);
    font-weight: 600;
}

.third-lev-cat-list {
    list-style: none;
    margin-left: 23px;
    margin-top: var(--spacing-xs);
    display: none;
}

.subcategory-item.active .subcategory-name {
  color: var(--secondary-color);
  font-weight: 600;
}

.third-lev-cat-item.active {
  color: var(--accent-color);
  font-weight: 600;
}

.third-lev-cat-item {
  color: var(--text-light-color);
  font-weight: 600;
}

/* Desktop default */
/* Default: hidden */
.mobile-filter-btn {
  display: none;
}

/* Mobile view */
@media (max-width: 768px) {
  .products-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: #ff6600;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transition: left 0.3s ease;
  }

  .filters-sidebar.active {
    left: 0;
  }
}

.filters-close-btn {
  display: none;
}

@media (max-width: 768px) {
  .filters-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 10px;
    margin-left: auto;
    margin-right: 10px;
    background: transparent;
    border: none;
    font-size: 22px;
    z-index: 10000;
  }
}
.filters-overlay {
  display: none;
}

@media (max-width: 768px) {
  .filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
  }

  .filters-overlay.active {
    display: block;
  }
}




 /* =========================
   MOBILE MODAL IMPROVEMENTS
   ========================= */
@media (max-width: 576px) {

  .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }

  .modal-content {
    height: 100%;
    border-radius: 10px;
  }

  .modal-body {
    
    overflow-y: auto;
  }

  .modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  /* Inputs easier to tap */
  .modal-body input,
  .modal-body textarea {
    font-size: 1rem;
    padding: 10px;
  }
}

  .modal-title {
    margin-bottom: 8px;
    font-size: 1.1rem;
  }

  .modal-header {
    display: flex;
    justify-content: center;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    gap: 10px;
  }

.modal {
  z-index: 1100 !important;
}

.modal-backdrop {
  z-index: 1090 !important;
}

@media (max-width: 576px) {
  .modal {
    z-index: 1100 !important;
  }

  .modal-backdrop {
    z-index: 1090 !important;
  }
}

body.modal-open {
  overflow: hidden;
}

/* =========================
   DESKTOP MODAL – CLEAN & COMPACT
   ========================= */
@media (min-width: 577px) {

  .modal-dialog {
    max-width: 600px;        
    margin: 10vh auto;       
  }

  .modal-content {
    border-radius: 10px;
  }

  /* Prevent internal scrolling */
  .modal-body {
    overflow: visible;
    max-height: none;
  }

 

  /* Inputs look tighter */
  .modal-body input,
  .modal-body textarea {
    font-size: 0.95rem;
  }
}


@media (min-width: 577px) {
  .modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.2s ease-out;
  }

  .modal.show .modal-dialog {
    transform: scale(1);
  }
}

@media (max-width: 576px) {

  .modal-dialog {
    margin: 1rem auto;   
    max-width: 100%;
    height: auto;
  }

  .modal-content {
    max-height: none;
  }

  .modal-body {
    overflow: visible;  
    max-height: none;
  }
}

@media (max-width: 576px) {
  .modal-content {
    margin: 8vh 0;
  }
}


/* =========================
   FORCE CENTER MODAL ON MOBILE
   ========================= */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0 auto !important;   /* force horizontal center */
    width: calc(100% - 2rem);    /* mobile padding */
    max-width: 420px;            /* prevents full-width stretch */
    transform: none !important;  /* kill left-shift transforms */
  }

  .modal-content {
    width: 100%;
  }

  .modal-body {
    overflow: visible;
  }
}

.text-danger {
  color: red;
}


@media (max-width: 768px) {

  #mobileFilterBtn {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1040;
    padding: 12px 22px;
    border-radius: 999px;
  }
}

.modal-content {
  position: relative; /* anchor for absolute close */
}

.custom-close {
  position: absolute;
  top: 0px;
  right: 13px;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  font-weight: 700;
}

.custom-close:hover {
  color: var(--error-color);
}

.filter-cat {
  font-weight: 600;
  color: var(--error-color);
}