/* frontend-premium.css - Premium Theme & Dark Mode Styling */

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

:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* HSL Color Tokens - Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7f6;
  --bg-tertiary: #e9eef0;
  --text-primary: #121f2d;
  --text-secondary: #5a6b82;
  --text-muted: #8c9ba5;
  --border-color: rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.85);
  --footer-bg: #121f2d;
  --input-bg: #f9fbfb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(18, 31, 45, 0.06);
  --shadow-lg: 0 20px 40px rgba(18, 31, 45, 0.1);
  --primary-accent: #0f62fe;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* Dark Mode Variable Overrides */
html.dark-mode, body.dark-mode {
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --card-bg: #111827;
  --header-bg: rgba(10, 15, 29, 0.8);
  --input-bg: #1f2937;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Apply Font and Transitions globally */
body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 600;
}

/* Glassmorphism Classes */
.premium-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* Dark mode specific elements override */
body.dark-mode {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .card,
body.dark-mode .single-car-item,
body.dark-mode .widget,
body.dark-mode .product-item,
body.dark-mode .user-sidebar,
body.dark-mode .main-sidebar,
body.dark-mode .dashboard-card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
}

body.dark-mode p,
body.dark-mode span:not(.btn-text):not(.badge),
body.dark-mode li,
body.dark-mode td,
body.dark-mode th,
body.dark-mode label {
  color: var(--text-secondary) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode a:not(.btn) {
  color: var(--text-primary) !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: var(--input-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .footer-area {
  background-color: #050811 !important;
  border-top: 1px solid var(--border-color);
}

/* Theme Switcher Toggle styling */
.theme-toggle-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  padding: 0;
  margin-left: 15px;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  background-color: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn i {
  font-size: 1.1rem;
  transition: transform 0.5s ease;
}

.dark-mode .theme-toggle-btn i {
  transform: rotate(360deg);
}

/* Specific component tweaks for modern premium feel */
.navbar-area {
  background: var(--header-bg) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

/* Hero Section modernisations */
.hero-v1, .hero-v2, .hero-v3 {
  position: relative;
  overflow: hidden;
}

/* Smooth zoom-in animations on hover for premium cards */
.single-car-item {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--card-bg);
}

.single-car-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg) !important;
}

/* Tab details styling */
.car-details-tab .nav-tabs {
  border-bottom: 1px solid var(--border-color) !important;
}

.car-details-tab .nav-tabs .nav-link {
  border: none !important;
  font-family: var(--font-title);
  font-weight: 500;
  color: var(--text-secondary) !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.3s ease;
}

.car-details-tab .nav-tabs .nav-link.active {
  color: var(--color-primary) !important;
  border-bottom: 2px solid var(--color-primary) !important;
  background: transparent !important;
}

/* Aramisauto Redesign Styles */
.aramis-search-wrapper {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
}
.aramis-search-input-group {
  position: relative;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  padding: 4px 6px 4px 20px;
}
.aramis-search-input-group input {
  border: none !important;
  outline: none !important;
  width: 100%;
  padding: 8px 0;
  font-size: 15px;
  color: #1e293b;
  background: transparent !important;
}
.aramis-search-input-group .search-btn {
  background: #22c55e;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background-color 0.2s;
}
.aramis-search-input-group .search-btn:hover {
  background: #16a34a;
}
.aramis-filter-pills-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.aramis-filter-pill-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aramis-filter-pill-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.aramis-filter-pill-btn.active {
  border-color: #0f62fe;
  background: #eff6ff;
  color: #0f62fe;
}
.aramis-all-filters-btn {
  background: #fff;
  border: 1px solid #0f2b5c;
  color: #0f2b5c;
  border-radius: 9999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  transition: all 0.2s;
}
.aramis-all-filters-btn:hover {
  background: #0f2b5c;
  color: white;
}
.aramis-reset-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.aramis-reset-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Quick Promo Cards Row */
.aramis-promos-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}
@media (max-width: 991px) {
  .aramis-promos-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 575px) {
  .aramis-promos-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.aramis-promo-card {
  background: #0f2b5c;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  height: 120px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.aramis-promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.aramis-promo-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #2563eb;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  text-transform: uppercase;
}
.aramis-promo-card-badge.green {
  background: #22c55e;
}
.aramis-promo-card-badge.orange {
  background: #f97316;
}
.aramis-promo-card-img-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.aramis-promo-card-img-wrapper img {
  max-height: 55px;
  object-fit: contain;
}
.aramis-promo-card-footer {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Aramis premium car card styling */
.aramis-car-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.aramis-car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(15, 43, 92, 0.08);
}
.aramis-card-top-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aramis-badge-green {
  background: #22c55e;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.aramis-badge-dark-green {
  background: #15803d;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.aramis-card-compare {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.aramis-card-compare input {
  cursor: pointer;
}
.aramis-card-img-container {
  position: relative;
  background: #f8fafc;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aramis-card-img-container img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.aramis-car-card:hover .aramis-card-img-container img {
  transform: scale(1.03);
}
.aramis-card-delivery-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 43, 92, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.aramis-card-details-panel {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.aramis-card-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}
.aramis-card-price {
  font-size: 22px;
  font-weight: 800;
  color: #0f2b5c;
}
.aramis-card-discount-pill {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.aramis-card-old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 13px;
}
.aramis-card-monthly-price {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
}
.aramis-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f2b5c;
  margin-bottom: 4px;
  text-decoration: none !important;
}
.aramis-card-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.4;
}
.aramis-card-info-badges {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
}
.aramis-card-icons-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}
.aramis-card-icon-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
}

