
    /* 1. RESET & BASE STYLES */
    *, *::before, *::after { box-sizing: border-box; }
    
    body { 
        padding-top: 10px; 
        background-color: #fff; 
        font-family: system-ui, -apple-system, sans-serif; 
        overflow-x: hidden; 
        margin: 0; 
        color: #333; 
        line-height: 1.4;
    }

    #main-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.container-fluid { 
    width: 100%; 
    max-width: 100% !important; /* Force the container to use the whole screen */
    padding: 0 20px; 
    margin: 0 auto; 
}

/* 2. THE GRID ENGINE */
#results { 
    display: grid !important; /* Forces grid over flex */
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    margin-top: 15px;
    width: 100%; /* Ensures it spans the full container */
}

/* Tablet: 3 Columns */
@media (min-width: 768px) {
    #results { 
        grid-template-columns: repeat(3, 1fr) !important; 
    }
}

/* Desktop: 5 Columns (Triggers earlier now) */
@media (min-width: 992px) {
    #results { 
        grid-template-columns: repeat(5, 1fr) !important; 
        gap: 15px; /* Slightly smaller gap to help fit 5 items */
    }
}

    /* 3. SEARCH HEADER & INPUT */
    .search-container { max-width: 500px; margin: 0 auto 15px auto; padding: 0 15px; text-align: center; }
    .search-header-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .search-header-top img { height: 40px; width: auto; }
    .search-wrapper { position: relative; flex: 1; display: flex; align-items: center; }
    
    #searchBox { 
        width: 100%; 
        border-radius: 2rem; 
        border: 1px solid #ddd; 
        padding: 0.6rem 2.8rem 0.6rem 1.2rem; 
        outline: none; 
        font-size: 16px; /* Prevents iOS auto-zoom */
        transition: border-color 0.2s;
    }
    #searchBox:focus { border-color: #b02a37; }

    .voice-icon { position: absolute; right: 1rem; width: 1.2rem; cursor: pointer; color: #777; display: flex; align-items: center; }
    .voice-icon svg { fill: #777; }

    .search-slogan { font-size: 0.75rem; color: #666; font-weight: 500; margin-top: 5px; }
    .ashley-btn { background: #333; color: #fff; border: none; border-radius: 2rem; padding: 0.4rem 0.8rem; font-size: 0.65rem; font-weight: 800; cursor: pointer; }

    /* 4. CATEGORY ICONS NAV */
    .category-icons { 
        display: flex; 
        justify-content: space-around; 
        align-items: center; 
        margin-bottom: 20px; 
        padding: 10px 0; 
        border-bottom: 1px solid #eee;
    }
    .category-icons a { text-decoration: none; color: #444; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; }
    .category-icons svg { height: 1.2rem; width: auto; margin-bottom: 4px; fill: #444; }
    .category-icons span { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

    /* 5. PRODUCT CARDS */
.card { 
    text-decoration: none; 
    color: inherit;
    border: 1px solid #eee; 
    border-radius: 4px; 
    display: flex; 
    flex-direction: column; 
    background: #fff; 
    transition: transform 0.2s ease;
}

.card:hover { transform: translateY(-3px); border-color: #ccc; }

.card-img-top { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 330 / 206; 
    object-fit: contain; 
    display: block; 
}

.card-body { 
    padding: 8px 10px; 
    display: flex; 
    flex-direction: row;      /* Put brand and price on one line */
    justify-content: space-between; 
    align-items: center;      /* Vertically center them */
    gap: 5px;
}

.brand-text { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: #333;
    text-transform: uppercase;
    white-space: nowrap;      /* Keep on one line */
    overflow: hidden;         /* Hide overflow if name is too long */
    text-overflow: ellipsis;  /* Add ... if name is too long */
}

.price-text { 
    font-size: 0.85rem; 
    font-weight: 800; 
    color: #b02a37; 
    white-space: nowrap; 
}

    /* 6. HEADINGS & SPINNER */
    h1 { font-size: 1.1rem; font-weight: 800; color: #222; margin: 10px 0 15px 0; text-transform: uppercase; }
    
    .spinner { 
        width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top: 3px solid #b02a37; 
        border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; 
    }
    @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

    .btn-dark { 
        background: #222; color: #fff; border: none; border-radius: 50px; 
        padding: 12px 40px; font-weight: bold; cursor: pointer; transition: 0.2s; 
    }
    .btn-dark:hover { background: #000; }

    /* 7. UTILITIES */
    .skip-link { position: absolute; top: -40px; left: 0; background: #000; color: #fff; padding: 8px; z-index: 100; transition: top 0.3s; }
    .skip-link:focus { top: 0; }
