/* =========================================================
   SHOPIFY & GOOGLE SETUP PAGE: Layla opens for business online
   1. Online store: a customer buys a cake
   2. Maps: Layla's Bakery appears on the map
   3. Shopping: her cake shows up in product results
   ========================================================= */

/* Only one scene shows at a time */
.store-scene {
  position: absolute;
  inset: 0;
  padding: 14px 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s, visibility 0.6s;
}

.scene-shop .store-shop,
.scene-map .store-map,
.scene-shopping .store-shopping {
  opacity: 1;
  visibility: visible;
}

/* ---------- 1. Online store ---------- */

.shop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.shop-head strong {
  color: #e84393;
  font-weight: 800;
}

.shop-cart {
  position: relative;
  font-size: 20px;
}

.shop-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: #e84393;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  transform: scale(0);
  transition: transform 0.3s;
}

.in-cart .shop-badge {
  transform: scale(1);
}

.shop-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shop-product {
  padding: 10px;
  border: 1px solid #f0e4dc;
  border-radius: 14px;
}

.shop-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffe1cc, #ffc9e0);
  font-size: 44px;
}

.shop-product strong {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.shop-product span {
  font-size: 12px;
  color: #777777;
}

.shop-product .shop-add {
  display: block;
  margin-top: 8px;
  padding: 7px;
  border-radius: 8px;
  background: #e84393;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.15s;
}

.pressed {
  transform: scale(0.92);
}

/* Checkout panel slides in from the right */
.shop-checkout {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  padding: 18px;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(105%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show-checkout .shop-checkout {
  transform: translateX(0);
}

.shop-checkout h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.shop-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eeeeee;
  font-size: 12.5px;
}

.shop-pay {
  display: block;
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  background: #222222;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.15s;
}

.shop-paid {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  text-align: center;
  font-size: 13px;
}

.paid .shop-paid {
  display: flex;
}

.paid .shop-pay,
.paid .shop-line {
  display: none;
}

.shop-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #55efc4;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  animation: store-pop 0.5s ease;
}

.shop-paid strong {
  color: #00a86b;
  font-size: 15px;
}

@keyframes store-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---------- 2. Maps ---------- */

.store-map {
  padding: 0;
  /* A simple drawn map: soft background with streets */
  background:
    linear-gradient(90deg, transparent 47%, #ffffff 47%, #ffffff 53%, transparent 53%) 0 0 / 140px 140px,
    linear-gradient(0deg, transparent 46%, #ffffff 46%, #ffffff 54%, transparent 54%) 0 0 / 120px 120px,
    #e4ecef;
}

.map-park {
  position: absolute;
  top: 40px;
  left: 30px;
  width: 120px;
  height: 80px;
  border-radius: 20px;
  background: #cfe8d1;
}

.map-search {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 2;
  padding: 10px 16px;
  border-radius: 99px;
  background: #ffffff;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.map-pin {
  position: absolute;
  top: 34%;
  left: 50%;
  z-index: 2;
  margin-left: -16px;
  font-size: 34px;
  opacity: 0;
  transform: translateY(-80px);
}

.pin-dropped .map-pin {
  opacity: 1;
  transform: translateY(0);
  animation: pin-drop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) forwards;
}

@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-80px); }
  to { opacity: 1; transform: translateY(0); }
}

.map-card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-size: 12.5px;
  transform: translateY(130%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show-card .map-card {
  transform: translateY(0);
}

.map-card strong {
  display: block;
  font-size: 16px;
}

.map-stars {
  color: #f5a623;
}

.map-open {
  color: #1a7f4b;
  font-weight: 600;
}

.map-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.map-buttons span {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid #d8d8e0;
  font-size: 12px;
  font-weight: 600;
  color: #3b37b8;
}

.map-buttons span:first-child {
  background: #3b37b8;
  border-color: #3b37b8;
  color: #ffffff;
}

/* ---------- 3. Shopping results ---------- */

.shopping-box {
  padding: 10px 16px;
  border: 1px solid #dddde5;
  border-radius: 99px;
  font-size: 13px;
}

.shopping-label {
  margin: 14px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #777777;
}

.shopping-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shopping-item {
  padding: 10px;
  border: 1px solid #ececf1;
  border-radius: 14px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s, transform 0.5s, box-shadow 0.5s, border-color 0.5s;
}

.show-items .shopping-item {
  opacity: 1;
  transform: translateY(0);
}

.show-items .shopping-item:nth-child(2) { transition-delay: 0.15s; }
.show-items .shopping-item:nth-child(3) { transition-delay: 0.3s; }

.shopping-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  border-radius: 10px;
  background: #f6f6f9;
  font-size: 38px;
}

.shopping-item strong {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.3;
}

.shopping-price {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}

.shopping-shop {
  color: #1a7f4b;
}

.shopping-item.is-layla .shopping-img {
  background: linear-gradient(135deg, #ffe1cc, #ffc9e0);
}

.highlight .shopping-item.is-layla {
  border-color: #e84393;
  box-shadow: 0 10px 24px rgba(232, 67, 147, 0.22);
}

@media (max-width: 600px) {
  .store-scene {
    padding: 12px;
  }

  .shop-img {
    height: 90px;
  }

  .shopping-img {
    height: 70px;
    font-size: 30px;
  }

  .shopping-item {
    padding: 8px;
    font-size: 11px;
  }

  .shop-checkout {
    width: 78%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-scene,
  .shop-checkout,
  .map-card,
  .shopping-item,
  .shop-badge {
    transition: none;
  }

  .pin-dropped .map-pin,
  .shop-tick {
    animation: none;
  }
}
