/* Zapaterías Coloso B2B ERP - Master Stylesheet */
:root {
    --bg-primary: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #334155;
    --accent-gold: #d97706;
    --accent-gold-hover: #b45309;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #f59e0b;
}

/* Header */
.app-header {
    background-color: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.client-badge {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid var(--accent-gold);
    color: #fbbf24;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.cart-summary-btn {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

/* Main Container */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Footer */
.app-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-ai {
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.95rem;
}

.footer-ai em {
    color: #f59e0b;
}

.sentinel-logo {
    height: 38px;
    width: auto;
    opacity: 1;
    object-fit: contain;
    filter: brightness(1.15);
}

/* Forms & UI Elements */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-gold);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #475569;
}

/* Grid & Catalog Layout */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    border-color: var(--accent-gold);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.angle-thumbnails {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 20px;
}

.thumb-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
}

.thumb-btn.active, .thumb-btn:hover {
    opacity: 1;
    border-color: var(--accent-gold);
}

.product-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.model-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.model-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.model-price .original {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 4px;
}

/* CX Color Badges */
.cx-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.cx-chip {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.cx-chip.active, .cx-chip:hover {
    background: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
}

/* Size Curve Matrix Grid */
.size-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin: 1rem 0;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.size-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.size-input {
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
}

/* BOM Status Timeline Bar */
.tracking-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 3rem 0 2rem 0;
    padding: 0 1rem;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 2rem;
    right: 2rem;
    height: 4px;
    background: var(--border-color);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 24px;
    left: 2rem;
    height: 4px;
    background: var(--accent-gold);
    z-index: 2;
    transition: width 0.4s ease;
}

.timeline-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
}

.step-node {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.timeline-step.completed .step-node {
    background: var(--accent-gold);
    border-color: #f59e0b;
    color: #fff;
}

.timeline-step.active .step-node {
    background: #2563eb;
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

.step-label {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-step.active .step-label, .timeline-step.completed .step-label {
    color: var(--text-main);
}
