/* ==========================================================================
   order.css
   注文フォーム（order.php）専用スタイル
   ========================================================================== */

/* ==========================================================================
   p-how（ご注文方法：①お電話 ②オンライン注文）
   ========================================================================== */
.p-how__methods {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.p-how__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 36px 40px;
  border-radius: 50px;
  background: var(--color-main);
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 0 #8c1313;
}

.p-how__card--web {
  background: #fff;
  color: var(--color-text);
  border: 3px dashed var(--color-main);
  box-shadow: 0 14px 0 var(--color-pink-deep);
}

.p-how__num {
  position: absolute;
  top: -26px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  border-radius: 50%;
  background: var(--color-sun);
  color: #8c1313;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 0 0 5px #fff;
  transform: rotate(-10deg);
}

.p-how__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 2rem;
  animation: p-how-ring 3s ease-in-out infinite;
}

.p-how__card--web .p-how__icon {
  background: var(--color-pink);
  color: var(--color-main);
  animation: c-float 4s ease-in-out infinite;
}

@keyframes p-how-ring {
  0%,
  70%,
  100% {
    transform: rotate(0);
  }
  75% {
    transform: rotate(-14deg);
  }
  80% {
    transform: rotate(12deg);
  }
  85% {
    transform: rotate(-8deg);
  }
  90% {
    transform: rotate(6deg);
  }
}

.p-how__ttl {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-main);
  letter-spacing: 0.08em;
}

.p-how__text {
  font-weight: 700;
  font-family: var(--font-round);
  line-height: 1.9;
}

.p-how__tel {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  padding: 12px 30px;
  border-radius: 50px;
  background: #fff;
  color: var(--color-main);
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.p-how__tel small {
  font-size: 0.9rem;
}

.p-how__tel:hover {
  opacity: 1;
  transform: scale(1.05) rotate(-2deg);
}

.p-how__hours {
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.7;
  opacity: 0.9;
  text-align: left;
}

.p-how__hours i {
  margin-top: 4px;
}

.p-how__btn {
  margin: 0;
}

.p-how__or {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-sun-light);
  color: #8c1313;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
}

/* ---------- ご注文の流れ ---------- */
.p-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1040px;
  margin: 80px auto 0;
  list-style: none;
}

.p-flow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 14px 24px;
  border-radius: 30px;
  background: var(--color-cream);
  text-align: center;
  font-family: var(--font-round);
  font-weight: 700;
}

.p-flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -24px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent var(--color-sun);
  transform: translateY(-50%);
}

.p-flow__no {
  padding: 2px 12px;
  border-radius: 20px;
  background: var(--color-main);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.p-flow__step i {
  font-size: 2rem;
  color: var(--color-main);
}

.p-flow__step p {
  font-size: 0.95rem;
  font-family: var(--font-round);
  line-height: 1.5;
}

.p-flow__step strong {
  background: linear-gradient(transparent 60%, var(--color-sun-light) 60%);
}

.tel-way .p-how__ttl {
  color: #fff;
}

/* ==========================================================================
   p-shipping（送料について）
   ========================================================================== */
.p-shipping {
  padding: 0 0 100px;
}

.p-shipping__card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 44px;
  border-radius: 40px;
  background: rgb(255 240 246 / 50%);
}

.p-shipping__truck {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-main);
  font-size: 2.2rem;
}

.p-shipping__truck i {
  animation: p-truck 1.6s ease-in-out infinite;
}

@keyframes p-truck {
  0%,
  100% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px) translateY(-2px);
  }
}

.p-shipping__ttl {
  margin-bottom: 8px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-main);
}

.p-shipping__body p {
  line-height: 1.9;
}

.p-shipping__body strong {
  color: #8c1313;
  background: linear-gradient(transparent 60%, #fff 60%);
}

.p-shipping__sub {
  margin-top: 6px;
  font-size: 0.82rem !important;
  color: #8c5a5a;
}

.p-shipping__btn {
  margin: 0;
  white-space: nowrap;
  background: #fff;
  border-color: #c8272e;
  background: #fff;
  color: #c8272e;
  box-shadow: 0 6px 0 #c8272e;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.3s,
    color 0.3s;
  border: 2px solid var(--color-main);
}

.p-shipping__btn:hover {
  background: #fff;
}

.c-btn--sun:hover {
  box-shadow: 0 3px 0 #c8272e;
}

/* ==========================================================================
   p-order-items（STEP 01 商品選択）
   ========================================================================== */
.p-order-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  list-style: none;
}

