/* Raised surfaces share a top-left light source; depth remains visible on touch. */
:root {
  --card-edge: #e0e5ec;
  --card-radius: 18px;
  --card-shadow: 0 2px 2px #1734520a, 0 7px 0 -2px #e0e5eb,
    0 13px 15px -8px #17345230, 0 22px 34px -15px #17345224;
}

h1 { font-size: clamp(28px, 3.15vw, 44px); }
.product-grid { gap: 38px 25px; padding-bottom: 10px; }
.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--card-edge);
  border-top-color: #fff;
  border-left-color: #fff;
  border-radius: var(--card-radius);
  background: linear-gradient(145deg, #fff 35%, #f8f9fc);
  box-shadow: inset 0 1px 0 #fff, var(--card-shadow);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.product-card .photo-button {
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow: 0 1px 0 #fff, inset 0 0 0 1px #1734520a;
}
.product-card .photo-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #ffffff50;
  border-radius: inherit;
  background: linear-gradient(140deg, #ffffff25, transparent 44%, #17345208);
  pointer-events: none;
}
.product-badge {
  border: 1px solid #fff;
  border-radius: 6px;
  box-shadow: 0 2px 0 #17345209, 0 4px 12px #17345210;
}
.photo-arrow {
  border: 1px solid #fff;
  box-shadow: 0 3px 0 #dce1e8, 0 6px 12px #17345220;
}
.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 10px 12px;
}
.product-info p { margin-bottom: 16px; }
.card-bottom {
  margin-top: auto;
  border-top-color: #e4e8ef;
  gap: 10px;
  padding-top: 13px;
}
.add-button {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  align-self: flex-end;
  padding: 7px 10px;
  border: 1px solid #d7c8a0;
  border-radius: 8px;
  color: #80671f;
  background: linear-gradient(#fff, #fcfaf4);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #e9e1cd, 0 4px 8px #80671f0d;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
/* Extend the touch target without enlarging the visible button. */
.add-button::before { content: ''; position: absolute; inset: -4px 0; }
.add-button:hover { text-decoration: none; }
.add-button:focus-visible { outline-color: var(--navy); }
.add-button:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 3px #80671f12, 0 1px 0 #e9e1cd;
}
.product-card:focus-within { border-color: #a5b4ca; }

.sidebar-note {
  padding: 22px 17px;
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f6f8fc);
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #e6eaf0, 0 12px 22px -12px #17345230;
}
.steps { gap: 26px; }
.steps article {
  padding: 25px;
  border: 1px solid #ffffff22;
  border-top-color: #ffffff55;
  border-radius: var(--card-radius);
  background: linear-gradient(140deg, #ffffff14, #ffffff04);
  box-shadow: inset 0 1px 0 #ffffff12, 0 6px 0 -1px #112b51,
    0 18px 25px -12px #071a3e70;
}
.cart-item {
  padding: 15px;
  margin: 0 0 17px;
  border: 1px solid var(--card-edge);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8f9fc);
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #e5e9ef, 0 10px 18px -12px #17345230;
}
.cart-item > div { min-width: 0; }
.cart-item-photo { border-radius: 8px; overflow: hidden; }
.order-summary, .review-block {
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f5f7fa);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 -1px #e5e9ef, 0 8px 18px -12px #17345228;
}
.product-dialog, .info-dialog, .country-dialog {
  border: 1px solid #ffffffb0;
  border-radius: 20px;
  box-shadow: 0 9px 0 -3px #dfe4ec, 0 25px 85px #0d264647;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .product-card:hover {
    transform: perspective(1100px) translateY(-7px) rotateX(1.4deg) rotateY(-1deg);
    border-color: #c5cfdd;
    box-shadow: inset 0 1px 0 #fff, 0 8px 0 -2px #dbe2ec,
      0 18px 18px -10px #17345233, 0 30px 38px -16px #17345238;
  }
  .product-card:hover .food-photo > img,
  .product-card:hover .menu-crop { transform: scale(1.04); }
  .add-button:hover { background: linear-gradient(#fffef9, #f8f2e3); }
}
@media (max-width: 1100px) {
  .product-grid { gap: 32px 20px; }
  .card-bottom { align-items: stretch; }
}
@media (max-width: 767px) {
  :root { --card-radius: 14px; }
  h1 { font-size: 30px; }
  .product-grid { gap: 27px 14px; }
  .product-card { padding: 6px; }
  .product-card .photo-button { border-radius: 9px; }
  .product-info { padding: 9px 5px 9px; }
  .product-info p { margin-bottom: 13px; }
  .card-bottom { padding-top: 0; gap: 8px; }
  .add-button { width: fit-content; min-height: 36px; padding: 7px 10px; font-size: 13px; }
  .steps { gap: 23px; }
  .steps article { padding: 20px 17px; }
  .cart-item { padding: 13px 10px; gap: 10px; }
  .product-dialog { border-radius: 20px 20px 0 0; }
  .country-dialog, .info-dialog { border-radius: 16px; }
}
@media (max-width: 359px) {
  .product-grid { gap: 25px 12px; }
  .product-card { padding: 5px; }
  .product-info { padding-left: 3px; padding-right: 3px; }
}
.phone-link { display: block; width: fit-content; min-height: 44px; padding: 10px 0; color: var(--navy); font-size: 18px; font-weight: 600; }
.phone-link:hover { text-decoration: underline; }
@keyframes card-arrive {
  from { opacity: .65; }
  to { opacity: 1; }
}
@keyframes food-arrive {
  from { transform: perspective(900px) translateY(12px) rotateX(4deg) scale(1.045); }
  to { transform: perspective(900px) translateY(0) rotateX(0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .product-card.card-entering { animation: card-arrive .6s cubic-bezier(.2,.7,.2,1) both; }
  .card-entering .food-photo > img { animation: food-arrive .8s ease-out; }
  .product-card.is-touched {
    transform: perspective(900px) translateY(-3px) rotateX(var(--touch-x,0deg)) rotateY(var(--touch-y,0deg)) scale(.99);
    border-color: #c5b583;
    box-shadow: inset 0 1px 0 #fff, 0 5px 0 -2px #dedfdc, 0 18px 28px -12px #17345245;
    transition-duration: .16s;
  }
  .product-card.is-touched .food-photo > img { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card .food-photo > img, .product-card .menu-crop,
  .add-button:active { transform: none !important; }
  .product-card, .product-card .food-photo > img { animation: none !important; transition: none !important; }
}
