/* ============================================================
   Design System — Tunisie Dollar
   Tech-dark aesthetic: Navy + Electric Blue + Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- Variables --- */
:root {
  --bg-primary: #070B18;
  --bg-secondary: #0D1426;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(59, 130, 246, 0.6);

  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --gold: #F59E0B;
  --gold-light: #FCD34D;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-blue: 0 0 30px rgba(59, 130, 246, 0.2);
  --shadow-gold: 0 0 20px rgba(245, 158, 11, 0.25);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-400);
  text-decoration: none;
}

a:hover {
  color: var(--blue-300);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar-logo .logo-dollar {
  color: var(--gold);
}

.navbar-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  color: #fff;
}

.btn-whatsapp svg {
  width: 16px;
  height: 16px;
}

/* --- Hero --- */
.hero {
  padding: 5rem 1.25rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--blue-400);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--blue-400), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.trust-badge span {
  font-size: 1rem;
}

/* --- Section titles --- */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.6rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --- Product Grid --- */
.products-section {
  padding: 3rem 1.25rem 5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* --- Product Card --- */
.product-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.18), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #f1f5f9;
}

.product-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, var(--gold), #D97706);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.product-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.4rem;
}

.product-card-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-card-price {
  font-size: 0.75rem;
  color: #64748B;
}

.product-card-price strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
}

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-blue);
  color: #fff;
}

/* --- Product Page --- */
.product-page {
  padding: 2.5rem 1.25rem 5rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr 1.1fr;
  }
}

.product-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder {
  font-size: 5rem;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-info .product-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.product-info .product-short-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.product-info .product-description-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 0.4rem;
}

.product-info .product-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

/* Duration Selector */
.duration-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.duration-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.duration-tab {
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #E2E8F0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.duration-tab:hover {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.12);
  color: #fff;
}

.duration-tab.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-blue);
}

/* Price display */
.price-display {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.price-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -1px;
}

.price-amount span {
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 2px;
}

/* Order Form */
.order-form-wrap {
  max-width: 960px;
  margin: 2.5rem auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.order-form-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid .full {
    grid-column: 1 / -1;
  }
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-top: 0.5rem;
}

.btn-order:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-order:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alert / Toast */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--blue-400);
}

.breadcrumb-sep {
  opacity: 0.4;
}

.breadcrumb .current {
  color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-logo .logo-dollar {
  color: var(--gold);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-copy a {
  color: var(--blue-400);
}

/* --- Status badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-progress {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-done {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cancel {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Utilities --- */
.d-none {
  display: none !important;
}

.text-gold {
  color: var(--gold);
}

.text-blue {
  color: var(--blue-400);
}

.text-muted {
  color: var(--text-muted);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255, 255, 255, 0.06) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* Fade-in animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.5s ease forwards;
}

/* Stagger children */
.stagger-children>* {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.stagger-children>*:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger-children>*:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger-children>*:nth-child(6) {
  animation-delay: 0.3s;
}

.stagger-children>*:nth-child(7) {
  animation-delay: 0.35s;
}

.stagger-children>*:nth-child(8) {
  animation-delay: 0.4s;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3.5rem 1.25rem 2.5rem;
  }

  .order-form-wrap {
    padding: 1.25rem;
  }
}

/* ── Navbar logo size ─────────────────────────────────────── */
.navbar-logo img {
  height: 90px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .navbar-logo img {
    height: 52px;
  }
}

/* ── Footer logo ──────────────────────────────────────────── */
.footer img.footer-svg-logo {
  height: 68px;
  width: auto;
  display: block;
  margin: 0 auto 1rem;
}

@media (max-width: 768px) {
  .footer img.footer-svg-logo {
    height: 56px;
  }
}

/* ── Product Search Bar ───────────────────────────────────── */
.product-search-wrap {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.product-search-wrap .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.product-search-wrap .search-icon svg {
  width: 18px;
  height: 18px;
}

.product-search-wrap .search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: background var(--transition), color var(--transition);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background var(--transition);
}

.product-search-wrap .search-clear.visible {
  opacity: 1;
  pointer-events: all;
}

.product-search-wrap .search-clear:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

#product-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.8rem 2.8rem 0.8rem 3rem;
  border-radius: var(--radius-full);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  backdrop-filter: blur(8px);
}

#product-search:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

#product-search::placeholder {
  color: var(--text-muted);
}

.search-no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  display: none;
}

.search-no-results .no-results-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.search-no-results p {
  font-size: 0.95rem;
}

.search-no-results strong {
  color: var(--text-secondary);
}

.product-card.search-hidden {
  display: none;
}

/* ── Scroll-to-top button (all pages, desktop only) ─────── */
#scroll-top-btn {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.45);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 999;
}

#scroll-top-btn.visible {
  display: flex;
}

#scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.55);
}

@media (max-width: 768px) {
  #scroll-top-btn {
    display: none !important;
  }
}