/* ====== GENERAL LAYOUT ====== */
body {
  background: #18191A;
  color: #F1F1F1;
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== HEADER & NAVIGATION ====== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #212121;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.logo {
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

nav button {
  background: #242526;
  border: none;
  color: #F1F1F1;
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background 0.2s;
  cursor: pointer;
}
nav button:hover {
  background: #0078FF;
  color: #fff;
}

/* ====== MAIN CONTENT ====== */
main {
  flex: 1;
  max-width: 900px;
  margin: 2rem auto;
  width: 100%;
}

/* ====== CATEGORY TABS ====== */
.categories {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.categories button {
  background: #242526;
  border: none;
  color: #F1F1F1;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.categories button.active,
.categories button:hover {
  background: #0078FF;
}

/* ====== SORT BAR ====== */
.sort-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}
.sort-bar label {
  margin-right: 10px;
}
.sort-bar select {
  background: #212121;
  color: #F1F1F1;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.4rem 1rem;
}

/* ====== PRODUCT GRID & CARDS ====== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 2rem;
}
.product-card {
  background: #242526;
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #212121;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.product-card h3 {
  margin: 0.5rem 0;
  font-size: 1.15rem;
  text-align: center;
}
.product-card .price {
  color: #4DD784;
  font-weight: bold;
  margin-bottom: 1rem;
}
.product-card button {
  background: #0078FF;
  border: none;
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  margin: 5px;
  cursor: pointer;
  transition: background 0.2s;
}
.product-card button:hover {
  background: #005ECC;
}

/* ====== MODAL/PANEL STYLES ====== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal-content {
  background: #242526;
  padding: 2.5rem;
  border-radius: 22px;
  min-width: 450px;
  max-width: 650px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  color: #F1F1F1;
  box-sizing: border-box;
}
@media (min-width: 700px) {
  .modal-content {
    min-width: 500px;
    max-width: 700px;
  }
}
.modal-content h2 {
  color: #F1F1F1;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
}
.modal h2 { margin-top: 0; }
.close {
  position: absolute; right: 1.2rem; top: 1.2rem;
  font-size: 1.5rem; color: #999; cursor: pointer;
}

/* ====== CART & WISHLIST ITEM STYLES ====== */
#cart-items li,
#wishlist-items li {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  font-size: 1.2rem;
  border-bottom: 1px solid #353535;
}

#cart-items li img,
#wishlist-items li img {
  width: 64px;
  height: 64px;
  margin-right: 1.2rem;
  border-radius: 12px;
  object-fit: contain;
}

#wishlist-items li button {
  margin-left: 0.7rem;
  font-size: 1rem;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  background: #0078FF;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
#wishlist-items li button:hover {
  background: #005ECC;
}
#cart-items li button,
#wishlist-items li button {
  margin-left: auto;
  font-size: 1rem;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  background: #0078FF;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
#cart-items li button:hover,
#wishlist-items li button:hover {
  background: #005ECC;
}

/* ====== CHECKOUT BUTTON STYLING ====== */
#checkout-btn {
  background: #4DD784 !important;
  color: #222 !important;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  width: 100%;
  box-shadow: 0 4px 12px rgba(77, 215, 132, 0.3);
}

#checkout-btn:hover {
  background: #35b263 !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(77, 215, 132, 0.4);
}

#checkout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(77, 215, 132, 0.3);
}

/* ====== CART TOTAL STYLING ====== */
#cart-total {
  font-size: 1.4rem;
  font-weight: bold;
  color: #4DD784;
  text-align: right;
  padding: 1rem 0;
  border-top: 2px solid #353535;
  margin-top: 1rem;
}

/* ====== FORMS (Checkout & Status) ====== */
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 8px;
  background: #18191A;
  color: #F1F1F1;
  border: 1px solid #333;
  font-size: 1rem;
  box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus {
  outline: none;
  border-color: #0078FF;
  box-shadow: 0 0 5px rgba(0, 120, 255, 0.3);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

button[type="submit"], 
#signin-btn, 
#signup-btn {
  background: #4DD784 !important;
  color: #222;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: 0.5rem;
}

button[type="submit"]:hover, 
#signin-btn:hover, 
#signup-btn:hover {
  background: #35b263 !important;
  color: #fff;
}

#signin-btn, #signup-btn {
  background: #0078FF !important;
  color: #fff;
}

#signin-btn:hover, #signup-btn:hover {
  background: #005ECC !important;
}

/* ====== RESULT MESSAGES ====== */
#checkout-result,
#status-result {
  margin-top: 1.2rem; 
  font-weight: bold;
  font-size: 1.1rem;
  color: #4DD784;
  text-align: center;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(77, 215, 132, 0.1);
  border: 1px solid #4DD784;
}

#login-result,
#signup-result {
  margin-top: 0.8rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #ff6b6b;
  text-align: center;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid #ff6b6b;
}

#login-result.success,
#signup-result.success {
  color: #4DD784;
  background: rgba(77, 215, 132, 0.1);
  border-color: #4DD784;
}

ul { list-style: none; padding: 0; }
li:last-child { border-bottom: none; }

/* ====== FOOTER ====== */
footer {
  background: #212121;
  color: #888;
  text-align: center;
  padding: 1.2rem 0;
  border-top: 1px solid #252525;
  font-size: 0.95rem;
}

/* ====== HIDDEN CLASS ====== */
.hidden { display: none; }

/* ====== ENHANCED AUTH FORMS ====== */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #F1F1F1;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #2A2A2A;
  border: 2px solid #404040;
  border-radius: 8px;
  color: #F1F1F1;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: #0078FF;
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.1);
}

.input-group input::placeholder {
  color: #888;
}

.form-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: #B3B3B3;
}

.checkbox-container input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: #2A2A2A;
  border: 2px solid #404040;
  border-radius: 4px;
  margin-right: 0.5rem;
  position: relative;
  transition: all 0.3s;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background: #0078FF;
  border-color: #0078FF;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-password, .terms-link {
  color: #0078FF;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password:hover, .terms-link:hover {
  color: #4A9FFF;
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0.75rem;
}

.auth-btn.primary {
  background: linear-gradient(135deg, #0078FF, #0056CC);
  color: white;
}

.auth-btn.primary:hover {
  background: linear-gradient(135deg, #0056CC, #003D99);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 120, 255, 0.3);
}

.auth-btn.secondary {
  background: transparent;
  color: #0078FF;
  border: 2px solid #0078FF;
}

.auth-btn.secondary:hover {
  background: #0078FF;
  color: white;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #404040;
}

.auth-divider span {
  background: #242526;
  padding: 0 1rem;
  color: #888;
  font-size: 0.9rem;
}

.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  width: 100%;
  height: 4px;
  background: #404040;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4444, #ffaa00, #00aa00);
  transition: width 0.3s;
}

.strength-text {
  font-size: 0.8rem;
  color: #888;
}
