/* ==========================================================================
   shop-item.css — product detail page skin (scoped .it-*, self-authored)
   Layout mirrors the reference two-column card; declarations are ours.
   ========================================================================== */

.it-page {
    padding: 22px 0 40px;
}

.it-shell {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #DDD6EF);
    border-radius: 18px;
    box-shadow: 0 18px 46px rgba(58, 33, 122, .09);
    overflow: hidden;
}

/* ---------- head bar ---------- */
.it-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--border2, #e2dcf2);
    background: var(--s4, #faf8ff);
}

.it-head-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text, #170F2E);
    letter-spacing: -.1px;
}

.it-head-title i {
    color: var(--purple, #6D28D9);
    font-size: 14px;
}

.it-head-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.it-head-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text3, #9485B8);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background .16s, color .16s;
}

.it-head-link:hover {
    color: var(--purple, #6D28D9);
    background: rgba(109, 40, 217, .07);
    text-decoration: none;
}

.it-share {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border, #DDD6EF);
    border-radius: 9px;
    background: #fff;
    color: var(--text3, #9485B8);
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s;
}

.it-share:hover {
    color: var(--purple, #6D28D9);
    border-color: rgba(109, 40, 217, .35);
    background: rgba(109, 40, 217, .05);
}

.it-share i {
    font-size: 13px;
}

/* ---------- body ---------- */
.it-body {
    padding: 22px;
}

.it-titlebar {
    margin: 0 0 16px;
}

.it-title {
    margin: 0 0 9px;
    font-size: 21px;
    line-height: 1.42;
    font-weight: 800;
    color: var(--text, #170F2E);
    letter-spacing: -.25px;
}

.it-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.it-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.it-left,
.it-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.it-row2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 11px;
}

/* ---------- price / delivery cells ---------- */
.it-cell {
    padding: 12px 14px;
    border: 1px solid var(--border2, #e2dcf2);
    border-radius: 12px;
    background: var(--s4, #faf8ff);
    min-width: 0;
}

.it-cell-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text3, #9485B8);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}

.it-cell-label i {
    font-size: 11px;
    opacity: .85;
}

.it-cell-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text, #170F2E);
    line-height: 1.3;
}

.it-unit-price {
    font-size: 25px;
    font-weight: 800;
    color: var(--pink, #DB2777);
    letter-spacing: -.6px;
    font-variant-numeric: tabular-nums;
}

.it-unit-price .unit {
    font-size: 16px;
    font-weight: 700;
    margin-right: 1px;
}

.it-pill {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(109, 40, 217, .1);
    color: var(--purple, #6D28D9);
    font-size: 12.5px;
    font-weight: 700;
}

/* ---------- notes ---------- */
.it-note {
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid transparent;
    min-width: 0;
}

.it-note-amber {
    background: #FFF8E6;
    border-color: #F6E2AC;
}

.it-note-rose {
    background: #FFF1F3;
    border-color: #F8D6DC;
}

.it-note-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.it-note-amber .it-note-head {
    color: #9A6B00;
}

.it-note-rose .it-note-head {
    color: #B3253C;
}

.it-note-head i {
    font-size: 11px;
}

.it-note-body {
    font-size: 12px;
    line-height: 1.62;
    color: var(--text2, #4C3D6E);
}

.it-note-body strong {
    color: var(--text, #170F2E);
    font-weight: 800;
}

/* ---------- guide link ---------- */
.it-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(109, 40, 217, .22);
    border-radius: 12px;
    background: rgba(109, 40, 217, .06);
    color: var(--purple, #6D28D9);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .16s, border-color .16s;
}

.it-link:hover {
    background: rgba(109, 40, 217, .11);
    border-color: rgba(109, 40, 217, .4);
    text-decoration: none;
    color: var(--purple, #6D28D9);
}

.it-link-left,
.it-link-right {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.it-link-right {
    font-weight: 600;
    font-size: 12.5px;
    opacity: .9;
}

/* ---------- cards ---------- */
.it-card {
    border: 1px solid var(--border2, #e2dcf2);
    border-radius: 13px;
    background: #fff;
    padding: 13px 14px;
}

.it-card-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text2, #4C3D6E);
    margin-bottom: 10px;
}

.it-card-head i {
    color: var(--purple, #6D28D9);
    font-size: 12px;
}

/* ---------- description ---------- */
.it-desc-card {
    padding: 13px 14px 11px;
}

.it-desc-inner {
    max-height: 186px;
    overflow: hidden;
    position: relative;
    font-size: 13px;
    line-height: 1.68;
    color: var(--text2, #4C3D6E);
}

.it-desc.is-open .it-desc-inner {
    max-height: none;
}

.it-desc:not(.is-open) .it-desc-inner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.it-desc-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 9px;
    padding: 8px 0;
    border: 0;
    border-top: 1px dashed var(--border2, #e2dcf2);
    background: transparent;
    color: var(--purple, #6D28D9);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.it-desc-toggle i {
    font-size: 10px;
    transition: transform .18s;
}

.it-desc-toggle:hover {
    color: var(--p2, #8B5CF6);
}

/* ---------- quantity ---------- */
.it-qty-card {
    padding-bottom: 14px;
}

.it-page .qty-group {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border, #DDD6EF);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

.it-page .qty-group .change-num-sub,
.it-page .qty-group .change-num-add {
    width: 46px;
    flex: 0 0 46px;
    border: 0;
    background: transparent;
    color: var(--text2, #4C3D6E);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .14s, color .14s;
}

.it-page .qty-group .change-num-sub:hover,
.it-page .qty-group .change-num-add:hover {
    background: rgba(109, 40, 217, .09);
    color: var(--purple, #6D28D9);
}

/* _index.css pins .qty-group .form-control with !important, so match it */
.it-page .qty-group .form-control {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    border: 0 !important;
    border-left: 1px solid var(--border2, #e2dcf2) !important;
    border-right: 1px solid var(--border2, #e2dcf2) !important;
    background: #fff !important;
    font-weight: 700;
    font-size: 15px;
    color: var(--text, #170F2E) !important;
    box-shadow: none !important;
    height: 44px;
    text-align: center;
    -moz-appearance: textfield;
}

.it-page .qty-group .form-control::-webkit-outer-spin-button,
.it-page .qty-group .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.it-page .qty-group .form-control:focus {
    box-shadow: none !important;
    border-color: var(--border2, #e2dcf2) !important;
    background: #fff !important;
}

/* ---------- stock ---------- */
.it-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 11px;
    background: #EAF9F0;
    border: 1px solid #BEE7CD;
    color: #0E7A46;
    font-size: 13px;
    font-weight: 700;
}

.it-stock i {
    font-size: 12px;
    opacity: .9;
}

.it-stock b {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.it-stock.badge-soft-danger {
    background: #FFF0F1;
    border-color: #F8CDD3;
    color: #C0273B;
}

/* ---------- order total ---------- */
.it-amount-card {
    border: 1px solid var(--border2, #e2dcf2);
    border-radius: 13px;
    background: var(--s4, #faf8ff);
    padding: 13px 14px;
}

.it-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.it-amount-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text2, #4C3D6E);
    white-space: nowrap;
}

.it-amount-label i {
    color: var(--purple, #6D28D9);
    font-size: 12px;
}

.it-amount {
    display: inline-flex;
    align-items: baseline;
}

.it-amount .price {
    font-size: 27px;
    font-weight: 800;
    color: var(--pink, #DB2777);
    letter-spacing: -.7px;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.it-amount .price .unit {
    font-size: 17px;
    font-weight: 700;
    margin-right: 1px;
}

/* ---------- fields ---------- */
.it-field {
    min-width: 0;
}

.it-field .form-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text2, #4C3D6E);
}

.it-field .form-control {
    border-radius: 11px;
    /* _index.css pins .form-control border/background with !important */
    border: 1px solid var(--border, #DDD6EF) !important;
    background: #fff !important;
    font-size: 13.5px;
    height: 44px;
    color: var(--text, #170F2E) !important;
    box-shadow: none !important;
}

.it-field .form-control::placeholder {
    color: var(--text3, #9485B8) !important;
    opacity: 1;
}

.it-field .form-control:focus {
    border-color: rgba(109, 40, 217, .5) !important;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, .1) !important;
    background: #fff !important;
}

.it-form {
    gap: 13px;
}

/* ---------- payment ---------- */
.it-pay {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border2, #e2dcf2);
}

.it-pay-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text, #170F2E);
    margin-bottom: 12px;
}

.it-pay-head i {
    color: var(--purple, #6D28D9);
    font-size: 13px;
}

.it-login-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 13px 16px;
    border-radius: 12px;
    background: #FFF1F3;
    border: 1px solid #F8D6DC;
    color: #B3253C;
    font-size: 13px;
    font-weight: 700;
}

.it-login-tip a {
    color: #B3253C;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.it-page .pay-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}

.it-page .pay-list .pay {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    /* _index.css sets width:100% on .pay-list .pay; override so chips sit in a row */
    width: auto;
    flex: 0 1 auto;
    min-height: 46px;
    padding: 7px 15px 7px 8px;
    border: 1px solid var(--border, #DDD6EF);
    border-radius: 12px;
    background: #fff;
    color: var(--text, #170F2E);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.it-page .pay-list .pay:hover {
    border-color: rgba(109, 40, 217, .45);
    box-shadow: 0 6px 18px rgba(109, 40, 217, .13);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--text, #170F2E);
}

.it-page .pay-list .pay img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: contain;
    flex: 0 0 30px;
}

.it-page .pay-list .pay.acg-pay-off {
    opacity: .55;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .it-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .it-row2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .it-body {
        padding: 16px;
    }

    .it-head {
        padding: 13px 16px;
    }

    .it-title {
        font-size: 18px;
    }

    .it-unit-price {
        font-size: 22px;
    }

    .it-amount .price {
        font-size: 23px;
    }

    .it-shell {
        border-radius: 14px;
    }
}

/* ---------- buyer protection ---------- */
.it-assure {
    margin-top: 14px;
    padding: 15px 17px;
    border-radius: 14px;
    border: 1px solid var(--border, #DDD6EF);
    background: var(--s3, #f8f9fe);
}

.it-assure-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.it-assure-list li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text2, #4C3D6E);
}

.it-assure-list li i {
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 11px;
    color: var(--purple, #6D28D9);
}

@media (max-width: 560px) {
    .it-page {
        padding: 12px 8px 28px;
    }

    .it-badges .badge-soft {
        font-size: 11px;
    }

    .it-page .pay-list .pay {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}
