* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  margin: 0;
  background: #fafafa;
}

a {
  color: #1a5d3a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
}

.brand {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1a5d3a;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.account-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inline-form {
  display: inline;
}

.site-content {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: #777;
  border-top: 1px solid #ddd;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.card-thumb {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.card-thumb-placeholder {
  height: 150px;
  background: #eee;
}

.price {
  font-weight: bold;
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #1a5d3a;
  color: #fff;
  border-radius: 4px;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 0.5rem;
  text-align: left;
}

.messages {
  list-style: none;
  padding: 0;
}

#model-preview {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  overflow: hidden;
}

.model-preview-size-label {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #1a5d3a;
  border-radius: 3px;
  color: #1a5d3a;
  font-size: 0.75rem;
  padding: 1px 4px;
  white-space: nowrap;
}

.help-text {
  color: #666;
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  color: #b3261e;
  font-size: 0.9rem;
}

.profile-menu {
  position: relative;
}

.profile-menu > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.profile-menu-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0;
  z-index: 10;
}

.profile-menu-panel a,
.profile-menu-panel .inline-form button {
  padding: 0.5rem 1rem;
  text-align: left;
}

.profile-menu-panel .inline-form {
  display: block;
}

.profile-menu-panel .inline-form button {
  width: 100%;
  background: none;
  border: none;
  color: #1a5d3a;
  cursor: pointer;
  font-size: 1rem;
}

.profile-menu-panel hr {
  width: 100%;
  border: none;
  border-top: 1px solid #eee;
  margin: 0.25rem 0;
}

.material-price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.material-name {
  min-width: 12rem;
}

.material-info {
  position: relative;
}

.material-info > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 0.8rem;
  color: #1a5d3a;
}

.material-info > p {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.25rem;
  width: 16rem;
  max-width: 60vw;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  z-index: 10;
}

.schedule-widget {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}

.schedule-widget > summary {
  cursor: pointer;
  color: #1a5d3a;
  font-weight: 600;
}

.schedule-widget-body {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-widget-days {
  border: none;
  padding: 0;
  margin: 0;
}

.schedule-widget-days legend {
  font-size: 0.85rem;
  color: #666;
  padding: 0;
}

.schedule-widget-days ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 0.25rem 0 0;
}

.schedule-widget-hours {
  display: flex;
  gap: 1rem;
}

.schedule-widget-hours label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #666;
}
