    :root {
      --bg: linear-gradient(135deg, #fef9f3 0%, #faf5ed 100%);
      --card: #ffffff;
      --text: #1a1a1a;
      --primary: #d97706;
      --primary-dark: #b45309;
      --accent: #f59e0b;
      --success: #059669;
      --danger: #dc2626;
      --muted: #6b7280;
      --border: #e5e7eb;
      --shadow: 0 4px 20px rgba(0, 0, 0, .06);
      --shadow-lg: 0 10px 40px rgba(0, 0, 0, .12);
      --radius: clamp(10px, 2vw, 16px);
    }

    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent
    }

    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      background: #fef9f3;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      font-size: clamp(15px, 3.5vw, 16px);
      letter-spacing: 0.3px;
      padding-bottom: 20px;
    }

    /* Header 品牌區 */
    .brand-header {
      background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
      color: #fff;
      padding: clamp(12px, 3vw, 18px) clamp(12px, 3vw, 16px);
      text-align: center;
      box-shadow: 0 4px 16px rgba(217, 119, 6, .25);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .brand-logo-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: clamp(8px, 2vw, 12px);
      margin-bottom: 4px;
    }

    .brand-logo {
      width: clamp(40px, 10vw, 56px);
      height: clamp(40px, 10vw, 56px);
      border-radius: 50%;
      background: #fff;
      padding: 6px;
      cursor: pointer;
      transition: transform .2s ease;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    }

    .brand-logo:hover {
      transform: scale(1.05);
    }

    .brand-logo:active {
      transform: scale(0.98);
    }

    .brand-title {
      font-size: clamp(20px, 4.5vw, 24px);
      font-weight: 800;
      margin: 0;
      letter-spacing: 0.5px;
    }

    .brand-subtitle {
      font-size: clamp(12px, 2.5vw, 13px);
      opacity: .9;
      margin: 2px 0 0;
      font-weight: 400;
    }

    /* 容器 */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: clamp(12px, 3vw, 16px);
    }

    /* 卡片 */
    .card {
      background: var(--card);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: clamp(14px, 3.5vw, 18px);
      margin-bottom: clamp(12px, 3vw, 16px);
    }

    /* 區塊標題 */
    .section-title {
      font-size: clamp(17px, 4.2vw, 19px);
      font-weight: 700;
      margin: 0 0 clamp(12px, 3vw, 14px);
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
      letter-spacing: 0.5px;
      line-height: 1.4;
    }

    .section-title::before {
      content: '';
      width: 4px;
      height: clamp(17px, 4vw, 20px);
      background: var(--primary);
      border-radius: 2px;
    }

    /* 表單欄位 */
    .form-group {
      margin-bottom: clamp(12px, 3vw, 14px);
    }

    .form-label {
      display: block;
      font-weight: 600;
      margin-bottom: clamp(6px, 1.5vw, 7px);
      font-size: clamp(14px, 3.2vw, 15px);
      color: var(--text);
      letter-spacing: 0.3px;
      line-height: 1.5;
    }

    .form-label .required {
      color: var(--danger);
      margin-left: 2px;
    }

    /* 備註快捷標籤（點擊填入）；桌面與手機顏色一致，避免手機顯示為黑 */
    .form-label .note-tag {
      display: inline-block;
      margin-left: 8px;
      padding: 2px 8px;
      font-size: clamp(11px, 2.5vw, 12px);
      font-weight: 600;
      color: #92400e;
      background-color: #fef3c7;
      background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
      border: 1.5px solid #fbbf24;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      vertical-align: middle;
      -webkit-tap-highlight-color: rgba(251, 191, 36, 0.35);
    }
    .form-label .note-tag:hover,
    .form-label .note-tag:active {
      color: #78350f;
      background-color: #fde68a;
      background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
      border-color: #f59e0b;
    }

    input,
    select,
    textarea {
      width: 100%;
      padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 14px);
      border: 1.5px solid var(--border);
      border-radius: clamp(8px, 2vw, 10px);
      background: #fff;
      font-size: clamp(15px, 3.5vw, 16px);
      font-family: inherit;
      transition: all .2s ease;
      color: var(--text);
      letter-spacing: 0.3px;
      line-height: 1.5;
    }

    input:focus,
    select:focus,
    textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(217, 119, 6, .12);
    }

    textarea {
      min-height: clamp(70px, 18vw, 90px);
      resize: vertical;
    }

    /* 商品容器 - 基礎樣式 */
    #products {
      display: grid;
      gap: clamp(10px, 2.5vw, 12px);
    }

    /* 🆕 網格顯示模式（預設） */
    #products.display-mode-grid {
      grid-template-columns: repeat(2, 1fr);
      /* 手機預設 2 欄 */
    }

    @media(min-width: 600px) {
      #products.display-mode-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 平板 3 欄 */
      }
    }

    @media(min-width: 900px) {
      #products.display-mode-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 電腦 4 欄 */
      }
    }

    /* 🆕 單欄顯示模式 */
    #products.display-mode-single {
      grid-template-columns: 1fr;
      /* 每行一個商品 */
    }

    /* 🆕 列表顯示模式 */
    #products.display-mode-list {
      grid-template-columns: 1fr;
      /* 每行一個商品 */
    }

    /* 🆕 列表模式下的商品卡片樣式 */
    #products.display-mode-list .product-card {
      display: flex;
      flex-direction: row;
      gap: clamp(10px, 2.5vw, 12px);
      padding: clamp(10px, 2.5vw, 12px);
      align-items: flex-start;
    }

    #products.display-mode-list .product-image-wrap {
      flex-shrink: 0;
      width: clamp(100px, 25vw, 120px);
      height: clamp(100px, 25vw, 120px);
      position: relative;
    }

    #products.display-mode-list .product-image-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: clamp(6px, 1.5vw, 8px);
    }

    #products.display-mode-list .product-card > div:not(.product-image-wrap) {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    
    /* 🆕 列表模式下標籤位置調整 */
    #products.display-mode-list .product-card .out-of-stock-badge,
    #products.display-mode-list .product-card > div[style*="position:absolute"][style*="top:6px"] {
      position: absolute;
      top: 6px;
      left: 6px;
      z-index: 10;
    }
    
    #products.display-mode-list .product-card > div[style*="position:absolute"][style*="right:6px"] {
      position: absolute;
      top: 6px;
      right: 6px;
      z-index: 10;
    }

    /* 🆕 顯示模式按鈕樣式 */
    .display-mode-btn.active {
      background: var(--primary) !important;
      color: #fff !important;
      box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
    }

    .display-mode-btn:active {
      transform: scale(0.95);
    }

    /* 🆕 單欄模式下的商品卡片樣式（更大） */
    #products.display-mode-single .product-card {
      padding: clamp(12px, 3vw, 16px);
    }

    #products.display-mode-single .product-image-wrap {
      width: 100%;
      height: clamp(200px, 50vw, 250px);
    }

    #products.display-mode-single .product-image-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* 單點配菜 - 分類容器 */
    .side-list {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      /* 手機 2 欄 */
      gap: clamp(8px, 2vw, 10px);
      align-items: start;
    }

    @media(min-width: 768px) {
      .side-list {
        grid-template-columns: repeat(3, 1fr);
      }

      /* 平板 3 欄 */
    }

    @media(min-width: 1024px) {
      .side-list {
        grid-template-columns: repeat(4, 1fr);
      }

      /* 電腦 4 欄 */
    }

    .side-item {
      display: flex;
      align-items: center;
      gap: clamp(5px, 1.2vw, 7px);
      padding: clamp(7px, 1.8vw, 9px);
      background: #fff;
      border: 1px solid var(--border);
      border-radius: clamp(6px, 1.5vw, 8px);
      transition: all .2s ease;
    }

    .side-item:has(input:not([value="0"])) {
      border-color: var(--primary);
      background: #fffbeb;
    }

    .side-item-name {
      flex: 1;
      font-size: clamp(14px, 3.2vw, 15px);
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      letter-spacing: 0.3px;
    }

    .side-item .qty-control {
      padding: clamp(1px, 0.3vw, 2px);
      flex-shrink: 0;
    }

    .side-item .qty-control input {
      width: clamp(28px, 7vw, 32px);
      font-size: clamp(13px, 3vw, 14px);
    }

    .side-item .qty-btn {
      width: clamp(20px, 5vw, 24px);
      height: clamp(20px, 5vw, 24px);
      font-size: clamp(12px, 3vw, 14px);
    }

    .side-item .eye-icon {
      cursor: pointer;
      font-size: clamp(16px, 4vw, 18px);
      opacity: 0.6;
      transition: all .2s ease;
      flex-shrink: 0;
    }

    .side-item .eye-icon:hover {
      opacity: 1;
      transform: scale(1.2);
    }

    /* 分類區塊 */
    .category-block {
      display: flex;
      flex-direction: column;
    }

    /* 分類標題（可點擊摺疊） */
    .category-title {
      font-size: clamp(14px, 3.2vw, 15px);
      font-weight: 700;
      color: var(--primary);
      background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
      padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 14px);
      border-radius: clamp(8px, 2vw, 10px);
      border: 1.5px solid #fed7aa;
      cursor: pointer;
      user-select: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: all .2s ease;
      letter-spacing: 0.3px;
      line-height: 1.4;
    }

    .category-title:hover {
      background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    }

    .category-title:active {
      transform: scale(0.98);
    }

    .category-title .toggle-icon {
      font-size: clamp(16px, 4vw, 18px);
      transition: transform .2s ease;
    }

    .category-title.active .toggle-icon {
      transform: rotate(180deg);
    }

    /* 分類內容（可摺疊） */
    .category-content {
      display: flex;
      flex-direction: column;
      gap: clamp(4px, 1vw, 5px);
      margin-top: clamp(4px, 1vw, 5px);
      max-height: 0;
      overflow: hidden;
      transition: max-height .3s ease;
    }

    .category-content.active {
      max-height: 2000px;
    }

    /* 商品卡片 */
    .product-card {
      background: #fff;
      border: 1.5px solid var(--border);
      border-radius: clamp(6px, 1.5vw, 10px);
      padding: clamp(6px, 1.5vw, 8px);
      transition: all .25s ease;
      position: relative;
    }

    .product-card:has(input[type="number"]:not([value="0"])) {
      border-color: var(--primary);
      box-shadow: 0 2px 8px rgba(217, 119, 6, .15);
    }

    .product-card:active {
      transform: scale(0.98);
    }

    /* 缺貨商品樣式 */
    .product-card.out-of-stock {
      opacity: 0.6;
      pointer-events: none;
    }

    .product-card.out-of-stock .product-image-wrap {
      filter: grayscale(50%);
    }

    /* 缺貨標籤 */
    .out-of-stock-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
      color: #fff;
      padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 12px);
      border-radius: clamp(4px, 1vw, 6px);
      font-size: clamp(11px, 2.5vw, 12px);
      font-weight: 700;
      z-index: 10;
      box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 4px;
      animation: pulse 2s ease-in-out infinite;
    }

    .out-of-stock-badge::before {
      content: '✕';
      font-size: clamp(12px, 2.8vw, 14px);
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.8;
      }
    }

    /* 菜單圖片容器 */
    .menu-image-wrap {
      position: relative;
      width: 100%;
      padding-top: 75%;
      /* 4:3 比例 */
      border-radius: clamp(6px, 1.5vw, 10px);
      overflow: hidden;
      cursor: pointer;
      background: #f3f4f6;
      border: 1.5px solid var(--border);
      transition: all .25s ease;
    }

    .menu-image-wrap:hover {
      border-color: var(--primary);
      box-shadow: 0 4px 12px rgba(217, 119, 6, .2);
    }

    .menu-image {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      /* 完整顯示圖片 */
      object-position: center;
      transition: transform .3s ease;
    }

    .menu-image-wrap:hover .menu-image {
      transform: scale(1.02);
    }

    .menu-image-wrap::after {
      content: '🔍 點擊放大';
      position: absolute;
      bottom: 8px;
      right: 8px;
      background: rgba(0, 0, 0, .7);
      color: #fff;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: clamp(10px, 2.2vw, 11px);
      opacity: 0;
      transition: opacity .2s ease;
    }

    .menu-image-wrap:hover::after {
      opacity: 1;
    }

    .product-image-wrap {
      position: relative;
      width: 100%;
      padding-top: 75%;
      /* 改為 4:3 比例，讓圖片不那麼大 */
      border-radius: clamp(4px, 1vw, 6px);
      overflow: hidden;
      margin-bottom: clamp(5px, 1.2vw, 6px);
      cursor: pointer;
      background: #f3f4f6;
    }

    .product-image {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      /* 置中裁切 */
      object-position: center;
      transition: transform .3s ease;
    }

    .product-image-wrap:hover .product-image {
      transform: scale(1.05);
    }

    .product-image-wrap::after {
      content: '🔍';
      position: absolute;
      top: 4px;
      right: 4px;
      background: rgba(0, 0, 0, .6);
      color: #fff;
      width: clamp(20px, 5vw, 24px);
      height: clamp(20px, 5vw, 24px);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: clamp(10px, 2.5vw, 12px);
      opacity: 0;
      transition: opacity .2s ease;
    }

    .product-image-wrap:hover::after {
      opacity: 1;
    }

    .product-name {
      font-size: clamp(13px, 2.8vw, 14px);
      font-weight: 600;
      margin-bottom: clamp(3px, 0.8vw, 4px);
      color: var(--text);
      line-height: 1.3;
      /* 🔧 长文本处理 */
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      /* 最多显示2行 */
      line-clamp: 2;
      /* 标准属性 */
      -webkit-box-orient: vertical;
      word-break: break-word;
    }

    .product-price {
      font-size: clamp(14px, 3vw, 15px);
      font-weight: 700;
      color: var(--primary);
      margin-bottom: clamp(5px, 1.2vw, 6px);
    }

    .product-qty {
      display: flex;
      align-items: center;
      gap: clamp(4px, 1vw, 5px);
    }

    .product-qty input {
      width: 100%;
      text-align: center;
      padding: clamp(5px, 1.2vw, 6px);
      font-weight: 600;
      font-size: clamp(13px, 3vw, 15px);
    }

    .product-qty select {
      padding: clamp(4px, 1vw, 5px) clamp(6px, 1.5vw, 8px);
      font-size: clamp(10px, 2.2vw, 12px);
      margin-top: clamp(4px, 1vw, 5px);
    }

    /* 數量控制按鈕 */
    .qty-control {
      display: flex;
      align-items: center;
      gap: clamp(3px, 0.8vw, 4px);
      background: #fff;
      border: 1.5px solid var(--border);
      border-radius: clamp(6px, 1.5vw, 8px);
      padding: clamp(2px, 0.5vw, 3px);
      transition: all .2s ease;
    }

    .qty-control:has(input:not([value="0"])) {
      border-color: var(--primary);
      background: #fffbeb;
    }

    .qty-btn {
      width: clamp(24px, 6vw, 28px);
      height: clamp(24px, 6vw, 28px);
      border: none;
      background: var(--primary);
      color: #fff;
      border-radius: clamp(4px, 1vw, 6px);
      font-size: clamp(14px, 3.5vw, 16px);
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s ease;
      user-select: none;
      flex-shrink: 0;
      padding: 0;
      line-height: 1;
    }

    .qty-btn:active {
      transform: scale(0.9);
      background: var(--primary-dark);
    }

    .qty-btn:hover {
      background: var(--primary-dark);
    }

    .qty-control input {
      border: none;
      background: transparent;
      width: clamp(36px, 9vw, 42px);
      text-align: center;
      padding: clamp(4px, 1vw, 5px);
      font-weight: 600;
      font-size: clamp(14px, 3.2vw, 15px);
      appearance: textfield;
      /* 標準屬性 */
      -moz-appearance: textfield;
      /* Firefox */
    }

    .qty-control input::-webkit-outer-spin-button,
    .qty-control input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .qty-control input:focus {
      box-shadow: none;
    }

    /* 總計 */
    .total-section {
      background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
      padding: clamp(10px, 2.5vw, 14px);
      border-radius: var(--radius);
      margin: clamp(10px, 2.5vw, 12px) 0;
    }

    .total-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .total-label {
      font-size: clamp(15px, 3.5vw, 16px);
      font-weight: 600;
    }

    .total-amount {
      font-size: clamp(22px, 5vw, 26px);
      font-weight: 800;
      color: var(--primary);
    }

    /* 按鈕 */
    .btn-group {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: clamp(8px, 2vw, 10px);
      margin-top: clamp(10px, 2.5vw, 12px);
    }

    button {
      padding: clamp(10px, 2.2vw, 12px) clamp(12px, 3vw, 16px);
      border: none;
      border-radius: clamp(6px, 1.5vw, 8px);
      font-size: clamp(14px, 3vw, 15px);
      font-weight: 700;
      cursor: pointer;
      transition: all .2s ease;
      font-family: inherit;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      color: #fff;
      box-shadow: 0 3px 10px rgba(217, 119, 6, .3);
    }

    .btn-primary:hover {
      box-shadow: 0 4px 14px rgba(217, 119, 6, .4);
      transform: translateY(-1px);
    }

    .btn-primary:active {
      transform: translateY(0);
    }

    .btn-ghost {
      background: #fff;
      color: var(--muted);
      border: 1.5px solid var(--border);
    }

    .btn-ghost:hover {
      border-color: var(--muted);
    }

    /* 訊息 */
    .message {
      margin-top: clamp(8px, 2vw, 10px);
      padding: clamp(8px, 2vw, 10px);
      border-radius: clamp(4px, 1vw, 6px);
      font-size: clamp(13px, 2.8vw, 14px);
      font-weight: 600;
    }

    .message.success {
      background: #d1fae5;
      color: var(--success);
      border: 1.5px solid var(--success);
    }

    .message.error {
      background: #fee2e2;
      color: var(--danger);
      border: 1.5px solid var(--danger);
    }

    /* 預覽區 */
    .preview-box {
      background: #f9fafb;
      padding: clamp(10px, 2.5vw, 12px);
      border-radius: clamp(6px, 1.5vw, 8px);
      border: 1.5px dashed var(--border);
      min-height: 80px;
      font-size: clamp(13px, 2.8vw, 14px);
      line-height: 1.6;
    }

    .preview-empty {
      color: var(--muted);
      text-align: center;
      padding: clamp(15px, 4vw, 20px);
    }

    .preview-item {
      padding: clamp(6px, 1.5vw, 8px) 0;
      border-bottom: 1px solid var(--border);
      /* 🔧 长文本处理 */
      word-break: break-word;
      line-height: 1.6;
    }

    .preview-item:last-child {
      border-bottom: none;
    }

    .preview-item strong {
      display: inline-block;
      max-width: 60%;
      word-break: break-word;
    }

    /* Logo 放大模態框 */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .8);
      z-index: 999;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn .2s ease;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      max-width: 90%;
      max-height: 90%;
      border-radius: var(--radius);
      animation: zoomIn .2s ease;
    }

    @keyframes fadeIn {
      from {
        opacity: 0
      }

      to {
        opacity: 1
      }
    }

    @keyframes zoomIn {
      from {
        transform: scale(.8)
      }

      to {
        transform: scale(1)
      }
    }

    @keyframes slideUp {
      from {
        transform: translate(-50%, 100px);
        opacity: 0
      }

      to {
        transform: translate(-50%, 0);
        opacity: 1
      }
    }

    /* 預覽+總計區域容器 */
    .summary-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: clamp(8px, 2vw, 10px);
    }

    /* 口味客製網格 */
    .taste-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      /* 手機 2x2 */
      gap: clamp(8px, 2vw, 10px);
    }

    /* 響應式調整 */
    @media(min-width: 768px) {
      .container {
        padding: clamp(12px, 3vw, 18px);
      }

      .brand-header {
        padding: clamp(16px, 4vw, 24px) clamp(16px, 3vw, 20px);
      }

      .summary-grid {
        grid-template-columns: 1.2fr 0.8fr;
      }

      /* 電腦版：預覽較寬，總計較窄 */
      .taste-grid {
        grid-template-columns: repeat(4, 1fr);
      }

      /* 電腦版：一行 4 欄 */
    }

    /* 底部版权信息 */
    .footer {
      text-align: center;
      padding: clamp(20px, 5vw, 30px) clamp(12px, 3vw, 16px);
      color: var(--muted);
      font-size: clamp(10px, 2.2vw, 11px);
      line-height: 1.8;
      border-top: 1px solid var(--border);
      background: #fafafa;
      margin-top: clamp(20px, 5vw, 30px);
    }

    .footer a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
      transition: all .2s ease;
    }

    .footer a:hover {
      color: var(--primary-dark);
      text-decoration: underline;
    }

    .footer-warning {
      margin-top: 8px;
      font-size: clamp(9px, 2vw, 10px);
      color: #9ca3af;
    }

    /* 載入提示 */
    .loading-overlay {
      position: fixed;
      inset: 0;
      background: rgba(255, 255, 255, 0.95);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity .3s ease;
    }

    .loading-overlay.hidden {
      opacity: 0;
      pointer-events: none;
    }

    .loading-content {
      text-align: center;
      padding: clamp(20px, 5vw, 30px);
    }

    .loading-icon {
      width: clamp(80px, 20vw, 120px);
      height: clamp(80px, 20vw, 120px);
      margin-bottom: clamp(12px, 3vw, 16px);
      animation: bounce 1s ease-in-out infinite;
      border-radius: 50%;
      background: #fff;
      padding: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
      object-fit: contain;
    }

    @keyframes bounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    .loading-text {
      font-size: clamp(14px, 3.5vw, 16px);
      font-weight: 600;
      color: var(--primary);
      margin-bottom: 8px;
    }

    .loading-subtext {
      font-size: clamp(11px, 2.5vw, 12px);
      color: var(--muted);
    }

    /* 進度條樣式 */
    .loading-progress-container {
      width: 100%;
      max-width: 280px;
      margin: clamp(16px, 4vw, 20px) auto 0;
    }

    .loading-progress-bar {
      width: 100%;
      height: clamp(6px, 1.5vw, 8px);
      background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
      border-radius: 999px;
      overflow: hidden;
      position: relative;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .loading-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
      background-size: 200% 100%;
      border-radius: 999px;
      transition: width 0.3s ease;
      position: relative;
      animation: progressShine 2s ease-in-out infinite;
      box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
    }

    @keyframes progressShine {
      0% {
        background-position: 200% 0;
      }
      100% {
        background-position: -200% 0;
      }
    }

    .loading-progress-text {
      font-size: clamp(12px, 3vw, 13px);
      color: var(--primary);
      font-weight: 600;
      margin-top: clamp(8px, 2vw, 10px);
      text-align: center;
      min-height: 18px;
    }

    .loading-progress-percent {
      font-size: clamp(14px, 3.5vw, 16px);
      font-weight: 700;
      color: var(--primary);
    }

    /* 漂浮聯絡按鈕 */
    .floating-contact-btn {
      position: fixed;
      bottom: clamp(20px, 5vw, 30px);
      right: clamp(16px, 4vw, 24px);
      width: clamp(56px, 14vw, 64px);
      height: clamp(56px, 14vw, 64px);
      background: linear-gradient(135deg, #f59e0b, #d97706);
      border-radius: 50%;
      box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 998;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border: 3px solid rgba(255, 255, 255, 0.9);
      animation: floatPulse 2s infinite;
    }

    .floating-contact-btn:hover {
      transform: scale(1.1) translateY(-2px);
      box-shadow: 0 8px 25px rgba(217, 119, 6, 0.6);
    }

    .floating-contact-btn:active {
      transform: scale(0.95);
    }

    .floating-contact-btn-icon {
      font-size: clamp(24px, 6vw, 28px);
      color: #fff;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    /* Tooltip text */
    .floating-contact-btn::after {
      content: attr(data-label);
      position: absolute;
      right: 120%;
      background: white;
      color: #d97706;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: bold;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      opacity: 0;
      transform: translateX(10px);
      transition: all 0.3s ease;
      pointer-events: none;
      white-space: nowrap;
    }

    .floating-contact-btn:hover::after {
      opacity: 1;
      transform: translateX(0);
    }

    @keyframes floatPulse {
      0% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
      }

      70% {
        box-shadow: 0 0 0 15px rgba(217, 119, 6, 0);
      }

      100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
      }
    }

    /* 聯絡方式對話框 */
    .contact-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .7);
      z-index: 9999;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn .2s ease;
    }

    .contact-modal.active {
      display: flex;
    }

    .contact-modal-content {
      background: #fff;
      border-radius: 16px;
      max-width: 400px;
      width: 100%;
      padding: 0;
      overflow: hidden;
      animation: zoomIn .2s ease;
      box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    }

    .contact-modal-header {
      background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
      color: #fff;
      padding: 16px 20px;
      text-align: center;
      position: relative;
    }

    .contact-modal-header h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 700;
    }

    .contact-modal-close {
      position: absolute;
      top: 12px;
      right: 12px;
      background: rgba(255, 255, 255, .2);
      border: none;
      color: #fff;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s ease;
    }

    .contact-modal-close:hover {
      background: rgba(255, 255, 255, .3);
    }

    .contact-modal-body {
      padding: 20px;
    }

    .contact-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px;
      background: #f9fafb;
      border-radius: 12px;
      margin-bottom: 12px;
      transition: all .2s ease;
    }

    .contact-item:hover {
      background: #f3f4f6;
      transform: translateX(4px);
    }

    .contact-item:last-child {
      margin-bottom: 0;
    }

    .contact-item-icon {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
    }

    .contact-item-line .contact-item-icon {
      background: linear-gradient(135deg, #06c755 0%, #05a844 100%);
      color: #fff;
    }

    .contact-item-phone .contact-item-icon {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
      color: #fff;
    }

    .contact-item-content {
      flex: 1;
    }

    .contact-item-label {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .contact-item-value {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
    }

    .contact-item-link {
      text-decoration: none;
      color: inherit;
      display: block;
      width: 100%;
    }

    /* 📝 商品介紹展開區塊 */
    .product-description-container {
      margin-bottom: clamp(6px, 1.5vw, 8px);
      overflow: hidden;
    }

    .product-description-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-out, padding 0.3s ease-out;
      background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
      border-radius: clamp(6px, 1.5vw, 8px);
      padding: 0 clamp(12px, 3vw, 16px);
    }

    .product-description-content.expanded {
      max-height: 500px;
      padding: clamp(12px, 3vw, 16px);
      border: 1.5px solid var(--primary);
      box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
    }

    .product-description-content .desc-emoji {
      font-size: clamp(32px, 8vw, 40px);
      text-align: center;
      margin-bottom: clamp(8px, 2vw, 10px);
    }

    .product-description-content .desc-title {
      font-size: clamp(16px, 4vw, 18px);
      font-weight: 700;
      color: var(--text);
      text-align: center;
      margin-bottom: clamp(10px, 2.5vw, 12px);
    }

    .product-description-content .desc-text {
      font-size: clamp(13px, 3vw, 14px);
      line-height: 1.8;
      color: #4b5563;
      text-align: justify;
      letter-spacing: 0.3px;
      margin: 0;
    }

    .product-description-btn {
      position: relative;
    }

    .product-description-btn.expanded {
      background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
      border-color: var(--primary) !important;
    }

    .product-description-btn .expand-icon {
      transition: transform 0.3s ease;
      display: inline-block;
      color: var(--primary);
    }

    .product-description-btn.expanded .expand-icon {
      transform: rotate(180deg);
    }

    /* 手機 / 平板觸控尺寸：只放大可點擊控件，不改桌機密度 */
    @media (max-width: 1024px) {
      .display-mode-btn {
        min-width: 44px;
        min-height: 44px;
      }

      .qty-btn {
        width: clamp(36px, 9.5vw, 40px);
        height: clamp(36px, 9.5vw, 40px);
        font-size: clamp(16px, 4vw, 18px);
      }

      .qty-control input {
        width: clamp(36px, 10vw, 42px);
        min-height: 36px;
      }

      .product-description-btn {
        min-height: 44px;
      }

      .footer a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 0 4px;
      }
    }

    @media (max-width: 380px) {
      .qty-btn {
        width: 40px;
        height: 40px;
      }

      .qty-control input {
        width: 36px;
      }
    }
  </style>
