@import url('https://fonts.googleapis.com/css2?family=Cal+Sans:wght@400;700&display=swap');

:root {
    --primary: #1a1a1a;
    --secondary: #8a4d0f;
    --accent: #d4c9a8;
    --light: #fffef0;
    --dark: #121212;
    --text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cal Sans', sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: var(--light);
}

header {
    background: var(--primary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 95%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--light);
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

.nav-buttons a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 5rem;
    border-radius: 4px;
    margin-left: 1rem;
}

.shop-btn { background: var(--secondary); }
.cart-btn { background: var(--secondary); }

.cart-btn:hover, .shop-btn:hover {
    background: #9e5a10;
    scale: 1.05;
}

.admin-banner {
    background: var(--secondary);
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.admin-tabs {
    display: flex;
    background: var(--light);
    border-radius: 8px 8px 0 0;
}

.tab-btn {
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.tab-btn.active {
    border-bottom: 2px solid var(--secondary);
    color: var(--light);
    background-color: var(--accent);
}

.tab-content {
    background: var(--light);
    padding: 2rem;
    border-radius: 0 0 8px 8px;
}

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

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--primary);
    color: white;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.edit-btn { background: var(--secondary); color: white; }
.delete-btn { background: #d63031; color: white; }

.in-stock { color: var(--secondary); font-weight: bold; }
.out-of-stock { color: #d63031; font-weight: bold; }

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border 0.3s, box-shadow 0.3s;
    background-color: white;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(138, 77, 15, 0.2);
    outline: none;
}
#add-product-btn, 
#save-edit-btn {
    background: var(--secondary);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 1rem;
}

#add-product-btn:hover, 
#save-edit-btn:hover {
    background: #9e5a10;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#add-product-btn:active, 
#save-edit-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.form-group.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--secondary);
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.products-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark);
}

#reset-products {
    background-color: var(--secondary);
    color: white;
    transition: background-color 0.3s;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#reset-products:hover {
    background-color: #9e560e;
    scale: 1.05;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
}

.order-card {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.order-items {
    margin: 1rem 0;
}

.item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.total {
    font-weight: bold;
    text-align: right;
}

footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    position: relative;
    bottom: 0;
    width: 100%;
}