/* ----------------------- 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;
}

.products-container1 {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem;
}

/* Each card adapts to screen size */
.product-card1 {
  flex: 1 1 300px; /* grow, shrink, base width */
  max-width: 400px;
  border: 1px solid #ddd;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.product-card1:hover {
  transform: translateY(-5px);
}

/* 📱 Mobile: stack vertically */
@media (max-width: 768px) {
  .products-container {
    flex-direction: column;
    align-items: center;
  }

  .product-card1 {
    max-width: 90%;
  }
}
.product-card1 {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.product-card1:hover {
  transform: scale(1.02);
}

.product-card1 img {
  max-height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.fade-in-image {
  animation: fadeIn 3s ease forwards;
  transform: scale(1.5); /* Initial scale */
  opacity: 0; /* Initial opacity */
}

@keyframes fadeIn {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.product-info1 {
  text-align: center;
}

.product-card-title a {
  text-decoration: none;
  font-size: 1.2rem; /* Adjust size as needed */
  line-height: 1.4;
  color: var(--brand-brown);
  margin-bottom: 16px;
  max-height: 2.4em; /* Limits to 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2; /* Clamp to 2 lines */
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.product-meta1 {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #555;
}

.cart-button {
  border: none;
  background-color: transparent;
}

.cart-button {
  color: var(--brand-brown);
  padding: 12px;
  font-size: 14px;
  border: var(--brand-brown) 1px solid;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.product-card-details .button-hover-switch {
  display: inline-block; /* Ensures margin works properly */
  margin-top: 12px; /* Adjust this value as needed */
}
.product-card-details p {
  margin-bottom: 8px; /* Adds space below the Roast Profile line */
}

.size-btn,
.grind-btn,
.button-hover-switch,
.check-out-button {
  display: inline-block;
  color: var(--brand-brown);
  background-color: transparent;
  min-width: 160px;
  text-align: center;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: bold;
  border: var(--brand-brown) 1px solid;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
a.check-out-button,
a.button-hover-switch {
  text-decoration: none;
  color: var(--brand-brown);
}

.size-btn.active,
.grind-btn.active {
  background-color: var(--brand-tan);
  color: white;
  border-color: var(--brand-tan);
}

.cart-button:hover,
.button-hover-switch:hover,
.check-out-button:hover {
  background-color: var(--brand-tan);
}
.size-btn:hover,
.grind-btn:hover {
  background-color: var(--brand-tan);
}
.grind-options {
  margin-bottom: 2rem;
}
.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.php Page Start */
.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-price {
  font-size: 18px;
  margin: 0;
  text-align: center;
}

.product-card-details {
  padding: 0 1rem;
}

.check-out-login-area {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  max-width: 400px;
  margin: 1rem auto;
}

.single_product_container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 450px;
  margin: auto;
  padding: 1rem;
}
.single_product_photo {
  width: 250px;
  height: auto;
  margin: auto;
}
.single_product_photo a img {
  width: 140px;
  margin: auto;
  object-fit: contain;
  transform: scale(1);
  opacity: 1;
}

@media (min-width: 700px) {
  .single_product_container {
    padding: 1rem;
    max-width: 900px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    /* Image column and content column */
    grid-template-rows: auto auto auto auto auto auto auto;
    gap: 1rem;
    align-items: center;
    justify-items: start;
  }

  .single_product_photo {
    grid-row: 1 / 8;
    /* Span all 5 rows */
    grid-column: 1 / 3;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .single_product_photo a img {
    width: 250px;
    height: auto;
    object-fit: contain;
    transform: scale(1);
    opacity: 1;
  }

  .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: 6 / 10;
    grid-column: span 5;
  }
  .price-animate {
    display: inline-block;
    transition: opacity 0.3s ease;
  }
  .single_product_description {
    display: flex;
    flex-direction: column;
  }

  .single_product_description {
    grid-row: 11 / 14;
    grid-column: span 5;
  }
}
.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;
}

.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 ------------------- */
.checkout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: auto;
}

.cart-item-header {
  display: none; /* Hide on mobile */
  grid-template-columns: repeat(6, 1fr);
  font-weight: bold;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.product-title a {
  text-decoration: none;
  color: var(--brand-brown);
}
.roast_profile a {
  text-decoration: none;
  color: var(--brand-brown);
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
  border: 1px solid black;
  margin-bottom: 1rem;
  
}

.cart-item-media img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item-size,
.cart-item-price,
.cart-item-quantity,
.cart-item-total {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.proceed-to-checkout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* 🖥️ Desktop Enhancements */
@media (min-width: 508px) {
  .cart-item-header {
    display: grid;
  }

  .cart-item {
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
  }

  .cart-item-details {
    gap: 0.5rem;
  }

  .proceed-to-checkout {
    flex-direction: row;
    justify-content: center; /* Centers items horizontally */
  }

  .proceed-to-checkout a {
    width: auto;
    min-width: 200px;
  }
}
.cart-item-header,
.cart-item {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr 1fr 1.5fr 1fr; /* Adjust as needed */
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.cart-item-header {
  font-weight: bold;
  border-bottom: 2px solid #ccc;
  text-align: center;
}

.cart-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.cart-item > div {
  text-align: center;
}

/* Responsive tweak for mobile */
@media (max-width: 768px) {
  .cart-item-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .cart-item > div {
    margin-bottom: 0.5rem;
  }
}
.proceed-to-checkout li {
  list-style: none;
}

.proceed-to-checkout a {
  text-decoration: none;
  width: 140px;
  display: inline-block;
  color: var(--brand-brown);
  background-color: transparent;
  min-width: 160px;
  text-align: center;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: bold;
  border: var(--brand-brown) 1px solid;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: .5rem;
}

.proceed-to-checkout a:hover {
  background-color: var(--brand-tan);
}

svg:focus {
  outline: none;
}
.quantity {
  display: inline-flex;
  padding: 10px;
  margin: auto;
}
.cart-form-qty {
  display: inline-flex;
  gap: 10px;
}
.minus,
.inc-qty {
  width: 30px;
  border: none;
  background-color: transparent;
  cursor: pointer;
}
.cart-form-qty .qty-input {
  width: 50px;
  text-align: center;
  padding: 0;
}
.trash-can,
.remove-button {
  border: none;
  background-color: transparent;
  margin-top: 3px;
  margin-left: 3px;
}

.checkout_grid1 {
    display: grid;
    grid-template-columns: 1fr; /* one column by default */
    gap: 1rem; /* spacing between cards */
    padding: 1rem;
    max-width: 1000px;
    margin: auto;
}

.product-card1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.product-card1 img.product-image {
    width: 100px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.product-info1 {
    flex: 1;
}

.product-title1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-meta1 {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.product-meta1 li {
    margin-bottom: 0.25rem;
}

/* 💻 Larger screens: display products in multiple columns */
@media (min-width: 768px) {
    .checkout_grid1 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

