@charset "UTF-8";

/* === Reset & Base Styles === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #000 url(../images/background.jpg) no-repeat fixed;
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Public site grid (with left_pic) */
.gridContainer {
  display: grid;
  grid-template-areas:
    "header"
    "nav"
    "left_pic"
    "content"
    "footer1"
    "footer2";
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 769px) {
  .gridContainer {
    grid-template-areas:
      "header header"
      "nav nav"
      "left_pic content"
      "footer1 footer1"
      "footer2 footer2";
    grid-template-columns: 250px 1fr;
  }
}

/* Admin grid (no left_pic) */
.adminGridContainer {
  display: grid;
  grid-template-areas:
    "header"
    "nav"
    "content"
    "footer1"
    "footer2";
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 769px) {
  .adminGridContainer {
    grid-template-areas:
      "header header"
      "nav nav"
      "content content"
      "footer1 footer1"
      "footer2 footer2";
    grid-template-columns: 1fr;
  }
}
/* === Header === */
#header {
  grid-area: header;
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
}
#header h1 {
  color: #fff;
  margin: 30px 0 10px 0;
}
#header img {
  max-width: 100%;
  height: auto;
  margin: 20px 0 5px 0;
}

/* === Navigation === */
#nav {
  grid-area: nav;
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-height: 56px; /* Ensures nav has a minimum height */
  padding: 0 1em;
}
#nav #navbar {
  text-align: right;
  vertical-align: middle;
  font-size: 115%;
}
#nav #navbar li {
  display: inline-block;
  list-style: none;
  padding: 0 5px;
}

/* === Left Sidebar/Pic === */
#left_pic {
  grid-area: left_pic;
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 20px;
  display: none;
  min-height: 100px;
}
@media (min-width: 481px) {
  #left_pic {
    display: block;
    width: auto;
    margin: 0;
  }
}
#left_pic ul {
  text-align: center;
  display: block;
  margin: 0;
  padding: 0;
}
#left_pic li {
  display: block;
  list-style: none;
  margin: 0 0 5px 0;
}

/* === Main Content === */
#content {
  grid-area: content;
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
@media (min-width: 769px) {
  #content {
    width: 100%;
    margin-left: 0;
  }
}

/* === Right Section (inside content) === */
#right {
  text-align: justified-left;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#right img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
}
#right form {
  margin-left: 0;
}

/* === Footer Styles === */
#footer1, #footer2 {
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 15px;
  text-align: center;
  width: 100%;
}
#footer1 {
  grid-area: footer1;
  margin-top: 10px;
}
#footer2 {
  grid-area: footer2;
  font-size: 0.95em;
  margin-top: 10px;
}
#footer1 ul {
  text-align: left;
  margin: 0 auto;
  max-width: 600px;
  padding-left: 1.2em;
}
#footer1 ul li {
  margin-bottom: 0.5em;
}

/* === Forms and Labels === */
form {
  margin-left: 0;
  margin-bottom: 1em;
}
label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5em;
}

/* === Table Styles === */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.03);
  color: #fff;
  margin: 1rem auto;
  border-radius: 6px;
  overflow: hidden;
}
th, td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid #444;
}
th {
  background: rgba(60, 60, 60, 0.3);
}
tr:last-child td {
  border-bottom: none;
}
/* Center tables inside #right */
#right table {
  margin-left: auto;
  margin-right: auto;
}

/* === Responsive Tables === */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
    border: none !important; /* Remove all borders */
    box-shadow: none !important; /* Remove any box shadows */
  }
  thead {
    display: none;
  }
  tr {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: none !important; /* Remove row border */
  }
  td {
    position: relative;
    padding-left: 50%;
    border: none !important; /* Remove cell border */
  }
  td::before {
    position: absolute;
    left: 0;
    width: 45%;
    white-space: nowrap;
    content: attr(data-label);
    font-weight: bold;
    padding-left: 0.5rem;
    color: #81C784;
  }
}
/* === Pagination Bar === */
/* Modern Pagination Styles */
.pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin: 2em 0;
  padding: 0;
  list-style: none;
}

.pages li {
  display: inline;
}

