/* Ensure full height layout */
html, body {
    height: 100%;
    margin: 0;
  }
  
  .inventory-header {
    height: 80px;
    background-color: #111;
    width: 100%;
  }
  
  /* Two-column layout */
  .inventory-layout {
    display: flex;
    height: calc(100vh - 80px); /* Full height minus header */
    overflow: hidden;
  }
  
  .left-sidebar {
    width: 250px;
    background-color: #f8f9fa;
    overflow-y: hidden;
    border-right: 1px solid #ddd;
  }
  
  .left-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-right: 1px solid #ccc;
    background-color: #1f2020;
    height: 100vh;
    box-sizing: border-box;
  }
  
  .autocomplete-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
    /* max-height: 200px;
    overflow-y: auto; */
    border: 1px solid #ccc;
    background: white;
    position: relative;
    z-index: 10;
  }

  .autocomplete-list li {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
  }
  
  .autocomplete-list li:hover {
    background-color: #f0f0f0;
  }

  label {
    font-size: 1rem;
    /* margin-bottom: 1rem; */
    color: white;
  }

  .right-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: black;
  }
  
  .listing-card {
    width: 23%;
    margin: 1%;
    float: left;
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    height: 350px;
  }

  .listing-card:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .listing-card img {
    /* max-width: 100%; */
    height: auto;
  }
  
  select {
    margin-bottom: 1rem;
  }
  h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: black;
  }

  .listing-card-link {
    text-decoration: none;
    color: inherit;
  }
  .listing-card:hover {
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }

  .full-view-listing {
    background-color: #fff;
    color: #000;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 70%;
  }
  
  .top-back-btn {
    margin-bottom: 1rem;
  }
  
  .detail-images img {
    width: 100%;
    max-width: 680px;
    height: auto;
    border: 1px solid #ccc;
  }

  .detail-wrapper {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
  }

  .detail-body {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .detail-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: black;
  }

  .custom-carousel {
    position: relative;
    /* width: 680px; */
    max-width: 100%;
  }
  
  .carousel {
    position: relative;
    overflow: hidden;
  }
  
  .carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
  }
  
  .carousel-item {
    min-width: 100%;
    flex-shrink: 0;
    display: none;
  }
  
  .carousel-item.active {
    display: block;
  }
  
  .carousel img {
    width: auto;
    height: auto;
    border: 1px solid #ccc;
    display: block;
    margin: auto;
  }
  
  .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
  }
  
  .carousel-control.prev {
    left: 0;
  }
  
  .carousel-control.next {
    right: 0;
  }
  
  
  .custom-info-panel {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
  }
  
  .info-left {
    flex: 2;
    min-width: 250px;
  }
  
  .info-right {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }
  
  .msrp, .sale-price {
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .sale-price {
    color: #28a745;
    font-weight: bold;
  }
  
  .interested-btn {
    /* margin-top: auto; */
    padding: 10px 15px;
    font-size: 0.9em;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .interested-btn:hover {
    background-color: #218838;
  }
  
  .back-btn {
    /* margin-top: auto; */
    padding: 10px 15px;
    font-size: 0.9em;
    background-color: #272928;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }

  .back-btn:hover {
    background-color: #1c1e20;
  }

  .price-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .price-label {
    font-weight: bold;
  }
  
  .price-value {
    text-align: right;
    font-family: monospace;
    min-width: 80px;
  }
  
  .price-row.sale .price-value {
    color: #c00;
    font-weight: bold;
  }
  
  .placeholder {
    max-width: 234px;
    max-height: 234px;
    display: block;
    margin: 0 auto;
  }

  #search-query {
    margin-left: 20px;
    font-size: 1.5rem;
    color: white;
  }

  /* Mobile-first sidebar toggle button */
.sidebar-toggle {
  display: none;
  background: #333;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  font-size: 1rem;
  margin: 1rem;
  cursor: pointer;
}

/* Default desktop layout */
.inventory-layout {
  display: flex;
  flex-direction: row;
}

.left-nav {
  width: 250px;
  flex-shrink: 0;
  padding: 1rem;
  background-color: #000000;
  
}

.right-content {
  flex: 1;
  padding: 1rem;
}

/* Mobile layout */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-block;
  }

  .inventory-layout {
    flex-direction: column;
  }

  .left-nav {
    display: none;
    width: 100%;
    background-color: #000000;
    padding: 1rem;
    height: 50vh;
    border-bottom: 1px solid #ccc;
    border-right: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 0px 12px 12px 1px rgb(0, 0, 255);
    z-index: 10000;
  }

  .left-nav.active {
    display: flex;
  }

  .listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    
  }

  .listing-card {
    width: 100%;
    margin: 0.5rem 0;
  }
}

@media (max-width: 768px) {
  .d-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .detail-images,
  .custom-info-panel {
    display: inline;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .detail-images img {
    max-width: 330px;
  }
  .carousel-inner img,
  .placeholder {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
  }

  .price-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-btn {
    width: 100%;
    text-align: center;
  }

  .interested-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 1rem;
  }

  .detail-wrapper {
  padding: 1rem;
  max-width: 100vw; /* Prevent horizontal overflow */
  overflow-x: hidden;
  box-sizing: border-box;
}
.full-view-listing {
    width: 100%;
    max-width: 100vw; /* Prevent horizontal overflow */
    box-sizing: border-box;
  }

  .detail-body {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    width: 90%;
  }

  .custom-carousel {
    width: 100%;
  }

}

