/* ============================================================
   MB COMERCIO — PREMIUM INTERACTIVE MODULES STYLE SHEET
   ============================================================ */

/* ─── SHARED INTERACTIVE UI STYLES ─── */
.interactive-section {
    position: relative;
    padding: 150px 8%;
    background: var(--bg-soft); /* Light premium background */
    color: var(--text-dark); /* Dark purple text */
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.interactive-section::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(28, 11, 48, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: 1;
    pointer-events: none;
}

.interactive-title {
    font-family: var(--font-display);
    font-size: clamp(42px, 5.5vw, 75px);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--text-dark);
}

.interactive-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--accent-muted), #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.interactive-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

/* Glassmorphic Panel Base */
.glass-panel {
    background: rgba(255, 255, 255, 0.85); /* Premium light frosted glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(28, 11, 48, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(28, 11, 48, 0.04);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.glass-panel:hover {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 30px 60px rgba(251, 191, 36, 0.08);
}


/* ────────────────────────────────────────────────────────────
   1. MODULE: INTERACTIVE TERROIR MAP
   ──────────────────────────────────────────────────────────── */
.map-canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1.5 / 1;
    background: rgba(28, 11, 48, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(28, 11, 48, 0.06);
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(28, 11, 48, 0.04);
}

.map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Map Path Styling */
.map-land {
    fill: rgba(28, 11, 48, 0.05);
    stroke: rgba(28, 11, 48, 0.1);
    stroke-width: 0.8;
    transition: fill 0.3s;
}

/* Shipping routes paths */
.map-route {
    fill: none;
    stroke: var(--border-gold);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    opacity: 0.6;
    animation: routeFlow 30s linear infinite;
}

@keyframes routeFlow {
    to { stroke-dashoffset: -100; }
}

/* Map Hotspots styling */
.map-hotspot {
    cursor: pointer;
    outline: none;
}

.map-hotspot-circle {
    fill: var(--accent);
    stroke: var(--bg-main);
    stroke-width: 2;
    transition: fill 0.3s, r 0.3s;
}

.map-hotspot-pulse {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.5;
    opacity: 1;
    animation: pulseRing 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.map-hotspot.active .map-hotspot-circle {
    fill: var(--lime-accent);
}

.map-hotspot.active .map-hotspot-pulse {
    stroke: var(--lime-accent);
}

.map-hotspot.spot-netherlands .map-hotspot-circle {
    fill: var(--text-dark);
    stroke: var(--white);
}

.map-hotspot.spot-netherlands .map-hotspot-pulse {
    stroke: var(--text-dark);
}

@keyframes pulseRing {
    0% { r: 5px; opacity: 1; stroke-width: 1.5; }
    100% { r: 24px; opacity: 0; stroke-width: 0.5; }
}

/* Hotspot Info Label */
.map-hotspot-label {
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 0.15em;
    fill: var(--text-mid);
    pointer-events: none;
    text-transform: uppercase;
}

/* Terroir details list */
.terroir-meta-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terroir-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(28, 11, 48, 0.08);
}

.terroir-meta-label {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
}

.terroir-meta-value {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 400;
}

.terroir-meta-value.accented {
    color: var(--accent-muted);
}

.terroir-meta-value.limed {
    color: var(--lime-muted);
}


/* ────────────────────────────────────────────────────────────
   2. MODULE: COLD CHAIN SIMULATOR
   ──────────────────────────────────────────────────────────── */
.simulator-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sim-track-container {
    position: relative;
    padding: 20px 0;
    margin-bottom: 10px;
}

.sim-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.sim-line-bg {
    position: absolute;
    top: 50%;
    left: 4%;
    width: 92%;
    height: 2px;
    background: rgba(28, 11, 48, 0.1);
    transform: translateY(-50%);
    z-index: 1;
}

.sim-line-progress {
    position: absolute;
    top: 50%;
    left: 4%;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--lime-accent));
    box-shadow: 0 0 10px var(--lime-accent);
    transform: translateY(-50%);
    z-index: 1;
    transition: width 0.1s linear;
}

.sim-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.sim-node-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid rgba(28, 11, 48, 0.15);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.sim-node-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(28, 11, 48, 0.2);
    transition: all 0.4s ease;
}

.sim-node.active .sim-node-dot {
    border-color: var(--lime-accent);
    box-shadow: 0 0 15px var(--lime-accent);
}

.sim-node.active .sim-node-dot::after {
    background: var(--lime-accent);
}

.sim-node.completed .sim-node-dot {
    border-color: var(--accent);
}

.sim-node.completed .sim-node-dot::after {
    background: var(--accent);
}

.sim-node-label {
    font-family: var(--font-heading);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-mid);
    transition: color 0.4s;
}

.sim-node.active .sim-node-label {
    color: var(--text-dark);
    font-weight: 700;
}

/* Telemetry Screen details */
.telemetry-dashboard {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

/* Gauge styling */
.telemetry-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.gauge-svg {
    width: 160px;
    height: 160px;
}

.gauge-bg {
    fill: none;
    stroke: rgba(28, 11, 48, 0.08);
    stroke-width: 10;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 62.8; /* 3/4 circle */
    stroke-linecap: round;
    transform: rotate(135deg);
    transform-origin: 80px 80px;
}

.gauge-fill {
    fill: none;
    stroke: url(#gauge-gradient);
    stroke-width: 10;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2; /* Dynamic mapping */
    stroke-linecap: round;
    transform: rotate(135deg);
    transform-origin: 80px 80px;
    transition: stroke-dashoffset 0.8s ease;
}

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    text-align: center;
}

.gauge-val {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--text-dark);
    font-weight: 300;
    line-height: 1;
}

.gauge-unit {
    font-family: var(--font-heading);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    margin-top: 4px;
}

