/* modern.css */
/* Add this to your header.php: <link rel="stylesheet" href="modern.css"> */

/* Modern Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Card Enhancements */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transform: translateX(50px);
    transition: transform 0.3s ease;
}

.product-card:hover .product-actions {
    transform: translateX(0);
}

.product-action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Quick View Modal */
.quick-view-img {
    height: 300px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

/* Floating Labels for Forms */
.form-floating > .form-control {
    border-radius: 10px;
}

.form-floating > label {
    padding-left: 15px;
}

/* Badge Styles */
.badge-new {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-sale {
    background: linear-gradient(135deg, #FF4757 0%, #ff3742 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 10px 0;
}

.progress-bar {
    height: 10px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Tooltip Customization */
.tooltip-inner {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 8px 12px;
}

.tooltip-arrow::before {
    border-top-color: var(--secondary-color) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive Images */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Grid Layouts */
.grid-container {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-image {
    height: 200px;
    width: 100%;
    margin-bottom: 10px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background: #121212;
        color: #ffffff;
    }
    
    body.dark-mode .product-card {
        background: #1e1e1e;
        color: #ffffff;
    }
    
    body.dark-mode .category-sidebar {
        background: #1e1e1e;
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

/* modern.css - Bottom Navigation Bar Updates */

/* Bottom Navigation Bar - Modern Design */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 8px 0;
    display: none;
    transition: transform 0.3s ease;
}

.mobile-bottom-nav.hidden {
    transform: translateY(100%);
}

.mobile-bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.mobile-bottom-nav .nav-item {
    position: relative;
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin: 0 4px;
    position: relative;
    overflow: hidden;
}

.mobile-bottom-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    opacity: 0;
    border-radius: 12px;
    transition: opacity 0.3s ease;
}

.mobile-bottom-nav .nav-link.active,
.mobile-bottom-nav .nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-link.active::before {
    opacity: 0.1;
}

.mobile-bottom-nav .nav-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
    z-index: 2;
}

.mobile-bottom-nav .nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
}

/* Active Indicator */
.mobile-bottom-nav .nav-link.active .nav-icon {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Cart Badge for Mobile */
.mobile-cart-badge {
    position: absolute;
    top: -4px;
    right: 8px;
    background: linear-gradient(135deg, #FF4757 0%, #ff3742 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.3);
    z-index: 3;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Floating Action Button (FAB) */
.fab-container {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 999;
    display: none;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(var(--primary-color-rgb, 255, 107, 53), 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fab-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.fab-main:hover::before {
    width: 100px;
    height: 100px;
}

.fab-main i {
    font-size: 24px;
    position: relative;
    z-index: 2;
}

.fab-main:active {
    transform: scale(0.95);
}

/* FAB Menu */
.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    color: var(--secondary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.fab-item:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.fab-item i {
    font-size: 18px;
}

/* Bottom Nav for Tablets */
@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    .fab-container {
        display: block;
    }
    
    /* Adjust content padding for bottom nav */
    body {
        padding-bottom: 60px;
    }
}

/* Enhanced Bottom Nav for Very Small Screens */
@media (max-width: 576px) {
    .mobile-bottom-nav {
        padding: 6px 0;
    }
    
    .mobile-bottom-nav .nav-icon {
        width: 22px;
        height: 22px;
        font-size: 18px;
    }
    
    .mobile-bottom-nav .nav-label {
        font-size: 9px;
    }
    
    .fab-container {
        bottom: 65px;
        right: 15px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
    }
    
    .fab-main i {
        font-size: 22px;
    }
}

/* Hide bottom nav when keyboard appears on mobile */
@media (max-height: 500px) {
    .mobile-bottom-nav {
        transform: translateY(100%);
    }
    
    .fab-container {
        bottom: 20px;
    }
}

/* Bottom Nav Scroll Behavior */
.mobile-bottom-nav.scroll-down {
    transform: translateY(100%);
}

.mobile-bottom-nav.scroll-up {
    transform: translateY(0);
}

/* Active State with Ripple Effect */
.mobile-bottom-nav .nav-link.active .nav-icon {
    position: relative;
}

.mobile-bottom-nav .nav-link.active .nav-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(-50%, -50%);
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.1;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -2px;
    right: 8px;
    background: linear-gradient(135deg, #FFA502 0%, #FF7B00 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(255, 165, 2, 0.3);
    z-index: 3;
}

/* Dark Mode Support for Bottom Nav */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: rgba(30, 30, 30, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-bottom-nav .nav-link {
        color: #aaa;
    }
    
    .mobile-bottom-nav .nav-link.active,
    .mobile-bottom-nav .nav-link:hover {
        color: var(--primary-color);
    }
    
    .mobile-bottom-nav .nav-link::before {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .fab-item {
        background: #2a2a2a;
        color: #ddd;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    }
    
    .fab-item:hover {
        background: var(--primary-color);
        color: white;
    }
}

/* Accessibility Features */
.mobile-bottom-nav .nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduce Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav .nav-link,
    .mobile-bottom-nav .nav-link.active .nav-icon,
    .mobile-cart-badge,
    .fab-main,
    .fab-item,
    .fab-main::before {
        animation: none;
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mobile-bottom-nav {
        border-top: 2px solid var(--primary-color);
    }
    
    .mobile-bottom-nav .nav-link.active {
        outline: 2px solid var(--primary-color);
    }
}