/* =========================
   General Reset / Body
========================= */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500&display=swap');

/* Headings use Poppins */
h1, h2, h3, .heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* Body text uses Roboto */
body, p, li, a {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}
button, input[type="button"], input[type="submit"], .btn {
  font-family: 'Roboto', sans-serif;
  font-weight: 400; /* or 400/600 depending on style */
  
}
/* Inputs, including search boxes, use Roboto */
input, textarea, select {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}

/* Optional: placeholder text matches font style */
input::placeholder, textarea::placeholder {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* full viewport height */
  background: #f5f5f5; /* your light grey page background */
  margin: 0;
}



/* Main content should grow to fill space above footer */
main {
  flex: 1;
  /*padding: 2rem;*/
}

/* =========================
   Header
========================= */
#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000;
}
#main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #ccc;
 
}


.header-left .logo {
  font-weight: bold;
  font-size: 1.5rem;
  text-decoration: none;
  color: #333;
}

.header-center button {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid #333;
  cursor: pointer;
  border-radius: 4px;
  height: 36px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right button {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid #333;
  cursor: pointer;
  border-radius: 4px;
  height: 36px;
}

.header-right .contact {
  font-size: 0.9rem;
}

.header-right a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #333;
  border-radius: 4px;
  color: #333;
  cursor: pointer;
}

#desktop-search input {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: none;
  outline: none;
  font-size: 1rem;
}

/* On hover/focus to match button feel */
#desktop-search input:focus {
  border-color: #555;
  background: #f9f9f9;
}



/* =========================
   Panels
========================= */
.side-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 300px;
  max-width: 90%;
  background: #fff;
  
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2000;
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;
}

.left-panel {
  left: 0;
}

.right-panel {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

/* Overlay */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1500;
  display: none;
}

.panel-overlay.active {
  display: block;
}

/* Back button */
.panel-back {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.6rem;
  background: #eee;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

/* Panel list */
.panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.panel-item {
  padding: 0.5rem 0;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

/* Subpanels */
.subpanel {
  transform: translateX(-100%);
}


.side-panel button {
 /* margin: 0 0.5rem;*/
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid #333;
  cursor: pointer;
  border-radius: 4px;
  height: 36px;
}

.panel-button-wide
{
    width: 100%;
}

.side-panel .panel-button-wide-link {
    display: inline-flex;        /* make it behave like a button */
    align-items: center;         /* vertically center text */
    justify-content: center;     /* horizontally center text */
    /*padding: 0.5rem 1rem;*/
    background: none;
    border: 1px solid #333;
    cursor: pointer;
    border-radius: 4px;
    height: 36px;
    text-decoration: none;       /* remove underline */
    color: #333;                 /* text color */
    width: 100%;                 /* wide button */
     font-size: 0.875rem;    /* match your button font size */
    line-height: 1.2;       /* match your button line height */
}


.side-panel .panel-list li a {
  text-decoration: none;   /* remove underline */
  color: #333;             /* normal text color */
  display: block;           /* full clickable area */
 /* padding: 0.5rem 0;        /* optional spacing */
  transition: color 0.2s;   /* subtle hover effect */
}

.side-panel .panel-list li a:hover {
  /*color: #007BFF;            or whatever accent color you like */
  text-decoration: none;     /* still no underline */
}



/* =========================
   Sign In / Sign Up Tabs
========================= */
.tabs {
  display: flex;
  margin-bottom: 1rem;
}

.tab {
  flex: 1;
  padding: 0.5rem;
  cursor: pointer;
  background: #eee;
  border: none;
  text-align: center;
  font-weight: bold;
}

.tab.active {
  background: #333;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tab-content input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.tab-content button {
  padding: 0.5rem;
  border: none;
  background: #333;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
}

/* =========================
   Mobile Bottom Nav
========================= */
#mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  background: #fff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  z-index: 3000;
}

#mobile-nav button {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Mobile Search Bar */
#mobile-search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid #ccc;
  z-index: 4000;
}



/* =========================
   Responsive Layout
========================= */
@media(min-width: 768px) {
  #mobile-nav,
  #mobile-search-bar,
  #mobile-first-panel {
    display: none;
  }
}

