/* Green Robo Shop */
:root {
	--grs-green: #0ea472;
	--grs-green-dark: #0b7d57;
	--grs-green-soft: #e8f7f0;
	--grs-yellow: #f5b301;
	--grs-yellow-dark: #dba000;
	--grs-ink: #10231d;
	--grs-muted: #5d6d67;
	--grs-line: #e3ebe7;
	--grs-bg: #ffffff;
	--grs-soft: #f6faf8;
	--grs-red: #d64545;
	--grs-radius: 12px;
}

.grs-buy, .grs-page, .grs-drawer, .grs-fab, .grs-toast { font-family: inherit; color: var(--grs-ink); box-sizing: border-box; }
.grs-buy *, .grs-page *, .grs-drawer * { box-sizing: border-box; }

/* Nút */
.grs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 20px; border-radius: var(--grs-radius);
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none !important;
	cursor: pointer; border: 2px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.grs-btn:active { transform: translateY(1px); }
.grs-btn--primary { background: var(--grs-yellow); color: #1a1400 !important; border-color: var(--grs-yellow); }
.grs-btn--primary:hover { background: var(--grs-yellow-dark); border-color: var(--grs-yellow-dark); }
.grs-btn--outline { background: #fff; color: var(--grs-green-dark) !important; border-color: var(--grs-green); }
.grs-btn--outline:hover { background: var(--grs-green-soft); }
.grs-btn--block { width: 100%; }
.grs-btn:disabled { opacity: .6; cursor: wait; }
.grs-btn:focus-visible, .grs-qty__btn:focus-visible { outline: 3px solid rgba(14,164,114,.35); outline-offset: 2px; }

/* Khối mua hàng trên trang sản phẩm */
.grs-buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; width: 100%; margin: 4px 0 12px; }
.grs-buy .grs-btn { flex: 1 1 150px; }
.grs-buy--off { display: block; }
.grs-soldout { display: inline-block; padding: 10px 14px; border-radius: var(--grs-radius); background: var(--grs-soft); color: var(--grs-muted); font-weight: 600; }

.grs-qty { display: inline-flex; flex-shrink: 0; align-items: center; border: 1px solid var(--grs-line); border-radius: var(--grs-radius); background: #fff; height: 48px; overflow: hidden; flex: 0 0 auto; }
.grs-qty__btn { flex: 0 0 40px; width: 40px; min-width: 40px; height: 100%; border: 0; background: transparent; font-size: 20px; color: var(--grs-ink); cursor: pointer; padding: 0; line-height: 1; }
.grs-qty__btn:hover { background: var(--grs-soft); }
.grs-qty__input { flex: 0 0 44px; width: 44px !important; min-width: 44px; height: 100%; border: 0 !important; text-align: center; font: inherit; font-weight: 600; padding: 0 !important; background: transparent; -moz-appearance: textfield; box-shadow: none !important; }
.grs-qty__input::-webkit-outer-spin-button, .grs-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Icon giỏ hàng */
.grs-cart-icon { position: relative; display: inline-flex; color: var(--grs-green); text-decoration: none; }
.grs-count { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--grs-yellow); color: #1a1400; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.grs-count.is-empty { display: none; }

.grs-fab {
	position: fixed; right: 20px; bottom: 96px; z-index: 9990;
	width: 56px; height: 56px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--grs-green); color: #fff !important; box-shadow: 0 8px 24px rgba(16,35,29,.22);
	text-decoration: none;
}
.grs-fab[hidden] { display: none; }
.grs-fab .grs-count { top: 2px; right: 2px; }

/* Ngăn kéo */
.grs-drawer { position: fixed; inset: 0; z-index: 99999; }
.grs-drawer[hidden] { display: none; }
.grs-drawer__backdrop { position: absolute; inset: 0; background: rgba(16,35,29,.45); opacity: 0; transition: opacity .2s; }
.grs-drawer__panel {
	position: absolute; top: 0; right: 0; height: 100%; width: min(400px, 100%);
	background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease;
	box-shadow: -12px 0 32px rgba(0,0,0,.12);
}
.grs-drawer.is-open .grs-drawer__backdrop { opacity: 1; }
.grs-drawer.is-open .grs-drawer__panel { transform: none; }
.grs-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--grs-line); }
.grs-drawer__head strong { color: var(--grs-green-dark); }
.grs-drawer__x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--grs-muted); padding: 4px 8px; }
.grs-drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.grs-drawer__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--grs-line); }
.grs-mini { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--grs-line); }
.grs-mini img, .grs-mini__ph { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--grs-soft); flex: 0 0 56px; }
.grs-mini a { display: block; color: var(--grs-ink); font-weight: 600; font-size: 14px; text-decoration: none; line-height: 1.35; }
.grs-mini span { font-size: 13px; color: var(--grs-muted); }
.grs-mini__sum { display: flex; justify-content: space-between; padding: 14px 0; font-size: 15px; }