.pages a {
  display: inline-block;
  padding: 0.5em 1em;
  color: #fff;
  background: #007bff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.pages a:hover,
.pages a:focus {
  background: #0056b3;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.pages .active a,
.pages a[aria-current="page"] {
  background: #ffc107;
  color: #222;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 600px) {
  .pages {
    flex-wrap: wrap;
    gap: 0.3em;
    margin: 1em 0;
  }
  .pages a {
    padding: 0.4em 0.7em;
    font-size: 1em;
    min-width: 2.5em;
  }
}
/* === Small Image List === */
.small {
  width: 100px;
  list-style: none;
  padding-inline-start: 0;
}
.small img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === eBay/Auction Nudge Styles === */
.an-ebay-logo {
  padding: 20px;
}
div#auction-nudge-items ul.an-page-wrap {
  background-color: transparent;
  border-color: #CC9900;
}
div#auction-nudge-items ul.an-page-wrap li.an-inactive {
  display: none;
}
div#auction-nudge-items ul.an-page-wrap li {
  font-size: 16px;
  font-weight: 900;
  font-family: inherit;
  color: inherit;
}
div#auction-nudge-items div#an-search-box {
  border-color: #CC9900;
  background-color: transparent;
}
div#auction-nudge-items div#an-search-submit {
  background-color: #666;
  color: #fff;
}

/* === Status Messages === */
.status-message {
  background: transparent;
  padding: 12px 16px;
  margin: 15px auto;
  width: 90%;
  max-width: 800px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  transition: opacity 1s ease, transform 1s ease;
}
.status-success {
  border: 2px solid #4CAF50;
  color: #4CAF50;
}
.status-error {
  border: 2px solid #F44336;
  color: #F44336;
}

/* === Image Manager Grid === */
#image-manager-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  justify-items: center;
}
.image-card {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 15px;
}
.image-card img {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}
.image-card form {
  margin-left: 0;
}
.rename-form,
.delete-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rename-form input[type="text"] {
  width: 100%;
  padding: 5px;
  font-size: 0.9em;
  box-sizing: border-box;
}
.image-card button {
  width: 100%;
  padding: 8px;
  margin: 4px 0;
  background-color: #ccc;
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.image-card button:hover {
  background-color: gray;
}

/* === Mobile Tweaks === */
@media (max-width: 480px) {
  .gridContainer {
    padding: 0.5em;
    gap: 0.5em;
  }
  #header, #nav, #content, #footer1, #footer2 {
    padding: 0.7em;
    border-radius: 10px;
  }
  #right img, #main img {
    max-width: 90vw;
  }
  #footer1, #footer2 {
    font-size: 0.95em;
  }
  #nav li {
    display: block;
    margin: 0.5rem 0;
  }
  .phone-links a {
    display: block;
    margin-bottom: 0.5rem;
  }
}

/* === Utilities === */
img {
  max-width: 100%;
  height: auto;
}
form {
  margin: 0;
}
input, button, select, textarea {
  font-family: inherit;
}


  .vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

.vehicle-card {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1em;
  color: #fff;
  margin-bottom: 0.5em;
}

.vehicle-card > div {
  margin-bottom: 0.4em;
}

.vehicle-actions a {
  color: #FFC107;
  text-decoration: none;
  margin-right: 0.5em;
}
.vehicle-actions a:hover {
  text-decoration: underline;
}

.vehicle-actions .action-btn {
  margin-right: 0.5em;
  margin-bottom: 0.5em;
}

.vehicle-actions .action-btn:last-child {
  margin-right: 0;
}

.action-btn,
.action-btn:visited,
input.action-btn,
button.action-btn {
  display: inline-block;
  padding: 0.4em 1em;
  margin-right: 0.5em;
  border-radius: 5px;
  background: #222;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: background 0.2s, color 0.2s;
  font-size: 1em;
  cursor: pointer;
}

.action-btn.edit,
input.action-btn.edit {
  background: #1976d2;
  color: #FFC107;
}

.action-btn.delete,
input.action-btn.delete {
  background: #d32f2f;
}

.action-btn.images {
  background: #388e3c;
}

