/* ---------------------------------------
   General
--------------------------------------- */
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
}

a {
    color: #007BFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------------------------------------
   Buttons
--------------------------------------- */
.btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: #007BFF;
    color: #fff;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* ---------------------------------------
   Hero Sections
--------------------------------------- */
.hero, .products-hero, .register-hero, .admin-login-hero {
    background-color: #007BFF;
    color: #fff;
    padding: 50px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hero h1, .products-hero h1, .register-hero h1, .admin-login-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p, .products-hero p, .register-hero p, .admin-login-hero p {
    font-size: 1.2rem;
}

/* ---------------------------------------
   Product Grid
--------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0,0,0,0.15);
}

.product-card h3 {
    margin-bottom: 5px;
}

.product-card small {
    color: #555;
    margin-bottom: 10px;
    display: block;
}

.product-card .price {
    font-weight: bold;
    margin: 10px 0;
}

.product-card .btn {
    align-self: start;
    padding: 8px 12px;
}

/* Category Title */
.category-title {
    margin-top: 40px;
    margin-bottom: 20px;
    color: #007BFF;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    padding-bottom: 5px;
}

/* ---------------------------------------
   Product Detail
--------------------------------------- */
.product-detail {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #ddd;
}

.product-detail .price {
    font-weight: bold;
    font-size: 1.3rem;
    margin: 10px 0;
}

.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.product-gallery img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-gallery img:hover {
    transform: scale(1.05);
}

/* ---------------------------------------
   Forms (Register / Login / Admin)
--------------------------------------- */
.register-form, .admin-login-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto 40px;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.05);
}

.register-form .form-group, .admin-login-form .form-group {
    margin-bottom: 15px;
}

.register-form label, .admin-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.register-form input, .admin-login-form input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.register-form .btn, .admin-login-form .btn {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
}

.register-form .btn:hover, .admin-login-form .btn:hover {
    background-color: #0056b3;
}

.register-form .message {
    padding: 10px;
    margin-bottom: 20px;
    background: #e6f7e6;
    color: #2a662a;
    border: 1px solid #2a662a;
    border-radius: 5px;
}

.admin-login-form .error {
    padding: 10px;
    margin-bottom: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

/* ---------------------------------------
   Admin Dashboard
--------------------------------------- */
.admin-dashboard h1 {
    margin-bottom: 10px;
    color: #007BFF;
}

.admin-dashboard p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th, .orders-table td {
    padding: 12px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.orders-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.order-product-img {
    width: 60px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.status {
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    text-transform: capitalize;
}

.status.pending { background-color: #ffc107; }
.status.completed { background-color: #28a745; }
.status.cancelled { background-color: #dc3545; }

.orders-table a {
    color: #007BFF;
    text-decoration: none;
}

.orders-table a:hover {
    text-decoration: underline;
}

.admin-login-form, .admin-dashboard {
    max-width: 900px;
    margin: 0 auto;
}

/* ---------------------------------------
   Responsive
--------------------------------------- */
@media (max-width: 768px) {
    .product-gallery img {
        width: 100%;
        height: auto;
    }
}
