/* Dark Mode */
/* =========================================================
   FULL DARK MODE
========================================================= */

body.dark-mode {
  background: #0f1115;
  color: #e4e6eb;
}

/* Smooth transitions */
body,
.navbar,
.card,
.modal-content,
.dropdown-menu,
footer,
.table,
.form-control,
.btn,
.carousel-caption {
  transition: all 0.3s ease;
}

/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .top-bar {
  background: linear-gradient(90deg, #020617, #111827);
  border-bottom: 1px solid #1f2937;
}

body.dark-mode .top-contact {
  color: #d1d5db;
}

body.dark-mode .top-contact:hover {
  color: #4ade80;
}

body.dark-mode .social-top {
  background: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991px) {
  .top-bar-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .top-left {
    justify-content: center;
  }

  .top-right {
    justify-content: center;
  }

  .top-center {
    order: -1;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .top-left {
    flex-direction: column;
    gap: 10px;
  }

  .top-contact span {
    font-size: 0.82rem;
  }

  .top-center {
    font-size: 0.85rem;
  }

  .social-top {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}
/* =========================================================
   NAVBAR
========================================================= */

body.dark-mode .navbar {
  background: #151922 !important;
  border-bottom: 1px solid #2a2f3a;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode .nav-link,
body.dark-mode .navbar-brand,
body.dark-mode .navbar-toggler {
  color: #f1f1f1 !important;
}

body.dark-mode .nav-link:hover {
  color: #4ade80 !important;
}

body.dark-mode .navbar-toggler {
  border-color: #3a3f4b;
}

body.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

/* =========================================================
   DROPDOWNS
========================================================= */

body.dark-mode .dropdown-menu {
  background: #1b1f27;
  border: 1px solid #303644;
}

body.dark-mode .dropdown-item {
  color: #f1f1f1;
}

body.dark-mode .dropdown-item:hover {
  background: #4ade80;
  color: #fff;
}

/* =========================================================
   SEARCH + INPUTS
========================================================= */

body.dark-mode .form-control,
body.dark-mode .form-select {
  background: #1c212b;
  border: 1px solid #303644;
  color: #fff;
}

body.dark-mode .form-control:focus {
  background: #1c212b;
  color: #fff;
  border-color: #4ade80;
  box-shadow: 0 0 0 0.2rem rgba(74, 222, 128, 0.25);
}

body.dark-mode .form-control::placeholder {
  color: #9aa4b2;
}

/* =========================================================
   BUTTONS
========================================================= */

body.dark-mode .btn-outline-success {
  border-color: #4ade80;
  color: #4ade80;
}

body.dark-mode .btn-outline-success:hover,
body.dark-mode .btn-outline-success.selected {
  background: #4ade80;
  color: #111;
}

body.dark-mode .btn-primary {
  background: #2563eb;
  border-color: #2563eb;
}

body.dark-mode .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
}

body.dark-mode .btn-secondary {
  background: #374151;
  border-color: #374151;
}

/* =========================================================
   CARDS
========================================================= */

body.dark-mode .card {
  background: #171b22;
  border: 1px solid #2b313d;
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

body.dark-mode .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

body.dark-mode .card-title {
  color: #fff;
}

body.dark-mode .card-text {
  color: #b8c1cc;
}

/* =========================================================
   PRODUCT BUTTON
========================================================= */

body.dark-mode .add-to-cart-btn {
  border: 1px solid #4ade80;
  color: #4ade80;
}

body.dark-mode .add-to-cart-btn:hover {
  background: #4ade80;
  color: #111;
}

/* =========================================================
   MODALS
========================================================= */

body.dark-mode .modal-content {
  background: #161b22;
  color: #fff;
  border: 1px solid #2f3542;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
  border-color: #2f3542;
}

body.dark-mode .btn-close {
  filter: invert(1);
}

/* =========================================================
   TABLES
========================================================= */

body.dark-mode .table {
  color: #fff;
  background: #161b22;
}

body.dark-mode .table-bordered,
body.dark-mode .table td,
body.dark-mode .table th {
  border-color: #303644 !important;
}

body.dark-mode .table thead {
  background: #1f2937;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background: #1c212b;
}

/* =========================================================
   FOOTER
========================================================= */

body.dark-mode footer,
body.dark-mode footer .bg-light,
body.dark-mode .text-center.p-3.bg-light {
  background: #151922 !important;
  color: #d1d5db;
  border-top: 1px solid #2a2f3a;
}

body.dark-mode footer h5 {
  color: #fff;
}

body.dark-mode .social-icon {
  color: #d1d5db;
}

body.dark-mode .social-icon:hover {
  color: #4ade80;
}

/* =========================================================
   CAROUSEL
========================================================= */

body.dark-mode .carousel-caption {
  background: rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  padding: 1rem;
}

body.dark-mode .carousel-caption h3,
body.dark-mode .carousel-caption p {
  color: #fff;
}

body.dark-mode .carousel-indicators button {
  background-color: #4ade80;
}

/* =========================================================
   CART
========================================================= */

body.dark-mode #cart-count {
  background: #4ade80;
  color: #111;
  border-color: #111;
}

body.dark-mode .cart-link {
  color: #fff !important;
}

/* =========================================================
   SCROLL TO TOP
========================================================= */

body.dark-mode .scroll-to-top {
  background: #4ade80;
  color: #111;
}

body.dark-mode .scroll-to-top:hover {
  background: #22c55e;
}

/* =========================================================
   SWEET ALERT
========================================================= */

body.dark-mode .swal2-popup {
  background: #161b22 !important;
  color: #fff !important;
}

body.dark-mode .swal2-title,
body.dark-mode .swal2-html-container {
  color: #fff !important;
}

/* =========================================================
   FILTER BUTTONS
========================================================= */

body.dark-mode .category-btn {
  border-color: #4ade80;
  color: #4ade80;
}

body.dark-mode .category-btn.selected,
body.dark-mode .category-btn:hover {
  background: #4ade80;
  color: #111;
}

/* =========================================================
   LINKS
========================================================= */

body.dark-mode a {
  color: #8ec5ff;
}

body.dark-mode a:hover {
  color: #4ade80;
}

/* =========================================================
   SCROLLBAR
========================================================= */

body.dark-mode ::-webkit-scrollbar {
  width: 10px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #111827;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 10px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* =========================================================
   MOBILE NAVBAR
========================================================= */

@media (max-width: 991px) {
  body.dark-mode .navbar-collapse {
    background: #151922;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 10px;
  }

  body.dark-mode .navbar-nav .nav-link {
    border-bottom: 1px solid #2b313d;
  }
}

/* =========================================================
   DARK MODE TOGGLE
========================================================= */

/* =========================================================
   MODERN THEME SWITCH
========================================================= */

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide checkbox */
.theme-switch input {
  display: none;
}

/* Switch container */
.theme-switch {
  position: relative;
  width: 70px;
  height: 34px;
  display: inline-block;
}

/* Slider background */
.slider {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 50px;
  cursor: pointer;
  transition: 0.4s;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Toggle circle */
.slider::before {
  content: "";
  position: absolute;
  height: 28px;
  width: 28px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.4s ease;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Checked state */
.theme-switch input:checked + .slider {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Move circle */
.theme-switch input:checked + .slider::before {
  transform: translateX(36px);
}

/* Icons */
.sun-icon,
.moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Sun */
.sun-icon {
  left: 10px;
  color: #facc15;
}

/* Moon */
.moon-icon {
  right: 10px;
  color: #ffffff;
}

/* Glow effect when enabled */
.theme-switch input:checked + .slider {
  box-shadow:
    0 0 10px rgba(34, 197, 94, 0.6),
    0 0 20px rgba(34, 197, 94, 0.3);
}

/* Hover effect */
.slider:hover {
  transform: scale(1.05);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .theme-switch {
    width: 65px;
    height: 32px;
  }

  .slider::before {
    width: 26px;
    height: 26px;
  }

  .theme-switch input:checked + .slider::before {
    transform: translateX(33px);
  }
}

/* end dark mode */
