/* ===========================
   ERPModPlus - CSS Moderno
   =========================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #1e1b4b;
    --dark-light: #312e81;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0; padding: 0; background: var(--light); color: var(--dark); line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 { margin: 0 0 1rem; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-title p { color: var(--gray); font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(30, 27, 75, 0.95); backdrop-filter: blur(10px); padding: 1rem 0; transition: var(--transition); }
.navbar-content { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; font-weight: 800; color: white; }
.navbar-brand span { background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.navbar-nav { display: flex; list-style: none; margin: 0; padding: 0; gap: 2rem; }
.navbar-nav a { color: rgba(255,255,255,0.8); font-weight: 500; padding: 0.5rem 0; position: relative; }
.navbar-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gradient-2); transition: var(--transition); }
.navbar-nav a:hover { color: white; }
.navbar-nav a:hover::after { width: 100%; }

/* HERO */
.hero { min-height: 100vh; display: flex; align-items: center; background: var(--gradient-hero); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: 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.03'%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"); }
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text h1 { color: white; margin-bottom: 1.5rem; }
.hero-text h1 span { background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-text p { color: rgba(255,255,255,0.8); font-size: 1.25rem; margin-bottom: 2rem; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(20px); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid rgba(255,255,255,0.2); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.floating-shape { position: absolute; border-radius: 50%; opacity: 0.1; animation: floatShape 20s ease-in-out infinite; }
.shape-1 { width: 300px; height: 300px; background: var(--primary); top: 10%; right: 10%; }
.shape-2 { width: 200px; height: 200px; background: var(--secondary); bottom: 20%; left: 5%; animation-delay: -5s; }
.shape-3 { width: 150px; height: 150px; background: var(--accent); top: 50%; right: 30%; animation-delay: -10s; }
@keyframes floatShape { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(0, -50px) rotate(180deg); } }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 2rem; font-size: 1rem; font-weight: 600; border-radius: var(--radius); cursor: pointer; transition: var(--transition); border: none; text-decoration: none; }
.btn-primary { background: var(--gradient-2); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5); color: white; }
.btn-secondary { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: white; }
.btn-success { background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); color: white; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* PRODUCT CARDS */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.product-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); position: relative; }
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-xl); }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient-2); transform: scaleX(0); transition: var(--transition); }
.product-card:hover::before { transform: scaleX(1); }
.product-image { position: relative; height: 200px; overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-image .placeholder-icon { font-size: 4rem; color: rgba(255,255,255,0.5); }
.product-badge { position: absolute; top: 1rem; right: 1rem; padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-dolibarr { background: #3b82f6; color: white; }
.badge-odoo { background: #8b5cf6; color: white; }
.badge-api { background: #10b981; color: white; }
.badge-integration { background: #f59e0b; color: white; }
.product-content { padding: 1.5rem; }
.product-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.product-description { color: var(--gray); font-size: 0.9375rem; margin-bottom: 1rem; line-height: 1.6; }
.product-price { font-size: 1.75rem; font-weight: 800; background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; }
.product-actions { display: flex; gap: 0.75rem; }
.product-actions .btn { flex: 1; padding: 0.75rem 1rem; font-size: 0.875rem; }

/* FEATURES */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card { background: white; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: var(--transition); text-align: center; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-icon { width: 80px; height: 80px; margin: 0 auto 1.5rem; background: var(--gradient-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: white; }
.feature-card h3 { color: var(--dark); margin-bottom: 0.75rem; }
.feature-card p { color: var(--gray); font-size: 0.9375rem; }

/* DEMO SECTION */
.demo-section { background: var(--gradient-hero); color: white; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.demo-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid rgba(255,255,255,0.2); transition: var(--transition); text-align: center; }
.demo-card:hover { background: rgba(255,255,255,0.15); transform: translateY(-5px); }
.demo-card h3 { margin-bottom: 1rem; }
.demo-card p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }

/* CTA */
.cta-section { background: white; text-align: center; }
.cta-box { background: var(--gradient-hero); padding: 4rem; border-radius: var(--radius-lg); color: white; }
.cta-box h2 { margin-bottom: 1rem; }
.cta-box p { color: rgba(255,255,255,0.8); font-size: 1.125rem; max-width: 600px; margin: 0 auto 2rem; }

/* FOOTER */
.footer { background: var(--dark); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: rgba(255,255,255,0.7); margin-top: 1rem; line-height: 1.8; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1.5rem; color: white; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-bottom { padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; color: rgba(255,255,255,0.5); }

/* ANIMATIONS */
.fade-in { opacity: 1; transform: translateY(30px); transition: all 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 1; transform: translateY(20px); transition: all 0.4s ease-out; }
.stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }

/* FILTER TABS */
.filter-tabs { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-tab { padding: 0.75rem 1.5rem; border: 2px solid var(--gray-light); border-radius: 9999px; background: white; color: var(--gray); font-weight: 600; cursor: pointer; transition: var(--transition); }
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--gradient-2); border-color: transparent; color: white; }

/* CHECKOUT */
.checkout-form { max-width: 600px; margin: 0 auto; background: white; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--dark); }
.form-group input { width: 100%; padding: 0.875rem 1rem; border: 2px solid var(--gray-light); border-radius: var(--radius); font-size: 1rem; transition: var(--transition); }
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
#paypal-button-container { margin-top: 2rem; }

/* CART */
.cart-icon { position: relative; cursor: pointer; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: var(--accent); color: white; font-size: 0.75rem; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* LOADING */
.loading-spinner { display: inline-block; width: 40px; height: 40px; border: 3px solid var(--gray-light); border-radius: 50%; border-top-color: var(--primary); animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container { display: flex; justify-content: center; align-items: center; min-height: 200px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-visual { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .section { padding: 3rem 0; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .cta-box { padding: 2rem; }
    .products-grid { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.text-gradient { background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
