/* public/css/style.css */

/* --- Variables (New addition for easier theme management) --- */
:root {
    --color-primary-dark: #2C5F6D; /* Deep Teal */
    --color-primary-light: #4A8C9E; /* Lighter Teal for hover/accents */
    --color-secondary-green: #A2B29F; /* Muted Sage Green */
    --color-accent-gold: #D4AF37; /* Soft Gold for CTAs */
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-background-light: #F8F8F8;
    --color-background-cream: #F5F5DC;
    --color-border: #E0E0E0;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* --- Global Styles --- */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--color-background-light);
    color: var(--color-text-dark);
}

.container {
    width: 90%; /* Slightly wider for more content space */
    max-width: 1200px; /* Max width to prevent overly wide lines of text */
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* --- Header & Navigation --- */
header {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 20px 0; /* DECREASED PADDING to make header vertically smaller */
    border-bottom: 3px solid var(--color-accent-gold);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo-img-link {
    display: block;
    height: 140px; /* INCREASED HEIGHT for the logo container */
    width: auto;
}

header .site-logo {
    height: 100%; /* Make the image fill its container height */
    width: auto;  /* Maintain aspect ratio */
    max-width: 400px; /* Increased max-width to allow for wider logos at this height */
    display: block; /* Remove extra space below image */
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    display: inline-block;
    margin-left: 30px;
}

header nav ul li a {
    color: #fff;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--color-accent-gold);
    text-decoration: none;
}

/* --- Admin Navigation --- */
.admin-nav {
    background: #3A6E7C; /* Slightly lighter than primary-dark */
    color: #fff;
    padding: 10px 0;
    border-bottom: 2px solid var(--color-accent-gold);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-nav .container {
    display: flex;
    justify-content: center; /* Center the admin links */
    align-items: center;
}

.admin-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav ul li {
    display: inline-block;
    margin: 0 15px;
}

.admin-nav ul li a {
    color: #fff;
    font-weight: bold;
    transition: color 0.3s ease;
}

.admin-nav ul li a:hover {
    color: var(--color-accent-gold);
    text-decoration: none;
}


/* --- Main Content Area --- */
main {
    padding: 40px 0;
    min-height: 500px;
}

/* --- Footer --- */
footer {
    padding: 30px 0;
    margin-top: 40px;
    color: #fff;
    background-color: var(--color-primary-dark);
    text-align: center;
    border-top: 3px solid var(--color-accent-gold);
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* --- Placeholder for Buttons (for future Request Info) --- */
.btn {
    display: inline-block;
    background: var(--color-accent-gold);
    color: var(--color-primary-dark);
    padding: 10px 20px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--color-primary-light);
    color: #fff; /* text color change on hover for contrast */
    transform: translateY(-2px); /* Slight lift effect */
    text-decoration: none;
}

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

    header nav ul li {
        margin: 0 15px;
    }

    .container {
        width: 95%;
    }
}

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 30px; /* Space between cards */
    margin-top: 40px;
}

.category-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flexbox to stack content */
    flex-direction: column;
    height: 300px; /* Fixed height for the card */
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.category-item a {
    text-decoration: none;
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-item .image-container {
    width: 100%;
    flex-grow: 1; /* Allow image container to take available space */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Hide parts of the image if it overflows */
}

.category-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Contain the image within the box, add whitespace if needed */
    display: block;
}

.category-item h3 {
    font-size: 1.8em;
    margin-top: 15px; /* Space above title */
    margin-bottom: 10px;
    color: var(--color-primary-dark);
    padding: 0 10px; /* Add some padding */
}

/* Responsive adjustments for category grid */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on medium screens */
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }
}

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

.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column;
}

.product-card:hover {
    /* Removed hover effects as per user request */
}

.product-card a {
    text-decoration: none;
    color: var(--color-text-dark);
}

.product-card .product-image-container {
    width: 100%;
    height: 250px; /* Fixed height for square image container */
    overflow: hidden;
    background-color: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image,
.product-card .product-placeholder-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensures the whole image is visible */
    display: block;
}

.product-card .product-placeholder-image {
    color: var(--color-text-light);
    font-size: 1.2em;
}

.product-card-content {
    padding: 15px 20px;
    flex-grow: 1; /* Allows content area to expand */
}

.product-card h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: var(--color-primary-dark);
}

