* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #fffaf8;
    color: #4c3d39;
    min-height: 100vh;
}

/* =========================
   HEADER
========================= */

.admin-header {
    background: white;
    border-bottom: 1px solid #eaded9;
    padding: 20px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-logo {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: bold;
    color: #604a44;
}

.logout-button {
    border: none;
    background: #604a44;
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
}

.logout-button:hover {
    background: #493934;
}

/* =========================
   MAIN
========================= */

.admin-container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}

/* =========================
   LOGIN
========================= */

.login-container {
    max-width: 450px;
    margin: 100px auto;
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 8px 35px rgba(80, 50, 45, 0.10);
}

.login-container h1 {
    font-family: Georgia, serif;
    text-align: center;
    margin-bottom: 10px;
}

.login-description {
    text-align: center;
    color: #8a7771;
    font-size: 14px;
    margin-bottom: 30px;
}

/* =========================
   FORM
========================= */

.admin-form {
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 35px rgba(80, 50, 45, 0.08);
    margin-bottom: 40px;
}

.admin-form h2 {
    font-family: Georgia, serif;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dfd0cb;
    border-radius: 10px;
    background: #fffdfc;
    color: #4c3d39;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #a66f68;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* =========================
   CATEGORY SELECT
========================= */

select {
    cursor: pointer;
}

optgroup {
    font-weight: bold;
}

/* =========================
   IMAGE UPLOAD
========================= */

.image-upload-box {
    border: 2px dashed #d8c5bf;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    background: #fffaf8;
    cursor: pointer;
}

.image-upload-box:hover {
    background: #fdf3f0;
}

.image-upload-box input {
    display: none;
}

.upload-text {
    color: #806d67;
    font-size: 14px;
}

.upload-icon {
    font-size: 35px;
    margin-bottom: 10px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #604a44;
    font-size: 18px;
    cursor: pointer;
}

/* =========================
   BUTTONS
========================= */

.primary-button {
    border: none;
    background: #604a44;
    color: white;
    padding: 13px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
}

.primary-button:hover {
    background: #493934;
}

.secondary-button {
    border: 1px solid #d8c5bf;
    background: white;
    color: #604a44;
    padding: 12px 22px;
    border-radius: 25px;
    cursor: pointer;
}

.secondary-button:hover {
    background: #f8eeeb;
}

.form-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================
   PRODUCTS ADMIN
========================= */

.products-section {
    margin-top: 30px;
}

.products-section h2 {
    font-family: Georgia, serif;
    margin-bottom: 20px;
}

.admin-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.admin-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(80, 50, 45, 0.08);
}

.admin-product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.admin-product-info {
    padding: 18px;
}

.admin-product-info h3 {
    font-family: Georgia, serif;
    font-size: 22px;
    margin-bottom: 8px;
}

.admin-category {
    color: #a66f68;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.admin-description {
    color: #796964;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.admin-card-buttons {
    display: flex;
    gap: 8px;
}

.edit-button,
.delete-button {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
}

.edit-button {
    background: #eee1dd;
    color: #604a44;
}

.delete-button {
    background: #f2d9d4;
    color: #744b44;
}

.edit-button:hover {
    background: #e3d0ca;
}

.delete-button:hover {
    background: #e8c6c0;
}

/* =========================
   MESSAGES
========================= */

.message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.message.show {
    display: block;
}

.success-message {
    background: #e7f1e6;
    color: #456143;
}

.error-message {
    background: #f7dfdc;
    color: #743f39;
}

/* =========================
   LOADING
========================= */

.loading {
    text-align: center;
    padding: 40px;
    color: #8a7771;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {

    .admin-products {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .admin-header {
        padding: 15px 20px;
    }

    .admin-logo {
        font-size: 25px;
    }

    .admin-container {
        width: 94%;
        margin: 25px auto;
    }

    .admin-form {
        padding: 20px;
    }

    .admin-products {
        grid-template-columns: 1fr;
    }

    .login-container {
        margin: 50px auto;
        padding: 25px;
    }

}