/* ═══════════════════════════════════════════
   ArvezShop — Corporate Design System
   Dark Navy + Clean + Professional
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-body: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;
  --bg-modal: rgba(15, 23, 42, 0.4);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-muted: #eff6ff;

  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

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

/* ── Navbar ── */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.navbar-brand .icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #0369a1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.navbar-brand .dot {
  color: var(--accent);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-right a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.navbar-right .btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
}

.navbar-right .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 48px;
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.08), transparent 70%);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Product Grid ── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

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

/* ── Product Card (SaaS Light Theme) ── */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  min-height: 480px;
  cursor: pointer;
  animation: cardFadeUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.1), transparent);
  pointer-events: none;
}

.card-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 24px;
}

.card-header-info {
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

.card-meta-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card-meta-modern .version-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.meta-dot {
  color: #cbd5e1;
}

.card-features {
  flex-grow: 1;
  margin-bottom: 24px;
}

.card-features ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-features li {
  display: flex;
  align-items: flex-start;
  font-size: 0.875rem;
  color: #475569;
  font-weight: 500;
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-right: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-action-modern {
  margin-top: auto;
}

.btn-primary-w-full {
  width: 100%;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary-w-full:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary-w-full:active {
  transform: scale(0.98);
}

/* ── Detail Page ── */
.detail-page {
  padding: 40px 0 80px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.detail-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.detail-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 300px;
}

.detail-image .img-placeholder {
  width: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
}

.detail-info h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.detail-info .meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.detail-info .meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-info .desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.detail-info .btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.detail-info .btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-muted);
}

.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.detail-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section ul li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-section ul li:last-child {
  border: none;
}

.detail-section ul li i {
  color: var(--accent);
  font-size: 0.8rem;
}

.detail-section .requirements-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-wrapper {
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(30px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-wrapper {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-overlay.active .detail-modal-wrapper {
  max-width: 800px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal .modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal .form-group {
  margin-bottom: 16px;
}

.modal label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: 'Inter', monospace;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color var(--transition);
}

.modal input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.modal input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.modal .btn-verify {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.modal .btn-verify:hover {
  background: var(--accent-hover);
}

.modal .btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal .error-text {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

.modal .success-text {
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
  text-align: center;
}

.modal .btn-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}


/* ── Footer ── */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-surface);
  color: var(--text);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.3s;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), shake 0.4s ease-in-out;
}

/* ── Animations ── */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 var(--accent-muted);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  font-size: 1rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .detail-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal-wrapper {
    padding: 12px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}