/* ========== CSS VARIABLES ========== */
:root {
  --green500: hsl(158, 36%, 37%);
  --green700: hsl(158, 42%, 18%);
  --Black: hsl(212, 21%, 14%);
  --Grey: hsl(228, 12%, 48%);
  --Cream: hsl(30, 38%, 92%);
  --White: hsl(0, 0%, 100%);
  --shadow-default: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.1);
}

/* ========== RESET DEFAULT BROWSER STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== BODY STYLING ========== */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--Cream);
  font-family: "Montserrat", sans-serif;
  padding: 1rem;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* ========== MAIN CARD CONTAINER ========== */
.main-container {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 37.5rem; /* 600px */
  background-color: var(--White);
  border-radius: 0.625rem;
  overflow: hidden;
  box-shadow: var(--shadow-default);
  margin: 1rem;
}

/* ========== IMAGE SECTION ========== */
.product-image {
  width: 100%;
}

.product-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-top-left-radius: 0.625rem;
  border-top-right-radius: 0.625rem;
}

/* ========== CONTENT SECTION ========== */
.content-container {
  width: 100%;
  padding: clamp(1rem, 2.5vw, 1.8rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* TOP TEXT */
.top-text {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.25rem; /* was 4px */
  color: var(--Grey);
  margin-block-end: 1rem;
}

/* PRODUCT TITLE */
.content-container h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.2;
  margin-block-end: 1rem;
  color: var(--Black);
  font-weight: 700;
  font-family: "Fraunces", serif;
}

/* DESCRIPTION */
.text-content {
  font-size: 0.9rem;
  color: var(--Grey);
  margin-block-end: 1.5rem;
  line-height: 1.5;
}

/* ========== PRICE SECTION ========== */
.price {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block-end: 1.5rem;
}

.price1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--green500);
  font-family: "Fraunces", serif;
}

.price2 {
  font-size: 0.9rem;
  color: var(--Grey);
  text-decoration: line-through;
}

/* ========== ADD TO CART BUTTON ========== */
.cart-button {
  background-color: var(--green500);
  color: var(--White);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none; /* Added for default button reset */
}

.cart-button:hover {
  background-color: var(--green700);
  transform: scale(1.01);
}

.cart-button img {
  width: 1rem;
  height: 1rem;
}

/* ========== ATTRIBUTION STYLING ========== */
.attribution {
  font-size: 0.6875rem;
  text-align: center;
  margin-block-start: 1rem;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

/* ========== DESKTOP STYLES (Media Query) ========== */
@media (min-width: 40.06rem) {
  .main-container {
    flex-direction: row;
  }

  .product-image {
    width: 50%;
  }

  .product-image img {
    height: 100%;
    border-radius: 0;
  }

  .content-container {
    width: 50%;
  }

  .cart-button img {
    width: 1rem;
    height: 1rem;
  }
}
