/*
 * usces_cart.css
 * ------------------------------------------------------------
 * Welcart（ウェルカート）の「商品詳細ページ・会員ページ（新規会員登録／
 * ログイン／マイページ）・カートページ・商品複合検索結果一覧ページ」を
 * まとめて上書きするスタイルシートです（ファイル名はWelcart側の仕様で
 * 固定されています）。
 *
 * このファイルは自動では読み込まれないため、テーマの functions.php で
 * プラグイン本体の usces_cart.css より後に読み込まれるよう
 * 明示的に enqueue しています（farmsora_welcart_cart_css 関数）。
 *
 * 実際の会員ページ等を表示した際に、思った通りのデザインに
 * ならない箇所があれば、ブラウザの検証ツール（右クリック→検証）
 * で実際のクラス名・ID名を確認しながら、このファイルに追記・
 * 調整してください。
 * ------------------------------------------------------------
 */

/* ===== 実際の構造（会員登録ページのHTMLを確認して作成） =====
   .entry-content #newmember の中に、Welcart標準の
   <table class="customer_form"> がそのまま出力される。
   テーブル構造は崩さず、配色・余白・フォントのみ調整する。 */

/* 案内文（箇条書き） */
.entry-content #newmember .header_explanation{
  background:var(--ivory);
  border-radius:14px;
  padding:28px 32px;
  margin-bottom:36px;
}
.entry-content #newmember .header_explanation ul{
  margin:0;
  padding:0;
}
.entry-content #newmember .header_explanation li{
  list-style:none;
  list-style-position:inside;
  font-size:18px;
  line-height:1.9;
  color:var(--text);
  padding-left:0;
  margin-left:0;
  margin-bottom:10px;
  overflow-wrap:break-word;
}
.entry-content #newmember .header_explanation li:last-child{margin-bottom:0;}
.entry-content #newmember .header_explanation br{
  display:none;
}

/* エラーメッセージ（空の時は非表示） */
.entry-content #newmember .error_message{
  background:#FDEDEE;
  border:1px solid #C1272D;
  border-radius:10px;
  padding:18px 22px;
  margin-bottom:28px;
  color:#C1272D;
  font-size:14px;
  line-height:1.9;
}
.entry-content #newmember .error_message:empty{
  display:none;
  padding:0;
  margin:0;
  border:none;
}

/* フォーム全体を白いカードに（table構造はそのまま） */
.entry-content #newmember form{
  background:var(--paper);
  border-radius:16px;
  padding:40px 36px;
  box-shadow:0 18px 40px -24px rgba(14,110,62,0.3);
}

/* テーブル */
.entry-content table.customer_form{
  width:100%;
  border-collapse:collapse;
  background:none;
}
.entry-content table.customer_form tr{
  border-bottom:1px solid var(--line);
}
.entry-content table.customer_form tr:last-child{
  border-bottom:none;
}
.entry-content table.customer_form th{
  text-align:left;
  vertical-align:middle;
  font-size:18px;
  font-weight:700;
  color:var(--green-deep-2);
  padding:18px 16px 18px 4px;
  white-space:nowrap;
  width:170px;
}
.entry-content table.customer_form td{
  padding:14px 4px;
  vertical-align:middle;
  font-size:18px;
  color:var(--text-sub);
}

/* 必須マーク（<em>＊</em>）を赤い「※」に */
.entry-content table.customer_form th em{
  font-style:normal;
  font-size:0;
  color:#C1272D;
  margin-right:4px;
  vertical-align:middle;
}
.entry-content table.customer_form th em::after{
  content:"※";
  font-size:18px;
  font-weight:700;
  color:#C1272D;
}

/* 姓・名／セイ・メイのラベル */
.entry-content table.customer_form .member_name,
.entry-content table.customer_form .member_furigana{
  display:inline-block;
  font-size:16px;
  color:var(--text-sub);
  margin-right:8px;
}

