:root {
  --green: #11a852;
  --green-dark: #0b8f43;
  --red: #f51d1d;
  --yellow: #ffc21a;
  --ink: #111;
  --muted: #6c6c6c;
  --line: #e8e8e8;
  --soft: #f4fbf6;
  --shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f3f5f3;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 14px 132px;
  overflow-x: hidden;
  background: #fff;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 14px;
  color: #020202;
}

.status-bar strong {
  font-size: 15px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.signal {
  display: inline-block;
  width: 22px;
  height: 13px;
  background: linear-gradient(to top, #111 0 40%, transparent 40% 100%) 0 8px / 4px 5px no-repeat,
    linear-gradient(to top, #111 0 55%, transparent 55% 100%) 6px 5px / 4px 8px no-repeat,
    linear-gradient(to top, #111 0 75%, transparent 75% 100%) 12px 2px / 4px 11px no-repeat,
    linear-gradient(to top, #111 0 100%, transparent 100%) 18px 0 / 4px 13px no-repeat;
}

.wifi {
  width: 19px;
  height: 14px;
  border: 4px solid #111;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.battery {
  display: inline-flex;
  min-width: 28px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.store-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 8px 6px 12px;
}

.brand h1 {
  margin: 0;
  color: var(--green);
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
}

.brand p {
  margin: 9px 0 0;
  color: #555;
  font-size: 12px;
}

.deliver,
.message,
.back {
  border: 0;
  background: transparent;
  color: #191919;
}

.deliver {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 12px;
  line-height: 1.15;
}

.deliver strong {
  font-size: 14px;
}

.map-pin {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #111;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #111;
  border-radius: 50%;
}

.message {
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 12px;
}

.message span {
  position: relative;
  width: 26px;
  height: 24px;
  border: 2px solid #111;
  border-radius: 999px;
}

.message span::after {
  content: "...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.message em {
  font-style: normal;
}

.back {
  font-size: 32px;
  line-height: 1;
}

.page-title {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.search-box {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 0 0 12px;
  padding: 0 8px 0 13px;
  border: 1.5px solid var(--green-dark);
  border-radius: 999px;
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #777;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #777;
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 14px;
}

.search-box button,
.primary,
.submit-order,
.checkout-bar button {
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 850;
}

.search-box button {
  height: 28px;
  padding: 0 13px;
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0 -14px 8px;
  padding: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  flex: 0 0 auto;
  height: 34px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.tabs button.active {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 7px 14px rgba(17, 168, 82, 0.22);
}

.tabs .menu-dot {
  margin-left: auto;
  padding-right: 3px;
  font-size: 20px;
}

.hero-card {
  position: relative;
  height: 152px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8f4e8, #f9fbf1);
  box-shadow: inset 0 0 0 1px #e3eadf;
}

.hero-text {
  position: absolute;
  left: 18px;
  top: 20px;
  z-index: 2;
}

.hero-text h2 {
  margin: 0;
  color: #188b43;
  font-size: 27px;
  line-height: 1.18;
  font-weight: 950;
}

.hero-text p {
  display: inline-block;
  margin: 12px 0 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffd85b;
  color: #7e5400;
  font-size: 12px;
  font-weight: 800;
}

.hero-products {
  position: absolute;
  right: -8px;
  bottom: 15px;
  display: flex;
  align-items: end;
  gap: 5px;
  width: 300px;
  padding-left: 70px;
}

.hero-products::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 52px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(#ead5a4, #d7bd82);
}

.hero-products img {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.12));
}

.hero-products img:first-child {
  width: 70px;
}

.dots {
  position: absolute;
  right: 165px;
  bottom: 7px;
  display: flex;
  gap: 8px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9d9d9;
}

.dots i:first-child {
  background: var(--green);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.product-card,
.detail-card,
.form-card,
.summary-card,
.detail-block,
.order-card,
.cart-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.product-card {
  position: relative;
  min-height: 153px;
  overflow: hidden;
}

.product-card.selected {
  border-color: var(--green);
}

.tag {
  position: absolute;
  left: 8px;
  top: 6px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 0 0 8px 8px;
  background: #eaf8ef;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.product-image {
  display: grid;
  width: 100%;
  height: 92px;
  place-items: center;
  border: 0;
  background: #fff;
}

.product-image img {
  width: 92%;
  height: 82px;
  object-fit: contain;
}

.product-title {
  display: -webkit-box;
  width: 100%;
  min-height: 34px;
  padding: 0 7px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #111;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.buy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px 8px;
}

.buy-line strong,
.cart-item strong,
.order-line strong,
.summary-card strong {
  color: var(--red);
}

.buy-line strong {
  font-size: 15px;
}

.plus,
.stepper button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.stepper {
  display: grid;
  grid-template-columns: 24px 22px 26px;
  align-items: center;
  justify-items: center;
  gap: 2px;
}

.stepper.wide {
  grid-template-columns: 30px 26px 30px;
}

.stepper button:first-child {
  border: 1px solid #d5d5d5;
  background: #fff;
  color: #aaa;
}

.stepper span {
  color: #111;
  font-size: 15px;
  font-weight: 750;
}

.empty {
  grid-column: 1 / -1;
  padding: 34px 0;
  color: var(--muted);
  text-align: center;
}

.empty.big {
  padding: 70px 0;
  line-height: 2;
}

.empty button,
.page-head button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

.cart-panel {
  position: fixed;
  right: 50%;
  bottom: 48px;
  z-index: 10;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 28px), 402px);
  min-height: 68px;
  padding: 9px 12px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateX(50%);
}

.cart-round {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 28px;
}

.cart-round span {
  transform: rotate(90deg);
}

.cart-round em,
.bottom-nav i {
  position: absolute;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #ffc20d;
  color: #3d2700;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.cart-round em {
  top: -2px;
  right: -1px;
}

.cart-copy {
  position: relative;
  padding-bottom: 8px;
}

.cart-copy p {
  margin: 0;
  font-size: 13px;
}

.cart-copy strong {
  color: var(--red);
  font-size: 22px;
}

.cart-copy small {
  color: #666;
  font-size: 11px;
}

.cart-copy::after,
.cart-copy i {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px;
  content: "";
}

.cart-copy::after {
  right: 12px;
  background: #e5e5e5;
}

.cart-copy i {
  z-index: 1;
  background: var(--green);
}

.checkout {
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 22px;
  background: var(--yellow);
  color: #111;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 430px);
  height: 58px;
  padding: 4px 18px 2px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  transform: translateX(50%);
}

.bottom-nav::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 122px;
  height: 4px;
  border-radius: 999px;
  background: #0a0a0a;
  transform: translateX(-50%);
}

.bottom-nav button {
  position: relative;
  display: grid;
  gap: 1px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 11px;
}

.bottom-nav span {
  display: grid;
  width: 24px;
  height: 22px;
  place-items: center;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button[data-nav="category"] svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.15;
}

.bottom-nav button[data-nav="cart"] svg {
  width: 23px;
  height: 20px;
}

.bottom-nav button[data-nav="orders"] svg {
  width: 20px;
  height: 20px;
}

.bottom-nav em {
  font-style: normal;
}

.bottom-nav button.active {
  color: var(--green);
  font-weight: 800;
}

.bottom-nav i {
  top: 1px;
  right: 18px;
}

.detail-card {
  overflow: hidden;
}

.detail-image {
  display: grid;
  height: 250px;
  place-items: center;
  background: #fff;
}

.detail-image img {
  max-width: 90%;
  max-height: 220px;
  object-fit: contain;
}

.detail-main {
  padding: 16px;
}

.pill {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf8ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.detail-main h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.detail-main strong {
  color: var(--red);
  font-size: 30px;
}

.detail-main p:last-child {
  color: #666;
  line-height: 1.6;
}

.detail-actions {
  position: fixed;
  right: 50%;
  bottom: 58px;
  z-index: 11;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(calc(100% - 28px), 402px);
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateX(50%);
}

.detail-actions button {
  height: 46px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
}

.detail-actions .primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 12px;
}

.page-head h2 {
  margin: 0;
  font-size: 23px;
}

.list-panel {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.cart-item img,
.order-line img,
.order-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.cart-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.cart-item p {
  margin: 0 0 5px;
  color: #777;
  font-size: 12px;
}

.checkout-bar {
  position: fixed;
  right: 50%;
  bottom: 58px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: min(calc(100% - 28px), 402px);
  padding: 12px 14px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateX(50%);
}

.checkout-bar small,
.checkout-bar em {
  display: block;
  color: #777;
  font-size: 12px;
  font-style: normal;
}

.checkout-bar strong {
  color: var(--red);
  font-size: 24px;
}

.checkout-bar button {
  height: 45px;
  padding: 0 22px;
  background: var(--yellow);
  color: #111;
  font-size: 17px;
}

.checkout-page {
  display: grid;
  gap: 12px;
}

.form-card,
.summary-card,
.detail-block {
  padding: 14px;
}

.form-card h2,
.detail-block h2,
.detail-block h3 {
  margin: 0 0 12px;
}

.form-card label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.form-card input,
.form-card textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  color: #111;
  outline-color: var(--green);
  resize: vertical;
}

.form-card .radio {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-right: 14px;
}

.order-line {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
}

.order-line:last-child {
  border-bottom: 0;
}

.order-line img {
  width: 54px;
  height: 54px;
}

.order-line span {
  font-size: 14px;
}

.order-line small {
  display: block;
  color: #777;
  font-size: 12px;
}

.summary-card p {
  display: flex;
  justify-content: space-between;
  margin: 7px 0;
}

.summary-card .total {
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 18px;
  font-weight: 900;
}

.submit-order {
  height: 48px;
  margin-bottom: 12px;
  font-size: 18px;
  background: var(--yellow);
  color: #111;
}

.order-card {
  overflow: hidden;
}

.order-top {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.order-top strong {
  color: var(--green);
}

.order-card button {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 0;
  background: #fff;
  text-align: left;
}

.order-card small {
  display: block;
  color: #777;
  margin-top: 5px;
}

.detail-block {
  margin-bottom: 12px;
}

.detail-block p {
  margin: 7px 0;
  color: #555;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  z-index: 60;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(17, 168, 82, 0.95);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  body {
    padding: 20px 0;
  }

  .phone {
    border-radius: 28px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.14);
  }

  .bottom-nav {
    bottom: 20px;
  }

  .cart-panel,
  .checkout-bar,
  .detail-actions {
    bottom: 78px;
  }
}

@media (max-width: 374px) {
  .phone {
    padding-right: 10px;
    padding-left: 10px;
  }

  .product-title {
    font-size: 11px;
  }

  .checkout {
    padding: 0 14px;
    font-size: 16px;
  }
}
