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

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
}

/* ------------------------------
   HEADER
------------------------------ */
.main-header {
    background: #111827;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.main-header .logo {
    font-size: 22px;
    font-weight: 600;
}

.main-header nav a {
    color: #fff;
    margin-left: 25px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
}

.main-header nav a:hover {
    color: #38bdf8;
}

/* ------------------------------
   GALLERY PAGE
------------------------------ */
.gallery {
    padding: 35px;
}

.gallery h2 {
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    color: #111827;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.box {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: 0.3s;
}

.box:hover {
    transform: scale(1.04);
}

.box img {
    width: 100%;
    height: 160px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 8px;
}

.box p {
    font-size: 16px;
    font-weight: 500;
}

/* ------------------------------
   ADMIN AREA
------------------------------ */

.admin-container {
    width: 380px;
    background: white;
    margin: 60px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #111827;
}

/* FORM INPUTS */
input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 15px;
}

/* BUTTON */
button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #1d4ed8;
}

/* LOGOUT LINK */
a.logout {
    display: inline-block;
    margin-bottom: 20px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

a.logout:hover {
    text-decoration: underline;
}

/* ------------------------------
   RESPONSIVE
------------------------------ */
@media(max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
    }

    .main-header nav a {
        margin-left: 10px;
        margin-right: 10px;
    }

    .gallery {
        padding: 15px;
    }
}
/* FULLSCREEN IMAGE POPUP */
.popup {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
}

.popup img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 15px #000;
}

#closePopup {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 45px;
    color: #fff;
    cursor: pointer;
}

/* ------------------------------
   ADMIN DASHBOARD LAYOUT
------------------------------ */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background: #1f2937;
    color: #fff;
    padding: 25px 15px;
}

.side-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #fff;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 17px;
    display: block;
    padding: 10px;
    border-radius: 5px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #3b82f6;
    color: #fff;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 30px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 25px;
}

/* UPLOAD BOX */
.upload-card,
.table-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.upload-card h3,
.table-card h3 {
    margin-bottom: 15px;
}

.btn {
    background: #2563eb;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.btn:hover {
    background: #1e40af;
}

/* TABLE STYLE */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    background: #f1f5f9;
    padding: 12px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* RESPONSIVE ADMIN */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        width: 220px;
        transition: 0.3s;
    }

    .admin-layout {
        flex-direction: column;
    }
}
.delete-btn {
    background: #dc2626;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.delete-btn:hover {
    background: #b91c1c;
}


/* ------------------------------
   CATEGORY SELECT DROPDOWN
------------------------------ */
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #2563eb;
}

/* ------------------------------
   CATEGORY BADGE (ADMIN TABLE)
------------------------------ */
.category-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #6366f1;
    text-transform: uppercase;
}

/* Different colors per category */
.badge-wedding {
    background: #ec4899;
}

.badge-birthday {
    background: #f59e0b;
}

.badge-events {
    background: #10b981;
}

.badge-product {
    background: #6366f1;
}

/* ------------------------------
   FORM SPACING IMPROVEMENT
------------------------------ */
.upload-card input,
.upload-card select {
    margin-bottom: 12px;
}

/* ------------------------------
   IMAGE PREVIEW IMPROVEMENT
------------------------------ */
#preview {
    border: 2px dashed #cbd5f5;
    padding: 5px;
    background: #f8fafc;
}

/* ------------------------------
   ADMIN TABLE HOVER EFFECT
------------------------------ */
table tr:hover {
    background: #f8fafc;
    transition: 0.2s;
}

/* ------------------------------
   CATEGORY FILTER BUTTON CENTER + BORDER
------------------------------ */

.category-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-filter .btn {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
}

.category-filter .btn:hover {
    background: #2563eb;
    color: #fff;
}
