/* ==========================================================================
   Mobile Spec UI - Responsive Stylesheet (PriceDockBD)
   ========================================================================== */

.mbsui-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    color: #1f2937;
    line-height: 1.5;
    background: #f8fafc;
    padding: clamp(14px, 3.5vw, 30px);
    border-radius: clamp(12px, 2.5vw, 20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    overflow: hidden;
}

.mbsui-container * {
    box-sizing: border-box;
}

/* Header */
.mbsui-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.mbsui-title {
    font-size: clamp(1.45rem, 4vw, 2.2rem);
    font-weight: 800;
    margin: 0;
    color: #111827;
    width: 100%;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.mbsui-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    font-size: 0.9rem;
    color: #4b5563;
}

.mbsui-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
}

.mbsui-badge.available {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mbsui-badge.upcoming {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.mbsui-badge.rumored {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.mbsui-badge.unofficial {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.mbsui-badge.discontinued {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.mbsui-date, .mbsui-rating-star {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.88rem;
}
.mbsui-rating-star strong { color: #f59e0b; }

.mbsui-btn-compare {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mbsui-btn-compare:hover {
    background: #1d4ed8;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Main Grid */
.mbsui-grid-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    margin-bottom: 35px;
}

/* Gallery */
.mbsui-gallery {
    background: #fff;
    border-radius: 16px;
    padding: clamp(14px, 3vw, 22px);
    position: relative;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mbsui-spec-score {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%);
    color: white;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(101, 163, 13, 0.3);
    z-index: 2;
}
.score-val { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.score-val small { font-size: 0.65rem; }
.score-text { font-size: 0.5rem; font-weight: 700; text-align: center; margin-top: 1px; }

.mbsui-main-img-wrap {
    text-align: center;
    height: clamp(220px, 40vw, 360px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.mbsui-main-img-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

.mbsui-thumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.mbsui-thumb {
    width: 60px;
    height: 78px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
    background: #f1f5f9;
    flex-shrink: 0;
}
.mbsui-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mbsui-thumb.active {
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}
.mbsui-color-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.65);
    color: white;
    font-size: 0.55rem;
    text-align: center;
    padding: 3px 1px;
    font-weight: 600;
}

/* Overview Section */
.mbsui-overview {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    min-width: 0;
}

.mbsui-price-cards {
    display: flex;
    gap: 10px;
}
.mbsui-price-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s;
    min-width: 0;
}
.mbsui-price-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    border-color: #bfdbfe;
}
.mbsui-tag {
    position: absolute;
    top: -7px;
    right: 6px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #fdba74;
}
.mbsui-storage { font-size: 0.78rem; font-weight: 600; color: #4b5563; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbsui-price { font-size: 1.05rem; font-weight: 800; color: #2563eb; }

.mbsui-specs-list {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.mbsui-spec-item {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
}
.mbsui-spec-item:hover { background: #f8fafc; }
.mbsui-spec-item:last-child { border-bottom: none; }
.mbsui-spec-icon { 
    background: #eff6ff; 
    padding: 7px; 
    border-radius: 8px; 
    display: flex;
    flex-shrink: 0;
}
.mbsui-spec-icon svg { width: 20px; height: 20px; }
.mbsui-spec-data { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mbsui-label { font-size: 0.72rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.mbsui-value { font-size: 0.9rem; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Store Price Comparison */
.mbsui-store-prices-wrap {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.mbsui-section-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.mbsui-section-title {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.mbsui-store-count-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mbsui-store-list {
    padding: 0;
}

.mbsui-store-row {
    padding: 16px 24px;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: background 0.15s;
}
.mbsui-store-row:last-child {
    border-bottom: none;
}
.mbsui-store-row:hover {
    background: #f8fafc;
}

.mbsui-store-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mbsui-store-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2563eb;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mbsui-store-name {
    font-size: 1.02rem;
    color: #1e293b;
    font-weight: 600;
}

.mbsui-store-verified {
    font-size: 0.78rem;
    color: #166534;
    font-weight: 500;
}

.mbsui-store-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.mbsui-store-price {
    font-size: 1.2rem;
    color: #2563eb;
    font-weight: 800;
}

.mbsui-btn-buy {
    background: #2563eb;
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    box-shadow: 0 2px 10px rgba(37,99,235,0.2);
}
.mbsui-btn-buy:hover {
    background: #1d4ed8;
}

/* Rating Section */
.mbsui-rating-section {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.mbsui-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.mbsui-rh-left h2 { margin: 0 0 6px 0; font-weight: 800; font-size: 1.3rem; color: #0f172a; }
.mbsui-rh-left p { margin: 0; color: #64748b; font-size: 0.9rem; }
.mbsui-rh-right { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.mbsui-big-score {
    background: #374151;
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.mbsui-big-bar-wrap { flex: 1; height: 14px; background: #e5e7eb; border-radius: 10px; overflow: hidden; }
.mbsui-big-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 10px; }

/* Pros & Cons Section */
.mbsui-pros-cons-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.mbsui-pros, .mbsui-cons {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f3f4f6;
}

.mbsui-pc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
    position: relative;
}
.mbsui-pc-header h3 { margin: 0; font-weight: 800; font-size: 1.15rem; }
.pc-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pro-h .pc-icon { background: linear-gradient(135deg, #65a30d, #4d7c0f); }
.con-h .pc-icon { background: linear-gradient(135deg, #ea580c, #c2410c); }
.pro-h h3 { color: #4d7c0f; }
.con-h h3 { color: #c2410c; }

.mbsui-pc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mbsui-pc-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}
.mbsui-pc-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    margin-top: 1px;
}
.mbsui-pros .mbsui-pc-list li span { background: #84cc16; }
.mbsui-cons .mbsui-pc-list li span { background: #f97316; }

/* Prices Block */
.mbsui-prices-block {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.mbsui-prices-grid {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.mbsui-pv-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.mbsui-pv-variant {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
    margin-bottom: 4px;
}

.mbsui-pv-price {
    font-size: 1.25rem;
    color: #2563eb;
    font-weight: 800;
}

.mbsui-pv-status {
    background: #ffedd5;
    color: #ea580c;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Full Specifications Table */
.mbsui-full-specs {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.mbsui-spec-cat-title {
    background: #f8fafc;
    padding: 12px 24px;
    margin: 0;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.mbsui-spec-category:first-of-type .mbsui-spec-cat-title {
    border-top: none;
}

.mbsui-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.mbsui-spec-row {
    border-bottom: 1px solid #f1f5f9;
}

.mbsui-spec-th {
    width: 30%;
    padding: 12px 24px;
    text-align: left;
    color: #64748b;
    font-weight: 600;
    font-size: 0.92rem;
    vertical-align: top;
    border-right: 1px solid #f1f5f9;
    word-break: break-word;
}

.mbsui-spec-td {
    padding: 12px 24px;
    color: #334155;
    line-height: 1.6;
    font-size: 0.92rem;
    word-break: break-word;
}

/* FAQ Section */
.mbsui-faq-section {
    background: #fff;
    border-radius: 16px;
    padding: clamp(18px, 4vw, 28px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}
.mbsui-faq-section h2 {
    margin: 0 0 20px 0;
    font-weight: 800;
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: #111827;
}
.mbsui-faq-item {
    border-bottom: 1px solid #e5e7eb;
}
.mbsui-faq-item:last-child {
    border-bottom: none;
}
.mbsui-faq-q {
    padding: 16px 0;
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: color 0.15s;
}
.mbsui-faq-q:hover { color: #2563eb; }
.mbsui-faq-icon {
    transition: transform 0.3s ease;
    color: #9ca3af;
    flex-shrink: 0;
}
.mbsui-faq-q.active { color: #2563eb; }
.mbsui-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.mbsui-faq-a p {
    margin: 0;
    padding-bottom: 16px;
    color: #4b5563;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ==========================================================================
   Mobile UI Overrides for Plugin
   ========================================================================== */
@media (max-width: 768px) {
    .mbsui-grid-main {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mbsui-rating-bars {
        grid-template-columns: 1fr;
    }
    .mbsui-rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .mbsui-rh-right {
        width: 100%;
        min-width: unset;
    }

    .mbsui-pros-cons-wrap {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .mbsui-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mbsui-btn-compare {
        width: 100%;
        text-align: center;
    }

    .mbsui-section-header {
        padding: 14px 16px;
    }

    .mbsui-store-row {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mbsui-store-right {
        width: 100%;
        justify-content: space-between;
    }

    .mbsui-prices-grid {
        padding: 14px;
        grid-template-columns: 1fr;
    }

    .mbsui-spec-cat-title {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .mbsui-spec-th {
        width: 36%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .mbsui-spec-td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

