/* ============================================
   ALGERIA COD E-COMMERCE PLATFORM
   Custom Styles & Tailwind Extensions
   ============================================ */

/* Font Configuration */
.font-cairo {
    font-family: 'Cairo', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* RTL Form Inputs */
input, select, textarea {
    text-align: right;
}

input[type="email"],
input[type="url"],
input[type="tel"],
input[type="color"],
input[dir="ltr"] {
    text-align: left;
}

/* Form Input Focus States */
.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Product Card Hover Effects */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

/* Image Hover Zoom */
.image-zoom {
    transition: transform 0.5s ease;
}

.product-card:hover .image-zoom {
    transform: scale(1.05);
}

/* Gallery Thumbnail Active State */
.gallery-thumb {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.gallery-thumb.active {
    border-color: currentColor;
    opacity: 1;
}

.gallery-thumb:not(.active) {
    opacity: 0.6;
}

.gallery-thumb:not(.active):hover {
    opacity: 1;
}

/* Order Form Radio Buttons */
.delivery-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-option:has(input:checked) {
    border-color: currentColor;
    background-color: #f8fafc;
}

/* Success Animation */
@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-message {
    animation: successPop 0.4s ease-out;
}

/* Toast Animation */
@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

.toast-enter {
    animation: toastSlide 0.3s ease-out forwards;
}

/* Modal Animation */
@keyframes modalFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-backdrop {
    animation: modalFade 0.2s ease-out;
}

.modal-content {
    animation: modalSlide 0.3s ease-out;
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Pulse Animation for Live Indicator */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Admin Navigation Active State */
.admin-nav-btn {
    position: relative;
    overflow: hidden;
}

.admin-nav-btn::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #3b82f6;
    border-radius: 0 4px 4px 0;
    transition: height 0.2s ease;
}

.admin-nav-btn.active::before,
.admin-nav-btn:hover::before {
    height: 60%;
}

.admin-nav-btn.active {
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-delivered {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Price Display */
.price-current {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}

.price-compare {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Trust Badge Hover */
.trust-badge {
    transition: transform 0.2s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
}

/* Mobile Menu Animation */
#mobileMenu {
    transition: all 0.3s ease;
}

/* Sticky Gallery on Desktop */
@media (min-width: 1024px) {
    .lg\:sticky {
        position: sticky;
    }
}

/* Responsive Table */
@media (max-width: 768px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Print Styles */
@media print {
    #navbar, #mainFooter, .no-print {
        display: none !important;
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Selection Color */
::selection {
    background-color: #3b82f6;
    color: white;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Card Shadow on Hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

/* Button Press Effect */
.btn-press:active {
    transform: scale(0.98);
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Number Input Spinners - Hide */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Color Input Styling */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    padding: 0;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 0.75rem;
}

/* Checkbox Custom Styling */
input[type="checkbox"] {
    accent-color: #3b82f6;
}

/* Smooth Page Transitions */
.page-section {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.page-section.hidden {
    display: none;
    opacity: 0;
}

/* Hero Pattern Overlay */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}s