/* Do Up Shoelace — 購物功能共用樣式（產品頁購買區塊、導覽列購物車、結帳頁） */

/* ===== 導覽列購物車 ===== */
.shop-cart-link{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; color:var(--ink,#232323); text-decoration:none;
}
.shop-cart-link svg{ width:21px; height:21px; }
.shop-cart-count{
  position:absolute; top:0; right:-4px; min-width:17px; height:17px; padding:0 4px;
  border-radius:9px; background:var(--purple,#7F70B1); color:#fff;
  font-size:10.5px; line-height:17px; text-align:center; font-weight:600;
}
.shop-cart-count[hidden]{ display:none; }
@media(max-width:768px){
  .navicons{ margin-left:auto; margin-right:18px; }
}

/* ===== 產品頁購買區塊 ===== */
.shop-buy{ margin-top:6px; }
.shop-price{ font-size:22px; font-weight:600; letter-spacing:0.02em; margin-bottom:22px; }
.shop-price small{ font-size:12px; font-weight:400; color:var(--ink-mute,#999); margin-left:8px; letter-spacing:0.04em; }
.shop-label{
  display:flex; justify-content:space-between; align-items:baseline;
  font-size:12px; letter-spacing:0.12em; color:var(--ink-mute,#999); margin-bottom:10px;
}
.shop-label a{ color:var(--purple,#7F70B1); letter-spacing:0.02em; font-size:12px; }
.shop-lengths{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:22px; }
.shop-length{
  min-width:64px; padding:10px 14px; border:1.5px solid var(--line,#ececec); border-radius:3px;
  background:#fff; color:var(--ink-soft,#666); font-size:13px; cursor:pointer; font-family:inherit;
  transition:border-color .2s, color .2s;
}
.shop-length:hover{ border-color:#cfcfcf; }
.shop-length[aria-pressed="true"]{ border-color:var(--ink,#232323); color:var(--ink,#232323); font-weight:500; }
.shop-row{ display:flex; gap:12px; align-items:stretch; flex-wrap:wrap; }
.shop-qty{ display:inline-flex; border:1.5px solid var(--line,#ececec); border-radius:3px; height:50px; }
.shop-qty button{
  width:42px; border:none; background:none; font-size:18px; color:var(--ink-soft,#666);
  cursor:pointer; font-family:inherit;
}
.shop-qty button:disabled{ color:#d4d4d4; cursor:default; }
.shop-qty input{
  width:44px; border:none; text-align:center; font-size:15px; font-family:inherit;
  color:var(--ink,#232323); -moz-appearance:textfield; appearance:textfield;
}
.shop-qty input::-webkit-outer-spin-button,
.shop-qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.shop-add{
  flex:1; min-width:180px; height:50px; border:none; border-radius:3px; cursor:pointer;
  background:var(--grad, linear-gradient(90deg,#7F70B1,#54BDDA)); color:#fff;
  font-size:14px; letter-spacing:0.14em; font-family:inherit;
  box-shadow:0 10px 28px rgba(84,189,218,0.28); transition:transform .25s, box-shadow .25s, opacity .25s;
}
.shop-add:hover:not(:disabled){ transform:translateY(-2px); }
.shop-add:disabled{ background:#d9d9d9; box-shadow:none; cursor:not-allowed; }
.shop-status{ min-height:20px; margin-top:12px; font-size:13px; color:var(--ink-soft,#666); }
.shop-status.is-error{ color:#c0392b; }
.shop-status a{ color:var(--purple,#7F70B1); }
@media(max-width:768px){
  .pd-info .shop-buy{ order:10; }
}

/* ===== 加入購物車提示 ===== */
.shop-toast{
  position:fixed; left:50%; bottom:28px; z-index:300; transform:translate(-50%, 20px);
  display:flex; gap:16px; align-items:center; padding:14px 20px; border-radius:4px;
  background:var(--ink,#232323); color:#fff; font-size:13.5px; letter-spacing:0.04em;
  box-shadow:0 12px 32px rgba(0,0,0,0.22); opacity:0; pointer-events:none;
  transition:opacity .25s, transform .25s; max-width:calc(100vw - 32px);
}
.shop-toast.show{ opacity:1; transform:translate(-50%, 0); pointer-events:auto; }
.shop-toast a{ color:#fff; font-weight:600; white-space:nowrap; }

/* ===== 結帳頁 ===== */
.co-wrap{ max-width:1080px; margin:0 auto; padding:130px 24px 110px; }
.co-title{ font-family:'Noto Serif TC',serif; font-weight:600; font-size:clamp(24px,3vw,30px); margin-bottom:34px; }
.co-grid{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:56px; align-items:start; }
.co-section{ margin-bottom:38px; }
.co-section h2{
  font-family:'Noto Serif TC',serif; font-weight:600; font-size:16px;
  padding-bottom:10px; margin-bottom:18px; border-bottom:1px solid var(--line,#ececec);
}
.co-field{ margin-bottom:16px; }
.co-field label, .co-legend{ display:block; font-size:13px; color:var(--ink,#232323); margin-bottom:7px; }
.co-field label .req{ color:var(--purple,#7F70B1); margin-left:3px; }
.co-field input[type=text], .co-field input[type=tel], .co-field input[type=email], .co-field textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--line,#ececec); border-radius:3px;
  font-size:15px; font-family:inherit; color:var(--ink,#232323); background:#fff;
}
.co-field textarea{ min-height:96px; resize:vertical; line-height:1.7; }
.co-field input:focus, .co-field textarea:focus{ outline:none; border-color:var(--purple,#7F70B1); }
.co-field.has-error input, .co-field.has-error textarea{ border-color:#c0392b; }
.co-err{ display:none; margin-top:6px; font-size:12.5px; color:#c0392b; }
.co-field.has-error .co-err{ display:block; }
.co-hint{ font-size:12.5px; color:var(--ink-mute,#999); margin-top:6px; line-height:1.7; }
.co-two{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.co-options{ display:grid; gap:10px; }
.co-options.cols-2{ grid-template-columns:1fr 1fr; }
.co-options.cols-3{ grid-template-columns:repeat(3, 1fr); }
.co-store-picked{
  margin-top:12px; padding:14px 16px; border-radius:3px; background:#f1effb; border:1px solid #e1dcf3;
  font-size:14px; line-height:1.7;
}
.co-store-picked strong{ display:block; font-weight:600; color:var(--ink,#232323); }
.co-store-picked span{ display:block; font-size:12.5px; color:var(--ink-soft,#666); }
.co-store-btn{
  margin-top:12px; width:100%; padding:12px 14px; border:1.5px solid var(--ink,#232323); border-radius:3px;
  background:#fff; color:var(--ink,#232323); font-size:14px; letter-spacing:0.06em; cursor:pointer; font-family:inherit;
}
.co-store-btn:hover:not(:disabled){ background:var(--ink,#232323); color:#fff; }
.co-store-btn:disabled{ opacity:.5; cursor:default; }
.co-option{
  display:flex; gap:12px; align-items:flex-start; padding:14px 16px; cursor:pointer;
  border:1.5px solid var(--line,#ececec); border-radius:3px; font-size:14px; transition:border-color .2s;
}
.co-option:has(input:checked){ border-color:var(--ink,#232323); }
.co-option input{ margin-top:4px; accent-color:var(--purple,#7F70B1); }
.co-option small{ display:block; font-size:12px; color:var(--ink-mute,#999); margin-top:3px; }
.co-agree{ display:flex; gap:10px; align-items:flex-start; font-size:13.5px; line-height:1.8; color:var(--ink-soft,#666); }
.co-agree input{ margin-top:6px; accent-color:var(--purple,#7F70B1); }
.co-agree a{ color:var(--purple,#7F70B1); }

.co-summary{
  position:sticky; top:100px; padding:26px 24px; background:var(--paper-2,#fafafa);
  border:1px solid var(--line,#ececec); border-radius:4px;
}
.co-summary h2{ font-family:'Noto Serif TC',serif; font-weight:600; font-size:16px; margin-bottom:18px; }
.co-line{ display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:14px; padding:14px 0; border-bottom:1px solid var(--line,#ececec); }
.co-line:first-child{ padding-top:0; }
.co-line img{ width:64px; height:64px; object-fit:cover; border-radius:3px; background:#eee; }
.co-line-name{ font-size:14px; font-weight:500; line-height:1.5; }
.co-line-meta{ font-size:12.5px; color:var(--ink-mute,#999); margin-top:3px; line-height:1.6; }
.co-line-price{ font-size:14px; text-align:right; white-space:nowrap; }
.co-line-tools{ display:flex; gap:12px; align-items:center; margin-top:8px; }
.co-line-tools .shop-qty{ height:32px; }
.co-line-tools .shop-qty button{ width:30px; font-size:15px; }
.co-line-tools .shop-qty input{ width:32px; font-size:13.5px; }
.co-remove{ border:none; background:none; color:var(--ink-mute,#999); font-size:12.5px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; font-family:inherit; padding:0; }
.co-line-problem{ font-size:12.5px; color:#c0392b; margin-top:6px; }
.co-totals{ margin-top:18px; font-size:14px; }
.co-totals div{ display:flex; justify-content:space-between; padding:5px 0; color:var(--ink-soft,#666); }
.co-totals .co-total{ margin-top:8px; padding-top:14px; border-top:1px solid var(--line,#ececec); color:var(--ink,#232323); font-size:17px; font-weight:600; }
.co-free-hint{ font-size:12.5px; color:var(--purple,#7F70B1); margin-top:6px; }
.co-submit{ width:100%; margin-top:22px; }
.co-testmode{ margin:22px 0 0; padding:12px 16px; font-size:13.5px; line-height:1.8; border-radius:3px; background:#f1effb; color:#4b3f80; }
.co-testmode[hidden]{ display:none; }
.co-testmode + .co-submit{ margin-top:12px; }
.co-notice{ margin-top:14px; padding:14px 16px; font-size:13.5px; line-height:1.8; border-radius:3px; display:none; }
.co-notice.show{ display:block; }
.co-notice.is-error{ background:#fdf0ee; color:#a5281b; }
.co-notice.is-info{ background:#f1effb; color:#4b3f80; }
.co-empty{ text-align:center; padding:60px 0 20px; color:var(--ink-soft,#666); font-size:15px; line-height:2; }
.co-empty a{ color:var(--purple,#7F70B1); }
.co-loading{ color:var(--ink-mute,#999); font-size:14px; padding:20px 0; }
/* ===== 訂單結果頁 ===== */
.or-wrap{ max-width:640px; }
.or-lead{ font-size:15px; line-height:1.9; color:var(--ink-soft,#666); margin-bottom:26px; }
.or-lead a{ color:var(--purple,#7F70B1); }
.or-pay{
  padding:22px 24px; margin-bottom:22px; border-radius:4px;
  background:#f1effb; border:1px solid #e1dcf3;
}
.or-pay .or-row strong{ font-size:17px; letter-spacing:0.06em; font-variant-numeric:tabular-nums; }
.or-row{ display:flex; justify-content:space-between; gap:16px; padding:7px 0; font-size:14px; color:var(--ink-soft,#666); }
.or-row strong{ color:var(--ink,#232323); font-weight:600; text-align:right; word-break:break-all; }
.or-meta{ padding:6px 0 14px; margin-bottom:8px; border-bottom:1px solid var(--line,#ececec); }
.or-item{ display:flex; justify-content:space-between; gap:14px; padding:14px 0; border-bottom:1px solid var(--line,#ececec); }

@media(max-width:860px){
  .co-wrap{ padding-top:100px; }
  .co-grid{ grid-template-columns:1fr; gap:10px; }
  .co-summary{ position:static; order:-1; margin-bottom:30px; }
}
@media(max-width:480px){
  .co-two, .co-options.cols-2, .co-options.cols-3{ grid-template-columns:1fr; }
}
