/* ===============================
   🔹 RESET / BASE
================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: "Roboto", sans-serif;
}

/* ===============================
   🔹 VARIABLES
================================ */

:root {
  --header-height: 120px;
  --content-max-width: 1400px;
  --accent-yellow: #ffe235;
  --text-main: #000;
  --text-muted: #333;
  --radius-lg: 24px;
  --shadow-main: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===============================
   🔹 HEADER (IMPORTED)
================================ */

.header-menu {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background-color: var(--accent-yellow);
}

.cart-icon {
  display: block !important;
}

/* ===============================
   🔹 BODY BACKGROUND
================================ */

body {
  background-repeat: repeat;
  background-size: clamp(40%, 6vw, 70%) auto;
  background-position: center;
}

/* ===============================
   🔹 PAGE CONTENT OFFSET
================================ */

.page-content {
  min-height: 70vh;
}

/* ===============================
   🔹 PRODUCT PAGE – LAYOUT
================================ */

.product {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: clamp(32px, 5vh, 64px) clamp(20px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.2fr minmax(320px, 1fr);
  gap: clamp(24px, 4vw, 30px);
  align-items: start;
}

/* ===============================
   🔹 TYPOGRAPHY
================================ */

p {
  font-size: clamp(14px, 1.1vw, 20px);
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===============================
   🔹 PRODUCT IMAGE
================================ */

.product-background {
  background: #f9e35c4d;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
}

.product-background img {
  width: clamp(220px, 18vw, 300px);
  object-fit: contain;
}

/* ===============================
   🔹 PRODUCT INFO
================================ */

.product-info {
  margin-top: clamp(6px, 10vh, 0px);
  display: flex;
  flex-direction: column;
}

.product-title {
  font-family: "Comfortaa", cursive;
  font-size: clamp(28px, 3vw, 50px);
  line-height: 1.2;
}

.product-description {
  font-size: clamp(15px, 1.2vw, 20px);
  max-width: 540px;
  min-height: 220px;
}

.buy-button {
  margin-top: 23px;
  align-self: flex-start;
}

/* ===============================
   🔹 BUTTONS
================================ */

.button {
  display: inline-block;
  background: #000;
  color: #ffeb3b;
  font-family: "Comfortaa", cursive;
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  padding: 14px 32px;
  border-radius: 18px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  color: #000;
}

.button:active {
  transform: translateY(0);
}



/* ===============================
   🔹 REVIEWS BLOCK
================================ */

.product-reviews {
  align-self: start;
}

.product-reviews .reviews-box {
  max-width: 100%;
}

/* ===============================
   📱 TABLET ≤ 1024px
================================ */

@media (max-width: 1024px) {
  .product {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "image info"
      "reviews reviews";
  }

  .product-background {
    grid-area: image;
  }

  .product-info {
    grid-area: info;
  }

  .product-reviews {
    grid-area: reviews;
    margin-top: 40px;
  }
}

/* ===============================
   📱 MOBILE ≤ 768px
================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 160px;
  }

  body {
    background-size: 70% auto;
  }

  .product {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "info"
      "reviews";
    padding: 24px 5vw;
    gap: 30px;
    justify-items: center; /* центр по горизонталі */
  }

  /* ЯВНО задаємо порядок */
  .product-background {
    grid-area: image;
  }

  .product-info {
    margin: 0;
    grid-area: info;
    align-items: center;
    text-align: center;
  }

  p {
    font-size: 20px;
  }

  .product-reviews {
    grid-area: reviews;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
  }

  .product-background img {
    width: 240px;
  }

  .product-title {
    font-size: 10vw;
    font-weight: bold;
  }

  .product-description {
    max-width: 300px;
    min-height: unset;
    font-size: 4.2vw;
  }

  .buy-button,
  .outline-button {
    align-self: center;
  }

  .button {
    font-size: 5vw;
    padding: 14px 36px;
  }
}
