/* NÉONAIL Custom Styles - Mobile First */

/* =================================
   MOBILE FIRST BASE STYLES
   ================================= */

* {
    transition: all 0.2s ease;
}

/* Touch-friendly tap targets (min 44x44px) */
button, a, input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* =================================
   CART BADGE ANIMATION
   ================================= */

.cart-count {
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cart-count.pulse {
    animation: cartPulse 0.3s ease;
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* =================================
   MOBILE RESPONSIVE UTILITIES
   ================================= */

/* Mobile: Stack everything vertically */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Product grids: 2 columns on mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Full width cards on mobile */
    .mobile-full {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Larger touch targets */
    input, select, textarea, button {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
    }
    
    /* Mobile navigation */
    .mobile-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .mobile-nav.active {
        max-height: 500px;
    }
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Desktop: 4+ columns */
@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #FF69B4;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF1493;
}

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Product card shadows */
.product-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* Loading spinner */
.loading {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF69B4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide in from bottom */
.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Focus styles for accessibility */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid #FF69B4;
    outline-offset: 2px;
}

/* Disabled state */
button:disabled, input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Price styling */
.price-original {
    position: relative;
}

.price-original::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: currentColor;
}

/* Cart badge */
.cart-badge {
    animation: bounceIn 0.3s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease-out;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #FF69B4 0%, #9333EA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effect */
.card-hover {
    position: relative;
    overflow: hidden;
}

.card-hover::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.5s ease;
}

.card-hover:hover::before {
    left: 100%;
}

/* Notification styles */
.notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status badges */
.status-pending { background-color: #FEF3C7; color: #92400E; }
.status-confirmed { background-color: #DBEAFE; color: #1E40AF; }
.status-shipped { background-color: #E9D5FF; color: #6B21A8; }
.status-delivered { background-color: #D1FAE5; color: #065F46; }
.status-cancelled { background-color: #FEE2E2; color: #991B1B; }

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    
    .desktop-menu {
        display: none;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

/* Image lazy loading placeholder */
img[loading="lazy"] {
    background: #f3f4f6;
}

/* Custom checkbox/radio */
input[type="checkbox"], input[type="radio"] {
    cursor: pointer;
    accent-color: #FF69B4;
}

/* Table hover effect */
tbody tr:hover {
    background-color: #FFF7FC;
}

/* Sticky header shadow */
.sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Empty state */
.empty-state {
    opacity: 0.6;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: #1F2937;
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Success/Error states */
.success-border { border-color: #10B981 !important; }
.error-border { border-color: #EF4444 !important; }

/* Zoom effect on hover */
.zoom-hover {
    overflow: hidden;
}

.zoom-hover img {
    transition: transform 0.5s ease;
}

.zoom-hover:hover img {
    transform: scale(1.1);
}