/* ==========================================================================
   NOMU — Products page
   Loaded only by products.html and products-ar.html, after sections.css.
   Page hero, the product rows and the small product screens.
   ========================================================================== */

/* ==== PAGE HERO (a shorter version of the home hero) ====================== */

.page-hero { min-height: 0; }
.page-hero .hero__inner { padding-top: 170px; padding-bottom: 110px; }
.page-hero .hero__rings {
  width: min(820px, 70vw);
  inset-inline-end: -10vw;
  top: 50%;
  transform: translateY(-50%);
}
.page-hero .hero__title { font-size: clamp(2.3rem, 9vw, 8rem); }

@media (max-width: 900px) {
  .page-hero .hero__inner { padding-top: 130px; padding-bottom: 80px; }
  .page-hero .hero__rings { width: 120vw; inset-inline-end: -60vw; top: auto; bottom: -50vw; transform: none; }
}


/* ==== PRODUCT ROWS ======================================================== */

.products { padding-top: 0; }

.product {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: center;
  gap: clamp(40px, 6vw, 110px);
}
.product + .product { margin-top: clamp(96px, 11vw, 160px); }
.product--flip { grid-template-columns: 5fr 7fr; }
.product--flip .product__media { order: 2; }

.product__media {
  display: grid;
  place-items: center;
  min-height: clamp(360px, 36vw, 520px);
  padding: clamp(28px, 5vw, 72px);
  border-radius: 28px;
  background: var(--lavender);
  perspective: 1200px;
}
.product--midnight .product__media { background: var(--midnight-deep); }
.product--violet   .product__media { background: var(--violet); }
.product__media .ui { width: 100%; max-width: 500px; transition: transform 600ms var(--ease-out); }
.product__media--phone .ui { max-width: 290px; }

.product__kind { font-weight: 700; color: var(--violet); margin-bottom: 10px; }
.product__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 18px;
}
.product__text { font-size: 1.12rem; max-width: 40ch; margin-bottom: 26px; }

.product__features { display: grid; gap: 10px; margin-bottom: 30px; }
.product__features li { display: flex; align-items: baseline; gap: 12px; font-size: 1.02rem; }
.product__features li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--violet);
  transform: translateY(-2px);
}

.product__meta { font-size: var(--size-small); color: var(--ink-muted); margin-bottom: 24px; }
.product__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

@media (max-width: 900px) {
  .product, .product--flip { grid-template-columns: 1fr; gap: 36px; }
  .product--flip .product__media { order: 0; }
  .product__media { min-height: 0; padding: 40px 20px 48px; }
}


/* ==== PRODUCT SCREENS (drawn in HTML) ===================================== */

.ui {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-frame);
  padding: 22px;
  color: var(--ink);
  font-size: 0.9rem;
  box-shadow: 0 30px 60px -30px rgba(20, 20, 43, 0.35); /* the screen floats above its field */
}
.ui__bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.ui__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.ui__muted { color: var(--ink-muted); font-size: 0.82rem; }

/* -- Product 1: booking calendar -- */
.ui-booking__grid { display: grid; grid-template-columns: 48px repeat(5, 1fr); gap: 6px; }
.ui-booking__day,
.ui-booking__time { font-size: 0.75rem; color: var(--ink-muted); font-weight: 500; }
.ui-booking__day { text-align: center; padding-bottom: 4px; }
.ui-booking__day.is-today { color: var(--violet); font-weight: 700; }
.ui-booking__time { align-self: center; }
.slot { height: 32px; border-radius: 8px; background: var(--lavender); }
.slot.is-booked { background: #DCD5FF; }
.slot.is-picked { background: var(--violet); animation: slot-pulse 2.4s var(--ease-in-out) infinite; }
@keyframes slot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.88); } }
.ui-booking__toast {
  position: absolute;
  inset-inline-end: -18px;
  bottom: -26px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: var(--midnight);
  color: var(--white);
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.35;
}
.ui-booking__check {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--midnight);
  font-weight: 700;
}

/* -- Product 2: online store -- */
.ui-shop__cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--midnight);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
}
.ui-shop__cart b { color: var(--yellow); }
.ui-shop__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ui-shop__item { display: grid; gap: 6px; }
.ui-shop__img {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--c, var(--lavender));
  display: grid;
  place-items: center;
  transition: transform 500ms var(--ease-out);
}
.ui-shop__img i {
  width: 42%; aspect-ratio: 1;
  border-radius: 50% 50% 46% 54%;
  background: rgba(255, 255, 255, 0.55);
}
.ui-shop__name { font-weight: 700; font-size: 0.8rem; }
.ui-shop__price { font-size: 0.78rem; color: var(--ink-muted); }
.ui-shop__add {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-pill);
  background: var(--violet);
  color: var(--white);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
}
.product:hover .ui-shop__item:nth-child(1) .ui-shop__img { transform: translateY(-6px); }
.product:hover .ui-shop__item:nth-child(2) .ui-shop__img { transform: translateY(-10px); transition-delay: 60ms; }
.product:hover .ui-shop__item:nth-child(3) .ui-shop__img { transform: translateY(-6px); transition-delay: 120ms; }

/* -- Product 3: digital menu on a phone -- */
.ui-phone {
  width: min(290px, 100%);
  margin-inline: auto;
  padding: 26px 18px 20px;
  border-radius: 40px;
  border: 8px solid var(--midnight);
}
.ui-phone__notch {
  width: 80px; height: 20px;
  margin: -16px auto 14px;
  border-radius: 0 0 14px 14px;
  background: var(--midnight);
}
.ui-menu__title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.ui-menu__tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.ui-menu__tabs span {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--lavender);
  font-size: 0.75rem;
  font-weight: 700;
}
.ui-menu__tabs .is-on { background: var(--midnight); color: var(--white); }
.ui-menu__list { display: grid; gap: 8px; margin-bottom: 14px; }
.ui-menu__list li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: var(--lavender);
}
.ui-menu__list i { width: 40px; height: 40px; border-radius: 10px; background: var(--c); }
.ui-menu__list strong { display: block; font-size: 0.82rem; }
.ui-menu__list small { color: var(--ink-muted); font-size: 0.72rem; }
.ui-menu__list b { font-size: 0.8rem; color: var(--violet); }
.ui-menu__order {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: var(--violet);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Tilt the screen gently towards the mouse (set by js/main.js) */
.product__media[data-tilt] .ui { transform-style: preserve-3d; }

/* Entrance: the toast slides in after the screen */
.js .ui-booking__toast { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out) 500ms, transform 700ms var(--ease-out) 500ms; }
.js .is-in .ui-booking__toast { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .ui-booking__toast { inset-inline-end: 8px; bottom: -22px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .ui-booking__toast { opacity: 1; transform: none; }
}
