/* style.css */
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.cart-button {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.container {
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

h2 {
    text-align: center;
    color: #4a00e0;
    margin-bottom: 2rem;
}

#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-media {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
}

.product-info .price {
    font-size: 1.2rem;
    color: #28a745;
    font-weight: bold;
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    background-color: #8e2de2;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin-top: auto;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #4a00e0;
}

/* Cart Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 15px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#cart-items-list {
    margin-bottom: 20px;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#checkout-form .form-group {
    margin-bottom: 15px;
}

#checkout-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#checkout-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#checkout-btn {
    background: #28a745;
    color: white;
    padding: 15px;
    width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Admin Page Styles */
.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"], input[type="number"], input[type="file"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    color: white;
    background: #4a00e0;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

#admin-product-list {
    margin-top: 2rem;
}
.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}
.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}
