/* 
 * B2B Sourcing Marketplace Style Sheet
 * Palette: Navy Blue (#0F172A), Slate Blue (#1E293B), Emerald Green (#10B981), Soft Gray (#F8FAFC)
 */

:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --accent-color: #10b981;
    --accent-hover: #059669;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body.b2b-marketplace {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Typography Scaling */
h1, h2, h3, h4 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.25;
}

/* Header & Brand Nav Override */
.b2b-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.b2b-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2b-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-logo span {
    color: var(--accent-color);
}

.b2b-nav-phone {
    font-weight: 600;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* Hero Section */
.b2b-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 6rem 2rem 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.b2b-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.b2b-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.b2b-hero-content h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.b2b-hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.7;
}

.b2b-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: var(--transition);
}

.b2b-hero-cta:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.b2b-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-color);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Sourcing Image Mockup */
.b2b-hero-mockup {
    position: relative;
}

.b2b-mockup-card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.b2b-mockup-stat {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.b2b-mockup-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.b2b-mockup-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.5rem;
}

.b2b-mockup-info h4 {
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.b2b-mockup-info p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.9rem;
}

/* Trust indicators: Garantías de Abastecimiento */
.b2b-trust {
    padding: 5rem 2rem;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.b2b-trust-container {
    max-width: 1200px;
    margin: 0 auto;
}

.b2b-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.b2b-section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.b2b-section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.b2b-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.b2b-trust-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.b2b-trust-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.b2b-trust-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.b2b-trust-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.b2b-trust-card p {
    color: var(--text-light);
    margin: 0;
}

/* Multi-Step RFQ Section */
.b2b-rfq-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.b2b-rfq-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: start;
}

.b2b-rfq-intro h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.b2b-rfq-intro p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.b2b-rfq-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.b2b-rfq-benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.b2b-rfq-benefit-item i {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

.b2b-rfq-benefit-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.b2b-rfq-benefit-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Multi-Step RFQ Engine Form */
.b2b-rfq-engine {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
}

.b2b-rfq-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.b2b-rfq-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.b2b-rfq-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-color);
    transform: translateY(-50%);
    z-index: 2;
    transition: var(--transition);
}

.b2b-progress-step {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 3;
    transition: var(--transition);
    color: var(--text-light);
}

.b2b-progress-step.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.b2b-progress-step.completed {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

/* Step Layouts */
.b2b-rfq-step-pane {
    display: none;
}

.b2b-rfq-step-pane.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.b2b-rfq-step-pane h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.b2b-form-group {
    margin-bottom: 1.5rem;
}

.b2b-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.b2b-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    outline: none;
    box-sizing: border-box;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.b2b-form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Checkbox Grid Options */
.b2b-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.b2b-checkbox-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transition: var(--transition);
}

.b2b-checkbox-card:hover {
    border-color: #cbd5e1;
    background-color: var(--bg-light);
}

.b2b-checkbox-card input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--accent-color);
    width: 1.1rem;
    height: 1.1rem;
}

.b2b-checkbox-card span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* RFQ Navigation buttons */
.b2b-rfq-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
}

.b2b-btn {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.b2b-btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.b2b-btn-primary:hover {
    background-color: var(--accent-hover);
}

.b2b-btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.b2b-btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: #cbd5e1;
}

.b2b-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alert Notification */
.b2b-alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: none;
}

.b2b-alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.b2b-alert-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

/* Dynamic Sourcing Activity Ticker */
.b2b-ticker-section {
    background-color: var(--primary-color);
    padding: 1.25rem 2rem;
    color: #ffffff;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.b2b-ticker-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.b2b-ticker-label {
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.b2b-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    height: 1.5rem;
    position: relative;
}

.b2b-ticker-item {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    opacity: 0;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-ticker-item.active {
    top: 0;
    opacity: 1;
}

.b2b-ticker-item.exit {
    top: -100%;
    opacity: 0;
}

.b2b-ticker-item i {
    color: var(--accent-color);
}

.b2b-ticker-close {
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.b2b-ticker-close:hover {
    color: #ffffff;
}

/* Exit-Intent Safety Net Modal */
.b2b-exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 1rem;
}

.b2b-exit-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.b2b-exit-card {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.b2b-exit-modal.show .b2b-exit-card {
    transform: scale(1);
}

.b2b-exit-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
}

.b2b-exit-close:hover {
    color: var(--primary-color);
}

.b2b-exit-header {
    text-align: center;
    margin-bottom: 2rem;
}

.b2b-exit-header i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.b2b-exit-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.b2b-exit-header p {
    color: var(--text-light);
    margin: 0;
}

/* SEO Landing Pages Specific Styles */
.b2b-seo-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem 2rem;
}

.b2b-seo-header {
    margin-bottom: 3rem;
}

.b2b-seo-header h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.b2b-seo-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.b2b-seo-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-seo-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.b2b-seo-content h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem 0;
}

.b2b-seo-content p {
    margin-bottom: 1.5rem;
}

.b2b-seo-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.b2b-seo-content li {
    margin-bottom: 0.5rem;
}

.b2b-seo-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 0.375rem;
    padding: 2rem;
    margin: 3rem 0;
}

.b2b-seo-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Footer Section */
.b2b-footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 4rem 2rem 6rem 2rem; /* padding bottom extra for the ticker */
    border-top: 1px solid rgba(255,255,255,0.05);
}

.b2b-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.b2b-footer-logo {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.25rem;
}

.b2b-footer-logo span {
    color: var(--accent-color);
}

.b2b-footer-links {
    display: flex;
    gap: 2rem;
}

.b2b-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.b2b-footer-links a:hover {
    color: #ffffff;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
    .b2b-hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .b2b-hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .b2b-rfq-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .b2b-trust-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .b2b-hero-content h1 {
        font-size: 2.25rem;
    }
    
    .b2b-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-exit-card {
        padding: 2rem;
    }
    
    .b2b-footer-container {
        flex-direction: column;
        text-align: center;
    }
}
