@import url('https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@300;700&family=Space+Grotesk:wght@300;700&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
  background-color: #fff;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

header {
  text-align: center;
  width: 100%;
  max-width: 1200px; /* Match departments width */
  position: relative;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 2rem 0; /* Removed 24px left/right padding */
}

.auth-container {
  position: absolute;
  right: 0; /* Changed from 4rem to 0 */
  top: 50%;
  transform: translateY(-50%);
}

.profile-picture {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #333;
  object-fit: cover;
  cursor: pointer;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  min-width: 150px;
  display: none;
  z-index: 100;
}

.profile-menu.active {
  display: block;
}

.profile-menu a {
  display: block;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

.profile-menu a:hover {
  background-color: #f5f5f5;
}

.login-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #333 !important; /* Force black color */
  border: 1px solid #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.login-button svg {
  width: 20px;
  height: 20px;
}

.login-button:visited,
.login-button:active {
  color: #333;
}

.logo {
  font-family: 'Darker Grotesque', sans-serif;
  font-weight: 300;
  font-size: 4rem;
  text-transform: uppercase;
  margin: 0;
}

.departments {
  display: grid;
  grid-template-columns: repeat(auto-fit, 300px); /* Fixed width columns */
  justify-content: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0; /* Keep same vertical spacing as header */
  box-sizing: border-box;
}

.department {
  text-align: center;
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #333;
  width: 300px; /* Fixed width */
  min-height: 250px; /* Ensure uniform height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  margin: 0;
}

.department h2,
.department h3 {
  margin: 0 auto;
  text-align: center;
  font-family: 'Darker Grotesque', sans-serif;
  line-height: 0.8; /* Tighter line height */
  padding: 0;
}

.department h2 {
  font-size: 1.5rem;
  font-weight: 300;
}

.department h3 {
  font-weight: 700;
  margin-top: 2px; /* Changed from -5px to 2px for minimal spacing */
  padding-top: 0;
  text-transform: uppercase;
  position: relative; /* Ensure it stays above the company name */
  z-index: 1;
}

.department p {
  margin: 0.5rem 0 1rem;
  flex-grow: 1; /* Allow description to take available space */
}

.department a {
  text-decoration: none;
  font-weight: 700;
  color: #333;
  border: 1px solid #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  min-height: auto; /* Remove full height centering */
}

.auth-form {
  width: 100%;
  max-width: 320px; /* Reduced max-width for a tighter form */
  padding: 2rem;
  border: 1px solid #333;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center; /* Center profile picture */
}

.auth-form img {
  margin: 0 auto 1rem;
  display: block;
}

.form-group {
  margin-bottom: 1rem;
  box-sizing: border-box;
  text-align: left; /* Align labels to left */
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  height: 48px; /* Fixed height */
  padding: 0 1rem; /* Horizontal padding only */
  border: 1px solid #333;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
}

.profile-info {
  margin: 1rem 0;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.submit-button {
  width: 100%;
  height: 48px; /* Match input height */
  padding: 0 1rem; /* Horizontal padding only */
  margin: 0; /* Remove margin */
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.error {
  color: #ff0000;
  margin-bottom: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  header,
  .departments {
    padding: 1rem;
  }
  
  .departments {
    grid-template-columns: repeat(auto-fit, 250px);
    gap: 1.5rem;
    width: calc(100% - 2rem);
  }
  
  .department {
    width: 250px;
  }
}

@media (max-width: 1248px) {
  header,
  .departments {
    padding: 2rem 24px;
    width: 100%;
  }
}

@media (max-width: 1200px) {
  header, .departments {
    padding: 2rem; /* Same padding for both */
  }
}

footer {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.9rem;
}

/* Article styles */
.article-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.article-full {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin: 0 0 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #333;
}

.article-content {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.back-button:hover {
    text-decoration: underline;
}

/* Articles grid layout */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Style each article card */
.article-card {
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Style the read-more button */
.read-more {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.read-more:hover {
    background-color: #555;
}

/* Store layout */
.store-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}

.product-card {
  width: 250px;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-sizing: border-box;
  background-color: #fff;
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.product-name {
  font-family: 'Darker Grotesque', sans-serif;
  margin: 0.5rem 0;
}

.product-price {
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-card a.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  color: #fff;
  background-color: #333;
  border-radius: 4px;
  font-weight: 700;
}

.cart-container,
.order-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 8px;
  background-color: #fff;
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.order-item p {
  margin: 0;
}

.item-details {
  margin-left: 1rem;
  flex-grow: 1;
}

.item-total {
  text-align: right;
  margin-left: auto;
  font-weight: bold;
}

.admin-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #fafafa;
  border: 1px solid #333;
  border-radius: 6px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border: 1px solid #333;
  padding: 0.5rem 1rem;
  text-align: left;
}

.admin-table th {
  background-color: #f5f5f5;
}

/* Update container widths */
.product-page,
.cart-page,
.order-page {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  box-sizing: border-box;
}

.product-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.product-details img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.product-info {
  padding: 2rem;
  background: #fff;
  border: 1px solid #333;
  border-radius: 8px;
}

/* Consistent button styling */
.site-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.site-button:hover {
  background: #444;
}

/* Cart styles */
.cart-items {
  margin-bottom: 2rem;
}

.cart-summary {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.address-section {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.address-form {
  display: grid;
  gap: 1rem;
  max-width: 500px;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.button-group .site-button {
  flex: 1;
}

#address-display {
  margin-bottom: 1.5rem;
}

#address-display p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Update cart layout */
.cart-page {
  display: grid;
  grid-template-columns: 1fr 350px; /* Slightly narrower summary */
  gap: 2rem; /* Add gap between cart and summary */
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem; /* Add horizontal padding */
  align-items: flex-start; /* Ensure top alignment */
}

.cart-items {
  background: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 2rem;
  margin: 0; /* Remove any margin */
}

.cart-items h2 {
  margin-top: 0; /* Remove top margin from heading */
  margin-bottom: 2rem;
}

.cart-summary {
  background: #f5f5f5;
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
  height: fit-content;
  margin: 0; /* Remove any margin */
}

.cart-summary h3 {
  margin-top: 0; /* Remove top margin from heading */
  margin-bottom: 1.5rem;
}

/* Update order item layout */
.order-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.order-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.order-item > div {
  flex: 1;
}

.order-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

/* Make cart layout single column on smaller screens */
@media (max-width: 1024px) {
  .cart-page {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .cart-summary {
    position: static;
    border: 1px solid #333;
    border-radius: 8px;
  }
}

/* Confirmation page styles */
.confirmation-page {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.confirmation-container {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
}

.success-message {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.success-message h2 {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.payment-options {
    padding: 2rem 0;
    margin: 2rem 0;
}

.payment-methods-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.payment-method {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.payment-method h4 {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.payment-method .site-button {
    margin-top: auto;
}

.payment-method small {
    display: block;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.qr-code {
    display: block;
    width: 200px;
    height: 200px;
    margin: 1.5rem auto;
    padding: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.bank-details {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
}

.order-note {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 2rem;
}

.order-reference {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    display: inline-block;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .payment-methods-container {
        grid-template-columns: 1fr;
    }
}

/* Cart button styles */
.cart-btn {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 5px 12px;
  margin: 0 3px;
  cursor: pointer;
  border-radius: 4px;
}

.cart-btn:hover {
  background-color: #555;
}

.cart-qty {
  padding: 0 8px;
  font-weight: bold;
}

/* Orders page styles */
.orders-page {
  /* Ensure the page area is wide enough */
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.orders-grid {
  /* Use a responsive grid to fit multiple cards per row */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.order-card {
  background: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-badge {
  background: #333;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-transform: capitalize;
  font-weight: bold;
}

.order-info p {
  margin: 0.3rem 0;
}

.order-card .site-button {
  margin-top: 1rem;
  align-self: flex-start;
}

.order-status-page {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Orders admin styles */
.orders-admin {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.order-card.admin {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
}

.order-card.admin .order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.order-card.admin .order-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-card.admin .order-meta {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.order-card.admin .order-summary {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.order-card.admin .status-form {
    margin-top: 1rem;
}

.order-card.admin .form-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-card.admin .status-select,
.order-card.admin .tracking-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.order-card.admin .tracking-input {
    flex: 1;
}

.order-card.admin .order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-order-link {
    color: #666;
    text-decoration: none;
}

.view-order-link:hover {
    text-decoration: underline;
}

.order-card.admin .toggle-details {
    background: none;
    border: 1px solid #333;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.order-card.admin .order-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.order-card.admin .order-items {
    margin-bottom: 1.5rem;
}

.status-badge.cancelled {
    background: #ff4444;
}

.order-card.admin .order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 4px;
}

.order-card.admin .order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.order-card.admin .item-details {
    flex: 1;
}

.order-card.admin .item-details p {
    margin: 0.2rem 0;
}

/* Survey styles */
.survey-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
}

.rating-options {
    display: flex;
    gap: 2rem;             /* Increased from 1rem to 2rem */
    margin: 1.5rem 0;
    justify-content: center;
}

.rating-options label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rating-options label span {
    font-size: 0.9rem;
    color: #666;
}

.rating-options input[type="radio"] {
    display: none;
}

.rating-options input[type="radio"]:checked + .star-rating {
    color: #FFD700;
    transform: scale(1.1);
}

.star-rating {
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
}

.survey-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    margin: 1rem 0;
    box-sizing: border-box;  /* Add this to include padding in width */
    max-width: 100%;        /* Prevent overflow */
    resize: vertical;       /* Allow only vertical resizing */
}

.survey-results {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.survey-card {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
}

.survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.survey-rating {
    color: #FFD700;
    margin: 1rem 0;
}

.survey-feedback {
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 4px;
}

.survey-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.survey-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.survey-completed {
    color: #4CAF50;
    font-weight: bold;
}
