/* ==================== RESET & VARIABLES (Same as index.html) ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #0A0A0A;
  --white: #FFFFFF;
  --gray-100: #F7F7F7;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-500: #737373;
  --gray-700: #404040;
  --accent: #FF6B35;
  --accent-light: #FFF0EB;
  --success: #10B981;
  --gold: #F59E0B;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

/* ==================== HEADER (Same as index.html) ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid var(--gray-200);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--black);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  color: var(--accent);
  font-size: 1.8rem;
}

.logo span {
  color: var(--accent);
}

.search-container {
  flex: 1;
  max-width: 600px;
  margin: 0 3rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 50px;
  padding: 0.4rem 0.5rem 0.4rem 1.2rem;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.search-bar:focus-within {
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  outline: none;
  color: var(--black);
  padding: 0.5rem 0;
}

.search-bar input::placeholder {
  color: var(--gray-500);
}

.search-btn {
  background: var(--accent);
  border: none;
  padding: 0.7rem 1.25rem;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.search-btn:hover {
  background: #e55a2b;
  transform: scale(1.02);
}

.header-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-shrink: 0;
}

.header-action {
  color: var(--black);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.header-action:hover {
  color: var(--accent);
}

.header-action .badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  font-weight: 600;
  display: none;
}

/* ==================== ACCOUNT PAGE ==================== */
.account-page {
  margin-top: 75px;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--gray-100) 0%, #fff 100%);
  padding: 3rem;
}

.account-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ==================== SIDEBAR ==================== */
.account-sidebar {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 95px;
}

.user-profile {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.user-profile h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--black);
}

.user-profile p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--accent);
  transform: translateX(5px);
}

.nav-item.active {
  background: var(--accent);
  color: white;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.logout-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--black);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.logout-btn:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==================== MAIN CONTENT ==================== */
.account-main {
  background: var(--white);
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid var(--gray-200);
  min-height: 600px;
}

.account-section {
  display: none;
}

.account-section.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--black);
}

.section-header p {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ==================== FORMS ==================== */
.content-card {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--black);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.form-input:disabled {
  background: var(--gray-200);
  cursor: not-allowed;
  color: var(--gray-500);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 0.9rem 1.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ==================== ORDERS ==================== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.order-card {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}

.order-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.order-header strong {
  font-size: 1rem;
  color: var(--black);
}

.order-date {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 400;
  margin-top: 0.25rem;
}

.status-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-processing {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-shipped {
  background: #E0E7FF;
  color: #4338CA;
}

.status-delivered {
  background: #D1FAE5;
  color: #065F46;
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}

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

.item-info p {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.item-info small {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.order-footer strong {
  font-size: 1.2rem;
  color: var(--black);
}

/* ==================== ADDRESSES ==================== */
.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.address-card {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--gray-200);
  transition: all 0.3s;
  position: relative;
}

.address-card:hover {
  border-color: var(--accent);
}

.address-card.default {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 4rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--gray-700);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ==================== PRODUCTS GRID (for wishlist) ==================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--black);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  display: none;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-size: 0.9rem;
}

.toast.show {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: #ef4444;
}

.toast.warning {
  background: var(--gold);
  color: var(--black);
}

.toast.info {
  background: #3b82f6;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .account-container {
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 968px) {
  .account-container {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .addresses-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.9rem 1.25rem;
  }

  .search-container {
    display: none;
  }

  .header-action span {
    display: none;
  }

  .account-page {
    padding: 1.5rem;
    margin-top: 60px;
  }

  .account-main {
    padding: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .account-page {
    padding: 1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
