/* @font-face {
    font-family: 'WoodenSign'; 
    src: url('../fonts/driftwood-webfont.woff2') format('woff2'),
         url('../fonts/driftwood-webfont.woff') format('woff'),
         url('../fonts/Driftwood.ttf') format('truetype');
} */

@font-face {
    font-family: 'WoodenSign'; 
    src: url('../fonts/MISTV___.TTF') format('truetype');
}



/* 1) Make the fixed header play nicely with all screens */
:root { --header-h: clamp(250px, 12vw, 160px); } /* scales with viewport */

#currentTime {
  top: 0;
  right: 0;
  position: absolute;
  font-weight: bold;
}
#title {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(28px, 8vw, 72px);    /* scale title instead of fixed 100px */
  font-weight: bold;
  text-shadow:
  -1px -1px 0 white,  /* Top-left */
   1px -1px 0 white,  /* Top-right */
  -1px  1px 0 white,  /* Bottom-left */
   1px  1px 0 white; /* Bottom-right */
}
/*--------------------------------------------------------------------------------------------*/
body { 
  margin: 0; 
  padding-top: calc(var(--header-h) + 16px);  /* push content below header */
  background-image: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQNM65TkQVtNNSb-xrp8LKG3USdwSnE9veWtQ&s');
 
  background-repeat: repeat;
  background-size: cover;
  position: relative;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
} 
/*------------------Crab Merchant---------------------------------------------------------------*/




.crabmerchant {
  --crab-w: 10%;         
  width: var(--crab-w); /*variable for keyframes*/
  position: relative;
  animation: slideLR 25s ease-in-out infinite;
}

@keyframes slideLR {
  0% {
    left: 0;
    transform: scaleX(1);                         /* facing right */
  }
  50% {
    left: calc(100% - var(--crab-w));            /* at right edge */
    transform: scaleX(1);
  }
  51% {
    left: calc(100% - var(--crab-w));
    transform: scaleX(-1);                        /* flip */
  }
  100% {
    left: 0;
    transform: scaleX(-1);                        /* back left, facing left */
  }
}

/*------------------TOP AND BOTTOM RECTANGLES---------------------------------------------------------------*/
.top-rect {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  /* make the GIF fill the box */
  background-image: url('https://i.redd.it/nzejkztbkcab1.gif');
  background-repeat: no-repeat;
  background-position: center;        
  background-size: 100% 100%;         
  /* ensure it's ON TOP of content */
  z-index: 9999;
  box-sizing: border-box;
  background-origin: border-box;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid black;
  padding: 4px;
}


.bottom-rect {
  /*background-color: #ECBD8E;*/
  /* border: 4px solid white; */
  padding: 16px;
  margin: 8px;

  display: grid;
  grid-template-columns:
    clamp(140px, 22vw, 320px)
    minmax(420px, 1fr)
    clamp(140px, 22vw, 320px);
  grid-template-areas: "left middle right";  /* NEW */
  gap: 16px;
  align-items: stretch;
}

.left-rect  { grid-area: left; }
.bothpicrows { grid-area: middle; }
.right-rect { grid-area: right; }
/*-------------------RIGHT RECT TOWEL PORTAL-------------------------------------------------------------*/
.worldFruit {
  position: absolute;
  top: 12%;               /* adjust to sit above the portal */
  left: 50%;
  transform: translateX(-50%);
  color: black;
  text-shadow:
    -1px -1px 0 white,
     1px -1px 0 white,
    -1px  1px 0 white,
     1px  1px 0 white;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  width: 80%;             /* prevent wrapping off edges */
  margin: 0;
  z-index: 3;             /* on top of towel + portal */
}

.towel {
  position: relative;
  width: 150%;
  right: 200px;
  margin: 0 auto;
}

.towel-img {
  display: block;
  width: 100%;
  height: auto;
       
  border-radius: 8px;
}

.portal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 50%;                /* portal size relative to towel width */
  aspect-ratio: 1 / 1;
  border-radius: 50%;

  background-image: url('https://media.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3aHdnaTcybmh2ZGN3M2ljNHkyNHFnNzIxOWl3ajdlbThocG52ZjNvdiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/mX1bWOEGPIAY1yhmKI/giphy.gif');
  background-size: cover;     /* keep galaxy proportions */
  background-position: center;
  background-repeat: no-repeat;

  border: 3px solid rgba(255,255,255,0.8);         /* portal rim */
  box-shadow:
    0 0 18px 6px rgba(0, 200, 255, 0.45),
    inset 0 0 22px rgba(255, 255, 255, 0.35);      /* glow */
  pointer-events: none;       /* don’t block clicks on the towel */
  z-index: 2;
}

