/* ========================================
   Pages CSS - Additional styles for pages
   ======================================== */

/* Breadcrumbs */
.breadcrumbs {
    background: var(--gray-50);
    padding: 12px 0;
    font-size: 14px;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    color: var(--gray-300);
}

.breadcrumbs a {
    color: var(--gray-600);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs [aria-current="page"] {
    color: var(--gray-900);
    font-weight: 500;
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    padding: 60px 0 80px;
    color: white;
    text-align: center;
}

.page-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-hero .lead {
    font-size: 20px;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.service-card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.service-icon svg {
    width: 36px;
    height: 36px;
}

.fdm-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.sla-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.sls-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mjf-icon { background: linear-gradient(135deg, #10b981, #059669); }

.service-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.service-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.service-badge.popular { background: #dbeafe; color: #1d4ed8; }
.service-badge.precision { background: #ede9fe; color: #6d28d9; }
.service-badge.industrial { background: #fef3c7; color: #d97706; }
.service-badge.premium { background: #d1fae5; color: #059669; }

.service-desc {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 12px;
}

.service-specs dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.service-specs dl div {
    display: flex;
    flex-direction: column;
}

.service-specs dt {
    font-size: 12px;
    color: var(--gray-500);
}

.service-specs dd {
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.material-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--gray-100);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray-700);
}

.service-best-for ul,
.service-limitations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-best-for li,
.service-limitations li {
    padding: 4px 0;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    color: var(--gray-600);
}

.service-best-for li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.service-limitations li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--gray-400);
}

.service-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.service-actions .btn {
    flex: 1;
}

/* Additional Services */
.additional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.additional-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
}

.additional-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.additional-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.additional-card p {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.additional-card a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.additional-card a:hover {
    text-decoration: underline;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.comparison-table th,
.comparison-table td {
    padding: 16px 24px;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
}

.comparison-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table tbody tr:hover {
    background: var(--gray-50);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), #4338ca);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-outline {
    border-color: white;
    color: white;
}

.cta-section .btn-outline:hover {
    background: white;
    color: var(--primary);
}

/* Materials Page */
.materials-filter {
    background: var(--gray-50);
    padding: 24px 0;
    position: sticky;
    top: 80px;
    z-index: 10;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--gray-300);
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.material-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.material-card-image {
    height: 160px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.material-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.material-card-content {
    padding: 24px;
}

.material-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.material-card .category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.material-props {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.prop {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prop-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.prop-value {
    font-weight: 600;
}

.prop-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.prop-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.color-swatches {
    display: flex;
    gap: 6px;
    margin: 16px 0;
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.material-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.price {
    font-weight: 600;
    color: var(--gray-900);
}

/* Quote Page Styles */
.quote-page {
    min-height: 100vh;
    background: var(--gray-50);
}

.quote-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    padding: 32px;
}

@media (max-width: 1024px) {
    .quote-container {
        grid-template-columns: 1fr;
    }
}

.quote-main {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quote-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.quote-summary-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quote-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.quote-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--gray-200);
}

.quote-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.3s;
}

.quote-step.active .step-number {
    background: var(--primary);
    color: white;
}

.quote-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 13px;
    color: var(--gray-500);
}

.quote-step.active .step-label {
    color: var(--gray-900);
    font-weight: 500;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: var(--gray-50);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.upload-area h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.supported-formats {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.format-badge {
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

/* File List */
.file-list {
    margin-top: 24px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    margin-bottom: 12px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.file-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.file-status.processing { background: #fef3c7; color: #d97706; }
.file-status.ready { background: #d1fae5; color: #059669; }
.file-status.error { background: #fee2e2; color: #dc2626; }

.file-actions {
    display: flex;
    gap: 8px;
}

.file-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.2s;
}

.file-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.file-action-btn.delete:hover {
    border-color: var(--error);
    color: var(--error);
    background: #fee2e2;
}

/* 3D Viewer */
.viewer-container {
    width: 100%;
    height: 400px;
    background: var(--gray-900);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.viewer-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.7);
    padding: 8px 16px;
    border-radius: 8px;
}

.viewer-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.viewer-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Options Form */
.options-section {
    margin-top: 32px;
}

.options-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.option-group {
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.option-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.option-card {
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card:hover {
    border-color: var(--primary);
}

.option-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.option-card input {
    display: none;
}

.option-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.option-card-title {
    font-weight: 600;
    font-size: 14px;
}

.option-card-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Quote Summary */
.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-label {
    color: var(--gray-600);
}

.summary-item-value {
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 2px solid var(--gray-900);
    font-size: 18px;
    font-weight: 600;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.summary-note {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    margin-top: 16px;
}

/* Gallery Page */
.gallery-filter {
    padding: 24px 0;
    background: var(--gray-50);
    position: sticky;
    top: 80px;
    z-index: 10;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.gallery-overlay p {
    font-size: 13px;
    opacity: 0.8;
}

/* Account Pages */
.account-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 32px;
    padding: 32px 0;
}

@media (max-width: 768px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
}

.account-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.account-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-nav li {
    margin-bottom: 4px;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
}

.account-nav a:hover,
.account-nav a.active {
    background: var(--gray-100);
    color: var(--gray-900);
}

.account-nav a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.account-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Order Cards */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.order-id {
    font-weight: 600;
}

.order-date {
    font-size: 13px;
    color: var(--gray-500);
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending { background: #fef3c7; color: #d97706; }
.order-status.processing { background: #dbeafe; color: #1d4ed8; }
.order-status.shipped { background: #d1fae5; color: #059669; }
.order-status.delivered { background: #d1fae5; color: #047857; }

.order-body {
    padding: 20px;
}

.order-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.order-item-thumb {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: 8px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

.order-total {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 32px;
    }
    
    .page-hero .lead {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section h2 {
        font-size: 28px;
    }
    
    .quote-container {
        padding: 16px;
    }
    
    .quote-main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
}
