.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.page-header {
  text-align: center;
  padding: 20px 0 20px;
  background: linear-gradient(
    135deg,
    var(--secondary-color1),
    var(--primary-color)
  );
  color: var(--white);
  margin-bottom: 60px;
  border-radius: 10px;
  min-height: 15vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: white;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.profile-content {
  max-width: 800px;
  margin: 0 auto 60px;
}

.profile-card {
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.profile-avatar-section {
  text-align: center;
  padding: 40px;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 48px;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar.has-initials {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
}

.profile-avatar.has-initials i {
  display: none;
}

.avatar-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.delete-avatar-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ff4444;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.delete-avatar-btn:hover {
  background: #cc0000;
}

.upload-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.upload-btn:hover {
  background: var(--primary-hover);
}

.profile-form-section {
  padding: 40px;
}

/* Profile specific form overrides */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group input[readonly] {
  background-color: var(--gray-light);
  cursor: not-allowed;
  color: var(--text-secondary);
}

.profile-form-section .form-group label {
  display: none !important;
}

/* Profile specific field overrides */
.profile-form-section .form-group input {
  padding: 1rem;
}

.form-actions {
  text-align: center;
  margin-top: 30px;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color1)
  );
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  width: auto;
  min-width: 150px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(64, 1, 40, 0.3);
  margin: 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* Profile Layout */
.profile-layout {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.profile-sidebar {
  width: 250px;
  flex-shrink: 0;
}

.profile-nav {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.profile-nav-item:last-child {
  border-bottom: none;
}

.profile-nav-item:hover {
  background: var(--surface-color);
}

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

.profile-nav-item i {
  width: 20px;
  text-align: center;
}

.profile-content-area {
  flex: 1;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--gray-light);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--gray-medium);
}

/* Product Details */
.product-details {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.detail-item {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item strong {
  color: var(--primary-color);
  min-width: 120px;
  display: inline-block;
}

/* Modern Product Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image {
  position: relative;
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
}

.main-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.main-image:hover img {
  transform: scale(1.05);
}

.image-counter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.gallery-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(64, 1, 40, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

/* Discount Styles */
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
  z-index: 2;
}

.price-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price-sale {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.price-original {
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Product Detail Page Discount */
.price-section {
  margin: 1rem 0;
}

.price-section .price-sale {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.price-section .price-original {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.discount-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.discount-badge-large {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.savings {
  background: var(--success);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .main-image img {
    height: 300px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .gallery-item img {
    height: 60px;
  }

  .price-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .discount-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .price-section .price-sale {
    font-size: 1.5rem;
  }

  .price-section .price-original {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
    color: white;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .profile-avatar-section,
  .profile-form-section {
    padding: 30px 20px;
  }

  .profile-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .profile-sidebar {
    width: 100%;
  }

  .profile-nav {
    display: flex;
    overflow-x: auto;
    justify-content: center;
  }

  .profile-nav-item {
    white-space: nowrap;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }

  .profile-nav-item:last-child {
    border-right: none;
  }
}
