* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Noto Sans JP", sans-serif;
  background: #f7f3ee;
  color: #222;
}

a {
  text-decoration: none;
  color: inherit;
}

.fixed-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid #e5e5e5;
}

section[id] {
  scroll-margin-top: 120px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid #ededed;
  background: #fff;
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #222;
  white-space: nowrap;
}

.icon-link:hover,
nav a:hover,
.more-link:hover {
  opacity: 0.7;
}

.icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.icon-search {
  width: 18px;
  height: 18px;
  border: 2px solid #222;
  border-radius: 50%;
}

.icon-search::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #222;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

.icon-login {
  width: 18px;
  height: 18px;
}

.icon-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid #222;
  border-radius: 50%;
  background: #fff;
}

.icon-login::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 14px;
  height: 7px;
  border: 2px solid #222;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: none;
}

.icon-cart {
  width: 20px;
  height: 16px;
}

.icon-cart::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 13px;
  height: 8px;
  border: 2px solid #222;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.icon-cart::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  width: 7px;
  height: 4px;
  border: 2px solid #222;
  border-bottom: none;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.search-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.search-form {
  width: 220px;
  opacity: 1;
  margin-left: 12px;
}

.search-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #d5d5d5;
  outline: none;
  background: #fff;
  color: #222;
}

.header-bottom {
  padding: 12px 24px;
  background: transparent;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
}

nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
}

nav a {
  color: #333;
}

.site-title {
  max-width: 1100px;
  margin: 42px auto 18px;
  padding: 0 24px;
  text-align: center;
}

.site-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-title p {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: #555;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 70px;
}

section {
  margin-top: 56px;
}

section h2 {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding-left: 12px;
  border-left: 4px solid #8b3c3c;
}

.news-list {
  border-top: 1px solid #e5e5e5;
}

.news-item {
  display: flex;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
  line-height: 1.8;
}

.news-date {
  min-width: 110px;
  color: #666;
}

.news-text {
  flex: 1;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  display: block;
  border: 1px solid #e5e5e5;
  background: #fff;
  padding: 12px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.category-card:hover {
  opacity: 0.75;
}

.category-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.category-name {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  text-align: center;
  font-weight: 500;
}

.section-box {
  border-top: 1px solid #e5e5e5;
  padding-top: 18px;
}

.section-box p,
.section-box div {
  font-size: 14px;
  line-height: 1.9;
  color: #444;
}

.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid #e5e5e5;
}

.contact-text {
  margin: 0;
}

.more-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: #666;
}

footer {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

.hero {
  width: 100%;
  margin-top: 20px;
  text-align: center;
}

.hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.hero p {
  margin-top: 40px;
}

.hero-secret-area {
  position: relative;
}

.hero-img {
  width: 100%;
  display: block;
}

.secret-click-zone {
  position: absolute;
  left: 60%;
  top: 42%;
  width: 12%;
  height: 18%;
  background: transparent;
  border: none;
}

.page-number {
  font-size: 12px;
  color: #777;
  font-family: "Courier New";
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-align: center;
}

.error-box {
  border-top: none;
  padding-top: 0;
}

.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-modal.is-open {
  display: flex;
}

.login-box {
  position: relative;
  background: #fff;
  padding: 25px;
  width: 280px;
  border-radius: 6px;
  text-align: center;
}

/* 入力欄 */
.login-box input {
  width: 100%;
  height: 40px;
  margin: 8px 0;
  padding: 0 10px;
}

/* ボタン */
#loginSubmit {
  margin-top: 10px;
  width: 100%;
  height: 40px;
}

/* ×ボタン */
.login-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 40px 20px 20px;
  position: relative;
}

.login-box h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 500;
}

.login-close {
  position: absolute;
  top: -12px;
  right: -12px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;

  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  .login-close {
    width: 48px;
    height: 48px;
    font-size: 30px;
  }
}

.login-input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d5d5d5;
  background: #fff;
  font-size: 14px;
  color: #222;
  outline: none;
}

.login-input:focus {
  border-color: #8b3c3c;
}

.login-error {
  min-height: 1.5em;
  margin: 4px 0 12px;
  font-size: 13px;
  color: #8b3c3c;
}

.login-submit {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #8b3c3c;
  background: #8b3c3c;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.login-submit:hover {
  opacity: 0.9;
}

.login-submit-btn {
  width: 100%;
  height: 45px;
  margin-top: 12px;
  background: #007bff;
  /* 青 */
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

.login-submit-btn:hover {
  background: #005ecb;
}

/* --- カート --- */
.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #005bbb;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
  box-sizing: border-box;
}

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.cart-modal.is-open {
  display: flex;
}

.cart-modal-content {
  position: relative;
  width: min(860px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 4px;
  padding: 34px 22px 36px;
  box-sizing: border-box;
}

.cart-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: none;
  background: none;
  font-size: 38px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}

.cart-title {
  margin: 0 0 16px;
  font-size: 20px;
  color: #111;
}

.cart-table-head {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  color: #777;
  font-size: 14px;
}

.cart-items {
  min-height: 80px;
}

.cart-item {
  display: grid;
  grid-template-columns: 28px 64px 1fr 120px 120px 120px;
  gap: 12px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e5e5e5;
}

