:root {
  --primary: #006d77;
  --secondary: #83c5be;
  --accent: #edc7b7;
  --dark: #264653;
  --light: #f0efeb;
  --text: #333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
}

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

/* Header */
.site-header {
  background: var(--dark);
  color: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo {
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.logo-img {
  height: 42px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.logo-text {
  font-weight: 700;
  letter-spacing: 1px;
}
.logo:hover {
  opacity: 0.9;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.site-nav a {
  color: #fff;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.site-nav a:hover {
  color: var(--secondary);
}
.site-nav .user-email {
  margin-left: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #d1d5db;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

/* Main */
.site-main {
  padding: 0.5rem 0 2rem;
}

/* Category List */
.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 1rem;
}
.category-card {
  background: #fff;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.category-card a {
  color: var(--dark);
  text-decoration: none;
  font-size: 1.1rem;
  display: block;
  margin-top: 0.5rem;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 1.5rem;
}
.product-card {
  background: #fff;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
.product-info {
  padding: 1rem;
  flex-grow: 1;
}
.product-info h5 {
  margin: 0 0 0.5rem;
  color: var(--dark);
}
.product-info p {
  margin: 0.25rem 0;
}
.product-info .price {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 0.5rem;
}
.product-card .btn {
  margin: 1rem;
  padding: 0.5rem;
  background: var(--primary);
  color: #fff;
  text-align: center;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}
.product-card .btn:hover {
  background: var(--secondary);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.table th,
.table td {
  padding: 0.75rem;
  border: 1px solid #ddd;
}
.table thead {
  background: var(--secondary);
  color: #fff;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #ccc;
  padding: 1rem 0;
  text-align: center;
}
.site-footer a {
  color: var(--secondary);
  margin: 0 0.5rem;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* === Header dropdown (matches top nav link styles) === */
.site-nav .dropdown { 
  position: relative; 
  margin-left: 1.5rem; 
}

.site-nav .dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
  color: #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: color 0.2s;
}

.site-nav .dropdown-toggle:hover,
.site-nav .dropdown-toggle:focus {
  color: var(--secondary);
}

.site-nav .dropdown-toggle .chev { 
  font-size: .85em; 
  transition: transform .15s ease; 
}
.site-nav .dropdown.open .dropdown-toggle .chev { 
  transform: rotate(180deg); 
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: .4rem;
  margin-top: .4rem;
  display: none;
  z-index: 1000;
}

.dropdown.open .dropdown-menu { 
  display: block; 
}

.dropdown-menu a {
  display: block;
  padding: .5rem .75rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: #f4f6f8;
  color: var(--dark);
}

/* Bulletins */
.bulletin-banner {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.bulletin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.bulletin-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.bulletin-link,
.bulletin-text {
  color: #9a3412;
  font-weight: 600;
}
.bulletin-link {
  text-decoration: none;
  border-bottom: 1px solid #9a3412;
}
.bulletin-link:hover,
.bulletin-link:focus {
  color: #7c2d12;
  border-bottom-color: #7c2d12;
}

#bulletin-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}
.bulletin-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  max-width: 640px;
  width: 100%;
  padding: 1.25rem 1.5rem;
}
.bulletin-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.bulletin-panel header h3 {
  margin: 0;
  color: var(--dark);
}
.bulletin-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #475569;
  cursor: pointer;
}
.bulletin-close:hover,
.bulletin-close:focus {
  color: #1f2937;
}
.bulletin-body {
  color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .logo {
    font-size: 1.2rem;
  }
  .logo-img {
    height: 36px;
  }
  .site-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .site-nav a,
  .site-nav .dropdown,
  .site-nav .user-email {
    margin-left: 0.75rem;
  }
}
