/* ------------------------------
   CART TABLE
------------------------------ */

.cart-content.loaded {
  opacity: 1;
}

.cart-header,
.cart-item {
  display: grid;
  grid-template-columns: minmax(350px, 1fr) 150px 120px 120px;
  gap: 30px;
  align-items: center;
}

.cart-header {
  padding: 15px 20px;
  border-bottom: 2px solid var(--bordercolour);

  font-family: "Cal Sans";
  font-size: .9rem;
  text-transform: uppercase;

  opacity: .7;
}

.cart-item {
  padding: 20px;
  border-bottom: 1px solid var(--bordercolour);
  transition: .2s ease;
  position: relative;
}

.cart-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}


/* ------------------------------
   PRODUCT COLUMN
------------------------------ */

.item-product {
  display: flex;
  align-items: center;
  gap: 20px;
}

.item-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.item-details h3,
.item-details p {
  margin: 0;
}


/* ------------------------------
   QUANTITY
------------------------------ */

.item-quantity {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 100;
}

.qty-btn {
  width: 34px;
  height: 34px;

  border: 1px solid var(--bordercolour);
  background: transparent;

  cursor: pointer;
  transition: .2s;
  z-index: 100;
}

.qty-btn:hover {
  background: var(--bordercolour);
}


/* ------------------------------
   PRICE COLUMNS
------------------------------ */

.cart-header span:not(:first-child),
.item-quantity,
.item-unit-price,
.item-total {
  justify-self: center;
  text-align: center;
}

.item-unit-price,
.item-total {
  font-family: "Cal Sans";
  font-size: 1.6rem;
  white-space: nowrap;
}


/* ------------------------------
   REMOVE BUTTON
------------------------------ */

.remove-item {
  margin-top: 12px;
  padding: 0;

  border: none;
  background: none;

  color: #bb5555;
  cursor: pointer;
}

.remove-item:hover {
  text-decoration: underline;
}


/* ------------------------------
   ORDER SUMMARY
------------------------------ */

.cart-summary {
  position: sticky;
  top: 120px;

  height: fit-content;

  padding: 30px;

  border: 1px solid var(--bordercolour);
  background: var(--backgroundcolour);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 18px 0;
}


/* ------------------------------
   SKELETON
------------------------------ */

.skeleton {
  overflow: hidden;
}

.loaded .skeleton {
  display: none;
}

.skeleton .item-image,
.skeleton .skeleton-title,
.skeleton .skeleton-text,
.skeleton .item-quantity,
.skeleton .item-unit-price,
.skeleton .item-total {
  border-radius: 6px;

  background: linear-gradient(90deg,
      #232323 25%,
      #333333 50%,
      #232323 75%);

  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton-title {
  width: 70%;
  height: 24px;
  margin-bottom: 10px;
}

.skeleton-text {
  width: 50%;
  height: 18px;
}

.skeleton .item-quantity {
  width: 110px;
  height: 40px;
}

.skeleton .item-unit-price {
  width: 90px;
  height: 24px;
}

.skeleton .item-total {
  width: 100px;
  height: 24px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.empty-cart {
  padding: 50px 0px;
  text-align: center;
}

@media (max-width: 1200px) {

  .cart-header :nth-child(3),
  .cart-header :nth-child(4) {
    display: none;
  }

}

.item-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}