@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-color: #f7f6f1;
  --text-color: #111111;
  --border-color: #111111;
  
  --primary-pink: #ff42a1;
  --primary-yellow: #ffdb00;
  --primary-blue: #4e6dff;
  --primary-green: #b5ff29;
  --white: #ffffff;
  
  --border-width: 3px;
  --shadow-offset: 6px;
  --shadow-color: var(--border-color);
  
  --font-main: 'Epilogue', sans-serif;
  
  --spacing-sm: 0.25rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1.25rem;
  --spacing-xl: 2.5rem;
}

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

html, body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-x: clip; /* Fix for position: sticky breaking when using hidden */
  width: 100%;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

/* Neo-brutalism Utilities */
.brutal-border {
  border: var(--border-width) solid var(--border-color);
}

.brutal-shadow {
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 0 var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brutal-shadow:hover {
  transform: translate(2px, 2px);
  box-shadow: calc(var(--shadow-offset) - 2px) calc(var(--shadow-offset) - 2px) 0 0 var(--shadow-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  cursor: pointer;
  background-color: var(--white);
  border: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 0 var(--shadow-color);
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translate(-4px, -4px);
  box-shadow: calc(var(--shadow-offset) + 4px) calc(var(--shadow-offset) + 4px) 0 0 var(--shadow-color);
}

.btn:active {
  transform: translate(var(--shadow-offset), var(--shadow-offset));
  box-shadow: 0 0 0 0 var(--shadow-color);
  background-color: var(--white) !important;
  color: var(--text-color) !important;
}

.bg-yellow { background-color: var(--primary-yellow); }
.bg-pink { background-color: var(--primary-pink); }
.bg-blue { background-color: var(--primary-blue); color: var(--white); }
.bg-green { background-color: var(--primary-green); }
.bg-white { background-color: var(--white); }
.bg-black { background-color: var(--border-color); color: var(--white); }

.bg-rainbow {
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  background-size: 200% 200%;
  animation: rainbow 5s ease infinite;
  color: #111;
  text-shadow: none;
  border: none;
}
.text-rainbow {
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  background-size: 200% 200%;
  animation: rainbow 5s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none !important;
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--border-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.blink-badge {
    animation: blink 1s infinite ease-in-out;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Header */
.header {
  padding: 0.5rem 0; /* Make more compact */
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
  background-size: 400% 100%;
  animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem; /* Make logo more compact */
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.05em;
}

.logo span.icon {
  background-color: var(--primary-pink);
  color: var(--border-color);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width) solid var(--border-color);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.product-meta span {
  background: #eee;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border-color);
}

.product-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.product-actions .btn {
  padding: 0.5rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  border-radius: 8px !important;
}

.product-actions .btn:first-child {
  flex: 1;
}

.right-nav-container {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.right-nav-container .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.right-nav-container > * {
  position: relative;
}

.right-nav-container > *:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -0.8rem;
  transform: translateY(-50%);
  width: 0.8rem;
  height: 8px;
  background-color: transparent;
  border-top: 3px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
  z-index: 0;
}

.header-actions {
  display: flex;
  gap: var(--spacing-md);
}

.header-actions .btn {
  margin-left: 0.5rem;
}

/* Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 150px;
    z-index: 9999;
    flex-direction: column;
    margin-top: 0.5rem;
}

.dropdown-content.show {
    display: flex;
}

.dropdown-content a {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: var(--border-width) solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: var(--bg-color);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-content {
    display: none;
    position: static;
    margin: 0.5rem 1rem;
}

.dropdown-submenu:hover > .dropdown-content {
    display: flex;
}

/* Needs Dropdown specific styles */
#needsDropdown, #mobileNeedsDropdown {
    max-height: 300px;
    overflow-y: auto;
}

#needsDropdown a, #mobileNeedsDropdown a {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Mobile Menu Button */

/* Hero Section */
.hero {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; /* Epilogue heavy weight */
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content h1 span.highlight-pink {
  background-color: var(--primary-pink);
  color: var(--border-color);
  padding: 0.1em 0.3em;
  margin: 0 0.3rem;
  display: inline-block;
  transform: translateY(-8px) rotate(-4deg);
  font-size: 0.7em;
  border: var(--border-width) solid var(--border-color);
  box-shadow: 3px 3px 0 0 var(--border-color);
}

.hero-stats {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.stat-box {
  padding: var(--spacing-md);
  border: var(--border-width) solid var(--border-color);
  flex: 1;
}

.brutal-shadow {
  box-shadow: 6px 6px 0 0 var(--border-color);
}

.stat-box .num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-box .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.hero-image {
  position: relative;
}

.carousel-wrapper {
  margin: 1.5rem 0 3rem 0;
}

.carousel-container {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  max-height: 450px;
  position: relative;
  border: var(--border-width) solid var(--border-color);
  box-shadow: 12px 12px 0 0 var(--border-color);
  overflow: hidden;
  background-color: var(--white);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.floating-badge {
  position: absolute;
  background-color: var(--primary-yellow);
  border: var(--border-width) solid var(--border-color);
  padding: 0.5rem 1rem;
  font-weight: 700;
  transform: rotate(-5deg);
  top: -20px;
  left: -20px;
  z-index: 10;
}

.floating-badge.bottom {
  top: auto;
  bottom: -20px;
  left: auto;
  right: -20px;
  background-color: var(--primary-blue);
  color: var(--white);
  transform: rotate(3deg);
}

/* Categories Marquee */
.marquee-wrapper {
  background-color: var(--border-color);
  color: var(--white);
  padding: var(--spacing-md) 0;
  overflow: hidden;
  position: relative;
  display: flex;
  border-top: var(--border-width) solid var(--border-color);
  border-bottom: var(--border-width) solid var(--border-color);
}

.marquee-content {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: scroll-marquee 45s linear infinite;
  padding-left: 3rem;
}

.marquee-content a {
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.marquee-content a::after {
  content: '●';
  font-size: 0.5rem;
  color: var(--white);
}

@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Categories Grid */
.section {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--spacing-lg);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.category-card {
  border: var(--border-width) solid var(--border-color);
  padding: var(--spacing-lg);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.category-card .cat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.category-card h3 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.1;
}

.category-card .arrow-icon {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: var(--border-color);
  color: var(--white);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Divider */
.divider {
  border: none;
  border-top: var(--border-width) solid var(--border-color);
  margin: var(--spacing-lg) 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.product-card {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.feature-card {
  background-color: var(--white);
  border: var(--border-width) solid var(--border-color);
  padding: var(--spacing-lg);
  position: relative;
}

.feature-card .icon-wrapper {
  width: 48px;
  height: 48px;
  background-color: var(--primary-blue);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.feature-card:nth-child(2) .icon-wrapper { background-color: var(--primary-pink); }
.feature-card:nth-child(3) .icon-wrapper { background-color: var(--primary-green); color: var(--border-color); }

.feature-card .step-number {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(17, 17, 17, 0.1);
}

/* Products Grid (Fresh Drops) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
  align-items: stretch;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .banner {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
    .product-grid {
      display: flex !important;
      flex-wrap: nowrap !important;
      overflow-x: auto !important;
      gap: 0.5rem;
      padding-bottom: 1rem;
      scroll-behavior: smooth;
    }
    .product-grid::-webkit-scrollbar {
      display: none;
    }
    .product-grid .product-card {
      flex: 0 0 160px;
      min-width: 160px;
      min-height: auto;
      margin: 0;
    }
    
    .product-grid .product-content {
      padding: 0.25rem;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }
    .product-grid .product-title-row h4 {
      font-size: 0.75rem;
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.2;
      margin-bottom: 0.1rem;
    }
    .product-grid .product-price {
      font-size: 0.75rem;
      margin-top: 0.1rem;
      margin-bottom: 0.1rem;
    }
    .product-grid .product-institution {
      font-size: 0.6rem !important;
      margin-bottom: 0.1rem !important;
    }
    .product-grid .product-desc,
    .product-grid .product-meta {
      display: none; /* Hide description and meta tags (which look like buttons) on mobile */
    }
    .product-grid .product-badge {
      font-size: 0.5rem;
      padding: 0.1rem 0.2rem;
    }
    .product-grid .product-actions {
      margin-top: auto;
      gap: 0.25rem;
      margin-bottom: 0;
      flex-direction: row !important;
      padding-top: 0.25rem !important;
    }
    .product-grid .product-actions .btn {
      padding: 0.2rem !important;
      font-size: 0.6rem !important;
      width: 100% !important;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 0.15rem !important;
    }
    .product-grid .product-actions .btn:hover {
      transform: none;
    }
    .product-grid .product-actions .btn svg {
      width: 14px;
      height: 14px;
    }
    .product-grid .product-actions .desktop-text {
      display: none !important;
    }
}

.footer-made-with-mobile {
  display: none;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important; /* using flex for search bar */
  }
  .right-nav-container {
    display: none;
  }
  .header .container {
    justify-content: center !important;
    position: relative;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .brand-container {
    margin: 0 !important;
  }
  .brand-container .logo span {
    font-size: 2.5rem !important;
  }
  .brand-container .logo img.animated-logo-icon {
    width: 45px !important;
    height: 45px !important;
    margin: -0.2rem -0.5rem !important;
  }
  .mobile-menu-btn {
    display: flex !important;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .features-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
  }
  .category-grid::-webkit-scrollbar {
    display: none;
  }
  .category-grid .category-card {
    flex: 0 0 220px;
    min-width: 220px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  .banner {
    flex-direction: column;
  }
  .hero-content .header-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .hero-content .header-actions .btn {
    width: 100%;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero-stats {
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
  .stat-box {
    padding: 0.5rem;
    word-break: break-word;
  }
  .stat-box .num {
    font-size: 1.25rem;
  }
  .stat-box .label {
    font-size: 0.5rem;
  }
  .section {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
  }
  .section-header {
    margin-bottom: 0.75rem;
  }
  .section-header h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0;
  }
  .section-header .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
    margin-bottom: 0.25rem !important;
  }
  .section-header .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  .category-card, .feature-card, .banner {
    margin-bottom: 1rem;
  }
  .banner-left, .banner-right {
    padding: var(--spacing-sm);
  }
  .banner-title, .banner-subtitle {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .banner-desc {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  .banner-emoji {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }
  .banner-buttons {
    flex-direction: column;
  }
  .banner-buttons .btn {
    width: 100%;
  }
  .marquee-wrapper {
    margin-top: 3rem;
  }
  .hero-content {
    margin-top: 1rem;
  }
  .hero-image {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
  .carousel-wrapper {
    margin: 1.5rem 0 0 0;
  }
  .category-card {
    padding: 0.75rem;
    aspect-ratio: auto;
    min-height: 120px;
  }
  .category-card h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
  }
  .category-card .arrow-icon {
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
  }
  .feature-card {
    padding: 1.25rem;
  }
  .product-image {
    height: 150px;
  }
  
  /* Compact Footer for Mobile */
  .footer {
    padding: 0.5rem 0;
  }
  .footer-grid {
    gap: 0.5rem;
  }
  .footer .logo {
    justify-content: center !important;
    width: 100% !important;
  }
  .footer .logo span {
    font-size: 1.5rem !important;
  }
  .footer .logo img.animated-logo-icon {
    width: 35px !important;
    height: 35px !important;
    padding: 2px !important;
    margin: -0.2rem -0.5rem !important;
  }
  .footer-made-with-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--primary-pink);
    margin-top: 0.25rem;
    text-align: center;
  }
  .footer h5 {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
  }
  .footer p {
    font-size: 0.75rem;
  }
  .footer-bottom {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }
  .footer-bottom a {
    font-size: 0.75rem;
  }
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--white);
  padding: 0.5rem 1rem;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 999;
  border-bottom: var(--border-width) solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-color);
  padding: 0.35rem 0;
  border-bottom: 2px solid var(--border-color);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Animations */
@keyframes seesaw {
  0% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
  100% { transform: rotate(-3deg); }
}

.seesaw {
  animation: seesaw 2s ease-in-out infinite;
  transform-origin: center;
}

.seesaw::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background-color: var(--primary-yellow);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.1), 2px 2px 0 0 var(--border-color);
  z-index: 2;
}

@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(8deg) scale(1.05); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-8deg) scale(1.05); }
  100% { transform: rotate(0deg); }
}

.animated-logo-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  mix-blend-mode: multiply;
  animation: wiggle 3s infinite ease-in-out;
}

/* Sell Modal */
.sell-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.sell-modal.active {
  display: flex;
}

.sell-modal-content {
  background-color: var(--bg-color);
  padding: var(--spacing-md);
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
}

.sell-modal h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.sell-modal p {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.sell-modal input, .sell-modal textarea {
  padding: 0.5rem !important;
  font-size: 0.85rem !important;
  margin-bottom: 0.5rem !important;
}

.sell-modal .btn {
  padding: 0.5rem !important;
  font-size: 0.9rem !important;
}

.sell-modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary-pink);
  color: var(--white);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sell-modal-close:hover {
  background: var(--border-color);
}

.sell-modal-back {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--white);
  color: var(--border-color);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sell-modal-back:hover {
  background: var(--primary-yellow);
}

.sell-modal select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23111%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
}

.profile-img-header { width: 50px !important; height: 50px !important; object-fit: cover !important; }
.profile-wrapper-header { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; }
.profile-wrapper-header:hover { transform: scale(1.4) !important; }

/* Carousel Product Cards */
.product-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.product-carousel .carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: transparent;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 0;
}
.product-carousel .carousel-img.active {
    opacity: 1;
    z-index: 1;
}
.product-carousel .card-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 5;
}
.product-carousel .card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    transition: all 0.2s;
}
.product-carousel .card-dot.active {
    background: #fff;
    transform: scale(1.3);
}
/* Missing Base Desktop Styles (Recovered) */

