:root {
  --primary: #e86c1f;
  --primary-dark: #c55611;
  --secondary: #1f8b8c;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-color: rgba(232, 108, 31, 0.15);
  --dark: #ffffff;
  --dark-light: #f1f5f9;
  --dark-lighter: #e2e8f0;
  --text: #0f172a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
}

.navbar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-actions a {
  text-decoration: none;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232, 108, 31, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-block {
  width: 100%;
  display: block;
  text-align: center;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.alert {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #166534;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: white;
  padding: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  z-index: 50;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 800;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 10px;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s;
  border-radius: 12px;
  font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: #fff7ed;
  color: var(--primary);
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--text-main);
  font-weight: 800;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.stat-card h4 {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  padding: 30px;
  max-width: 600px;
  width: 90%;
  color: var(--text-muted);
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  display: flex;
  flex-direction: column;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-image {
  height: 200px;
  width: 100%;
  display: block;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-type {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.product-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-main);
  font-weight: 700;
}

.product-description {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
  flex: 1;
  line-height: 1.6;
}

.product-features {
  margin-bottom: 20px;
  list-style: none;
  padding: 0;
}

.product-features li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-features li::before {
  content: "✓";
  color: var(--secondary);
  margin-right: 10px;
  font-weight: bold;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  opacity: 0;
}

.animate-fade-in-up.animate-visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  opacity: 0;
}

.animate-fade-in.animate-visible {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-scale-in {
  opacity: 0;
}

.animate-scale-in.animate-visible {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-slide-left {
  opacity: 0;
}

.animate-slide-left.animate-visible {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
  opacity: 0;
}

.animate-slide-right.animate-visible {
  animation: slideInRight 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  padding: 8px 0;
  z-index: 1000;
  top: 100%;
  left: 0;
  border: 1px solid var(--border);
  animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
  color: var(--text-main);
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-content a:hover {
  background-color: #fff7ed;
  color: var(--primary);
  transform: none;
}

.product-features li::before {
  content: "✓";
  color: var(--secondary);
  margin-right: 10px;
  font-weight: bold;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  opacity: 0;
}

.animate-fade-in-up.animate-visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  opacity: 0;
}

.animate-fade-in.animate-visible {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-scale-in {
  opacity: 0;
}

.animate-scale-in.animate-visible {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-slide-left {
  opacity: 0;
}

.animate-slide-left.animate-visible {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
  opacity: 0;
}

.animate-slide-right.animate-visible {
  animation: slideInRight 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  padding: 8px 0;
  z-index: 1000;
  top: 100%;
  left: 0;
  border: 1px solid var(--border);
  animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
  color: var(--text-main);
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-content a:hover {
  background-color: #fff7ed;
  color: var(--primary);
  transform: none;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown > a::after {
  content: "▾";
  margin-left: 5px;
  font-size: 0.8em;
}

/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: white;
  z-index: 1000;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-menu-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-body);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .navbar-container {
    padding: 0 15px;
  }

  .card-grid,
  .products-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  /* Prevent overflow on mobile */
  input,
  select,
  textarea {
    max-width: 100%;
    box-sizing: border-box !important;
    /* Ensure padding doesn't add to width */
    min-width: 0;
    /* Allow flex/grid items to shrink */
  }

  .contact-container {
    padding: 20px !important;
    /* Reduce padding further on mobile */
    width: 100%;
    overflow-x: hidden;
  }

  .form-group {
    width: 100%;
  }

  .desktop-only {
    display: none !important;
  }
}

/* Mobile Product Page Fixes */
@media (max-width: 768px) {
  .product-detail-container {
    text-align: center;
  }

  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
    text-align: center;
  }

  .product-info h1 {
    font-size: 2rem;
    text-align: center;
  }

  .product-meta {
    justify-content: center;
  }

  .main-image {
    min-height: 300px;
    margin-bottom: 20px;
  }

  .purchase-card {
    padding: 20px;
  }

  .pricing-options {
    grid-template-columns: 1fr !important;
  }

  .product-details-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }

  /* Center the back button */
  .product-detail-container > a.btn {
    display: inline-block;
    margin-bottom: 30px;
  }

  /* Responsive Tables - Card View */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 15px;
    box-shadow: var(--shadow-sm);
  }

  td {
    border: none;
    position: relative;
    padding: 10px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
  }

  td:last-child {
    border-bottom: none;
  }

  td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
    padding-right: 10px;
    max-width: 45%;
  }
}
