/*
 * Cart drawer + add-to-cart toast for guatemalascoffee.com.
 * Site tokens from the Webflow stylesheet: --guate-green #203524, --burlywood #dabd73 (gold),
 * --guate-black #202016, --white-smoke / --cream #f7f6f2, --antique-white #e2d9c7, --dim-grey #656565.
 * 8px spacing grid, 12–16px radii, 250ms ease.
 */
#gc-cart { position: fixed; inset: 0; z-index: 10000; pointer-events: none; font-family: Lato, sans-serif; color: var(--guate-black, #202016); font-size: 15px; line-height: 1.4; }
#gc-cart.is-open { pointer-events: auto; }
#gc-cart .gc-backdrop { position: absolute; inset: 0; background: rgba(32, 32, 22, .5); opacity: 0; transition: opacity 250ms ease; }
#gc-cart.is-open .gc-backdrop { opacity: 1; }
#gc-cart .gc-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100vw); background: var(--cream, #f7f6f2); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(32, 32, 22, .18); transform: translateX(100%); transition: transform 250ms ease; outline: none; }
#gc-cart.is-open .gc-panel { transform: none; }
@media (prefers-reduced-motion: reduce) { #gc-cart .gc-panel, #gc-cart .gc-backdrop { transition: none; } }

.gc-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 16px; }
.gc-head h2 { margin: 0; font-family: 'Arbour soft', 'Josefin Sans', Lato, sans-serif; font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: 1px; color: var(--guate-green, #203524); }
.gc-head .gc-count { display: inline-block; margin-left: 10px; font-family: Lato, sans-serif; font-size: 13px; font-weight: 300; color: var(--dim-grey, #656565); letter-spacing: 0; vertical-align: 4px; }
.gc-close { background: none; border: 0; width: 40px; height: 40px; margin-right: -8px; border-radius: 50%; cursor: pointer; color: var(--guate-black, #202016); font-size: 26px; line-height: 1; display: grid; place-items: center; transition: background 150ms; }
.gc-close:hover, .gc-close:focus-visible { background: var(--antique-white, #e2d9c7); outline: none; }

.gc-body { flex: 1; overflow-y: auto; padding: 0 24px 24px; -webkit-overflow-scrolling: touch; }

/* free shipping progress */
.gc-ship { margin: 0 0 8px; font-size: 13px; color: var(--guate-black, #202016); }
.gc-ship strong { font-weight: 700; }
.gc-ship-bar { height: 4px; margin: 8px 0 16px; border-radius: 999px; background: var(--antique-white, #e2d9c7); overflow: hidden; }
.gc-ship-bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--guate-green, #203524); transition: width 400ms ease; }
.gc-ship.is-free { color: var(--guate-green, #203524); }
.gc-ship.is-free .gc-ship-bar > span { width: 100% !important; }

/* lines */
.gc-line { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--antique-white, #e2d9c7); }
.gc-line:first-of-type { border-top: 0; }
.gc-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #fff; }
.gc-thumb.is-empty { display: grid; place-items: center; color: var(--dim-grey); font-size: 11px; }
.gc-line-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gc-line-name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--guate-black, #202016); }
.gc-line-opts { margin: 2px 0 0; font-size: 13px; font-weight: 300; color: var(--dim-grey, #656565); }
.gc-line-sub { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--guate-green, #203524); }
.gc-line-note { margin: 6px 0 0; font-size: 12.5px; color: var(--dim-grey, #656565); font-style: italic; white-space: pre-wrap; }
.gc-line-price { font-weight: 700; font-size: 15px; white-space: nowrap; text-align: right; }
.gc-line-price small { display: block; font-weight: 300; font-size: 12px; color: var(--dim-grey, #656565); }
.gc-line-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.gc-qty { display: inline-flex; align-items: center; height: 36px; padding: 0 4px; border-radius: 999px; background: #fff; border: 1px solid var(--antique-white, #e2d9c7); }
.gc-qty button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--guate-green, #203524); border-radius: 50%; }
.gc-qty button:hover, .gc-qty button:focus-visible { background: var(--cream, #f7f6f2); outline: none; }
.gc-qty output { min-width: 28px; text-align: center; font-size: 14px; font-weight: 700; }
.gc-remove { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 12.5px; color: var(--dim-grey, #656565); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gc-remove:hover { color: var(--crimson, #c23343); }

/* gift toggle */
.gc-gift { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--antique-white, #e2d9c7); }
.gc-gift-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.gc-gift-row span { font-size: 14px; font-weight: 700; }
.gc-gift-row small { display: block; font-weight: 300; font-size: 12px; color: var(--dim-grey, #656565); }
.gc-switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: var(--antique-white, #e2d9c7); transition: background 200ms ease; }
.gc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform 200ms ease; }
.gc-gift input:checked + .gc-switch { background: var(--guate-green, #203524); }
.gc-gift input:checked + .gc-switch::after { transform: translateX(18px); }
.gc-gift input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gc-gift input:focus-visible + .gc-switch { outline: 3px solid var(--burlywood, #dabd73); outline-offset: 2px; }
.gc-gift textarea { display: none; width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--antique-white, #e2d9c7); font: inherit; font-size: 14px; resize: vertical; min-height: 64px; }
.gc-gift.is-on textarea { display: block; }

.gc-empty { text-align: center; padding: 72px 12px; color: var(--dim-grey, #656565); }
.gc-empty p { margin: 0 0 20px; font-size: 16px; font-weight: 300; }
.gc-pill-link { display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--guate-green, #203524); color: #f7f6f2; text-decoration: none; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; }

/* footer */
.gc-foot { background: var(--cream, #f7f6f2); padding: 12px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--antique-white, #e2d9c7); }
.gc-promo { display: flex; gap: 8px; margin-bottom: 12px; }
.gc-promo input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--antique-white, #e2d9c7); background: #fff; font: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.gc-promo input::placeholder { text-transform: none; letter-spacing: 0; }
.gc-promo input:focus { outline: none; border-color: var(--guate-green, #203524); }
.gc-promo button { height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--guate-black, #202016); color: #fff; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.gc-promo button:hover { background: var(--guate-green, #203524); }
.gc-promo-msg { font-size: 12.5px; margin: -4px 0 10px; }
.gc-promo-msg.ok { color: var(--guate-green, #203524); font-weight: 700; }
.gc-promo-msg.bad { color: var(--crimson, #c23343); }
.gc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; padding: 3px 0; }
.gc-row .gc-muted { color: var(--dim-grey, #656565); font-weight: 300; }
.gc-row.gc-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--antique-white, #e2d9c7); font-size: 17px; font-weight: 700; }
.gc-row.gc-total small { display: block; font-size: 11.5px; font-weight: 300; color: var(--dim-grey, #656565); text-align: right; }
.gc-checkout-btn { display: block; width: 100%; height: 54px; margin-top: 14px; border: 0; border-radius: 999px; background: var(--guate-green, #203524); color: #f7f6f2; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; transition: transform 120ms ease, filter 150ms ease; }
.gc-checkout-btn:hover { filter: brightness(1.15); }
.gc-checkout-btn:active { transform: translateY(1px); }
.gc-checkout-btn:disabled { opacity: .45; cursor: default; filter: none; }
.gc-checkout-btn:focus-visible { outline: 3px solid var(--burlywood, #dabd73); outline-offset: 2px; }
.gc-secure { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: var(--dim-grey, #656565); font-weight: 300; }
.gc-error { color: var(--crimson, #c23343); font-size: 13px; margin: 6px 0 0; }
.gc-loading { color: var(--dim-grey); font-size: 13px; font-weight: 300; }

/* toast */
#gc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 10001; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--guate-black, #202016); color: #fff; font-family: Lato, sans-serif; font-size: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity 250ms ease, transform 250ms ease; max-width: calc(100vw - 32px); }
#gc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#gc-toast img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
#gc-toast .gc-toast-text { min-width: 0; }
#gc-toast .gc-toast-text strong { display: block; font-weight: 700; white-space: nowrap; }
#gc-toast .gc-toast-text span { display: block; font-weight: 300; font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#gc-toast button { margin-left: 4px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--burlywood, #dabd73); color: var(--guate-black, #202016); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; white-space: nowrap; }

html.gc-cart-open { overflow: hidden; }

@media (max-width: 479px) {
  #gc-cart .gc-panel { width: 100vw; }
  .gc-head { padding: 20px 20px 12px; }
  .gc-head h2 { font-size: 26px; }
  .gc-body { padding: 0 20px 20px; }
  .gc-foot { padding-left: 20px; padding-right: 20px; }
}
/* iOS Safari zooms the page when a focused field is under 16px; keep cart fields at 16px on phones. */
@media (max-width: 767px) { .gc-promo input, .gc-gift textarea { font-size: 16px; } }
