/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #212A2F; /* Allbirds almost black */
  --secondary-color: #F5F5F5; /* Light grey for image backgrounds */
  --text-dark: #212A2F;
  --text-light: #FFFFFF;
  --text-muted: #5B6165;
  --border-color: #E8E8E8;
  --bg-color: #FFFFFF;
  --error-color: #d11b1b;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* Announcement Bar */
.announcement-bar {
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
  padding: 10px 15px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  min-height: 80px;
  background-color: var(--bg-color);
  border-bottom: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.nav-right {
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--text-dark);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.logo {
  flex: 0 0 auto;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  text-transform: lowercase;
  text-align: center;
}

.logo img {
  height: 60px;
  max-height: 8vh;
  width: auto;
  display: block;
}

.nav-icon {
  position: relative;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.nav-icon:hover {
  opacity: 0.6;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--text-dark);
  color: var(--text-light);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.btn-primary:hover {
  background-color: #3b454a;
}

.btn-secondary {
  background-color: var(--bg-color);
  color: var(--text-dark);
  border-color: var(--primary-color);
}

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

.btn-white {
  background-color: var(--bg-color);
  color: var(--text-dark);
}

.btn-white:hover {
  background-color: #f0f0f0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 4rem 5%;
  background: url('../img/hero-bg.jpg') center/cover no-repeat;
  color: var(--text-light);
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 50%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Horizontal Scroll / Carousel Section */
.section {
  padding: 5rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding: 0 4%;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Carousel/Grid for products */
.product-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 2rem;
  padding-left: 4%;
  padding-right: 4%;
  scrollbar-width: none; /* Firefox */
}
.product-carousel::-webkit-scrollbar {
  display: none; /* Chrome */
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  padding: 0 4%;
}

@media (max-width: 500px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding: 0 5%;
  }
}

.product-card {
  flex: 0 0 38vw; /* Takes up massive space like Allbirds */
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

@media (max-width: 900px) {
  .product-card {
    flex: 0 0 75vw;
  }
}

@media (min-width: 1400px) {
  .product-card {
    flex: 0 0 28vw;
  }
}

.product-img-wrapper {
  background-color: var(--secondary-color);
  position: relative;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 16px; /* Added rounded corners */
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.1rem;
}

.product-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 500;
}

.product-category {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Feature Block */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.feature-img {
  background: url('../img/feature.jpg') center/cover;
}

.feature-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 8%;
  background-color: var(--secondary-color);
}

.feature-text h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.feature-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 4rem 5% 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

.footer-newsletter h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-newsletter p {
  margin-bottom: 1.5rem;
  color: #ccc;
}

.newsletter-form {
  display: flex;
  border-bottom: 2px solid var(--text-light);
  padding-bottom: 5px;
}

.newsletter-form input {
  background: transparent;
  border: none;
  color: var(--text-light);
  flex-grow: 1;
  font-size: 1rem;
  outline: none;
}
.newsletter-form input::placeholder {
  color: #999;
}
.newsletter-form button {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 1px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  color: #ccc;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--text-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  color: #ccc;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-only-link { display: none; }

@media (max-width: 850px) {
  .mobile-only-link { display: block; }
  .nav-right .nav-links { display: none !important; }
  
  .nav-left .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 1px solid var(--border-color);
  }
  
  .nav-left .nav-links.active {
    display: flex;
  }
  
  .menu-toggle { display: block; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-buttons { flex-direction: column; }
  .feature-split { grid-template-columns: 1fr; }
  .feature-img { height: 400px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; }
}

/* Floating Buttons Stack */
.floating-buttons {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

.whatsapp-float, .scroll-top-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s, background-color 0.2s;
  cursor: pointer;
  border: none;
  outline: none;
  color: #FFF;
}

.whatsapp-float {
  background-color: #25d366;
}

.scroll-top-btn {
  background-color: var(--primary-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
}

/* State when scrolled past threshold */
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.whatsapp-float:hover, .scroll-top-btn.visible:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Fluid Scroll Animations (Intersection Observer Targets) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger grid items gracefully if they appear together */
.product-card.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.product-card.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.product-card.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.product-card.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }

/* Dynamic Responsive Store Category Sub-Navigation */
.store-filters {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-link {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  position: relative;
  transition: color 0.2s;
}

.filter-link:hover { color: var(--text-dark); }
.filter-link.active { color: var(--text-dark); }
.filter-link.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -18px; /* Offset roughly onto the container's bottom border */
  left: 0;
  background-color: var(--text-dark);
}

@media (max-width: 768px) {
  .store-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.5rem;
    padding-left: 5%;
    padding-right: 5%;
    width: 100vw;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .store-filters::-webkit-scrollbar { display: none; }
  .filter-link { white-space: nowrap; flex-shrink: 0; }
}