.astro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateY(180deg);
  

  width: 45%;   /* size astronaut smaller than portal */
  height: auto;

  z-index: 2;   /* sits above the portal, below the text */
  border-radius: 8px; /* soften corners */
}

/*---------------FRUIT VOTING------------------------------------------------------------*/

.fruitofday {
  text-align: center;
  font-family: 'WoodenSign', sans-serif;
  font-size: 30px;
  font-weight: bold;
  width: 20%;
  margin-bottom: 4px;
  top: -305px;
  right: -50px;
  position: relative;
  z-index: 11;
}

#fruitofdaydesc {
  text-align: center;
  font-size: 23px;
  width: 100%;
  margin-top: 0;
}

.slideshowHome {
  position: relative;
  width: 65px;   
  height: 65px;  
  overflow: hidden;
  margin: 0 auto;
  top: -249px;
  right: -120px;
}

.slideshowHome img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 2;

  animation: floatUpDown 4s ease-in-out infinite;
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-15px);
  }
}

.mySlidesHome.raspberry img {
  width: 100% !important; 
}

.mySlidesHome {
  position: absolute;
  inset: 0;
  left: -100%;
  opacity: 0;
  transition: left 0.7s ease-in-out; /* slide animation */

}

/* Current slide: visible */
.mySlidesHome.active {
  left: 0;
  opacity: 1;
}

/* Previous slide: slides out to the left */
.mySlidesHome.prev {
  left: 100%;
  opacity: 0;
}
/*---------------LEFT AND RIGHT RECTANGLE BOX FORMATTING--------------------------------------------------------------*/
.left-rect,
.right-rect {
  /* border: 4px solid purple; */
  display: flex;
  flex-direction: column;
  min-height: 300px;
  justify-content: center;
}

.left-rect {
  justify-content: center;
}

.right-rect {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  background: none;
}

/*---------------LEFT TREE DESIGN--------------------------------------------------------------*/
.leftfloorsign {
  position: relative;
  top: -150px;
  left: -60px;
  z-index: 10;
  width: 110%;
  transform: rotateY(180deg);
}

.lefttree-img img {
  left: -200px;
}


.crabchef {
  margin-top: -350px;
  right: -65px;
  position: relative;
}

.fruitbasket img {
  width: 37%;
  position: relative;
  top: -80px;
}


/*----------MIDDLE FRUIT PICTURE ROWS---------------------------------------------------------------------*/

.bothpicrows {
  /* border: 4px solid blue; */
  padding-bottom: 8px;
  width: 100%;
  max-width: unset;
  margin: 0;
  display: block;
  position: relative;
  z-index: 5;
}


.featuredfruit {
  text-align: center;
  font-family: 'WoodenSign', sans-serif;
  font-size: 100px;
  font-weight: bold;
  color: #815438;
}

/*----------FRUIT ARMY FOR GARDEN TD---------------------------------------------------------------------*/

.fruitarmy {
  /* border: 2px solid red; */
  position: relative;
  display: flex;
  justify-content: center;
  align-content: center;
}

.armystand {
  position: absolute;
  width: 25%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); 
}

.refugees {
  position: relative;
  height: 12%;
  width: 12%;
  right: -480px;
  top: -50px;
  /* border: 3px solid pink; */
}

.rifle {
  position: relative;
  height: 12%;
  width: 12%;  
  right: -440px;
  bottom: -20px;
}

.sniper {
  position: relative;
  height: 20%;
  width: 20%;  
  left: -250px;
  bottom: -100px;
}

.salute {
  position: relative;
  height: 20%;
  width: 20%;  
  left: -70px;
  bottom: -90px;
}


/*----------Grape Image Editing---------------------------------------------------------------------*/
/* borders for legibility */
.fruitpics1 {
  /*border: 4px solid red;*/
  position: relative; /* allows stacking */  
}

.fruitontable.grapes {
  transform: translateX(-50%) rotate(90deg);
  max-width: 62%;   /* slightly narrower after rotation */
  bottom: 20%;
  transform-origin: center center;
}

.fruitpics2 .fruitontable.grapes,
.fruitpics1 .fruitontable.grapes {
  transform: translateX(-50%) rotate(90deg) !important;
  transform-origin: center center;
  max-width: 560;
  bottom: 20%;
}

