﻿/* ============================================================================
   CATEGORY LIST ITEM STYLES - GLASS MORPHISM
   ============================================================================ */

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 32px;
}

/* Category List Item - Glass Card Style */
.category-list-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 88px;
    max-height: 88px;
}

/* Content wrapper - clickable for scroll action */
.category-list-item-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    cursor: pointer;
    min-width: 0;
    height: 100%;
}


@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effect with glass morph */
.category-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.15), 0 16px 48px rgba(212, 165, 116, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(212, 165, 116, 0.30);
    background: rgba(255, 255, 255, 0.95);
}

.category-list-item-content:hover {
    /* No additional transform to avoid conflict */
}

/* Shine effect on hover */
.category-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
    transition: left 0.5s ease;
}

.category-list-item:hover::before {
    left: 100%;
}

/* Category Icon - Glass Circle */
.category-list-icon {
    width: 60px;
    height: 60px;
    background: white;
    
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.category-list-item:hover .category-list-icon {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.category-list-item-content:hover .category-list-icon {
    transform: scale(1.08) rotate(5deg);
}

.category-list-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.category-list-item:hover .category-list-icon img {
    transform: scale(1.05);
}

/* Category Info */
.category-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.category-list-name {
    font-size: 17px;
    font-weight: 800;
    color: #212529;
    letter-spacing: -0.3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.category-list-count {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.2px;
    margin: 0;
    line-height: 1.2;
}

/* Arrow with animation - Now a clickable link */
.category-list-arrow {
    font-size: 20px;
    color: #d4a574;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 116, 0.15);
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    z-index: 10;
    position: relative;
    align-self: center;
}

    .category-list-arrow:hover {
        transform: translateX(4px) scale(1.1);
        background: linear-gradient(135deg, #d4a574 0%, #c4956f 100%);
        color: white;
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.40);
    }

    .category-list-arrow:active {
        transform: translateX(2px) scale(1.05);
    }

/* Make sure the item itself is not a link anymore */
.category-list-item {
    cursor: default;
}

    /* Active state */
    .category-list-item:active {
        transform: translateX(3px) translateY(-1px) scale(0.98);
    }

/* ============================================================================
   ERROR STATE STYLES
   ============================================================================ */

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 245, 245, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 24px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: errorBounce 1s ease-in-out;
}

@keyframes errorBounce {
    0%, 100% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.9);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(0.95);
    }
}

.error-title {
    font-size: 22px;
    font-weight: 800;
    color: #dc3545;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.error-message {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 400px;
}

.error-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    font-size: 13px;
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 24px;
}

    .error-details::before {
        content: '❌';
        font-size: 16px;
    }

.error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.error-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #d4a574 0%, #c4956f 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.30);
}

    .error-retry-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(212, 165, 116, 0.40);
    }

    .error-retry-btn:active {
        transform: translateY(0);
    }

    .error-retry-btn::before {
        content: '🔄';
        font-size: 18px;
        display: inline-block;
        animation: rotate 2s linear infinite;
    }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.error-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.9);
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

    .error-home-btn:hover {
        background: white;
        border-color: #d4a574;
        color: #d4a574;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .error-home-btn::before {
        content: '🏠';
        font-size: 18px;
    }

/* ============================================================================
   ALERT INFO STYLES
   ============================================================================ */

.alert {
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    margin: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

.alert-info {
    background: rgba(219, 234, 254, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

    .alert-info::before {
        content: 'ℹ️';
        font-size: 20px;
    }

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 640px) {
    .categories-list {
        padding: 0 16px;
        gap: 0px;
    }

    .category-list-item {
        padding: 14px 16px;
        border-radius: 16px;
    }

    .category-list-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .category-list-name {
        font-size: 16px;
    }

    .category-list-count {
        font-size: 12px;
    }

    .category-list-arrow {
        font-size: 18px;
        width: 24px;
        height: 24px;
    }

    .error-state {
        padding: 40px 15px;
        margin: 15px;
    }

    .error-icon {
        font-size: 48px;
    }

    .error-title {
        font-size: 18px;
    }

    .error-message {
        font-size: 14px;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .error-retry-btn,
    .error-home-btn {
        width: 100%;
        justify-content: center;
    }

    .alert {
        margin: 15px;
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   SKELETON LOADING — DASHBOARD
   ============================================================================ */

@keyframes db-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

/* Base shimmer block */
.db-skel {
    background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
    background-size: 600px 100%;
    animation: db-shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}

/* ── Category list item skeleton ─────────────────────────────────────────── */
.db-skel-cat-item {
    background: white;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    min-height: 88px;
}

.db-skel-cat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    flex-shrink: 0;
}

.db-skel-cat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.db-skel-cat-name {
    height: 17px;
    width: 58%;
    border-radius: 6px;
}

.db-skel-cat-count {
    height: 13px;
    width: 33%;
    border-radius: 5px;
}

.db-skel-cat-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── Product card skeleton (fits .menu-categories 2-col grid) ─────────────── */
.db-skel-card {
    background: white;
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.db-skel-card-img {
    width: 100%;
    height: 110px;
    border-radius: 14px;
}

.db-skel-card-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-skel-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.db-skel-card-name {
    height: 15px;
    width: 72%;
    border-radius: 5px;
}

.db-skel-card-price {
    height: 12px;
    width: 44%;
    border-radius: 4px;
}

.db-skel-card-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}
