/* ----------------------- Shop Page Design Start  ----------------- */
html {
  overflow-y: scroll;
}

:root {
  --brand-brown: hsl(19, 14%, 31%);
  --brand-tan: hsl(36, 25%, 69%);
  --brand-orange: hsl(30, 33%, 53%);
  --background-off-white: hsl(36, 100%, 98%);
}

/* ------------------ Shop Page All products view --------------------------*/
.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: auto;

}

.cart-button {
  border: none;
  background-color: transparent;
}

.cart-button {
  background-color: #28a745;
  color: white;
  padding: 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cart-button:hover {
  background-color: #218838;
}

.wishlist-btn {
  border: none;
  background-color: transparent;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.product-buttons {
  border: none;
  display: flex;
  margin-top: 1rem;
}

.product-buttons form {
  border: none;
}

.product-card {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--brand-brown);
  padding: 10px;
  width: 300px;
  margin: auto;
  margin-top: 60px;
}

.product-card-img {
  width: 100%;
  height: 200px;
  margin-bottom: 10px;
  text-align: center;
}

.product-card-img a img {
  max-width: 100%;
  max-height: 100%;
}

.product-card:hover {
  transform: scale(1.02);
}

.product-card-title a {
  text-decoration: none;
  color: black;
  font-size: 20px;
  margin: 0;
  text-align: center;
}
.product-card-title {
  height: 50px; /* Adjust as needed */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-price {
  font-size: 18px;
  margin: 0;
  text-align: center;
}

.product-card-details {
  padding: 0 1rem;
}

/* ----------------------- Shop Page Design End ----------------- */

/* ----------------------- Individual Product Page Design Start ----------------- */

.check-out-login-area {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  max-width: 400px;
  margin: 1rem auto;

}
.single_product_container {
  padding: 1rem;
  max-width: 800px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  /* Image column and content column */
  grid-template-rows: auto auto auto auto auto;
  gap: 1rem;
  align-items: start;
}

.single_product_photo {
  grid-row: 1 / 8;
  /* Span all 5 rows */
  grid-column: 1 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.single_product_photo a img {
  width: 250px;
  height: auto;
  object-fit: contain;
}

.single_product_title {
  grid-row: 1/ 2;
  grid-column: span 2;
}

.single_product_roast_profile {
  grid-row: 2;
  grid-column: span 2;
}
.single_product_flavor {
  grid-row: 3;
  grid-column: span 2;
}
.single_product_origin {
  grid-row: 4;
  grid-column: span 2;
}
.single_product_short_description {
  grid-row: 5;
  grid-column: span 2;
}
.size_options {
  grid-row: 1 / 3;
  grid-column: span 2;
}

.single_product_description {
  display: flex;
  flex-direction: column;
}

.single_product_description {
  grid-row: 7 / 8;
  grid-column: 1/4;
}

.hidden {
  display: none;
}

.might-like {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

.might-like .like-product-card {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
}

.like-product-card-title a {
  text-decoration: none;
  color: var(--brand-brown);
}

.like-product_roast_profile {
  text-align: center;
}

@media (max-width: 700px) {
  .single_product_container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 450px;
    margin: auto;
    padding: 1rem;
  }
}

.block {
  display: block;
  margin: 2rem 0;
}

.block h3 {
  margin: 0 auto 2rem auto;
}

.might-like {
  display: flex;
  max-width: 80vw;
  margin: auto;
  gap: 20px;
}

.like-product-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  width: 200px;
  border: solid 1px var(--brand-brown);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.like-product-card:hover {
  transform: scale(1.05);
  /* Slightly enlarges the card */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  /* Optional: adds depth */
}

.like-product-card-img a img {
  display: block;
  margin: auto;
  width: 100px;
  height: auto;
  object-fit: contain;
}

.like-product-card-title {
  font-size: 16px;
  color: black;
  text-align: center;
}

/* ----------------------- Individual Product Page Design End ----------------- */

/* ----------------------- Cart Page ------------------- */
.proceed-to-checkout li a {
  text-decoration: none;
}

.proceed-to-checkout {
  list-style-type: none;
  width: 900px;
  margin: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin-bottom: 2rem;
}

.proceed {
  border: solid 1px var(--brand-brown);
  padding: 7px;
  display: inline-block;
  /* Needed for transform to work properly */
  transition: transform 0.2s ease-in-out;
  text-decoration: none;
  color: var(--brand-brown);
}

.proceed:hover {
  border: solid 1px var(--brand-brown);
  padding: 7px;
  transform: scale(1.1);
  /* Grows to 110% of original size */
}

.cart-item-details h2 a {
  color: var(--brand-brown);
  font-size: 1rem;
  text-decoration: none;
}

.roast_profile a {
  color: var(--brand-brown);
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0;
}

.no-border {
  border: none !important;
}

.checkout-wrapper {
  overflow-x: auto;
  margin: 1rem auto;
  max-width: 950px;
}

.checkout-table {
  width: 100%;
  border-collapse: collapse;
}

.checkout-table th,
.checkout-table td {
  padding: 8px;
  text-align: left;
}

.checkout-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.checkout-table img {
  max-width: 60px;
  height: auto;
  border-radius: 4px;
}

.checkout-table input[type="number"] {
  display: inline-block;
  width: 40px;
  padding: 6px;
  text-align: center;
  align-items: center;
}

.checkout-table button.remove-button {
  display: inline-block;
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.checkout-table button.remove-button:hover {
  background: #c0392b;
}

@media (max-width: 600px) {
  .checkout-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .proceed-to-checkout {
    width: 500px;
  }

  input.qty-input {
    width: 25px;
    padding: 3px;
  }

  .quantity form {
    padding: 2px;
  }

  .checkout-table img {
    max-width: 40px;
    margin: 0;
    padding: 0;
  }

  .cart-caption {
    font-size: 14px;
  }

  .cart-item-details .product-title {
    font-size: 14px;
  }
}

/*  --------------------------- End of Cart ----------------------------- */
