/***** Kundvagn *****/

.cart_empty .button {
  color: #fff;
  padding: 12px;
}
.cart_empty {
  text-align: center;
  color:#616161;
}

.cart_empty .material-symbols-outlined {
  font-size: 3em;
}

.cart-page {
  max-width: 1000px;
  margin: 60px auto;
  padding: 30px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.cart-page h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  color: #222;
}

/* Tabellen */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.cart-table th,
.cart-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  white-space: nowrap;
}

/* Kolumnbredder */
.cart-table th:nth-child(1),
.cart-table td:nth-child(1) { width: 0; }
.cart-table th:nth-child(2),
.cart-table td:nth-child(2) { width: 20px; }
.cart-table th:nth-child(3),
.cart-table td:nth-child(3) { left: 0px; }
.cart-table th:nth-child(4),
.cart-table td:nth-child(4) { width: 80px; text-align: center; }
.cart-table th:nth-child(5),
.cart-table td:nth-child(5),
.cart-table th:nth-child(6),
.cart-table td:nth-child(6) { padding-left: 90px; }
.cart-table th:nth-child(7),
.cart-table td:nth-child(7) { left: 0px; }

.cart-table th {
  background: #f3f3f3;
  color: #333;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

.cart-table tr:hover {
  background: #fafafa;
}

/* Produktbild */
.cart-table img {
  width: 80px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Pris och summa */
.cart-table td:nth-child(5),
.cart-table td:nth-child(6) {
  font-weight: 600;
}

/* Totalsumma */
.cart-total {
  text-align: right;
  font-size: 1.3rem;
  margin-top: 25px;
  font-weight: bold;
  color: #333;
}

/* Knappar */
.cart-actions {margin-top:20px;}
.cart-actions .button,
.cart-actions .button-primary,
.cart_empty .button {
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  line-height: 1;
  padding: 0 20px;
  border-radius: 8px;
  text-decoration: none;
  margin: 0;
  box-sizing: border-box;
}

/* Gör dem exakt lika stora i .cart-actions-raden */
.cart-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

/* Färgtema – du kan ändra dessa två om du vill ha annan look */
.cart-actions .button {
  background-color: #7c91b5;
  color: #fff;
}

.cart-actions .button-primary {
  background-color: #4CAF50;
  color: #fff;
}

/* Hovereffekt – samma animation för båda */
.cart-actions .button:hover,
.cart-actions .button-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}


/* Uppdateringsformulär för antal */
.update-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qty-input {
  width: 60px;
  padding: 5px 6px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}

.cart-summary {
  text-align: right;
  margin-top: 20px;
  font-size: 1.1rem;
}

.cart-shipping {
  color: #555;
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .cart-page {
    padding: 10px;
  }

  .cart-page h1 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .cart-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }

  /* Dölj produktnamn */
  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) {
    display: none;
  }

  .cart-table td:nth-child(3),
  .cart-table th:nth-child(3) {
    padding-left: 16px; 
    text-align: left;
  }

  .cart-table th,
  .cart-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
  }

  .cart-table th {
    background: #f8f8f8;
    font-weight: 600;
    font-size: 0.75rem;
  }

  .cart-table tr:hover {
    background: #fafafa;
  }

  /* Mindre bilder */
  .cart-table img {
    width: 50px;
    height: auto;
    border-radius: 6px;
    box-shadow: none;
  }

  .cart-table td:nth-child(4) {
    text-align: center;
    vertical-align: middle;
    padding: 4px 0;
  }

  /* Antal-input */
  .cart-table .qty-input {
    width: 32px !important;
    height: 26px;
    padding: 0;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ccc;
    line-height: normal;
    position: relative;
    top: 7px;
  }

  .cart-table .qty-input::-webkit-inner-spin-button,
  .cart-table .qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Pris och summa */
  .cart-table th:nth-child(5),
  .cart-table th:nth-child(6),
  .cart-table td:nth-child(5),
  .cart-table td:nth-child(6) {
    text-align: left;
    padding-left: 16px;
    padding-right: 0;
    font-weight: 600;
  }

  /* Dölj kolumnen "Summa" på mobil */
  .cart-table th:nth-child(6),
  .cart-table td:nth-child(6) {
    display: none;
  }

  /* Totalsumma */
  .cart-total {
    font-size: 1rem;
    text-align: right;
    margin-top: 15px;
    font-weight: bold;
  }

  /* Knapparna nedanför */
  .cart-actions {
    display: flex;
    align-items: stretch;  
    justify-content: space-between;
    gap: 8px;
  }

  .cart-actions .button,
  .cart-actions .button-primary,
  .cart_empty .button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;  
    height: 44px;
    padding: 0 10px; 
    line-height: 1; 
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    margin: 0; 
    text-align: center;
  }

  .cart-actions .button-primary {
    margin-left: 0 !important;
  }
}
