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

:root {
  --fg: #1a1a1a;
  --fg-2: #444;
  --fg-3: #777;
  --fg-4: #aaa;
  --border: rgb(0 0 0 / 0.08);
  --bg: #fff;
  --bg-subtle: #f5f5f5;
  --accent: #1a1a1a;
  --price: #c41200;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* --- SR Bar --- */

.sr-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;

  & .sr-bar-title {
    font-weight: bold;
    letter-spacing: 0.04em;
    color: var(--fg-3);
  }
}

.sr-control {
  display: flex;
  align-items: center;
  gap: 8px;

  & label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.6875rem;
    color: var(--fg-3);
    user-select: none;
    letter-spacing: 0.02em;
  }

  & input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
  }
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.5625rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);

  &[data-state="off"] {
    background: var(--fg-4);
  }
}

/* --- Hint --- */

.hint {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  background: var(--bg-subtle);
  font-size: 0.75rem;
  color: var(--fg-3);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

/* --- PLP Header --- */

.plp-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 24px;

  & h1 {
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
  }

  & .plp-count {
    font-size: 0.75rem;
    color: var(--fg-3);
  }
}

/* --- Product Grid --- */

.product-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}

.product-tile {
  display: block;
  color: inherit;
  text-decoration: none;

  &:hover {
    & .product-thumb {
      opacity: 0.85;
    }
  }
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-subtle);
  margin-bottom: 12px;
  transition: opacity 0.2s;
}

.product-name {
  font-size: 0.8125rem;
  font-weight: normal;
  line-height: 1.5;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.product-price {
  font-size: 0.875rem;
  font-weight: bold;
  color: var(--price);
}

/* --- PDP Layout --- */

.pdp {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* --- PDP Images --- */

.pdp-images {
  & .pdp-main-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--bg-subtle);
    margin-bottom: 12px;
  }
}

.pdp-sub-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;

  & img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-subtle);
  }
}

/* --- PDP Info --- */

.pdp-info {
  & h1 {
    font-size: 1.375rem;
    font-weight: bold;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin-bottom: 16px;
  }
}

.pdp-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--price);
  margin-bottom: 24px;
}

.pdp-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--fg-3);
}

.pdp-desc {
  margin-bottom: 32px;

  & h2 {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 12px;
  }

  & p {
    font-size: 0.8125rem;
    color: var(--fg-2);
    line-height: 1.85;
    margin-bottom: 16px;
  }
}

.pdp-specs {
  margin-bottom: 32px;

  & h2 {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 12px;
  }
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;

  & th,
  & td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-weight: normal;
  }

  & th {
    width: 120px;
    color: var(--fg-3);
  }
}

.pdp-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: bold;
  text-align: center;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  transition: opacity 0.15s;

  &:hover {
    opacity: 0.8;
  }
}

/* --- Back Link --- */

.back-link {
  display: inline-block;
  color: var(--fg-3);
  font-size: 0.8125rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;

  &:hover {
    color: var(--fg);
  }

  &::before {
    content: "\2190\a0";
  }
}
