/* Main styles for the Joy platform */

:root {
  --primary-color: #25BA17;
  --primary-hover-color: #18b350;
  --secondary-color: #f8f8f8;
  --text-color: #1A1A1A;
  --light-text-color: #777777;
  --border-color: #e0e0e0;
  --error-color: #ff3b30;
  
  /* Card colors */
  --card-red: #F73337;
  --card-blue: #C3BFFB;
  --card-yellow: #FCEFA9;
  --card-green: #E0F4AD;
  
  /* Specific text colors */
  --heading-color: #1A1A1A;
  --subheading-color: #949494;
  --greyscale-100: #f0f0f0;
  --greyscale-200: #eeeeee;
  --greyscale-300: #e0e0e0;
  --greyscale-400: #BDBDBD;
  --greyscale-500: #949494;
  --greyscale-600: #757575;
  --greyscale-700: #616161;
  --greyscale-800: #444444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  background-color: #ffffff;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

#app {
  width: 100%;
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  padding: 20px 0;
}

.header-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 32px; /* Set a fixed height for better alignment */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.budget-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 4px 10px 4px 10px;
  border-radius: 32px;
  font-weight: 500;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cart-button {
  position: relative;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-icon {
  font-size: 20px;
}

.cart-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Home Container */
.home-container {
  min-height: calc(100vh - 72px); /* 72px is header height */
  display: flex;
  flex-direction: column;
}

/* Hero Section */
.hero-section {
  padding: 3vh 0;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.hero-section h2 {
  margin-bottom: 0.5vh;
}

.hero-section h1 {
  margin-bottom: 3vh;
}

.search-container {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  margin-bottom: 5px;
}

.search-input {
  width: 100%;
  padding: 15px 0px;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  outline: none;
  background: transparent;
  transition: border-color 0.2s;
  text-align: left;
  color: var(--text-color);
}

.search-input::placeholder {
  color: var(--greyscale-400);
  opacity: 1;
}

.search-input:focus {
  border-color: var(--primary-color);
}

.search-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: #000;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-hint {
  color: var(--light-text-color);
  font-size: 12px;
  margin-top: 10px;
}

/* Form Elements */
input, select {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 100%;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--primary-color);
}

/* Loading indicators removed as they are not being used */

/* Card Variations */
.card-red {
  background-color: var(--card-red);
  color: white;
}

.card-blue {
  background-color: var(--card-blue);
  color: white;
}

.card-yellow {
  background-color: var(--card-yellow);
  color: var(--text-color);
}

.card-green {
  background-color: var(--card-green);
  color: white;
}

/* Featured Products */
.featured-section {
  padding: 1vh 0;
  position: relative;
  height: auto;
  min-height: 250px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.gradient-fade {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #FFF 76.39%);
  pointer-events: none;
}

.section-title {
  text-align: center;
  margin-bottom: min(2vh, 20px);
  font-weight: 400;
  color: var(--greyscale-600);
  font-size: min(14px, 3vw);
  position: relative;
}

.featured-products {
  position: relative;
  height: 28vh;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.featured-product-card {
  width: 172px;
  height: 210px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.5s, box-shadow 0.3s;
  position: absolute;
  padding: 4px;
}

.featured-product-card:nth-child(1) {
  background-color: var(--card-blue);
  transform: translateX(-100px) translateY(20px) rotate(-5deg);
  z-index: 1;
}

.featured-product-card:nth-child(2) {
  background-color: var(--card-red);
  z-index: 3;
}

.featured-product-card:nth-child(3) {
  background-color: var(--card-green);
  transform: translateX(100px) translateY(20px) rotate(5deg);
  z-index: 1;
}

.featured-product-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.featured-product-card:nth-child(1):hover {
  transform: translateX(-100px) translateY(15px) rotate(-5deg) scale(1.05);
}

.featured-product-card:nth-child(3):hover {
  transform: translateX(100px) translateY(15px) rotate(5deg) scale(1.05);
}

.featured-product-img {
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
}

.featured-product-img img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.featured-product-info {
  padding: 8px;
  color: white;
  height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 0 0 12px 12px;
}

.brand {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
  font-weight: 500;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.1;
}

.price {
  font-weight: 500;
  font-size: 10px;
}

/* Product List Page */
.product-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 8px;
}

.product-img-large {
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: 12px;
}

.product-img-small {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

/* Rating */
.rating {
  margin: 10px 0;
}

.star {
  color: #dddddd;
  font-size: 20px;
}

.star.filled {
  color: #ffc107;
}

.rating-number {
  margin-left: 10px;
  color: var(--light-text-color);
}

/* This section was removed as the welcome page is not being used */

/* Footer styles removed as we don't use a footer on the homepage */

/* Buttons */
.btn {
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  text-decoration: none;
  display: inline-block;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

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

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Card */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Typography Classes */
.display-text {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: 118%;
  letter-spacing: -1px;
}

.display-text-primary {
  color: var(--heading-color);
}

.display-text-secondary {
  color: var(--subheading-color);
}

.display-text-greyscale {
  color: var(--greyscale-400);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.my-2 {
  margin-top: 8px;
  margin-bottom: 8px;
}

.my-4 {
  margin-top: 16px;
  margin-bottom: 16px;
}

.my-6 {
  margin-top: 24px;
  margin-bottom: 24px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.p-2 {
  padding: 8px;
}

.p-4 {
  padding: 16px;
}

.p-6 {
  padding: 24px;
}

.rounded {
  border-radius: 4px;
}

.rounded-lg {
  border-radius: 8px;
}

.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.border-b {
  border-bottom: 1px solid var(--border-color);
}

/* Responsive grid */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-cols-3, .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .logo {
    font-size: 20px;
  }
  
  .budget-badge {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .featured-product-card:nth-child(1) {
    transform: translateX(-170px) rotate(-5deg);
  }
  
  .featured-product-card:nth-child(3) {
    transform: translateX(170px) rotate(5deg);
  }
  
  .featured-product-card:nth-child(1):hover {
    transform: translateX(-170px) translateY(-5px) rotate(-5deg) scale(1.02);
  }
  
  .featured-product-card:nth-child(3):hover {
    transform: translateX(170px) translateY(-5px) rotate(5deg) scale(1.02);
  }
}

@media (max-width: 640px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .user-actions {
    gap: 8px;
  }
  
  .featured-products {
    height: 650px;
    flex-direction: column;
  }
  
  .featured-product-card {
    position: relative;
    width: 172px;
    margin-bottom: 15px;
  }
  
  .featured-product-card:nth-child(1) {
    transform: translateX(0) rotate(-5deg);
    top: 0;
  }
  
  .featured-product-card:nth-child(2) {
    top: 160px;
  }
  
  .featured-product-card:nth-child(3) {
    transform: translateX(0) rotate(5deg);
    top: 320px;
  }
  
  .featured-product-card:nth-child(1):hover,
  .featured-product-card:nth-child(3):hover {
    transform: translateY(-5px) scale(1.02);
  }
}