@charset "utf-8";

/* =========================================================
   Whisker Witch — Home (mobile-first)
   Only home-page components: crystal ball, grid, latest news
   ========================================================= */

/* ---------- helpers ---------- */
:root{
  --ball-size: clamp(240px, 70vw, 420px);
  --stand-width: calc(var(--ball-size) * 2.15);
  --stand-height: calc(var(--ball-size) * 1.05);

  --card-max: 1120px;
  --gap: 1.25rem;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Keep home content centered inside parchment content area */
.shop-scroll{
  width: 100%;
}

/* =========================================================
   CRYSTAL BALL FEATURE
   ========================================================= */
.crystal-ball-wrapper{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.75rem auto 15rem;
  width: 100%;
}

/* The sphere */
.crystal-ball{
  position: relative;
  width: var(--ball-size);
  height: var(--ball-size);
  border-radius: 50%;
  overflow: hidden;

  /* outer “black rim + purple haze” look */
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,0.92) 72%),
    radial-gradient(circle at 50% 50%, rgba(170,120,255,0.40) 58%, transparent 78%),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.28), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(180,140,255,0.30), transparent 65%);

  box-shadow:
    0 0 55px rgba(190,150,255,0.65),
    0 24px 55px rgba(0,0,0,0.75);
}

/* inner glow to prevent any “square panel” feeling */
.crystal-ball::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.14), transparent 62%),
    radial-gradient(circle at 50% 115%, rgba(0,0,0,0.55), rgba(0,0,0,0.90));
  z-index: 0;
  pointer-events:none;
}

/* Stand under the ball (this is what you were trying to scale) */
.crystal-stand{
  width: min(100%, var(--stand-width));
  height: var(--stand-height);

  /* IMPORTANT: if you want it visually bigger, scale via transform */
  transform: scale(1.68);
  transform-origin: top center;

  margin-top: calc(var(--ball-size) * -1.22);

  background: url("/images/crystal-stand.png") no-repeat center bottom;
  background-size: contain;

  filter:
    drop-shadow(0 10px 18px rgba(0,0,0,0.55))
    drop-shadow(0 0 18px rgba(224,188,115,0.70));

  pointer-events: none;
  position: relative;
  z-index: 0;
}

/* little glow under stand */
.crystal-ball-wrapper::after{
  content:"";
  position:absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  width: min(280px, 70vw);
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
  opacity: 0.6;
  pointer-events:none;
}

/* ---------- Items inside ball ---------- */
.crystal-item{
  position: absolute;
  top: 20%;
  left: 25%;
  transform: translate(-50%, -50%) scale(0.94);
  width: 68%;
  border-radius: 18px;
  padding: 0.9rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  opacity: 0;
  transform: scale(0.94) translateY(12px);
  pointer-events: none;
  transition: opacity 700ms ease, transform 700ms ease;
  z-index: 2;
}

.crystal-item.active{
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.crystal-item a{
  display: inline-block;
  position: relative;
  z-index: 5;
}

.crystal-item img{
  width: min(220px, 70%);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.65);
  margin: 0.35rem 0 0.5rem;
}

.crystal-item-meta{
  width: 100%;
  z-index: 5;
  padding-left: 1px;
  text-align: left;
}

.crystal-name{
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  color: #fdf6ff;
  text-shadow: 0 0 10px rgba(0,0,0,0.75);
}

.crystal-price{
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: #ffe8bf;
  margin-left: 75px;
}

.crystal-item-tagline{
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #f3d0ff;
}

/* Smoke/particles (kept safe + subtle) */
.crystal-smoke,
.crystal-fog,
.crystal-particles{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.crystal-particles{
  inset: 10% 18%;
  z-index: 3;
}

.crystal-particle{
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,245,210,0.9);
  box-shadow: 0 0 6px rgba(255,245,210,0.9), 0 0 12px rgba(193,155,255,0.9);
  opacity: 0;
  animation: crystalParticleRise 9s linear infinite;
}

.crystal-particle:nth-child(1){ left: 20%; bottom: 8%;  animation-delay: 0s; }
.crystal-particle:nth-child(2){ left: 38%; bottom: 5%;  animation-delay: 2s; }
.crystal-particle:nth-child(3){ left: 55%; bottom: 10%; animation-delay: 4s; }
.crystal-particle:nth-child(4){ left: 70%; bottom: 6%;  animation-delay: 1s; }
.crystal-particle:nth-child(5){ left: 30%; bottom: 12%; animation-delay: 5s; }
.crystal-particle:nth-child(6){ left: 60%; bottom: 15%; animation-delay: 7s; }

@keyframes crystalParticleRise{
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { opacity: 1; }
  60%  { transform: translateY(-70px) scale(1); opacity: 0.9; }
  100% { transform: translateY(-110px) scale(1.1); opacity: 0; }
}

/* =========================================================
   PRODUCT GRID (fallback view)
   ========================================================= */
.product-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap);
  margin-top: 1.25rem;
}

.product-card{
  background: rgba(255, 248, 220, 0.92);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid rgba(170, 120, 60, 0.55);
  box-shadow:
    0 10px 20px rgba(0,0,0,0.18),
    inset 0 0 8px rgba(139, 96, 41, 0.22);
}

.product-image img{
  border-radius: 10px;
}

/* =========================================================
   LATEST NEWS
   ========================================================= */
.latest-news{
  max-width: var(--card-max);
  margin: 1.6rem auto 0;
  background: rgba(255,252,240,0.72);
  border: 1px solid rgba(190,150,90,0.55);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
  padding: 1.15rem 1.15rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.latest-news__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.latest-news__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.latest-news__card{
  background: rgba(255,252,240,0.96);
  border-radius: 14px;
  border: 1px solid rgba(190,150,90,0.80);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
  padding: 0.95rem 1rem;
}

/* =========================================================
   REVEAL helper classes
   ========================================================= */
.js-reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.js-reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE TUNING
   ========================================================= */

/* Tablet-ish */
@media (max-width: 980px){
  .latest-news__grid{ grid-template-columns: 1fr; }
}

/* Hide wax seal if you still use it */
@media (max-width: 768px){
  .wax-seal{ display:none !important; }
}

/* Small screens */
@media (max-width: 640px){
  :root{
    --ball-size: clamp(230px, 78vw, 340px);
  }

  /* Bigger stand on mobile: increase SCALE (not width/height) */
  .crystal-stand{
    transform: scale(1.35);
    margin-top: calc(var(--ball-size) * -0.70);
  }

  .crystal-item{
    inset: 14%;
    padding: 0.6rem;
  }

  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones */
@media (max-width: 480px){
  :root{
    --ball-size: 250px;
  }

  .crystal-stand{
    transform: scale(1.55);
    margin-top: -175px;
  }

  /* “image-only” feel on tiny screens */
  .crystal-price,
  .crystal-item-tagline,
  .crystal-item-stock,
  .crystal-item button{
    display: none !important;
  }

  .crystal-item img{
    width: min(170px, 75%);
    margin: 0.2rem 0 0;
  }

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