/* =============================================
   Premium Design System — OSAKI GIBIER
   ============================================= */
:root {
  /* Primary palette */
  --primary: #1a3328;
  --primary-light: #2a5240;
  --primary-lighter: #3a7258;
  --primary-surface: rgba(26, 51, 40, 0.04);

  /* Accent — warm gold */
  --accent: #b8964a;
  --accent-light: #d4b06a;
  --accent-surface: rgba(184, 150, 74, 0.08);

  /* Neutrals */
  --bg: #f5f2ee;
  --bg-warm: #faf8f5;
  --card: #ffffff;
  --card-hover: #fdfcfb;
  --text: #1a1d23;
  --text-secondary: #555d6b;
  --text-muted: #8c95a4;
  --border: rgba(0, 0, 0, 0.07);
  --border-light: rgba(0, 0, 0, 0.04);

  /* Feedback */
  --success: #0d9b6a;
  --success-bg: #edfaf4;
  --success-border: rgba(13, 155, 106, 0.2);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.04);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout (shared header/footer) */
  --forest-deep: #1b3028;
  --gold: #c5a55a;
  --gold-light: #d4ba76;
  --white: #ffffff;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family:
    "Plus Jakarta Sans", "Zen Maru Gothic", "Hiragino Maru Gothic ProN",
    system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-top: 80px;
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
}

a {
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: var(--primary-lighter);
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* ===== Hero / Title Section ===== */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 40px 0;
  text-align: center;
}

.hero-inner {
  position: relative;
  overflow: hidden;
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-inner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;

  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(58, 90, 58, 0.08);
  border: 1px solid rgba(58, 90, 58, 0.12);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.hero-title {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero-name {
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  position: relative;
  z-index: 1;
}

/* ===== Date Widget Section ===== */
.date-widget-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 40px 8px;
  display: flex;
  justify-content: center;
}

.date-widget {
  position: relative;
  display: inline-block;
}

/* Trigger Button */
.date-widget-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.date-widget-trigger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-lighter);
}

.date-widget-trigger.active {
  background: linear-gradient(135deg, #5a7a5a 0%, #6a8a6a 100%);
  border-color: var(--primary);
  box-shadow:
    var(--shadow-lg),
    0 0 0 4px rgba(26, 51, 40, 0.1);
}

.date-widget-trigger.active .trigger-icon,
.date-widget-trigger.active .trigger-label,
.date-widget-trigger.active .trigger-date,
.date-widget-trigger.active .trigger-arrow {
  color: white;
}

.date-widget-trigger.loading {
  opacity: 0.6;
  pointer-events: none;
}

.trigger-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #5a7a5a 0%, #7a9a7a 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.35s var(--ease-out);
  flex-shrink: 0;
}

.date-widget-trigger.active .trigger-icon {
  background: linear-gradient(135deg, #5a7a5a 0%, #7a9a7a 100%);
}

.trigger-icon svg {
  width: 20px;
  height: 20px;
}

.trigger-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.trigger-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.trigger-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s ease;
  letter-spacing: 0.02em;
}

.trigger-arrow {
  margin-left: 8px;
  color: var(--text-muted);
  transition: all 0.35s var(--ease-out);
}

.trigger-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease-out);
}

.date-widget-trigger.active .trigger-arrow svg {
  transform: rotate(180deg);
}

/* Calendar Dropdown */
.date-calendar-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.97);
  width: 330px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px var(--border-light);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease-out);
  z-index: 1000;
}

.date-calendar-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.calendar-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.calendar-hint {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* Month Navigation */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.nav-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out);
  font-family: inherit;
}

.nav-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}

.current-month {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* Calendar Grid */
.calendar-grid {
  margin-bottom: 0;
}

.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-weight: 600;
  font-size: 10px;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekday.sunday {
  color: #e05252;
}

.weekday.saturday {
  color: #4a8fd4;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg);
  position: relative;
  transition: all 0.25s var(--ease-out);
  animation: fadeInScale 0.3s ease-out forwards;
  opacity: 0;
  overflow: hidden;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.day-cell.empty {
  background: transparent;
  animation: none;
  opacity: 1;
}

.day-cell.sunday .day-number {
  color: #e05252;
}

.day-cell.saturday .day-number {
  color: #4a8fd4;
}

.day-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  z-index: 2;
}

/* Days with data */
.day-cell.has-data {
  background: linear-gradient(135deg, #fff0ed 0%, #ffe8e0 100%);
  cursor: pointer;
  border: 1px solid transparent;
  justify-content: flex-start;
  padding-top: 1px;
  gap: 0;
}

.day-cell.has-data .day-number {
  font-size: 10px;
  line-height: 1;
  margin-bottom: -2px;
}

.day-cell.has-data:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(255, 130, 100, 0.25);
  border-color: #ffbba8;
  z-index: 10;
}

.day-cell.has-data:active {
  transform: scale(0.95);
}

.pig-indicator {
  font-size: 24px;
  animation: pigBounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
  line-height: 1;
}

@keyframes pigBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Selected date */
.day-cell.selected {
  background: linear-gradient(135deg, #5a7a5a 0%, #7a9a7a 100%);
  box-shadow: 0 4px 14px rgba(26, 51, 40, 0.35);
}

.day-cell.selected .day-number {
  color: white !important;
  font-weight: 700;
}

.day-cell.selected .pig-indicator {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.day-cell.selected::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  border: 2px solid var(--primary-lighter);
  animation: selectedPulse 2.5s ease-in-out infinite;
}

@keyframes selectedPulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.3;
  }
}

