/* ==========================================================================
   C-Sky Photonic - STYLESHEET
   Theme: #008080 (Teal) Navbar, Sidebar & Footer | White Background & Text
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL VARIABLES & RESET
   -------------------------------------------------------------------------- */
:root {
  /* Strict Equation: Header Height = Sidebar Width = Footer Height (20% of page) */
  --dimension-size: 20vh;

  /* User Specified Color Scheme */
  --theme-teal: #008080;
  --theme-teal-hover: #006666;
  --bg-page: #ffffff;
  --text-white: #ffffff;
  --text-dark: #1e293b;
  --border-light: #e2e8f0;

  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page); /* White background */
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* --------------------------------------------------------------------------
   2. NAVBAR (#008080 Background, White Text, Full Width, Height = 20vh)
   -------------------------------------------------------------------------- */
.navbar {
  width: 100%;
  height: var(--dimension-size);        /* 20vh */
  background-color: var(--theme-teal);  /* #008080 */
  color: var(--text-white);             /* White text */

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1.5rem;
  flex-shrink: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;   /* <-- add this */
  gap: 1rem;              /* vh for a horizontal gap is unusual, use rem/px instead */
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-white);
  white-space: nowrap;
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-white);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--text-white);
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.search-box {
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  font-size: 0.9rem;
  outline: none;
  min-width: 140px;
  max-width: 200px;
  transition: background-color 0.2s, border-color 0.2s;
}

.search-box::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search-box:focus {
  background: #000000;
  color: var(--text-dark);
  border-color: #000000;
}

/* --------------------------------------------------------------------------
   BURGER BUTTON: Hidden on desktop, visible on mobile (=768px)
   -------------------------------------------------------------------------- */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  color: var(--text-white);
  font-size: 1.5rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
/* --------------------------------------------------------------------------
   3. HERO SECTION & SIDEBAR (#008080 Sidebar, White Background Area)
   -------------------------------------------------------------------------- */
.herosection {
  flex: 1 ;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, var(--dimension-size)) 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "sidebar content";
  overflow: hidden;
  background-color: var(--bg-page);
	
}


/* SIDEBAR: Starts below navbar on the left, Width = 20vh, Background = #008080 */
.sidebar {
  grid-area: sidebar;
  width:20vh;
  min-width: 20vh;
  max-width: var(--dimension-size);

  /* ? Pinned on the left across the 60vh middle area */
  position: sticky;
  top: 0;
  height: calc(100vh - (var(--dimension-size) * 2));
  align-self: start;
  background-color: var(--theme-teal);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.75rem;
  gap: 0.75rem;
  overflow-y: auto;
  z-index: 10;
}

.content {
    

	margin-top:5vh;
	margin-left:5vh;
	margin-right:5vh;
	margin-bottom:5vh;
    	
    
}




.product-category{
	display: grid;
	grid-template-columns: repeat(4,1fr);
	margin-top:5vh;
	width: 100%;
	gap:2.5vh;
	
}

.card{
  height: 200px;
  min-height: 200px;
  max-height: 200px;
  border: 2px solid black;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 150px;
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
    box-sizing: border-box;
    order: 1;
}

.product-name {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    width: 100%;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    box-sizing: border-box;
    padding: 4px;
    border-top: 2px solid black;
    font-weight: 600;
    order: 2;
    position: static;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   NEATLY ARRANGED & ALIGNED FOOTER
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   FOOTER (NO SCROLLBAR)
   -------------------------------------------------------------------------- */
.footer {
  width: 100%;
  min-height: var(--dimension-size);    /* At least 20vh */
  flex: 0 0 auto;

  background-color: var(--theme-teal);  /* #008080 */
  color: var(--text-white);             /* White text */
  box-sizing: border-box;

  /* 5 Equal Columns */
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.75rem;

  padding: 1.5rem 2.5rem;
  align-items: start;
  align-content: center;

  overflow: hidden;
  z-index: 20;
}

/* ?? 2. Chrome, Safari, and Opera: hides scrollbar */
.footer::-webkit-scrollbar {
  display: none;
}

/* Each Column */
.footer div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  align-items: flex-start;
}

