/* Reset and base styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

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

:root {
  /* Color system using HSL values from the design tokens */
  --background: hsl(0, 0%, 99%);
  --foreground: hsl(240, 10%, 3.9%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(240, 10%, 3.9%);
  --primary: #FF6600;
  --primary-foreground: hsl(0, 0%, 98%);
  --secondary: hsl(220, 14.3%, 95.9%);
  --secondary-foreground: hsl(220.9, 39.3%, 11%);
  --muted: hsl(220, 14.3%, 95.9%);
  --muted-foreground: hsl(220, 8.9%, 46.1%);
  --destructive: hsl(0, 84.2%, 60.2%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --border: hsl(220, 13%, 91%);

    --bg-color: #f5f5f5;
    --container-color: #8fd14f;
    --text-color: #141026;
  
  /* Gradients and effects */
  --hero-gradient: linear-gradient(135deg, hsl(262, 83%, 58%), hsl(285, 87%, 66%));
  --card-shadow: 0 4px 6px -1px hsl(220, 43%, 11%, 0.1);
  --card-shadow-hover: 0 10px 25px -3px hsl(220, 43%, 11%, 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    box-shadow: 0 1px 4px hsla(1px, 0%, 98%, 0.1);
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.container {
    max-width: 1068px;
    margin: auto;
    width: 100%;
}

.logo {
    color: var(--primary);
    font-size: 2.1rem;
    font-weight: 700;
    text-decoration: none;
}

#cart-icon {
    position: relative;
    font-size: 2.5rem;
    cursor: pointer;
}

#cart-icon[data-quantity="0"]::after {
    content: '';
}

#cart-icon[data-quantity]::after {
    content: attr(data-quantity);
    position: absolute;
    top: 0;
    right: -12px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Cart */
.cart {
    position: fixed;
    top: 0;
    width: 360px;
    height: 110vh;
    padding: 20px;
    background: var(--text-color);
    box-shadow: -2px 0 4px hsl(0, 45, 15% / 10%);
    transition: 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    right: -100%;
    /* Enable scrolling */
    overflow-y: auto;
    overscroll-behavior: contain; /* Prevents scrolling beyond the cart */
    -ms-overflow-style: auto; /* IE and Edge */
    /* iOS Fix */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS Safari */
    scrollbar-width: none;
}

.cart::-webkit-scrollbar {
    display: none;
}

.cart.active {
    transition: 0.8s cubic-bezier(0.075, 0.82, 0.165, 1);
    right: 0;
}

.cart-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    color: var(--bg-color);
}

.total {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    border-top: 1px solid var(--bg-color);
}

.total-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1rem;
    color: var(--bg-color);
}

.total-price {
    font-size: 1.075rem;
    margin: 1rem 0 0 0.7rem;
    color: var(--bg-color);
}

.btn-buy {
    display: flex;
    justify-content: center;
    margin: 1.5rem auto 0 auto;
    padding: 12px 20px;
    width: 50%;
    text-align: center;
    border: none;
    border-radius: 2rem;
    background: var(--primary);
    color: var(--bg-color);
    font-size: 1rem;
    font-style: italic;
    font-weight: 600;
    cursor: pointer;
}

#close-cart {
    position: absolute;
    top: 1rem;
    right: 0.8rem;
    color: var(--bg-color);
    cursor: pointer;
    font-size: 2rem;
}

.cart-box {
    display: grid;
    grid-template-columns: 32% 50% 18%;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    padding: 10px;
    object-position: center;
}

.detail-box {
    display: grid;
    row-gap: 0, 5rem;
}

.cart-product-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f5f5f5;
}

.cart-price {
    font-weight: 600;
    color: #f5f5f5;
    margin-top: 5px;
}

.cart-quantity {
    border: 1px solid var(--bg-color);
    outline-color: var(--container-color);
    width: 2.8rem;
    text-align: center;
    font-size: 1rem;
    border-radius: 4px;
    margin-top: 10px;
}