.p-order-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-areas:
    "img body"
    "img qty";
  gap: 10px 16px;
  padding: 16px;
  border: 2px solid #f0dede;
  border-radius: 28px;
  background: var(--color-pink);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.p-order-item.is-selected {
  border-color: var(--color-main);
  background: #fff;
  transform: rotate(-0.6deg);
  box-shadow: 0 8px 0 rgba(255, 207, 63, 0.7);
}

.p-order-item__img {
  grid-area: img;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #fff;
}

.p-order-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 写真をクリックすると拡大モーダルが開く（sub.js の .js-gallery-open） */
.p-order-item__zoom {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: zoom-in;
}

.p-order-item__zoom img {
  display: block;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.p-order-item__zoom:hover img {
  transform: scale(1.08);
}

.p-order-item__zoom:focus-visible {
  outline: 3px solid var(--color-sun);
  outline-offset: 2px;
}

/* 右下の小さな虫めがね（拡大できることを伝える） */
.p-order-item__zoom-icon {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(200, 39, 46, 0.9);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 0 0 2px #fff;
}

.p-order-item__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.p-order-item__name {
  font-weight: 900;
  line-height: 1.5;
  font-size: 105%;
}

.p-order-item__spec,
.p-order-item__season {
  font-size: 0.78rem !important;
  color: #8c5a5a;
}

.p-order-item__season i {
  margin-right: 4px;
  color: #e08a00;
}

.p-order-item__price {
  margin-top: 4px;
  color: var(--color-main);
  font-weight: 700;
}

.p-order-item__price strong {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
}

.p-order-item__price small {
  font-size: 0.72rem;
  color: #8c5a5a;
}

.p-order-item__qty {
  grid-area: qty;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-order-item__qty button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-main);
  color: #fff;
  transition: transform 0.2s ease;
}

.p-order-item__qty button:first-child {
  background: #fff;
  color: var(--color-main);
  border: 2px solid var(--color-main);
}

.p-order-item__qty button:active {
  transform: scale(0.88);
}

.c-form .p-order-item__qty select {
  width: 80px;
  padding: 8px 30px 8px 14px;
  border-radius: 30px;
  background-color: #fff;
  text-align: center;
  font-weight: 900;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
}

.p-order-subtotal {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px 30px;
  margin-top: 26px;
  padding: 18px 26px;
  border-radius: 24px;
  background: var(--color-main);
  color: #fff;
  font-weight: 700;
}

.choice-items-number {
  position: relative;
  bottom: 2px;
}

.p-order-subtotal strong {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-sun);
}

.p-order-subtotal__price strong {
  font-size: 2rem;
}

.p-order-subtotal small {
  font-size: 0.75rem;
  opacity: 0.85;
}

.p-ship-fields {
  margin-top: 20px;
  padding: 24px;
  border-radius: 24px;
  background: var(--color-cream);
}

.p-ship-fields[hidden] {
  display: none;
}

.p-order-notes {
  display: flex;
  font-weight: 500;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.p-order-notes li {
  position: relative;
  padding-left: 28px;
  line-height: 1.8;
  font-size: 0.95rem;
}

.p-order-notes li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-sun);
  box-shadow: 0 0 0 3px var(--color-sun-light);
}

