html, body {
  max-width: 100%;
  overflow-x: hidden;
}

        
:root{
    --light-lavender: #f8f5ff;
    --deep-indigo: #4b0082;
    --royal-purple: #6a0dad;
    --soft-violet: #9370db;
    --lavender: #e6e6fa;
    --light-lavender: #f8f5ff;
    --orchid: #da70d6;
    --dark-orchid: #9932cc;
    --blue-violet: #8a2be2;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin-left: 20px;
            position: relative;
            background-color: var(--lavender);
        }

.container {
  margin: 0 auto;
  min-height: 100vh;
}

 .content-wrapper {
    flex: 1;
    padding: 25px;
    margin-left: 240px; /* Space for sidebar/navbar */
    box-sizing: border-box;
}

header {
  background-color: #8a2be2; /* or your gradient */
  padding: 3rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.2);
  width: 100%;
  margin: 0 auto;
  margin-top: -10px;
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0 auto;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
  text-align: center;
}


        .flash-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 20px;
        }

        .product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(75, 0, 130, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 320px;
    text-align: center;
    animation: fadeIn 0.5s ease forwards;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(75, 0, 130, 0.15);
}

.product-card a {
    text-decoration: none;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    background-color: var(--light-lavender);
    border-bottom: 1px solid var(--lavender);
    position: relative;
    left: -2px;
}

.product-card h4 {
    margin: 0.5rem 0 0.3rem;
    padding: 0 1rem;
}

.product-card p {
    color: var(--blue-violet);
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0.2rem 0;
    padding: 0 1rem;
}

.stock-indicator {
    display: inline-block;
    margin: 0.4rem auto 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    width: fit-content;
}

.no-products {
 font-size: 1.1rem;
 color: #777;
}
/* ✅ Tablets (screen width ≤ 992px) */
@media (max-width: 992px) {
  body {
    margin-left: 0;
    padding: 0;
    overflow-x: hidden; /* ✅ Prevent scroll */
  }

  .container {
    padding: 0;
    overflow-x: hidden; /* ✅ Safety */
  }

  .content-wrapper {
    margin-left: 0;
    padding: 1rem;
  }

  header {
    width: 100%; /* ✅ Use % instead of 100vw to avoid scrollbar pushing layout */
    margin: 0;
    padding: 2.5rem 0;
    position: relative;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }

  header h1 {
    font-size: 1.7rem;
  }

  .flash-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ✅ Mobile phones (screen width ≤ 600px) */
@media (max-width: 600px) {
  .container {
    padding: 0;
    overflow-x: hidden; /* ✅ Extra safety */
  }

  header {
    width: 100%;
    padding: 2rem 0;
  }

  header h1 {
    font-size: 1.4rem;
  }

  .product-card {
    height: auto;
    padding-bottom: 1rem;
  }

  .product-card img {
    height: 150px;
    padding: 0.8rem;
  }

  .product-card h4,
  .product-card p {
    font-size: 1rem;
  }

  .stock-indicator {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .flash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  header {
    width: 100% !important;
    right: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .flash-grid {
    overflow-x: hidden;
  }

  .product-card img {
    left: 0 !important; /* Fix leftover image offset */
  }
}

/* Global fix */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
