:root {
    --bg: #f7f3ec;
    --card: #ffffff;
    --text: #1f5b54;
    --muted: #5f817b;
    --brand: #1f5b54;
    --brand-dark: #1f5b54;
    --line: #eadfce;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Sora", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #fff9f1, var(--bg));
}

.buy-wrap {
    width: min(1140px, 92vw);
    margin: 0 auto;
    padding: 22px 0 42px;
}

.buy-header {
    margin-bottom: 18px;
    padding: 18px 0 0 58px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.buy-header .site-lockup {
    align-items: center;
}

.buy-header .site-copy {
    gap: 5px;
}

.buy-header .top-leading {
    flex: 1 1 auto;
    max-width: min(100%, 560px);
}

.buy-header .page-nav-chips {
    justify-content: flex-start;
}


.buy-card {
    background: linear-gradient(180deg, #fffdfa 0%, #fff7ef 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 36px rgba(74, 41, 20, 0.12);
}

.state {
    color: var(--muted);
}

.product {
    display: grid;
    grid-template-columns: minmax(190px, 240px) 1fr;
    gap: 26px;
    align-items: start;
}

.product img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(84, 42, 20, 0.12);
}

.product h1 {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-family: "Fraunces", serif;
    color: var(--brand);
}

.meta {
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}

.price {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--brand-dark);
}

.product p {
    margin: 0;
    color: var(--brand);
    line-height: 1.65;
}

.qty-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 16px;
    padding: 8px;
    border: 1px solid #e6cfbc;
    border-radius: 999px;
    background: #fff4e8;
}

.qty-row button {
    width: 38px;
    height: 38px;
    border: 1px solid #dec3ad;
    border-radius: 999px;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-dark);
    cursor: pointer;
}

.qty-input {
    width: 68px;
    height: 38px;
    text-align: center;
    border: 1px solid #ddc2ae;
    border-radius: 999px;
    font-weight: 700;
    background: #fffdf8;
}

.proceed-btn {
    border: 0;
    border-radius: 14px;
    background: linear-gradient(120deg, var(--brand), var(--brand-dark));
    color: #fff;
    padding: 13px 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(31, 91, 84, 0.18);
}

.proceed-btn:hover { background: linear-gradient(120deg, var(--brand), var(--brand-dark)); }
.proceed-btn:disabled { opacity: 0.65; cursor: wait; }

.out {
    display: inline-block;
    margin-top: 10px;
    color: #8f1d1d;
    font-weight: 700;
}

@media (max-width: 900px) {
    .buy-header {
        flex-direction: column;
        padding-left: 50px;
    }

    .top-actions {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .product {
        grid-template-columns: 1fr;
    }

    .product img {
        height: 240px;
    }

    .buy-card {
        padding: 18px;
    }

    .qty-row {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .proceed-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .buy-wrap {
        width: min(100%, calc(100vw - 24px));
        padding: 18px 0 34px;
    }

    .buy-header {
        padding-left: 40px;
    }

    .buy-card {
        padding: 15px;
        border-radius: 18px;
    }

    .product img {
        height: 210px;
    }
}

/* Out-of-stock owner contact presentation */
.out {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #efc8c1;
    background: #fff4f2;
    color: #8f1d1d;
    font-weight: 700;
    font-size: 12px;
}

.out-contact {
    margin-top: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 8px 11px;
    border: 1px solid #e6d5c6;
    border-radius: 10px;
    background: #fffaf4;
    color: #5f5a52;
    font-size: 12px;
    line-height: 1.45;
}

.out-contact a {
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed rgba(31, 91, 84, 0.45);
}

.out-contact a:hover {
    border-bottom-color: var(--brand-dark);
}

.out-contact span {
    color: var(--brand-dark);
    font-weight: 700;
}
