:root {
  --backgroundcolor: #f2f2e1;
  --topgrid: #d2be97;
  --lines: #495867;
  --text: #495867;
}
.fredericka-the-great-regular {
  font-family: "Fredericka the Great", serif;
  font-weight: 100;
  font-style: normal;
}

body {
    background-color: var(--backgroundcolor);
}

.squaretop {
      width: 100%;
      height: 15%;
      background-color: var(--topgrid);
      color: var(--text);
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      margin: 0%;
      margin-top: 0%;
      position: fixed;
      z-index: 2;
}

#topgrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    position: fixed;
    width: 99%;
    z-index: 3;
}

#felt1 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12vw;   /* Full viewport width */
  height: 12vh;  /* Full viewport height */
  overflow: hidden;
}

/* Responsive image */
#felt1 img {
  max-width: 12vw;   /* Scale to 90% of viewport width */
  max-height: 12vh;  /* Scale to 90% of viewport height */
  width: auto;
  height: auto;
  object-fit: contain;
}

#felt2 {
    background-color: var(--topgrid);
    text-align: center;
    font-family: "Gluten", cursive;
    border: 25px solid var(--topgrid);
    font-size: 3.5vh;
    color: var(--text);
}

#felt3 {
    background-color: var(--topgrid);
    text-align: right;
    border: 5px solid var(--topgrid);
}

line1 {
    background-color: var(--lines);
    position: absolute;
    position-area: center;
    position-area: top;
    margin: 0%;
    padding: auto;
    border-radius: 0px;
    height: 3px;
    width: 90%;
}

h1 {
    font-family: "hepta slab";
    font-size: 100%;
    text-align: center;
    color: var(--text);
}

h2 {
    font-family: "zain";
    font-size: 200%;
    text-align: center;
    color: var(--text);
}

h3 {
    font-family: "zain", serif;
    font-size: 500%;
    text-align: center;
    color: var(--text);
    margin-top: -2%;
}

h4 {
    font-family: "zain";
    font-size: 200%;
    text-align: center;
    
    color: var(--text);
}

p {
  font-family: "hepta slab", cursive;
    font-size: 80%;
    text-align: center;
    margin: 10%;
    margin-top: 0%;
    margin-bottom: 5%;
    
    color: var(--text);
}


#newsgrid {
    display: grid;
    grid-template-columns: 1fr;
    position: absolute;
    width: 70vw;
    box-sizing: border-box;
    left: 14%;
}

#newsfelt1, #newsfelt3, #newsfelt5 {
    background-color: #ffeb88;
    text-align: center;
    font-family: "hepta slab", cursive;
    border: 2vw solid #ffeb88; /* Scales with screen size */
    font-size: clamp(12px, 4vw, 170%); /* Responsive font size */
    color: var(--text);
    font-weight: 700;
    box-sizing: border-box;
}

#newsfelt2, #newsfelt4, #newsfelt6 {
    background-color: #ffeb88;
    text-align: center;
    font-family: "hepta slab", cursive;
    border: 2vw solid #ffeb88; /* Scales with screen size */
    font-size: clamp(12px, 4vw, 170%); /* Responsive font size */
    color: var(--text);
    font-weight: 500;
    box-sizing: border-box;
}

/* Carousel */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Work Sans', sans-serif;
  font-weight: 400;
  height: 100vh;
}

.wrapper {
  background: linear-gradient(-60deg, #bf90d5, #bf90d5);
  height: 100%;
  width: 80%;
  display: flex;
  justify-content: center;
  margin: 10%;
  border-radius: 8px;
}

.carousel {
  position: relative;
  width: 80%;
  max-width: 500px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.carousel__item {
  display: flex;
  align-items: center;
  position: absolute;
  width: 100%;
  padding: 0 12px;
  opacity: 0;
  filter: drop-shadow(0 2px 2px #555);
  will-change: transform, opacity;
  animation: carousel-animate-vertical 12s linear infinite;
  text-decoration: none;
  color: inherit;
}

.carousel__item:nth-child(1) {
  animation-delay: calc(3s * -1);
}

.carousel__item:nth-child(2) {
  animation-delay: calc(3s * 0);
}

.carousel__item:nth-child(3) {
  animation-delay: calc(3s * 1);
}

.carousel__item:nth-child(4) {
  animation-delay: calc(3s * 2);
}


.carousel__item-head {
  border-radius: 50%;
  background-color: white;
  width: 90px;
  height: 90px;
  padding: 14px;
  position: relative;
  margin-right: -45px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}

.carousel__item-head img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.carousel__item-body {
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  padding: 16px 20px 16px 70px;
}

.title {
  font-size: 20px;
  margin-top: 10px;
}

/*Animation for 4 items (25% per step)*/
@keyframes carousel-animate-vertical {
  0% {
    transform: translateY(100%) scale(0.5);
    opacity: 0;
    visibility: hidden;
  }
  3%, 25% {
    transform: translateY(100%) scale(0.7);
    opacity: 0.4;
    visibility: visible;
  }
  28%, 50% {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }
  53%, 75% {
    transform: translateY(-100%) scale(0.7);
    opacity: 0.4;
    visibility: visible;
  }
  78% {
    transform: translateY(-100%) scale(0.5);
    opacity: 0;
    visibility: visible;
  }
  100% {
    transform: translateY(-100%) scale(0.5);
    opacity: 0;
    visibility: hidden;
  }
}

/* Prevent body overflow */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#bottomgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: absolute;
    width: 100vw;
    left: 0;
    box-sizing: border-box;
}

/* Shared felt styles */
#bottomfelt1, #bottomfelt2, #bottomfelt3, #bottomfelt4,
#bottomfelt5, #bottomfelt6, #bottomfelt7, #bottomfelt8 {
    background-color: var(--topgrid);
    text-align: center;
    font-family: "hepta slab", cursive;
    border: 2vw solid var(--topgrid); /* Scales with screen size */
    font-size: clamp(12px, 4vw, 170%); /* Responsive font size */
    color: var(--text);
    font-weight: 700;
    box-sizing: border-box;
}

/*Burgermenu*/

.topnav {
  position: fixed;
  top: 19px;
  right: 16px;
  background-color: #333;
  z-index: 3;
  border-radius: 8px;
  overflow: hidden;
}

/* Container for the links */
.topnav #myLinks {
  display: none;
  flex-direction: column;
  background-color: #333;
}

/* All links */
.topnav a {
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  display: block;
}

/* Burger icon */
.topnav a.icon {
  background: #495867;
  text-align: center;
  cursor: pointer;
}

/* Hover state */
.topnav a:hover {
  background-color: #e9e9d8;
  color: #495867;
}

/* Active link styling */
.active {
  background-color: #04AA6D;
  color: white;
}

/*Shop Product Grid*/

.grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1.5rem;
    }

    .card {
      background: #bf90d5;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      overflow: hidden;
      transition: transform 0.2s;
    }

    .card:hover {
      transform: translateY(-5px);
    }

    .card img {
      width: 100%;
      height: 180px;
      object-fit: cover;
    }

    .card-content {
      padding: 1rem;
    }

    .card-title {
      font-size: 1.2rem;
      margin-bottom: 0.5rem;
      color: #495867;
      font-weight:bold;
    }

    .card-price {
      color: #ffeb88;
      font-weight: bold;
      margin-bottom: 1rem;
    }

    .card button {
      background-color: #495867;
      color: white;
      border: none;
      padding: 0.5rem 1rem;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
    }

    .card button:hover {
      background-color: #6b7f94;
    }