.action-btn:hover,
input.action-btn:hover,
button.action-btn:hover {
  filter: brightness(1.2);
  color: #fff;
  text-decoration: underline;
}


#admin-content {
  grid-area: content;
  width: 100%;
  background: rgba(102, 102, 102, 0.2);
  border-radius: 20px;
  padding: 20px;
  /* ...other styles as needed... */
}

#admin-content textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical; /* allows user to resize height only */
}

#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  margin: 0.5em 0;
  position: absolute;
  top: 10px;
  right: 16px;
  margin: 0;
}

.hamburger {
  width: 28px;
  height: 4px;
  background: #FFC107;
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* Show hamburger and hide nav on small screens */
@media (max-width: 768px) {
  #nav {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 56px;
}
  #nav-toggle {
    display: flex;
  }
  #navbar {
    display: none;
    flex-direction: column;
    background: #222;
    position: absolute;
    top: 8px; /* adjust as needed */
    right: 16px;
    left: 10px;
    z-index: 1000;
    border-radius: 10px;
    padding: 1em 0;
  }
  #navbar.open {
    display: flex;
  }
}
.nav-back {
  margin-right: auto;
}

/* === Stock List Styles === */
.stock-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 1em 0;
}
.stock-card {
  background: #222;
  border-radius: 10px;
  padding: 1em;
  color: #FFC107;
  width: 270px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.15s;
}
.stock-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}
.stock-card img {
  max-width: 120px;
  border-radius: 6px;
  margin-bottom: 0.5em;
  background: #111;
}
.no-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 120px;
  height: 90px;
  background: #444;
  color: #fff;
  border-radius: 6px;
  margin: 0 auto 0.5em auto;
  text-align: center;
  font-size: 1em;
}
.stock-title {
  font-weight: bold;
  margin-bottom: 0.3em;
  color: #FFC107;
  font-size: 1.1em;
}
.stock-details {
  font-size: 0.95em;
  margin-bottom: 0.3em;
  color: #fff;
}
.stock-price {
  font-size: 1.2em;
  color: #fff;
  background: #388e3c;
  border-radius: 4px;
  padding: 0.2em 0.6em;
  margin-bottom: 0.2em;
  font-weight: bold;
}
@media (max-width: 600px) {
  .stock-list {
    flex-direction: column;
    align-items: center;
  }
  .stock-card {
    width: 95vw;
    max-width: 340px;
  }
}


.vehicle-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5em 1.5em;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 1em 1em 0.5em 1em;
  margin-bottom: 2em;
  font-size: 1.05em;
}
.vehicle-details dt {
  font-weight: bold;
  color: #FFC107;
  text-align: right;
  padding-right: 0.5em;
  white-space: nowrap;
}
.vehicle-details dd {
  margin: 0 0 0.5em 0;
  color: #fff;
  word-break: break-word;
}
@media (max-width: 600px) {
  .vehicle-details {
    grid-template-columns: 1fr;
    gap: 0.2em 0;
    font-size: 1em;
  }
  .vehicle-details dt {
    text-align: left;
    padding-right: 0;
    margin-top: 0.7em;
  }
  .vehicle-details dd {
    margin-bottom: 1em;
  }
}
.admin-menu {
  background: transparent; /* dark with opacity */
  padding: 1.5em 1em;
  max-width: 400px;
  margin: 2em auto;
}

.admin-menu .list-group-item {
  background: rgba(30, 30, 40, 0.85); /* dark with opacity */
  border-radius: 16px;
  border: none;
  color: #fff;
  font-size: 1.15em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  margin-bottom: 0.7em; /*space between items*/
  transition: background 0.2s, color 0.2s;
}

.admin-menu .list-group-item:last-child {
  margin-bottom: 0;
}

.admin-menu .list-group-item a {
  color: #fff;
  transition: color 0.2s;
}

.admin-menu .list-group-item:hover,
.admin-menu .list-group-item:focus-within {
  background: rgba(255,255,255,0.08);
}

.admin-menu .list-group-item a:hover,
.admin-menu .list-group-item a:focus {
  color: #ffc107;
  text-decoration: underline;
}

.admin-menu .badge {
  font-size: 0.9em;
  padding: 0.5em 0.8em;
}