html, body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px; /* som du hade */
}

/* =========================
   TEXT
   ========================= */

h1, h2 {
  color: black;
  text-align: center;
}

p {
  color: navy;
  line-height: 1.6;
}

/* =========================
   LAYOUT
   ========================= */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.block {
  margin-top: 150px;
  text-align: center;
}

/* =========================
   SEARCH
   ========================= */
.search {
    --padding: 10px;
    display: flex;
    align-items: center;
    padding: var(--padding);
    border-radius: 28px;
    background: white;
    border: 3px solid black;
    position: sticky;
    top: 0;

    width: 100%;
    max-width: 320px;
    height: auto;
    box-sizing: border-box;
}

.search-input {
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #333;
    outline: none;
    border: none;
    background: transparent;

    width: 100%;
}

/* =========================
   NAVBAR- Desktop/Mobil
   ========================= */

@media (min-width: 480px) {
  .navbar {
    background-color: white;
    position: absolute;
    top: 0;
    width: 100%;
  }

  .navbar a {
    float: left;
    display: block;
    background-color: white;
    color: black;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
  }

  .dropdown {
    float: left;
    overflow: hidden;
  }

  .dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: black;
    padding: 14px 16px;
    font-family: inherit;
    margin: 0;
    cursor: pointer;
  }

  .navbar a:hover,
  .dropdown:hover .dropbtn {
    color: white;
    background-color: black;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
  }

  .dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    display: block;
    text-align: left;
  }

  .dropdown-content a:hover {
    background-color: black;
    color: white;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* =========================
   GALLERY
   ========================= */

.gallery {
  display: flex;
  flex-wrap: wrap;
}

.gallery-item {
  width: 180px;
  margin: 5px;
  border: 1px solid #ccc;
}

.gallery-item:hover {
  border-color: black;
}

/* =========================
   PALWORLD – VIDEOS 
   ========================= */

.palworld-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.palworld-video {
  width: 400px;
  height: 400px;
  background: #000;
}

.palworld-text {
  max-width: 400px;
  text-align: left;
}

/* =========================
   GAME SUPPORT
   ========================= */

#gamesupportframe {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#gamesupportframe img {
  width: 80px;
  height: 80px;
  margin: 5px;
}

/* =========================
   CHAT 
   ========================= */

.chat-popup {
  position: fixed;               /* KRITISKT FIX */
  top: 100px;
  left: 100px;
  width: 300px;
  max-width: calc(100vw - 20px);
  min-height: 200px;
  max-height: 400px;
  background-color: white;
  border: 2px solid black;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  z-index: 9999;
}

.chat-header {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  background-color: #f2f2f2;
  padding: 8px;
  border-bottom: 2px solid black;
}

#chatBox {
  flex: 1;
  min-height: 60px;
  max-height: 150px;
  overflow-y: auto;
  margin: 10px 0;
  padding: 5px;
  border: 1px solid #ccc;
  background-color: #fafafa;
}

.chat-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

#usernameInput,
#messageInput {
  width: 90%;
  max-width: 250px;
  padding: 6px;
}

#messageInput {
  height: 60px;
  resize: none;
}

#sendButton {
  width: 120px;
  height: 35px;
  background-color: gray;
  color: black;
  border: none;
  cursor: pointer;
}
/* =========================
   MOBIL
   ========================= */

@media (max-width: 768px) {

  header {
    display: none;
  }

  .mobile-container {
    display: block;
  }

  .search {
    width: 90%;
    margin: 10px auto;
  }

}


  .chat-popup {
    top: 20px;
    left: 5%;
    width: 90%;
    max-width: 320px;
  }

  h1 {
    font-size: 1.8rem;
  }
}
/* =========================
   Admin- Panel
   ========================= */
/* Desktop */
.admin-link {
  float: right;
  color: white;
  padding: 8px 12px;
  text-decoration: none;
}

.admin-link:hover {
 background:#555;
}

/* Mobil */
#myLinks .admin-link {
  float: none;
  display: block;
  margin: 10px 0;
  text-align: left;
}

/* =========================
   FOOTER / INFO
   ========================= */

.info {
  margin-top: auto;
  padding: 20px;
  border: 3px solid black;
  background-color: white;
}
/* =========================
   COOKIE-BANNER 
   ========================= */
.cookie-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 90%;
  max-width: 500px;

  background: white;
  border: 2px solid black;
  border-radius: 8px;

  padding: 20px;
  display: none; /* visas via JS */

  display: flex;
  flex-direction: column;
  gap: 15px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  box-sizing: border-box;
}

/* Text och länkar */
.cookie-banner p {
  margin: 0;
  color: black;
}

.cookie-banner a {
  color: navy;
  text-decoration: underline;
}

