/*
 * ConsoleSniper - index.css
 *
 * This CSS file styles the main index.html page for the ConsoleSniper project.
 * It provides a modern, desktop/tablet layout for the laptop list, brand sidebar, header, and navigation.
 *
 * Key features:
 * - Uses grid and flexbox for layout
 * - Clean, readable, shadowless card design for product cards
 * - Brand sidebar for filtering laptops
 * - Header and navigation styled to match the site branding
 * - All class and id names are referenced by JavaScript for dynamic content injection and filtering
 *
 * Sections below are commented for clarity.
 */



/*
 * Base body styles: font, background, and text color
 */
body {
  background: #ffffff; /* Softer near-white */
  color: #020202;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  position: relative;
}

/* Add top margin to the main content on the About page for better spacing */
.features-grid {
  margin-top: 2.5rem;
}

/* Header, nav, and search bar styles are now in header.css for consistency across all pages. */
/*
 * Main laptop list grid: responsive columns for product cards
 */
#laptop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0 5rem 0;
}
/*
 * Product card for each laptop in the list
 */
.laptop-card {
    background: #ffffff; /* muted surface */
    
    width: 100%;
    max-width: 340px;
    padding: 1rem 1rem 1.2rem 1rem;
    
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-items: center;
    margin: 0 auto 1.2rem auto;
    font-size: 1.05em;
    border: 1px solid #ffffff;
}
.laptop-card:hover { box-shadow: inset 6px 6px 14px #e3e7ec, inset -6px -6px 14px #ffffff; }
/*
 * Wrapper for laptop product image in card
 */
.laptop-image-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
/*
 * Product image in card
 */
.laptop-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    aspect-ratio: 4/3;
    transition: opacity 0.2s;
}
/*
 * Fallback image style for missing product images
 */
.laptop-image-wrapper img.fallback {
    opacity: 0.5;
    filter: grayscale(1) blur(1px);
    background: transparent;
}
/*
 * Product card title (model name)
 */
.laptop-title {
  font-size: 1.05rem;
  font-weight: bold;
  margin: 1rem 0.5rem 0 0.5rem;
  text-align: center;
  color: #27c5a1; /* App green */
  padding: 0.5rem 1rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
/*
 * Product card brand name
 */
.laptop-brand {
    color: #2d3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.01rem;
}
/*
 * Product card short specs summary
 */
.laptop-specs {
    font-size: 0.9rem;
    color: #444;
    margin: 0.5rem 0.5rem 0 0.5rem;
    line-height: 1.5;
}
/*
 * Brand sidebar section (container)
 */
#brand-list-section {
  background: #000000;
  border-radius: 14px;
  padding: 1.2rem 0.7rem 1.2rem 0.7rem;
  margin: 2.5rem 1.5rem 2.5rem 0.5rem;
  min-width: 180px;
  max-width: 220px;
  position: relative;
  overflow: hidden;
}
#brand-list-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(white 1.2px, transparent 1.2px),
    radial-gradient(#fff8 0.8px, transparent 0.8px),
    radial-gradient(#ffe066 1px, transparent 1px),
    radial-gradient(#fff 0.7px, transparent 0.7px);
  background-size:
    80px 80px,
    120px 120px,
    200px 200px,
    40px 40px;
  background-position:
    10px 20px,
    60px 40px,
    120px 80px,
    30px 10px;
  opacity: 0.45;
  /*animation: starfield-move 60s linear infinite; */
}
#brand-list-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1;
  position: relative;
}
#brand-list-section li {
  color: #27c5a1;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1.08em;
  padding: 0.5em 0.7em;
  border-radius: 6px;
  margin-bottom: 0.3em;
  cursor: pointer;
}
#brand-list-section li:hover {
  background: linear-gradient(90deg, #ff8552 0%, #00fff7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* Homepage grid layout: 1 column for brand list, 3 for laptops */
.homepage-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 2.5rem auto 0 auto;
  align-items: flex-start;
}
#brand-list-section {
  grid-column: 1;
  min-width: 180px;
  max-width: 220px;
}
#laptop-list-main {
  grid-column: 2 / span 3;
  width: 100%;
}
#laptop-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.desktop-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
  margin: 2em 0 3em 0;
}

.pagination-btn {
  background: #f7f9fc;
  color: #27c5a1;
  border: 1px solid #e1e7ee;
  border-radius: 14px;
  padding: 0.7em 1.5em;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 6px 6px 12px #d8dde3, -6px -6px 12px #ffffff;
}

.pagination-btn:hover:not(.disabled) {
  color: #ff8552; /* Accent orange on hover */
  box-shadow: inset 5px 5px 10px #e3e7ec, inset -5px -5px 10px #ffffff;
}

.pagination-btn.disabled {
  color: #9aa4b2;
  border-color: #eef2f5;
  box-shadow: none;
  cursor: not-allowed;
}

.pagination-info {
  color: #2d3e50;
  font-size: 1.1em;
  align-self: center;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 992px) {
    .homepage-grid {
        /* Switch to a single column layout for the whole page */
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin-top: 1.5rem;
    }

    #brand-list-section {
        display: block; /* Show the brand sidebar on mobile */
        grid-column: 1 / -1;
        order: 2;
        margin: 2rem auto;
        max-width: 100%;
        min-width: auto;
        padding: 1.2rem 0.7rem;
        background: #0a0e17;
    }

    #brand-list-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    #brand-list-section li {
        flex: 0 1 auto;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    #laptop-list-main {
        grid-column: 1 / -1; /* Main content takes full width */
        order: 1;
    }

    #laptop-list {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 cards per row */
        gap: 1rem;
    }
}
