:root {
  --btn-add-to-cart-bg: #e4bc1c;
  --btn-add-to-cart-bg-hover: #bf9d17;
  --bg-white: #ffffff;
  --neutral-bg: #f4f4f4;               /* General neutral background */
}

/* ============ MAIN CART ============ */

/* .limit-message {
  display: block; 
  width: 100%; 
  margin-top: 8px; 
  color: rgb(165, 165, 165);
  background-color: #ffffff;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-style: italic;
} */

#cart-competitions-link,
#cart-raffles-link {
  color: #e4bc1c;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease;
}

#cart-competitions-link:hover,
#cart-raffles-link:hover {
  color: #9b8012;
}

.limit-message {
  border-radius: 6px;
  margin-bottom: 5px;
  margin-top: 15px;
  font-size: 14px;
  width: fit-content;
  color: #888;
  font-style: italic;
}

.cart-limit-message {
  color: rgb(102, 102, 102);
  padding: 5px 15px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 14px;
  width: fit-content;
  font-style: italic;
  align-self: center;
}

.cart-main {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
  padding-left: 25px;
  padding-right: 25px;
  padding-bottom: 50px;
  background-color: var(--neutral-bg);
  padding-top: 50px;
}

.cart-container {
  background-color: var(--bg-white);
  border: 1px solid #e1e1e1;
  padding: 2rem;
  max-width: 800px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.cart-title {
  text-align: center;
  font-size: 2rem;
  color: #1c1c1c;
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  padding-bottom: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-content: center;
}

/* ============ CART ITEM ============ */

.cart-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 1rem 1rem;
  padding-bottom: 20px;
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 2px 10px var(rgba(0, 0, 0, 0.05));
}

.cart-item__image {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

.cart-item__bottom {
  display: flex;
  flex-direction: column; /* stack elements vertically */
  align-items: flex-start; /* or center, depending on design */
  gap: 6px;
  justify-content: space-between;
  padding-top: 10px;
  gap: 15px;
}

.cart-item__quantity {
  display: flex;
  align-items: center;
  justify-content: space-between; /* spreads left/right */
  width: 100%; /* ensures it spans full row */
  gap: 12px;   /* optional, space between elements if needed */
}

.cart-item__price {
  font-weight: bold;
}

.cart-item__image img {
  width: auto;
  height: 100px;
  object-fit: contain;
}

.cart-item__info {
  flex: 1;
  min-width: 180px;
}

.cart-item__title {
  font-weight: 600;
  color: #222;
  margin-bottom: 0.5rem;
  word-break: break-word;
  font-size: large;
}

.cart-item__details {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cart-item__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.cart-item__price {
  color: #585858;
  font-style: italic;
  font-weight: 200;
}

.cart-item__ticket-price {
  font-size: medium;
  font-weight: 200;
  margin-bottom: 10px;
  font-style: italic;
}

.cart-item__remove {
  background: #e63946;            /* red background */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 35px;                    /* square button */
  height: 35px;
  margin-left: 15px;

  transition: background 0.2s ease;
  padding: 0;                     /* reset padding */
}

.cart-item__remove img {
  pointer-events: none;           /* makes click go through icon */
}

.cart-item__remove:hover {
  background: #d62828;            /* darker red on hover */
}

/* Remove button wrapper */
.cart-item__remove-btn {
  display: flex;
  align-items: center;
}

/* Container optional - if you want a wrapper for centering text too */
#cartLoadingSpinnerWrapper {
  display: flex;
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* centers vertically if container has height */
  padding: 10px;
}

/* Spinner itself */
.cart-spinner {
  display: inline-block;     /* visible when .hidden is removed */
  width: 30px;
  height: 30px;
  border: 4px solid #ccc;
  border-top-color: #e4bc1c; /* spinner color */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;        /* horizontally centers without wrapper */
}

/* Hide spinner by default */
.cart-spinner.hidden {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ QUANTITY SECTION ============ */

.cart-item__quantity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.quantity-btn {
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  background-color: var(--btn-add-to-cart-bg);
  color: var(--bg-white);
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.quantity-btn img {
  pointer-events: none;
}

.quantity-btn:hover {
  background-color: var(--btn-add-to-cart-bg-hover);
}

.quantity-input {
  width: 60px;
  text-align: center;
  font-size: 1rem;
  border: 0px solid #ccc;
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
  -moz-appearance: textfield;
  outline: none;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============ EMPTY CART / SUMMARY ============ */

.cart__empty-btn {
  background-color: #dc3545;
  color: #fff;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.cart__empty-btn:hover {
  background-color: #c82333;
}

.cart-empty-message {
  text-align: center;
  font-size: 1.1rem;
  color: #555;
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

.cart-summary {
  text-align: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

.cart-total {
  font-size: 1.3rem;
}

.cart-item-count {
  padding-bottom: 10px;
  opacity: 60%;
}

.cart-checkout {
  background-color: #e4bc1c;
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: center;
  min-width: 180px;
}

.cart-checkout:hover {
  background: var(--btn-add-to-cart-bg-hover);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .cart-container {
    padding: 1.5rem;
  }

  .cart-title {
    font-size: 1.8rem;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item__meta {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item__quantity {
    justify-content: center;
  }

  .cart-checkout {
    width: 100%;
    font-size: 1.1rem;
  }

  .cart-total {
    font-size: 1.2rem;
  }
}

@media (max-width: 1025px) {
  .cart-main {
    background-color: #ffffff;
  }

  .cart-container {
    background-color: #ffffff;
    border: none !important;
    box-shadow: none;
  }

  .cart-item {
    align-items: center;
  }

  .cart-item__meta {
    flex-direction: column;
  }
}