/* Thông báo */
.grs-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--grs-ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100000; max-width: calc(100% - 32px); }
.grs-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Trang giỏ / thanh toán */
.grs-page { max-width: 1140px; margin: 32px auto 56px; padding: 0 16px; }
.grs-page h2, .grs-page h3, .grs-drawer strong { font-family: inherit; letter-spacing: normal; }
.grs-h { font-size: 20px; font-weight: 700; margin: 0 0 16px; color: var(--grs-ink); }
.grs-loading { padding: 40px 0; color: var(--grs-muted); text-align: center; }
.grs-cart__grid, .grs-checkout, .grs-thanks__grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.grs-cart__lines, .grs-checkout__form { flex: 3 1 440px; min-width: 0; container-type: inline-size; }
.grs-cart__grid > .grs-summary, .grs-checkout > .grs-summary { flex: 1 1 320px; min-width: 0; }
.is-layout-constrained > .grs-page, .entry-content > .grs-page { max-width: 1140px !important; width: 100%; }
.grs-summary { background: var(--grs-soft); border: 1px solid var(--grs-line); border-radius: 16px; padding: 24px; position: sticky; top: 100px; }
.grs-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.grs-row--total { border-top: 1px solid var(--grs-line); margin: 8px 0 16px; padding-top: 14px; font-weight: 700; font-size: 18px; }
.grs-row--total span:last-child { color: var(--grs-green-dark); }
.grs-freeship { font-size: 13px; color: var(--grs-green-dark); background: var(--grs-green-soft); padding: 8px 10px; border-radius: 8px; margin: 4px 0; }
.grs-back { display: inline-block; margin-top: 16px; color: var(--grs-green-dark); text-decoration: none; font-weight: 500; font-size: 14px; }

