 :root {
            --primary-color: #6c63ff;
            --text-dark: #2d3436;
            --text-light: #636e72;
            --bg-color: #f9f9fb;
            --card-bg: #ffffff;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--bg-color);
            margin: 0;
            padding: 0;
            color: var(--text-dark);
        }

        /* HEADER SECTION */
.header-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

.header-section picture,
.header-section img {
    display: block;
    width: 100%;
}

.header-section img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

/* TEXT OVER IMAGE */
.header-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 20px;
    text-align: center;
    z-index: 2;
}

/* optional dark overlay for readability */
.header-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 1;
}

.header-overlay h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.header-overlay p {
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* MOBILE */
@media (max-width: 768px) {
    .header-section img {
        height: 260px;
    }

    .header-overlay h1 {
        font-size: 1.5rem;
    }

    .header-overlay p {
        font-size: 0.9rem;
    }
}
        /* CARD CONTAINER (RESPONSIVE GRID) */
        .card-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 15px;
            padding: 20px;
            max-width: 1200px;
            margin: 0 auto 100px; /* Space for bottom nav */
        }

        /* PROFESSIONAL CARD */
        .card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: 12px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(0,0,0,0.03);
            position: relative;
            overflow: hidden;
        }

        .card:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 35px rgba(108, 99, 255, 0.15);
        }

        /* PRODUCT IMAGE */
        .card img {
            width: 100%;
            aspect-ratio: 1 / 1; /* Makes it a perfect square */
            object-fit: cover;
            border-radius: 12px;
            margin-bottom: 12px;
            background-color: #f0f0f0;
        }

        /* TEXT INSIDE CARD */
        .card h3 {
            font-size: 1rem;
            font-weight: 600;
            margin: 5px 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--text-dark);
        }

        .card h4 {
            font-size: 1.1rem;
            color: var(--primary-color);
            margin: 5px 0 15px 0;
            font-weight: 700;
        }

        /* BUY NOW BUTTON */
        .buy-btn {
            text-decoration: none;
            background: var(--primary-color);
            color: white;
            text-align: center;
           padding: 5px 10px;
            font-size: 12px;
            border-radius: 10px;
            font-weight: 500;
            transition: 0.3s;
            display: block;
        }

        .buy-btn:hover {
            background: #564dff;
            box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
        }

        /* DESKTOP ADJUSTMENTS */
        @media (min-width: 768px) {
            .header-section h1 { font-size: 3rem; }
            .card-container {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                gap: 30px;
                padding: 40px;
            }
            .card { padding: 15px; }
        }
        

/* 📱 Normal mobile → 2 cards */
@media (min-width: 300px) and (max-width: 768px){
  .card-container{
    grid-template-columns: repeat(2, 1fr);
  }
  .buy-btn{
  padding: 5px 10px;
  font-size: 12px;
}

}

/* 📱 Large mobile → 3 cards */
@media (min-width: 600px) and (max-width: 768px){
  .card-container{
    grid-template-columns: repeat(3, 1fr);
  }
  .buy-btn{
  padding: 5px 10px;
  font-size: 12px;
}

}

   .search-form {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            margin-top: 30px;
        }

        .search-form input {
            width: 320px;
            max-width: 100%;
            padding: 12px 15px;
            border: 1px solid #ccc;
            border-radius: 10px;
            outline: none;
            font-size: 16px;
        }

        .search-form button {
            padding: 12px 20px;
            border: none;
            background: #2563eb;
            color: white;
            border-radius: 10px;
            cursor: pointer;
            font-size: 16px;
        }

        .search-form button:hover {
            background: #1d4ed8;
        }

        .message {
            text-align: center;
            margin-bottom: 20px;
            color: #444;
            font-size: 18px;
        }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--primary);
    text-decoration: none;
    font-weight: 500;

    /* 🔥 Force left alignment */
    justify-content: flex-start;
    margin-top: 15px;


}
