
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: 'Bungee', sans-serif;
  font-weight: 200; /* Vähennetty entisestään 300:sta */
  font-style: normal;
  padding-bottom: 100px; /* Puolitettu 200px:stä */
}

nav {
  background-color: white;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid #000;
}

nav ul {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav li {
  height: 60px;
}

nav a {
  height: 100%;
  padding: 0 50px;
  text-decoration: none;
  display: flex;
  align-items: center;
  color: black;
  font-family: 'Bungee', sans-serif;
  font-size: 20px; /* Pienennetty 24px -> 20px */
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: #d3d3d3;
}

nav li:first-child {
  margin-right: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  max-width: 85vw;
  z-index: 999;
  background-color: white;
  border-left: 3px solid black;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: 'Bungee', sans-serif;
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.2s ease;
  will-change: transform;
}

.sidebar.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sidebar[style*="display: flex"],
.sidebar[style*="display:flex"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sidebar li,
.sidebar a {
  width: 100%;
  font-size: 18px; /* Pienennetty 22px -> 18px */
}

@media(max-width: 1200px) {
  .hideOnMobile {
    display: none;
  }
}

.content {
  background-color: rgb(255, 255, 255);
  width: 90vh;
  padding: 20px;
  margin: 20px;
  margin-left: 20px;
  align-content: center;
  text-align: center;
}

.post {
  display: flex;
  background-color: rgb(255, 255, 255);
  width: 60%;
  max-width: 700px;
  border-radius: 10px;
  padding: 12px;
  margin: 10px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  gap: 16px;
}

.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  padding: 60px 5%;
  background-color: white;
  font-family: 'Bungee', sans-serif;
  border-top: 1px solid #eee;
  margin-top: 40px;
  pointer-events: none; /* Estää klikkaukset koko alueella */
}

.left-info, .right-info {
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: auto; /* Sallii klikkaukset näissä osioissa (mutta vain linkit toimivat) */
  font-size: 22px; /* Pienennetty 26px -> 22px */
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.left-info span, .right-info span {
  pointer-events: none; /* Varmistaa että tekstit eivät ole klikattavia */
}

.shop-btn {
  background-color: #8b0000;
  color: rgb(0, 0, 0);
  padding: 18px 40px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 18px; /* Pienennetty 20px -> 18px */
  transition: all 0.4s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: inline-block;
  margin-left: 20px;
  pointer-events: auto; /* Sallii klikkaukset painikkeessa */
}

.shop-btn:hover {
  background-color: #a50000;
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 40px rgba(139, 0, 0, 0.4);
  color: black;
}

@media (max-width: 992px) {
  .footer-info {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  .left-info {
    flex-direction: column;
    align-items: center;
  }
  .right-info {
    text-align: center;
  }
}

.post img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-content h2 {
  font-size: 1.1em;
  margin: 0 0 8px;
  color: #424242;
}

.post-content p {
  font-size: 0.9em;
  color: #303030;
  margin: 0 0 8px;
}

.post-content a {
  font-size: 0.85em;
  color: #007bff;
  text-decoration: none;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: block;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  top: 100%;
  left: 0;
  border-radius: 6px;
  overflow: hidden;
  transform: translateY(-10px);
  transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s;
}

.dropdown-content li {
  height: auto;
}

.dropdown-content li a {
  padding: 12px 16px;
  display: block;
  color: black;
  text-decoration: none;
  font-size: 20px;
  transition: background-color 0.3s ease;
}

.dropdown-content li a:hover {
  background-color: #d3d3d3;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.center-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 4%;
  padding: 20px;
  box-sizing: border-box;
}

.responsive-box {
  background: white;
  border-radius: 15px; /* Sama kuin kuvalla */
  width: 50%;
  max-width: 600px;
  min-width: 280px;
  text-align: center;
  margin: 100px;
  overflow: hidden; /* Pakottaa sisällön (kuvan) pysymään pyöristettyjen kulmien sisällä */
  display: flex;
}

.front-image {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: block;
}

img {
  max-inline-size: 100%;
}

.search {
  --padding: 14px;
  width: max-content;
  display: flex;
  align-items: center;
  padding: var(--padding);
  border-radius: 28px;
  background-color: #f6f6f6;
  width: 600px;
  transition: box-shadow 0.25s;
}

.search:focus-within {
  box-shadow: rgba(0,0,0,0.75);
}

.search-input {
  font-size: 16px;
  font-family: 'Bungee', sans-serif;
  color: #333333;
  margin-left: var(--padding);
  outline: none;
  border: none;
  background: transparent;
  flex: 1;
}

.search-input::placeholder {
  color: rgba(0,0,0,0.25);
}

#product1 {
  text-align: center;
  padding-top:20px;
}

.pro-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; 
    margin-top:20px;
  
}

.pro {
  flex: 0 1 calc(22% - 20px);
  box-sizing: border-box;
  min-width: 200px;
  padding: 10px;
  text-align: center;
  transition: 0.2s ease;
  background: #f9f9f9;
  border: 1px solid #ccc;
  position: relative;
  margin-top: 20px;
}

/* 🛠 Mobile layout fix */
@media (max-width: 768px) {
  .responsive-box {
    width: 95%;
    margin: 20px auto;
  }

  .product-showcase {
    padding: 20px;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
  }

  .product-details {
    flex-direction: column;
    gap: 10px;
    align-items: flex-end; /* Oikealle reunalle myös mobiilissa */
    text-align: right;
    padding: 15px 0; /* Sama padding kuin työpöydällä */
  }

  .price-action {
    flex-direction: column; /* Muutettu mobiilissakin pystysuuntaiseksi */
    justify-content: space-between;
    align-items: center; /* KESKITETTY */
    gap: 10px;
    width: 100%;
    height: 50px; /* Päivitetty korkeus 50px */
    margin-bottom: 20px; /* Lisätty tilaa alas päin */
  }

  .product-name-small {
      text-align: center; /* KESKITETTY */
      font-size: 15px;
      width: 100%;
    }

  .product-price {
    font-size: 14px;
  }

  .buy-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .product-info-text {
    text-align: left; /* Kuvaus pidetään vasemmalla jos se on pitkä */
    width: 100%;
  }

  .pro-container {
    flex-direction: column;
    align-items: center;
  }

  .pro {
    flex: none;
    width: 90%;
    max-width: 400px;
    padding-top:20px;
  }
}

#product1 .pro:hover {
  box-shadow: 20px 20px 30px rgba(0,0,0,0.06);
}

