/* Global Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Loading Spinner */
.spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner-circle {
  width: 50px;
  height: 50px;
  border: 5px solid #ffbf00;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, #1a1a1a 0%, #333 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  background: #ffbf00;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.3s, transform 0.2s;
}

.nav-links li a:hover {
  background: #e6ac00;
  transform: translateY(-2px);
}

/* Profile Wrapper */
.profile-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.profile-title {
  text-align: center;
  font-size: 2.5rem;
  color: #333;
  border-bottom: 3px solid #ffbf00;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 1s ease-in-out;
}

/* Profile Photo Section */
.profile-photo-section {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-photo-container {
  position: relative;
  display: inline-block;
}

.profile-photo-container img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffbf00;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.profile-photo-container img:hover {
  transform: scale(1.05);
}

.upload-photo-btn {
  display: block;
  margin: 0.5rem auto;
  background: #ffbf00;
  color: #000;
}

.upload-photo-btn:hover {
  background: #e6ac00;
  transform: scale(1.05);
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #ddd;
  color: #333;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.tab-btn:hover {
  background: #ffbf00;
  color: #000;
}

.tab-btn.active {
  background: #ffbf00;
  color: #000;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Profile Sections */
.profile-section {
  margin-bottom: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  animation: slideIn 0.5s ease forwards;
}

.profile-section h2 {
  font-size: 1.8rem;
  color: #ffbf00;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ff6f61;
  padding-bottom: 0.5rem;
}

/* Profile Card */
.profile-card {
  padding: 1rem;
}

.detail-item {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-item label {
  font-weight: 600;
  color: #333;
  min-width: 80px;
}

.detail-item input,
.detail-item textarea {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: #f9f9f9;
  color: #333;
}

.detail-item input[readonly],
.detail-item textarea[readonly] {
  background: #eee;
  cursor: not-allowed;
}

.detail-item textarea {
  min-height: 80px;
  resize: vertical;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.edit-btn, .save-btn, .add-to-cart {
  background: #ffbf00;
  color: #000;
}

.edit-btn:hover, .save-btn:hover, .add-to-cart:hover {
  background: #e6ac00;
  transform: scale(1.05);
}

.buy-now {
  background: #333;
  color: #fff;
}

.buy-now:hover {
  background: #1a1a1a;
  transform: scale(1.05);
}

.delete-btn, .remove-btn {
  background: #e60000;
  color: #fff;
}

.delete-btn:hover, .remove-btn:hover {
  background: #c70000;
  transform: scale(1.05);
}

.undo-btn {
  background: #ff6f61;
  color: #fff;
}

.undo-btn:hover {
  background: #e65a50;
  transform: scale(1.05);
}

/* Product Grid & Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.product-card {
  border: none;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  position: relative;
  animation: fadeIn 0.5s ease forwards;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.3s;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-card .badge {
  background: #ff6f61;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.product-card .product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.product-card .price {
  color: #e60000;
  font-weight: 600;
  font-size: 1rem;
  margin: 0.5rem 0;
}

.product-card .order-status {
  font-size: 0.9rem;
  color: #555;
  margin: 0.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: #ffbf00;
  transition: width 0.5s ease;
}

.product-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.product-actions .btn {
  flex: 1;
  max-width: 120px;
}

/* Footer */
.footer {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  border-top: 4px solid #ffbf00;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .profile-title {
    font-size: 2rem;
  }

  .profile-section {
    padding: 1rem;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-item label {
    margin-bottom: 0.5rem;
  }

  .profile-photo-container img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-actions .btn {
    max-width: 100%;
  }

  .profile-title {
    font-size: 1.8rem;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}