/* View Toggle Switch */
.view-toggle-container {
    padding: 0 20px 16px 20px;
    background: var(--bg-body);
    position: sticky;
    top: 60px;
    z-index: 48;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 8px;
    z-index: 2;
    transition: color 0.2s;
}

.toggle-btn.active {
    color: var(--bg-body);
    /* Main Blue on White BG */
}

/* Sliding background for toggle */
.toggle-bg {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    z-index: 1;
}

/* Category Grid View */
.category-grid-view {
    display: none;
    /* Hidden by default */
    padding: 0 20px 40px 20px;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    aspect-ratio: 1/1;
    /* Square cards */
    display: flex;
    flex-direction: column;
    text-decoration: none;
    /* remove anchor underline */
}

.cat-card-img {
    width: 60%;
    height: 60%;
    position: absolute;
    bottom: -10%;
    right: -10%;
    object-fit: contain;
    transform: rotate(-10deg);
    transition: transform 0.3s;
}

.cat-card:hover .cat-card-img {
    transform: rotate(0deg) scale(1.1);
}

.cat-card-content {
    padding: 16px;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cat-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.cat-card-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Logic classes in body */
body.view-categories .category-grid-view {
    display: grid;
}

body.view-categories .menu-content,
body.view-categories .category-pills-bar,
body.view-categories .story-section {
    /* Maybe keep Story? User said "burada". Let's hide to focus */
    /* display: none; */
    /* Let's keep Stories visible always, toggling only list vs grid */
}

body.view-categories .menu-content {
    display: none;
}

body.view-categories .category-pills-bar {
    display: none;
}

body.view-products .category-grid-view {
    display: none;
}