.cart-remove {
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

.header {
  border-bottom: 1px solid var(--border);
  background-color: var(--background);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

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

.nav-link {
  text-decoration: none;
  color: var(--foreground);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.icon-btn {
  border: none;
  background: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
  transition: var(--transition-smooth);
}

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

.mobile-menu {
  display: none;
}

/* Hero Section */
.hero {
  position: relative;
  background: var(--hero-gradient);
  color: var(--primary-foreground);
  padding: 5rem 0 8rem;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsla(262, 83%, 58%, 0.1), transparent);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 64rem;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  display: block;
  background: linear-gradient(to right, white, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  text-decoration: none;
  font-size: 0.875rem;
}

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

.btn-primary:hover {
  background-color: hsl(262, 36%, 96%);
  color: var(--primary);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background-color: hsl(262, 36%, 96%);
  color: var(--primary);
}

.btn-category {
  width: 100%;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
}

.btn-category:hover {
  background-color: hsl(262, 36%, 96%);
  color: var(--primary);
}

.btn-cart {
  width: 100%;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
}

.btn-cart:hover {
  background-color: hsl(262, 36%, 96%);
  color: var(--primary);
}

.btn-promo {
  background-color: white;
  color: var(--primary);
  border: 1px solid white;
}

.btn-promo:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.see {
  padding: 8px 10px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition-smooth);
}

/*.see:hover {*/
/*  background-color: hsl(265, 63%, 95%);*/
/*  color: var(--primary);*/
/*}*/

/* Sections */
.categories,
.new-products,
.best-deals {
  padding: 4rem 0;
}

.discounts {
  padding: 4rem 0;
  background-color: hsla(220, 14.3%, 95.9%, 0.3);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 32rem;
  margin: 0 auto;
}

/* Category Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.category-card {
  background-color: var(--card);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition-smooth);
  group: hover;
}

.category-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.category-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.category-card:hover .category-image img {
  transform: scale(1.05);
}

.category-content {
  padding: 1rem;
}

.category-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--card-foreground);
  transition: var(--transition-smooth);
}

.category-card:hover .category-title {
  color: var(--primary);
}

.category-description {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.product-card {
  background-color: var(--card);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
}

.product-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.product-image {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-new {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.badge-discount {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.wishlist-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-smooth);
}

.product-card:hover .wishlist-btn {
  opacity: 1;
}

.wishlist-btn:hover {
  background-color: white;
}

.product-content {
  padding: 1rem;
}

.product-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.product-card:hover .product-title {
  color: var(--primary);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.stars {
  color: #fbbf24;
  font-size: 0.75rem;
}

.reviews {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.price {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--primary);
}

.original-price {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}

/* Promo Section */
.promo {
  padding: 2rem 0;
  background: linear-gradient(to right, hsla(262, 83%, 58%, 0.9), var(--primary));
  color: var(--primary-foreground);
}

.promo-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.promo-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.promo-icon {
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.promo-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.promo-description {
  opacity: 0.9;
}

.promo-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.promo-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer {
  display: flex;
  gap: 0.5rem;
}

.timer-item {
  text-align: center;
}

.timer-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.timer-label {
  font-size: 0.75rem;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 0;
}

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

.footer-brand {
  max-width: 28rem;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.footer-description {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.footer-heading {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--primary-foreground);
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  opacity: 0.6;
}

/* Responsive Design */
@media (min-width: 640px) {

.nav {
        padding: 2px 0;
    }  

    #cart-icon {
            position: relative;
            font-size: 2.5rem;
            cursor: pointer;
            margin-right: 15px;
        }


      .logo {
        margin-left: 10px;
      }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .icon-btn:first-of-type {
    display: block;
  }
}

@media (min-width: 768px) {
 
    
  .nav {
        padding: 2px 0;
    }

    #cart-icon {
            position: relative;
            font-size: 2.5rem;
            cursor: pointer;
            margin-right: 15px;
        }

        .logo {
          margin-left: 10px;
        }

  .container {
    padding: 0 1.5rem;
  }
  
  .nav {
    display: flex;
  }
  
  .mobile-menu {
    display: none;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .section-header {
    text-align: left;
  }
  
  .section-header-row .section-header {
    text-align: left;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .products-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .promo-content {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero {
    padding: 5rem 0 8rem;
  }
  
  .hero-title {
    font-size: 5rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .products-grid-6 {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .categories-grid {
    gap: 2rem;
  }
}

@media (max-width: 767px) {
  
  .nav {
        padding: 2px 0;
    }
  
    #cart-icon {
            position: relative;
            font-size: 2.5rem;
            cursor: pointer;
            margin-right: 15px;
        }

        .logo {
          margin-left: 10px;
        }

  .mobile-menu {
    display: block;
  }
  
  .section-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .promo-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

