body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #000000;
}

header {
  padding: 20px;
  text-align: center;
  background: #000;
  color: #fff;
  position: relative;
}

header img {
  height: 120px;
  margin-bottom: 5px;
}

#logo {
  position: absolute;
  top: 20px;
  left: 20px;
}

#accountSection, #userSection {
  position: absolute;
  top: 20px;
  right: 20px;
}

.account-btn {
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.account-btn:hover {
  background: #000;
  color: #fff;
  border-color: #fff;
}

.hero {
  padding: 40px 20px;
  text-align: center;
  background: url('herosection.png') no-repeat center center;
  background-size: cover;
  color: #fff;
}

.hero-title, .hero-subtitle {
  font-weight: bold;
  background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #00ff00, #0000ff, #8000ff, #ff00ff, #ff0000);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback */
  text-align: center;
  margin: 20px 0;
  animation: rainbow-shift 3s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 255, 255, 0.4);
}

@keyframes rainbow-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title {
  font-size: 2.5em; /* Adjust size */
}

.hero-subtitle {
  font-size: 1.2em;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 30px;
  max-width: 1000px;
  margin: auto;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:hover { transform: scale(1.03); }

.product-card img {
  width: 100%;
  border-radius: 10px;
}

.price {
  font-size: 20px;
  font-weight: bold;
  margin: 10px 0;
}

.badge {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 10px;
}

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #ddd;
  margin-top: 40px;
  color: #555;
}

/* MODAL NOT FULL SCREEN */
.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

.modal-content {
  background: #fff;
  padding: 40px 25px 40px 25px; /* moderate padding */
  border-radius: 12px;
  max-width: 420px; /* standard width */
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content img {
  width: 100%;
  max-height: 160px; /* moderate image size */
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0 15px 0;
}

.modal-content h2 {
  font-size: 20px; /* moderate title size */
  margin: 8px 0;
  color: #000;
}

.modal-content p {
  font-size: 14px; /* moderate text size */
  margin: 5px 0;
  color: #333;
}

.modal-content h3 {
  font-size: 16px; /* moderate heading */
  margin: 10px 0 5px 0;
  color: #000;
}

.size-box span {
  display: inline-block;
  padding: 6px 12px; /* moderate size buttons */
  margin: 4px;
  border-radius: 6px;
  border: 1px solid #000;
  font-size: 13px;
}

.size-available {
  background: #000;
  color: #fff;
}

.size-out {
  background: #eee;
  color: #999;
  border: 1px dashed #ccc;
}

.selectors {
  margin: 15px 0;
}

.selectors label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: bold;
}

#sizeSelect, #qtyInput {
  padding: 6px;
  margin-right: 10px;
  border: 1px solid #000;
  border-radius: 4px;
  font-size: 14px;
}

.qty-control {
  display: inline-block;
}

.qty-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

/* Checkout Page Layout */
main {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

main h2 {
  text-align: center;
  color: #000;
  font-size: 28px;
  margin-bottom: 30px;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
}

#checkoutDetails {
  background: #fff;
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-left: 4px solid #000;
}

#checkoutDetails h3 {
  color: #000;
  font-size: 20px;
  margin-bottom: 15px;
}

#checkoutDetails p {
  margin: 8px 0;
  font-size: 16px;
  color: #333;
}

#checkoutForm {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#checkoutForm h3 {
  color: #000;
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
}

#checkoutForm label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #000;
  font-size: 14px;
}

#checkoutForm input,
#checkoutForm textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

#checkoutForm textarea {
  height: 80px;
  resize: vertical;
}

#checkoutForm button {
  width: 100%;
  padding: 15px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s;
}

#checkoutForm button:hover {
  background: #333;
}

/* Sign Up and Sign In Modal Styles */
#signUpModal .modal-content,
#signInModal .modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 50%, #f0f0f0 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  border: 1px solid #e8e8e8;
  animation: modalElegantFade 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

@keyframes modalElegantFade {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

#signUpModal .modal-content::before,
#signInModal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #000 0%, #666 30%, #000 60%, #666 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

#signUpForm, #signInForm {
  text-align: center;
  position: relative;
  z-index: 1;
}

#signUpForm h2, #signInForm h2 {
  color: #000;
  font-size: 28px;
  margin-bottom: 25px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  letter-spacing: -0.5px;
}

#signUpForm label, #signInForm label {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
}

#signUpForm input, #signInForm input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 2px solid #e1e1e1;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
}

#signUpForm input::placeholder, #signInForm input::placeholder {
  color: #999;
  font-style: italic;
  opacity: 0.7;
}

#signUpForm input:focus, #signInForm input:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.1);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

#signUpForm input:hover, #signInForm input:hover {
  border-color: #666;
}

#signUpForm button, #signInForm button {
  background: linear-gradient(135deg, #000 0%, #333 50%, #000 100%);
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  margin-top: 15px;
}

#signUpForm button::before, #signInForm button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#signUpForm button:hover::before, #signInForm button:hover::before {
  left: 100%;
}

#signUpForm button:hover, #signInForm button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #333 0%, #666 50%, #333 100%);
}

