/* === Allmänt === */
body {
    font-family: "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
}
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}
h1, h2, h3 {
    color: #222;
}
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
body:not(.dashboard):not(.produkter):not(.kategorier):not(.statistik):not(.exportera_rapport):not(.ordrar):not(.login):not(.logout)::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 9s ease-in-out;
  z-index: -1;
}

body:not(.dashboard):not(.produkter):not(.kategorier):not(.statistik):not(.exportera_rapport):not(.ordrar):not(.login):not(.logout).show-background::before {
  opacity: 0.1;
}

/* === Header / Footer === */
header, footer {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    margin-bottom: 20px;
}
footer {
  width: 100vw; /* Full bredd över hela skärmen */
  margin-left: calc(-50vw + 50%); /* Tar bort centreringen från .container */
  background-color: #f4f4f4;
  padding: 30px 0;
  border-top: 1px solid #ddd;
  text-align: center;
  box-sizing: border-box;
}

footer .footer-content {
  max-width: 960px;  /* Innehållet centreras som övriga sektioner */
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo {
  width: 150px;
  max-width: 90%;
  margin-bottom: 10px;
}

.footer-text {
  font-size: 0.85rem;
  color: #555;
}

/* === Navigering === */
nav a {
    margin-right: 15px;
    font-weight: bold;
}

/* === Produktkort === */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 60px; /* lägger till luft före footern */
}
.product-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  width: calc((100% - 40px) / 3);
  box-sizing: border-box;
  text-align: center;
  border-radius: 4px;
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 460px; /* kan behöva justeras beroende på innehållet */
}

.product-card h3 {
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

/* Tryck ner knappen + lägg till luft under */
.product-card .card-bottom {
  margin-top: auto !important;
  padding-top: 10px !important;
}

.product-card:hover {
  transform: translateY(-2px);  /* eller -10px för mer effekt */
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}
.product-card a:hover {
    text-decoration: none;  /* Tar bort understrykning */
}

.product-card .buy-btn {
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  color: #333;
  padding: 6px 14px;
  margin-bottom: 15px; /* justera värdet efter smak */
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.product-card .buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.product-image {
  flex: 1 1 300px;
  overflow: hidden;
}

.product-image img.zoomable {
  max-width: 100%;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.product-image:hover img.zoomable {
  transform: scale(1.1);
}

.product-info {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px;
}

.product-info .price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e1e1e;
  margin: 12px 0;
  font-family: 'Helvetica Neue', sans-serif;
  letter-spacing: 0.5px;
}

.product-price {
    font-size: 1.1rem;
    color: #333;
    margin: 8px 0;
    font-weight: bold;
}


/* Sold-badge som overlay */
.product-card .sold-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff9900;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 2;
}

.product-info select,
.product-info input[type="number"],
.product-info .buy-btn {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* === Länk-knapp (på startsidan) === */
a.buy-btn {
  display: block;
  width: 100%;
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  color: #333;
  padding: 10px 14px !important; /* Ökad höjd */
  font-size: 0.9rem !important;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin-top: 10px; /* Ger luft ovanför */
}

a.buy-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
}

/* === Produktknappen i formulär (produkt.php och kategori.php) === */
.buy-form .buy-btn {
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  color: #333;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  width: 100%;
}

.buy-form .buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Bekräftelsemeddelande */
.confirmation {
  background-color: #e0ffe0;
  border: 1px solid #a4d4a4;
  padding: 10px;
  border-radius: 5px;
  color: #2b662b;
  margin-bottom: 15px;
}

/* Länk till kassan */
.checkout-link {
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
  color: #333;
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.2s ease-in-out;
}

.checkout-link:hover {
  border-bottom: 2px solid #aaa;
}

/* === Formulär === */
form input, form textarea, form select, form button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
form button {
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}
form button:hover {
    background: #0056b3;
}

/* === Tabeller === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}
th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
th {
    background: #f1f1f1;
}

/* === Responsivitet === */
@media (max-width: 768px) {
    .product-card {
        width: calc(50% - 20px);
    }
}
@media (max-width: 480px) {
    .product-card {
        width: 100%;
    }
}
@media (max-width: 768px) {
  header::before {
    background-size: 400% auto;         /* 🔥 Gör loggan rejält mycket större */
    background-position: -260px 0px;     /* ⬅️ Flytta vänster + uppåt */
    opacity: 0.12;
    pointer-events: none;
  }
}

/* === Responsivitet slidecart === */
@media (max-width: 768px) {
  .slide-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 90vw;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
    overflow-y: auto;
    padding: 20px;
    display: block; /* säkerställ att den visas */
  }

  .slide-cart.open {
    transform: translateX(0);
  }

  .slide-cart .slide-cart-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }

  .slide-cart .slide-cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .slide-cart .slide-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .slide-cart .slide-cart-item-info .name {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.95rem;
  }

  .slide-cart .price-qty-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .slide-cart .price {
    font-size: 0.9rem;
    color: #555;
  }

  .slide-cart .slide-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .slide-cart .cart-qty-input {
    width: 50px;
    font-size: 1rem;
  }

  .slide-cart .remove-item-btn {
    font-size: 1.2rem;
    color: red;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .slide-cart .checkout-link {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 15px;
  }

  .slide-cart .total-amount,
  .slide-cart .free-shipping-msg {
    font-size: 1.1rem;
    text-align: center;
    margin: 10px 0;
  }

  .slide-cart .cart-brand-logo {
    text-align: center;
    margin-top: 20px;
  }

  .slide-cart .cart-brand-logo img {
    max-width: 100px;
    height: auto;
    opacity: 0.9;
  }

  .slide-cart .cart-separator {
    border: none;
    border-top: 1px solid #ccc;
    margin: 15px auto;
    width: 80%;
  }

  .slide-cart .payment-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .slide-cart .payment-icons img {
    width: 40px;
    height: auto;
  }

  .slide-cart .icon-sep {
    color: #ccc;
    margin: 0 6px;
  }

  .payment-icons img[alt="Swish"] {
    width: 50px;
  }
}

