* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --lego-red: #E60012;
    --lego-yellow: #FFD700;
    --lego-blue: #0051BA;
    --lego-green: #237841;
    --dark-gray: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--lego-red), var(--lego-blue));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

#cart-count {
    background: var(--lego-yellow);
    color: var(--dark-gray);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--lego-yellow), var(--lego-red));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.2rem;
}

/* Products Section */
.products-section {
    padding: 3rem 0;
}

.products-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--lego-blue);
}

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

.product-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--light-gray);
}

.product-card-content {
    padding: 1.5rem;
}

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--lego-blue);
    min-height: 3rem;
}

.product-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 3rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--lego-red);
    margin-bottom: 1rem;
}

.btn-add-cart {
    width: 100%;
    padding: 0.8rem;
    background: var(--lego-red);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: #c5000f;
}

/* Product Detail Page */
.product-detail {
    padding: 3rem 0;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-detail-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-detail-info h1 {
    font-size: 2rem;
    color: var(--lego-blue);
    margin-bottom: 1rem;
}

.product-detail-info .price {
    font-size: 2rem;
    color: var(--lego-red);
    font-weight: bold;
    margin: 1rem 0;
}

.product-specs {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.product-specs h3 {
    margin-bottom: 1rem;
    color: var(--lego-blue);
}

.product-specs ul {
    list-style: none;
}

.product-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.product-specs li:last-child {
    border-bottom: none;
}

.product-description {
    margin: 2rem 0;
    line-height: 1.8;
}

/* Cart Page */
.cart-page {
    padding: 3rem 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cart-item-info img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details h3 {
    color: var(--lego-blue);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--lego-blue);
    background: var(--white);
    color: var(--lego-blue);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.quantity-control button:hover {
    background: var(--lego-blue);
    color: var(--white);
}

.quantity-control span {
    min-width: 30px;
    text-align: center;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--lego-red);
    min-width: 100px;
    text-align: right;
}

.remove-item {
    background: var(--lego-red);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.cart-summary {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.cart-summary h2 {
    margin-bottom: 1rem;
    color: var(--lego-blue);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.cart-summary-row.total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--lego-red);
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--lego-red);
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--lego-green);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: #1a5a2e;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
}

.empty-cart h2 {
    color: var(--lego-blue);
    margin-bottom: 1rem;
}

/* Checkout Form */
.checkout-page {
    padding: 3rem 0;
}

.checkout-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--lego-blue);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--light-gray);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--lego-blue);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.payment-info {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.payment-info h3 {
    color: var(--lego-green);
    margin-bottom: 0.5rem;
}

/* Content Pages */
.content-page {
    padding: 3rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.content-page h1 {
    color: var(--lego-blue);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.content-page h2 {
    color: var(--lego-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--lego-yellow);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--lego-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.btn-modal-close {
    background: var(--lego-blue);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-modal-close:hover {
    background: #003d8f;
}

/* Google Maps */
.map-container {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Responsive - Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .product-detail-container {
        gap: 2rem;
    }

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

    .hero p {
        font-size: 1.1rem;
    }
}

/* Responsive - Mobile and Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Header */
    header {
        padding: 0.75rem 0;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    nav li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Products */
    .products-section {
        padding: 2rem 0;
    }

    .products-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-card-content {
        padding: 1rem;
    }

    .product-card h3 {
        font-size: 1rem;
        min-height: auto;
    }

    .product-card p {
        font-size: 0.85rem;
        min-height: auto;
        margin-bottom: 0.75rem;
    }

    .product-price {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .btn-add-cart {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    /* Product Detail */
    .product-detail {
        padding: 2rem 0;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-detail-info h1 {
        font-size: 1.5rem;
    }

    .product-detail-info .price {
        font-size: 1.5rem;
    }

    .product-specs {
        padding: 1rem;
    }

    /* Cart */
    .cart-page {
        padding: 2rem 0;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-info {
        width: 100%;
    }

    .cart-item-info img {
        width: 80px;
        height: 80px;
    }

    .cart-item-controls {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }

    .cart-item-price {
        text-align: left;
        min-width: auto;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    /* Forms */
    .checkout-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    /* Content Pages */
    .content-page {
        padding: 2rem 0;
    }

    .content-page h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .content-page h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }

    /* Map */
    .map-container {
        height: 300px;
    }

    /* Modal */
    .modal-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .modal-content p {
        font-size: 1rem;
    }
}

/* Responsive - Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

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

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

    .product-detail-info h1 {
        font-size: 1.3rem;
    }

    .product-detail-info .price {
        font-size: 1.3rem;
    }

    .cart-item-info img {
        width: 60px;
        height: 60px;
    }

    .content-page h1 {
        font-size: 1.5rem;
    }

    .content-page h2 {
        font-size: 1.3rem;
    }

    .btn-checkout,
    .btn-add-cart {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    nav a {
        font-size: 0.9rem;
    }
}

