/* ============================================================================
 * common/pages/shoppingCart.css — 跨主題共用購物車流程（索引 / 確認 / 完成）
 * ============================================================================
 *
 * 用途：
 *   提供 6 個前台主題共用的購物車流程樣式 baseline：商品加入購物車後的
 *   購物車索引頁、結帳頁（含舊版 cart table 與新版 dev-checkout-* 結構）、
 *   確認訂單頁、完成頁。
 *
 * 設計意圖：
 *   - common/pages/shoppingCart.css = default baseline（未來所有網站的基礎標準）
 *   - themes/default/pages/shoppingCart.css 故意保持空殼（default 不需覆寫自己的 baseline）
 *   - 其他主題透過 themes/{theme}/pages/shoppingCart.css 對 baseline 做差異化覆寫
 *
 * 內容索引：
 *   區段 1: 舊版購物車 table area (.payment-details / .table-content /
 *           .product-thumbnail / .product-price / .product-add-cart /
 *           .coupon-discount / .payment-method / .payent-type / .thank-you)
 *   區段 2: Develop Checkout Page 新版結構（.dev-checkout-* 系列，含
 *           breadcrumbs / card / progress / temperature / items / mixed-badge
 *           等與內部 @media RWD）
 *   區段 3: checkout 修正 + 新版購物車 Phase A
 *           （數量/刪除按鈕修正 / 收合按鈕 / 空購物車提示 / 物流付款選項 /
 *           庫存提示 / .dev-checkout-submit-btn）
 *   區段 4: 確認訂單頁（.dev-confirm-* 系列，含表格 / 商品列表 / 付款方式 /
 *           安全庫存警示）
 *
 * 使用頁面：
 *   - resources/views/web/shoppingCarts/index.blade.php（購物車主頁）
 *   - resources/views/web/shoppingCarts/confirm.blade.php（確認訂單）
 *   - resources/views/web/shoppingCarts/finish.blade.php（完成頁）
 *
 * 載入順序：
 *   common/{base,header,sidebar,footer,widget}.css → themes/default/{同}.css →
 *   common/pages/shoppingCart.css（本檔）→ themes/default/pages/shoppingCart.css → custom.css
 *
 * 抽取來源：public/web/css/default.css 4 個區段（全部 @media 與註解閉合已驗證平衡）：
 *   - line 5594~5818：舊版 cart table area + payment-method + .thank-you
 *   - line 7893~9215：Develop Checkout Page 完整段
 *   - line 9217~9390：checkout 修正 + Phase A
 *   - line 9392~9631：確認訂單頁
 *
 * 詳細規格：openspec/specs/web-theme-css/spec.md（Requirement R.FUNC.1 / R.FUNC.8）
 * 變更記錄：openspec/changes/issue518-web-theme-css-modularization/（task 6.3）
 * ============================================================================
 */



/* ============================================================================
 * 區段 0：訂單摘要區 (.order-product-* + .order-summary-* 含 RWD @media)
 *   抽取自 default.css line 3866~4030
 *   對應 blade：shoppingCarts/index.blade.php 右側「訂單資訊摘要」sticky 區塊
 *   含：.order-summary-sticky 黏性容器 / .order-summary-card 卡片 / -header /
 *       -list / -row / -discount / -paymethod / -subtitle / -value / -note /
 *       -total / -total-value / -status-value / -status-note +
 *       @media (max-width: 991px) RWD（行動版改 static 排版）
 * ============================================================================
 */

.order-product-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-width: 140px;
}

.order-product-subtotal {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
}

.order-product-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.order-product-cart-btn:hover {
  background: #111111;
  color: #ffffff;
}

.order-product-soldout {
  font-size: 12px;
  font-weight: 700;
  color: #e11d48;
}

.order-summary-sticky {
  position: sticky;
  top: 80px;
}

