/* WhatsApp chat button (inc/whatsapp.php). Bottom right on every page; lifts above the phone add-to-cart bar. */
.gr-wa { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 95; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; transition: bottom var(--gr-med) var(--gr-ease); pointer-events: none; }
.gr-wa > * { pointer-events: auto; }
body.gr-has-sticky-buy .gr-wa { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { body.gr-has-sticky-buy .gr-wa { bottom: 24px; } .gr-wa { right: 24px; bottom: 24px; } }
body.gr-no-scroll .gr-wa { opacity: 0; visibility: hidden; }

.gr-wa__btn { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px 0 14px; border-radius: var(--gr-r-pill); color: #fff; text-decoration: none;
	background: linear-gradient(135deg, #2bd46b 0%, #1fae55 55%, #128c45 100%); box-shadow: 0 10px 24px rgba(18, 140, 69, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	font: 700 var(--gr-fs-sm) var(--gr-font-head); letter-spacing: 0.01em; transition: transform var(--gr-fast) var(--gr-ease), box-shadow var(--gr-fast) var(--gr-ease); }
.gr-wa__btn:hover, .gr-wa__btn:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(18, 140, 69, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.gr-wa__btn:focus-visible { outline: 3px solid var(--gr-lime); outline-offset: 3px; }
.gr-wa__icon { width: 28px; height: 28px; flex: 0 0 28px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)); }
.gr-wa__ring { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 2px solid rgba(43, 212, 107, 0.7); animation: gr-wa-pulse 2.6s var(--gr-ease) infinite; pointer-events: none; }
@keyframes gr-wa-pulse { 0% { transform: scale(0.9); opacity: 0.9; } 70%, 100% { transform: scale(1.9); opacity: 0; } }

/* A round WhatsApp logo only; the number is in the greeting bubble and the button's label. */
.gr-wa__btn { width: 56px; height: 56px; min-height: 0; padding: 0; justify-content: center; }
.gr-wa__icon { width: 30px; height: 30px; flex-basis: 30px; }
.gr-wa__save { margin: 6px 0 0; font-size: var(--gr-fs-xs); }
.gr-wa__save strong { color: var(--gr-green); white-space: nowrap; }

/* Astra's "back to top" arrow sits just above the WhatsApp button, never on it. */
body #ast-scroll-top { right: 16px; bottom: calc(16px + 56px + 12px + env(safe-area-inset-bottom)); z-index: 94; border-radius: 50%; background-color: var(--gr-green); color: #fff; box-shadow: var(--gr-shadow-raised); }
body.gr-has-sticky-buy #ast-scroll-top { bottom: calc(84px + 56px + 12px + env(safe-area-inset-bottom)); }
body.gr-no-scroll #ast-scroll-top { display: none !important; }
@media (min-width: 600px) { body #ast-scroll-top { bottom: calc(16px + 56px + 12px); } body.gr-has-sticky-buy #ast-scroll-top { bottom: calc(84px + 56px + 12px); } }
@media (min-width: 768px) { body #ast-scroll-top, body.gr-has-sticky-buy #ast-scroll-top { right: 24px; bottom: calc(24px + 56px + 14px); } }

/* Greeting bubble: once per visit, after a short pause (assets/js/whatsapp.js). */
.gr-wa__bubble { position: relative; max-width: 260px; padding: 14px 34px 14px 16px; border-radius: 18px 18px 4px 18px; background: var(--gr-surface); color: var(--gr-ink); box-shadow: var(--gr-shadow-raised); border: 1px solid var(--gr-line);
	font-size: var(--gr-fs-sm); line-height: 1.45; transform-origin: bottom right; animation: gr-wa-in 360ms var(--gr-ease); }
.gr-wa__bubble[hidden] { display: none; }
.gr-wa__bubble::after { content: ""; position: absolute; right: 22px; bottom: -7px; width: 14px; height: 14px; background: var(--gr-surface); border-right: 1px solid var(--gr-line); border-bottom: 1px solid var(--gr-line); transform: rotate(45deg); }
.gr-wa__hi { margin: 0 0 2px; font: 700 var(--gr-fs-base) var(--gr-font-head); color: var(--gr-green); }
.gr-wa__msg { margin: 0; }
.gr-wa__hours { margin: 6px 0 0; font-size: var(--gr-fs-xs); color: var(--gr-ink-soft); }
.gr-wa__close { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--gr-ink-soft); font-size: 20px; line-height: 1; cursor: pointer; }
.gr-wa__close:hover { background: var(--gr-green-50); color: var(--gr-ink); }
@keyframes gr-wa-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }

/* Checkout: "Send my order updates on WhatsApp". */
.gr-wa-optin label { display: flex; align-items: center; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
	.gr-wa__ring { animation: none; opacity: 0; }
	.gr-wa__bubble { animation: none; }
	.gr-wa__btn, .gr-wa { transition: none; }
}
@media print { .gr-wa { display: none; } }
