body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
  'Helvetica Neue', 'Ubuntu', sans-serif;
  background: #FCF8ED;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

nav {
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 100px;
}

/* Default styles */
.navbar-scrolled {
  height: 60px;
  transition: height 0.3s ease;
}

.navbar-scrolled .logo img {
  height: 45px;
  transition: height 0.3s ease;
}

.logo img {
  height: 75px;
  padding: 0.5rem 0 0 1.5rem;
}

.cart-icon {
  font-size: 2.5rem; /* Increased font size */
  cursor: pointer;
  position: relative;
  padding: 0.5rem 1.5rem 0 0;
  margin-right: 0.5rem;
}

#cart-count {
  position: absolute;
  top: 0;
  right: 1rem;
  background-color: #ff4136;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
}

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

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 3rem;
  color: #242d60;
  font-weight: bold;
}

.content-wrapper {
  display: flex;
  gap: 2rem;
}

#products {
  flex: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

section.generate-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#prompt-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1.5rem;
}

#prompt {
  width: 100%;
  height: 120px;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#prompt:focus {
  border-color: #3498db;
  outline: none;
}

#prompt-form button {
  width: fit-content;
  align-self: flex-start;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  color: white;
  background-color: #556cd6;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#prompt-form button:hover {
  background-color: #3f4fd0;
}

#loading-spinner {
  text-align: center;
}

#loading-spinner .spinner {
  margin: 0 auto;
}

#generated-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.generated-image {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  border: 1px solid #ddd;
  margin: 1rem;
}

#cart {
  flex: 2;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

#loading-spinner {
  text-align: center;
  display: none; /* Initially hidden */
}

.spinner {
  border: 8px solid #f3f3f3; /* Light gray */
  border-top: 8px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
}

#modal-close {
  position: absolute;
  top: 10px;
  right: 25px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  #products,
  #cart {
    width: 100%;
  }

  .product {
    width: 100%;
  }

  main {
    padding: 2rem 1rem;
  }
}

.style-selector {
  margin: 20px 0;
}

.style-options {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.style-option {
  text-align: center;
}

.style-option img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}

.style-option input[type="radio"] {
  margin-right: 5px;
}