@import url("./sanitize.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap");

:root {
  /* Color Palette - Black/Dark Blue Theme */
  --primary-color: #0d1b2a; /* Very Dark Blue (almost black) */
  --secondary-color: #1b2631; /* Dark Slate Blue */
  --accent-color: #e0e0e0; /* Light Gray for borders */
  --highlight-color: #1565c0; /* Strong Blue for links/highlights */
  --bg-color: #ffffff; /* White for high contrast */
  --text-color: #000000; /* Black for text */
  --white: #ffffff;

  /* Typography */
  --font-main: "Noto Sans JP", sans-serif; /* Clean Sans-serif for body */
  --font-serif: "Noto Serif JP", serif; /* Serif for headings */
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

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

/* Layout Container */
#container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
  background-color: var(--white);
  /* Removed shadow for a flatter, sharper look or keep it subtle */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  min-height: 100vh;
}

/* Header & Hero */
header {
  text-align: center;
  padding: 80px 20px;
  padding: 80px 20px;
  border-bottom: 1px solid var(--accent-color); /* Thinner, lighter border */
  /* White/Light overlay on the image */
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0.6)
    ),
    url("./roaster.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--primary-color); /* Dark text for contrast against light bg */
}

h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--primary-color); /* Dark text on light background */
  margin-bottom: 20px;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8); /* Light shadow for dark text */
}

/* header img is removed in HTML */
header img {
  display: none;
}

header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 10px auto;
  color: var(--secondary-color); /* Darker text for readability */
  font-weight: 400;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.score-bean {
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
  /* Invert filter to make beans visible if they are dark, or keep as is if they are light. 
     Assuming beans are brown/dark, they might need a background or be replaced. 
     For now, let's leave them as is, maybe add a white bg if needed. */
}

.section-image {
  margin: 30px auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow instead of border */
  border-radius: 4px; /* Soften corners */
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeIn 1.5s ease-out;
}

/* Navigation */
nav {
  background-color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--secondary-color);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: bold;
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.8;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
  list-style: none;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  display: block;
  padding: 15px 30px;
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

nav ul li a:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

/* Sections & Headings */
section {
  padding: 40px 0;
}

h2 {
  font-family: var(--font-serif);
  color: var(--primary-color);
  font-size: 2.2rem;
  font-size: 2.2rem;
  border-bottom: 1px solid var(--primary-color); /* Thinner border */
  padding-bottom: 10px;
  margin-top: 60px;
  margin-bottom: 30px;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color); /* Thinner accent */
  padding-left: 15px;
  font-family: var(--font-serif);
}

/* Tables (Product Lists) */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 40px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  border: 1px solid var(--accent-color); /* Thinner, lighter border */
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--accent-color);
  color: var(--text-color);
}

th {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  font-family: var(--font-serif);
}

/* Specific Table Styles */
table#sale {
  background-color: #f0f4f8; /* Very light blue/gray background */
  border: 1px solid var(--accent-color); /* Thinner border */
}

table#sale th {
  background-color: var(
    --primary-color
  ); /* Changed from highlight-color to primary-color */
  font-size: 1.2rem;
}

table#sale .price {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(
    --primary-color
  ); /* Changed from highlight-color to primary-color */
}

table.list th {
  background-color: var(--primary-color);
}

table.list tr:nth-child(even) {
  background-color: #f2f2f2; /* Zebra striping for readability */
}

table.list tr:hover {
  background-color: #e8e8e8;
}

table.list th em {
  display: block;
  font-size: 0.7rem;
  color: #ccc;
  font-weight: normal;
  margin-top: 4px;
  font-style: italic;
}

table.list td.price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.1rem;
  text-align: right;
}

/* Postage Table */
#postage {
  border: 1px solid var(--primary-color);
}

#postage th {
  background-color: var(--secondary-color);
  color: var(--white);
  border: 1px solid #555;
}

#postage td {
  border: 1px solid #ccc;
  text-align: center;
}

#postage caption {
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Access Section */
#shopmap {
  width: 100%;
  margin-top: 20px;
}

#shopmap tr {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 20px;
}

#shopmap tr:last-child {
  border-bottom: none;
}

#shopmap th {
  flex: 1;
  min-width: 300px;
  border: none;
  padding-right: 20px;
  background-color: transparent; /* Reset bg from generic th rule */
  color: var(--text-color);
}

#shopmap th strong {
  font-size: 1.4rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 15px;
  font-family: var(--font-serif);
}

#shopmap th ul {
  padding-left: 0;
}

#shopmap th ul li {
  list-style: none;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

#shopmap td {
  flex: 1;
  min-width: 300px;
  border: none;
  padding: 0;
}

#shopmap iframe {
  width: 100%;
  height: 300px;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  font-size: 0.9rem;
  border-top: 1px solid var(--secondary-color);
}

/* Utilities */
.note {
  font-size: 0.9rem;
  color: #ffffff;
}

div.notice {
  /* background-color: #e3f2fd; */
  /* border-radius: 4px; */
  padding: 20px;
  margin-bottom: 30px;
  /* border: 1px solid var(--highlight-color);
  color: var(--primary-color); */
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
  }

  .nav-container {
    flex-direction: column;
    padding: 0;
  }

  .nav-logo {
    padding: 15px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  nav ul li a {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  #container {
    padding: 0;
  }

  header,
  section {
    padding: 20px 15px;
  }
}

span.small {
  font-size: 1rem;
}
