/* Reset och grund */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
}

/* checkout.css */

main h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #222;
}

main p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #444;
}

/* Back button */
.back-button {
  padding: 10px 20px;
  background-color: #f9c846;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #003057;
  transition: background-color 0.3s ease;
  margin: 10px 0;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.back-button:hover {
  background-color: #ffd45a;
}

/* Produktlista checkout */
#checkout-items {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

#checkout-items li {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Total summa */
#checkout-total {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

/* Eventuellt behålla denna som du hade för länkar med hover */
.checkout-link img {
  transition: transform 0.2s ease;
}

.checkout-link img:hover {
  transform: scale(1.05);
}

/* Om du har back-link i annan version */
.back-link {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 20px;
  background-color: #0070ba;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.back-link:hover {
  background-color: #005ea6;
}

/* Ram och bakgrund runt checkout */
main.main-content {
  max-width: 800px;
  margin: 180px auto 40px auto; /* Increased top margin to move checkout window down further */
  padding: 30px 40px;            /* Inre luft */
  text-align: center;
  font-family: 'Poppins', sans-serif;
  background-color: #f9f9f9;      /* Ljus bakgrund */
  border: 2px solid #f9c846;     /* Gulram som matchar knappen */
  border-radius: 12px;            /* Rundade hörn */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Mjuk skugga */
  transition: box-shadow 0.3s ease;
}

/* Lite mer luft ovanför och under h1 */
main.main-content h1 {
  margin-bottom: 30px;
}

/* Fin effekt när man hovrar över hela rutan */
main.main-content:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#checkout-items button {
  background-color: #f9c846;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 16px;
  color: #003057;
  transition: background-color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

#checkout-items button:hover {
  background-color: #ffd45a;
}


/* ------------------------------------ */
/* Ny styling för betalmetods-dropdown */
/* ------------------------------------ */

.payment-method-wrapper {
  max-width: 320px;
  margin: 1.5rem auto;
  text-align: left;
  font-weight: 600;
  color: #003057;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.payment-method-wrapper label {
  display: block;
  margin-bottom: 6px;
}

.payment-method-wrapper select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #f9c846;
  border-radius: 6px;
  background: white;
  color: #003057;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.payment-method-wrapper select:hover,
.payment-method-wrapper select:focus {
  border-color: #ffd45a;
  outline: none;
  box-shadow: 0 0 6px #ffd45a88;
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.quantity-controls button {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  border-radius: 6px;
  border: none;
  background-color: #f9c846;
  color: #003057;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.quantity-controls button:hover {
  background-color: #ffd45a;
}

.quantity-controls span {
  min-width: 24px;
  text-align: center;
  display: inline-block;
  font-weight: 600;
  font-size: 16px;
}

/* Mobile header spacing */
@media (max-width: 768px) {
  main.main-content {
    margin-top: 1rem; /* Reduced spacing since header is now static */
  }
}

@media (max-width: 480px) {
  .quantity-controls button {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .quantity-controls span {
    font-size: 14px;
    min-width: 20px;
  }
}
/* Styling för fraktadress-formuläret */
#shipping-form {
  max-width: 480px;
  margin: 2rem auto 3rem auto;
  text-align: left;
  font-weight: 600;
  color: #003057;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  background-color: white;
  padding: 20px 25px;
  border: 2px solid #f9c846;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

#shipping-form:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#shipping-form h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #222;
  text-align: center;
}

#shipping-form label {
  display: block;
  margin-bottom: 6px;
}

#shipping-form input[type="text"],
#shipping-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 2px solid #f9c846;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 400;
  color: #003057;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#shipping-form input[type="text"]:focus,
#shipping-form input[type="email"]:focus {
  border-color: #ffd45a;
  outline: none;
  box-shadow: 0 0 6px #ffd45a88;
}

/* Responsivt på små skärmar */
@media (max-width: 480px) {
  #shipping-form {
    padding: 15px 20px;
    max-width: 100%;
  }
}

input.input-error {
  border: 2px solid #e53935 !important;
  background-color: #ffebee;
}

input.input-success {
  border: 2px solid #43a047 !important;
  background-color: #e8f5e9;
}

/* Enkel styling för rabattkod */
#discount-code {
  width: 100%;
  padding: 10px;
  border: 2px solid #f9c846;
  border-radius: 6px;
  font-size: 1rem;
  color: #003057;
  margin-bottom: 10px;
}

#apply-discount-btn {
  width: 100%;
  padding: 10px;
  background-color: #f9c846;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  color: #003057;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#apply-discount-btn:hover {
  background-color: #ffd45a;
}

#discount-message {
  margin-top: 8px;
  font-weight: 600;
  color: #e53935; /* Röd för fel */
}

/* Gör "Rabbatkod" label fet */
label[for="discount-code"] {
  font-weight: 700;
}

/* Fraktalternativ wrapper */
.shipping-options {
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  text-align: left;
  font-weight: 600;
  color: #003057;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  background-color: white;
  padding: 20px 25px;
  border: 2px solid #f9c846;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.shipping-options:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.shipping-options h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #222;
  text-align: center;
}

/* Styling på varje label med radio */
.shipping-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  color: #003057;
  font-size: 1rem;
}

/* Radio buttons - större och tydligare */
.shipping-options input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid #f9c846;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: white;
  flex-shrink: 0;
}

.shipping-options input[type="radio"]:hover {
  border-color: #ffd45a;
  box-shadow: 0 0 6px #ffd45a88;
}

.shipping-options input[type="radio"]:checked {
  border-color: #f9c846;
  background-color: #f9c846;
}

.shipping-options input[type="radio"]:checked::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background-color: #003057;
  border-radius: 50%;
  position: relative;
  top: 4px;
  left: 4px;
}

/* Fraktkostnad text */
#shipping-cost {
  font-weight: 700;
  font-size: 1.25rem;
  color: #003057;
  display: inline-block;
  margin-top: 0.5rem;
  margin-left: 4px;
}

/* Responsivt på små skärmar */
@media (max-width: 480px) {
  .shipping-options {
    padding: 15px 20px;
    max-width: 100%;
  }

  .shipping-options label {
    font-size: 0.95rem;
  }
}
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.4s, visibility 0.4s;
}