/* 入力欄・セレクト */
.entry-content table.customer_form input[type="text"],
.entry-content table.customer_form input[type="email"],
.entry-content table.customer_form input[type="tel"],
.entry-content table.customer_form input[type="password"],
.entry-content table.customer_form select{
  padding:12px 14px;
  font-size:18px;
  font-family:inherit;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--cream);
  color:var(--text);
  transition:border-color .2s ease;
  box-sizing:border-box;
}
.entry-content table.customer_form input:focus,
.entry-content table.customer_form select:focus{
  outline:none;
  border-color:var(--green-deep);
  background:#fff;
}

/* メールアドレス・パスワード・郵便番号など colspan="2" の行は横幅いっぱいに */
.entry-content table.customer_form td[colspan="2"] input[type="text"],
.entry-content table.customer_form td[colspan="2"] input[type="password"],
.entry-content table.customer_form td[colspan="2"] select{
  width:100%;
  max-width:420px;
}

/* 記入例（プレースホルダー）は薄い文字で表示 */
.entry-content table.customer_form input::placeholder{
  color:#B7C2AC;
  opacity:1;
}

/* 姓・名／セイ・メイのように分割された行の入力欄 */
.entry-content table.customer_form .name_td input[type="text"]{
  width:170px;
}

/* 送信ボタン */
.entry-content #newmember .send{
  text-align:center;
  margin-top:32px;
}
.entry-content #newmember input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--green-deep);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:16px 56px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.06em;
  cursor:pointer;
  transition:background .25s ease;
}
.entry-content #newmember input[type="submit"]:hover{
  background:var(--green-deep-2);
}

@media (max-width:760px){
  .entry-content{
    width:100vw;
    position:relative;
    left:50%;
    right:50%;
    margin-left:-50vw;
    margin-right:-50vw;
    padding-left:16px;
    padding-right:16px;
    box-sizing:border-box;
  }
  .entry-content #newmember form{
    border-radius:0;
    padding:24px 16px;
  }
  .entry-content #newmember .header_explanation{
    border-radius:0;
    padding:22px 16px;
  }
  .entry-content table.customer_form,
  .entry-content table.customer_form tbody{
    display:block;
    width:100%;
  }
  .entry-content table.customer_form tr{
    display:block;
    padding:14px 0;
  }
  .entry-content table.customer_form th,
  .entry-content table.customer_form td{
    display:block;
    width:100% !important;
    padding:4px 0;
    white-space:normal;
  }
  .entry-content table.customer_form td[colspan="2"] input[type="text"],
  .entry-content table.customer_form td[colspan="2"] input[type="password"],
  .entry-content table.customer_form td[colspan="2"] select{
    max-width:100%;
    width:100%;
  }
  .entry-content table.customer_form .name_td input[type="text"]{
    width:100%;
  }
}

/* ============================================
   ログインページ（/usces-member?usces_page=login）
   ------------------------------------------------------------
   実際のHTMLを確認して作成。フォームは .whitebox > .loginbox の
   中に、Welcartのログインウィジェットと同じ <label><input> 構造
   でそのまま出力される。
   ============================================ */

.entry-content #memberpages .whitebox{
  background:var(--paper);
  border-radius:16px;
  padding:40px 36px;
  box-shadow:0 18px 40px -24px rgba(14,110,62,0.3);
  max-width:640px;
  width:100%;
  margin:0 auto;
}

.entry-content #memberpages .loginbox{
  margin:0 !important;
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
}

.entry-content #memberpages .header_explanation:not(:empty){
  background:var(--ivory);
  border-radius:14px;
  padding:24px 28px;
  margin-bottom:28px;
}

.entry-content #memberpages .loginbox form{
  padding:32px 28px;
}
.entry-content #memberpages .loginbox form p{
  margin-bottom:22px;
}
.entry-content #memberpages .loginbox form p:last-child{
  margin-bottom:0;
}

.entry-content #memberpages .loginbox label{
  display:block;
  font-size:18px;
  font-weight:700;
  color:var(--green-deep-2);
  width:100%;
}

