/*--------CSS RESET--------*/
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure text areas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/*--------CSS RESET--------*/

/* -----FAVORITES CSS----- */

.product-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-price {
  font-size: 14px;
  display: flex;
  color: #000000;
}

.product-sale-price {
  font-size: 12px;
  color: #e90000;
}

.old-price {
  text-decoration: line-through;
  color: #888;
}

@media (max-width: 768px){
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

.product-price {
  font-size: 12px;
  color: #000000;
}

.product-sale-price {
  font-size: 12px;
  color: #e90000;
  font-weight : bold;
}

.old-price {
  text-decoration: line-through;
  color: #888;
}

.product-title {
  margin-top: 10px;
  font-size: 12px;
}

}

/* Save button */
.save-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    z-index: 2;
}

/* Hover effect */
.save-btn:hover {
    transform: scale(1.2);
}

  /* Default save (outline) */
.save-btn .save-icon {
    width: 100%;
    height: 100%;
    stroke: #000;
    fill: none; 
    transition: all 0.3s;
}

/* Active heart (filled) */
.save-btn.active .save-icon {
    fill: #000;       
    stroke: #000;     
}

.favorite-top {
  display: flex;
  align-content: flex-start;
}

.favorites-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid #000000;
}

.back-link {
 padding-left: 1.5rem;

}

.product-grid {
  display: contents;
}

.add-cart-btn {
  position: absolute;
  right: 35px;
  bottom: 30px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.add-cart-btn:hover {
  opacity: 0.85;
}

.shopping-button {
  display: inline-block;
  padding: 1rem 2rem;
  margin-top: 3rem;
  border: none;
  border-radius: 6px;
  background: black;
  color: white;
}

.shopping-button-wrapper {
  text-align: center;
  width: 100%;
}

#toast-container {
  position: fixed;
  right: 18px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  font-size: 13px;
  white-space: nowrap;
  transform: translateY(8px) translateY(8px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  z-index: 9999;
}

.toast.show {
  transform:translateX(-50%) translateY(0);
  opacity: 1;
}

.toast[style*="right"] {
  transform: translateY(8px); 
}
.toast[style*="right"].show {
  transform: translateY(0);
}

@media (max-width: 420px) {
  .toast { max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
}

/* -----NO FAVORITES----- */

.no-favorites {
  font-family: Arial;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 10px;
  margin-bottom: 1rem;
}

.empty-bag {
  max-width: 200px;
  height: auto;
  margin: 1rem auto 1rem;
}