/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #1a2634;
    height: auto;
}

nav {
    background-color: #1a2634;
    color: white;
    padding: 1rem;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Add padding to main content to account for fixed header */
main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Common Components */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: white;
}

.btn-primary { background: #4285f4; }
.btn-success { background: #34a853; }
.btn-secondary { background: #666; }

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Contact Page */
.contact-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-item {
    margin: 1.5rem 0;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submit-btn {
    background: #1a2634;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.submit-btn:hover {
    background: #2c3e50;
}

/* Product Page */
.product-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 1rem;
}

.product-details {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-image {
    flex: 0 0 400px; /* Fixed width for image container */
}

.product-image img {
    width: 100%;
    height: 400px; /* Fixed height */
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background: #fff;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.product-specs {
    flex: 1;
}

.spec-item {
    display: flex;
    margin-bottom: 1rem;
}

.spec-item label {
    width: 150px;
    font-weight: 500;
    color: #666;
}

.reference-numbers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ref-number {
    font-family: monospace;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.product-price {
    font-size: 2rem;
    font-weight: 500;
    color: #333;
    margin: 1.5rem 0;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto; /* Push buttons to bottom */
}

.product-actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .product-details {
        flex-direction: column;
    }

    .product-image {
        flex: 0 0 auto;
    }
}

/* ECU Shop */
.shop-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 1rem;
}

.shop-header {
    margin-bottom: 2rem;
}

.shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.manufacturer-select {
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.items-per-page {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    margin-bottom: 1rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .shop-container {
        margin-top: 0;
        padding: 1rem;
    }

    .shop-filters {
        flex-direction: column;
    }

    .search-input,
    .manufacturer-select,
    .items-per-page {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card img {
        height: 180px;
    }
}

/* Services Page */
.services-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #1a2634;
}

.service-card p {
    color: #666;
    line-height: 1.5;
}

/* Admin Dashboard */
.admin-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.admin-card {
    padding: 25px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}

.admin-card:hover {
    transform: translateY(-5px);
    color: white;
}

.admin-card h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.admin-card p {
    opacity: 0.9;
    margin: 0;
}

.blue { background: #4285f4; }
.green { background: #34a853; }
.purple { background: #a142f4; }
.yellow { background: #fbbc05; }
.red { background: #ea4335; }

.recent-activity {
    margin-top: 40px;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.card-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

/* Tables */
.ecu-table,
.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ecu-table th,
.ecu-table td,
.orders-table th,
.orders-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.orders-table th {
    background: #f5f5f5;
    font-weight: 500;
}

.ecu-table img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    padding: 2rem;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .nav-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .search-input {
        width: 100%;
    }
    
    .filters {
        flex-direction: column;
    }

    /* Header and navigation mobile styles */
    header {
        position: relative;
        height: auto;
    }

    /* Product details mobile styles */
    main {
        margin-top: 0;
    }

    .product-container {
        margin-top: 1rem;
        padding: 0.5rem;
    }

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

    .product-image {
        flex: 0 0 auto;
    }

    .product-image img {
        height: 300px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .spec-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .spec-item label {
        width: 100%;
    }

    .product-price {
        font-size: 1.75rem;
        margin: 1rem 0;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .product-actions button {
        width: 100%;
    }
}

/* Add styles for larger tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-container {
        padding: 1rem;
    }

    .product-details {
        gap: 1.5rem;
    }

    .product-image {
        flex: 0 0 350px;
    }

    .product-image img {
        height: 350px;
    }
}

/* Admin Form Styles */
.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 2rem auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

/* Admin ECU Management Styles */
.ecu-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ecu-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ecu-table th,
.ecu-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ecu-table th {
    background: #f5f5f5;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Filter and Search Styles */
.filter-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.price-range {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.price-input {
    width: 100px;
}

/* Product Detail Page Styles */
.reference-numbers {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.reference-numbers span {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.success { background: #34a853; }
.notification.error { background: #ea4335; }

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* ECU Shop Styles */
.ecu-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.ecu-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.ecu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ecu-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.ecu-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.ecu-details {
    margin-bottom: 15px;
}

.ecu-price {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 15px 0;
}

/* Search and Filter Section */
.search-filter {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    max-width: 300px;
}

.manufacturer-select {
    min-width: 200px;
}

/* ECU Shop specific spacing */
.ecu-shop-container {
    margin-top: 80px;  /* Space for fixed header */
    padding: 20px;
}

/* Product page specific spacing */
.product-container {
    margin-top: 80px;  /* Space for fixed header */
    padding: 20px;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
}

.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product-info {
    background: white;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-detail {
    margin: 15px 0;
}

.product-detail h3 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 5px;
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    margin: 25px 0;
}

.product-actions {
    display: flex;
    gap: 15px;
}

.product-actions button {
    flex: 1;
}

/* Product Page Styles */
.product-page {
    margin-top: 80px;
    padding: 40px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
}

.product-image-section img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-info-section h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-group label {
    font-weight: 500;
    color: #666;
}

.info-group span {
    color: #333;
}

.reference-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reference-list span {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    color: #2196F3;
    margin: 20px 0;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.product-actions button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.product-actions button:hover {
    opacity: 0.9;
}

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

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.pagination-container {
    margin-top: 2rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
}

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

.page-btn.active {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.page-dots {
    color: #666;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {
    .pagination-container {
        padding: 0.5rem;
    }
    
    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Landing Page Styles */
.landing-page {
    padding-top: 60px;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background-color: #4285f4;
    color: white;
}

.cta-button.secondary {
    background-color: #34a853;
    color: white;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: #4285f4;
    margin-bottom: 1rem;
}

.contact-bar {
    background-color: #f8f9fa;
    padding: 3rem 1rem;
    text-align: center;
}

.contact-info h2 {
    margin-bottom: 0.5rem;
}

.phone-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: #34a853;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
}

.phone-link i {
    margin-right: 0.5rem;
}

footer {
    background-color: #1a2634;
    color: white;
    padding: 3rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-phone {
    font-size: 1.1rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features {
        padding: 2rem 1rem;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .phone-link {
        display: block;
        margin: 1rem auto;
        max-width: 280px;
    }
}
