/* Custom Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f2;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f2;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #FE2C55;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

:root {
  --red: #FE2C55;
  --ink: #161823;
  --muted: #8A8A8A
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.4
}

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

.top {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 20px
}

.top .logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--ink)
}

.top .logo span {
  color: var(--red)
}

.search {
  flex: 1;
  max-width: 780px;
  background: #F1F1F2;
  border-radius: 999px;
  height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden
}

.search span {
  padding-left: 16px;
  display: inline-flex
}

.search span svg {
  width: 19px;
  height: 19px
}

.search input {
  flex: 1;
  border: none;
  background: transparent;
  height: 44px;
  padding: 0 10px;
  font-size: 15px;
  outline: none
}

.search b {
  border-left: 1px solid #ddd;
  padding: 4px 20px 4px 16px;
  font-size: 15px;
  cursor: pointer
}

.pinkpill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #FEF0F2;
  color: var(--red);
  font-weight: 600;
  font-size: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap
}

.pinkpill svg {
  width: 22px;
  height: 22px
}

.cart {
  position: relative;
  width: 34px;
  height: 34px;
  cursor: pointer
}

.cart svg {
  width: 30px;
  height: 30px
}

.cart i {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--red);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-weight: 700
}

.layout {
  display: flex;
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 40px 60px;
  align-items: flex-start
}

.side {
  flex: none;
  width: 262px;
  position: sticky;
  top: 76px;
  padding: 22px 8px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: calc(100vh - 76px)
}

.side>a {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 18px;
  font-weight: 700;
  padding: 11px 0;
  line-height: 1.2
}

.side>a.active {
  color: var(--red)
}

.side>a svg {
  width: 26px;
  height: 26px
}

.sfoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.sfoot a {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 40px;
  padding-top: 10px
}

.col {
  flex: 1;
  min-width: 0
}

h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 14px 0 20px
}

.selall {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--ink)
}

.chk {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none
}

.chk.on {
  background: var(--red);
  border-color: var(--red)
}

.chk.on:after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 800
}

.itcard {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, .08);
  padding: 20px;
  margin-bottom: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start
}

.itcard img.th {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: #f4f4f5;
  flex: none
}

.itbody {
  flex: 1;
  min-width: 0
}

.itname {
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35
}

.itfree {
  color: #0a8f4c;
  font-size: 14px;
  margin-top: 6px;
  font-weight: 500
}

.itlim {
  color: #8A8A8A;
  font-size: 13px;
  margin-top: 3px
}

.itrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px
}

.stepper {
  display: inline-flex;
  align-items: center;
  background: #F1F1F2;
  border-radius: 10px
}

.stepper button {
  width: 38px;
  height: 34px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink)
}

.stepper span {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 15px
}

.trash {
  background: none;
  border: none;
  cursor: pointer;
  color: #666
}

.trash svg {
  width: 20px;
  height: 20px
}

.itprice {
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap
}

.itprice sup {
  font-size: 12px
}

.empty {
  padding: 40px 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px
}

.sumcol {
  flex: none;
  width: 330px
}

.sum h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 18px 0 18px
}

.sum .r {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px
}

.sum .r b {
  font-weight: 600
}

.sum .free {
  color: #0a8f4c
}

.sum .tot {
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 14px;
  font-size: 17px;
  font-weight: 800
}

.sum .tot b {
  font-size: 20px
}

.ckbtn {
  width: 100%;
  margin-top: 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer
}

.form {
  margin-top: 26px
}

.form h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px
}

.form input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  margin-bottom: 10px;
  outline: none
}

.form input:focus {
  border-color: var(--red)
}

.frow {
  display: flex;
  gap: 10px
}

.frow input {
  flex: 1;
  min-width: 0
}

.paynote {
  background: #F6F5F2;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #555;
  margin: 4px 0 12px;
  line-height: 1.4
}

#done {
  display: none;
  margin-top: 12px;
  background: #EAF8F0;
  color: #0a8f4c;
  font-weight: 700;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px
}

@media(max-width:1000px){
  .side {
    position: fixed;
    /* Base .side is sticky with top:76px. Switching to fixed does NOT clear that, and for a
       fixed box with an explicit height `top` beats `bottom` — so this "bottom tab bar"
       actually rendered pinned directly under the header, covering the cart contents. */
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #f0f0f2;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .side>a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    gap: 3px;
    color: #161823;
    padding: 6px 0;
    text-align: center;
    line-height: 1.1;
  }
  /* "Become An<br>Affiliate" — hiding the <br> welds the two text nodes into
     "Become AnAffiliate" (CSS cannot re-insert the whitespace). The 64px bar fits two
     10px lines, so let it wrap the way the markup intends. */
  .side>a br {
    display: inline;
  }
  .side>a svg {
    width: 22px;
    height: 22px;
  }
  .side>a.active {
    color: var(--red);
  }
  .sfoot {
    display: none;
  }
  .layout {
    padding: 0 14px calc(80px + env(safe-area-inset-bottom));
  }
  .main {
    flex-direction: column;
    gap: 8px;
  }
  .sumcol {
    width: 100%;
  }
}