.entry-content #memberpages .loginbox input[type="text"],
.entry-content #memberpages .loginbox input[type="password"]{
  display:block;
  width:100%;
  margin-top:8px;
  padding:14px 16px;
  font-size:18px;
  font-family:inherit;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--cream);
  color:var(--text);
  transition:border-color .2s ease;
  box-sizing:border-box;
}
.entry-content #memberpages .loginbox input[type="text"]:focus,
.entry-content #memberpages .loginbox input[type="password"]:focus{
  outline:none;
  border-color:var(--green-deep);
  background:#fff;
  box-shadow:none;
}
.entry-content #memberpages .loginbox input.hidden{
  display:none;
}

/* 「ログイン情報を記憶」チェックボックス */
.entry-content #memberpages .loginbox p.forgetmenot label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:15px;
  font-weight:400;
  color:var(--text);
  width:auto;
}
.entry-content #memberpages .loginbox input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:var(--green-deep);
  margin:0;
}

/* ログインボタン */
.entry-content #memberpages .loginbox p.submit{
  text-align:center;
  margin-top:32px;
}
.entry-content #memberpages .loginbox input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--green-deep);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:16px 56px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.06em;
  cursor:pointer;
  transition:background .25s ease;
}
.entry-content #memberpages .loginbox input[type="submit"]:hover{
  background:var(--green-deep-2);
}

/* パスワードをお忘れですか？／新規ご入会はこちら */
.entry-content #memberpages .loginbox p.nav{
  text-align:center;
  margin-top:18px !important;
}
.entry-content #memberpages p#nav.nav{
  text-align:center;
  margin-top:4px;
  margin-bottom:28px;
}
.entry-content #memberpages .nav a{
  font-size:14px;
  color:var(--green-deep);
  text-decoration:underline;
}

@media (max-width:600px){
  .entry-content #memberpages .whitebox{
    padding:28px 22px;
  }
}

@media (max-width:480px){
  .entry-content input[type="submit"]{
    padding:14px 28px !important;
    font-size:15px !important;
    width:100%;
    box-sizing:border-box;
  }
}

/* メッセージ枠（成功・案内メッセージ等）に左右の余白を確保
   ※実際のクラス名が分かり次第、より正確なセレクタに調整します */
.entry-content #memberpages .error_message,
.entry-content #memberpages .mes,
.entry-content #memberpages .message,
.entry-content #memberpages .usces_message,
.entry-content #memberpages > div[style*="border"]{
  padding:18px 22px !important;
  box-sizing:border-box !important;
}

/* .loginbox 直下にある、案内メッセージ等の裸の<div>（<form>以外）に
   左右の余白を入れる（パスワード再発行後の案内文など） */
.entry-content #memberpages .loginbox > div{
  padding:0 24px;
  box-sizing:border-box;
}

/* ============================================
   カートページ（/usces-cart）
   ------------------------------------------------------------
   実際のHTMLを確認して作成（カートが空の状態）。
   商品が入った状態のテーブル部分は、確認でき次第追加調整する。
   ============================================ */

