.product-image,
.detail-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-image img,
.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(36px, 6vw, 88px);
    padding-top: 64px;
    max-width: 1320px;
    position: relative;
}

.product-detail::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 50% 0 0;
    background: linear-gradient(145deg, #f7f8f5, #eef2ec);
    border-radius: 0 24px 24px 0;
    opacity: .7;
}

.product-breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: -22px;
    color: #77827e;
    font-size: 12px;
}

.product-breadcrumb a:hover { color: var(--green); }
.product-breadcrumb span:last-child { color: #3d514b; font-weight: 700; }

.product-detail > div,
.detail-copy {
    min-width: 0;
}

.product-gallery {
    position: sticky;
    top: 24px;
}

.detail-image {
    position: relative;
    border: 1px solid #e3e9e4;
    border-radius: 12px;
    background: #e7ece6;
    box-shadow: 0 22px 55px #173f3512;
}

.gallery-zoom {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-zoom img { transition: transform .45s ease; }
.gallery-zoom:hover img { transform: scale(1.025); }

.gallery-zoom > span {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffffea;
    box-shadow: 0 4px 16px #173f3520;
    font-size: 20px;
}

.gallery-arrow,
.lightbox-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffffeb;
    color: var(--ink);
    box-shadow: 0 4px 18px #173f3526;
    transform: translateY(-50%);
    cursor: pointer;
}

.gallery-arrow.prev,
.lightbox-arrow.prev { left: 12px; }
.gallery-arrow.next,
.lightbox-arrow.next { right: 12px; }

.gallery-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #173f35df;
    color: #fff;
    font-size: 12px;
}

.thumbs {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.thumbs button {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    opacity: .68;
    transition: border-color .18s, box-shadow .18s, opacity .18s;
    cursor: pointer;
}

.thumbs button:hover,
.thumbs button.active {
    border-color: var(--green);
    box-shadow: 0 0 0 2px #dfeae5;
    opacity: 1;
}

.thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    object-fit: cover;
}

.product-lightbox {
    width: min(920px, calc(100vw - 32px));
    height: min(820px, calc(100vh - 32px));
    padding: 20px;
    border: 0;
    border-radius: 10px;
    background: #f5f7f4;
    box-shadow: 0 25px 90px #07130f66;
}

.product-lightbox[open] {
    display: grid;
    place-items: center;
}

.product-lightbox::backdrop { background: #08120fd9; }

.product-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    font-size: 25px;
    cursor: pointer;
}

.detail-copy {
    padding: 18px 0 10px;
}

.detail-copy > .eyebrow {
    display: inline-flex;
    margin-bottom: 13px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf3ef;
    color: #41675c;
    letter-spacing: .16em;
}

.detail-copy h1 {
    margin: 0 0 24px;
}

.detail-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf0ed;
}

.detail-price b {
    letter-spacing: -.035em;
}

.detail-price del {
    margin-left: 0;
}

.discount-badge {
    padding: 4px 9px;
    border-radius: 999px;
    background: #dff0e7;
    color: #24604f;
    font-size: 12px;
    font-weight: 800;
}

.detail-copy > p {
    margin: 22px 0 0;
}

.stock {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 20px 0;
    padding: 8px 12px 8px 8px;
    border-radius: 8px;
    background: #f2f7f4;
}

.stock > span {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: #dcece3;
    font-weight: 800;
}