.billtog {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--ink);
  margin: 4px 0 12px;
  cursor: pointer;
  line-height: 1.4
}

.billtog input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--red)
}

.form select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  margin-bottom: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238A8A8A' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center
}

.frow select {
  flex: 1;
  min-width: 0
}

.form select:invalid {
  color: #8A8A8A
}

.cardwrap {
  position: relative
}

.cardwrap input {
  padding-right: 78px
}

.cardbrand {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
  display: none
}

.fdealpill {
  display: inline-block;
  background: #FEF0F2;
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 7px
}

.fdealmsg {
  color: #0a8f4c;
  font-weight: 700;
  font-size: 13px;
  margin-top: 5px
}

.itwas {
  color: #B5B5BC;
  text-decoration: line-through;
  font-weight: 600;
  font-size: 14px;
  margin-right: 7px
}

/* Custom Error Banner & Modal */
.error-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #FFF0F2;
  color: #FE2C55;
  border-bottom: 2px solid #FFD3D9;
  padding: 14px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(254, 44, 85, 0.15);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.error-banner.show {
  transform: translateY(0);
}

.error-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 24, 35, 0.45);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.error-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.error-modal {
  background: #ffffff;
  border-radius: 24px;
  width: 90%;
  max-width: 420px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.error-modal-overlay.show .error-modal {
  transform: scale(1);
}

.error-modal-icon {
  width: 60px;
  height: 60px;
  background: #FFF0F2;
  color: #FE2C55;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: shake 0.5s ease;
}

.error-modal-icon svg {
  width: 32px;
  height: 32px;
}

.error-modal h2 {
  font-size: 22px;
  font-weight: 800;
  color: #161823;
  margin-bottom: 12px;
}

.error-modal p {
  font-size: 15px;
  color: #55555d;
  line-height: 1.6;
  margin-bottom: 24px;
}

.error-modal-btn {
  width: 100%;
  background: #FE2C55;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.error-modal-btn:hover {
  background: #e02447;
}

.error-modal-btn:active {
  transform: scale(0.98);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}
/* ── Phone layout (2026-08-03) ─────────────────────────────────────────────
   The only breakpoint here was 1000px, which swaps the sidebar for a bottom
   tab bar but leaves the header at desktop metrics — on a 390px phone the
   logo + search + Free Shipping pill + cart overflow the row and the search
   field collapses to a sliver. Below 560 the pill drops (it is decorative,
   the same promise is repeated in the order summary) and everything tightens. */
@media(max-width:560px) {
  .top {
    padding: 10px 12px;
    gap: 10px
  }
  .top .logo {
    font-size: 17px;
    flex: none;
    white-space: nowrap
  }
  .pinkpill {
    display: none
  }
  .search {
    height: 38px
  }
  .search span {
    padding-left: 12px
  }
  /* 15px triggers iOS's focus-zoom; 16px is the threshold that suppresses it. */
  .search input {
    height: 38px;
    font-size: 16px;
    padding: 0 8px
  }
  .search b {
    padding: 4px 12px 4px 10px;
    font-size: 14px
  }
  .cart {
    width: 28px;
    height: 28px;
    flex: none
  }
  .cart svg {
    width: 26px;
    height: 26px
  }
  .layout {
    padding: 0 12px calc(80px + env(safe-area-inset-bottom))
  }
  h1 {
    font-size: 22px;
    margin: 10px 0 14px
  }
  .selall {
    font-size: 15px;
    margin-bottom: 12px
  }
  .sum h2 {
    font-size: 19px;
    margin: 14px 0 14px
  }
  .sum .r {
    font-size: 14.5px
  }
  h3 {
    font-size: 15px
  }
  .paynote {
    font-size: 12px
  }
}

/* Narrowest phones: the Search button costs ~62px the input needs more. Enter
   still submits, and the magnifier stays as the affordance. */
@media(max-width:390px) {
  .search b {
    display: none
  }
  .top .logo {
    font-size: 16px
  }
}
