/* ==========================
   Design tokens
   ========================== */

:root {
  --bg: #f6f7f8;
  --surface: #f8f8f4;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #425435;
  --accent-hover: #544835;
  --background-nav: #515136;
  --nav-color: #fff;
  --background-main: #ebebe7;
  --background-hero: #fff;
  --radius: 0.5rem;
  --radius-sm: 0.375rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 2rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
}

/* ==========================
   Base
   ========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
  background-color: var(--background-main);

}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

/* ==========================
   Page shell
   ========================== */

#page {
  margin: 0 auto;

  padding: 0;

}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================
   Header
   ========================== */

#header {

  border-radius: var(--radius);

  margin-bottom: var(--space-6);
  background-color: var(--background-hero);
  background-image: url('/images/background.webp');
}

#logo {
  margin-bottom: var(--space-4);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;

  vertical-align: middle;
  background-color: var(--background-nav);
padding: 2rem;

}

.topnav {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.topnav a, .top{
  font-size: 0.9rem;
    color: var(--nav-color);
    padding: .6rem;
}

.topnav a:hover {

  background-color: var(--accent);
}

#top-banner div {

    vertical-align: middle;
    height: 100%;

}
/* ==========================
   Main layout
   ========================== */

#content {
  display: grid;
  grid-template-columns: 1fr 250px; /* Main content takes remaining space, sidebar is fixed width */
  justify-content: center;
  gap: var(--space-4);
  max-width: 80%; /* Optional: constrain total width */
  margin: 0 auto; /* Center the entire layout */
  padding: var(--space-4);
  width: 100%;
  color: #544835;
}

/* ==========================
   Main content
   ========================== */

#main {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  width: 100%; /* Changed from 80% to use full grid column */
}

#main h1 {
  margin-top: 0;
  font-size: 1.5rem;
}


/* Pagination */


/* Pagination container */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  padding-bottom: 1rem;
}

/* Pagination list items */
.pagination li {
  display: inline-block;
}

/* Pagination links */
.pagination a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: #333;
  background-color: var(--background-main);
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

/* Hover state for non-active links */
.pagination a:not(.pagination-active):hover {
  background-color: var(--accent-hover);
  border-color: #bbb;
  color: #000;
}

/* Active page styling */
.pagination-active a,
a.pagination-active {
  background-color: var(--accent);;
  color: white;
  border-color: var(--accent);
  cursor: default;
  pointer-events: none;
}

/* Focus state for accessibility */
.pagination a:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* ==========================
   Product card
   ========================== */

.contentfit {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  background: #fff;
}

.contentfit {
  display: grid;
  grid-template-columns: 11.5em 1fr;
  gap: 1rem;
  align-items: start;
}


/* Product image */

.contentfit img.product {
  border-radius: var(--radius-sm);

}

/* Product header */
.contentfit h3 {
  margin: 0 0 var(--space-1);
  font-size: 1.1rem;
}

.contentfit h4 {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-weight: normal;
}

/* Price + CTA */
.mkright {
  float: none;
  text-align: right;
}

.price1 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

/* Add to cart button */
.add_button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  width: 8rem;
}

.add_button:hover {
  background: var(--accent-hover);
}

/* Product description */
.product_description {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Dimensions */
.contentfit > div:last-child {
  font-size: 0.8rem;
  color: var(--muted);
}


/* ==========================
   Sidebar
   ========================== */

#local {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  height: fit-content; /* Prevents sidebar from stretching */
  position: sticky; /* Optional: makes sidebar stay visible when scrolling */
  top: var(--space-4); /* Optional: offset from top when sticky */
}

#local h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.tree {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.tree li {
  margin-bottom: var(--space-1);
}

.tree a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: var(--space-1) 0;
}

.tree a:hover {
  color: var(--accent);
}

.tree .selected > a {
  font-weight: 600;
  color: var(--accent);
}

/* Cart table styling */
table.cart {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

table.cart thead th {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 2px solid #333;
  font-weight: 600;
}

table.cart thead th.blank {
  border-bottom: none;
}

table.cart tbody td {
  padding: 12px 8px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

table.cart tbody tr:last-child td {
  border-bottom: none;
  font-weight: 600;
}

/* Form buttons */
.clearbutton2 {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  width: 32px;
}

.clearbutton2:hover {
  background: #e0e0e0;
}

/* Bottom links section */
.bottomlinks {
  display: flex;
  justify-content: space-between;

  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

a.bottomlinks {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 15px;
  display: inline-block;
}

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

/* ==========================
   Responsive adjustments
   ========================== */

@media (max-width: 968px) {
  #content {
    grid-template-columns: 1fr; /* Stack on smaller screens */
  }

  #local {
    order: -1; /* Put sidebar above content on mobile */
  }
}

/* ==========================
   Footer
   ========================== */

#footer {
  margin-top: var(--space-8);
  text-align: center;
  font-size: 0.8rem;

  color: var(--accent);
}

/* ==========================
   Extra tagline
   ========================== */

#extra2 {
  text-align: center;
  font-size: 0.85rem;
  color: #fff;
  margin-top: 2rem;;
  background-color: var(--background-nav);
  padding:  var(--space-8);
}

/* ==========================
   Responsive
   ========================== */

@media (max-width: 900px) {
  #content {
    grid-template-columns: 1fr;
  }

  .mkright {
    float: none;
    text-align: left;
    margin-bottom: var(--space-2);
  }
}