.stock > div { display: flex; flex-direction: column; line-height: 1.25; }
.stock b { color: var(--ink); font-size: 12px; }
.stock small { color: #5d746c; font-size: 12px; }
.stock.out { background: #fff0f0; }
.stock.out > span { background: #f5dede; }

.buy-form {
    align-items: stretch;
}

.buy-form select {
    min-width: 0;
}

.quantity-field {
    position: relative;
    flex: 0 0 78px;
}

.quantity-field span {
    position: absolute;
    top: 4px;
    left: 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

.buy-form .quantity-field input {
    width: 100%;
    height: 100%;
    padding: 16px 8px 3px;
    border: 1px solid var(--line);
    background: #fff;
}

.buy-form .btn {
    flex: 1;
    white-space: nowrap;
    min-height: 55px;
    box-shadow: 0 10px 24px #173f3524;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.buy-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px #173f3530;
}

.checkout-note {
    margin: 9px 0 0 !important;
    color: #7a8581 !important;
    font-size: 12px !important;
    text-align: center;
}

.buy-form .btn span {
    margin-left: 18px;
}

.favorite-form {
    margin: 14px 0 24px;
}

.favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s;
}

.favorite-button:hover {
    border-color: #9eaaa5;
    background: #f7f9f7;
    transform: translateY(-1px);
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
    padding: 22px 0 0;
}

.benefits li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 13px 10px;
    border: 1px solid #e8ebe8;
    border-radius: 6px;
    background: linear-gradient(145deg, #fbfcfa, #f6f8f5);
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.benefits li:hover {
    border-color: #cad8d0;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px #173f350d;
}

.benefits li > span {
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e4eee8;
    color: var(--green);
    font-weight: 800;
}

.benefits li div {
    min-width: 0;
}

.benefits b,
.benefits small {
    display: block;
}

.product-placeholder {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #eff2ec, #dfe6dd);
}

.placeholder-orb {
    position: absolute;
    top: 12%;
    left: 17%;
    width: 66%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #d4ded1;
}

.ceramic-vase {
    position: relative;
    z-index: 1;
    width: 34%;
    height: 52%;
    margin-top: -5%;
    border-radius: 42% 42% 25% 25% / 28% 28% 13% 13%;
    background: linear-gradient(105deg, #f8f4e9 0%, #ddd8ca 58%, #c9c4b8 100%);
    box-shadow: 20px 30px 38px #6877692d, inset 8px 0 12px #fff9;
}

.ceramic-vase::before {
    content: '';
    position: absolute;
    top: -15%;
    left: 31%;
    width: 38%;
    height: 22%;
    border-radius: 45% 45% 16% 16%;
    background: linear-gradient(100deg, #f8f4e9, #cec9bd);
}

.ceramic-vase i {
    position: absolute;
    top: -13%;
    left: 37%;
    width: 26%;
    height: 7%;
    border-radius: 50%;
    background: #aaa89f;
    box-shadow: inset 0 2px 3px #6f716c66;
}

.product-placeholder small {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 16px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ffffffc9;
    color: #607169;
    font-size: 12px;
    letter-spacing: .03em;
}

.benefits b {
    color: var(--ink);
    font-size: 12px;
}

.benefits small {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 900px) and (min-width: 641px) {
    .product-detail {
        grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr);
        gap: clamp(24px, 4vw, 42px);
        padding: 36px max(4vw, 26px) 64px;
    }

    .product-detail::before { inset: 0 57% 0 0; }

    .product-breadcrumb { margin-bottom: -12px; }

    .detail-copy h1 {
        font-size: clamp(31px, 5vw, 40px);
        margin-bottom: 18px;
    }

    .detail-copy > p {
        margin-top: 16px;
        font-size: 15px;
    }

    .stock {
        margin: 17px 0;
    }

    .buy-form {
        flex-wrap: wrap;
    }

    .buy-form select {
        flex: 1 0 100%;
    }

    .favorite-button {
        width: 100%;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .benefits li {
        align-items: center;
        padding: 9px 11px;
    }
}

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

    .product-detail::before {
        inset: 0 0 auto;
        height: min(104vw, 560px);
        border-radius: 0 0 22px 22px;
    }

    .product-breadcrumb {
        margin-bottom: -14px;
        overflow: hidden;
        white-space: nowrap;
    }

    .product-gallery {
        position: static;
        width: min(100%, 520px);
        margin-inline: auto;
    }

    .detail-copy {
        padding-top: 0;
    }

    .detail-copy h1 {
        margin-bottom: 18px;
        font-size: clamp(32px, 9vw, 38px);
    }

    .detail-copy > p {
        margin-top: 16px;
        font-size: 15px;
    }

    .stock {
        margin: 17px 0;
    }

    .buy-form {
        position: sticky;
        z-index: 6;
        bottom: 10px;
        flex-wrap: wrap;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: #fffffff2;
        box-shadow: 0 10px 35px #122b2424;
        backdrop-filter: blur(8px);
    }

    .buy-form select {
        flex: 1 0 100%;
    }

    .favorite-button {
        width: 100%;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .benefits li {
        align-items: center;
        padding: 11px 12px;
    }

    .benefits b {
        font-size: 12px;
    }

    .benefits small {
        font-size: 12px;
    }

    .checkout-note { display: none; }
}

@media (max-width: 900px) {
    .account-menu .account-avatar:not(.large) {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .thumbs button,
    .gallery-zoom img,
    .buy-form .btn,
    .favorite-button,
    .benefits li { transition: none; }
}
