/* ── Refurbished / Used Product Page Styles ──────────────────── */

/* ── Buy Now Button — Full Width (sold-individually body class) ── */

body.sold-individually .wp-block-woocommerce-add-to-cart-form form.cart {
    display: block !important;
}

body.sold-individually .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button {
    width: 100% !important;
    display: block !important;
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-align: center;
}

/* Hide quantity input for sold-individually products */
body.sold-individually .wp-block-woocommerce-add-to-cart-form .quantity {
    display: none !important;
}

/* ── Price Comparison ─────────────────────────────────────────── */

.nbr-refurb-price {
    margin: 12px 0 16px;
}

.nbr-refurb-rrp {
    font-size: 0.9rem;
    color: #64748b;
}

.nbr-refurb-rrp s {
    color: #94a3b8;
}

.nbr-refurb-our-price {
    font-size: 1.6rem;
    color: #1e293b;
    margin: 4px 0;
}

.nbr-refurb-our-price strong {
    color: #16a34a;
    font-weight: 700;
}

.nbr-refurb-saving {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 4px;
}

.nbr-refurb-vat {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
}

.nbr-refurb-vat a {
    color: #1e3a8a;
    text-decoration: underline;
}

/* ── VAT Relief Label ────────────────────────────────────────── */

.nbr-vat-relief-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Secure Payment Trust Strip ──────────────────────────────── */

.nbr-trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    margin: -4px 0 16px;
    border-top: none;
}

.nbr-trust-padlock {
    color: #16a34a;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.nbr-trust-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-right: 4px;
}

.nbr-trust-cards {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nbr-trust-cards img {
    height: 28px;
    width: auto;
    border-radius: 4px;
}

/* ── Badges (Year / Condition / Colour) ───────────────────────── */

.nbr-refurb-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.nbr-refurb-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.nbr-badge-year {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.nbr-badge-colour {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Condition colour classes — used on badges and condition grid */
.nbr-cond-new {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.nbr-cond-excellent {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.nbr-cond-very-good {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

.nbr-cond-good {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.nbr-cond-fair {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.nbr-refurb-notes {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin: 0 0 12px;
}

/* ── Condition Report Grid ────────────────────────────────────── */

.nbr-refurb-condition {
    margin: 24px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.nbr-refurb-condition h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
}

.nbr-condition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.nbr-condition-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.nbr-condition-icon {
    color: #64748b;
    flex-shrink: 0;
    display: flex;
}

.nbr-condition-label {
    font-size: 0.8rem;
    color: #475569;
    flex: 1;
}

.nbr-condition-value {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Why Buy From NBR ─────────────────────────────────────────── */

.nbr-refurb-why {
    margin: 30px 0;
    padding: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.nbr-refurb-why h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 18px;
    text-align: center;
}

.nbr-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.nbr-why-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nbr-why-item:hover {
    border-color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
}

.nbr-why-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 8px;
    margin-bottom: 10px;
}

.nbr-why-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.nbr-why-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

/* ── What's Included ──────────────────────────────────────────── */

.nbr-refurb-included {
    margin: 24px 0;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.nbr-refurb-included h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
    margin: 0 0 14px;
}

.nbr-included-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nbr-included-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #1e293b;
    padding: 6px 0;
}

.nbr-included-icon {
    display: flex;
    color: #16a34a;
    flex-shrink: 0;
}

/* ── Specifications Table (in tab) ────────────────────────────── */

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

.nbr-specs-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.nbr-specs-table tr:last-child {
    border-bottom: none;
}

.nbr-specs-table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    padding: 10px 16px 10px 0;
    width: 40%;
    vertical-align: top;
}

.nbr-specs-table td {
    font-size: 0.9rem;
    color: #1e293b;
    padding: 10px 0;
    font-weight: 500;
}

/* ── Hide empty excerpt & product meta on refurbished pages ───── */

.single-product .wp-block-post-excerpt {
    display: none;
}

body.sold-individually .wp-block-woocommerce-product-meta {
    display: none;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 600px) {
    .nbr-condition-grid {
        grid-template-columns: 1fr;
    }

    .nbr-why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nbr-included-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .nbr-refurb-our-price {
        font-size: 1.3rem;
    }
}