.banner {
    display: flex;
    background-color: var(--primary-pink);
    border: var(--border-width) solid var(--border-color);
}
.banner-left {
    flex: 1;
    padding: var(--spacing-xl);
    border-right: var(--border-width) solid var(--border-color);
    background-color: var(--primary-pink);
}
.banner-right {
    flex: 1;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--primary-yellow);
}
.banner-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.banner-subtitle {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}
.banner-desc {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}
.banner-buttons {
    display: flex;
    gap: 1rem;
}
.banner-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Footer Desktop */
.footer {
    background-color: var(--text-color);
    color: var(--white);
    border-top: var(--border-width) solid var(--border-color);
    padding: 1rem 0 0.5rem;
    margin-top: 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.footer-desc {
    margin-top: 0.25rem;
    font-size: 0.9rem;
}
.footer h5 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}
.footer ul {
    list-style: none;
    padding: 0;
}
.footer ul li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.footer ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
}
.footer ul li a:hover {
    text-decoration: underline;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: var(--border-width) solid var(--border-color);
    font-size: 0.85rem;
}
.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}
.footer-bottom-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Product Card Desktop Styles (Recovered) */
.product-image {
    width: 100%;
    padding-top: 65%;
    overflow: hidden;
    position: relative;
    background: #fff;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wishlist-overlay-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    padding: 0;
    box-shadow: 2px 2px 0px #111;
    transition: transform 0.2s, background-color 0.2s;
}

