:root {
    --primary: #440C2C;
    --accent: #F4B94E;
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

.categories-layout-web {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.all-categories-grid {
    display: grid;
    gap: 16px;
}

.category-card {
    background: white;
    border-radius: 18px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:active {
    transform: scale(0.98);
}

.category-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-image-box {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image-box img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.categories-web-sidebar {
    display: none;
}

.edit-categories-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
}

.category-count, .shop-now-link-cat, .subcategories-list {
    display: none;
}

@media screen and (min-width: 768px) {
    .all-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        padding: 0;
    }
    
    .category-card {
        display: block;
        padding: 0;
        border-radius: 20px;
        overflow: hidden;
        background: white;
    }
    
    .category-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 30px rgba(0,0,0,0.12);
    }
    
    .category-card .category-image-box {
        width: 100%;
        height: 200px;
        background: #fafafa;
        border-radius: 0;
        padding: 30px;
    }
    
    .category-card .category-image-box img {
        width: 100%;
        max-width: 110px;
        height: auto;
        transition: transform 0.3s;
    }
    
    .category-card:hover .category-image-box img {
        transform: scale(1.05);
    }
    
    .category-card .category-info {
        padding: 16px;
        text-align: center;
        border-top: 1px solid #f0f0f0;
    }
    
    .category-card .category-info h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .category-count {
        display: block;
        font-size: 12px;
        color: var(--accent);
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .shop-now-link-cat {
        display: inline-block;
        font-size: 12px;
        font-weight: 600;
        color: var(--primary);
        text-decoration: none;
        border-bottom: 1px solid var(--accent);
        padding-bottom: 2px;
    }
    
    .subcategories-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        margin-top: 12px;
    }
    
    .subcategory-tag {
        font-size: 10px;
        padding: 4px 10px;
        background: #f5f5f5;
        border-radius: 20px;
        color: #666;
    }
}

@media screen and (min-width: 1024px) {
    .categories-layout-web {
        padding: 30px 40px;
    }
    
    .all-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .category-card .category-image-box {
        height: 240px;
    }
    
    .category-card .category-image-box img {
        max-width: 130px;
    }
    
    .category-card .category-info h3 {
        font-size: 18px;
    }
}

@media screen and (min-width: 1400px) {
    .all-categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
    }
    
    .category-card .category-image-box {
        height: 260px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .all-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media screen and (max-width: 767px) {
    .categories-layout-web {
        padding: 16px;
    }
    
    .all-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-image-box {
        width: 55px;
        height: 55px;
    }
    
    .category-image-box img {
        width: 42px;
        height: 42px;
    }
    
    .category-info h3 {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .all-categories-grid {
        gap: 10px;
    }
    
    .category-card {
        padding: 10px;
    }
    
    .category-image-box {
        width: 48px;
        height: 48px;
    }
    
    .category-image-box img {
        width: 38px;
        height: 38px;
    }
    
    .category-info h3 {
        font-size: 12px;
    }
}

.categories-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.category-card.draggable {
    cursor: grab;
}

.category-card.dragging {
    opacity: 0.5;
}

.skeleton-card {
    background: #f2f2f2;
    border-radius: 18px;
    padding: 14px;
    height: 95px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading {
    0% { left: -150px; }
    100% { left: 100%; }
}

.skeleton-image {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
    border-radius: 12px;
}

.skeleton-text {
    width: 80px;
    height: 14px;
    background: #e0e0e0;
    border-radius: 6px;
}

@media screen and (min-width: 768px) {
    .skeleton-card {
        display: block;
        height: auto;
        padding: 0;
    }
    
    .skeleton-card .skeleton-image {
        width: 100%;
        height: 200px;
    }
    
    .skeleton-card .skeleton-text {
        width: 60%;
        margin: 16px auto;
    }
}
.categories-page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0 0;
}

.categories-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.categories-page-header p {
    font-size: 14px;
    color: #666;
}

@media screen and (max-width: 767px) {
    .categories-page-header {
        margin-bottom: 20px;
        padding: 10px 0 0;
    }
    
    .categories-page-header h1 {
        font-size: 22px;
    }
    
    .categories-page-header p {
        font-size: 12px;
    }
}

@media screen and (min-width: 768px) {
    .categories-page-header {
        margin-bottom: 40px;
        padding: 30px 0 0;
    }
    
    .categories-page-header h1 {
        font-size: 32px;
    }
}
@media screen and (max-width: 767px) {
    .categories-page-header {
        display: none;
    }
}