/* Profile Page Advanced CSS */

/* Variables for consistent design with purple primary color */
:root {
  --primary-color: rgb(175, 82, 222);
  --primary-hover: rgb(155, 62, 202);
  /* Slightly darker shade for hover */
  --secondary-color: #f8f9fa;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* Global styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f5f7fa;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Section container styles */
.section-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 2rem;
}

/* Card styles with hover effects */
.section-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  width: 250px;
  text-align: center;
  box-shadow: var(--box-shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.section-card:hover::before {
  transform: scaleX(1);
}

.section-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: var(--secondary-color);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.section-card:hover .section-icon {
  background: var(--primary-color);
  color: white;
  transform: rotate(360deg);
  transition: all 0.5s ease;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.section-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Detail container styles */
.detail-container {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: var(--box-shadow);
  display: none;
}

.detail-container h2 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}



.detail-container h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary-color);
}

/* Form styles */
.form-input {
  width: 100%;
  padding: 12px 15px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(175, 82, 222, 0.25);
  outline: none;
}

.form-input.editable {
  background-color: #f9f0ff;
  /* Light purple tint for editable fields */
  border-color: var(--primary-color);
}

.form-input[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Button styles */
.edit-btn,
.save-btn,
.remove-btn,
.btn,
.back-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  margin: 10px 5px 10px 0;
}

.edit-btn {
  background-color: var(--primary-color);
  color: white;
}

.edit-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.save-btn {
  background-color: var(--success-color);
  color: white;
}

.save-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

.remove-btn {
  background-color: var(--danger-color);
  color: white;
}

.remove-btn:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}
.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.back-button {
  background-color: #ff6600;
  color: white;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 5px;
}


.back-btn {
  display: inline-block;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  margin-top: 1.5rem;
  transition: var(--transition);
  position: relative;
}

.back-btn::after {
  content: '←';
  margin-left: 5px;
  transition: var(--transition);
  position: absolute;
  left: -20px;
  opacity: 0;
}

.back-btn:hover {
  padding-left: 20px;
  color: var(--primary-hover);
}

.back-btn:hover::after {
  left: 0;
  opacity: 1;
}

/* Profile image styles */
#profileImagePreview {
  border: 3px solid var(--primary-color);
  padding: 3px;
  transition: var(--transition);
  margin-bottom: 1rem;
  background-color: #f8f9fa;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#profileImagePreview:hover {
  transform: scale(1.05);
}

/* Popup styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--box-shadow);
  position: relative;
  animation: popup 0.3s ease-out;
}

@keyframes popup {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Address item styles */
.address-item {
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.address-item:hover {
  transform: translateX(5px);
  box-shadow: var(--box-shadow);
}

.address-item p {
  margin: 8px 0;
}

.address-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1rem;
}




.addresses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.back-btn {
  cursor: pointer;
  color: rgba(175, 82, 222, 1);
  font-weight: bold;
  padding: 5px 10px;
  border: 1px solid rgba(175, 82, 222, 1);
  border-radius: 5px;
  transition: 0.3s;
}

.back-btn:hover {
  background-color: rgb(142, 50, 189);
  color: white;
}
.back-btn{
  margin-top:-20px
}






:root {
    --primary-color:rgba(175, 82, 222, 1);
    --secondary-color:rgb(254, 251, 255);
    --text-color: #333;
    --background-color: #f4f6f7;
    --card-background: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Global Resets and Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* Orders List Container */
#ordersDetails {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Order Wrapper */
.order-wrapper {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Order Header */
/* Order Section Comprehensive Styling */
.order-wrapper {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.order-wrapper:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.order-number {
  display: flex;
  flex-direction: column;
}

.order-number p {
  margin: 0;
  color: #333;
  font-weight: 600;
}

.order-number .view-details {
  color: rgba(175, 82, 222, 1);
  text-decoration: none;
  font-size: 0.9em;
  margin-top: 5px;
  transition: color 0.3s ease;
}

.order-number .view-details:hover {
  color: rgb(128, 36, 173);
  text-decoration: underline;

}

.order-status {
  text-align: right;
}

.order-status p {
  margin: 0;
}

.order-status .status-text {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9em;
}

.order-status .status-text.processing {
  color: #ffc107;
}

.order-status .status-text.shipped {
  color: #28a745;
}

.order-status .status-text.delivered {
  color: #28a745;
}

.order-status .status-text.cancelled {
  color: #dc3545;
}

.order-products {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.product-thumbnail {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.product-thumbnail:hover {
  transform: scale(1.05);
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive Design */
@media (max-width: 768px) {
  .order-header {
      flex-direction: column;
      align-items: flex-start;
  }

  .order-status {
      margin-top: 10px;
      align-self: flex-start;
  }

  .order-products {
      overflow-x: auto;
      max-width: 100%;
      padding-bottom: 10px;
  }
}

/* No Orders Styling */
#ordersList p {
  text-align: center;
  color: #6c757d;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-top: 10px;
}

/* Scrollbar for Product Thumbnails */
.order-products::-webkit-scrollbar {
  height: 6px;
}

.order-products::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.order-products::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.order-products::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Order Item */
.order-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.order-item-status {
    flex: 1;
    text-align: left;
}

.order-item-details {
    display: flex;
    align-items: center;
    flex: 3;
}

.order-item-details img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.item-info h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.item-actions .btn-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.item-actions .btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Order Details Container */
#orderDetails {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: none;
}

.order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.order-details-summary p {
    margin: 5px 0;
    color: #6c757d;
}

.order-details-actions .btn-secondary {
    margin-left: 10px;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.order-details-actions .btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Shipping Info */
.order-shipping-info {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.shipping-details h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Detailed Order Item */
.detailed-order-item {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
}

.item-delivery-status {
    flex: 1;
    border-right: 1px solid #e9ecef;
    padding-right: 15px;
}

.item-details {
    flex: 3;
    display: flex;
    align-items: center;
    padding-left: 15px;
}

.item-details img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 20px;
}

.item-info {
    flex-grow: 1;
}

.item-details .item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.item-details .item-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Order Summary */
.order-summary {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.summary-details p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.summary-details p:last-child {
    border-bottom: none;
    font-weight: bold;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .order-header {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .detailed-order-item {
        flex-direction: column;
    }

    .item-delivery-status {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .item-details {
        padding-left: 0;
    }
}