.order-summary-card {
  background: #ffffff;
  border: 1px solid #f1f1f1;
  border-top: 4px solid #2C2C2C;
  padding: 16px 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.order-summary-header {
  font-size: 16px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 16px;
}

.order-summary-list {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eeeeee;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

.order-summary-row span:last-child {
  color: #111111;
  font-weight: 600;
}

.order-summary-discount {
  color: #e11d48;
  font-weight: 700;
}

.order-summary-paymethod {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eeeeee;
}

.order-summary-subtitle {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 700;
  margin-bottom: 6px;
}

.order-summary-value {
  font-size: 14px;
  color: #111111;
  font-weight: 600;
}

.order-summary-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.order-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eeeeee;
  font-weight: 700;
  color: #111111;
}

.order-summary-total-value {
  font-size: 24px;
}

.order-summary-status-value {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
}

.order-summary-status-note {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 991px) {
  .order-summary-sticky {
    position: static;
    top: auto;
  }

  .order-header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-header-actions {
    width: 100%;
  }

  .order-logistic-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-product-item {
    flex-direction: column;
  }

  .order-product-summary {
    align-items: flex-start;
  }
}

/* ============================================================================
 * 區段 1：舊版 cart table area + payment-method + .thank-you
 *   抽取自 default.css line 5594~5818
 * ============================================================================
 */

.payment-details,
.single-product-area {
  width: 100%;
  overflow-x: auto;
}

@media screen and (max-width: 768px) {

  .table-content table,
  .table-content table th,
  .table-content table td {
    min-width: 130px;
    width: fit-content;
  }

  .payment-details table th,
  .payment-details table td {
    min-width: 100px;
    width: fit-content;
    padding: 10px 5px;
  }

  .payment-details table {
    width: 100%;
  }

  .payment-details table td[colspan="3"],
  .table-content table td[colspan="3"] {
    min-width: 250px;
    width: fit-content;
  }

  .table-content table {
    width: 100%;
  }
}

.table-content table thead th {
  color: #666666;
  font-family: raleway;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 18px 5px;
  text-transform: uppercase;
}

.table-content table tr td {
  color: #999;
  padding: 18px 5px;
}

.table-content table tr td>a {
  color: #2c2c2c;
  text-align: center;
}

.table-content .table-notice {
  margin: 30px;
  font-weight: 700;
}

.product-thumbnail {
  width: 420px;
}

.pro-thumbnail-img {
  float: left;
  width: 20%;
}

.pro-thumbnail-img img {
  width: 100%;
}

.pro-thumbnail-info {
  float: left;
  padding-left: 20px;
  width: 72%;
  max-width: 300px;
}

.product-title-2 {
  color: #666666;
  font-weight: 500;
  margin-top: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pro-thumbnail-info>p {
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price,
.product-subtotal {
  font-family: roboto;
  font-size: 16px;
  font-weight: 700;
}

.product-remove a {
  color: #999;
  display: block;
  font-size: 18px;
  height: 20px;
  line-height: 20px;
  transition: all 0.3s ease 0s;
  width: 20px;
}

.product-remove a:hover {
  color: #131313;
}

.product-stock {
  font-weight: 600;
  text-transform: uppercase;
}

.product-add-cart a {
  color: #999;
  font-size: 25px;
}

.product-add-cart a:hover {
  color: #131313;
}

.coupon-discount input {
  margin-bottom: 10px;
}

.payment-details tr {
  border-bottom: 1px solid #eee;
}

.payment-details tr:last-child {
  border-bottom: 0 none;
}

.payment-details td {
  padding: 5px 0;
  color: #333333;
}

.td-title {
  color: #999;
  font-family: roboto;
  font-weight: 500;
  text-align: right;
}

.order-total {
  color: #2c2c2c;
  font-weight: 500;
  text-align: left;
}

.order-total-price {
  color: #2c2c2c;
  font-family: roboto;
  font-weight: 700;
  text-align: right;
}

.thank-you h5 {
  color: #2c2c2c;
  font-family: roboto;
  font-weight: 700;
}

.custom-textarea {
  height: 250px;
}

.payment-method .panel {
  border: medium none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding-bottom: 20px;
}

.payment-content {
  padding: 20px 20px 0;
}

.payment-method .panel:last-child {
  padding-bottom: 0;
}

.payment-title {
  color: #666666;
  font-size: 13px;
  font-weight: 500;
  height: 40px;
  line-height: 40px;
  margin-bottom: 0;
  padding-left: 20px;
  text-transform: uppercase;
}

.payment-content>p {
  margin-bottom: 5px;
}

.payent-type li {
  display: inline-block;
  margin-right: 10px;
}

.payent-type li:last-child {
  margin-right: 0;
}

.payent-type li a {
  border: 1px solid #e5e5e5;
  padding: 5px;
  display: block;
}


/* ============================================================================
 * 區段 2：Develop Checkout Page（新版 .dev-checkout-* 完整結構）
 *   抽取自 default.css line 7893~9215
 *   對應 blade：shoppingCarts/index.blade.php
 * ============================================================================
 */

/* =========================================
   Develop Checkout Page
   ========================================= */
.breadcrumbs-section.dev-checkout-breadcrumbs {
  background: #ffffff;
  margin-bottom: 0;
}

.breadcrumbs-section.dev-checkout-breadcrumbs .breadcrumbs,
.breadcrumbs-section.dev-checkout-breadcrumbs .breadcrumbs-inner,
.breadcrumbs-section.dev-checkout-breadcrumbs .breadcrumbs-title {
  background: transparent;
}

.dev-checkout-page {
  background: #ffffff;
  padding: 28px 0 56px;
}

.dev-checkout-section {
  min-height: 60vh;
}

.dev-checkout-layout {
  margin-top: 0;
}

.dev-checkout-card {
  background: #ffffff;
  border: 1px solid #f1f1f1;
  border-radius: 0;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.dev-checkout-progress-card {
  padding: 18px 20px;
}

.dev-checkout-summary {
  border-top: 4px solid #2c2c2c;
}

.dev-checkout-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.dev-checkout-progress li {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
  padding: 0 8px;
  color: #9ca3af;
  font-weight: 600;
}

.dev-checkout-progress li::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #d9dee8;
  z-index: 0;
}

.dev-checkout-progress li:first-child::before {
  content: none;
}

.dev-checkout-progress-index {
  width: 32px;
  height: 32px;
  border: 2px solid #d9dee8;
  border-radius: 0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.dev-checkout-progress-text {
  font-size: 14px;
  line-height: 1.4;
  background: #ffffff;
  padding: 0 6px;
  position: relative;
  z-index: 1;
}

.dev-checkout-progress li.is-completed,
.dev-checkout-progress li.is-current {
  color: #1f2937;
}

.dev-checkout-progress li.is-completed .dev-checkout-progress-index {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

.dev-checkout-progress li.is-current .dev-checkout-progress-index {
  border-color: #1f2937;
  color: #1f2937;
}

.dev-checkout-progress li.is-completed::before,
.dev-checkout-progress li.is-current::before {
  background: #1f2937;
}

.dev-checkout-temperature-alert {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid #f1f1f1;
  border-left: 4px solid #d97706;
  background: #fffaf2;
}

.dev-checkout-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 0;
  background: #fff1d6;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-checkout-alert-content {
  flex: 1;
}

.dev-checkout-alert-content h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #111111;
}

.dev-checkout-alert-content p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.dev-checkout-mixed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 0;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.dev-checkout-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.dev-checkout-block-head h2 {
  margin: 0;
  font-size: 18px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-item-count {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.dev-checkout-block-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dev-checkout-block-body {
  display: block;
}

.dev-checkout-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.dev-checkout-collapse-btn:hover {
  border-color: #111827;
  color: #ffffff;
  background: #111827;
}

.dev-checkout-collapse-icon {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.dev-checkout-block.is-collapsed .dev-checkout-collapse-icon {
  transform: rotate(180deg);
}

.dev-checkout-temperature-group {
  border: 1px solid #f1f1f1;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 16px;
  background: #ffffff;
}

.dev-checkout-temperature-group:last-child {
  margin-bottom: 0;
}

.dev-checkout-temperature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
}

.dev-checkout-temperature-head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #1f2937;
}

.dev-checkout-temperature-group.is-collapsed .dev-checkout-temperature-head {
  border-bottom-color: transparent;
}

.dev-checkout-temperature-head h3 {
  margin: 0;
  font-size: 15px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-temperature-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #6b7280;
}

.dev-checkout-product-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: #6b7280;
}
.dev-checkout-product-tag.is-room    { background: #6b7280; color: #ffffff; }
.dev-checkout-product-tag.is-chilled { background: #2563eb; color: #ffffff; }
.dev-checkout-product-tag.is-frozen  { background: #1d4ed8; color: #ffffff; }

.dev-checkout-temperature-group.is-room .dev-checkout-temperature-head {
  background: #ffffff;
}

.dev-checkout-temperature-group.is-room .dev-checkout-temperature-tag {
  background: #6b7280;
  color: #ffffff;
}

.dev-checkout-temperature-group.is-chilled .dev-checkout-temperature-head {
  background: #ffffff;
}

.dev-checkout-temperature-group.is-chilled .dev-checkout-temperature-tag {
  background: #2563eb;
  color: #ffffff;
}

.dev-checkout-temperature-group.is-frozen .dev-checkout-temperature-head {
  background: #ffffff;
}

.dev-checkout-temperature-group.is-frozen .dev-checkout-temperature-tag {
  background: #1d4ed8;
  color: #ffffff;
}

.dev-checkout-items {
  padding: 12px 16px;
}

.dev-checkout-item {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1fr) 110px 128px 148px;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f1;
}

.dev-checkout-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.dev-checkout-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #f1f1f1;
  background: #ffffff;
}

.dev-checkout-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dev-checkout-item-main h4 {
  margin: 0;
  font-size: 16px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-item-main p {
  margin: 4px 0 8px;
  font-size: 13px;
  color: #9ca3af;
}

.dev-checkout-item-action-placeholder {
  display: flex;
  gap: 10px;
}

.dev-checkout-link-btn {
  padding: 0;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: not-allowed;
}

.dev-checkout-item-price,
.dev-checkout-item-qty,
.dev-checkout-item-subtotal {
  text-align: right;
  font-size: 15px;
  color: #1f2937;
  font-weight: 600;
}

.dev-checkout-item-subtotal {
  font-size: 16px;
  color: #111827;
}

.dev-checkout-option-wrap {
  display: grid;
  gap: 24px;
}

.dev-checkout-shipping-group {
  border: 1px solid #f1f1f1;
  border-radius: 0;
  padding: 14px;
  background: #ffffff;
  margin-bottom: 12px;
}

.dev-checkout-shipping-group:last-child {
  margin-bottom: 0;
}

.dev-checkout-shipping-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.dev-checkout-shipping-group-head strong {
  font-size: 14px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-shipping-select-wrap {
  display: grid;
  gap: 8px;
}

.dev-checkout-shipping-select-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.dev-checkout-shipping-select-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #dc2626;
}

.dev-checkout-page .dev-checkout-summary-row span.is-free-shipping {
  color: #dc2626;
}

.dev-checkout-subtitle {
  margin: 0 0 12px;
  font-size: 16px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dev-checkout-option-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid #f1f1f1;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dev-checkout-option-card:hover {
  border-color: #6b7280;
}

.dev-checkout-option-card.is-active {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
  transform: translateY(-1px);
}

.dev-checkout-option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dev-checkout-option-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.dev-checkout-option-desc {
  display: block;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.dev-checkout-option-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.dev-checkout-option-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.dev-checkout-form .row {
  --bs-gutter-y: 0;
  margin-bottom: 0;
}

.dev-checkout-form-section + .dev-checkout-form-section {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid #ecf0f6;
}

.dev-checkout-form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dev-checkout-form-section-head h3 {
  margin: 0;
  font-size: 16px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-copy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f1f1f1;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
}

.dev-checkout-copy-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.dev-checkout-copy-toggle span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.dev-checkout-copy-toggle small {
  display: block;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.dev-checkout-form-group {
  margin-bottom: 10px;
}

.dev-checkout-form-group label {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.dev-checkout-input,
.dev-checkout-select,
.dev-checkout-textarea {
  width: 100%;
  height: 44px;
  border: 1px solid #d9e0ea;
  border-radius: 0;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 15px;
  color: #111827;
  margin-bottom: 0 !important;
  box-shadow: none;
}

.dev-checkout-textarea {
  height: auto;
  min-height: 110px;
}

.dev-checkout-input:focus,
.dev-checkout-select:focus,
.dev-checkout-textarea:focus {
  border-color: #1f2937;
}

.dev-checkout-form-group.is-error .dev-checkout-input,
.dev-checkout-form-group.is-error .dev-checkout-select,
.dev-checkout-form-group.is-error .dev-checkout-textarea {
  border-color: #b91c1c;
}

.dev-checkout-error-text {
  display: none;
  margin: 4px 0 0;
  font-size: 12px;
  color: #b91c1c;
  min-height: 0;
}

.dev-checkout-char-count {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
  text-align: right;
}

.dev-checkout-form-group.is-error .dev-checkout-error-text {
  display: block;
}

.dev-checkout-shipping-select-wrap.is-error .dev-checkout-select {
  border-color: #b91c1c;
}

.dev-checkout-shipping-select-wrap.is-error .dev-checkout-shipping-select-error {
  display: block;
}

.dev-checkout-summary-payment-hint.is-error {
  color: #b91c1c;
}

.dev-checkout-summary-select-wrap.is-error .dev-checkout-select {
  border-color: #b91c1c;
}

.dev-checkout-receiver-sync-field.is-locked,
.dev-checkout-receiver-sync-field[readonly],
.dev-checkout-receiver-sync-field:disabled {
  background: #f3f4f6;
  color: #4b5563;
}

.dev-checkout-store-box {
  border: 1px solid #f1f1f1;
  border-radius: 0;
  padding: 14px;
  margin-bottom: 8px;
  background: #ffffff;
}

.dev-checkout-store-btn {
  max-width: 100%;
  width: 100%;
  margin-right: 0;
}

.dev-checkout-shipping-notice {
  border-left: 5px solid #1f2937;
}

.dev-checkout-shipping-notice h3 {
  margin: 0 0 10px;
  font-size: 19px;
  color: #111827;
}

.dev-checkout-shipping-notice ul {
  margin: 0;
  padding-left: 18px;
}

.dev-checkout-shipping-notice li {
  list-style: disc;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 2px;
}

.dev-checkout-summary-sticky {
  position: sticky;
  top: 90px;
}

.dev-checkout-summary h2 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #111111;
  font-weight: 700;
}

.dev-checkout-summary-list {
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.dev-checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

.dev-checkout-summary-row span:last-child {
  color: #111827;
  font-weight: 600;
}

.dev-checkout-summary-row.is-discount span:last-child {
  color: #b91c1c;
}

.dev-checkout-summary-coupon {
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.dev-checkout-summary-coupon-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dev-checkout-summary-coupon-head span {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.dev-checkout-summary-coupon-head small {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.dev-checkout-summary-coupon-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dev-checkout-summary-coupon-input {
  flex: 1 1 auto;
  min-width: 0;
}

#page-content .dev-checkout-summary-coupon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 78px;
  height: 44px;
  padding: 0 16px;
  margin: 0;
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #1f2937;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

#page-content .dev-checkout-summary-coupon-btn:hover {
  background: #111827;
  border-color: #111827;
}

.dev-checkout-summary-coupon-status {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.dev-checkout-summary-coupon-status.is-success {
  color: #047857;
}

.dev-checkout-summary-coupon-status.is-error {
  color: #b91c1c;
}

.dev-checkout-summary-method {
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.dev-checkout-summary-method-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.dev-checkout-summary-method-row strong {
  color: #111827;
  font-weight: 700;
}

.dev-checkout-summary-select-wrap {
  margin-bottom: 10px;
}

.dev-checkout-summary-select-wrap .dev-checkout-select {
  height: 42px;
}

.dev-checkout-summary-payment-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

/* 「請選擇付款方式」紅框警示樣式 baseline（issue #481）
 * default / dgfactor / kgtwbeef 版本內容相同，由本 common 層統一供應；
 * 3ffood 與 shopLinerp 各有品牌差異化（紅色色票 / #page-content 範圍綁定），
 * 待 themes/{3ffood,shopLinerp}/pages/shoppingCart.css 拆檔（task 10.8 / 11.8）時覆寫 */
.dev-checkout-summary-payment-empty {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #b91c1c;
  text-align: center;
}

.dev-checkout-summary-method-row.is-shipping-row {
  margin-top: 6px;
}

.dev-checkout-summary-shipping-detail {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.dev-checkout-summary-shipping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}

.dev-checkout-summary-shipping-item span {
  flex: 1 1 auto;
  min-width: 0;
}

.dev-checkout-summary-shipping-item strong {
  flex: 0 0 auto;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dev-checkout-summary-shipping-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.dev-checkout-summary-shipping-status.is-merged {
  color: #047857;
}

.dev-checkout-summary-shipping-status.is-split {
  color: #b45309;
}

.dev-checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.dev-checkout-summary-total span {
  font-size: 15px;
  color: #111827;
  font-weight: 700;
}

.dev-checkout-summary-total strong {
  font-size: 24px;
  line-height: 1;
  color: #111111;
  font-weight: 800;
}

.dev-checkout-summary-warning {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 0;
  border: 1px solid #f3d6a4;
  border-left: 4px solid #d97706;
  background: #fffaf2;
  margin-bottom: 14px;
}

.dev-checkout-summary-warning i {
  color: #b45309;
  margin-top: 3px;
}

.dev-checkout-summary-warning p {
  margin: 0;
  font-size: 12px;
  color: #7c5b2a;
  line-height: 1.5;
}

.dev-checkout-submit-btn {
  max-width: 100%;
  width: 100%;
  margin: 0;
  font-size: 15px;
  padding: 12px 20px;
}

@media (max-width: 1199px) {
  .dev-checkout-item {
    grid-template-columns: 72px minmax(160px, 1fr) 96px 124px 136px;
    gap: 10px;
  }
}

@media (max-width: 991px) {
  .dev-checkout-page {
    padding: 20px 0 44px;
  }

  .dev-checkout-card {
    padding: 18px;
  }

  .dev-checkout-summary-sticky {
    position: static;
    top: auto;
  }

  .dev-checkout-option-grid {
    grid-template-columns: 1fr;
  }

  .dev-checkout-block-tools {
    width: 100%;
    justify-content: space-between;
  }

  .dev-checkout-item {
    grid-template-columns: 72px 1fr;
    gap: 10px;
  }

  .dev-checkout-item-main {
    padding-right: 0;
  }

  .dev-checkout-item-price,
  .dev-checkout-item-qty,
  .dev-checkout-item-subtotal {
    grid-column: 2;
    text-align: left;
    font-size: 14px;
  }

  .dev-checkout-item-price::before {
    content: "單價：";
    color: #9ca3af;
    font-weight: 400;
  }

  .dev-checkout-item-qty::before {
    content: "數量：";
    color: #9ca3af;
    font-weight: 400;
  }

  .dev-checkout-item-subtotal::before {
    content: "小計：";
    color: #9ca3af;
    font-weight: 400;
  }

  .dev-checkout-summary-coupon-head,
  .dev-checkout-summary-coupon-form {
    flex-direction: column;
    align-items: stretch;
  }

  #page-content .dev-checkout-summary-coupon-btn {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .dev-checkout-progress {
    gap: 6px;
  }

  .dev-checkout-progress li {
    display: grid;
    justify-items: center;
    gap: 6px;
    font-size: 12px;
  }

  .dev-checkout-progress li::before {
    left: -42%;
    width: 84%;
  }

  .dev-checkout-progress-text {
    font-size: 12px;
  }

  .dev-checkout-alert-content h3 {
    font-size: 16px;
  }

  .dev-checkout-alert-content p {
    font-size: 13px;
  }

  .dev-checkout-form-section-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .dev-checkout-block-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .dev-checkout-block-tools {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex: 0 0 auto;
  }

  .dev-checkout-item {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "thumb price"
      "thumb qty"
      "thumb subtotal";
    gap: 8px 12px;
    align-items: start;
  }

  .dev-checkout-item-thumb {
    grid-area: thumb;
    align-self: start;
  }

  .dev-checkout-item-main {
    grid-area: main;
  }

  .dev-checkout-item-price {
    grid-area: price;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .dev-checkout-item-qty {
    grid-area: qty;
    justify-content: flex-start;
    gap: 8px;
  }

  .dev-checkout-item-subtotal-wrap {
    grid-area: subtotal;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  .dev-checkout-item-subtotal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .dev-checkout-item-price::before,
  .dev-checkout-item-qty::before,
  .dev-checkout-item-subtotal::before {
    flex: 0 0 auto;
    min-width: 40px;
  }

  .dev-checkout-copy-toggle {
    width: 100%;
  }

  .dev-checkout-temperature-alert {
    flex-wrap: wrap;
  }

  .dev-checkout-mixed-badge {
    margin-left: 58px;
  }

  .dev-checkout-block-head h2,
  .dev-checkout-summary h2 {
    font-size: 20px;
  }

  .dev-checkout-temperature-head h3,
  .dev-checkout-subtitle,
  .dev-checkout-shipping-notice h3 {
    font-size: 17px;
  }

  .dev-checkout-summary-total strong {
    font-size: 28px;
  }
}

#page-content.dev-checkout-page .blog-item-2 .blog-title-2,
#page-content.dev-checkout-page .blog-item-2 .blog-title-2>a,
#page-content.dev-checkout-page .product-title-2,
#page-content.dev-checkout-page .blog-details-title,
#page-content.dev-checkout-page .widget-block-title h2 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

@media (min-width: 992px) and (max-width: 1199px) {
  /* #header 平板（992-1199px）規則統一由 common/header.css 提供，此處不重複（與 header.css 658-694 相同）。 */
  #page-content.dev-checkout-page .widget-block-title h2,
  #page-content.dev-checkout-page .blog-details-title {
    font-size: 28px;
    line-height: 1.3;
  }

  #page-content.dev-checkout-page .blog-item-2 .blog-title-2 {
    font-size: 22px;
    line-height: 1.35;
  }

  #page-content.dev-checkout-page .product-title-2 {
    font-size: 17px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  /* #header 平板（768-991px）規則統一由 common/header.css 提供，此處不重複（與 header.css 697-733 相同）。 */
  #page-content.dev-checkout-page .widget-block-title h2,
  #page-content.dev-checkout-page .blog-details-title {
    font-size: 26px;
    line-height: 1.3;
  }

  #page-content.dev-checkout-page .blog-item-2 .blog-title-2 {
    font-size: 20px;
    line-height: 1.35;
  }

  #page-content.dev-checkout-page .product-title-2 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .dev-checkout-card {
    padding: 15px;
  }

  .dev-checkout-progress-index {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .dev-checkout-temperature-head,
  .dev-checkout-items {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dev-checkout-item-thumb {
    width: 66px;
    height: 66px;
  }

  .dev-checkout-mixed-badge {
    margin-left: 0;
  }
}


/* ============================================================================
 * 區段 3：checkout 修正 + 新版購物車 Phase A
 *   抽取自 default.css line 9217~9390
 * ============================================================================
 */

/* checkout: 修正數量按鈕與刪除按鈕被全域樣式覆蓋 */
#page-content .dev-checkout-item-qty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#page-content .dev-checkout-qty-editor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  width: 128px;
  min-width: 128px;
  height: 36px;
  border: 1px solid #d8dee8;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
}

#page-content .dev-checkout-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  margin: 0;
  border: 0;
  background: #f7f9fd;
  color: #4b5563;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

#page-content .dev-checkout-qty-input {
  display: block;
  width: 56px;
  min-width: 56px;
  height: 36px;
  flex: 0 0 56px;
  padding: 0 4px;
  margin: 0;
  border: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 36px;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

#page-content .dev-checkout-qty-input::-webkit-outer-spin-button,
#page-content .dev-checkout-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#page-content .dev-checkout-item-subtotal-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 148px;
}

#page-content .dev-checkout-item-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 58px;
  height: 36px;
  padding: 0 10px;
  margin: 0;
  border: 1px solid #d1d7e2;
  border-radius: 0;
  background: #ffffff;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

/* checkout: 直角語言由各元件個別 border-radius: 0 規則維持；
 * 此處移除原本 #page-content.dev-checkout-page * 萬用 reset，避免主題層
 * （如 kgtwbeef）以單一 class 設定的圓角被高 specificity (1,1,0) 的 universal
 * reset 反向覆蓋。default 主題的方角樣式已由各元件自身規則保證，無需萬用 reset。
 */

/* ===== 新版購物車補充 class（Phase A）===== */

/* 收合/展開按鈕文字 */
.dev-checkout-collapse-text {
  font-size: 13px;
  color: #6b7280;
}

/* 空購物車提示區塊 */
.dev-checkout-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

/* 物流/付款選項區塊（每溫層） */
.dev-checkout-option-section {
  display: grid;
  gap: 12px;
  padding: 12px 0 0;
}

/* 物流方式下拉選單（.dev-checkout-select 的語意別名） */
.dev-checkout-shipping-select {
  width: 100%;
}

/* 宅配地址/門市欄位容器（顯示/隱藏切換） */
.dev-checkout-delivery-fields {
  padding: 10px 0 0;
}

/* 庫存提示文字 */
.dev-checkout-stock-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.dev-checkout-stock-hint.is-out {
  color: #ef4444;
  font-weight: 600;
}

/* 無庫存商品列：整體降低對比度 */
.dev-checkout-item.is-out-of-stock {
  opacity: 0.55;
}

/* Checkout action wrap */
.dev-checkout-action-wrap {
    display: flex;
    width: 100%;
    margin-top: 1rem;
    gap: 15px;
}
.dev-checkout-action-wrap .btn {
    flex: 1;
    margin: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.dev-checkout-submit-btn.is-processing {
    pointer-events: none;
    opacity: 0.8;
}


/* ============================================================================
 * 區段 4：確認訂單頁（.dev-confirm-* + 安全庫存警示）
 *   抽取自 default.css line 9392~9631
 *   對應 blade：shoppingCarts/confirm.blade.php
 * ============================================================================
 */

/* ===== 確認訂單頁（confirm.blade.php）===== */
.dev-confirm-heading {
  text-align: center;
  margin-bottom: 24px;
}
.dev-confirm-heading h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

.dev-confirm-card {
  padding: 0;
  overflow: hidden;
}
.dev-confirm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.dev-confirm-card-head i {
  font-size: 16px;
  color: #6b7280;
}
.dev-confirm-card-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dev-confirm-item-count {
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
}

/* 確認資訊表格 */
.dev-confirm-table {
  width: 100%;
  border-collapse: collapse;
}
.dev-confirm-table th,
.dev-confirm-table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  text-align: left;
}
.dev-confirm-table tr:last-child th,
.dev-confirm-table tr:last-child td {
  border-bottom: none;
}
.dev-confirm-table th {
  width: 28%;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}
.dev-confirm-table td {
  color: #1f2937;
}
.dev-confirm-empty {
  color: #9ca3af;
  font-style: italic;
}
/* 送貨方式表格（三欄 thead） */
.dev-confirm-shipping-table thead th {
  width: auto;
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}
.dev-confirm-shipping-table thead th:first-child { width: 15%; }
.dev-confirm-shipping-table thead th:nth-child(2) { width: 25%; }
.dev-confirm-shipping-table .dev-confirm-store-name {
  font-weight: 500;
  margin-right: 4px;
}
.dev-confirm-method-tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 6px;
  font-weight: 500;
}
.dev-confirm-store-addr {
  color: #6b7280;
  font-size: 14px;
}

/* 商品列表（flex 布局） */
.dev-confirm-items-wrap {
  padding: 0;
}
.dev-confirm-items-header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.dev-confirm-item-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #1f2937;
}
.dev-confirm-item-row:last-child {
  border-bottom: none;
}
.dev-confirm-temp-divider {
  padding: 8px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.dev-confirm-col-main  { flex: 0 0 50%; }
.dev-confirm-col-qty   { flex: 0 0 15%; text-align: center; }
.dev-confirm-col-price { flex: 0 0 17%; text-align: right; }
.dev-confirm-col-subtotal { flex: 1; text-align: right; }

/* 商品縮圖 + 資訊 */
.dev-confirm-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dev-confirm-item-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
}
.dev-confirm-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dev-confirm-item-info {
  flex: 1;
  min-width: 0;
}
.dev-confirm-product-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-confirm-spec {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-top: 3px;
}

/* 付款方式列 */
.dev-confirm-pay-method {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}
.dev-confirm-pay-method strong {
  color: #1f2937;
}

@media (max-width: 480px) {
  /* #header 手機（≤480px）規則統一由 common/header.css 提供，此處不重複（與 header.css 736-747 相同）。 */
  #page-content.dev-checkout-page .widget-block-title h2,
  #page-content.dev-checkout-page .blog-details-title {
    font-size: 24px;
    line-height: 1.3;
  }

  #page-content.dev-checkout-page .blog-item-2 .blog-title-2 {
    font-size: 18px;
  }

  #page-content.dev-checkout-page .product-title-2 {
    font-size: 15px;
  }

  #page-content.dev-checkout-page .btnSummit,
  #page-content.dev-checkout-page .btnNormal,
  #page-content.dev-checkout-page .submit-btn,
  #page-content.dev-checkout-page .btn-submit,
  #page-content.dev-checkout-page .apply-btn,
  #page-content.dev-checkout-page .check-btn,
  #page-content.dev-checkout-page .btnCanNotBuy {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* 安全庫存不足警示列背景 */
tr.bg-safe-stock-warning {
  background-color: #fff5f5;
}
