/* CashMyPhone Modern Design System - Dark Navy, White, Logo Orange (#ff5500) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-green: #ff5500;
  --primary-green-hover: #e04800;
  --primary-green-light: rgba(255, 85, 0, 0.1);
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --dark-text: #111827;
  --muted-text: #6b7280;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(255, 85, 0, 0.25);
}

body {
  font-family: var(--font-body);
  color: var(--dark-text);
  background-color: var(--light-bg);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--font-heading);
}

/* Custom Utility Classes */
.bg-emerald {
  background-color: var(--primary-green) !important;
  color: #fff;
}

.text-emerald {
  color: var(--primary-green) !important;
}

.border-emerald {
  border-color: var(--primary-green) !important;
}

.btn-emerald {
  background-color: var(--primary-green);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  padding: 0.7rem 1.4rem;
  transition: all 0.25s ease;
}

.btn-emerald:hover {
  background-color: var(--primary-green-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline-emerald {
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0.65rem 1.3rem;
  transition: all 0.25s ease;
}

.btn-outline-emerald:hover {
  background-color: var(--primary-green);
  color: #ffffff;
}

/* Header & Navigation */
.top-bar {
  background: linear-gradient(90deg, #090d16 0%, #111827 100%);
  color: #9ca3af;
  font-size: 0.82rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar span {
  display: inline-flex;
  align-items: center;
}

.top-bar-divider {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
}

.top-bar a {
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s ease;
}

.top-bar a:hover {
  color: var(--primary-green);
}

.admin-badge-link {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.78rem;
  color: #e2e8f0 !important;
}

.admin-badge-link:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff !important;
}

.navbar-main {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  padding: 0.65rem 0;
  transition: all 0.3s ease;
}

.navbar-brand-logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
  white-space: nowrap !important;
}

.navbar-brand-logo span {
  color: var(--primary-green);
}

.navbar-brand-logo img,
.header-logo-img {
  height: 34px !important;
  max-height: 36px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .navbar-brand-logo img,
  .header-logo-img {
    height: 28px !important;
    max-height: 30px !important;
  }
}

/* Header Search Bar */
.header-search-form {
  position: relative;
  width: 100%;
  max-width: 220px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input {
  background-color: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 30px !important;
  padding: 0.4rem 2.4rem 0.4rem 1rem !important;
  font-size: 0.82rem !important;
  color: var(--dark-text) !important;
  transition: all 0.25s ease !important;
  height: 38px;
}

.search-input:focus {
  background-color: #ffffff !important;
  border-color: var(--primary-green) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none !important;
  background: transparent !important;
  color: var(--primary-green) !important;
  padding: 6px 10px !important;
  border-radius: 50%;
  z-index: 5;
  transition: transform 0.2s ease;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Nav Links */
.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  font-size: 0.86rem;
  color: #475569;
  padding: 0.4rem 0.6rem !important;
  white-space: nowrap !important;
  word-break: keep-all;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-green);
  background-color: rgba(16, 185, 129, 0.06);
}

.nav-link.active {
  color: var(--primary-green);
  font-weight: 600;
}

/* Featured 'Sell Your Phone' Link */
.nav-link-featured {
  background: rgba(16, 185, 129, 0.1) !important;
  color: var(--primary-green) !important;
  font-weight: 600 !important;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px !important;
  padding: 0.35rem 0.85rem !important;
  margin: 0 2px;
}

.nav-link-featured:hover {
  background: var(--primary-green) !important;
  color: #ffffff !important;
  border-color: var(--primary-green);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.nav-link-featured:hover i {
  color: #ffffff !important;
}

/* Mobile & Tablet Drawer Menu Styling */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 0.75rem;
    border: 1px solid var(--border-color);
  }

  .navbar-nav .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 0.6rem 1rem !important;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  .nav-link-featured {
    margin: 4px 0;
    text-align: left;
  }

  .header-search-form {
    max-width: 100%;
  }
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--primary-green);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* Hero Section */
.hero-wrapper {
  background: linear-gradient(135deg, #090d16 0%, #111827 100%);
  color: #ffffff;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 85, 0, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 85, 0, 0.15);
  color: var(--primary-green);
  border: 1px solid rgba(255, 85, 0, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Glass & Product Cards */
.custom-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 85, 0, 0.3);
}

.custom-card.selected {
  border-color: var(--primary-green) !important;
  background: rgba(255, 85, 0, 0.04);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.product-img-wrapper {
  position: relative;
  background: #f8fafc;
  padding: 1.5rem;
  text-align: center;
}

.product-img-wrapper img {
  max-height: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.badge-grade {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #000000;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.badge-grade.grade-superb {
  background: var(--primary-green);
}

.badge-grade.grade-likenew {
  background: #2563eb;
}

.badge-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.badge-wishlist:hover,
.badge-wishlist.active {
  color: #ef4444;
  background: #fef2f2;
}

/* Sell Phone Wizard Styles */
.wizard-header {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.wizard-step-item {
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.wizard-step-circle {
  width: 42px;
  height: 42px;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
  transition: all 0.3s ease;
}

.wizard-step-item.active .wizard-step-circle {
  background: var(--primary-green);
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.2);
}

.wizard-step-item.completed .wizard-step-circle {
  background: #000000;
  color: #ffffff;
}

.wizard-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.wizard-step-item.active .wizard-step-label {
  color: var(--primary-green);
}

.brand-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.brand-select-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.brand-select-card:hover,
.brand-select-card.selected {
  border-color: var(--primary-green);
  background: rgba(255, 85, 0, 0.05);
  transform: translateY(-3px);
}

.brand-select-card img {
  height: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}

.model-select-card {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0.7rem 0.45rem !important;
  border-radius: 12px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.model-select-card img {
  width: 42px !important;
  height: 42px !important;
  max-height: 42px !important;
  margin-bottom: 0.3rem !important;
  object-fit: contain;
}

.model-select-card h6 {
  font-size: 0.76rem !important;
  line-height: 1.2;
  margin-bottom: 0.18rem !important;
}

.model-select-card .text-emerald {
  font-size: 0.66rem !important;
  line-height: 1.3;
}

#models-container .row {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0;
}

.model-grid-item {
  width: 100%;
}

@media (max-width: 1440px) {
  #models-container .row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  #models-container .row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  #models-container .row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #models-container .row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .brand-card-grid,
  #models-container .row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .brand-select-card {
    padding: 0.6rem 0.25rem !important;
    border-radius: 12px !important;
  }

  .brand-select-card img {
    height: 38px !important;
    margin-bottom: 4px !important;
  }

  .brand-select-card .small {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }

  .model-select-card {
    padding: 0.5rem 0.25rem !important;
    aspect-ratio: auto !important;
    min-height: 115px !important;
    border-radius: 12px !important;
  }

  .model-select-card img {
    width: auto !important;
    height: 44px !important;
    max-height: 44px !important;
    margin-bottom: 0.25rem !important;
  }

  .model-select-card h6 {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.15rem !important;
  }

  .model-select-card .text-emerald {
    font-size: 0.62rem !important;
  }
}

.condition-box {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.condition-box:hover {
  border-color: #cbd5e1;
}

.condition-box input[type="radio"]:checked+label,
.condition-box.active {
  border-color: var(--primary-green);
  background: rgba(255, 85, 0, 0.05);
}

/* Price Display Widget */
.price-display-box {
  background: linear-gradient(135deg, #111827 0%, #7c2d12 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: #ff7733;
  letter-spacing: -1px;
}

/* Footer */
footer {
  background: #090d16;
  color: #9ca3af;
  padding-top: 4rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
}

footer h5 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

/* Premium Product Card Styles */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12) !important;
}
.product-img-box img {
  transition: transform 0.3s ease;
}
.hover-lift:hover .product-img-box img {
  transform: scale(1.06);
}
.hover-emerald {
  transition: color 0.2s ease;
}
.hover-emerald:hover {
  color: var(--primary-green) !important;
}
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

footer a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--primary-green);
}

/* Responsive adjust */
@media (max-width: 768px) {
  .hero-wrapper {
    padding: 2.5rem 0;
  }

  .price-amount {
    font-size: 2.2rem;
  }

  .brand-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}