.cart-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1d20;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-card {
  background: #fff;
  border: 1px solid #e8eaec;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.section-card-header {
  background: #f5f6f7;
  padding: 12px 18px;
  border-bottom: 1px solid #e8eaec;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1d20;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-card-body {
  padding: 16px 18px;
}

.product-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.product-table thead th {
  background: #f5f6f7;
  color: #6c757d;
  font-weight: 600;
  font-size: 0.73rem;
  padding: 8px 8px;
  white-space: nowrap;
  border-bottom: 1px solid #e8eaec;
}

.product-table thead th:first-child {
  padding-right: 16px;
}

.product-table thead th:last-child {
  padding-left: 16px;
}

.product-table tbody td {
  padding: 16px 8px;
  border-bottom: 1px solid #e8eaec;
  vertical-align: middle;
}

.product-table tbody td:first-child {
  padding-right: 14px;
}

.product-table tbody td:last-child {
  padding-left: 14px;
}

.product-table tbody tr:last-child td {
  border-bottom: none;
}

.product {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-img {
  width: 52px;
  height: 52px;
  background: #f5f6f7;
}

.product-name {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: #1a1d20;
}

.product-code {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 3px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #e8eaec;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  color: #1a1d20;
  display: flex;
  align-items: center;
  cursor: pointer;
  justify-content: center;
}

.qty-btn.trash {
  color: #dc3545;
}

.qty-val {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 4px;
  border: none;
  outline: none;
}

.price-col {
  font-weight: 600;
  font-size: 0.88rem;
}

.added-val {
  color: var(--blue-400);
  font-size: 0.78rem;
  font-weight: 500;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  background: #f5f6f7;
  border-top: 2px solid var(--blue-400);
  font-weight: 700;
  font-size: 0.92rem;
}

.total-amount {
  color: var(--blue-600);
  font-size: 1rem;
}

.form-select,
.form-control {
  border-radius: 8px;
  border: 1px solid #e8eaec;
  font-size: 0.82rem;
  padding: 9px 12px;
  color: #1a1d20;
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 16px 12px;
}

.form-select:focus,
.form-control:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px var(--blue-70);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.invoice-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-toggle input {
  display: none;
}

.toggle-track {
  width: 42px;
  height: 24px;
  background: #e8eaec;
  border-radius: 50px;
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  right: 3px;
  transition: right 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.invoice-toggle input:checked ~ .toggle-track {
  background: var(--blue-400);
}

.invoice-toggle input:checked ~ .toggle-track::after {
  right: 21px;
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.shipping-info {
  background: linear-gradient(135deg, var(--blue-70) 0%, var(--blue-50) 100%);
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  padding: 18px;
}

.shipping-info-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-400);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shipping-info p {
  font-size: 0.76rem;
  color: var(--blue-400);
  margin-bottom: 14px;
  line-height: 1.7;
}

.shipping-info p:last-child {
  margin-bottom: 0;
}

.btn-continue {
  background: var(--blue-400);
  color: #fff;
  border: 1.5px solid var(--blue-400);
  border-radius: 9px;
  padding: 11px 26px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: all 0.28s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  width: 100%;
}

.btn-continue:hover {
  background: var(--blue-600);
}

.btn-preview {
  background: transparent;
  color: var(--blue-400);
  border: 1.5px solid var(--blue-400);
  border-radius: 9px;
  padding: 11px 26px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.28s;
  justify-content: center;
  width: 100%;
}

.btn-preview:hover {
  background: var(--blue-400);
  color: #fff;
}

.btn-login {
  background: var(--orange-400);
  color: #fff;
  border: 1.5px solid var(--orange-400);
  border-radius: 9px;
  margin-top: 6px;
  padding: 10px 20px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: all 0.28s;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  width: 100%;
}

.btn-login:hover {
  background: var(--orange-600);
}

.empty-cart {
  text-align: center;
  padding: 44px 20px;
  color: #6c757d;
}

.empty-cart h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1d20;
}

.empty-cart a {
  color: #96989a;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 991.91px) {
  .cart-header h1 {
    font-size: 1.02rem;
  }

  .product-table thead {
    display: none;
  }

  .product-table tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #e8eaec;
  }

  .product-table tbody tr:last-child {
    border-bottom: none;
  }

  .product-table tbody td {
    display: flex;
    justify-content: space-between;
    border-bottom: none;
    padding: 7px 14px;
  }

  .product-table tbody td:nth-child(1) {
    display: none;
  }

  .product-table tbody td:nth-child(2)::before {
    display: none;
  }

  .product-table tbody td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 2px;
  }

  .section-card-body {
    padding: 13px;
  }

  .total-row {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Additions for the Laravel page
   ========================================================================== */

/* Sign-in and address prompts. The static page carried this look inline on a
   commented-out block. */
.login-wrapper {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--orange-100);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-70) 0%, var(--orange-50) 100%);
  box-shadow: rgba(0, 0, 0, 0.06) 0 1px 4px;
  color: var(--orange-400);
  /* it inherited the body size, which read a size larger than the cards beside it */
  font-size: 0.85rem;
}

.login-wrapper p.fw-bold {
  font-size: 0.92rem;
}

/* The preview control is a link to the pre-invoice page. */
a.btn-preview {
  text-decoration: none;
}

/* The toggle is a label, which would flip the box on a click anywhere along it. Only the switch
   itself takes the click: the words beside it and the space between let a click pass by. */
.invoice-toggle {
  pointer-events: none;
}

.invoice-toggle .toggle-track {
  pointer-events: auto;
}

/* The small X on a product image removes the whole row, whatever its quantity. */
.product-img-box {
  position: relative;
  flex-shrink: 0;
}

.cart-item-remove-x {
  position: absolute;
  top: -9px;
  right: -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  /* the icon draws its own ring; the white disc behind it is what makes the icon
     readable over the product picture */
  border: none;
  border-radius: 50%;
  background-color: #fff;
  color: #6c757d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.cart-item-remove-x svg {
  display: block;
  width: 100%;
  height: 100%;
}
