.gun-grid {
    display: flex; 
    flex-wrap: wrap;
    justify-content: center; /* Center the items horizontally */
    gap: 20px; 
    padding: 20px;
    margin: 0 auto; 
    max-width: 1200px; 
}

.gun-box {
    /* Use flex-basis for flexible width, allowing three per row with gaps */
    flex: 1 1 calc(33.333% - 40px); /* Roughly 1/3rd width minus gap compensation */
    min-width: 280px; /* Minimum width for each box before wrapping */
    max-width: 400px; /* Optional: A max width to prevent boxes from becoming too large */
    height: 250px; /* Keep fixed height for consistency */
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #000000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.gun-box img {
    max-width: 100%; /* Max width to fill container horizontally */
    max-height: 100px; /* Limit max height to keep all images same height */
    object-fit: contain; /* Scale image proportionally to fit */
    margin-bottom: 10px;
    display: block;
}


/* Buttons container styling */
.buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-bottom: 10px;
}

/* Buttons styling */
.buttons button {
    margin: 0;
    padding: 5px 8px;
    font-size: 13px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.buttons button:hover {
    background-color: #680e0e;
}

body {
    background-color: #121212; /* dark gray/black background */
    color: #e0e0e0; /* light text color for contrast */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
}