:root {
  --ink: #111820;
  --muted: #707070;
  --line: #d8d8d8;
  --blue: #3665f3;
  --footer: #111820;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #e7e7e7;
  color: var(--ink);
}

button, input { font: inherit; }
button { cursor: pointer; }

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

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: block;
  width: 110px;
  height: 58px;
  overflow: visible;
  text-decoration: none;
}

.logo img { width: 100%; height: 100%; object-fit: contain; display: block; transform: translateX(-15px); }

.icons { display: flex; align-items: center; gap: 20px; }
.icon { width: 30px; height: 30px; border: 0; background: none; position: relative; padding: 0; display: grid; place-items: center; }
.icon img { width: 100%; height: 100%; display: block; }
.cart-icon span { position: absolute; right: -12px; top: -14px; min-width: 29px; height: 23px; padding: 1px 6px; border-radius: 13px; background: #d60b2f; color: #fff; font-size: 16px; line-height: 21px; font-weight: 700; }

.page { display: none; }
.page.active { display: block; }

.menu-page { padding: 38px 17px 42px; }
.menu-page h1 {
  margin: 0 0 36px;
  font-size: 35px;
  line-height: 1;
  letter-spacing: -2px;
}
.menu-page button,
.menu-link {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.6px;
  text-decoration: none;
}
.with-badge { display: flex !important; align-items: center; gap: 26px; }
.with-badge span { border: 2px solid #25833a; color: #25833a; border-radius: 17px; padding: 2px 9px; font-size: 12px; letter-spacing: 1.5px; }

.orders-page { padding: 0 14px 34px; }
.orders-page h1 { margin: 0 0 12px; font-size: 29px; }
.search-box { height: 44px; display: flex; align-items: center; gap: 10px; border: 1px solid #777; border-radius: 24px; padding: 0 18px; color: #666; }
.search-box span { width: 13px; height: 13px; border: 2px solid #666; border-radius: 50%; position: relative; }
.search-box span::after { content: ""; position: absolute; width: 7px; height: 2px; right: -5px; bottom: -2px; background: #666; transform: rotate(45deg); }
.search-box input { border: 0; outline: 0; width: 100%; font-size: 18px; }

.order-list { padding-top: 28px; display: grid; gap: 28px; }
.order-card { display: grid; grid-template-columns: 145px 1fr; gap: 16px; align-items: start; }
.order-link { color: inherit; text-decoration: none; }
.order-card.clickable { border-radius: 10px; }
.order-card.clickable:active { background: #f1f6ff; }
.order-card strong { color: #727272; font-size: 16px; }
.order-card h2 { margin: 3px 0 5px; font-size: 17px; line-height: 1.17; font-weight: 500; }
.order-card p { margin: 4px 0; color: #666; font-size: 13px; }
.order-card .price { color: #000; font-size: 20px; font-weight: 800; }

.product-img { width: 145px; height: 145px; background: #f5f5f5; position: relative; overflow: hidden; }
.product-img.photo { display: flex; align-items: center; justify-content: center; background: #fff; }
.product-img.photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-gasket::before { content: ""; position: absolute; width: 100px; height: 44px; top: 41px; left: 23px; background: linear-gradient(90deg, #f5f5f5, #dedede); transform: skewY(-14deg); box-shadow: 30px 40px 0 -18px #e8e8e8; }
.img-fork::before { content: ""; position: absolute; width: 114px; height: 18px; top: 56px; left: 16px; background: #202f45; transform: rotate(-23deg); border-radius: 7px; box-shadow: 0 16px 0 #1f8ad4; }
.img-fork::after { content: ""; position: absolute; width: 31px; height: 78px; right: 25px; top: 30px; background: repeating-linear-gradient(180deg, #d7d7d7 0 6px, #222 6px 9px); transform: rotate(-33deg); border-radius: 4px; }
.img-battery::before { content: "LITHIUM ION"; position: absolute; inset: 24px 15px 34px; background: linear-gradient(#e21b2d 0 23%, #111 23% 76%, #60ad45 76%); color: white; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.img-sticker::before { content: "TERMIGNONI"; position: absolute; width: 68px; height: 52px; background: #245dba; border-radius: 50%; left: 23px; top: 43px; color: #fff; font-size: 8px; display: grid; place-items: center; box-shadow: 46px 0 0 #245dba; }
.img-pipe::before { content: ""; position: absolute; width: 120px; height: 22px; border: 10px solid #766b5c; border-left: 0; border-top: 0; border-radius: 0 0 70px 0; left: 10px; top: 48px; transform: rotate(-12deg); }
.img-vmware::before { content: "WORKSTATION PRO 16"; position: absolute; inset: 12px; padding-top: 36px; background: linear-gradient(135deg, #5d67c7, #8a57ba); color: #fff; font-size: 18px; text-align: center; }
.img-tape::before { content: "DGT"; position: absolute; width: 94px; height: 94px; border-radius: 50%; background: #23a638; color: #111; left: 24px; top: 18px; display: grid; place-items: center; font-size: 42px; font-weight: 900; }
.empty { background: #f6f6f6; }

.pager { display: flex; justify-content: space-between; padding: 34px 2px 28px; border-bottom: 1px solid var(--line); }
.pager button { border: 0; background: none; font-size: 17px; }
.pager button:first-child::before { content: "← "; font-size: 22px; }
.pager button:last-child::after { content: " →"; font-size: 22px; }
.pager button:disabled { color: #777; cursor: default; }
.feedback { text-align: center; padding: 22px 10px 30px; }
.feedback h2 { font-size: 19px; margin: 0 0 16px; }
.feedback button { border: 0; background: none; font-size: 34px; margin: 0 11px; }
.feedback-icons { display: flex; justify-content: center; gap: 24px; }
.feedback-icons button { width: 34px; height: 34px; margin: 0; padding: 0; }
.feedback-icons img { width: 100%; height: 100%; display: block; }

.detail-page { padding: 0 10px 28px; font-size: 12px; }
.detail-page h1 { margin: 0 0 12px; font-size: 17px; }
.divider { height: 1px; background: #e0e0e0; margin: 0 -10px 18px; }
.summary-grid { display: grid; grid-template-columns: 110px 1fr; gap: 12px 8px; margin: 0 0 22px; }
.summary-grid dt { color: #666; }
.summary-grid dd { margin: 0; }
a { color: #0654ba; }

.tracking, .detail-section { margin: 0 0 22px; }
.detail-page h2 { font-size: 16px; margin: 0 0 9px; }
.success { color: #128528; font-weight: 700; margin: 0 0 8px; }
.track-line { height: 18px; margin: 0 9px; background: linear-gradient(#1677ff, #1677ff) center/100% 4px no-repeat; display: flex; justify-content: space-between; }
.track-line span { width: 18px; height: 18px; border-radius: 50%; background: #1677ff; position: relative; }
.track-line span::after { content: "✓"; color: #fff; position: absolute; left: 4px; top: 0; font-size: 12px; }
.track-labels { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; gap: 6px; }
.track-labels p { margin: 5px 0 0; }

.detail-product { border: 1px solid #d5d5d5; border-radius: 8px 8px 0 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px; }
.detail-product .product-img { width: 86px; height: 86px; }
.detail-product strong { display: block; margin: 6px 0; }
.actions { border: 1px solid #d5d5d5; border-top: 0; border-radius: 0 0 8px 8px; display: grid; grid-template-columns: 1fr 1fr; }
.actions button { border: 0; background: #fff; color: var(--blue); padding: 14px 5px; font-size: 12px; }
.compact p, .totals p { display: flex; justify-content: space-between; }
.compact span { color: #777; }
.seller p { margin: 4px 0 14px; }
.payment { display: grid; grid-template-columns: 45px 1fr; align-items: center; gap: 8px; }
.payment span { border: 1px solid #1c64d1; color: #1c64d1; font-weight: 700; padding: 3px; font-size: 10px; }
.totals { background: #f7f7f7; margin: 0 -10px 22px; padding: 14px 14px; }
.totals p { margin: 0 0 15px; }
.coupon b { color: #3a8b15; }
.final-total { border-top: 1px solid #ddd; padding-top: 15px; font-weight: 800; }
.note p { font-weight: 700; }
.links a { display: block; margin: 0 0 30px; }

.product-rail { display: block; margin: 0 0 34px; }
.rail-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.rail { display: flex; gap: 13px; overflow-x: auto; padding-bottom: 8px; }
.rail-item { width: 132px; flex: 0 0 132px; }
.rail-item .product-img { width: 132px; height: 110px; border-radius: 3px; }
.rail-item h3 { font-size: 12px; line-height: 1.15; margin: 8px 0 3px; font-weight: 500; }
.rail-item b { font-size: 13px; }
.rail-item p { margin: 3px 0; font-size: 11px; }
.dots { text-align: center; font-size: 18px; }

.missing-page { background: #fff; }
.missing-hero { position: relative; min-height: 670px; padding: 48px 17px 0; background: #f7f7f7; overflow: hidden; }
.missing-hero h1 { margin: 0 0 18px; max-width: 360px; font-size: 42px; line-height: 1.14; letter-spacing: -1.6px; }
.missing-hero p { margin: 0 0 22px; max-width: 390px; font-size: 20px; line-height: 1.32; }
.missing-hero p a { color: var(--ink); font-weight: 700; }
.home-cta { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 28px; background: #191919; color: #fff; text-decoration: none; font-size: 20px; font-weight: 800; }
.missing-illustration { position: absolute; left: 50%; bottom: 0; z-index: 1; width: 320px; height: auto; display: block; transform: translateX(-50%); pointer-events: none; }
.recent-section { padding: 58px 17px 8px; background: #fff; }
.recent-section h2 { margin: 0 0 22px; font-size: 28px; line-height: 1.1; letter-spacing: -0.8px; }
.recent-list { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.recent-card { width: 150px; flex: 0 0 150px; }
.recent-img { position: relative; height: 150px; margin-bottom: 16px; border-radius: 16px; background: #e8e8e8; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.recent-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.recent-img button { position: absolute; right: 10px; top: 10px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; font-size: 28px; line-height: 1; }
.recent-card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.18; font-weight: 500; }
.recent-card strong { font-size: 22px; }

.footer { background: var(--footer); color: #fff; padding: 48px 18px 62px; }
.footer nav { display: grid; gap: 26px; }
.footer a { color: inherit; text-decoration: none; font-weight: 700; }
.footer-line { height: 1px; background: rgba(255,255,255,.85); margin: 34px 0 42px; }
.legal { color: #dbe4ef; text-align: center; font-size: 16px; line-height: 1.45; }
.legal a { color: #4c98ff; text-decoration: underline; }
.copy { color: #c8cbd0; text-align: center; font-size: 18px; font-weight: 700; }

.help {
  position: fixed;
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  bottom: 48%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  font-size: 22px;
}

@media (max-width: 360px) {
  .icons { gap: 16px; }
  .menu-page button,
  .menu-link { font-size: 20px; }
  .order-card { grid-template-columns: 118px 1fr; }
  .product-img { width: 118px; height: 118px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .phone-shell {
    width: 100%;
    max-width: none;
  }

  .topbar {
    height: 54px;
    padding: 0 22px;
  }

  .logo {
    width: 96px;
    height: 50px;
  }

  .icons {
    gap: 18px;
  }

  .icon {
    width: 26px;
    height: 26px;
  }

  .cart-icon span {
    min-width: 24px;
    height: 20px;
    right: -10px;
    top: -12px;
    font-size: 13px;
    line-height: 18px;
  }

  .menu-page {
    padding: 22px 24px 28px;
  }

  .menu-page h1 {
    margin: 0 0 22px;
    font-size: 31px;
  }

  .menu-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 42px;
    align-items: start;
  }

  .menu-page h1 {
    grid-column: 1 / -1;
  }

  .menu-page button,
  .menu-link {
    margin: 0 0 17px;
    font-size: 19px;
    letter-spacing: -0.3px;
  }

  .with-badge {
    gap: 14px;
  }

  .with-badge span {
    font-size: 11px;
    padding: 2px 8px;
  }

  .orders-page {
    padding: 0 22px 24px;
  }

  .orders-page h1 {
    font-size: 25px;
    margin-bottom: 10px;
  }

  .search-box {
    height: 38px;
  }

  .search-box input {
    font-size: 16px;
  }

  .order-list {
    padding-top: 20px;
    gap: 18px;
  }

  .order-card {
    grid-template-columns: 110px 1fr;
    gap: 14px;
  }

  .product-img {
    width: 110px;
    height: 110px;
  }

  .order-card strong {
    font-size: 13px;
  }

  .order-card h2 {
    font-size: 15px;
    line-height: 1.15;
  }

  .order-card .price {
    font-size: 17px;
  }

  .order-card p {
    font-size: 12px;
    margin: 3px 0;
  }

  .pager {
    padding: 24px 2px 20px;
  }

  .feedback {
    padding: 18px 10px 22px;
  }

  .detail-page {
    padding: 0 18px 24px;
    font-size: 12px;
  }

  .detail-page h1 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .summary-grid {
    grid-template-columns: 120px 1fr 120px 1fr;
    gap: 10px 12px;
    margin-bottom: 18px;
  }

  .tracking,
  .detail-section {
    margin-bottom: 18px;
  }

  .detail-product {
    grid-template-columns: 92px 1fr;
  }

  .detail-product .product-img {
    width: 82px;
    height: 82px;
  }

  .seller {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }

  .seller h2,
  .seller p,
  .seller .payment {
    grid-column: auto;
  }

  .totals {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .rail-item {
    width: 118px;
    flex-basis: 118px;
  }

  .rail-item .product-img {
    width: 118px;
    height: 96px;
  }

  .missing-hero {
    min-height: 330px;
    padding: 28px 24px 0;
  }

  .missing-hero h1 {
    max-width: 430px;
    font-size: 34px;
    margin-bottom: 12px;
  }

  .missing-hero p {
    max-width: 430px;
    font-size: 17px;
    margin-bottom: 18px;
  }

  .home-cta {
    min-height: 44px;
    padding: 0 22px;
    font-size: 17px;
  }

  .missing-illustration {
    left: auto;
    right: 28px;
    width: 220px;
    height: auto;
    transform: none;
  }

  .recent-section {
    padding: 32px 24px 8px;
  }

  .recent-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .recent-card {
    width: 132px;
    flex-basis: 132px;
  }

  .recent-img {
    height: 112px;
    margin-bottom: 10px;
  }

  .recent-card h3 {
    font-size: 16px;
  }

  .recent-card strong {
    font-size: 18px;
  }

  .footer {
    padding: 28px 24px 36px;
  }

  .footer nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 28px;
  }

  .footer-line {
    margin: 24px 0 24px;
  }

  .legal {
    font-size: 13px;
  }

  .copy {
    font-size: 15px;
  }

  .help {
    bottom: 22px;
  }
}
