.product-page {
    padding: 22px 0 52px;
}

.product-wrap {
    width: min(1200px, 94%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(460px, 1.05fr) minmax(380px, 0.95fr);
    gap: 34px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 92px;
}

#product-carousel {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid #ebdfed;
    background: linear-gradient(180deg, #fff 0%, #fdfbff 100%);
    box-shadow: 0 14px 30px rgba(62, 21, 77, 0.08);
}

#product-carousel .carousel-inner {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(248, 243, 255, 0.9)),
        linear-gradient(180deg, #fff 0%, #fcf8ff 100%);
}

#product-carousel .carousel-item {
    min-height: 560px;
}

.product-carousel-image,
.main-image-wrap img {
    width: 100%;
    height: 560px;
    object-fit: contain;
    display: block;
    padding: 16px;
}

.thumbs-wrap {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

.thumb-btn {
    border: 2px solid #e8ddef;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.thumb-btn:hover {
    transform: translateY(-2px);
    border-color: #c6a6ef;
}

.thumb-btn.active {
    border-color: #9a58eb;
    box-shadow: 0 0 0 3px rgba(154, 88, 235, 0.15);
}

.thumb-btn img {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
}

.product-details h1 {
    font-size: clamp(24px, 2.8vw, 38px);
    line-height: 1.12;
    margin: 0 0 10px;
    color: #2a1f3f;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f3b11d;
    margin-bottom: 12px;
    font-size: 19px;
}

.rating-row span {
    color: #5f4c74;
    font-size: 18px;
    margin-left: 2px;
}

.price-row {
    font-size: clamp(32px, 3.9vw, 50px);
    color: #8325ea;
    margin-bottom: 14px;
    font-weight: 700;
    line-height: 1;
}

.desc-text {
    color: #3f3454;
    line-height: 1.65;
    margin: 0 0 18px;
    font-size: 18px;
}

.section-title {
    color: #271e3b;
    font-weight: 650;
    margin: 14px 0 12px;
    font-size: 22px;
    line-height: 1.12;
}

.option-label {
    margin: 8px 0 10px;
    color: #2d2142;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.size-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.size-chip {
    border: 1.5px solid #d9cfec;
    background: #fff;
    color: #4f4166;
    border-radius: 999px;
    padding: 11px 22px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.size-chip:hover {
    border-color: #b592e7;
}

.size-chip.active {
    border-color: #9227f5;
    color: #9227f5;
    background: #fcf8ff;
    box-shadow: 0 0 0 3px rgba(146, 39, 245, 0.12);
}

.color-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.color-chip-btn {
    border: 1.5px solid #e2d6f2;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: #fff;
    color: #3c2d56;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    text-align: left;
}

.color-chip-btn:hover {
    transform: translateY(-2px);
    border-color: #bf9bec;
    box-shadow: 0 8px 18px rgba(135, 86, 206, 0.12);
}

.color-chip-btn.active {
    border-color: #9227f5;
    background: #fcf8ff;
    box-shadow: 0 0 0 3px rgba(146, 39, 245, 0.12);
}

.color-chip-btn.is-unavailable {
    opacity: 0.5;
    filter: grayscale(0.25);
    border-style: dashed;
}

.color-chip-swatch {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    flex: 0 0 24px;
    box-shadow: 0 0 0 1px rgba(46, 28, 73, 0.14), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.color-chip-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.color-stock {
    min-height: 20px;
    margin: 2px 2px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #5a476f;
}

.selection-readout {
    display: none;
    margin: 2px 2px 4px;
    color: #5a476f;
    font-size: 15px;
}

.selection-readout.is-visible {
    display: block;
}

.variant-status {
    min-height: 20px;
    margin: 0 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.variant-status.is-success {
    color: #2d8f49;
}

.variant-status.is-error {
    color: #b43a3a;
}

.qty-row {
    width: min(190px, 100%);
    border: 2px solid #e2d5f4;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    margin-bottom: 18px;
}

.qty-btn {
    border: none;
    background: transparent;
    color: #9227f5;
    font-size: 32px;
    width: 36px;
    line-height: 1;
    cursor: pointer;
}

#qty-value {
    font-size: 30px;
    color: #261a37;
}

.gift-box {
    border-radius: 18px;
    background: #f5effd;
    border: 1px solid #ebdff8;
    padding: 20px 20px 14px;
    margin: 12px 0 18px;
}

.gift-box h3 {
    margin-bottom: 10px;
    color: #2d2142;
    font-size: 24px;
    line-height: 1.12;
}

.gift-box label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    color: #40345a;
    font-size: 16px;
}

.gift-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #9227f5;
}

.gift-note-label {
    justify-content: flex-start !important;
    margin-top: 14px !important;
    margin-bottom: 8px !important;
    font-weight: 600;
}

.gift-box textarea {
    width: 100%;
    border: 1px solid #dac9f3;
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    resize: vertical;
}

.gift-hint {
    margin: 10px 2px 0;
    font-size: 13px;
    color: #6e6188;
}

.custom-request-box {
    background: linear-gradient(180deg, #fbf7ff 0%, #f4ecff 100%);
}

.custom-request-hint {
    margin-bottom: 14px;
}

.custom-request-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8c7ef;
    border-radius: 12px;
    padding: 11px 13px;
    font: inherit;
    color: #37284d;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.custom-request-input:focus {
    outline: none;
    border-color: #9d57ec;
    box-shadow: 0 0 0 3px rgba(157, 87, 236, 0.12);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.add-cart-btn {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 16px 22px;
    color: #fff;
    font-size: 20px;
    font-weight: 620;
    background: linear-gradient(90deg, #ef5aa8 0%, #ba63ea 55%, #9663f1 100%);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.add-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(144, 54, 219, 0.25);
}

.add-cart-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.action-row .shop-fav {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid #dfd4f0;
    background: #fff;
    color: #8f7aa9;
    cursor: pointer;
    font-size: 19px;
}

.action-row .shop-fav.is-active {
    color: #fff;
    background: #ef5aa8;
    border-color: #ef5aa8;
}

.meta-list {
    border-top: 1px solid #ece1fb;
    padding-top: 14px;
    display: grid;
    gap: 8px;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.meta-list span {
    color: #6a5b84;
    font-size: 15px;
}

.meta-list strong {
    color: #2f2443;
    font-size: 15px;
}

.meta-list .in-stock {
    color: #2f8a49;
}

.meta-list .out-stock {
    color: #b53b3b;
}

.reviews-section {
    width: min(1200px, 94%);
    margin: 34px auto 0;
    border-top: 1px solid #ece3f5;
    padding-top: 28px;
}

.reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.reviews-head h2 {
    margin: 0;
    color: #2a1f3f;
    font-size: clamp(26px, 2.9vw, 36px);
}

.write-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 188px;
    height: 56px;
    border-radius: 999px;
    border: 2px solid #b169f0;
    color: #9227f5;
    background: #fff;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.write-review-btn:hover {
    background: #f8f1ff;
}

.write-review-btn.is-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.review-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.review-alert.success {
    background: #e9f8ee;
    border: 1px solid #b8e4c8;
    color: #16693b;
}

.review-alert.error {
    background: #ffe8e8;
    border: 1px solid #f5caca;
    color: #8f2222;
}

.review-alert.info {
    background: #eaf3ff;
    border: 1px solid #c8ddff;
    color: #174a8b;
}

.review-form {
    display: none;
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid #eadff6;
    border-radius: 18px;
    padding: 18px;
}

.review-form.is-open {
    display: block;
}

.review-form-title {
    font-size: 20px;
    color: #2c2042;
    margin-bottom: 12px;
    font-weight: 600;
}

.review-label {
    display: block;
    margin: 10px 0 8px;
    color: #47395d;
    font-size: 15px;
}

.review-rating-input {
    display: flex;
    gap: 8px;
}

.review-star-option {
    color: #ddd4eb;
    font-size: 26px;
    cursor: pointer;
}

.review-star-option input {
    display: none;
}

.review-star-option.is-on {
    color: #f3b11d;
}

.review-form textarea {
    width: 100%;
    border: 1px solid #d9cced;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}

.review-form-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.submit-review-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(90deg, #ef5aa8 0%, #ba63ea 55%, #9663f1 100%);
}

.reviews-list {
    display: grid;
    gap: 14px;
}

.review-empty {
    border: 1px dashed #d8c9ef;
    border-radius: 16px;
    padding: 18px;
    color: #66567f;
    background: #fbf8ff;
}

.review-card {
    background: #fff;
    border: 1px solid #e7dbf4;
    border-radius: 24px;
    padding: 18px 22px 20px;
}

.review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.review-author-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-author-wrap strong {
    font-size: 20px;
    color: #251a37;
}

.review-card time {
    color: #7d6f95;
    font-size: 16px;
}

.verified-pill {
    border-radius: 999px;
    background: #daf9e7;
    color: #14914f;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1;
}

.review-stars {
    color: #f3b11d;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-size: 17px;
}

.review-card p {
    margin: 0;
    color: #2f2445;
    line-height: 1.58;
    font-size: 16px;
}

.review-admin-reply {
    margin-top: 12px;
    border-left: 4px solid #d5c3f3;
    background: #faf7ff;
    border-radius: 12px;
    padding: 10px 12px;
}

.review-admin-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.review-admin-reply-head strong {
    font-size: 14px;
    color: #322249;
}

.review-admin-reply-head time {
    font-size: 12px;
    color: #726188;
}

.review-admin-reply p {
    margin: 0;
    font-size: 14px;
    color: #3f3357;
}

.review-admin-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-admin-reply-form {
    margin-top: 10px;
    border-top: 1px dashed #dccdf0;
    padding-top: 10px;
}

.review-admin-reply-form textarea {
    width: 100%;
    border: 1px solid #d9cced;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}

.submit-review-btn.review-admin-danger {
    background: #be3d3d;
}

.submit-review-btn.review-admin-light {
    background: #75639c;
}

.pd-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1200;
    background: #2f8a49;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.pd-toast.error {
    background: #b53b3b;
}

.pd-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1220px) {
    .product-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-gallery {
        position: static;
    }

    .product-carousel-image,
    .main-image-wrap img {
        height: 520px;
    }
}

@media (max-width: 900px) {
    .product-carousel-image,
    .main-image-wrap img {
        height: 440px;
    }

    .product-details h1 {
        font-size: 36px;
    }

    .section-title,
    .gift-box h3 {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .product-page {
        padding: 14px 0 30px;
    }

    .product-wrap,
    .reviews-section {
        width: 94%;
    }

    .product-carousel-image,
    .main-image-wrap img {
        height: 320px;
        padding: 10px;
    }

    .thumbs-wrap {
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    }

    .section-title,
    .gift-box h3 {
        font-size: 20px;
    }

    .gift-box {
        padding: 18px 16px 14px;
    }

    .gift-box label {
        align-items: flex-start;
        gap: 12px;
    }

    .color-row {
        grid-template-columns: 1fr;
    }

    .price-row,
    .rating-row {
        flex-wrap: wrap;
    }

    .size-chip {
        font-size: 17px;
        padding: 10px 16px;
    }

    .action-row {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .add-cart-btn {
        width: 100%;
        font-size: 18px;
        padding: 14px 16px;
    }

    .reviews-head {
        flex-direction: column;
        align-items: stretch;
    }

    .write-review-btn {
        width: 100%;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .product-details h1 {
        font-size: 30px;
    }

    .desc-text {
        font-size: 16px;
    }

    .qty-btn {
        width: 32px;
        font-size: 28px;
    }

    #qty-value {
        font-size: 26px;
    }

    .meta-list div {
        flex-direction: column;
        align-items: flex-start;
    }
}

