body {
    font-family: Arial, sans-serif;
    padding: 20px;
}

/* Card Grid Layout */
.card-grid .card {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   border: 1px solid #ccc;
   border-radius: 8px;
   background-color: #f9f9f9;
   text-align: center;
   box-sizing: border-box;
   transition: transform 0.2s ease;
}


.card-grid .card:hover {
    transform: scale(1.1);
}

.card-grid .card-img {
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
    background-color: white;
}

/* Card Details */
.card-grid .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card h2.player-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.5rem 0;
    white-space: normal;
    word-wrap: break-word;
}

.card-condition {
    font-size: 0.75rem;
    font-style: italic;
    color: #666;
    margin: 0.2rem 0 0.5rem;
}

.seller-info {
    font-size: 0.85rem;
    color: #555;
    margin: 0.3rem 0;
}

.card-details p {
    margin: 0.25rem 0;
    font-size: 0.75rem;
    word-wrap: break-word;
}

.card-price {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #1b5e20;
}

.card form {
    margin-top: 10px;
}

.card button {
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

/* Cart and Cart Icon */
.cart-icon-container {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 24px;
}

.cart-link {
    position: relative;
    text-decoration: none;
    color: black;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Card Detail Page */
.card-detail {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.card-images {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.card-detail-img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Table Styling */
table {
    width: 80%;
    margin: auto;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border: 1px solid #ccc;
}

/* Checkout Form Layout */
.checkout-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.checkout-form label {
    font-weight: bold;
    display: block;
    margin-top: 15px;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
}

.checkout-form .form-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.checkout-form .form-row > div {
    flex: 1;
}

.checkout-form button {
    margin: 30px auto 0;
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #1b5e20;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Search Bar */
.search-bar {
    text-align: center;
    margin-bottom: 20px;
}

.search-bar input[type="text"] {
    padding: 8px;
    width: 400px;
    font-size: 16px;
}

.search-bar button {
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
}

.search-button,
.reset-button {
    padding: 8px 12px;
    font-size: 18px;
    height: 40px;
    line-height: 1;
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.search-button:hover,
.reset-button:hover {
    background-color: #ddd;
}







/* Responsive Design */
@media (max-width: 768px) {
    .card-grid {
        justify-content: center;
        gap: 6px; /* slightly tighter */
    }

    .card h2.player-name {
        font-size: 0.85rem;
    }

    .card-details p {
        font-size: 0.8rem;
    }

    .card-price {
        font-size: 0.95rem;
    }



}