/* Sidebar redone as a fixed drawer on the right */
.offcanvas.aramis-sidebar-card {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  width: 450px !important;
  max-width: 100vw !important;
  z-index: 99999 !important;
  background-color: #fff !important;
  box-shadow: -10px 0 30px rgba(15, 43, 92, 0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(100%) !important;
  transition: transform .3s ease-in-out !important;
  visibility: hidden;
  border: none !important;
}
.offcanvas.aramis-sidebar-card.show {
  transform: translateX(0) !important;
  visibility: visible !important;
}
.offcanvas.aramis-sidebar-card .offcanvas-header {
  flex-shrink: 0 !important;
}
.aramis-sidebar-tabs-nav {
  display: flex;
  flex-shrink: 0 !important;
  overflow-x: auto;
  scroll-behavior: smooth;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  scrollbar-width: none; /* Firefox */
}
.aramis-sidebar-tabs-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.aramis-sidebar-tab-btn {
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.aramis-sidebar-tab-btn:hover {
  color: #0f2b5c;
}
.aramis-sidebar-tab-btn.active {
  color: #0f62fe;
  border-bottom-color: #0f62fe;
  background: white;
}
.offcanvas.aramis-sidebar-card form {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.aramis-sidebar-body {
  flex: 1 1 auto !important;
  padding: 20px !important;
  overflow-y: auto !important;
}
.aramis-sidebar-footer {
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Styled color circles */
.aramis-color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.aramis-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  text-align: center;
}
.aramis-color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  margin-bottom: 4px;
  position: relative;
  transition: transform 0.2s;
}
.aramis-color-item.selected .aramis-color-circle {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #0f62fe;
}
.aramis-color-item.selected .aramis-color-circle::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Styled capacity buttons */
.aramis-places-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.aramis-places-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: #0f2b5c;
  cursor: pointer;
  transition: all 0.2s;
}
.aramis-places-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.aramis-places-btn.active {
  border-color: #0f62fe;
  background: #eff6ff;
  color: #0f62fe;
}

/* ============================================
   RESPONSIVE - Cars Page
   ============================================ */

/* Search bar inline - collapse to 2 rows on tablet */
@media (max-width: 991px) {
  .aramis-search-wrapper-inline {
    flex-wrap: wrap;
    border-radius: 16px;
    padding: 10px 14px;
    gap: 8px;
  }
  .aramis-search-input-group-inline {
    width: 100%;
    min-width: unset;
    order: -1;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
  }
  .aramis-filter-pill-btn,
  .aramis-all-filters-btn,
  .aramis-reset-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  .aramis-all-filters-btn {
    margin-left: 0;
  }
}

/* Search bar - stack on mobile */
@media (max-width: 575px) {
  .aramis-search-wrapper-inline {
    border-radius: 12px;
    gap: 6px;
    padding: 8px 12px;
  }
  .aramis-search-input-group-inline input {
    font-size: 14px;
    padding: 6px 8px;
  }
  /* Hide intermediate filter pills on very small screens - show only "Tous les filtres" */
  .aramis-filter-pill-btn {
    display: none;
  }
  .aramis-all-filters-btn,
  .aramis-reset-btn {
    display: flex;
  }
  .aramis-search-input-group-inline {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* Promo cards row */
@media (max-width: 767px) {
  .aramis-promos-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
  }
  .aramis-promo-card {
    height: 100px;
  }
  .aramis-promo-card-badge {
    font-size: 8px;
    padding: 2px 5px;
  }
  .aramis-promo-card-img-wrapper img {
    max-height: 42px;
  }
  .aramis-promo-card-footer {
    font-size: 10px;
    padding: 6px 4px;
  }
}

@media (max-width: 400px) {
  .aramis-promos-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

/* Sort area & count header */
@media (max-width: 767px) {
  .product-sort-area .row {
    flex-direction: column;
    gap: 10px;
  }
  .product-sort-area .col-lg-6.text-end {
    text-align: left !important;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  .listing-grid-area h4.font-weight-bold,
  .listing-list-area h4.font-weight-bold {
    font-size: 18px;
  }
}

/* Car grid cards - responsive columns */
@media (max-width: 575px) {
  .listing-grid-area .col-xl-3,
  .listing-list-area .col-xl-3 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  .aramis-card-img-container img {
    height: 180px;
  }
  .aramis-card-price {
    font-size: 20px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .listing-grid-area .col-xl-3,
  .listing-list-area .col-xl-3 {
    width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
  }
}

/* Sidebar offcanvas - narrow on phones */
@media (max-width: 575px) {
  .offcanvas.aramis-sidebar-card {
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .aramis-sidebar-footer {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .aramis-sidebar-footer .btn {
    width: 100% !important;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .offcanvas.aramis-sidebar-card {
    width: 85vw !important;
  }
}

/* Pagination */
@media (max-width: 575px) {
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .pagination .page-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* pt-10 section padding */
@media (max-width: 575px) {
  .listing-grid-area,
  .listing-list-area {
    padding-top: 6px !important;
    padding-bottom: 40px !important;
  }
  .tiny-breadcrumb-container {
    padding-top: 8px;
    margin-bottom: 2px;
  }
}