.wishlist-overlay-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-pink);
}

.wishlist-overlay-btn svg {
    width: 16px;
    height: 16px;
    stroke: #111;
    fill: none;
}
.product-image {
    overflow: hidden;
}
.product-image img {
    transition: transform 0.3s ease-out;
    transform: scale(1.1);
}
.product-card:hover .product-image img {
    transform: scale(1);
}

.product-content {
    padding: 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.25rem;
    padding-top: 0.4rem;
}

.product-title-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    margin-bottom: 0.25rem;
    flex-grow: 1;
}

.product-title-row h4 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.product-desc {
    font-size: 0.75rem;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.product-institution {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}


.product-badge {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 900;
    margin-top: auto;
    margin-bottom: 0.25rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 0;
}

.product-actions .btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

@media (min-width: 577px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .footer {
    display: none !important;
  }
  
  body {
    padding-bottom: 60px; /* Space for the bottom nav */
  }
  
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* very soft subtle shadow just for separation */
  }
  
  .mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    gap: 0.2rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
    opacity: 0.7; /* Dim inactive items */
  }
  
  .mobile-bottom-nav .nav-item:hover, 
  .mobile-bottom-nav .nav-item:active,
  .mobile-bottom-nav .nav-item.active {
    transform: translateY(-2px);
    filter: brightness(1.1);
    opacity: 1; /* Highlight active item */
  }
  
  /* Show a small indicator dot for the active item */
  .mobile-bottom-nav .nav-item.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    margin-top: 2px;
  }
  
  .mobile-bottom-nav .nav-item.nav-home { color: var(--primary-blue); }
  .mobile-bottom-nav .nav-item.nav-wishlist { color: var(--primary-pink); }
  .mobile-bottom-nav .nav-item.nav-cart { color: #ff9800; }
  .mobile-bottom-nav .nav-item.nav-history { color: #9c27b0; }
  .mobile-bottom-nav .nav-item.nav-donate { color: #4caf50; }
  
  .mobile-bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
  }
}