.cart-remove {
  border: none;
  background: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.cart-thumb,
.cart-thumb-empty {
  width: 60px;
  height: 60px;
  display: block;
  object-fit: cover;
  background: #eee;
}

.cart-name {
  font-size: 15px;
  line-height: 1.6;
  color: #111;
}

.cart-price,
.cart-subtotal {
  font-size: 15px;
  color: #111;
}

.cart-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #efefef;
  color: #666;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cart-qty-num {
  min-width: 18px;
  text-align: center;
  font-size: 18px;
  color: #111;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  gap: 36px;
  padding: 18px 0 28px;
  font-size: 18px;
  font-weight: bold;
  color: #111;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* 🔥ここが今回の変更 */
.cart-purchase-btn,
.cart-continue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(400px, 100%);
  height: 58px;
  background: #0078d7;
  /* 青 */
  color: #ffffff;
  /* 白文字 */
  border: none;
  font-size: 16px;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.cart-purchase-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #005bbb;
  color: #fff;
  border: none;
  letter-spacing: 0.05em;
}

.cart-purchase-btn:hover {
  background: #0063b1;
}

.cart-continue-btn {
  background: none;
  border: none;
  color: #0078d7;
  min-height: auto;
}

.cart-empty {
  padding: 36px 0;
  text-align: center;
  color: #666;
}

#thanksClose {
  display: block;
  margin: 20px auto 0;
}

.coupon-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#couponInput {
  width: 250px;
  height: 45px;
  font-size: 18px;
  padding: 0 10px;
}

#couponSubmit {
  height: 45px;
  padding: 0 15px;
  font-size: 16px;
}

.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.login-modal.is-open {
  display: flex;
}

.login-box {
  background: #fff;
  padding: 20px;
  text-align: center;
}

/* --- スマホ --- */
@media (max-width: 720px) {
  .cart-modal-content {
    padding: 28px 16px 24px;
  }

  .cart-table-head {
    display: none;
  }

  .cart-item {
    grid-template-columns: 24px 60px 1fr;
    gap: 10px;
  }

  .cart-price,
  .cart-subtotal,
  .cart-qty-wrap {
    grid-column: 3;
  }

  .cart-qty-wrap {
    justify-content: flex-start;
  }

  .cart-summary {
    justify-content: space-between;
  }
}

.thanks-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.thanks-modal.is-open {
  display: flex;
}

.thanks-box {
  background: #fff;
  padding: 40px 30px;
  border: 1px solid #ddd;
  text-align: center;
  min-width: 300px;
}

.thanks-box p {
  font-size: 18px;
  margin-bottom: 20px;
}

.thanks-box button {
  padding: 10px 20px;
  border: none;
  background: #0078d7;
  color: #fff;
  cursor: pointer;
}

.company-greeting {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.greeting-image img {
  width: 100%;
  display: block;
  border: 1px solid #e5e5e5;
  background: #fff;
}

.greeting-text p {
  margin: 0 0 16px;
}

.greeting-sign {
  margin-top: 24px;
  text-align: right;
}

.company-table {
  border-top: 1px solid #e5e5e5;
}

.company-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid #e5e5e5;
}

.company-label,
.company-value {
  padding: 14px 0;
  font-size: 14px;
  line-height: 1.8;
}

.company-label {
  color: #666;
}

@media (max-width: 720px) {
  .company-greeting {
    grid-template-columns: 1fr;
  }

  .company-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }

  .company-label,
  .company-value {
    padding: 0;
  }
}

.company-page .section-box p {
  font-size: 16px;
  line-height: 2;
}

.company-page .company-label,
.company-page .company-value {
  font-size: 15px;
}

.company-page h2 {
  font-size: 22px;
}

.info-table th,
.info-table td {
  padding: 14px 16px;
}

.info-table th {
  padding-right: 24px;
  width: 20%;
}

@media (max-width: 720px) {
  section[id] {
    scroll-margin-top: 140px;
  }

  .header-top {
    padding: 12px 16px;
  }

  .header-bottom {
    padding: 10px 16px;
  }

  nav {
    gap: 14px;
  }

  .site-title {
    padding: 0 16px;
  }

  main {
    padding: 24px 16px 60px;
  }

  .news-item {
    flex-direction: column;
    gap: 6px;
  }

  .news-date {
    min-width: auto;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .top-left,
  .top-right {
    gap: 12px;
  }

  .icon-link {
    font-size: 13px;
  }

  .search-form {
    width: 160px;
  }

  .cart-modal-content {
    padding: 28px 16px 24px;
  }

  .cart-table-head {
    display: none;
  }

  .cart-item {
    grid-template-columns: 24px 60px 1fr;
    gap: 10px;
  }

  .cart-price,
  .cart-subtotal,
  .cart-qty-wrap {
    grid-column: 3;
  }

  .cart-qty-wrap {
    justify-content: flex-start;
  }

  .cart-summary {
    justify-content: space-between;
  }
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(0, 0, 0, 0.5);
}

.login-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal-content {
  background: #fff;
  width: 320px;
  padding: 30px 20px;
  border-radius: 8px;
  position: relative;
}

.login-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  border: none;
  background: none;
  cursor: pointer;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form input {
  padding: 10px;
  border: 1px solid #ccc;
}

#loginSubmit {
  background: #0078d7;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.login-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 32px;
  height: 32px;
  border-radius: 50%;

  border: none;
  background: #eee;
  color: #333;

  font-size: 18px;
  line-height: 32px;
  text-align: center;

  cursor: pointer;
}

.login-close:hover {
  background: #ddd;
}

#historyButton {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99999;
  padding: 8px 14px;
  background: white;
  color: black;
  border: 1px solid black;
  font-size: 14px;
  cursor: pointer;
}

#historyPanel {
  position: fixed;
  left: 20px;
  bottom: 60px;
  width: 280px;
  background: white;
  border: 1px solid black;
  z-index: 99999;
  display: none;
}

#historyPanel.is-open {
  display: block;
}

#historyPanel {
  max-height: 320px;
  overflow: hidden;
}

#historyList {
  max-height: 260px;
  overflow-y: auto;
}