.product-card .product-brand {
    font-size: 0.85em;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.product-card .product-description {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-card-actions {
    padding: 0 20px 20px; /* Padding only bottom and sides */
    display: flex;
    justify-content: space-around;
    gap: 10px; /* Space between buttons */
    margin-top: auto; /* Pushes action block to the bottom of the card */
}

.product-card-actions .btn {
    flex: 1; /* Make buttons fill available space */
    text-align: center;
    padding: 10px 15px; /* Slightly smaller padding for card buttons */
    font-size: 0.9em;
}

.btn-view-details {
    background: var(--color-primary-dark);
    color: #fff !important;
}
.btn-view-details:hover {
    background: var(--color-primary-light);
}

.btn-request-info {
    background: var(--color-accent-gold);
    color: var(--color-primary-dark);
}
.btn-request-info:hover {
    background: var(--color-primary-light);
    color: #fff;
}

/* Responsive adjustments for product grid */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Brand Grid (for Category > Brands page) --- */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.brand-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.brand-card a {
    text-decoration: none; /* Ensure the whole card link isn't underlined */
    color: var(--color-text-dark);
}

.brand-card a:hover h3 {
    color: var(--color-primary-light); /* Change heading color on hover */
}

.brand-card .brand-logo {
    max-width: 150px; /* Adjust max width for logos */
    height: auto;
    max-height: 80px; /* Limit height to keep cards consistent */
    object-fit: contain; /* Ensure logo fits without cropping */
    margin: 0 auto 15px auto; /* Center the image and add bottom margin */
    display: block;
}

.brand-card .brand-placeholder-logo {
    width: 150px;
    height: 80px;
    background-color: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    box-sizing: border-box;
}

.brand-card h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.brand-card p {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1; /* Allow description to take space */
}

.brand-card .btn {
    margin-top: auto; /* Push button to bottom */
}

/* Responsive adjustments for brand grid */
@media (max-width: 600px) {
    .brand-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Product Detail Page --- */
.product-detail-page {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 40px;
}

.product-detail-title {
    font-size: 2.5em;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
    text-align: center;
}

.product-detail-brand {
    font-size: 1.1em;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 30px;
}

.product-gallery {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-detail-main-image {
    width: 100%;
    max-width: 530px; /* Adjusted max width for main image (approx 2/3 of 800px) */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.product-detail-placeholder-image {
    background-color: var(--color-border);
    height: 400px; /* Placeholder height */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 1.5em;
}

.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.thumbnail-image {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.thumbnail-image:hover {
    border-color: var(--color-accent-gold);
    transform: translateY(-2px);
}

.product-description-full,
.product-features,
.product-specifications {
    background: var(--color-background-cream); /* Light cream background for sections */
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--color-border);
}

.product-description-full h2,
.product-features h2,
.product-specifications h2 {
    color: var(--color-primary-dark);
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 10px;
}

.product-description-full p {
    color: var(--color-text-dark);
    line-height: 1.7;
}

.product-features ul, .product-specifications table {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 8px;
    border: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-features li strong {
    color: var(--color-primary-dark);
    margin-right: 10px;
}

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

.product-specifications th,
.product-specifications td {
    border: 1px solid var(--color-border);
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.product-specifications th {
    background-color: var(--color-primary-light);
    color: #fff;
    width: 30%;
    font-weight: bold;
}

.product-specifications td {
    background-color: #f9f9f9;
}

.request-info-section {
    background: var(--color-primary-dark); /* Darker background for contrast */
    color: #fff; /* White text for contrast */
    padding: 35px; /* Increased padding */
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--color-accent-gold);
    text-align: center; /* Center content */
}

.request-info-section h2 {
    color: #fff; /* White heading */
    font-size: 2em; /* Larger heading */
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-accent-gold);
    padding-bottom: 10px;
}

.request-info-section p {
    color: #fff; /* White paragraph text */
    margin-bottom: 25px;
    font-size: 1.1em;
}

.request-info-section .btn {
    padding: 15px 30px; /* Larger padding for the button */
    font-size: 1.2em; /* Larger font size for the button */
    width: auto; /* Allow button to size naturally */
    display: inline-block; /* Ensure it's inline-block for centering */
    margin-top: 15px;
    background: var(--color-accent-gold);
    color: var(--color-primary-dark);
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Responsive adjustments for product detail */
@media (max-width: 768px) {
    .product-detail-page {
        padding: 20px;
    }
    .product-detail-title {
        font-size: 2em;
    }
    .thumbnail-gallery {
        flex-direction: row;
        overflow-x: auto; /* Allow horizontal scrolling if many thumbnails */
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    .thumbnail-image {
        flex-shrink: 0; /* Prevent shrinking */
    }
    .product-features li {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Request Info Form Styles --- */
.request-form {
    padding: 20px;
    background: #fff; /* White background for the form itself */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 800px; /* Made wider */
    margin: 20px auto; /* Center the form */
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Space between form groups */
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1 1 calc(33.33% - 20px); /* Three columns for name, email, phone */
    margin-bottom: 0; /* Remove default margin as gap handles spacing */
}

.form-row.city-state .form-group {
    flex: 1 1 calc(50% - 20px); /* Two columns for city, state */
}

/* --- Admin Login & Dashboard Styles --- */
.admin-login-container,
.admin-dashboard {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.admin-login-container h1,
.admin-dashboard h1 {
    color: var(--color-primary-dark);
    margin-bottom: 25px;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.admin-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-text-dark);
}

.admin-login-form input[type="text"],
.admin-login-form input[type="email"],
.admin-login-form input[type="password"] {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
}

.admin-login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

.dashboard-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.dashboard-card {
    background: var(--color-background-cream);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    flex: 1 1 calc(50% - 20px); /* Two columns, with gap */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-width: 250px;
}

.dashboard-card h2 {
    color: var(--color-primary-light);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.dashboard-card p {
    font-size: 0.95em;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.dashboard-card .btn {
    display: inline-block;
    padding: 8px 15px;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .dashboard-sections {
        flex-direction: column;
    }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.9em;
    color: var(--color-text-light);
}

.breadcrumbs a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

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

.breadcrumbs span {
    margin: 0 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-primary-dark);
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group select {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
    background-color: #fff; /* Ensure white background */
    -webkit-appearance: none; /* Remove default arrow on webkit browsers */
    -moz-appearance: none; /* Remove default arrow on mozilla browsers */
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C197.393L146.2%2C56.693L5.4%2C197.393h281.6z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    cursor: pointer;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group select {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
    background-color: #fff; /* Ensure white background */
    -webkit-appearance: none; /* Remove default arrow on webkit browsers */
    -moz-appearance: none; /* Remove default arrow on mozilla browsers */
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C197.393L146.2%2C56.693L5.4%2C197.393h281.6z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    cursor: pointer;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--color-primary-light);
    outline: none;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

.btn-submit-request {
    background: var(--color-accent-gold);
    color: var(--color-primary-dark);
    border: none;
    cursor: pointer;
    width: 100%; /* Make button full width within its container */
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-submit-request:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

/* Honeypot field (hidden from legitimate users, visible to bots) */
.honeypot-field {
    display: none; /* Hide honeypot field */
}

/* Form Messages (Error/Success) */
.form-messages {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.4;
}

.error-messages {
    background-color: #ffe6e6; /* Light red */
    border: 1px solid #ffb3b3;
    color: #cc0000;
}

.error-messages ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-messages li {
    margin-bottom: 5px;
}

.success-message {
    background-color: #e6ffe6; /* Light green */
    border: 1px solid #b3ffb3;
    color: #008000;
}

/* --- Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Center vertically and horizontally */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border: 1px solid #888;
    width: 90%; /* Make wider */
    max-width: 800px; /* Max width */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: fixed; /* Use fixed for centering */
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- Admin Panel General Styles --- */
.admin-container {
    max-width: 960px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.admin-container h1 {
    color: var(--color-primary-dark);
    text-align: center;
    margin-bottom: 30px;
}

.admin-actions {
    text-align: right;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--color-border);
    padding: 12px;
    text-align: left;
}

.admin-table th {
    background-color: var(--color-primary-light);
    color: #fff;
    font-weight: bold;
}

.admin-table tr:nth-child(even) {
    background-color: var(--color-background-light);
}

.admin-table tr:hover {
    background-color: #f1f1f1;
}

.admin-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-thumbnail-lg {
    max-width: 150px;
    height: auto;
    display: block;
    margin-top: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-primary-dark);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: calc(100% - 22px); /* Full width minus padding and border */
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
}

.admin-form input[type="file"] {
    padding: 5px 0;
}

.admin-form small {
    color: var(--color-text-light);
    font-size: 0.85em;
    display: block;
    margin-top: 5px;
}

.admin-form .btn {
    margin-right: 10px;
}

.btn-primary {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-light);
}

.btn-secondary {
    background: var(--color-text-light);
    color: #fff;
}

.btn-secondary:hover {
    background: #555;
}

.btn-edit {
    background: #28a745; /* Green */
    color: #fff;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545; /* Red */
    color: #fff;
}

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

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8em;
}