﻿*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.item{
  padding-top: .5rem; 
  padding-bottom: .5rem;
}
.item-name {
  text-align: center;
  font-weight: bold;
  font-size: min(2.5vw, 1.2rem);
  margin-bottom: 0.5rem;
}

.item-body{
  display: flex;
  align-items: flex-start;
}

.container {
    display: block; /* CRITICAL: Forces block-level context for the translate engine */
    position: relative;
    background-color: rgb(189, 189, 189);
    border-radius: 0.2rem;
    padding: 1rem;
    max-width: 100%;
    margin-inline: auto;
    gap: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    /* Force a clean layer and apply the 1px transition properties */
    transform: translateY(0);
    backface-visibility: hidden; /* Prevents text from blurring during the transition */
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* 🌟 INTERACTIVE CONTAINER HOVER ANCHOR: */
.container:hover {
  border-color: #999999;
  transform: translateY(-1px); /* Explicit clean 1px lift */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* 🚀 THE INVISIBLE HITBOX LINK: */
.main-card-link {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: 1; /* Sits over the image and text blocks */
    /* FIXED HOVER REPAIR: Use transparency instead of pushing text thousands of pixels away */
    color: transparent;
    text-decoration: none;
    overflow: hidden;
}


.image-item {
  width: clamp(110px, 18vw, 180px);
  border-radius: 0.3rem;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: auto;
}

.listings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
  width: 100%;
}
.listings li a {
    position: relative;
    z-index: 2; /* Crucial: 2 is higher than 1, so these links remain clickable */

    display: flex;
    justify-content: space-between;
    background-color: white;
    border-radius: 0.2rem;
    padding: 0.5rem;
    text-decoration: none;
    color: inherit;
    font-size: min(2.4vw, 1rem);
}
.listings li a:hover {
  background: #999999;
}
li {
  list-style: none;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background: #ffffff;
  color: #333;
  width: 100%;
  margin-left: 0;
}

.search-input {
  margin-top: 20rem;
  width: 80%;
  max-width: 500px;
  margin-inline: auto;
  display: flex;
}

input {
  font-family: inherit;
  width: 100%;
  height: 40px;
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
}

button {
  width: 15%;
  cursor: pointer;
}

.item-list {
  background-color: rgb(221, 221, 221);
  color: black;
  width: 90%;
  max-width: 1300px;
  min-width: 250px;
  margin-inline: auto;
  margin-top: 10rem;
  padding: 1.5rem 1rem;
  border-radius: 0.2rem;
  margin-bottom: 20px;
  /*
  & li:not(:last-child) {
    padding-bottom: 1rem;
  }*/
}



.pagination {
  display: inline-block;
  min-width: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
}

.pagination button {
  color: black;
  float: left;
  padding: clamp(15px, 3vw, 40px);
  text-decoration: none;
  transition: background-color .3s;
  margin-top: 20px;
  margin-bottom: 40px;
  margin-inline: auto;
  border: none;
  background-color: rgba(0, 0, 0, 0);
}
.pagination input {
  color: black;
  float: left;
  width: var(--w);
  padding: var(--w);
  text-align:center;
  transition: background-color .3s;
  border: none;
  background-color: rgba(0, 0, 0, 0);

  font-weight: bold;
  text-decoration: underline;
  color: rgb(37, 37, 37);
  font-size: min(2.615vw, 1.215rem);
}
.pagination form {
  color: black;
  float: left;
  --w: clamp(15px, 4vw, 35px);
  transition: background-color .3s;
  margin-top: 20px;
  margin-bottom: 40px;
  margin-inline: auto;
  border: none;
  background-color: rgba(0, 0, 0, 0);
  color: rgb(37, 37, 37);
  font-size: min(2.615vw, 1.215rem);
}

.pagination button.active {
  background-color: #4CAF50;
  color: white;
}
.pagination form.active {
  background-color: #4CAF50;
  color: white;
}

.pagination button:hover:not(.active) {background-color: #ddd;}
.pagination form:hover:not(.active) {background-color: #ddd;}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}




.sort-dropbtn {
  background-color: rgb(221, 221, 221);
  color: rgb(0, 0, 0);
  /*padding: 16px;*/
  font-size: 16px;
  border: none;
  cursor: pointer;
  width: 200px;
  height: 48px;
}



.sort-dropdown {
  position: absolute;
  padding-top: 15px;
  right: 5%;
}

.sort-dropdown-content {
  display: none;
  position: absolute;
  background-color: rgb(221, 221, 221);
  min-width: 200px;
  overflow: auto;

  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2), -2px 2px 3px rgba(0, 0, 0, 0.2);
  z-index: 1;
  padding-bottom: 10px;
}

.sort-dropdown-content button {
  color: rgb(0, 0, 0);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  width: 180px;
  position: relative;
  margin: auto;
  
  height: 45px;
}

.sort-dropdown button:hover {background-color: #acacac;}

.show {display: block;}