:root {
  --bg-dark: #0e1117;
  --card-bg: #141824;
  --border: #1f2430;
  --accent: #ff9800;
  --success: #25d366;
  --text: #e6e6e6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Loading Screen Styles */
#loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Header & Navigation */
header {
  background: #0b0e14;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  color: #9aa0ae;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  cursor: pointer;
}

nav a:hover {
  color: #fff;
}

.cart-badge {
  background: #ff4757;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: -10px;
  right: -15px;
}

/* Search Bar */
.search-container {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

#searchInput {
  width: 100%;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  outline: none;
}

/* Hero */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)),
    url("https://images.unsplash.com/photo-1556821840-3a63f95609a7?q=80&w=1974")
      center/cover;
  border-bottom: 1px solid var(--border);
}

/* Product Grid */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.product {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: 0.3s;
}

.product:hover {
  transform: translateY(-5px);
  border-color: #3e4451;
}

.product img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  cursor: pointer;
}

.product-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}

.select-area {
  display: none;
  flex-direction: column;
  gap: 10px;
}

select,
.qty-btn {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: white;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1500;
  display: none;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: #0b0e14;
  z-index: 2000;
  padding: 30px;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-cart {
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.remove-item {
  color: #ff4757;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

.checkout-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  background: var(--success);
  color: #000;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 15px;
}

/* Media Queries */
@media (max-width: 600px) {
  .products {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .product img {
    height: 200px;
  }
}
.site-footer {
  background: #0b0e14;
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  margin-top: 50px;
}

.site-footer p {
  color: #9aa0ae;
  font-size: 14px;
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  text-decoration: underline;
}