/* ===== Main Content Layout ===== */
.main-content {
  display: flex;
  padding: 20px 40px 60px;
  gap: 36px;
  max-width: 1200px;
  margin: 0 auto;
  transition: opacity 0.3s ease;
}

.main-content.loading {
  opacity: 0.4;
  pointer-events: none;
}

.left-section {
  flex: 1;
  min-width: 0;
}

.right-section {
  flex: 0 0 380px;
  min-width: 0;
}

/* ===== Entry Cards ===== */
.entry-box {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease-out);
}

.entry-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.entry-content {
  flex: 1;
}

/* ===== Inspection Section ===== */
.inspection-section {
  margin-top: 28px;
}

.inspection-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgb(22 13 13 / 26%);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== Info Items ===== */
.info-block {
  margin-bottom: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgb(22 13 13 / 26%);
}

.info-block h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.info-item {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.info-label {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Test Result Badge */
.result-negative {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--success-bg);
  color: #0000ff;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid var(--success-border);
  letter-spacing: 0.03em;
}

/* ===== Dates + Seal Row ===== */
.dates-seal-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  flex-wrap: nowrap;
  gap: 24px;
}

.dates-section {
  flex: 1;
}

.seal-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.seal-section img {
  border-radius: 50%;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(184, 150, 74, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.seal-section:hover img {
  transform: scale(1.05) rotate(2deg);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(184, 150, 74, 0.45),
    0 24px 56px rgba(0, 0, 0, 0.15);
}

.seal-label {
  font-size: 11px;
  color: black;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ===== Processor Info Card ===== */
.processor-info {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.35s var(--ease-out);
}

.processor-info:hover {
  box-shadow: var(--shadow-md);
}

.processor-info h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--primary);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.processor-info p {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.processor-info a {
  color: var(--primary-lighter);
  font-weight: 500;
  transition: color 0.2s ease;
}

.processor-info a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.products-list {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* ===== Product Images ===== */
.product-images {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.product-images .product-image {
  flex: 0 0 calc(50% - 8px);
}

.product-image {
  flex: 1;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease-out);
}

.product-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(0, 0, 0, 0.15) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-image:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image:hover::after {
  opacity: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.product-image:hover img {
  transform: scale(1.05);
}

/* Boar sign image — no card styling */
.boar-sign-image {
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.boar-sign-image img {
  object-fit: contain;
}

.slice-image {
  height: auto;
  align-self: flex-start;
}

.slice-image img {
  width: 100%;
  height: auto;
  object-fit: initial;
}

.boar-sign-image::after {
  display: none;
}

.boar-sign-image:hover {
  transform: none;
  box-shadow: none;
}

.boar-sign-image:hover img {
  transform: none;
}

/* ===== Location Link Styling ===== */
.location-address {
  color: var(--primary-lighter);
  font-weight: 500;
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .right-section {
    flex: 0 0 340px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 72px;
  }

  .breadcrumb {
    display: none;
  }

  .hero-section {
    padding: 8px 16px 0;
  }
  .hero-badge {
    margin-bottom: 10px;
  }

  .hero-inner {
    padding: 18px 12px 16px;
    border-radius: var(--radius-lg);
  }

  .hero-name {
    font-size: 20px;
  }

  .hero-title {
    font-size: 13px;
  }

  .main-content {
    flex-direction: column;
    padding: 16px 16px 48px;
    gap: 24px;
  }

  .right-section {
    flex: 1;
  }

  .entry-box {
    padding: 0 20px 20px;
    border-radius: var(--radius-md);
  }

  .info-item {
    word-break: break-word;
    font-size: 13px;
  }

  .info-block h2 {
    font-size: 16px;
  }

  .dates-seal-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .seal-section img {
    width: 80px;
  }

  .product-images {
    flex-direction: column;
  }

  .boar-sign-image {
    height: 96px;
    width: 48%;
    margin-left: auto;
    margin-right: auto;
  }

  .product-image {
    height: 200px;
  }

  .processor-info {
    padding: 24px;
  }

  /* Date widget responsive */
  .date-widget-section {
    padding: 0px 16px 4px;
  }

  .date-widget-trigger {
    padding: 12px 16px;
    gap: 10px;
  }

  .trigger-icon {
    width: 36px;
    height: 36px;
  }

  .trigger-icon svg {
    width: 18px;
    height: 18px;
  }

  .trigger-label {
    font-size: 9px;
  }

  .trigger-date {
    font-size: 14px;
  }

  .date-calendar-dropdown {
    width: 295px;
    padding: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.97);
  }

  .date-calendar-dropdown.open {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .calendar-hint {
    font-size: 10px;
    padding: 5px 12px;
  }

  .nav-btn {
    width: 30px;
    height: 30px;
  }

  .nav-btn svg {
    width: 14px;
    height: 14px;
  }

  .current-month {
    font-size: 14px;
  }

  .weekday {
    font-size: 10px;
    padding: 4px 0;
  }

  .days-grid {
    gap: 3px;
  }

  .day-cell {
    border-radius: 6px;
  }

  .day-number {
    font-size: 12px;
  }

  .day-cell.has-data .day-number {
    font-size: 9px;
    margin-bottom: -2px;
  }

  .pig-indicator {
    font-size: 21px;
  }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-lighter);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-lighter) var(--bg);
}
