:root {
  --brown: #8b4513;
  --gold: #ffd700;
  --light: #fffdf7;
  --bg: #f8f2e8;
  --text: #2d1b0e;
  --muted: #6f5b4a;
  --line: #dfc6a8;
  --error: #c62828;
  --success: #1b7f3a;
  --radius: 12px;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Hero section */
.hero {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.hero h1 {
  color: var(--gold);
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Generic card/form containers */
.container {
  width: min(1000px, 94%);
  margin: 1rem auto 2rem;
}

.card {
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

form {
  display: grid;
  gap: 1rem;
}

.form-card {
  max-width: 800px;
  margin: 0 auto;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--brown);
  font-weight: 700;
}

/* Inputs */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(255, 215, 0, 0.65);
  border-color: var(--brown);
}

/* Buttons */
.btn,
button {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary,
.submit-btn,
button[type="submit"] {
  background: var(--brown);
  color: var(--gold);
}

.btn:disabled,
button:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Admin table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

thead {
  background: #f5dfb8;
}

th,
td {
  text-align: left;
  padding: 0.62rem;
  border-bottom: 1px solid #ecd7b9;
  vertical-align: top;
}

th {
  color: var(--brown);
}

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

.modal.show {
  display: flex;
}

.modal-content {
  width: min(680px, 100%);
  background: #fffef8;
  border: 2px solid #d7b98c;
  border-radius: var(--radius);
  padding: 1rem;
}

/* Thumbnails: 2x2 mobile, 4 across desktop */
.thumbnails,
.thumb-list,
.modal-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (min-width: 900px) {
  .thumbnails,
  .thumb-list,
  .modal-images {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.thumbnails img,
.thumb-list img,
.modal-images img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 215, 0, 0.45);
  border-top-color: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 0.45rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status messages */
.status {
  min-height: 1.1rem;
  font-size: 0.95rem;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

/* Mobile-first responsive helpers */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 760px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
