/* ==========================================================================
   RESET & MODERN VARIABLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #080d1a;
    --bg-card: rgba(15, 23, 42, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.5);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --cyan: #06b6d4;
    --success: #10b981;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --blur-strength: 16px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   GLASSMORPHISM UTILITIES & BACKGROUND GLOWS
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: 20%;
    left: -100px;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--cyan);
    top: 50%;
    right: 20%;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 13, 26, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: #a5b4fc;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-download {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    width: 100%;
}

.btn-download:hover {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   SHOP SECTION & FILTERS
   ========================================================================== */
.shop {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.product-card {
    padding: 28px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.product-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image.icon-bg {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 1.8rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.product-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-glass);
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #38bdf8;
}

.rating {
    color: #fbbf24;
    font-size: 0.9rem;
}

.product-card.hidden {
    display: none;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.features-list i {
    color: var(--success);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.stat-box {
    padding: 24px;
    text-align: center;
}

.stat-box h3 {
    font-size: 2.2rem;
    color: #a5b4fc;
    margin-bottom: 4px;
}

.stat-box p {
    color: var(--text-muted);
}

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */
.contact {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
}

.contact-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-item a, .contact-item p {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.contact-form {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   FOOTER & NOTIFICATION
   ========================================================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-glass);
    margin-top: 60px;
}

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

.social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--text-main);
}

.notification {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 16px 24px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    font-weight: 500;
    display: none;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.notification.show {
    display: block;
}

/* ==========================================================================
   MODAL (M36)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover { color: var(--text-main); }

.preview-container {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid var(--border-glass);
}

.preview-container img {
    width: 100%;
    display: block;
}

.model-selection select {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-family: inherit;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-download-modal {
    flex: 1;
    background: var(--primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* ==========================================================================
   MAINTENANCE BANNER
   ========================================================================== */
#maintenance-banner {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.maintenance-card {
    max-width: 500px;
    text-align: center;
    padding: 40px;
}

.maintenance-card h2 {
    margin-bottom: 12px;
    color: #f59e0b;
}

.maintenance-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 16px; }
    .nav-links { gap: 1rem; font-size: 0.9rem; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Modern modal & list animations ===== */
@keyframes modalPop {
  from { transform: translateY(18px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes itemFadeUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes previewPulse {
  0% { transform: scale(0.98); filter: blur(0.8px); opacity: 0.96; }
  50% { transform: scale(1.01); filter: blur(0); opacity: 1; }
  100% { transform: scale(1); filter: blur(0); opacity: 1; }
}

/* apply to modal content on open */
.modal.show .modal-content {
  animation: modalPop .32s cubic-bezier(.2,.9,.3,1);
  will-change: transform, opacity;
}

/* preview image subtle pulse when changed */
.preview-container img.fade-in {
  animation: previewPulse .6s ease both;
}

/* model items entrance (stagger handled by JS) */
.model-item {
  opacity: 0;
  transform: translateY(8px);
  transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .28s ease;
}
.model-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* hover micro-interaction */
.model-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 10px 30px rgba(2,6,23,0.45);
}

/* nice focus ring for keyboard users */
.model-item:focus {
  outline: 3px solid rgba(99,102,241,0.18);
  outline-offset: 6px;
}

/* subtle button pop on download */
#btn-download {
  transition: transform .15s ease, box-shadow .15s ease;
}
#btn-download:active {
  transform: translateY(1px) scale(.995);
  box-shadow: 0 6px 18px rgba(99,102,241,0.12) inset;
}

/* reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .modal.show .modal-content,
  .model-item,
  .preview-container img.fade-in {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