/* Knappar */
.cookie-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-buttons button {
  padding: 10px 16px;
  cursor: pointer;
  border: none;
  font-size: 14px;
  background: blue;
  color: white;
}

#acceptCookies {
  background: green;
  color: white;
}

#declineCookies {
  background: red;
  color: white;
}

/* Mobil */
@media (max-width: 768px) {
  .cookie-banner {
    width: 95%;
    padding: 15px;
  }

  .cookie-buttons button {
    flex: 1 1 auto;
  }
}
/* =========================
   Product and Price Section
   ========================= */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f7fb;
  color: #333;
  margin: 0;
  padding: 0;
}

/* =========================
   PRODUKT & KUNDVAGN
========================= */
.product-container {
  max-width: 800px;
  width: 95%;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.product-container h1 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #444;
}

.product-container p,
.product-price {
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: bold;
  color: #28a745;
}

/* Flexbox för kundvagn */
.cart-frame {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.cart-frame input[type="number"],
.cart-frame button {
  flex: 1 1 60px;
  padding: 10px;
  font-size: 1em;
}

#cart-items {
  width: 100%;
  margin-top: 10px;
  font-weight: bold;
}

/* =========================
   MODAL
========================= */
#cart-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  z-index: 999;
}

#cart-modal-content {
  background: #fff;
  padding: 30px 40px;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  text-align: center;
}

#cart-modal-content h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: #333;
}

/* Checkout-form */
#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#checkout-form label {
  text-align: left;
  font-weight: bold;
  color: #555;
}

#checkout-form input,
#checkout-form textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#checkout-form textarea {
  resize: vertical;
  height: 100px;
}

/* =========================
   Kundvagnsknappar
========================= */

/* Lägg i kundvagnen - grön */
.add-to-cart {
  background-color: #28a745; /* grön */
  color: white;
}

.add-to-cart:hover {
  background-color: #218838;
}

/* Töm kundvagnen - röd */
#clear-cart {
  background-color: #dc3545; /* röd */
  color: white;
}

#clear-cart:hover {
  background-color: #c82333;
}


/* =========================
   CHECKOUT CONTAINER
========================= */
.checkout-container {
  max-width: 600px;
  width: 95%;
  margin: 50px auto;
  padding: 25px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.checkout-container h1 {
  font-size: 2.2em;
  color: #28a745;
  margin-bottom: 20px;
}

.cart-summary {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #555;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

/* =========================
   MOBILANPASSNING
========================= */
@media screen and (max-width: 500px) {
  .product-container,
  .checkout-container,
  #cart-modal-content {
    width: 95%;
    padding: 15px;
    margin: 20px auto;
  }

  .product-container h1,
  .checkout-container h1,
  #cart-modal-content h2 {
    font-size: 1.6em;
  }

  .cart-frame {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .cart-frame input[type="number"],
  .cart-frame button,
  .checkout-form input,
  .checkout-form textarea,
  .checkout-form button,
  #continue-shopping,
  #checkout-button,
  #clear-cart {
    font-size: 0.95em;
    padding: 10px;
    width: 100% !important;
  }
}




/* =========================
   FIREFOX-ONLY COMPLETE FIX
   ========================= */
@-moz-document url-prefix() {

  /* Search bar sticky minor nudge */
  .search {
    top: 0.1px; 
    z-index: 1000; /* ovanför content men under navbar */
  }

  /* Navbar behåller sin position som i Chrome/Edge */
  .navbar {
    position: absolute; /* precis som övriga webbläsare */
    top: 0;
    width: 100%;
    z-index: 1100;
    background-color: white; /* säkerhetsåtgärd */
  }

  /* Gallery fix – skapa utrymme så den inte täcks av navbar */
  .gallery {
    position: relative;
    z-index: 1;
    margin-top: 60px; /* matcha navbarens höjd */
  }

  .gallery-item {
    box-sizing: border-box;
  }

  /* Palworld-video fallback */
  .palworld-video {
    height: auto;
    max-width: 400px;
  }

  @supports not (aspect-ratio: 1 / 1) {
    .palworld-video {
      height: 0;
      padding-bottom: 100%;
    }
  }

  /* Chat-popup fix */
  .chat-popup {
    top: 20px;
    left: 5%;
    z-index: 9999;
  }

  .chat-input > * {
    margin-bottom: 8px;
  }

  .chat-input > *:last-child {
    margin-bottom: 0;
  }

  /* Palworld flexbox fix */
  .palworld-section {
    margin-top: 100px; /* justera till navbarens höjd */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
  }

}
@-moz-document url-prefix() {
  h1[style*="color: black"] {  /* selekterar just dina rubriker med inline color */
    margin-top: 60px;          /* justera tills About: syns helt */
  }
}