/*----------Pineapple Image Editing---------------------------------------------------------------------*/
.fruitpics1 figure > img.woodtable.pineapple,
.fruitpics1 figure > img.fruitontable.pineapple {
  aspect-ratio: auto;
  width: auto;
  max-width: 60%;
  max-height: none;
  border-radius: 0;
  margin-bottom: 50px;
}  



.fruitontable.pineapple {
  aspect-ratio: auto;
  width: 100%;
  border-radius: 0;

  max-height: 100%;       /* was 56% — bump it bigger */
  bottom: 10%;           /* lower it so it sits on the table */
  transform: translateX(-50%);
}

.fruitpics1 .fruitontable.pineapple,
.fruitpics2 .fruitontable.pineapple {
  max-height: 60%;  /* force back a constraint */
  bottom: 12%;
  transform: translateX(-50%);  /* keep centering */
}

/*----------Strawberry Image Editing---------------------------------------------------------------------*/

.fruitontable.strawberries {
  max-width: 50%;
  margin-bottom: 22px;
}

/*----------Bananas Image Editing---------------------------------------------------------------------*/

.fruitontable.bananas {
  max-width: 47%;
  margin-bottom: 29px;
}

/*----------Coconut Image Editing---------------------------------------------------------------------*/

.fruitontable.coconuts {
  max-width: 50%;
  margin-bottom: 18px;
}

/*----------Watermelon Image Editing---------------------------------------------------------------------*/

.fruitontable.watermelons{ 
  margin-bottom: 10px;
}

/*----------General Fruit Image Editing---------------------------------------------------------------------*/

.fruitontable {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);   /* keep this; per-fruit transforms must include it */
  max-width: 70%;
  max-height: 70%;
  width: auto;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.5));
}

.fruitpics1 .fruitontable,
.fruitpics2 .fruitontable {
  position: absolute;                  
  left: 50%;
  transform: translateX(-50%);
  bottom: 20%;                         
  width: 70%;                          
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); /* subtle lift */
}
/*----------Wood Table Image Editing---------------------------------------------------------------------*/

.woodtable {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;     /* match card width */
  height: auto;
  z-index: 1;
  pointer-events: none;
}

.fruitpics1 .woodtable,
.fruitpics2 .woodtable {
  position: absolute;
  bottom: 0;                          
  left: 50%;
  transform: translateX(-50%);
  width: 100%;                        
  height: auto;
  z-index: 1;
  pointer-events: none;                
}

/* ----------Fruit Pics 2 Box Editing--------------------------------------------------------------------- */

.fruitpics2 {
  /*border: 4px solid orange;*/
}

/* ----------Bamboo Floor Image Editing--------------------------------------------------------------------- */

.fruitpics1,
.fruitpics2 {
  background-image: url("../images/homepage/bamboofloor.png");
  width: 90%;
  background-size: 200px 200px;     /* scale down texture (try 80px, 100px, 120px) */
  image-rendering: pixelated; 
  margin: 24px auto 0;   /* center rows */
  max-width: 800px;     /* SIZE OF BOX - keep from stretching too wide on desktops */
  padding: 16px;
  display: flex;
  flex-wrap: wrap;       /* allow wrapping on smaller screens */
  justify-content: center;
  gap: 24px;             /* consistent spacing between items */
  position: relative;
}

/* ----------General Fruit Pics Image Editing--------------------------------------------------------------------- */

/* Make images scale while keeping a neat square look */
.fruitpics1 img,
.fruitpics2 img {
  width: clamp(80px, 12vw, 120px);  
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

/* figure alignment (image and button) */
.fruitpics1 figure,
.fruitpics2 figure {
  position: relative;                /* local stacking context */
  width: clamp(160px, 14vw, 220px);  /* consistent card width */
  aspect-ratio: 1 / 1;               /* neat square */
  overflow: visible;                  /* let tall fruit (pineapple) poke out if needed */
  margin: 0;
  text-align: center;
}

.fruitpics1 figcaption,
.fruitpics2 figcaption {
  margin-top: 8px;
  font-weight: 600;
}
/* button alignment (button only) */
a.fruit1-button-class,
a.fruit2-button-class {
  display: inline-block;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  color: #333;
  margin-top: 8px;
  text-decoration: none;
  z-index: 1;
}

/*--------------------------------------------------------------------------------------------*/
/* tighten gaps on very small screens */
@media (max-width: 820px) {
  .bottom-rect {
    grid-template-columns:
      clamp(110px, 20vw, 220px)
      minmax(360px, 1fr)
      clamp(110px, 20vw, 220px);
    gap: 12px;
  }
}