*, *::before, *::after {
    box-sizing: border-box;
}

.AuctionPage {
    text-align: left;
    margin: 50px auto;
    margin-inline: 10vw;
    max-width: 100%;
    width: auto;
}

@media screen and (max-width: 900px) {
    .AuctionPage {
        margin-inline: 4vw;
        margin-block: 30px;
    }
}

.auctionPageControls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.auctionPageControls h1 {
    margin: 0;
    font-size: clamp(24px, 4vw, 32px);
    color: #D6482C;
}

.auctionPageControls .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.auctionPageControls .controls label {
    margin-right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #555;
    width: auto;
    flex: 1 1 220px;
    min-width: 0;
}

.auctionPageControls .controls label select {
    border-radius: 50px;
    border: 1px solid #ddd;
    background-color: #F5F5F5;
    padding: 12px 20px;
    width: 100%;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.auctionPageControls .controls label select:focus {
    border-color: #D6482C;
}

.createItemBtn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #7C7C7C;
    position: fixed;
    bottom: 5%;
    right: 2%;
    z-index: 99;
    transition: transform 0.2s ease;
}

.createItemBtn:hover {
    transform: scale(1.05);
}

.createItemBtn svg {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    background-color: #D6482C;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 12px;
}

.auctionContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 20px;
    row-gap: 40px;
    width: 100%;
}

.auctionItemCard {
    overflow: hidden;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auctionItemCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.auctionItemCard img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.auctionItemCard .cardText {
    padding: 16px 20px;
}

.auctionItemCard h2 {
    margin: 0;
    margin-top: 5px;
    color: black;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
}

.auctionItemCard p {
    color: #7C7C7C;
    margin: 5px 0 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auctionSearchBar {
    border-radius: 50px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    background-color: #F5F5F5;
    color: black;
    width: 100%;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

.auctionSearchBar:focus {
    border-color: #D6482C;
}

.auctionSearchBar::placeholder {
    color: #777;
}


/* ================= RESPONSIVE MEDIA QUERIES ================= */

@media screen and (max-width: 768px) {
    .auctionContainer {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        column-gap: 15px;
        row-gap: 30px;
    }
}

@media screen and (max-width: 600px) {
    .AuctionPage {
        margin: 0;
        padding: 15px;
        max-width: 100%;
    }

    .auctionPageControls {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .auctionPageControls .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 10px;
    }

    .auctionPageControls .controls label {
        width: 100%;
        min-width: 100%;
    }

    .auctionSearchBar {
        width: 100%;
        max-width: 100%;
    }

    .auctionContainer {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    .auctionItemCard img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .createItemBtn {
        bottom: 20px;
        right: 20px;
    }
}