:root {
      --bg-gradient-start: #ffe8f3;
      --bg-gradient-end:   #e3f2ff;
      --card-bg:           #ffffff;
      --accent-pink:       #f48fb1;
      --accent-pink-soft:  #ffebf2;
      --accent-blue:       #90caf9;
      --accent-blue-soft:  #e3f2fd;
      --text-main:         #333333;
      --text-sub:          #777777;
      --border-soft:       #f1d7e5;
      --radius-lg:         18px;
      --radius-pill:       999px;
      --shadow-soft:       0 14px 36px rgba(0, 0, 0, 0.06);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                   "PingFang TC", "Noto Sans TC", sans-serif;
      background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
      color: var(--text-main);
      min-height: 100vh;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    /* Top Bar -------------------------------------------------- */
    .top-bar {
      width: 100%;
      background: rgba(255, 255, 255, .92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255, 255, 255, .8);
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .top-bar-inner {
      max-width: 1120px;
      margin: 0 auto;
      padding: .6rem 1.2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .top-bar-logo {
      display: flex;
      align-items: center;
      gap: .4rem;
      font-weight: 700;
      letter-spacing: .05em;
      font-size: .98rem;
      color: #cc4778;
    }

    .top-bar-logo-badge {
      width: 28px;
      height: 28px;
      border-radius: 40% 60% 55% 45%;
      background: radial-gradient(circle at 20% 15%, #fff, #f48fb1);
      box-shadow: 0 5px 14px rgba(244, 143, 177, .5);
    }

    .top-bar-nav {
      display: flex;
      align-items: center;
      gap: .65rem;
      font-size: .9rem;
    }

    .top-link {
      padding: .25rem .9rem;
      border-radius: var(--radius-pill);
      border: 1px solid transparent;
      cursor: pointer;
      transition: all .18s ease;
      color: #555;
      white-space: nowrap;
    }

    .top-link:hover {
      background: #ffe4f0;
      border-color: #f8b3cf;
      color: #c62866;
    }

    .top-link-primary {
      background: linear-gradient(120deg, #f48fb1, #90caf9);
      color: #fff;
      box-shadow: 0 8px 18px rgba(244, 143, 177, .45);
    }

    .top-link-primary:hover {
      filter: brightness(1.02);
      box-shadow: 0 10px 22px rgba(244, 143, 177, .6);
    }

    /* Main Layout ---------------------------------------------- */
    .page-wrap {
      max-width: 90%;
      margin: 1.4rem auto 1.8rem;
      padding: 0 1.2rem 1.6rem;
    }

    .page-title {
      margin: 0 0 .6rem;
      font-size: 1.3rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: #b03b6f;
    }

    .page-subtitle {
      margin: 0 0 1rem;
      font-size: .9rem;
      color: var(--text-sub);
    }

    .checkout-shell {
      background: var(--card-bg);
      border-radius: 22px;
      box-shadow: var(--shadow-soft);
      padding: 1.2rem 1.2rem 1.4rem;
    }

    @media (min-width: 992px) {
      .checkout-shell {
        padding: 1.5rem 1.7rem 1.7rem;
      }
    }

    /* Tab Nav -------------------------------------------------- */
    .cart-tabs-nav {
      display: flex;
      flex-wrap: wrap;
      gap: .5rem;
      margin-bottom: .9rem;
      border-bottom: 1px dashed #f0bfd9;
      padding-bottom: .6rem;
    }

    .cart-tab-btn {
      border: none;
      background: transparent;
      cursor: pointer;
      border-radius: 999px;
      padding: .45rem .95rem;
      font-size: .85rem;
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      color: #b15a7f;
      border: 1px solid transparent;
      transition: all .18s ease;
    }

    .cart-tab-btn span.label {
      font-weight: 600;
    }

    .cart-tab-badges {
      display: inline-flex;
      gap: .25rem;
      font-size: .7rem;
    }

    .badge-chip {
      padding: .15rem .5rem;
      border-radius: 999px;
      background: #ffe8f3;
      color: #c2185b;
    }

    .badge-chip.blue {
      background: #e3f2fd;
      color: #1565c0;
    }

    .badge-chip.pill {
      border-radius: 999px;
    }

    .cart-tab-btn:hover {
      background: #fff4fa;
      border-color: #f7b0d0;
    }

    .cart-tab-btn.active {
      background: linear-gradient(120deg, #f48fb1, #90caf9);
      color: #fff;
      border-color: transparent;
      box-shadow: 0 10px 22px rgba(244, 143, 177, .6);
    }

    .cart-tab-btn.active .badge-chip {
      background: rgba(255, 255, 255, .18);
      color: #fff;
    }

    /* Tab Content Layout --------------------------------------- */
    .cart-tab-pane {
      display: none;
      animation: fadeIn .25s ease-out;
    }

    .cart-tab-pane.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(3px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .checkout-layout {
      display: block;
      gap: 1.2rem;
    }

    @media (min-width: 960px) {
      .checkout-layout {
        display: grid;
        grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr);
        align-items: flex-start;
      }
    }

    .checkout-left {
      padding-right: .3rem;
    }

    .checkout-right {
      background: linear-gradient(145deg, #fff7fb, #fdfbff);
      border-radius: 20px;
      border: 1px solid #f5d3e4;
      padding: 1rem;
      position: sticky;
      top: 72px;
    }

    @media (max-width: 959.98px) {
      .checkout-right {
        margin-top: 1rem;
        position: static;
      }
    }

    /* Cart items table ----------------------------------------- */
    .section-title {
      font-size: .95rem;
      font-weight: 600;
      margin: .2rem 0 .6rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #b03b6f;
    }

    .section-title .small {
      font-size: .8rem;
      color: var(--text-sub);
      font-weight: 400;
    }

    .cart-items-table {
      width: 100%;
      border-collapse: collapse;
      background: #fff;
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid #f3d3e4;
      margin-bottom: 1rem;
    }

    .cart-items-table thead {
      background: #fff6fb;
      font-size: .8rem;
      color: #b7688b;
    }

    .cart-items-table th,
    .cart-items-table td {
      padding: .65rem .75rem;
    }

    .cart-items-table th {
      text-align: left;
      font-weight: 600;
      border-bottom: 1px dashed #f3d3e4;
    }

    .cart-items-table td {
      font-size: .85rem;
      vertical-align: top;
      border-bottom: 1px solid #f9e4f0;
    }

    .cart-items-table tr:last-child td {
      border-bottom: none;
    }

    .cart-item-main {
      display: flex;
      align-items: center;
      gap: .6rem;
    }

    .cart-item-thumb {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: #ffe0ef;
      flex-shrink: 0;
      overflow: hidden;
    }

    .cart-item-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .cart-item-info-title {
      font-size: .86rem;
      font-weight: 600;
      margin-bottom: .15rem;
    }

    .cart-item-info-meta {
      font-size: .75rem;
      color: var(--text-sub);
    }

    .cart-item-tag {
      display: inline-block;
      margin-top: .15rem;
      font-size: .7rem;
      padding: .1rem .4rem;
      border-radius: 999px;
      background: #fff1f8;
      color: #c2185b;
    }

    .text-right {
      text-align: right;
    }

    .text-muted {
      color: var(--text-sub);
    }

    .price {
      font-weight: 600;
    }

    .cart-qty-input {
      width: 54px;
      padding: .25rem .4rem;
      border-radius: 999px;
      border: 1px solid #f0c9de;
      font-size: .8rem;
      text-align: center;
      outline: none;
    }

    .cart-qty-input:focus {
      border-color: #f48fb1;
      box-shadow: 0 0 0 2px rgba(244, 143, 177, .18);
    }

    /* Form blocks ---------------------------------------------- */
    .form-grid-two {
      display: grid;
      grid-template-columns: 1fr;
      gap: .7rem;
      margin-bottom: .9rem;
    }

    @media (min-width: 768px) {
      .form-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .form-group {
      margin-bottom: .7rem;
    }

    .form-label {
      display: block;
      font-size: .78rem;
      margin-bottom: .15rem;
      color: #b15a7f;
      font-weight: 500;
    }

    .form-label span.required {
      color: #e53935;
      margin-left: .2rem;
    }

    .form-control,
    .form-select {
      width: 100%;
      padding: .45rem .65rem;
      border-radius: 999px;
      border: 1px solid #f0c9de;
      font-size: .82rem;
      outline: none;
      background-color: #fff;
      transition: all .16s ease;
    }

    .form-control:focus,
    .form-select:focus {
      border-color: #f48fb1;
      box-shadow: 0 0 0 2px rgba(244, 143, 177, .18);
    }

    .form-textarea {
      border-radius: 14px;
      min-height: 84px;
      resize: vertical;
    }

    /* Payment methods row -------------------------------------- */
    .payment-row {
      display: flex;
      flex-wrap: wrap;
      gap: .5rem;
      margin-bottom: .7rem;
    }

    .pill-option {
      padding: .35rem .85rem;
      border-radius: 999px;
      border: 1px solid #f0c9de;
      font-size: .8rem;
      cursor: pointer;
      background: #fff;
      color: #b15a7f;
      transition: all .16s ease;
    }

    .pill-option.active {
      background: linear-gradient(120deg, #f48fb1, #90caf9);
      color: #fff;
      border-color: transparent;
      box-shadow: 0 6px 14px rgba(244, 143, 177, .5);
    }

    .pill-option:hover {
      border-color: #f48fb1;
    }

    /* Summary panel -------------------------------------------- */
    .summary-title {
      font-size: .92rem;
      font-weight: 600;
      margin-bottom: .4rem;
      color: #b03b6f;
    }

    .summary-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: .15rem;
      font-size: .83rem;
    }

    .summary-row.muted {
      color: var(--text-sub);
    }

    .summary-row.total {
      margin-top: .3rem;
      padding-top: .35rem;
      border-top: 1px dashed #f0c9de;
      font-weight: 700;
      font-size: .95rem;
      color: #b03b6f;
    }

    .summary-points {
      margin-top: .4rem;
      padding: .45rem .6rem;
      border-radius: 12px;
      background: #fff7fb;
      font-size: .78rem;
      color: #c2185b;
    }

    .summary-points span.value {
      font-weight: 600;
    }

    .btn-checkout {
      margin-top: .8rem;
      width: 100%;
      padding: .6rem 1rem;
      border-radius: 999px;
      border: none;
      font-size: .9rem;
      font-weight: 600;
      cursor: pointer;
      background: linear-gradient(120deg, #f48fb1, #90caf9);
      color: #fff;
      box-shadow: 0 12px 24px rgba(244, 143, 177, .65);
      transition: all .16s ease;
    }

    .btn-checkout:hover {
      filter: brightness(1.03);
      box-shadow: 0 14px 28px rgba(244, 143, 177, .75);
      transform: translateY(-1px);
    }

    .btn-checkout:active {
      transform: translateY(0);
      box-shadow: 0 10px 20px rgba(244, 143, 177, .6);
    }

    .summary-hint {
      margin-top: .4rem;
      font-size: .72rem;
      color: var(--text-sub);
      line-height: 1.4;
    }


    /* 頂端漸層區塊 */
    .site-header {
      width: 100%;
      background: linear-gradient(90deg, #ffd6e9 0%, #f0dafc 35%, #d8e7ff 100%);
      box-shadow: 0 6px 20px rgba(134, 87, 167, 0.18);
      position: sticky;          /* 若不想固定在上方就改成 static */
      top: 0;
      z-index: 100;
    }

    .header-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 12px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* 左側 logo 區 */
    .logo-area {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .logo-ball {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      background: radial-gradient(circle at 30% 20%, #ffffff 0, #ffe0f0 35%, #f1c3ff 70%, #e1f0ff 100%);
      box-shadow:
        0 6px 18px rgba(161, 99, 187, 0.5),
        0 0 0 8px rgba(255, 255, 255, 0.4);
    }

    .logo-text {
      font-size: 18px;
      font-weight: 600;
      letter-spacing: .03em;
      color: #7a2285;
    }

    /* 右側導覽按鈕 */
    .header-nav {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .nav-link {
      font-size: 14px;
      padding: 6px 18px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.72);
      color: #555;
      text-decoration: none;
      box-shadow: 0 4px 12px rgba(140, 108, 170, 0.25);
      transition: all 0.18s ease-out;
      backdrop-filter: blur(10px);
    }

    .nav-link:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(140, 108, 170, 0.4);
    }

    /* 目前所在頁：會員中心（粉紫漸層膠囊） */
    .nav-link-primary {
      background: linear-gradient(135deg, #ff7ccc 0%, #e17bff 45%, #7b8dff 100%);
      color: #fff;
      font-weight: 600;
    }

    /* 手機版調整 */
    @media (max-width: 768px) {
      .header-inner {
        padding: 10px 12px;
      }

      .logo-text {
        font-size: 16px;
      }

      .header-nav {
        gap: 6px;
      }

      .nav-link {
        padding: 5px 12px;
        font-size: 13px;
      }
    }

    /* 頂部漸層區塊 */
    .lc-header {
      width: 100%;
      background: linear-gradient(90deg, #ffd4ec 0%, #ebd7ff 50%, #cfe5ff 100%);
      box-shadow: 0 4px 16px rgba(158, 91, 181, 0.18);
    }

    /* 讓內容置中，右邊留一點 padding 不貼邊 */
    .lc-header-inner {
      max-width: 100%;      /* 可依版寬調整 */
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 24px;     /* ← 這裡是左右邊界空間 */
    }

    /* 左邊 logo 區 */
    .lc-logo {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .lc-logo-bubble {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background: radial-gradient(circle at 30% 20%, #ffffff, #ffd0ff 40%, #b7d3ff 100%);
      box-shadow: 0 6px 18px rgba(204, 120, 214, 0.55);
    }

    .lc-logo-text {
      font-size: 20px;
      font-weight: 700;
      letter-spacing: 0.03em;
      color: #7c1f80;
    }

    /* 右邊導覽按鈕：靠右排列，與右邊保持一點距離 */
    .lc-nav {
      margin-left: auto;        /* 把 nav 推到最右側 */
      display: flex;
      gap: 12px;
    }

    /* 導覽按鈕外觀 */
    .lc-nav-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 76px;
      padding: 8px 18px;
      border-radius: 999px;
      font-size: 14px;
      border: none;
      background: #ffffff;
      color: #5c4a68;
      text-decoration: none;
      box-shadow: 0 4px 12px rgba(150, 120, 190, 0.25);
      transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    }

    .lc-nav-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(150, 120, 190, 0.35);
    }

    /* 會員中心高亮 */
    .lc-nav-btn-primary {
      background: linear-gradient(135deg, #ff6bb8 0%, #b16bff 100%);
      color: #ffffff;
    }