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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 24px;
    color: #1a1a1a;
}

body.main-categories-view {
    height: 100vh;
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

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

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #1a1a1a;
    background: #fff;
    margin-bottom: 24px;
}

.back-btn:hover {
    border-color: #b0b0b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.content-area {
    min-height: 400px;
}

/* Category Cards */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 0;
    height: calc(100vh - 270px);
    max-height: calc(100vh - 270px);
}

.category-card {
    padding: 40px 24px;
    /* border: 1px solid #e0e0e0; */
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.category-card.anterior-card::before {
    background-image: url('/backgrounds/interior-background.jpg');
}

.category-card.posterior-card::before {
    background-image: url('/backgrounds/posterior-background.jpg');
}

.category-card:hover {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card:hover::after {
    background: transparent;
}

.category-card h2 {
    font-size: 24px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Sub-category Cards */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.subcategory-card {
    padding: 32px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/backgrounds/sub-category-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.subcategory-card:hover {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subcategory-card h3 {
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
    position: relative;
    z-index: 2;
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.brand-card {
    padding: 24px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-card:hover {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-card-image {
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.brand-card h4 {
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.product-card:hover {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card-image {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.product-card-content {
    padding: 16px;
}

.product-card h4 {
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 8px;
}

/* Expanded Product View */
.product-expanded {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.product-expanded-image {
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

.product-expanded-content {
    padding: 32px;
}

.product-expanded h2 {
    font-size: 28px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.product-expanded p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    font-weight: 300;
}

.page-title {
    font-size: 28px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    body.main-categories-view {
        height: 100vh;
        overflow: hidden;
    }

    body:not(.main-categories-view) {
        overflow: auto;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
        gap: 16px;
    }

    .subcategories-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

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

    .logo {
        max-width: 160px;
    }

    .page-title {
        font-size: 24px;
    }

    body {
        padding: 16px;
    }

    .header {
        margin-bottom: 16px;
    }

    .categories-grid {
        height: calc(100vh - 220px);
        max-height: calc(100vh - 220px);
    }
}
