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

/* --- Utility --- */
.text-center {
  text-align: center;
}

.u-mt0 {
  margin-top: 0;
}

.u-mt20 {
  margin-top: 20px;
}

.u-mt40 {
  margin-top: 40px;
}

.u-mb30 {
  margin-bottom: 30px;
}

.u-my40 {
  margin: 40px 0;
}

.u-font-bold {
  font-weight: bold;
}

.u-fs20 {
  font-size: 20px;
}

/* --- Components --- */
.c-button {
  display: inline-block;
  padding: 12px 30px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: opacity 0.3s;
  text-decoration: none;
}

.c-button:hover {
  opacity: 0.8;
  color: #fff;
}

.c-button--sub {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.c-button--sub:hover {
  color: #333;
  background-color: #e5e5e5;
}

/* --- Shared Form & Modal Styles --- */
.p-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.p-modal.is-active {
  display: flex;
}

.p-modal__inner {
  background: #fff;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  padding: 40px;
  border-radius: 8px;
  position: relative;
}

.p-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.p-confirm-list {
  margin-bottom: 30px;
  text-align: left;
}

.p-confirm-list dt {
  font-weight: bold;
  margin-top: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.p-confirm-list dd {
  margin-left: 0;
  padding: 5px 0;
}

.p-modal__footer {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.p-shared-form {
  max-width: 700px;
  margin: 40px auto;
  background: #fdfdfd;
  padding: 40px;
  border: 1px solid #eee;
  text-align: left;
}

.p-shared-form .form-item {
  margin-bottom: 25px;
}

.p-shared-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
}

.p-shared-form input[type="text"],
.p-shared-form input[type="email"],
.p-shared-form input[type="tel"],
.p-shared-form select,
.p-shared-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.p-shared-form input.p-postal-code {
  width: 150px;
}

.p-shared-form .form-item.is-error input,
.p-shared-form .form-item.is-error select,
.p-shared-form .form-item.is-error textarea {
  border-color: #d9534f;
  background-color: #fdf7f7;
}

.error-message {
  display: block;
  color: #d9534f;
  font-size: 13px;
  margin-top: 5px;
  min-height: 1.2em;
}

.p-shared-form .required::after {
  content: " *";
  color: #d9534f;
}

/* --- Product Intro --- */
.p-product-intro__main {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  text-align: left;
}

.p-product-intro__image {
  flex: 0 0 50%;
}

.p-product-intro__image img {
  width: 100%;
  border-radius: 8px;
}

.p-product-price {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 20px 0;
}

.p-product-price .c-shipping-note {
  font-size: 14px;
  font-weight: normal;
  color: #888;
}

.p-product-intro__gallery {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  flex: 1;
}

.gallery-item img {
  width: 100%;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .p-product-intro__main {
    flex-direction: column;
    gap: 20px;
  }

  .p-modal__inner {
    padding: 30px 20px;
    max-height: calc(100% - 20px);
  }

  .p-modal__footer {
    flex-direction: column;
  }

  .p-shared-form {
    padding: 20px;
  }
}

/* --- Tabs --- */
.p-tabs {
  margin-top: 40px;
}

.p-tabs__list {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  border-bottom: 2px solid #eee;
}

.p-tabs__item {
  margin: 0 10px;
}

.p-tabs__link {
  display: block;
  padding: 15px 25px;
  text-decoration: none;
  color: #666;
  font-weight: bold;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.p-tabs__link.is-active {
  color: #333;
  border-bottom-color: #333;
}

.p-tabs__content {
  display: none;
}

.p-tabs__content.is-active {
  display: block;
}

.p-subscription-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .p-tabs__list {
    flex-direction: column;
    border-bottom: none;
  }

  .p-tabs__item {
    margin: 5px 0;
  }

  .p-tabs__link {
    border-bottom: 2px solid #eee;
    text-align: center;
    padding: 10px;
  }

  .p-tabs__link.is-active {
    border-bottom-color: #333;
    background: #f9f9f9;
  }
}

/* --- Hover Action Disable --- */
.p-page-content.top .c-product-list__name:hover,
.p-page-content.top .c-image-wrap:hover,
.p-page-content.top .c-image-wrap--link:hover .c-image-box--main {
  opacity: 1 !important;
  background: none !important;
}

.p-page-content.top .c-image-wrap--link {
  cursor: pointer;
}

/* --- Top Page Product List Text Sizing --- */
.p-page-content.top .c-product-list__name {
  font-size: 14px;
  font-weight: bold;
}

.p-page-content.top .c-product-list__price {
  font-size: 13px;
  white-space: nowrap;
}


/* --- Other Products Section --- */
.p-other-products {
  margin-top: 60px;
  text-align: center;
}

.p-other-products__heading {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 25px;
  color: #333;
  font-family: 'Noto Serif JP', serif;
}

.p-other-products__buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.c-button--other {
  min-width: 180px;
  background-color: #c23f32;
  border-radius: 4px;
}

.c-button--other:hover {
  background-color: #333;
}

@media (max-width: 768px) {
  .p-other-products__buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .c-button--other {
    width: 100%;
    max-width: 250px;
  }
}

.p-sacri-promo__logo {
  margin-bottom: 15px;
}

.p-sacri-promo__logo img {
  width: 120px;
  height: auto;
}

.p-sacri-promo__description {
  margin: 0 auto 30px;
  max-width: 500px;
  font-size: 15px;
  line-height: 1.6;
  color: #666;
}

.p-sacri-app {
  margin-top: 50px;
  background: #fdfdfd;
  border: 1px solid #eee;
  padding: 40px;
  border-radius: 8px;
}

.p-sacri-app__title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.p-sacri-app__text {
  font-size: 14px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

.p-sacri-app__content {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.p-sacri-app__device {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p-sacri-app__device-label {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.p-sacri-app__qr-wrap {
  width: 120px;
  height: 120px;
  background: #fff;
  padding: 5px;
  border: 1px solid #ddd;
  margin-bottom: 15px;
}

.p-sacri-app__qr {
  width: 100%;
  height: auto;
}

.p-sacri-app__btn {
  display: block;
  width: 140px;
  transition: opacity 0.2s;
}

.p-sacri-app__btn:hover {
  opacity: 0.8;
}

.p-sacri-app__btn img {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .p-sacri-app {
    padding: 30px 10px;
  }

  .p-sacri-app__content {
    flex-direction: row;
    gap: 15px;
    justify-content: space-around;
  }

  .p-sacri-app__qr-wrap {
    width: 100px;
    height: 100px;
  }

  .p-sacri-app__btn {
    width: 110px;
  }

  .p-sacri-app__text {
    br {
      display: none;
    }
  }

  .p-sacri-promo__description {
    font-size: 14px;
    padding: 0 10px;
  }
}

/* --- Slideshow Responsive --- */
.bx-viewport {
  aspect-ratio: 1422 / 815;
  height: auto !important;
}

#slider {
  height: 100% !important;
}

.slider-item {
  width: 100% !important;
  height: 100% !important;
}

.slider-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .bx-viewport {
    aspect-ratio: 1 / 1;
    /* スマホでは正方形に近い表示などで調整可能 */
  }
}