/**
 * all-styles-enhanced.css
 * Enhanced Styles for Hybrid Marketplace
 * 
 * BACKWARD COMPATIBLE - All existing styles maintained
 * Added styles for:
 * - Product type badges (Digital/Physical/Hybrid)
 * - Stock status indicators
 * - Shipping cost displays
 * - Enhanced responsive design
 * - Filter UI improvements
 * 
 * Domain: sell.paradigmlimited.org
 * Version: 2.0
 */

/* ==================== IMPORT EXISTING STYLES ==================== */
/* All existing styles from all-styles.css should remain unchanged */
/* These new styles are additive only */

/* ==================== NEW: PRODUCT TYPE INDICATORS ==================== */

.product-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.product-type-badge.digital {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.product-type-badge.digital::before {
    content: '📥';
    font-size: 0.875rem;
}

.product-type-badge.physical {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.product-type-badge.physical::before {
    content: '📦';
    font-size: 0.875rem;
}

.product-type-badge.hybrid {
    background-color: #fce7f3;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.product-type-badge.hybrid::before {
    content: '📦📥';
    font-size: 0.875rem;
}

/* ==================== NEW: STOCK STATUS BADGES ==================== */

.stock-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    animation: slideInDown 0.3s ease-out;
    z-index: 10;
}

.stock-badge.stock-digital {
    background-color: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(93, 144, 254, 0.5);
}

.stock-badge.stock-in {
    background-color: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(86, 180, 137, 0.5);
}

.stock-badge.stock-low {
    background-color: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(251, 191, 36, 0.5);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.stock-badge.stock-out {
    background-color: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(248, 113, 113, 0.5);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ==================== NEW: SHIPPING INFORMATION DISPLAY ==================== */

.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.shipping-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shipping-cost {
    font-weight: 700;
    color: #059669;
    font-size: 1.125rem;
}

.shipping-method {
    color: #047857;
    font-weight: 600;
}

.shipping-days {
    color: #65a30d;
    font-size: 0.75rem;
}

.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #047857;
    font-weight: 600;
}

.shipping-badge.digital {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    color: #1e40af;
}

.shipping-badge.unavailable {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
    color: #991b1b;
    opacity: 0.7;
}

/* ==================== NEW: ENHANCED FILTER UI ==================== */

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-input {
    padding: 0.625rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: white;
}

.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
    padding: 0.625rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-button {
    padding: 0.625rem 1.25rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.filter-button:active {
    transform: translateY(0);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-badge-close {
    cursor: pointer;
    font-weight: 700;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.filter-badge-close:hover {
    opacity: 1;
}

/* ==================== NEW: PAGINATION ENHANCEMENTS ==================== */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    color: #475569;
}

.pagination-item:hover:not(.active):not(:disabled) {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.pagination-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pagination-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #94a3b8;
    font-weight: 700;
}

/* ==================== NEW: INVENTORY DASHBOARD STYLES ==================== */

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.inventory-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.inventory-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.inventory-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.inventory-card-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
}

.inventory-alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.inventory-alert.warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.inventory-alert.critical {
    background-color: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.inventory-alert.success {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

/* ==================== NEW: MOBILE RESPONSIVENESS ==================== */

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-item {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .stock-badge {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.625rem;
        padding: 0.375rem 0.5rem;
    }
    
    .product-type-info {
        font-size: 0.65rem !important;
    }
    
    .shipping-info {
        font-size: 0.75rem;
    }
}

/* ==================== NEW: PRODUCT TYPE FILTERING STYLES ==================== */

.product-type-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.product-type-option {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background-color: white;
}

.product-type-option:hover {
    border-color: #3b82f6;
    background-color: #f0f9ff;
}

.product-type-option.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.product-type-option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-type-option-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.product-type-option.active .product-type-option-label {
    color: #1e40af;
}

/* ==================== NEW: DOWNLOAD STATUS DISPLAY ==================== */

.download-status {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.download-status.ready {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.download-status.expired {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.download-status.limited {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.download-counter {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* ==================== NEW: CHECKOUT ENHANCEMENTS ==================== */

.cart-item-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: #6b7280;
    margin-left: 0.5rem;
}

.shipping-selector {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shipping-selector:hover {
    border-color: #3b82f6;
    background-color: #f0f9ff;
}

.shipping-selector.selected {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.shipping-selector-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shipping-selector-info {
    flex: 1;
}

.shipping-selector-method {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.shipping-selector-days {
    font-size: 0.875rem;
    color: #64748b;
}

.shipping-selector-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #059669;
}

/* ==================== UTILITY CLASSES ==================== */

.text-nowrap {
    white-space: nowrap;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opacity-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== ANIMATION IMPROVEMENTS ==================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .filter-container,
    .pagination,
    .cart-floating,
    .whatsapp-widget {
        display: none;
    }
    
    .product-card {
        break-inside: avoid;
    }
}