#product1 .pro img {
  width: 100%;
  height: auto;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
}

#product1 .pro .des {
  text-align: start;
  padding: 10px 0;
}

#product1 .pro .des h5 {
  padding-top: 7px;
  color: #1a1a1a;
  font-size: 20px;
}

#product1 .pro .cart {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50px;
  background-color: #e8f6ea;
  font-weight: 500;
  position: absolute;
  bottom: 20px;
  right: 10px;
}

/* Shop Page Styles */
.shop-container, .contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Bungee', sans-serif;
}

.product-showcase, .contact-form, .business-info {
  width: 100%;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 1);
  border: 3px solid black;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 768px) {
  .product-showcase, .contact-form, .business-info {
    padding: 20px;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
  }
}

.shop-image {
  width: 400px;
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: block;
  border: 3px solid black;
}

.product-details {
  display: flex;
  flex-direction: column;
  padding: 15px 0;
  margin-top: 10px;
  gap: 10px;
  width: 100%; /* Teksti käyttää koko showcase-alueen (600px) */
}

.product-info-text {
  order: 2; /* Kuvaus alemmaksi */
  text-align: left;
}

.price-action {
  order: 1; /* Nimi ja hinta ylimmäksi */
  display: flex;
  flex-direction: column; /* Muutettu pystysuuntaiseksi */
  justify-content: space-between; /* Ylhäällä nimi, alhaalla muut */
  align-items: center; /* KESKITETTY */
  width: 100%;
  height: 50px; /* Päivitetty korkeus 50px */
  margin-bottom: 20px; /* Lisätty tilaa alas päin */
}

.product-name-small {
  font-family: 'Bungee', sans-serif;
  font-size: 15px;
  font-weight: 200;
  color: black;
  text-align: center; /* KESKITETTY */
  width: 100%; /* Varmistaa että nimi vie tilan ylhäällä */
}

.price-and-button {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-end; /* Hinta ja nappi oikealle alhaalla */
}

.product-price {
  font-size: 14px; /* Vielä pienempi koko */
  font-weight: 900;
}

.product-description {
  font-family: 'Lexend Exa', sans-serif; /* "Soft" fontti infoon */
  font-size: 14px;
  line-height: 1.4;
  color: black;
  font-weight: 400;
}

.buy-btn {
  background-color: #8b0000;
  color: black;
  padding: 8px 16px; /* Pienempi nappi */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px; /* Pienempi teksti */
  transition: all 0.4s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-transform: uppercase; /* OSTA */
}

.buy-btn:hover {
  background-color: #a50000;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
  color: black;
}

.terms-trigger {
  background-color: black;
  color: white;
  border: 3px solid black;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: 'Bungee', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terms-top-right {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 10px 20px 0;
}

.terms-trigger:hover {
  background-color: #333;
  transform: translateY(-2px);
}

.terms-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1200;
}

.terms-modal.open {
  display: flex;
}

.terms-content {
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  background: white;
  border: 3px solid black;
  border-radius: 15px;
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 1);
  padding: 24px;
  font-family: 'Lexend Exa', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.terms-close {
  margin-top: 18px;
  background-color: black;
  color: white;
  border: 3px solid black;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: 'Bungee', sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.terms-close:hover {
  background-color: #333;
}

@media (max-width: 768px) {
  .terms-top-right {
    padding: 10px 10px 0;
  }
  .terms-trigger {
    font-size: 12px;
    padding: 8px 14px;
  }
}
