/* GGC Online Store - Main Stylesheet */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Dark Theme Support */
body.dark-theme {
    background-color: #222;
    color: #fff;
}

body.dark-theme nav,
body.dark-theme header {
    background-color: #111;
}

body.dark-theme .card {
    background-color: #333;
}

/* Header and Navigation */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    background-color: #34495e;
    padding: 0.5rem 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #2c3e50;
}

nav a.active {
    background-color: #e74c3c;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background-color: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

body.dark-theme .card-title {
    color: #ecf0f1;
}

/* Forms */
form {
    margin-top: 1rem;
}

label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="phone"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}

body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme input[type="password"],
body.dark-theme input[type="phone"],
body.dark-theme input[type="file"],
body.dark-theme textarea,
body.dark-theme select {
    background-color: #444;
    color: #fff;
    border-color: #555;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="phone"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
button,
.btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 1rem;
}

button:hover,
.btn:hover {
    background-color: #2980b9;
}

button.delete,
.btn.delete {
    background-color: #e74c3c;
}

button.delete:hover,
.btn.delete:hover {
    background-color: #c0392b;
}

button.success,
.btn.success {
    background-color: #27ae60;
}

button.success:hover,
.btn.success:hover {
    background-color: #229954;
}

button.warning,
.btn.warning {
    background-color: #f39c12;
}

button.warning:hover,
.btn.warning:hover {
    background-color: #e67e22;
}

/* Messages */
.success {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

table thead {
    background-color: #34495e;
    color: #fff;
}

body.dark-theme table thead {
    background-color: #2c3e50;
}

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

body.dark-theme table td {
    border-bottom-color: #555;
}

table tbody tr:hover {
    background-color: #ecf0f1;
}

body.dark-theme table tbody tr:hover {
    background-color: #444;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.item-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.guest-clickable-item {
    cursor: pointer;
}

.guest-clickable-item:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

body.dark-theme .item-card {
    background-color: #333;
    border-color: #555;
}

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #ecf0f1;
}

.item-details {
    padding: 1rem;
}

.item-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

body.dark-theme .item-name {
    color: #ecf0f1;
}

.item-price {
    font-size: 1.5rem;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.item-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

body.dark-theme .item-description {
    color: #bdc3c7;
}

.item-seller {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-bottom: 0.5rem;
}

.item-date {
    font-size: 0.85rem;
    color: #95a5a6;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3498db;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 3rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.margin-top {
    margin-top: 1rem;
}

.margin-bottom {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Auth Prompt Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2000;
}

.auth-modal.show {
    display: flex;
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.auth-modal-content h3 {
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.auth-modal-content p {
    margin-bottom: 1.25rem;
}

.auth-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-modal-close {
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    background: transparent;
    border: none;
    color: #7f8c8d;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    margin: 0;
    padding: 0.1rem 0.35rem;
}

.auth-modal-close:hover {
    color: #2c3e50;
    background: transparent;
}

body.dark-theme .auth-modal-content {
    background: #333;
    color: #ecf0f1;
}

body.dark-theme .auth-modal-content h3,
body.dark-theme .auth-modal-close:hover {
    color: #ecf0f1;
}

/* Responsive */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    nav {
        flex-direction: column;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.5rem;
    }

    .auth-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-modal-actions .btn {
        margin-right: 0;
    }
}
