:root {
    --bg-canvas: #F9F9F6;
    --text-main: #111111;
    --text-muted: #767670;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-canvas);
    color: var(--text-main);
}

header {
    height: 125px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
}

.site-name,
.header-logo,
.nav-links a {
    color: inherit;
    text-decoration: none;
}

.site-name {
    justify-self: start;
    font-size: 1.5rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 4px;
}

.header-logo {
    grid-column: 2;
    display: block;
    line-height: 0;
}

.header-logo img {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
    font-size: 1rem;
}

.product-detail {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px 120px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 80px;
    align-items: start;
    flex: 1;
}

.detail-image-wrapper {
    width: 100%;
    height: min(72vh, 780px);
    min-height: 620px;
    overflow: hidden;
    background: #EAEAEA;
}

.detail-image-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(10%);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-image-wrapper:hover img {
    transform: scale(1.015);
}

.detail-content {
    position: sticky;
    top: 40px;
    padding-top: 24px;
}

.back-link {
    display: inline-block;
    margin-bottom: 42px;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.back-link:hover {
    color: var(--text-main);
    border-bottom-color: currentColor;
}

.detail-title {
    max-width: 620px;
    margin-bottom: 24px;
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0.01em;
}

.detail-price {
    margin-bottom: 42px;
    font-size: 1.25rem;
}

.detail-description {
    max-width: 560px;
    margin-bottom: 52px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.add-to-cart-btn {
    width: 100%;
    max-width: 560px;
    padding: 19px 24px;
    border: 1px solid var(--text-main);
    background: var(--text-main);
    color: var(--bg-canvas);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.add-to-cart-btn:hover {
    background: transparent;
    color: var(--text-main);
}

.add-to-cart-btn:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 3px;
}

.site-footer {
    margin-top: 20px;
    padding: 44px 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.footer-content {
    max-width: 520px;
    margin: 0 auto;
}

.footer-title {
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    font-style: italic;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.5;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 18px;
    font-size: 0.8rem;
}

.footer-legal {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.75;
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 48px;
    }

    .detail-image-wrapper {
        height: 620px;
        min-height: 0;
    }

    .detail-content {
        position: static;
        padding-top: 0;
    }
}

@media (max-width: 650px) {
    header {
        height: 89px;
        padding: 0 20px;
    }

    .site-name {
        font-size: 1.05rem;
        letter-spacing: 2px;
    }

    .header-logo img {
        width: 48px;
        height: 48px;
    }

    .nav-links {
        gap: 16px;
        font-size: 0.9rem;
    }

    .nav-links a:not(:last-child) {
        display: none;
    }

    .product-detail {
        padding: 28px 20px 80px;
        gap: 36px;
    }

    .detail-image-wrapper {
        height: 440px;
    }

    .back-link {
        margin-bottom: 30px;
    }

    .detail-title {
        font-size: 2.35rem;
    }

    .detail-price {
        margin-bottom: 32px;
    }

    .detail-description {
        margin-bottom: 38px;
        font-size: 1rem;
    }

    .site-footer {
        margin-top: 10px;
        padding: 36px 20px 22px;
    }
}