/* ステップナビ（カート → お客様情報 → 配送・支払方法 → 内容確認） */
.entry-content .usccart_navi{
  width:100%;
  height:auto !important;
  margin-bottom:40px;
  box-sizing:border-box;
}
.entry-content .usccart_navi ol.ucart{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  width:100%;
  height:auto !important;
  margin:0;
  padding:0;
  list-style:none !important;
  counter-reset:farmsora-step;
}
.entry-content .usccart_navi li.ucart{
  counter-increment:farmsora-step;
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  float:none !important;
  position:static !important;
  width:100% !important;
  min-width:0;
  height:auto !important;
  margin:0 !important;
  padding:10px 12px;
  box-sizing:border-box;
  list-style:none !important;
  text-indent:0 !important;
  white-space:normal;
  line-height:1.5;
  border-radius:999px;
  background:#b4b5b7 !important;
  background-image:none !important;
  color:#fff;
}
.entry-content .usccart_navi li.usccart_cart,
.entry-content .usccart_navi li.usccart_customer,
.entry-content .usccart_navi li.usccart_delivery,
.entry-content .usccart_navi li.usccart_confirm{
  background:var(--green-deep) !important;
  background-image:none !important;
  color:#fff !important;
}
.entry-content .usccart_navi li.ucart::marker{content:'';}
.entry-content .usccart_navi li.ucart::before{
  content:counter(farmsora-step) !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:0 0 24px;
  position:static !important;
  width:24px;
  height:24px;
  margin:0 !important;
  border-radius:50%;
  background:var(--green-deep);
  color:#fff;
  font-size:13px;
  font-weight:800;
  line-height:1;
  text-indent:0;
}
.entry-content #inside-cart .usccart_navi{
  margin-bottom:40px;
}
.entry-content #inside-cart .usccart_navi ol.ucart{
  display:flex;
  justify-content:center;
  flex-wrap:nowrap;
  gap:6px;
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:farmsora-step;
}
.entry-content #inside-cart .usccart_navi li.ucart{
  counter-increment:farmsora-step;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:15px;
  font-weight:700;
  color:var(--text-sub);
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 18px;
  white-space:nowrap;
  flex:0 1 auto;
  min-width:0;
}
.entry-content #inside-cart .usccart_navi li.ucart::before{
  content:counter(farmsora-step);
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:var(--green-deep);
  color:#fff;
  font-size:13px;
  font-weight:800;
}
.entry-content #inside-cart .usccart_navi li.usccart_cart{
  background:var(--green-deep);
  border-color:var(--green-deep);
  color:#fff;
}
.entry-content #inside-cart .usccart_navi li.usccart_cart::before{
  background:#fff;
  color:var(--green-deep);
}

.entry-content #inside-cart .header_explanation:not(:empty){
  background:var(--ivory);
  border-radius:14px;
  padding:24px 28px;
  margin-bottom:28px;
}
.entry-content #inside-cart .error_message:empty{
  display:none;
}

/* カートが空の時のメッセージ */
.entry-content #inside-cart #cart_table{
  width:100% !important;
  max-width:none !important;
  box-sizing:border-box;
  table-layout:auto;
}

.entry-content #inside-cart .upbutton{
  margin-bottom:32px;
}

.entry-content #inside-cart .no_cart{
  background:var(--paper);
  border-radius:16px;
  padding:60px 32px;
  text-align:center;
  font-size:18px;
  color:var(--text);
  box-shadow:0 18px 40px -24px rgba(14,110,62,0.3);
}

/* ボタン行（買い物を続ける、など） */
.entry-content #inside-cart .send{
  text-align:center;
  margin-top:28px;
}
.entry-content #inside-cart input[type="button"],
.entry-content #inside-cart input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--green-deep);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:16px 48px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.06em;
  cursor:pointer;
  transition:background .25s ease;
}
.entry-content #inside-cart input[type="button"]:hover,
.entry-content #inside-cart input[type="submit"]:hover{
  background:var(--green-deep-2);
}