#signUpForm button:active, #signInForm button:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
  /* Header adjustments */
  header {
    padding: 15px 10px;
    text-align: center;
  }

  header h1 {
    font-size: 24px;
    margin-bottom: 5px;
  }

  header img {
    height: 96px;
    margin-bottom: 5px;
  }

  #logo {
    position: static;
  }

  header p {
    font-size: 14px;
  }

  #accountSection, #userSection {
    position: static;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .account-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
  }

  /* Hero section */
  .hero {
    padding: 30px 15px;
  }

  .hero-title {
    font-size: 22px;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 16px;
  }
  }

  /* Products grid */
  .products {
    padding: 20px 10px;
    gap: 15px;
  }

  .product-card {
    padding: 12px;
    border-radius: 10px;
  }

  .product-card h3 {
    font-size: 16px;
  }

  .price {
    font-size: 18px;
  }

  /* Modal adjustments */
  .modal-content {
    margin: 10px;
    padding: 25px 15px 25px 15px;
    max-width: none;
    width: calc(100vw - 20px);
    border-radius: 15px;
  }

  #modalTitle {
    font-size: 20px;
  }

  .modal-content img {
    max-height: 150px;
  }

  .selectors {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .selectors label {
    text-align: center;
    margin-bottom: 5px;
  }

  #sizeSelect, #qtyInput {
    padding: 10px;
    font-size: 16px;
  }

  .qty-control {
    justify-content: center;
  }

  .qty-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .buy-now-btn {
    padding: 14px 25px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
  }

  /* Sign up/sign in modals */
  #signUpForm h2, #signInForm h2 {
    font-size: 24px;
  }

  #signUpForm input, #signInForm input {
    padding: 16px 18px;
    font-size: 16px;
  }

  #signUpForm button, #signInForm button {
    padding: 16px 30px;
    font-size: 16px;
    width: 100%;
    max-width: 280px;
  }


@media (max-width: 480px) {
  /* Extra small screens */
  header h1 {
    font-size: 20px;
  }

  header img {
    height: 80px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .products {
    grid-template-columns: 1fr;
    padding: 15px 5px;
  }

  .product-card {
    padding: 10px;
  }

  .modal-content {
    padding: 20px 10px 20px 10px;
    width: calc(100vw - 10px);
    margin: 5px;
  }

  .modal-content img {
    max-height: 120px;
  }

  #modalTitle {
    font-size: 18px;
  }

  .modal-content p {
    font-size: 13px;
  }

  .modal-content h3 {
    font-size: 15px;
  }

  .size-box span {
    padding: 6px 10px;
    font-size: 12px;
  }

  .buy-now-btn {
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Checkout page mobile */
  main {
    margin: 10px;
    padding: 15px;
  }

  main h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  #checkoutDetails, #checkoutForm {
    padding: 15px;
  }

  #checkoutForm input, #checkoutForm textarea {
    padding: 12px;
    font-size: 16px;
  }

  #checkoutForm button {
    padding: 15px;
    font-size: 16px;
  }

  /* Sign up/sign in */
  #signUpForm h2, #signInForm h2 {
    font-size: 20px;
  }

  #signUpForm label, #signInForm label {
    font-size: 14px;
  }

  #signUpForm input, #signInForm input {
    padding: 14px 16px;
    font-size: 16px;
  }

  #signUpForm button, #signInForm button {
    padding: 14px 25px;
    font-size: 16px;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .product-card {
    min-height: 120px;
  }

  .account-btn, .qty-btn, .buy-now-btn, #signUpForm button, #signInForm button {
    min-height: 44px; /* iOS touch target minimum */
    min-width: 44px;
  }

  .size-available, .size-out {
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Reduce hover effects on touch */
  .product-card:hover { transform: none; }
  nav a:hover { transform: none; background: none; }
  nav a:hover::after { width: 0; }
  .buy-now-btn:hover { transform: none; }
  #signUpForm button:hover, #signInForm button:hover { transform: none; }
}

/* Accessibility and trust improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modal-content {
    border: 2px solid #000;
  }

  input, textarea, select {
    border: 2px solid #000;
  }

  .buy-now-btn, #signUpForm button, #signInForm button {
    border: 2px solid #fff;
  }
}

/* Enhanced Product Modal Styles */
#productModal .modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
  border: 1px solid #e8e8e8;
  animation: modalSlideIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#productModal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #000 0%, #666 50%, #000 100%);
}

#modalTitle {
  color: #000;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
}

#modalImage {
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

#productModal p {
  margin: 8px 0;
  font-size: 15px;
  color: #444;
  text-align: center;
}

#productModal h3 {
  color: #000;
  font-size: 18px;
  margin: 15px 0 10px 0;
  text-align: center;
}

.size-box {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
}

.size-available, .size-out {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid #000;
}

.size-available {
  background: #000;
  color: #fff;
}

.size-available:hover {
  background: #333;
}

.size-out {
  background: #f0f0f0;
  color: #999;
  border-style: dashed;
}

.size-out:hover {
  background: #e0e0e0;
}

.selectors {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
}

.selectors label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

#sizeSelect {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: #000;
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #333;
  transform: scale(1.1);
}

#qtyInput {
  width: 50px;
  padding: 8px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
}

.buy-now-btn {
  background: linear-gradient(135deg, #000 0%, #444 100%);
  color: #fff;
  border: none;
  padding: 14px 35px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-top: 20px;
}

.buy-now-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #333 0%, #666 100%);
}

.buy-now-btn:active {
  transform: translateY(-1px);
}