/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(to bottom right, #f9fafb, #e5e7eb, #f3f4f6);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    cursor: pointer;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(to bottom right, #dc2626, #b91c1c);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    color: #1f2937;
}

.logo-text p {
    font-size: 0.75rem;
    color: #dc2626;
}

.logo-img {
    height: 3rem;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    color: #4b5563;
    font-weight: 500;
}

.nav-btn:hover {
    background: #f9fafb;
}

.nav-btn.active {
    background: #fee2e2;
    color: #dc2626;
}

/* Main Content */
#main-content {
    min-height: calc(100vh - 400px);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-col h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-col p {
    color: #d1d5db;
    font-size: 0.875rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 2rem 0;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: #dc2626;
    color: white;
}

.btn-primary:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-outline {
    border: 1px solid #d1d5db;
    color: #dc2626;
}

.btn-outline:hover {
    background: #f9fafb;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #fca5a5;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: repeat(1, 1fr); }
}

/* Page Sections */
.page-section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-header p {
    color: #4b5563;
    max-width: 42rem;
    margin: 0 auto;
}

/* Model Selector */
.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #dc2626;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
}

.search-input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    outline: none;
    min-width: 200px;
}

.filter-select:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Model Card */
.model-card {
    cursor: pointer;
}

.model-image {
    aspect-ratio: 4/3;
    background: linear-gradient(to bottom right, #e5e7eb, #d1d5db);
    position: relative;
    overflow: hidden;
}

.model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.model-card:hover .model-image img {
    transform: scale(1.05);
}

.model-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: white;
}

.badge-rtk {
    background: #dc2626;
}

.badge-eyepilot {
    background: #2563eb;
}

.model-content {
    padding: 1.5rem;
}

.model-title {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.model-description {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.model-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.spec-item label {
    display: block;
    color: #9ca3af;
    font-size: 0.75rem;
}

.spec-item span {
    color: #1f2937;
    font-weight: 500;
}

/* Model Details */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.back-button:hover {
    color: #1f2937;
}

.model-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.model-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.tabs {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.tabs-nav {
    display: flex;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: fit-content;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid transparent;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.tab-btn:hover {
    background: #f9fafb;
}

.tab-btn.active {
    border-bottom-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}

.tab-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Icons (simple SVG) */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .page-section {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .model-content {
        padding: 1rem;
    }
    
    .model-specs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .spec-card {
        padding: 0.75rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .model-header {
        padding: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.125rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 0.875rem; }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .logo-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text p {
        font-size: 0.625rem;
    }
    
    .nav-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .page-section {
        padding: 1.5rem 0;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .card {
        border-radius: 0.5rem;
    }
    
    .model-content {
        padding: 0.75rem;
    }
    
    .model-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.625rem;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tab-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .tab-content {
        padding: 0.75rem;
    }
    
    .model-header,
    .tabs {
        border-radius: 0.5rem;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .accordion-content {
        padding: 0.75rem 1rem;
    }
    
    .dealer-content {
        padding: 1rem;
    }
    
    .alert {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .footer-grid {
        padding: 1.5rem 0;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .model-specs {
        gap: 0.5rem;
    }
    
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .container {
        padding: 0 2rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .page-section {
        padding: 1.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .footer-grid {
        padding: 2rem 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .btn,
    .tab-btn,
    .accordion-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .model-card:hover .model-image img {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* Technical Sheet Styles */
.tech-image {
    aspect-ratio: 16/9;
    background: linear-gradient(to bottom right, #e5e7eb, #d1d5db);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.tech-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.spec-card {
    padding: 1rem;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    display: flex;
    gap: 0.75rem;
}

.spec-icon {
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spec-info label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.spec-info span {
    color: #1f2937;
    font-weight: 500;
}

/* Accordion */
.accordion-item {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-button {
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: background 0.2s;
}

.accordion-button:hover {
    background: #f9fafb;
}

.accordion-content {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: none;
}

.accordion-content.active {
    display: block;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
}

.accordion-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alert Boxes */
.alert {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #064e3b;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background: #fed7aa;
    border: 1px solid #fdba74;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Dealer Card */
.dealer-card .card-image {
    aspect-ratio: 16/9;
    background: linear-gradient(to bottom right, #d1d5db, #9ca3af);
}

.dealer-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dealer-content {
    padding: 1.5rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: #fbbf24;
}

.star.empty {
    color: #d1d5db;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.services-list {
    margin-bottom: 1.5rem;
}

.services-list h4 {
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.services-list ul {
    list-style: none;
    padding: 0;
}

.services-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

/* Utility Classes */
/* Note: Most of these utilities are already provided by Tailwind */

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.hidden {
    display: none !important;
}