@media (max-width:600px){
  /* Welcart は各手順を別の親要素に出力するため、全手順で共通化する。 */
  .entry-content .usccart_navi{
    display:flow-root;
    width:100%;
    height:auto !important;
    min-height:0;
    margin-bottom:32px;
    box-sizing:border-box;
  }
  .entry-content .usccart_navi ol.ucart{
    display:grid !important;
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    width:100%;
    height:auto !important;
    margin:0;
    padding:0;
    list-style:none;
    box-sizing:border-box;
  }
  .entry-content .usccart_navi li.ucart{
    display:flex !important;
    align-items:center;
    width:100% !important;
    min-width:0;
    height:auto !important;
    float:none !important;
    margin:0 !important;
    padding:12px 16px;
    box-sizing:border-box;
    white-space:normal;
    line-height:1.5;
    justify-content:flex-start;
  }
  .entry-content #inside-cart .no_cart{
    padding:44px 22px;
    font-size:16px;
  }
  .entry-content #inside-cart .usccart_navi ol.ucart{
    flex-wrap:wrap;
    gap:10px;
  }
  .entry-content #inside-cart .usccart_navi li.ucart{
    font-size:14px;
    padding:10px 14px;
    gap:6px;
    flex:0 1 calc(50% - 5px);
    justify-content:center;
    box-sizing:border-box;
  }
  .entry-content #inside-cart .usccart_navi li.ucart::before{
    width:22px;
    height:22px;
    font-size:12px;
  }

  /* 手順・操作・商品をスマートフォンでは縦1列にする。 */
  .entry-content #inside-cart .usccart_navi{
    height:auto !important;
    min-height:0;
    margin-bottom:32px;
    display:flow-root;
  }
  .entry-content #inside-cart .usccart_navi ol.ucart{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    height:auto !important;
  }
  .entry-content #inside-cart .usccart_navi li.ucart{
    width:100%;
    padding:11px 16px;
    justify-content:flex-start;
  }
  .entry-content #inside-cart .upbutton{
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    float:none !important;
    clear:both;
    position:static;
    height:auto !important;
    padding:0;
    margin:0 0 32px;
    line-height:1.7;
    text-align:left;
  }
  .entry-content #inside-cart .upbutton input{
    width:100%;
    display:block;
    float:none !important;
    position:static;
    margin:0 !important;
  }
  .entry-content #inside-cart #cart_table,
  .entry-content #inside-cart #cart_table tbody,
  .entry-content #inside-cart #cart_table tfoot{
    display:block;
    width:100% !important;
    min-width:0 !important;
  }
  .entry-content #inside-cart #cart_table thead{display:none;}
  .entry-content #inside-cart #cart_table tbody tr{
    display:flex;
    flex-direction:column;
    gap:0;
    margin:0 0 22px;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden;
    background:#fff;
  }
  .entry-content #inside-cart #cart_table tbody td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
    padding:13px 16px;
    border:0;
    border-bottom:1px solid var(--line);
    text-align:right;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .entry-content #inside-cart #cart_table tbody td:last-child{border-bottom:0;}
  .entry-content #inside-cart #cart_table tbody td::before{
    flex:0 0 88px;
    text-align:left;
    color:var(--green-deep-2);
    font-size:14px;
    font-weight:700;
  }
  .entry-content #inside-cart #cart_table tbody td:nth-child(1)::before{content:'No.';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(2)::before{content:'商品画像';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(3)::before{content:'商品名';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(4)::before{content:'単価';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(5)::before{content:'数量';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(6)::before{content:'金額（税込）';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(7)::before{content:'在庫状態';}
  .entry-content #inside-cart #cart_table tbody td:nth-child(8)::before{content:'';flex:0 0 0;}
  .entry-content #inside-cart #cart_table tbody td:nth-child(2) img{
    display:block;
    width:84px;
    height:84px;
    max-width:none;
    object-fit:contain;
  }
  .entry-content #inside-cart #cart_table tbody td:nth-child(8) input[type="submit"]{
    width:100%;
    box-sizing:border-box;
  }
  .entry-content #inside-cart #cart_table tfoot tr{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:15px 16px;
    margin-top:4px;
    background:transparent !important;
    border-radius:8px;
  }
  .entry-content #inside-cart #cart_table tfoot th{
    display:block;
    width:auto !important;
    padding:0;
    border:0;
    text-align:left;
    white-space:normal;
    background:transparent !important;
    background-image:none !important;
    color:#222 !important;
    font-size:20px;
    font-weight:700;
    text-shadow:none;
  }
  .entry-content #inside-cart #cart_table tfoot th:nth-child(2){text-align:right;white-space:nowrap;font-size:22px;}
  .entry-content #inside-cart #cart_table tfoot th:last-child:not(:nth-child(2)){display:none;}
  .entry-content #inside-cart .currency_code{margin:22px 0 32px;}
  .entry-content #inside-cart .send{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:28px;
  }
  .entry-content #inside-cart .send input[type="button"],
  .entry-content #inside-cart .send input[type="submit"]{
    display:block;
    width:100%;
    margin:0;
    box-sizing:border-box;
  }
}
