/* 
 * NEXUS PRIME | MARKETPLACE AMAZON-GSC HYBRID (v1.0.0-ELITE)
 * DESIGN DNA: Amazon Elite Layout + GSC Light Style
 * AESTHETICS: Clean, Informative, Professional, Hairline 精密
 */

:root {
    --nxp-sidebar-width: 380px;
    --nxp-thumbs-width: 65px;
    --nxp-border: 1px solid rgba(var(--accent-gold-rgb), 0.15);
    --nxp-bg-card: var(--bg-primary);
    --nxp-radius: 16px;
    --nxp-accent: #1a73e8;
    /* GSC Blue vibrant */
    --nxp-price-color: var(--text-primary);
    --nxp-glass: rgba(255, 255, 255, 0.05);
}

.nx-nxp-view {
    background: var(--bg-primary);
    min-height: 100vh;
    padding-bottom: 5rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-primary);
}

.nx-nxp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* ═══════════════════════════════════════════════
   3-COLUMN CORE ENGINE
   ═══════════════════════════════════════════════ */
.nx-nxp-layout {
    display: flex;
    gap: 2rem;
    position: relative;
    align-items: flex-start;
}

/* COLUMN 1: THUMBNAILS (VERTICAL) */
.nx-nxp-thumbs-col {
    width: var(--nxp-thumbs-width);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 2rem;
}

.nx-nxp-thumb {
    width: 60px;
    height: 60px;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: border-color 0.2s;
}

.nx-nxp-thumb:hover,
.nx-nxp-thumb.is-active {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 1px var(--accent-gold);
}

.nx-nxp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* COLUMN 2: MAIN CONTENT (HYBRID) */
.nx-nxp-main-col {
    flex: 1;
    min-width: 0;
}

.nx-nxp-media-hero {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--nxp-radius);
    overflow: hidden;
    border: var(--nxp-border);
    position: relative;
}

.nx-nxp-main-image {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
}

/* PRODUCT INTEL SECTION */
.nx-nxp-intel {
    margin-top: 2rem;
}

.nx-nxp-title-block {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1.5rem;
}

