/* ===== Welcome popup, phone tab bar, WhatsApp button ===== */
:root { --cg-tab-h: 62px; }

/* Tab bar (phones only) */
.cg-tabbar { display: none; }
.cg-wa { position: fixed; inset-inline-end: 16px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); z-index: 70; }
.cg-wa svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .cg-tabbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 80; height: calc(var(--cg-tab-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--cg-line); box-shadow: 0 -10px 26px -18px rgba(29,43,39,.5); }
  .cg-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #4a5551; text-decoration: none; font-size: 11px; line-height: 1; -webkit-tap-highlight-color: transparent; }
  .cg-tab__ic { position: relative; display: flex; }
  .cg-tab__ic .cg-cart-count { position: absolute; top: -7px; inset-inline-end: -9px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--cg-brass); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
  .cg-tab.is-on { color: var(--cg-ink); font-weight: 700; }
  .cg-tab.is-on .cg-tab__ic svg { stroke-width: 2.1; color: var(--cg-brass); }
  /* The bar sits at the bottom; give the page room and lift other bottom bars above it */
  body.cg { padding-bottom: calc(var(--cg-tab-h) + env(safe-area-inset-bottom, 0px)); }
  body.cg .cg-sortbar { bottom: calc(var(--cg-tab-h) + env(safe-area-inset-bottom, 0px)); }
  body.cg.cg-has-sortbar { padding-bottom: calc(var(--cg-tab-h) + 56px + env(safe-area-inset-bottom, 0px)); }
  .cg-wa { bottom: calc(var(--cg-tab-h) + 16px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; }
  body.cg-has-sortbar .cg-wa { bottom: calc(var(--cg-tab-h) + 72px); }
  .cg-toast { bottom: calc(var(--cg-tab-h) + 24px); }
  /* Product pages keep their own pinned buy bar instead; checkout stays distraction-free */
  body.single-product .cg-tabbar, body.woocommerce-checkout .cg-tabbar { display: none; }
  body.single-product.cg, body.woocommerce-checkout.cg { padding-bottom: 76px; }
  body.single-product .cg-wa { bottom: 92px; }
  body.woocommerce-checkout .cg-wa { display: none; }
}

/* Welcome popup */
.cg-pop { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .25s ease; }
.cg-pop[hidden] { display: none; }
.cg-pop.is-in { opacity: 1; }
.cg-pop__bg { position: absolute; inset: 0; background: rgba(14,22,19,.62); }
.cg-pop__card { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--cg-bg); border-radius: 20px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); transform: translateY(14px) scale(.98); transition: transform .3s ease; }
.cg-pop.is-in .cg-pop__card { transform: none; }
.cg-pop__x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--cg-ink); font-size: 15px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px -4px rgba(0,0,0,.4); }
.cg-pop__img { position: relative; height: 150px; overflow: hidden; background: var(--cg-sand); }
.cg-pop__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-pop__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--cg-bg) 0%, rgba(250,246,239,0) 55%); }
.cg-pop__body { padding: 4px 28px 26px; text-align: center; margin-top: -14px; position: relative; z-index: 1; }
.cg-pop .cg-eyebrow { color: var(--cg-brass); }
body.cg .cg-pop h2 { font-size: 26px; line-height: 1.2; margin: 8px 0 8px; color: var(--cg-ink); }
.cg-pop p { margin: 0 0 16px; color: var(--cg-muted); font-size: 15px; line-height: 1.55; }
.cg-pop__form { display: grid; gap: 10px; }
.cg-pop__form input[type="email"] { width: 100%; height: 50px; border: 1px solid var(--cg-line); border-radius: 10px; padding: 0 16px; font: 400 16px "Roboto", system-ui, sans-serif; background: #fff; color: var(--cg-ink); text-align: start; }
.cg-pop__form input[type="email"]:focus { outline: 2px solid var(--cg-brass); outline-offset: 1px; border-color: var(--cg-brass); }
.cg-pop__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cg-pop__form .cg-btn { width: 100%; height: 50px; border-radius: 10px; font-size: 16px; background: var(--cg-ink); }
.cg-pop__form .cg-btn:hover { background: var(--cg-brass); }
.cg-pop__form .cg-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.cg-pop__msg { min-height: 20px; margin: 0 !important; font-size: 14px !important; color: var(--cg-muted); }
.cg-pop__msg.is-err { color: var(--cg-sale, #b3261e); }
.cg-pop small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--cg-muted); }
.cg-pop small a { color: var(--cg-brass); }
.cg-pop__done[hidden], .cg-pop__form-wrap[hidden] { display: none; }
.cg-code--pop { display: block; width: 100%; margin: 4px 0 14px; padding: 14px 10px; font-size: 28px; letter-spacing: 3px; background: #fff; color: var(--cg-ink); border: 2px dashed var(--cg-brass); border-radius: 12px; }
.cg-code--pop:hover { background: var(--cg-sand); }
.cg-pop__done .cg-btn { width: 100%; text-align: center; border-radius: 10px; padding: 14px; }
body.cg-pop-open { overflow: hidden; }
@media (max-width: 480px) { .cg-pop { align-items: flex-end; padding: 0; } .cg-pop__card { border-radius: 22px 22px 0 0; max-width: none; } .cg-pop__body { padding-inline: 22px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .cg-pop, .cg-pop__card { transition: none; } }

/* Updates club: smaller, subtler on phones (bottom drawer, no photo) and a floating pill */
.cg-pop-pill { position: fixed; z-index: 85; inset-inline-start: 16px; bottom: calc(var(--cg-tab-h) + 14px + env(safe-area-inset-bottom, 0px)); display: none; align-items: center; background: var(--cg-ink); color: #fff; border-radius: 999px; box-shadow: 0 12px 28px -10px rgba(0,0,0,.55); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.cg-pop-pill.is-in { opacity: 1; transform: none; }
.cg-pop-pill[hidden] { display: none !important; }
.cg-pop-pill__open { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: #fff; font: 500 14px "Roboto", system-ui, sans-serif; padding: 11px 6px 11px 16px; cursor: pointer; }
.cg-pop-pill__open svg { color: #e6c982; }
.cg-pop-pill__x { border: 0; background: none; color: rgba(255,255,255,.75); font-size: 13px; padding: 11px 14px 11px 8px; cursor: pointer; }
@media (max-width: 900px) {
  .cg-pop-pill { display: flex; }
  body.single-product .cg-pop-pill { bottom: 92px; }
  body.cg-has-sortbar .cg-pop-pill { bottom: calc(var(--cg-tab-h) + 70px); }
}
@media (max-width: 480px) {
  .cg-pop__img { display: none; }
  .cg-pop__body { margin-top: 0; padding-top: 22px; }
  .cg-pop__bg { background: rgba(14,22,19,.45); }
  .cg-pop__card { border-top: 3px solid var(--cg-brass); }
  .cg-pop__x { top: 10px; background: var(--cg-sand); box-shadow: none; }
  body.cg .cg-pop h2 { font-size: 23px; padding-inline: 18px; }
}
.cg-pop__mailed { color: var(--cg-ink) !important; font-weight: 500; margin-bottom: 8px !important; }
.cg-pop__mailed[hidden] { display: none; }

/* The shop name is written SneekUp (capital S and U), not all capitals */
body.cg .cg-logo, .cg-footer .cg-logo { text-transform: none !important; letter-spacing: .4px; font-weight: 600; font-size: 28px; }
@media (max-width: 900px) { body.cg .cg-logo { font-size: 25px; letter-spacing: .2px; } }