/* === Hero / Startsida === */
.hero {
    text-align: center;
    background: #ffffff;
    padding: 60px 20px 40px;
    border-radius: 6px;
    margin-bottom: 40px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero img {
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 6px 6px 0 0; /* om du vill matcha ramen */
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 2em;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.1em;
    margin-bottom: 20px;
}
.hero-button {
    display: inline-block;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
}
.hero-button:hover {
    background: #0056b3;
}
.status-ny {
    background-color: #007bff; /* Klar blå */
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}
.status-ej_betald {
    background-color: #FF0000; /* Röd */
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}
.status-betald {
    background-color: #28a745; /* Grön */
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}
.status-packas {
    background-color: pink;
    color: black;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.status-skickad {
    background-color: #6c757d; /* Grå */
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #f4f4f4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Skapa utrymme under headern */
main.container {
  margin-top: 220px; /* justera beroende på headerns höjd */
}
  

header::before {
    content: "";
    background: url('/hd/bilder/site_bilder/hatakka_design.png') no-repeat left center;
    background-position: 160px center;
    background-size: 70%;
    opacity: 0.05;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: 60%;
    z-index: 0;
}

header .container {
    position: relative;
    z-index: 1;
    background: transparent; /* viktigt */
}

header nav a {
    color: #111;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    margin-right: 20px;
    text-shadow:
        1px 1px 0 rgba(200, 200, 200, 0.5),
        2px 2px 0 rgba(180, 180, 180, 0.4);
    transition: transform 0.2s ease, text-shadow 0.2s ease;
}
header nav a:hover {
    transform: translateY(-2px);
    text-shadow:
        2px 2px 1px rgba(150, 150, 150, 0.5),
        3px 3px 2px rgba(130, 130, 130, 0.3);
}
header nav a.active {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    text-decoration-color: #333;
}


h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
    text-shadow:
        1px 1px 0 rgba(200, 200, 200, 0.5),
        2px 2px 0 rgba(180, 180, 180, 0.4),
        3px 3px 0 rgba(160, 160, 160, 0.3);
    transition: transform 0.2s ease;
}

h1:hover {
    transform: translateY(-2px);
}
.sold-text {
  color: orange;
  font-weight: bold;
  font-size: 0.85rem;
  display: block;
  margin-top: 4px;
}
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-left a,
.nav-right a {
  margin-right: 15px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.nav-right a {
  margin-left: auto;
  color: #222;
}
/* === Slide-cart stilar === */
.slide-cart {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  z-index: 2000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}

.slide-cart.open {
  right: 0 !important;
}

/* Header med titel och stäng-knapp */
.slide-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slide-cart-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.slide-cart-header button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Innehållssektionen */
.slide-cart-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Produktlistan */
.slide-cart-content ul#cart-items {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

/* Enskild varupost */
.slide-cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.slide-cart-item-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 4px;
}

.slide-cart-item-info {
  flex: 1;
}
.slide-cart-item-info .name {
  font-weight: bold;
  margin-bottom: 4px;
}
.slide-cart-item-info .price {
  font-size: 0.9rem;
  color: #555;
}

.slide-cart-item-qty {
  margin-left: 10px;
}
.slide-cart-item-qty input {
  width: 50px;
  padding: 4px;
  font-size: 0.9rem;
  text-align: center;
}

/* Totalbelopp */
.slide-cart-total {
  font-size: 1.4rem;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* Checkout-knapp längst ner */
.slide-cart-content .button {
  display: block;
  text-align: center;
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  color: #333;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  margin-top: auto;
  text-decoration: none;
}

.slide-cart-content .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
/* === Gå till kassan-knapp i slide-cart === */
.slide-cart .checkout-link {
  display: block;
  max-width: 310px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(to bottom, #e0e0e0, #cfcfcf);
  color: #333;
  padding: 15px 20px; /* lite högre än tidigare */
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin-top: auto;
}

.slide-cart .checkout-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
/* Säkerställ att betalningsikonerna syns */
.slide-cart .payment-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.slide-cart .payment-icons img {
  width: 40px;
  height: auto;
}

.slide-cart .icon-sep {
  color: #ccc;
  margin: 0 8px;
}
.payment-icons img[alt="Swish"] {
  width: 50px; /* större än de andra */
}
.slide-cart .free-shipping-msg {
  color: black;
  font-weight: normal;
  text-align: center;
  margin-top: -5px;
  margin-bottom: 15px;
  font-size: 0.95rem;
}
/* antal‐inputruta mindre */
.slide-cart .slide-cart-item-qty input {
  width: 40px;  /* tidigare 50px, gör den smalare */
  padding: 2px;
  font-size: 0.9rem;
}

/* knapp för att ta bort varan */
.slide-cart .remove-item-btn {
  background: transparent;
  border: none;
  color: red;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
  margin-left: 10px;
}

/* loggs i slide-cart */
.cart-brand-logo {
  text-align: center;
  margin-bottom: 10px;
}

.cart-brand-logo img {
  max-width: 120px;
  height: auto;
  opacity: 0.9;
}

.cart-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px auto;
  width: 80%;
}

/* === swish-knappar === */
.swish-button {
  background: #fff;
  border: 2px solid #5bcb02;
  color: #333;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.swish-button img.swish-logo {
  height: 24px;
}

/* === Storleksval – helt sömlös och utan dubbla lager === */
fieldset {
  border: none;
  padding: 0;
  margin-top: 10px;
}

fieldset legend {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
}

.sizes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Etikett fungerar som knapp */
.sizes-grid label {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.95rem;
  user-select: none;
  background: #f8f8f8;
  box-shadow: 0 2px 3px rgba(0,0,0,0.05);
  color: #000;
}

/* Hover – lätt blå touch */
.sizes-grid label:hover {
  background: #e8f1ff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Döljer checkboxen helt */
.sizes-grid input[type="checkbox"] {
  display: none;
}

/* När vald – ändra direkt på label via sibling selector */
.sizes-grid input[type="checkbox"]:checked + label {
  background: linear-gradient(135deg, #007bff, #3399ff);
  color: #fff;
  box-shadow: none;
  transform: none;
}

/* Klick-tryck (utan hopp) */
.sizes-grid label:active {
  filter: brightness(0.92);
  transform: scale(0.98);
}

/* === Knappen för Skapa / Uppdatera === */
form button[type="submit"] {
  margin-top: 20px;
  background: linear-gradient(135deg, #007bff, #3399ff);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

form button[type="submit"]:hover {
  background: linear-gradient(135deg, #0062cc, #2680e6);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Tryck-effekt på klick */
form button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Fokus och highlight tas bort */
.sizes-grid label,
.sizes-grid input[type="checkbox"]:focus + label {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* === Mobilanpassning för hela sidan === */

/* För skärmar upp till 768px */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  nav {
    /* Exempel: visa hamburgermeny eller gör nav vertikalt */
    flex-direction: column;
  }
  nav a {
    margin: 8px 0;
  }
  .product-grid {
    gap: 10px;
  }
  .product-card {
    width: 100%;  /* en produkt per rad mobil */
  }
  .product-info select,
  .product-info input[type="number"],
  .product-info .buy-btn {
    width: 100%;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }
}
/* Mobilanpassning för index (home) – 3 i rad på små skärmar */
@media (max-width: 768px) {
  /* 🏠 Startsida – 3 produkter i rad */
  body.home .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* 📂 Huvudkategori – behåller scroll/pilar (swimlane) */
  body.kategori.huvudkategori .product-swimlane {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  body.kategori.huvudkategori .product-swimlane .product-card {
    flex: 0 0 calc((100% / 3) - 15px);
    min-width: 280px;
    box-sizing: border-box;
  }

  /* 🧩 Underkategori – grid med 2 produkter i rad */
  body.kategori.underkategori .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  body.kategori.underkategori .product-card {
    width: 100%;
    box-sizing: border-box;
  }
}
  /* I vissa fall ligger bild/text i en .product-inner eller liknande wrapper – för säkerhets skull */
  body.kategori .product-grid .product-item > * {
    width: 100%;
  }
}

/* För skärmar upp till 480px */
@media (max-width: 480px) {
  .product-card {
    padding: 5px;
  }
  .buy-btn {
    padding: 12px;
    font-size: 1rem;
  }
  .product-detail {
    flex-direction: column;
  }
  .product-image {
    width: 100%;
  }
  .product-info {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.category .product-grid .product-card {
    width: 100%;
  }
}


/* === Justering: Produktknappen (endast produkt.php) === */
.product-info button.buy-btn {
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  color: #333;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  text-align: center;
  text-decoration: none;
}

.product-info button.buy-btn:hover {
  background: linear-gradient(to bottom, #fff, #f1f1f1);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.product-info button.buy-btn:focus {
  outline: none;
  box-shadow: none;
}

.product-info button.buy-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.checkout-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

.checkout-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.checkout-info {
  flex: 1;
  font-size: 0.95rem;
}

/* === Dropdown för underkategorier (stabil + ingen radbrytning) === */

/* Behåll nav-left som block så länkarna ligger på en rad via befintlig header-stil */
.nav-left {
  display: block;
}

/* Varje huvudkategori fungerar som ankarpunkt för dropdown */
.nav-item {
  position: relative;
  display: inline-block;
  padding-bottom: 6px; /* gör hover-zonen lite större under länken */
}

/* Själva dropdownen – enkel, utan bakgrund, placerad direkt under */
.nav-item .dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%; /* direkt under huvudlänken */
  z-index: 1001;
  padding-top: 4px; /* liten buffert så hover inte bryts */
  margin: 0;
  background: transparent;
  white-space: nowrap; /* hindrar radbrytning */
}

/* Dropdown ska visas både vid hover på huvudkategori och när man är över dropdownen */
.nav-item:hover .dropdown,
.nav-item .dropdown:hover {
  display: block;
}

/* Underkategorilänkar – vertikal lista, samma typstil som övriga länkar */
.nav-item .dropdown a {
  display: block;
  margin: 2px 0;
  padding: 0;
  background: transparent;
  color: #111;
  font-size: 1.05rem;
  font-weight: bold;
  text-decoration: none;
  text-shadow:
    1px 1px 0 rgba(200, 200, 200, 0.5),
    2px 2px 0 rgba(180, 180, 180, 0.4);
  transition: transform 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap; /* 👈 ingen radbrytning på texten */
}

/* Hover-effekt på underkategorier – matchar huvudmenyn exakt */
.nav-item .dropdown a:hover {
  transform: translateY(-2px);
  text-shadow:
    2px 2px 1px rgba(150, 150, 150, 0.5),
    3px 3px 2px rgba(130, 130, 130, 0.3);
}
/* === MOBILANPASSNING: HAMBURGERMENY + KUNDVAGN === */

@media (min-width: 769px) {
  /* Dölj endast hamburgaren på desktop */
  .hamburger,
  #mobile-menu-toggle {
    display: none;
  }

  /* Behåll .mobile-header-bar synlig och snygg på desktop */
  .mobile-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: none;
    background-color: transparent; /* Justera om du vill ha vit */
  }
}
@media (min-width: 769px) {
  #open-cart-link-mobile {
    display: none;
  }
}

  .hamburger,
  #mobile-menu-toggle {
    font-size: 2rem;
    background: transparent;
    color: #000;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    margin-left: 0;
    margin-bottom: 0 !important;
  }

  #open-cart-link-mobile {
    font-size: 1.6rem;
    color: #000;
    text-decoration: none;
    position: relative;
    z-index: 9999;
    display: inline-block;
    cursor: pointer;
  }

  .mobile-nav-wrapper {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
  }

  .mobile-nav-wrapper.open {
    display: block;
  }

  .mobile-nav-wrapper nav {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Lite mindre mellanrum */
  }

  .mobile-nav-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-nav-wrapper .nav-item > a {
    color: #000;
    font-weight: bold;
    text-decoration: none;
    display: block;
  }
  @media (max-width: 768px) {
  .mobile-nav-wrapper a.active {
    border-bottom: 2px solid #000;
    padding-bottom: 2px; /* lite spacing från text till streck */
  }
}


  .main-nav {
    display: none !important;
  }
}

/* === DESKTOP – Göm mobilkomponenter === */
@media (min-width: 769px) {
  .mobile-nav-wrapper,
  #open-cart-link-mobile {
    display: none !important;
  }
}

/* Tillåt klick genom header-bakgrund */
header::before {
  pointer-events: none;
}

/* === Mobilmenystruktur === */
.mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accordion-item {
  margin-bottom: 4px;
}

.accordion-toggle {
  all: unset;
  display: inline-block; /* ✅ bara under texten */
  margin: 2px 0;
  padding: 0;
  background: transparent;
  color: #111;
  font-size: 1.05rem;
  font-weight: bold;
  text-decoration: none;
  text-shadow:
    1px 1px 0 rgba(200, 200, 200, 0.5),
    2px 2px 0 rgba(180, 180, 180, 0.4);
  transition: transform 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.accordion-toggle:hover {
  transform: translateY(-2px);
  text-shadow:
    2px 2px 1px rgba(150, 150, 150, 0.5),
    3px 3px 2px rgba(130, 130, 130, 0.3);
    text-decoration: underline;
}

/* 🔥 Plustecken – helt borttaget oavsett vad som satt tidigare */
.accordion-toggle::after {
  content: none !important;
  display: none !important;
}

/* Submeny (underkategorier) */
.submenu {
  display: none;
  list-style: none;
  padding-left: 14px;
  margin-top: 4px;
  border-left: none; /* Ta bort linjen om du vill – annars behåll */
}

.submenu li a {
  display: block;
  color: #333;
  font-weight: normal;     /* tunnare */
  text-decoration: none;
  padding: 4px 0 4px 10px; /* mer indrag */
  font-size: 0.95rem;
}

.submenu li a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  .product-card {
    max-width: 100%;
    box-sizing: border-box;
  }
}
@media (max-width: 768px) {
  .hero {
    width: 100vw;
    margin-left: calc(-1 * (100vw - 100%) / 2);
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
}
.nav-item .dropdown {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px 14px;
  position: absolute;
  z-index: 100;
}
@media (max-width: 768px) {
  .mobile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 6px;
    background: transparent;
    border-bottom: none;
    min-height: 36px;
  }

  .mobile-header-bar .hamburger {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
  }

  .mobile-header-bar .mobile-logo {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    color: #000;
  }

  .mobile-header-bar .cart-link {
    font-size: 1.5rem;
    color: #000;
    text-decoration: none;
    margin-left: auto;
    padding-left: 10px;
  }
}
/* ============================= */
/* PATCH: Header & meny fix       */
/* ============================= */

/* Dölj mobil-hamburger och mobil kundvagnsikon på desktop */
@media (min-width: 769px) {
  .hamburger,
  #mobile-menu-toggle,
  #open-cart-link-mobile {
    display: none !important;
  }

  /* Se till att desktop-menyn syns */
  .main-nav {
    display: flex !important;
    align-items: center;
  }

  /* Se till att header bar med logga och kundvagn syns på desktop */
  .mobile-header-bar {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;     /* 👈 Lägg till denna rad */
    padding: 12px 24px;
    background-color: transparent;
    /* Om streck stör, kommentera ut nästa rad: */
    /* border-bottom: none !important; */
  }
}

/* För mobilvy – se till att hamburger, logga och kundvagn är rätt placerade */
@media (max-width: 768px) {
  .main-nav {
    display: none !important;
  }

  .mobile-header-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: transparent;
    border-bottom: none;
    min-height: 48px;
  }

  .mobile-header-bar .hamburger {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
  }

  .mobile-header-bar .mobile-logo {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    color: #000;
  }

  .mobile-header-bar .cart-link {
    font-size: 1.5rem;
    color: #000;
    text-decoration: none;
    padding-left: 10px;
  }
}
@media (max-width: 768px) {
  header {
    padding: 0 !important;
  }

  header .container {
    padding: 0 !important;
    margin: 0 !important;
  }

  .mobile-header-bar {
    padding: 6px 10px !important;
    min-height: auto !important;
  }

  .mobile-header-bar .mobile-logo {
    font-size: 1.2rem !important;
    margin: 0 !important;
  }

  main.container {
    margin-top: 100px; /* justera efter hur mycket plats headern faktiskt tar */
  }
}
@media (min-width: 769px) {
  .mobile-logo {
    position: relative;  
    top: 16px;     /* flytta ner lite */
    margin-left: -26px;  /* flytta lite åt vänster */
  }
}
@media (max-width: 768px) {
  .hero {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
}