.nx-nxp-title {
    font-size: 1.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.nx-nxp-rating-pills {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nx-nxp-rating-stars {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    color: var(--accent-gold);
}

.nx-nxp-rating-stars i,
.nx-nxp-rating-stars svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

.nx-nxp-rating-stars i.is-filled,
.nx-nxp-rating-stars svg.is-filled {
    fill: var(--accent-gold);
}

.nx-nxp-rating-val {
    font-weight: 800;
    margin-left: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.nx-nxp-new-badge {
    color: #e47911; /* Amazon Orange */
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    background: rgba(228, 121, 17, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.nx-nxp-review-count {
    color: var(--nxp-accent);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* REFINEMENT BARS (BULLETS) */
.nx-nxp-features {
    margin: 2rem 0;
}

.nx-nxp-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nx-nxp-features-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.nx-nxp-features-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-dim);
    font-weight: bold;
}

/* TECHNICAL SPECS TABLE (GSC STYLE) */
.nx-nxp-specs-card {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    margin-top: 2rem;
}

.nx-nxp-specs-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
}

.nx-nxp-specs-table th {
    text-align: left;
    width: 40%;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nx-nxp-specs-table td {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* COLUMN 3: BUY BOX (STICKY SIDEBAR) - Premium Glass Variant */
.nx-nxp-buy-box {
    width: var(--nxp-sidebar-width);
    background: var(--bg-surface-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.2);
    border-radius: var(--nxp-radius);
    padding: 2rem;
    position: sticky;
    top: 2rem;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
}

.nx-nxp-buy-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.nx-buy-box-meta {
    margin-top: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nx-bb-row {
    display: flex;
    justify-content: space-between;
}

.nx-bb-row span {
    color: var(--text-dim);
}

/* RATING DISTRIBUTION (MINI) */
.nx-nxp-rating-dist-mini {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.nx-rd-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.nx-rd-label {
    width: 60px;
    color: var(--nxp-accent);
    font-weight: 600;
}

.nx-rd-bar-bg {
    flex: 1;
    height: 18px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.nx-rd-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f0c14b 0%, #fa8914 100%);
    border-radius: 4px;
}

.nx-rd-pct {
    width: 40px;
    text-align: right;
    font-weight: 800;
    color: var(--text-dim);
}

.nx-nxp-price-big {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.nx-nxp-status {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- VIEW TOGGLE ENGINE (v70.9.56) --- */
.nx-view-toggle-hub {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.nx-view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-view-toggle-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

.nx-view-toggle-btn i {
    width: 18px;
    height: 18px;
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .nx-view-toggle-hub {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .nx-view-toggle-btn span {
        display: none;
    }

    .nx-view-toggle-btn {
        padding: 0.8rem;
    }
}

.nx-nxp-status::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.is-available {
    color: #059669;
}

.is-available::before {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.is-urgency {
    color: #dc2626;
}

.is-urgency::before {
    background: #ef4444;
}

.nx-nxp-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nx-nxp-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-transform: math-auto;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.is-cart {
    background: linear-gradient(180deg, #ffd814 0%, #f7ca00 100%);
    color: #0f1111;
    box-shadow: 0 2px 5px rgba(213, 170, 0, 0.2);
}

.is-cart:hover {
    background: linear-gradient(180deg, #f7ca00 0%, #f0c14b 100%);
    transform: scale(1.02);
}

.is-buy {
    background: linear-gradient(180deg, #ffa41c 0%, #fa8914 100%);
    color: #0f1111;
    box-shadow: 0 2px 5px rgba(255, 153, 0, 0.2);
}

.is-buy:hover {
    background: linear-gradient(180deg, #fa8914 0%, #ee7a00 100%);
    transform: scale(1.02);
}

.nx-nxp-security-badge {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nx-nxp-security-badge i {
    color: #10b981;
}

.nx-nxp-dist-seller {
    margin-top: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
}

/* RECOMMENDATIONS ENGINE (GSC LIGHT DNA) */
.nx-nxp-recommendations {
    border-top: 1px solid var(--border-subtle);
    padding-top: 4rem;
}

.nx-nxp-section-title {
    font-size: 1.5rem;
    font-weight: 650;
    margin-bottom: 2.5rem;
    color: #cc0c39;
    /* Amazon Red signature */
    letter-spacing: -0.01em;
}

.nx-nxp-rec-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    justify-items: start;
}

.nx-nxp-rec-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    max-width: 180px;
    border: 1px solid var(--area-product-border);
}

.nx-nxp-rec-card:hover .nx-rec-title {
    color: #e47911;
    text-decoration: underline;
}

.nx-rec-img {
    aspect-ratio: auto;
    overflow: hidden;
    width: -webkit-fill-available;
}

.nx-rec-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nx-nxp-rec-card:hover .nx-rec-img img {
    transform: scale(1.05);
}

.nx-rec-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nx-rec-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nxp-accent);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nx-rec-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nx-rec-stars {
    display: flex;
    gap: 1px;
    color: var(--accent-gold);
}

.nx-rec-stars i {
    width: 12px;
    height: 12px;
    fill: transparent;
}

.nx-rec-stars i.is-filled {
    fill: currentColor;
}

.nx-rec-count {
    font-size: 0.75rem;
    color: var(--nxp-accent);
}

.nx-rec-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* RESPONSIVE TRUTH */
@media (max-width: 1100px) {
    .nx-nxp-layout {
        flex-direction: column;
    }

    .nx-nxp-thumbs-col {
        flex-direction: row;
        width: 100%;
        top: 0;
        position: relative;
    }

    .nx-nxp-buy-box {
        width: 100%;
        position: relative;
        top: 0;
    }

    .nx-nxp-rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .nx-nxp-rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DESCRIPTION EXPANSION PROTOCOL */
.nx-description-wrapper {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-description-wrapper.is-collapsed {
    max-height: 140px;
    overflow: hidden;
}

.nx-description-wrapper.is-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.nx-description-wrapper.is-expanded {
    max-height: 4000px;
}

.nx-description-wrapper.is-expanded::after {
    opacity: 0;
}

.nx-read-more-trigger.marketplace-style {
    background: transparent;
    border: none;
    color: var(--nxp-accent);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.nx-read-more-trigger.marketplace-style:hover {
    text-decoration: underline;
}

/* PROMO/COUPON MARKETPLACE STYLE */
.nx-promo-redeem-card.marketplace-style {
    background: var(--bg-secondary);
    border: 1px dashed rgba(var(--accent-gold-rgb), 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nx-promo-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nx-nxp-input-row {
    display: flex;
    gap: 0.5rem;
}

.nx-nxp-input-row .nx-node-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.nx-nxp-input-row .nx-nxp-btn {
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

/* INTERACTIVE UTILS */
.is-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.is-interactive:hover {
    opacity: 0.8;
    transform: translateX(4px);
}

.nx-nxp-rating-pills.is-interactive:hover {
    transform: none;
    opacity: 0.7;
}