/* Graph area */
.telemetry-graph-panel {
    position: relative;
    height: 180px;
    background: rgba(28, 11, 48, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(28, 11, 48, 0.08);
    padding: 20px;
    overflow: hidden;
}

.graph-svg {
    width: 100%;
    height: 100%;
}

.graph-grid-line {
    stroke: rgba(28, 11, 48, 0.06);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.graph-path-target {
    fill: none;
    stroke: var(--lime-accent);
    stroke-width: 2;
    opacity: 0.8;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 0.5s ease;
}

.graph-path-standard {
    fill: none;
    stroke: rgba(28, 11, 48, 0.15);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.sim-controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(28, 11, 48, 0.08);
    padding-top: 30px;
}

.btn-simulate {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-muted));
    border: none;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.2);
    transition: all 0.4s ease;
}

.btn-simulate:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.35);
}

.btn-simulate:disabled {
    background: rgba(28, 11, 48, 0.06);
    color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


/* ────────────────────────────────────────────────────────────
   3. MODULE: B2B SPEC CONFIGURATOR
   ──────────────────────────────────────────────────────────── */
.config-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-label {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent);
    font-weight: 700;
}

.config-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.config-option-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(28, 11, 48, 0.08);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.config-option-card:hover {
    border-color: rgba(28, 11, 48, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.config-option-card.selected {
    border-color: var(--accent);
    background: rgba(251, 191, 36, 0.05);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
}

.config-option-card h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 4px;
}

.config-option-card span {
    font-family: var(--font-heading);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

/* Custom Range Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.config-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(28, 11, 48, 0.1);
    border-radius: 2px;
    outline: none;
}

.config-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent);
    transition: transform 0.2s;
}

.config-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-val-bubble {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--accent);
    min-width: 60px;
    text-align: right;
}

/* Spec sheet output card */
.spec-output-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(251, 191, 36, 0.4);
    padding: 40px;
    border-radius: 12px;
    position: relative;
}

.spec-header {
    border-bottom: 1px solid rgba(28, 11, 48, 0.08);
    padding-bottom: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.spec-title-label {
    font-family: var(--font-heading);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.spec-title-val {
    font-family: var(--font-display);
    font-size: 28px;
    margin-top: 5px;
    font-weight: 300;
}

.spec-logo {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: rgba(28, 11, 48, 0.2);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.spec-box-item span {
    display: block;
    font-family: var(--font-heading);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    margin-bottom: 6px;
}

.spec-box-item strong {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 400;
}

/* Container load gauge */
.container-load-panel {
    border-top: 1px solid rgba(28, 11, 48, 0.08);
    padding-top: 24px;
}

.container-visual-box {
    margin-top: 12px;
    height: 12px;
    background: rgba(28, 11, 48, 0.06);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.container-visual-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent), var(--lime-accent));
    box-shadow: 0 0 8px var(--lime-accent);
    border-radius: 6px;
    transition: width 0.8s ease;
}


/* ────────────────────────────────────────────────────────────
   4. MODULE: QUALITY LAB PORTAL
   ──────────────────────────────────────────────────────────── */
.lab-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.lab-batch-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.lab-batch-pill {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(28, 11, 48, 0.1);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.3s;
}

.lab-batch-pill:hover {
    border-color: rgba(28, 11, 48, 0.25);
    color: var(--text-dark);
}

.lab-batch-pill.selected {
    border-color: var(--lime-accent);
    background: rgba(163, 230, 53, 0.05);
    color: var(--lime-accent);
}

/* Scan HUD overlay */
.lab-scan-hud {
    position: relative;
    height: 250px;
    background: rgba(28, 11, 48, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(163, 230, 53, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(28, 11, 48, 0.06);
}

.scan-laser-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--lime-accent), transparent);
    box-shadow: 0 0 15px var(--lime-accent);
    z-index: 10;
    top: 0;
    animation: laserScan 3s linear infinite;
    display: none;
}

@keyframes laserScan {
    0% { top: 0%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.scan-hud-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(163, 230, 53, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.scan-text-overlay {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--lime-accent);
    text-shadow: 0 0 10px rgba(163, 230, 53, 0.5);
    animation: textFlicker 1.5s infinite;
}

@keyframes textFlicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
    75% { opacity: 0.9; }
}

/* Lab Analysis Panel */
.lab-report-card {
    display: none;
    animation: fadeIn 0.6s ease forwards;
}

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

.lab-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.lab-metric-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(28, 11, 48, 0.06);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.lab-metric-title {
    font-family: var(--font-heading);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    margin-bottom: 12px;
}

.lab-metric-num {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--lime-accent);
    font-weight: 300;
    line-height: 1;
}

.lab-metric-status {
    font-family: var(--font-heading);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-mid);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lab-metric-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime-accent);
    box-shadow: 0 0 6px var(--lime-accent);
}

.lab-cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    border-top: 1px solid rgba(28, 11, 48, 0.08);
    padding-top: 24px;
}

.lab-cert-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lab-cert-stamp {
    font-family: var(--font-heading);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 1px solid var(--lime-accent);
    color: var(--lime-accent);
    padding: 6px 14px;
    border-radius: 3px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(163, 230, 53, 0.15);
}

.btn-lab-dl {
    font-family: var(--font-heading);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-lab-dl:hover {
    color: var(--text-dark);
    border-color: var(--text-dark);
}


/* ────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN FOR INTERACTIVE MODULES
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .interactive-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .interactive-section {
        padding: 100px 5%;
    }
}

@media (max-width: 768px) {
    .telemetry-dashboard {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .config-options-grid {
        grid-template-columns: 1fr;
    }
    
    .lab-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .lab-cert-footer {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}
