@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&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(59, 130, 246, 0.5) 0%,
      rgba(59, 130, 246, 0.15) 20%,
      transparent 50%
    ),
    linear-gradient(135deg, #020617, #0f172a, #111827);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
}

.navbar .logo {
  font-size: 30px;
  font-weight: 600;
  color: #ffffff;
}

.navbar .links {
  display: flex;
  gap: 30px;
}

.navbar .links a {
  text-decoration: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
}

.navbar .links a:hover {
  color: #58a2fc;
  transition: 0.5s ease-in-out;
}

.left-sidebar {
  position: fixed;
  top: 80px;
  left: 0;
  width: 250px;
  height: calc(100vh - 80px);
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: width 0.3s ease, padding 0.3s ease;
  overflow: visible;
}

.sidebar-toggle {
  z-index: 10;
  position: absolute;
  top: 20px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, top 0.3s ease, left 0.3s ease, right 0.3s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.left-sidebar.collapsed {
  width: 50px;
  padding: 20px 6px;
  overflow: hidden;
}

.left-sidebar.collapsed .sidebar-toggle {
  top: 20px;
  right: auto;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  color: #ffffff;
}

.left-sidebar.collapsed h3,
.left-sidebar.collapsed ul,
.left-sidebar.collapsed .search-bar {
  opacity: 0;
  max-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.left-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.left-sidebar ul li {
  margin-bottom: 15px;
}

.left-sidebar a {
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 20px;
}

.left-sidebar a:hover {
  color: #58a2fc;
  transition: 0.5s ease-in-out;
}

.left-sidebar .search-bar {
  margin-top: 20px;
}

.left-sidebar .search-bar input {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.left-sidebar .search-bar input::placeholder {
  color: #ffffff;
}

.left-sidebar .search-bar input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

.left-sidebar .search-bar .search-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #3b82f6;
  color: #ffffff;
  cursor: pointer;
}

.left-sidebar .search-bar .search-btn:hover {
  background-color: #316aaf;
  transition: 0.5s ease-in-out;
}

.hero {
  justify-content: center;
  display: flex;
  padding: 20px;
}

.hero-banner {
  width: 100%;
  margin-left: 270px;
  display: flex;
  transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .hero-banner,
body.sidebar-collapsed .container,
body.sidebar-collapsed .cart-container,
body.sidebar-collapsed .search-results,
body.sidebar-collapsed .product-container {
  margin-left: 70px;
}

.hero-banner {
  width: 100%;
  margin-left: 270px;
  display: flex;
  transition: margin-left 0.3s ease;
}

.hero-banner img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
}

.container,
.cart-container,
.search-results,
.product-container {
  transition: margin-left 0.3s ease;
}

.container {
  margin-left: 270px;
  margin-top: 20px;
  padding: 20px;
  background: transparent;
}

.container h1 {
  margin-top: 20px;
  font-size: 24px;
  margin-bottom: 20px;
  color: #ffffff;
}

.container p {
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
}

.product-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  width: 200px;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 20px;
}

.product-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.product-card h3 {
  font-size: 18px;
  margin-top: 15px;
  color: #ffffff;
}

.product-card p {
  font-size: 14px;
  margin-top: 10px;
  color: #ffffff;
}

.product-card a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #58a2fc;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
}

.product-card a:hover {
  background-color: #316aaf;
  transition: 0.5s ease-in-out;
}

.product-container {
  max-width: 1200px;
  margin: 50px auto;

  display: flex;
  gap: 50px;

  padding: 20px;
}

.product-image img {
  width: 450px;
  border-radius: 20px;
}

.product-info {
  color: white;
}

.price {
  color: #60a5fa;
  font-size: 2rem;
  font-weight: bold;
}

.cart-btn {
  margin-top: 20px;
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: white;
  cursor: pointer;
}

.cart-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(340px, calc(100% - 40px));
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  padding: 20px;
  border-radius: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 2000;
}

.cart-popup.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-popup-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-popup .popup-message {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.popup-action {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.popup-action.go-cart-btn {
  background: #3b82f6;
  color: #ffffff;
}

.popup-action.close-popup-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.search-results {
  margin-left: 270px;
  margin-top: 20px;
  padding: 20px;
}

.search-results h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #ffffff;
}

.search-results p {
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
}

.search-results .product-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.search-results .product-card {
  width: 200px;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 20px;
}

.search-results .product-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.search-results .product-card h3 {
  font-size: 18px;
  margin-top: 15px;
  color: #ffffff;
}

.search-results .product-card p {
  font-size: 14px;
  margin-top: 10px;
  color: #ffffff;
}

.search-results .product-card a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #58a2fc;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
}

.search-results .product-card a:hover {
  background-color: #316aaf;
  transition: 0.5s ease-in-out;
}

.cart-container {
  max-width: 1200px;
  margin: 50px auto;
  padding: 20px;
}

.cart-container h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #ffffff;
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.cart-item {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item-image {
  width: 120px;
  min-width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.cart-item-info p {
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
}

.cart-item-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #ffffff;
  font-size: 14px;
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.quantity-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.quantity-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.quantity-value {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

.cart-item-total {
  font-weight: 700;
  color: #ffffff;
}

.cart-summary {
  margin-top: 30px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #e5e7eb;
  margin-bottom: 14px;
}

.cart-summary-row.total {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.checkout-btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: #3b82f6;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.empty-cart {
  margin-top: 30px;
  color: #d1d5db;
  font-size: 16px;
}