/* VDPrint - Stili CSS Personalizzati */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Layout generale */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #1a1a1a;
    color: #ffffff;
}

/* Navbar */
.navbar {
    background: #1e1e1e !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 4px;
    padding: 8px 16px !important;
}

.nav-link:hover {
    background: rgba(255,255,255,1) !important;
    color: #000 !important;
    transform: translateY(-1px);
}

/* Dropdown hover effects */
.dropdown-item {
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.9) !important;
    color: #000 !important;
}

.cart-count {
    background: var(--secondary-gradient);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Hero Section */
.hero-section {
    background: var(--primary-gradient);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Centratura per monitor grandi */
@media (min-width: 1200px) {
    .hero-section {
        justify-content: center;
    }
    
    .hero-section .row {
        max-width: 1200px;
        margin: 0 auto;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/home/hero-background.svg') center/cover;
    opacity: 0.2;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.feature-item {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.feature-icon {
    width: 32px;
    height: 32px;
    color: #fff;
}

/* Hero Preview */
.hero-preview-container {
    position: relative;
}

.preview-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    color: #333;
    animation: float 6s ease-in-out infinite;
}

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

.preview-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.preview-header h6 {
    margin: 0;
    font-weight: 600;
}

.preview-content {
    margin-bottom: 1rem;
}

.product-preview {
    position: relative;
    text-align: center;
}

.product-preview img {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.customization-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.custom-element {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--secondary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse 2s infinite;
}

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

.preview-tools {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Product Cards */
.product-card {
    background: rgba(255,255,255,0.1);
    border-radius: 40px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    height: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.15);
}

/* Category Cards */
.category-card {
    background: rgba(255,255,255,0.1);
    border-radius: 40px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    min-height: 280px;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.15);
}

.category-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    flex: 1;
}

.category-card h5,
.category-card .category-name {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.category-card p,
.category-card .category-description {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.category-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.category-icon i {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

/* Fallback per icone quando Feather non si carica */
.category-icon i[data-feather]:before {
    content: "📦";
    font-size: 24px;
    display: inline-block;
}

.category-icon i[data-feather="shirt"]:before {
    content: "👕";
}

.category-icon i[data-feather="wind"]:before {
    content: "🧥";
}

.category-icon i[data-feather="zap"]:before {
    content: "👔";
}

.category-icon i[data-feather="layers"]:before {
    content: "🧥";
}

/* Forza visibilità delle card categorie */
.category-card {
    opacity: 1 !important;
    visibility: visible !important;
}

.category-card * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Buttons */
.btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #ffffff;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    margin-bottom: 1rem;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Category Cards */
.category-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

.category-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--secondary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.category-name {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-description {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Admin Styles */
.admin-sidebar {
    background: var(--dark-gradient);
    min-height: 100vh;
    padding-top: 76px;
}

.metric-card {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
}

.metric-trend {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-preview-container {
        margin-top: 2rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .feature-item {
        margin-bottom: 1rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Utilities */
.text-gradient {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-secondary {
    background: var(--secondary-gradient);
}

.bg-gradient-accent {
    background: var(--accent-gradient);
}

/* Lazy Loading Images */
img.lazy-image {
    background: #f0f0f0;
    min-height: 100px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img.lazy-loaded {
    opacity: 1;
}

/* Skeleton loading per immagini */
.lazy-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Ottimizzazioni Performance */
.product-card img {
    will-change: transform;
}

.product-card:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}