/* Modern Submenu Styles for Nittin Template */

/* Modern submenu container */
.modern-submenu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.15),
        0 12px 20px -8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, visibility, transform;
    pointer-events: none;
    margin:auto;
}

.menu-item:hover .modern-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.left-side{
    align-self: center;
}

/* Category Title */
.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

/* Small Action Buttons - Same as Primary Button */
.small-action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #db5c4f;
    color: white;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 400;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(219, 92, 79, 0.3), 0 2px 4px rgba(219, 92, 79, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.small-action-button i{
    align-content: center;
}

.small-action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.small-action-button:hover::before {
    left: 100%;
}

.small-action-button:hover {
    background: #c73e2e;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(219, 92, 79, 0.4),
        0 4px 8px rgba(219, 92, 79, 0.3);
}

.small-action-button:active {
    transform: translateY(0);
}

.small-action-button svg,
.small-action-button img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.small-action-button:hover svg,
.small-action-button:hover img {
    transform: scale(1.1);
}

/* Product Grid */
.product-grid {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    max-width: 100%;
    
}

/* Product Item Styles */
.product-item {
    align-content: center;
    justify-items: center;
    padding: 10px 10px;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 0;
    gap: 12px;
    height: 180px;
    aspect-ratio: 1;
    width: 100%;
}

/* Last product item - right rounded corners */
.product-item:last-child {
    border-radius: 0 16px 16px 0;
}

/* Visual separator between cards */
.product-item:not(:nth-child(2n))::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(219, 92, 79, 0.2) 20%, 
        rgba(219, 92, 79, 0.4) 50%, 
        rgba(219, 92, 79, 0.2) 80%, 
        transparent 100%);
}

.product-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: rgba(219, 92, 79, 0.4);
}

.product-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f9fafb;
}

.product-item.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(229, 231, 235, 0.6);
}

/* Product Icon */
.product-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}




/* Product Content */
.product-content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

/* Product Title */
.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.product-item:hover .product-title {
    color: #db5c4f;
}

.product-title.disabled {
    color: #9ca3af;
}

/* Product Description */
.product-description {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.product-item:hover .product-description {
    color: #374151;
}

.product-description.disabled {
    color: #d1d5db;
}

/* Card Animation */
@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-submenu .flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    .modern-submenu .flex-shrink-0 {
        flex-shrink: 1;
        margin-right: 0;
        height: auto;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .product-item {
        padding: 16px 12px;
        margin: 0 0 8px 0;
        gap: 10px;
        height: 100px;
    }
    
    .product-item::after {
        display: none;
    }
    
    .product-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 768px) {
    .modern-submenu {
        padding: 1rem;
    }
    
    .modern-submenu .max-w-5xl {
        padding: 0;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
    
    .product-grid {
        gap: 0;
    }
    
    .product-item {
        padding: 14px 10px;
        margin: 0 0 6px 0;
        gap: 8px;
        height: 80px;
    }
    
    .product-icon {
        width: 24px;
        height: 24px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-description {
        font-size: 13px;
    }
    
    .small-action-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Enhanced hover effects */
.modern-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(219, 92, 79, 0.05) 0%, rgba(219, 92, 79, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modern-card:hover::after {
    opacity: 1;
}

/* Focus states for accessibility */
.product-item:focus-visible {
    outline: 2px solid #db5c4f;
    outline-offset: 2px;
}

.small-action-button:focus-visible {
    outline: 2px solid #db5c4f;
    outline-offset: 2px;
}

/* Glass morphism fallback for older browsers */
@supports not (backdrop-filter: blur(1px)) {
    .modern-submenu {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(229, 231, 235, 0.8);
    }
}

/* Animation delays for staggered effect */
.product-item:nth-child(1) { animation-delay: 0ms; }
.product-item:nth-child(2) { animation-delay: 50ms; }
.product-item:nth-child(3) { animation-delay: 100ms; }
.product-item:nth-child(4) { animation-delay: 150ms; }
.product-item:nth-child(5) { animation-delay: 200ms; }
.product-item:nth-child(6) { animation-delay: 250ms; }
.product-item:nth-child(7) { animation-delay: 300ms; }
.product-item:nth-child(8) { animation-delay: 350ms; }
.product-item:nth-child(9) { animation-delay: 400ms; }

/* Enhanced micro-interactions */
.product-item {
    cursor: pointer;
}

.product-item:not(.disabled):hover .product-icon {
    animation: iconPulse 0.6s ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Subtle loading state */
.modern-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.modern-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #db5c4f;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    .product-item,
    .small-action-button,
    .modern-submenu {
        animation: none;
        transition: none;
    }
    
    .product-item {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-item {
        border: 2px solid #000;
    }
    
    .product-item:hover {
        border-color: #db5c4f;
    }
    
    .small-action-button {
        border: 2px solid #000;
    }
}

/* Modern Simple Submenu Styles */
.modern-simple-submenu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.15),
        0 12px 20px -8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, visibility, transform;
    pointer-events: none;
    min-width: max-content;
}

.menu-item:hover .modern-simple-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Simple Submenu Content */
.simple-submenu-content {
    
}

/* Simple Category Title */
.simple-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Simple Items Grid */
.simple-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0px;
}

/* Simple Item Styles */
.simple-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0px 30px;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-20px);
    animation: simpleSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* First item - top rounded corners */
.simple-item:first-child {
    border-radius: 12px 12px 0 0;
}

/* Last item - bottom rounded corners */
.simple-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Middle items - no border radius */
.simple-item:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.simple-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.simple-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.simple-item.disabled:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Simple Item Icon */
.simple-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.simple-item:hover .simple-item-icon {
    background: linear-gradient(135deg, #db5c4f 0%, #c73e2e 100%);
    transform: scale(1.05);
}

.simple-item:hover .simple-item-icon svg,
.simple-item:hover .simple-item-icon img {
    filter: brightness(0) invert(1);
}

/* Simple Item Content */
.simple-item-content {
    flex: 1;
    min-width: 0;
    padding: 10px;
}

/* Simple Item Title */
.simple-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.simple-item:hover .simple-item-title {
    color: #111827;
}

.simple-item-title.disabled {
    color: #9ca3af;
}

/* Simple Item Description */
.simple-item-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.simple-item:hover .simple-item-description {
    color: #4b5563;
}

.simple-item-description.disabled {
    color: #d1d5db;
}

/* Simple Item Animation */
@keyframes simpleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation delays for simple items */
.simple-item:nth-child(1) { animation-delay: 0ms; }
.simple-item:nth-child(2) { animation-delay: 50ms; }
.simple-item:nth-child(3) { animation-delay: 100ms; }
.simple-item:nth-child(4) { animation-delay: 150ms; }
.simple-item:nth-child(5) { animation-delay: 200ms; }
.simple-item:nth-child(6) { animation-delay: 250ms; }

.mobile-menu-content{
    background: linear-gradient(to bottom, #0f172a, #1e293b, #0f172a);
}

.mobile-menu-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(rgba(71, 85, 105, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(71, 85, 105, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: radial-gradient(ellipse 30% 25% at 75% 25%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 30% 25% at 75% 25%, black 30%, transparent 70%);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
  }