/* Reset und Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ecf0f1;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

nav {
    margin-left: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

/* Cart Icon in Header */
#cart-icon {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.1rem;
}

#cart-count {
    background-color: #e17055;
    border-radius: 50%;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    text-align: center;
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-btn {
    background-color: #e17055;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin: 0.5rem;
}

.cta-btn:hover {
    background-color: #d63031;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.section {
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.section:nth-child(odd) {
    background-color: white;
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

/* Products Section */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    padding: 10px;
}

.product-image:hover img {
    transform: scale(1.05);
}

.product-image span {
    font-size: 4rem;
    color: #666;
}

.product-card h3 {
    padding: 1rem;
    font-size: 1.5rem;
    color: #2c3e50;
}

.product-card p {
    padding: 0 1rem 1rem;
    color: #666;
    font-size: 1rem;
    flex-grow: 1;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
    padding: 0 1rem;
}

.stock {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
}

.btn {
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 0.8rem 1rem;
}

.btn-primary {
    background-color: #27ae60;
    color: white;
    width: 100%;
    border-radius: 0 0 15px 15px;
    font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
    background-color: #229954;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Ersatzteile Specific Styles */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
}

.part-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.part-icon {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #ddd, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.part-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.part-info h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.part-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.part-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 1rem;
}

.part-availability {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.available {
    background: #d4edda;
    color: #155724;
}

.low-stock {
    background: #fff3cd;
    color: #856404;
}

.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.add-to-cart-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 0 0 15px 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.add-to-cart-btn:hover:not(:disabled) {
    background-color: #229954;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 2rem;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content label {
    font-weight: bold;
    color: #555;
    margin-bottom: 0.2rem;
}

.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="text"] {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content button[type="submit"] {
    background-color: #3498db;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.modal-content button[type="submit"]:hover {
    background-color: #2980b9;
}

.form-switch-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #777;
}

.form-switch-text a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.form-switch-text a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Forgot Password & Reset Password Modal Styles */
#forgot-password-modal .modal-content h2,
#reset-password-modal .modal-content h2 {
    color: #e74c3c;
}

#forgot-password-form button[type="submit"],
#reset-password-form button[type="submit"] {
    background-color: #e74c3c;
}

#forgot-password-form button[type="submit"]:hover,
#reset-password-form button[type="submit"]:hover {
    background-color: #c0392b;
}

/* Cart Specific Styles */
#cart-items {
    margin-bottom: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px dashed #eee;
    font-size: 1.1rem;
    color: #444;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item .item-name {
    font-weight: bold;
    flex-grow: 1;
}

.cart-item .item-quantity {
    margin: 0 10px;
    color: #666;
}

.cart-item .item-price {
    font-weight: bold;
    color: #27ae60;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.remove-item-btn:hover {
    color: #c0392b;
}

.cart-summary {
    text-align: right;
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-top: 2px solid #3498db;
    padding-top: 1rem;
}

.cart-summary .checkout-btn {
    background-color: #e17055;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.cart-summary .checkout-btn:hover {
    background-color: #d63031;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.footer-contact-info {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-contact-info h3 {
    color: #ecf0f1;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.footer-contact-info p {
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.footer-contact-info p i {
    margin-right: 8px;
    color: #3498db;
}

.footer-contact-info a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-info a:hover {
    color: #74b9ff;
    text-decoration: underline;
}

.social-media-icons {
    margin-top: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-media-icons a {
    color: white;
    font-size: 1.8rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-media-icons a:hover {
    color: #3498db;
    transform: translateY(-3px) scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        margin-right: 0;
    }

    .hamburger {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #2c3e50, #3498db);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .category-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    footer {
        padding: 1.5rem 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section {
        padding: 2rem 15px;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .category-filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
        text-align: center;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}