*,
*::before,
*::after {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

:root {
    --color-bg-page: #f7f7f7;
    --color-bg-surface: #ffffff;
    --color-bg-muted: #fafafa;

    --color-text-main: #111111;
    --color-text-secondary: #666666;

    --color-border: #e5e5e5;
    --color-accent: #111111;
}


body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background: var(--color-bg-page);
    color: var(--color-text-main);
}


.header {
    display: flex;
    padding: 10px 10px;
}

.header__list {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 0px;
    margin: 0px;
}

.header__item {
    list-style: none;
}

.header__link {
    text-decoration: none;
    color:  var(--color-accent);
}

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 20px 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 10px;
    background: var(--color-bg-surface);
}

.product>section,
.product>header {
    grid-column: 1 / -1;
    border-top: 1px solid #eee;
}

.product>.gallery,
.product>.purchase {
    grid-column: auto;
}

.product__header {
    line-height: 1.6;
    max-width: 900px;
    padding: 20px 0;
}

.product__header h1 {
    font-weight: 500;
}



.product__meta {
    margin-top: 8px;
    opacity: 0.7;
}


.gallery__title {
    margin-bottom: 16px;
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.gallery__item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}


.gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase {
    max-width: 420px;
    align-self: start;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: var(--color-bg-muted);
}

.purchase__title {
    margin-bottom: 16px;

}

.purchase__price {
    font-size: 28px;
    font-weight: 600;
    color: #222;
    margin-bottom: 20px;
}



.purchase__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.purchase__button {
    width: 180px;
    padding: 10px;
    font-weight: 500;
    border: 1px solid #333;
    background: #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.purchase__button:hover {
    background: #333;
    color: #fff;
}

.description {
    max-width: 800px;
}

.description__title {
    margin-bottom: 16px;
}

.description p {
    margin-bottom: 12px;
}


.specs {
    max-width: 800px;
}

.specs__title {
    margin-bottom: 12px;
}

.specs__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.specs__row {
    display: grid;
    grid-template-columns: 240px 1fr;
    column-gap: 24px;
}

.specs__term {
    color: var(--color-text-secondary);
}

.specs__desc {
    color: var(--color-accent);
}


.reviews {
    max-width: 800px;
}

.reviews__title {
    line-height: 1.6;
}

.review {
    margin-bottom: 24px;
}

.review__header {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}


.sidebar {
    align-self: start;
    padding: 0 10px;
    background: var(--color-bg-surface);
}

.sidebar__section {
    margin-bottom: 32px;
}

.sidebar__title {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
}

.sidebar__text {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.footer {
    margin-top: 50px;
    padding: 20px 10px;
    font-size: 14px;
    color: var(--color-text-secondary);
    text-align: center;
}

.footer__title {
    margin-bottom: 10px;
}


@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .product {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 480px) {
    .header {
    display: block; 
    width: 100%;
    padding: 12px 10px;
  }

  .header__nav {
    width: 100%;
  }

  .header__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

}