/* Column Headings */
.footer h4 {
  color: var(--text-white);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  padding-bottom: 0.2rem;
 
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Links */
.footer a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer a:hover {
  color: var(--text-white);
  text-decoration: none;
  transform: translateX(3px);
}

/* Contact Details */
.footer p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.76rem;
  line-height: 1.3;
  word-break: break-word;
}
/* --------------------------------------------------------------------------
   5. RESPONSIVE
   -------------------------------------------------------------------------- */

/* -- Tablet (= 1024px) -- */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.85rem;
  }
  .footer {
    grid-template-columns: repeat(3, 1fr);
    height: auto;
    min-height: var(--dimension-size);
    max-height: none;
  }
}

/* -- Mobile (= 768px) -- */
@media (max-width: 768px) {
  :root {
    --dimension-size: clamp(65px, 12vh, 85px);
  }

  body {
    height: auto;
    overflow-y: auto;
  }

  /* -- Navbar: row layout with burger -- */
  .navbar {
    height: auto;
    min-height: var(--dimension-size);
    padding: 0.8rem 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Show burger button */
  .mobile-toggle-btn {
    display: block;
    order: 2;
    margin-left: auto;
  }

  .logo {
    order: 1;
  }

  .search-box {
    order: 4;
    width: 100%;
    max-width: none;
  }

  /* Nav links: hidden by default, shown on .open */
  .nav-links {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    background-color: var(--theme-teal-hover);
    border-radius: 8px;
    overflow: hidden;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    flex-shrink: 0;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* -- Herosection stacks vertically -- */
  .herosection {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: visible;
  }

  /* Sidebar ? horizontal scroll bar */
  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar a {
    flex: 1 0 auto;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }

  /* Content wrapper: no scroll lock on mobile, flows normally */
  .content {
    overflow-y: visible;
  }
@media (max-width: 900px) {
    .product-category {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Mobile */
@media (max-width: 600px) {
    .product-category {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "address"
      "map";
  }

  @media (max-width: 768px) {
  .map {
    height: clamp(180px, 30vh, 300px);
  }
}

  .category {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
    gap: 0.75rem;
  }

  /* -- Footer stacks cleanly -- */
  .footer {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 20vh;
    max-height: none;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    text-align: center;
  }

  .footer div {
    align-items: center;
  }
}}

/* Requested product card sizing: 200px total = 150px image + 50px name. */
.product-category .card {
  height: 200px;
  grid-template-rows: 150px 50px;
}
.product-category .card .product-image {
  height: 150px;
  padding: 10px;
  box-sizing: border-box;
}
.product-category .card .product-name {
  height: 50px;
  min-height: 50px;
  padding: 10px;
  box-sizing: border-box;
  visibility: visible;
  opacity: 1;
}
.content {
  overflow-y: scroll;
  min-height: 0;
}

/* FINAL CARD LAYOUT LOCK: image 150px first, product name 50px below.
   This is intentionally last to defeat legacy/duplicate card rules. */
.product-category > .card,
.product-category > .dynamic-product-card {
  display: flex !important;
  flex-direction: column !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.product-category > .card > .product-card-link,
.product-category > .dynamic-product-card > .product-card-link {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.product-category > .card > .product-card-link > .product-image,
.product-category > .dynamic-product-card > .product-card-link > .product-image,
.product-category > .card > .product-image,
.product-category > .dynamic-product-card > .product-image {
  order: 1 !important;
  flex: 0 0 150px !important;
  width: 100% !important;
  height: 150px !important;
  min-height: 150px !important;
  max-height: 150px !important;
  position: static !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.product-category > .card > .product-card-link > .product-name,
.product-category > .dynamic-product-card > .product-card-link > .product-name,
.product-category > .card > .product-name,
.product-category > .dynamic-product-card > .product-name {
  order: 2 !important;
  flex: 0 0 50px !important;
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  transform: none !important;
}
.product-category > .card > .product-card-link > .product-name a,
.product-category > .card > .product-card-link > .product-name span,
.product-category > .dynamic-product-card > .product-card-link > .product-name a,
.product-category > .dynamic-product-card > .product-card-link > .product-name span,
.product-category > .card > .product-name a,
.product-category > .card > .product-name span,
.product-category > .dynamic-product-card > .product-name a,
.product-category > .dynamic-product-card > .product-name span {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
