/* Global Properties */

:root {
  --clr-primary: hsl(158, 36%, 37%);
  --clr-hover: #1a4031;
  --clr-bg: hsl(30, 38%, 92%);
  --clr-title: hsl(212, 21%, 14%);
  --clr-text: hsl(228, 12%, 48%);
  --clr-white: hsl(0, 0%, 100%);
  --fs-primary: 14px;
  --fs-heading: 32px;
  --ff-primary: "Montserrat", sans-serif;
  --ff-heading: "Fraunces", serif;
}

/* CSS Reset */

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

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

h2 {
  overflow-wrap: break-word;
}

/* Main styling */

body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--clr-bg);
  font-family: var(--ff-primary);
  font-size: var(--fs-primary);
  color: var(--clr-text);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

::selection {
  background-color: var(--clr-primary);
  color: white;
}

h2 {
  font-size: var(--fs-heading);
  font-family: var(--ff-heading);
  line-height: 1;
}

h2 a {
  text-decoration: none;
  color: var(--clr-title);
}

ul {
  padding: 0;
}

.card {
  display: flex;
  width: 576px;
  background-color: var(--clr-white);
  overflow: hidden;
  border-radius: 10px;
  transition: box-shadow 0.7s;
}

.card:hover {
  box-shadow: 2.8px 2.8px 2.2px rgba(141, 102, 63, 0.02),
    6.7px 6.7px 5.3px rgba(141, 102, 63, 0.028),
    12.5px 12.5px 10px rgba(141, 102, 63, 0.035),
    22.3px 22.3px 17.9px rgba(141, 102, 63, 0.042),
    41.8px 41.8px 33.4px rgba(141, 102, 63, 0.05),
    100px 100px 80px rgba(141, 102, 63, 0.07);
}

.img {
  width: 50%;
}

.img > img {
  display: block;
  width: 100%;
}

.card-content {
  width: 50%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.perfume {
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 12px;
}

.price {
  display: flex;
  align-items: center;
  gap: 20px;
}

.price .new {
  font-size: var(--fs-heading);
  color: var(--clr-primary);
  font-family: var(--ff-heading);
}

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

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-white);
  font-weight: 700;
  gap: 10px;
  background-color: var(--clr-primary);
  width: 100%;
  padding-top: 15px;
  padding-bottom: 15px;
  border-radius: 8px;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  background-color: var(--clr-hover);
}

@media (max-width: 600px) {
  .card {
    flex-direction: column;
    width: 335px;
    height: 660px;
  }
  .img {
    width: 100%;
    height: 40%;
    overflow: hidden;
    position: relative;
  }
  .img > img {
    position: absolute;
    top: -80px;
  }
  .card-content {
    width: 100%;
    height: 60%;
    padding: 25px;
  }
}