.grs-line { display: grid; grid-template-columns: 88px minmax(0,1fr) auto 110px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--grs-line); }
.grs-line__img { display: block; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--grs-soft); }
.grs-line__img img { width: 100%; height: 100%; object-fit: cover; }
.grs-line__info a { display: block; color: var(--grs-ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.grs-line__price { display: block; color: var(--grs-muted); font-size: 14px; margin-top: 4px; }
.grs-line__rm { border: 0; background: none; color: var(--grs-red); font: inherit; font-size: 13px; padding: 0; margin-top: 6px; cursor: pointer; }
.grs-line__total { text-align: right; font-weight: 700; }
.grs-line .grs-qty { height: 40px; }

.grs-empty { text-align: center; padding: 56px 16px; }
.grs-empty__icon { font-size: 48px; }
.grs-empty p { color: var(--grs-muted); margin: 12px 0 20px; }

/* Form */
.grs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 28px; }
.grs-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.grs-field--full { grid-column: 1 / -1; }
.grs-field input, .grs-field textarea {
	width: 100%; font: inherit; font-size: 15px; font-weight: 400; color: var(--grs-ink);
	padding: 12px 14px; border: 1px solid var(--grs-line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.grs-field input:focus, .grs-field textarea:focus { outline: 0; border-color: var(--grs-green); box-shadow: 0 0 0 3px rgba(14,164,114,.15); }
.grs-field.has-error input, .grs-field.has-error textarea { border-color: var(--grs-red); }
.grs-field__msg { color: var(--grs-red); font-weight: 400; font-size: 13px; }
.grs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.grs-pay { display: flex; gap: 12px; padding: 16px; border: 2px solid var(--grs-green); border-radius: 12px; background: var(--grs-green-soft); }
.grs-pay__dot { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 5px solid var(--grs-green); background: #fff; }
.grs-pay p { margin: 4px 0 0; font-size: 14px; color: var(--grs-muted); }
.grs-error { background: #fdecec; color: var(--grs-red); padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }

.grs-lines { list-style: none; margin: 0 0 8px; padding: 0; }
.grs-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--grs-line); font-size: 14px; }
.grs-lines em { color: var(--grs-muted); font-style: normal; }
.grs-lines__total { font-weight: 700; font-size: 17px !important; border-bottom: 0 !important; }
.grs-lines__total span:last-child { color: var(--grs-green-dark); }

/* Trang cảm ơn */
.grs-thanks__head { text-align: center; margin-bottom: 28px; }
.grs-thanks__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--grs-green); color: #fff; font-size: 32px; line-height: 64px; }
.grs-thanks__head h2 { font-weight: 700; margin: 0 0 8px; color: var(--grs-ink); }
.grs-thanks__grid > .grs-card { flex: 1 1 340px; min-width: 0; }
.grs-card { border: 1px solid var(--grs-line); border-radius: 16px; padding: 24px; background: #fff; }
.grs-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.grs-card h3 + .grs-lines { margin-bottom: 20px; }
.grs-bank { text-align: center; background: var(--grs-soft); }
.grs-bank__qr { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto 16px; border-radius: 12px; background: #fff; }
.grs-bank__info { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; text-align: left; margin: 0 0 12px; font-size: 14px; }
.grs-bank__info dt { color: var(--grs-muted); }
.grs-bank__info dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grs-copy { border: 1px solid var(--grs-line); background: #fff; border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; color: var(--grs-green-dark); }
.grs-muted { color: var(--grs-muted); font-size: 13px; }
.grs-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #eef1f0; color: #3d4b46; }
.grs-badge--pending { background: #fff4d6; color: #8a6300; }
.grs-badge--paid, .grs-badge--processing { background: #e1f0ff; color: #1d5fa8; }
.grs-badge--shipping { background: #efe6ff; color: #6337b8; }
.grs-badge--completed { background: var(--grs-green-soft); color: var(--grs-green-dark); }
.grs-badge--cancelled { background: #fdecec; color: var(--grs-red); }

@media (max-width: 900px) {
	.grs-summary { position: static; }
}
@container (max-width: 560px) {
	.grs-grid { grid-template-columns: 1fr; }
	.grs-line { grid-template-columns: 64px minmax(0,1fr); grid-template-areas: "img info" "qty total"; gap: 10px 12px; }
	.grs-line__img { width: 64px; height: 64px; grid-area: img; }
	.grs-line__info { grid-area: info; }
	.grs-line .grs-qty { grid-area: qty; justify-self: start; }
	.grs-line__total { grid-area: total; align-self: center; }
}
@media (max-width: 600px) {
	.grs-fab { right: 14px; bottom: 84px; }
	.grs-page { margin-top: 20px; }
	.grs-summary { padding: 18px; }
}

/* Chống ghi đè từ Elementor kit / theme (button { background … }) */
.grs-buy button, .grs-page button, .grs-drawer button { text-transform: none !important; letter-spacing: normal !important; box-shadow: none !important; font-family: inherit !important; }
body .grs-btn--primary, body .grs-btn--primary:hover, body .grs-btn--primary:focus { color: #1a1400 !important; border-color: var(--grs-yellow) !important; }
body .grs-btn--primary, body .grs-btn--primary:focus { background: var(--grs-yellow) !important; }
body .grs-btn--primary:hover { background: var(--grs-yellow-dark) !important; border-color: var(--grs-yellow-dark) !important; }
body .grs-btn--outline, body .grs-btn--outline:focus { background: #fff !important; color: var(--grs-green-dark) !important; border: 2px solid var(--grs-green) !important; }
body .grs-btn--outline:hover { background: var(--grs-green-soft) !important; color: var(--grs-green-dark) !important; }
body .grs-btn { border-radius: var(--grs-radius) !important; padding: 0 20px !important; min-height: 48px !important; opacity: 1; }
body .grs-qty__btn, body .grs-qty__btn:focus { background: transparent !important; color: var(--grs-ink) !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
body .grs-qty__btn:hover { background: var(--grs-soft) !important; color: var(--grs-ink) !important; }
body .grs-drawer__x, body .grs-drawer__x:hover, body .grs-drawer__x:focus { background: transparent !important; color: var(--grs-muted) !important; border: 0 !important; padding: 4px 8px !important; }
body .grs-line__rm, body .grs-line__rm:hover, body .grs-line__rm:focus { background: transparent !important; color: var(--grs-red) !important; border: 0 !important; padding: 0 !important; }
body .grs-copy, body .grs-copy:hover, body .grs-copy:focus { background: #fff !important; color: var(--grs-green-dark) !important; border: 1px solid var(--grs-line) !important; padding: 2px 8px !important; border-radius: 6px !important; }
body .grs-page a:not(.grs-btn), body .grs-drawer a:not(.grs-btn) { text-decoration: none !important; }
body .grs-page a:not(.grs-btn):hover { text-decoration: underline !important; }
body .grs-field input, body .grs-field textarea { border: 1px solid var(--grs-line) !important; border-radius: 10px !important; padding: 12px 14px !important; background: #fff !important; box-shadow: none; min-height: 48px; }
body .grs-field input:focus, body .grs-field textarea:focus { border-color: var(--grs-green) !important; box-shadow: 0 0 0 3px rgba(14,164,114,.15) !important; outline: 0 !important; }
body .grs-field.has-error input, body .grs-field.has-error textarea { border-color: var(--grs-red) !important; }

/* Bước chọn hình thức thanh toán */
.grs-checkout__next { margin: 20px 0 0; padding: 12px 14px; background: var(--grs-green-soft); border-radius: 10px; color: var(--grs-ink); }
.grs-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 14px; font-size: 13px; color: var(--grs-muted); }
.grs-steps .is-done { color: var(--grs-green-dark); }
.grs-steps .is-current { color: var(--grs-ink); font-weight: 700; }
.grs-paychoose { max-width: 960px; margin: 0 auto; }
.grs-paychoose__head { text-align: center; margin-bottom: 24px; }
.grs-paychoose__head h2 { font-weight: 700; margin: 0 0 8px; color: var(--grs-ink); }
.grs-paychoose__head > p:last-child { margin: 0; color: var(--grs-muted); }
.grs-paychoose__total { color: var(--grs-green-dark); }
.grs-paychoose__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.grs-paycard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; padding: 22px 16px; text-align: center; font-weight: 400; border: 2px solid var(--grs-line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.grs-paycard:hover { border-color: var(--grs-green); }
.grs-paycard.is-active { border-color: var(--grs-green); background: var(--grs-green-soft); box-shadow: 0 0 0 3px rgba(14,164,114,.12); }
.grs-paycard > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.grs-paycard:focus-within { box-shadow: 0 0 0 3px rgba(14,164,114,.3); }
.grs-paycard__icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--grs-soft); color: var(--grs-green-dark); transition: background .15s, color .15s; }
.grs-paycard.is-active .grs-paycard__icon { background: var(--grs-green); color: #fff; }
.grs-paycard__icon svg { width: 26px; height: 26px; }
.grs-paycard strong { color: var(--grs-ink); font-size: 15px; line-height: 1.3; }
.grs-paycard__desc { font-size: 13px; line-height: 1.45; color: var(--grs-muted); }
.grs-paycard__extra { color: var(--grs-ink); }
.grs-paychoose .grs-error { max-width: 420px; margin: 0 auto 12px; text-align: center; }
body .grs-paychoose__go { display: flex; width: 100%; max-width: 420px; margin: 8px auto 0; }
.grs-paychange { margin: 14px 0 0; font-size: 14px; }
.grs-paychange a { color: var(--grs-green-dark); font-weight: 600; }
@media (max-width: 560px) { .grs-paychoose__grid { grid-template-columns: 1fr 1fr; } .grs-paycard { padding: 16px 10px; } }