.p-order-notes strong {
  color: var(--color-main);
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
/* 1056px未満：電話カードの幅が狭くなるので、「TEL.」の下に番号を置く */
@media screen and (max-width: 1055px) {
  .p-how__tel {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}

@media screen and (max-width: 900px) {
  .p-how__card {
    padding: 40px 36px 40px;
  }

  .p-how__num {
    display: none;
  }

  .p-how__icon,
  .p-how__card--web .p-how__icon {
    width: 70px;
    font-size: 1.5rem;
    color: #8c1313;
    border: 5px solid #fff;
    background: var(--color-sun);
  }

  .p-how__card--web .p-how__icon {
    border: 5px solid #fdc621;
  }

  .p-how__methods {
    grid-template-columns: 1fr;
    gap: 60px;
    max-width: 560px;
  }

  .p-how__or {
    justify-self: center;
    margin: -10px 0;
    display: none;
  }

  .p-flow {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .p-flow__step:nth-child(2)::after {
    display: none;
  }

  .p-shipping__card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 34px 20px;
  }

  .p-order-items {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .p-shipping__body p {
    text-align: left;
  }

  .p-how__card {
    padding: 50px 15px 34px;
    border-radius: 36px;
  }

  .p-how__tel {
    font-size: 1.6rem;
    padding: 10px 22px;
  }

  .p-flow {
    grid-template-columns: 1fr;
  }

  .p-flow__step {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    padding: 16px 15px;
  }

  .p-flow__step:not(:last-child)::after {
    display: block;
    top: auto;
    bottom: -20px;
    right: 50%;
    border-width: 14px 10px 0 10px;
    border-color: var(--color-sun) transparent transparent transparent;
    transform: translateX(50%);
  }

  .p-flow__step i {
    font-size: 1.25rem;
    width: 25px;
    text-align: center;
  }

  .p-shipping {
    padding-bottom: 70px;
  }

  .p-shipping__btn {
    white-space: normal;
  }

  .c-form__legend span {
    font-size: 0.6rem;
    text-align: center;
  }

  .c-form__legend {
    padding: 16px;
    box-shadow: inherit;
    top: -27px;
    width: calc(100% - 0px);
    left: 0;
  }

  .p-order-item {
    grid-template-columns: 72px 1fr;
    padding: 14px;
  }

  .p-order-item__img {
    width: 72px;
    height: 72px;
  }

  .p-order-subtotal {
    justify-content: center;
    padding: 16px;
  }

  .p-shipping__card {
    padding: 30px 15px;
  }
}

/* 1カラム表示（681〜900px）：横幅が余るので「写真｜商品情報｜数量」の横並びにする */
@media screen and (min-width: 681px) and (max-width: 900px) {
  .p-order-item {
    grid-template-columns: 110px 1fr auto;
    grid-template-areas: "img body qty";
    align-items: center;
    gap: 10px 24px;
    padding: 18px 26px;
  }

  .p-order-item__img {
    width: 110px;
    height: 110px;
  }
}

/* 1カラム表示（461〜680px）：数量は下段に全幅で置き、右寄せにして右側の余白を埋める */
@media screen and (min-width: 461px) and (max-width: 680px) {
  .p-order-item {
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "img body"
      "qty qty";
    align-items: center;
    gap: 12px 20px;
    padding: 16px 22px;
  }

  .p-order-item__img {
    width: 100px;
    height: 100px;
  }

  .p-order-item__qty {
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 2px dashed #f0dede;
  }
}

/* 460px以下：写真（上）→ 商品情報（中）→ 数量（下）の縦積み */
@media screen and (max-width: 460px) {
  .p-order-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "img"
      "body"
      "qty";
    justify-items: center;
    gap: 20px;
    padding: 10px;
    text-align: center;
  }

  /* 写真は横幅いっぱい・4:3。丸だと楕円になるので角丸の四角にする */
  .p-order-item__img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  .p-order-item__zoom,
  .p-order-item__zoom img {
    border-radius: 20px;
  }

  .p-order-item__zoom {
    overflow: hidden;
  }

  .p-order-item__zoom-icon {
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .p-order-item__body {
    width: 100%;
  }

  .p-order-item__qty {
    justify-content: center;
    width: 100%;
    padding-top: 15px;
    border-top: 2px dashed #f0dede;
    padding-bottom: 15px;
  }
}

@media screen and (max-width: 390px) {
  .p-how__text {
    text-align: left;
  }

  .p-how__text br {
    display: none;
  }

  .p-how__tel {
    font-size: 1.6rem;
    padding: 10px 22px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0px;
  }

  .p-flow__step p {
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 600;
  }
}

/* 360px未満：ご注文の流れはアイコンを隠し、STEP番号の下に本文を改行して表示 */
@media screen and (max-width: 359px) {
  .p-flow__step i {
    display: none;
  }

  .p-flow__step br {
    display: none;
  }

  .p-flow__step p {
    flex-basis: 100%;
  }
}

/* ==========================================================================
   p-note-alert（備考・ご要望が空欄のときの案内モーダル）
   ========================================================================== */
.p-note-alert {
  width: min(100%, 460px);
  padding: 40px 32px 32px;
  text-align: center;
}

.p-note-alert__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-sun);
  color: var(--color-main);
  font-size: 1.6rem;
}

.p-note-alert__ttl {
  margin-top: 14px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-main);
}

.p-note-alert__text {
  margin-top: 10px;
  line-height: 1.9;
}

.p-note-alert__text strong {
  color: var(--color-main);
  background: linear-gradient(transparent 60%, var(--color-sun-light) 60%);
}

.p-note-alert__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.p-note-alert__actions .c-btn {
  margin: 0;
}

@media screen and (max-width: 600px) {
  .p-note-alert {
    padding: 34px 15px 26px;
  }

  .p-note-alert__text br {
    display: none;
  }

  .p-note-alert__actions {
    flex-direction: column-reverse;
  }

  .p-note-alert__actions .c-btn {
    justify-content: center;
  }
}
