@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root.darkmode {
  --box-shadow: rgba(200, 200, 200, 0.073);
  --primary-color: #5884e3;
  --hover-color: #1c3695;
  --bg-color: #0b1320;
  --text-color: #fffdfd;
  --secondary-color: #ffffff;
}

:root {
  --primary-color: #155dfc;
  --hover-color: #10388f;
  --bg-color: #fff;
  --text-color: #000;
  --box-shadow: rgba(0, 0, 0, 0.126);
  --secondary-color: #656d7b;
}

body {
  color: var(--text-color);
  transition: 0.3s all ease;
  background-color: var(--bg-color);
}

.navbar a {
  color: var(--text-color);
  text-decoration: none;
}

.old-price {
  color: #656d7b !important;
}

body,
input,
select,
button {
  font-family: "Poppins", sans-serif !important;
}

/*Utility Classes*/
.container {
  padding: 0px 10%;
}

.hide {
  display: none;
}

.d-flex {
  display: flex;
  gap: 20px;
  align-items: center;
}

/*NavBar*/
.navbar {
  position: sticky;
  top: 0;
  display: flex;
  z-index: 1;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-color);
  height: 70px;
  margin: 0 auto;
  border-bottom: 2px solid #656d7b22;
  transition: 0.2s all ease;
}

.navbar.scrolled {
  height: 80px;
}

.logo {
  font-weight: 600;
  font-size: 1.5em;
}

a {
  text-decoration: none;
}

.home-btn {
  background-color: var(--primary-color);
  text-decoration: none;
  border: none;
  padding: 8px 24px;
  color: #fff;
  font-weight: 600;
  font-size: 1.05em;
  border-radius: 12px;
  transition: 0.2s all ease;
  cursor: pointer;
}

.home-btn:hover {
  background-color: var(--hover-color);
}

/*Dark Mode Switch Starts*/
.toggle-switch {
  position: relative;
  scale: 0.7;
  width: 100px;
  height: 50px;
  --light: #d8dbe0;
  --dark: #28292c;
  --link: rgb(27, 129, 112);
  --link-hover: rgb(24, 94, 82);
}

.switch-label {
  position: absolute;
  width: 100%;
  height: 50px;
  background-color: var(--dark);
  border-radius: 25px;
  cursor: pointer;
  border: 3px solid var(--dark);
}

.checkbox {
  position: absolute;
  display: none;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked~.slider {
  background-color: var(--light);
}

.slider::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  -webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
  box-shadow: inset 12px -4px 0px 0px var(--light);
  background-color: var(--dark);
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked~.slider::before {
  -webkit-transform: translateX(50px);
  -ms-transform: translateX(50px);
  transform: translateX(50px);
  background-color: var(--dark);
  -webkit-box-shadow: none;
  box-shadow: none;
}

/*Dark Mode Switch Ends*/

/*Cart Icons*/
.cart {
  font-size: 1.5em;
  color: var(--primary-color);
}

.cart-icon-wrapper {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: #000;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6em;
  font-weight: 500;
}

/* Cart Sidebar */
.cart-sidebar {
  color: var(--text-color);
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  /* Fallback */
  height: 100%;
  max-height: 100vh;
  background-color: var(--bg-color);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.cart-sidebar.active {
  right: 0;
}

.cart-overlay.active {
  display: block;
}

.cart-header {
  display: flex;
  padding: 20px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  color: var(--text-color);
  background: var(--bg-color);
  z-index: 10;
}

.cart-header h3 {
  margin: 0;
  font-size: 1.2em;
}

.close-cart {
  background: none !important;
  border: none !important;
  font-size: 1.8em;
  cursor: pointer;
  color: #656d7b !important;
}

/*For Cart Sidebar*/

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  padding: 10px;
  border-bottom: 1px solid black;
}

.cart-item img {
  border-radius: 8px;
  object-fit: cover;
  width: 80px;
  height: 80px;
}

.cart-name {
  font-weight: 600;
}

.cart-price {
  font-weight: 600;
}

.cart-delete {
  cursor: pointer;
  font-weight: 600;
  color: #dc3545;
}

.cart-items {
  display: flex;
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-item {
  display: flex;
  gap: 20px;
  justify-content: start;
}


.empty-cart {
  font-weight: 500;
  text-align: center;
  color: #656d7b !important;
  margin-top: 50px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  position: sticky;
  bottom: 0;
  background: var(--bg-color);
}

.checkout-btn {
  font-family: "Poppins", sans-serif;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.checkout-btn:hover {
  background-color: var(--hover-color);
}


/* Responsive */
@media (max-width: 468px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .cart-items {
    /* align-items: space; */
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Navbar End */
.cart-modal {
  position: fixed;
  top: 8%;
  right: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s ease-out;
  z-index: 1000;
  border-left: 6px solid var(--primary-color);
}

.cart-modal.show {
  transform: translateX(0);
  opacity: 1;
}

.cart-modal-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-modal-icon {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: bold;
}

.cart-modal-text {
  font-size: 1.15em;
  font-weight: 500;
  color: #333;
}

/*alert For*/

.stock-alert {
  position: absolute;
  z-index: 100;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 40%;
  padding: 10px;
  border-radius: 6px;
  color: #fff;
  background-color: #ff6b6b;
  animation: alert 1.2s ease-out;
  opacity: 0;
  /* Start invisible */
}

@keyframes alert {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }

  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/*Footer*/
.footer {
  border-top: 1px solid var(--text-color);
  background-color: #0b1320;
  color: white;
  padding: 40px 20px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  border-bottom: 1px solid #4b5563;
  padding-bottom: 20px;
  gap: 20px;
}

.footer-column {
  flex: 1 1 200px;
}

.footer-column h2.logo {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-column h3 {
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-column p,
.footer-column ul {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 6px;
}

.footer-column ul li a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-column ul li a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin-top: 20px;
}

.old-price {
  color: var(--text-color);
  text-decoration: line-through;
}