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

body {
    margin: unset;
}

.image-container {
    width: 40rem;
    max-width: 95%;
    background: white;
    border-radius: 10px;
}
.image-container img {
    width: 100%;
}

.main-container {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 0.5rem;
}

.main-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-container .secondary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.image-container .secondary-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-container .secondary {
    width: 3rem;
    height: 3rem;
    border: 1px solid #00000042;
    overflow: hidden;
    border-radius: 5px;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.box {
    background-color: white;
    padding: 0.5rem 1rem;
    width: max-content;
    cursor: pointer;
    border-radius: 5px;
}

.buy-button {
    color: white;
    background-color: rgb(1, 79, 211);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
    font-size: 1.25rem;
}

.buy-button:hover {
    background-color: #0046be;
    color: white;
}

h1 a {
    text-decoration: none;
    color: black;
}

.selected {
    background-color: #0c6dff;
    color: white;
}

h2 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

.reviews-container {
    width: min(40rem, 95%);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    border-radius: 5px;
}

.reviews-container form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reviews-container form div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

button {
    background: white;
    border: 1px solid black;
    padding-block: 0.35rem;
    cursor: pointer;
    transition: background 0.75s ease, color 0.75s ease;
}

button:hover {
    background: black;
    color: white;
}

.reviews-container .reviews {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reviews-container .reviews .review {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-bottom: 1px solid black;
}

.reviews-container .reviews .review time {
    text-align: right;
}

body:has(.dialog) {
    overflow-y: hidden;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.dialog {
    background-color: white;
    width: min(40rem, 95%);
    height: min(10rem, 95%);
    border: 5px solid black;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.dialog-toolbar {
    border-bottom: 1px solid black;
    padding-bottom: 0.35rem;
    display: flex;
    justify-content: space-between;
}

.dialog-toolbar .close {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

.dialog-toolbar span:nth-of-type(2) {
    width: 2rem;
    height: 2rem;
    border: 1px solid black;
    text-align: center;
    display: block;
    border-radius: 50%;
    line-height: 1.75;
    cursor: pointer;
}

.dialog-toolbar span:nth-of-type(2):hover {
    background: black;
    color: white;
}

.dialog-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.dialog-choice {
    display: flex;
    gap: 2rem;
}

.dialog-choice button {
    padding: 1rem;
}

.dialog-choice button {
    padding: 0.5rem 1rem;
}