/* =========================
   Mobile Adjustments
========================= */
@media (max-width: 767px) {
  .side-panel {
    width: 100%;
    max-width: 100%;
    top: 0;
    bottom: 0;
    padding: 2rem 1rem;
    box-sizing: border-box;
    transition: transform 0.3s ease;
  }

  .left-panel {
    transform: translateX(-100%);
  }

  .right-panel {
    transform: translateX(100%);
  }

  .right-panel .tabs {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .right-panel .tab {
    flex: 1;
    font-size: 1rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
  }

  .right-panel .tab-content input,
  .right-panel .tab-content button {
    width: 100%;
    box-sizing: border-box;
  }

  .side-panel .panel-back {
    width: auto;
    display: inline-block;
  }

  /* Hide desktop buttons in header */
  #main-header .header-center,
  #main-header .header-right button {
    display: none;
  }

  /* Mobile first-level panel */
  #mobile-first-panel {
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: translateX(-100%);
    padding: 2rem 1rem;
    box-sizing: border-box;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    background: #fff;
    z-index: 2000;
  }

  #mobile-first-panel .panel-list {
    padding: 0;
    margin: 0;
  }

  #mobile-first-panel .panel-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
  }
}

/* Default hidden for desktop-only elements */
.desktop-only {
  display: none;
}

/* Default visible for mobile-only elements */
.mobile-only {
  display: inline-block;
}

@media (min-width: 768px) {
  .desktop-only {
    display: block;   /* show search form on desktop */
  }
  #mobile-search-btn {
    display: none;    /* hide search toggle button */
  }
}

/****** FOOTER *********/
/* Footer Styles */
#main-footer {
  background: #fff;
  border-top: 1px solid #ccc;
  padding: 2rem 1rem;
  margin-top: auto; /* pushes footer to bottom */
  font-family: sans-serif;
  color: #333;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 15rem;
}

.footer-top div {
  flex: 1 1 200px;
}

.footer-top h4 {
  margin-bottom: 0.5rem;
}

.footer-top ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-top ul li {
  margin-bottom: 0.3rem;
}

.footer-top ul li a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.footer-top ul li a:hover {
  text-decoration: underline;
}

/* Social Buttons */
.footer-social .social-buttons {
  display: flex;
  gap: 0.5rem;
}

.footer-social .social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #333;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-social .social-btn:hover {
  background: #333;
  color: #fff;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* Responsive */

/* Mobile Footer Adjustments */
@media (max-width: 767px) {
  .footer-top {
    display: flex;
    flex-wrap: wrap; /* allow items to wrap */
    gap: 1rem;       /* spacing between items */
  }

  .footer-top div {
    flex: 1 1 calc(50% - 0.5rem); /* two columns */
    margin-bottom: 1rem;
  }

  .footer-social .social-buttons {
    gap: 0.3rem; /* smaller gap between social icons */
  }
}



/*******************
HOMEPAGE
*************/

section {
  padding: 4rem 1rem;
  text-align: center;
}

/* Alternating backgrounds */
.hero-section { background: #ffffff; }
.featured-products { background: #f1f3f5; }
.about-section { background: #ffffff; }
.cta-section { background: #f1f3f5; }

/* Hero / CTA buttons */
.hero-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.hero-btn:hover {
  background: #555;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-item {
  background: #ffffff;
  padding: 2rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-item img {
  width: 100%;
  /*max-width: 150px;*/
  margin-bottom: 1rem;
}

/* Featured Categories / Product Grid */
.featured-products .product-grid {
  max-width: 50%;    /* middle 75% of the page */
  margin: 0 auto;    /* center horizontally */
}

.featured-products {
  padding: 4rem 1rem;
  text-align: center;
  background: #f1f3f5;
}

.featured-products h2 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Center grid and constrain width to 75% */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 75%;
  margin: 0 auto;
}

.category-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  height: 400px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 16px;
  text-decoration: none;  /* remove underline */
  color: inherit;
}

/* Remove underline on all link states */
.category-item,
.category-item:link,
.category-item:visited,
.category-item:hover,
.category-item:active {
  text-decoration: none;
}

.category-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Text overlay */
.category-text {
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
  z-index: 2;
  pointer-events: none; /* text doesn’t block the link */
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .category-grid {
    max-width: 90%;
    gap: 1rem;
  }
  .category-item {
    width: 140px;
    height: 140px;
  }
  .category-text {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
}



/* Homepage Intro Section */
#homepage-intro {
  padding: 4rem 1rem;
  background-color: #f5f5f5; /* light grey background */
  text-align: center;
}

#homepage-intro .intro-text {
  max-width: 50%;   /* middle 50% of the page */
  margin: 0 auto;   /* center horizontally */
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  #homepage-intro .intro-text {
    max-width: 90%;  /* almost full width on mobile */
    font-size: 1rem; /* slightly smaller font for small screens */
  }
}

/* =========================
   Hero Section
========================= */
/* Hero Banner Styling */
.hero-banner {
  position: relative;
  
  height: 40vh; /* 40% of viewport height */
  max-height: 400px; /* optional cap */
  min-height: 180px; /* ensure readability on small screens */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
}


/* Optional dark overlay for text readability */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-banner {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    height: 180px;
  }
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}
