/*! 
 * Home Page Styles
 * Component: Homepage sections (Hero, Features, Categories, Newsletter)
 * Performance optimized with mobile-first approach
 */

/* ==========================================================================
   LINK WRAPPERS FOR CLICKABLE SECTIONS
   ========================================================================== */

.hero-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}

.hero-link:hover,
.hero-link:focus,
.hero-link:active {
  text-decoration: none !important;
}

.categories__item-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.categories__item-link:hover,
.categories__item-link:focus,
.categories__item-link:active {
  transform: translateY(-4px);
  text-decoration: none !important;
}

.product-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}

.product-card-link:hover,
.product-card-link:focus,
.product-card-link:active {
  text-decoration: none !important;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.hero__container {
  position: relative;
  z-index: 3;
  max-width: var(--container-max-width);
  width: 100%;
  padding: 0 var(--spacing-lg);
  margin: 0 auto;
}

.hero__content {
  text-align: center;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__title {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.hero__description {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-white);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.hero__actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.hero__cta {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 160px;
}

.hero__cta--primary {
  background-color: var(--color-nava-dark);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 24px;
  text-shadow: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero__cta--primary:hover {
  background-color: var(--color-nava-pressed, var(--color-nava-dark));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero__cta--secondary {
  background-color: var(--color-white);
  color: var(--color-nava);
  border: 2px solid var(--color-nava);
}

.hero__cta--secondary:hover {
  background-color: var(--color-nava);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 181, 180, 0.2);
}

.hero__image-wrapper {
  width: 100%;
  max-width: 600px;
  height: auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile: 320px - 767px */
@media (max-width: 767px) {
  .hero {
    height: 60vh;
    min-height: 400px;
  }

  .hero__title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
  }

  .hero__description {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
  }

  .hero__cta--primary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .hero__title {
    font-size: 3rem;
  }

  .hero__description {
    font-size: 1.2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero__container {
    padding: 0 var(--spacing-xl);
  }

  .hero__content {
    /* flex-direction: row; */
    /* gap: var(--spacing-3xl); */
    align-items: center;
  }

  .hero__text {
    text-align: left;
  }

  .hero__description {
    margin-left: 0;
    margin-right: 0;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__image-wrapper {
    max-width: 50%;
  }
}

/* ==========================================================================
   BEST SELLERS SECTION
   ========================================================================== */

.best-sellers {
  width: 100%;
  padding: var(--spacing-3xl) 0;
  background-color: var(--color-white);
}

.best-sellers__container {
  max-width: 1400px;
  width: 100%;
  padding: 0 var(--spacing-lg);
  margin: 0 auto;
}

/* Use collections grid for bestsellers */
.best-sellers .category-page__products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin: 0 auto 24px;
  max-width: 1150px;
}

@media (max-width: 1024px) {
  .best-sellers .category-page__products {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .best-sellers .category-page__products {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.best-sellers__header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 120px 0 120px;
  position: relative;
}

.best-sellers__heading {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  color: #000;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.best-sellers__view-all {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-gray);
  text-decoration: none;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 500;
  transition: color 0.2s ease;
  position: absolute;
  right: 0;
}

.best-sellers__view-all:hover {
  color: var(--color-nava);
}

.best-sellers__carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.best-sellers__nav {
  background: none;
  border: none;
  width: 80px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-gray);
  flex-shrink: 0;
}

.best-sellers__nav:hover {
  color: var(--color-nava);
  background-color: rgba(125, 154, 76, 0.1);
}

.best-sellers__products {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  justify-content: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.best-sellers__products::-webkit-scrollbar {
  display: none;
}

.best-sellers__product {
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  width: 264px;
  border: 1px solid #f0f0f0;
}

.best-sellers__product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.best-sellers__product-image {
  position: relative;
  width: 264px;
  height: 271px;
  flex-shrink: 0;
  border-radius: 8px 8px 0 0;
  background: lightgray 50% / cover no-repeat;
  overflow: hidden;
}

.best-sellers__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.best-sellers__wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-gray);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.best-sellers__wishlist:hover {
  background: var(--color-white);
  color: var(--color-nava);
  transform: scale(1.1);
}

.best-sellers__wishlist--active {
  color: var(--color-nava);
  background: var(--color-white);
}

.best-sellers__product-info {
  /* padding: 15px; */
  text-align: center;
}

.best-sellers__brand {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  color: #4A90E2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.best-sellers__product-title {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-black);
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.best-sellers__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.best-sellers__current-price {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
}

.best-sellers__old-price {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

.best-sellers__add-to-cart {
  width: 100%;
  background-color: var(--color-nava-dark);
  color: var(--color-white);
  border: none;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.best-sellers__add-to-cart:hover {
  background-color: var(--color-nava-active);
  transform: translateY(-1px);
}

/* Mobile: 320px - 767px */
@media (max-width: 767px) {
  .best-sellers__header {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 30px 0 30px;
  }

  .best-sellers__view-all {
    position: static;
    margin-top: var(--spacing-sm);
  }

  .best-sellers__heading {
    font-size: 1.5rem;
  }

  .best-sellers__carousel {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .best-sellers__nav {
    display: none;
  }

  .best-sellers__products {
    gap: var(--spacing-md);
  }

  .best-sellers__product {
    width: 240px;
  }

  .best-sellers__product-image {
    width: 240px;
    height: 200px;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .best-sellers__heading {
    font-size: 1.75rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .best-sellers__container {
    padding: 0 var(--spacing-xl);
    max-width: 1400px;
  }

  .best-sellers__heading {
    font-size: 2rem;
  }

  .best-sellers__products {
    max-width: 1400px;
    padding: 0 40px;
  }

  .best-sellers__product {
    width: 264px;
    flex-shrink: 0;
  }

  .best-sellers__product-image {
    width: 264px;
    height: 271px;
  }
}

/* Large Desktop - Ensure all 4 products fit */
@media (min-width: 1200px) {
  .best-sellers__container {
    max-width: 1400px;
  }

  .best-sellers__products {
    max-width: 1400px;
    padding: 0 60px;
    justify-content: center;
  }

  .best-sellers__carousel {
    max-width: 1400px;
  }
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */

.categories {
  width: 100%;
  padding: 80px 0; /* Explicit padding for consistent gap above footer */
  background-color: var(--color-gray-light);
}

.categories__container {
  max-width: var(--container-max-width);
  width: 100%;
  padding: 0 var(--spacing-lg);
  margin: 0 auto;
}

.categories__heading {
  font-family: var(--font-bold);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--color-black);
  margin-bottom: var(--spacing-2xl);
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.categories__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.categories__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.categories__image-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 8px;
}

.categories__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.categories__item:hover .categories__image {
  transform: scale(1.05);
}

.categories__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: 439px;
  padding: 115px 0 115px 65px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex: 1 0 0;
  border-radius: 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.20) 100%);
}

.categories__title {
  color: var(--white, #FFF);
  font-family: var(--font-primary);
  font-size: 32px;
  font-style: normal;
  font-weight: 600;
  line-height: 50px;
  letter-spacing: 1px;
  margin: 0 0 var(--spacing-md) 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.categories__shop-btn {
  display: inline-flex;
  height: auto;
  padding: 12px 32px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: var(--color-nava-dark);
  color: var(--color-white);
  border: none;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.categories__shop-btn:hover {
  background-color: var(--color-nava-active);
  transform: translateY(-2px);
}

.categories__cta {
  text-align: center;
  margin-top: var(--spacing-2xl);
}

.categories__button {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-2xl);
  background-color: var(--color-nava);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.categories__button:hover {
  background-color: var(--color-nava-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(125, 154, 76, 0.3);
}

/* Mobile: 320px - 767px */
@media (max-width: 767px) {
  .categories__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .categories__image-wrapper {
    height: 280px;
  }
  
  .categories__overlay {
    padding: 40px 20px;
  }
  
  .categories__title {
    font-size: 24px;
    line-height: 32px;
  }

  .categories__shop-btn {
    font-size: 0.875rem;
    padding: 10px 24px;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .categories__image-wrapper {
    height: 320px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .categories__container {
    padding: 0 var(--spacing-xl);
  }

  .categories__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .categories__image-wrapper {
    height: 380px;
  }
}

/* ==========================================================================
   NEWSLETTER SECTION
   ========================================================================== */

.newsletter {
  width: 100%;
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(135deg, var(--color-nava) 0%, var(--color-nava-dark) 100%);
  color: var(--color-white);
}

.newsletter__container {
  max-width: 800px;
  width: 100%;
  padding: 0 var(--spacing-lg);
  margin: 0 auto;
  text-align: center;
}

.newsletter__content {
  margin-bottom: var(--spacing-xl);
}

.newsletter__heading {
  font-family: var(--font-bold);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

.newsletter__description {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, 0.9);
}

.newsletter__form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter__input-wrapper {
  display: flex;
  gap: var(--spacing-sm);
  flex-direction: column;
}

.newsletter__input {
  flex: 1;
  padding: var(--spacing-md);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: all 0.3s ease;
}

.newsletter__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter__input:focus {
  outline: none;
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.2);
}

.newsletter__button {
  padding: var(--spacing-md) var(--spacing-xl);
  background-color: var(--color-white);
  color: var(--color-nava);
  border: none;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.newsletter__button:hover {
  background-color: var(--color-black);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.newsletter__button:active {
  transform: translateY(0);
}

.newsletter__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
  .newsletter__heading {
    font-size: var(--font-size-3xl);
  }

  .newsletter__description {
    font-size: var(--font-size-lg);
  }

  .newsletter__input-wrapper {
    flex-direction: row;
  }

  .newsletter__button {
    width: auto;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .newsletter__container {
    padding: 0 var(--spacing-xl);
  }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* Prevent layout shift for images */
.hero__image,
.categories__image {
  content-visibility: auto;
}

/* Hardware acceleration for animations */
.hero__cta,
.features__item,
.categories__item,
.newsletter__button {
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .hero__cta,
  .features__item,
  .categories__item,
  .categories__image,
  .newsletter__button {
    transition: none;
  }

  .features__item:hover,
  .categories__item:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .hero__actions,
  .newsletter {
    display: none;
  }

  .hero,
  .features,
  .categories {
    page-break-inside: avoid;
  }
}

