/* =========================================================
   C-Sky Photonic
   ========================================================= */

:root {
    --dimension-size: 20vh;

    --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;
}


/* =========================================================
   RESET
   ========================================================= */

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

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    font-family: var(--font-family);
    background: var(--bg-page);
    color: var(--text-dark);
}

a {
    color: inherit;
    text-decoration: none;
}

.top-bg{
    background-color: teal;
    text-align: center;
    padding:5px;
}

.top-heading{
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    color: black;
    background-color: white;
    margin-left: 25rem;
    margin-right: 25rem;
    border-radius: 20px;
    padding: 5px;
    opacity: 0.7;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    width: 100%;
    height: var(--dimension-size);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1rem;
    background: var(--theme-teal);
    color: var(--text-white);
    flex-shrink: 0;
    z-index: 10;

}


/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;

    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.1em;

    color: var(--text-white);
    white-space: nowrap;
}

.companyname {
    font-size: 1.3rem;
    font-weight: 700;
}


/* Navigation */

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

.nav-links a {
    position: relative;

    padding: 0.25rem 0;

    font-size: 1.3rem;
    font-weight: 600;

    color: var(--text-white);
}


/* Navigation underline */

.nav-links a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 0;
    height: 2px;

    background: var(--text-white);

    transition: width 0.2s ease;
}

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


/* Search */

.search-box {
    min-width: 140px;
    max-width: 200px;

    padding: 0.55rem 1rem;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 9999px;

    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);

    font-size: 0.9rem;
    outline: none;
}

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

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


/* Mobile menu button */

.mobile-toggle-btn {
    display: none;

    padding: 0.3rem 0.6rem;

    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;

    background: none;
    color: var(--text-white);

    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.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: var(--bg-page);
}


/* Sidebar */

.sidebar {
    grid-area: sidebar;
    width: var(--dimension-size);
    min-width: var(--dimension-size);
    max-width: var(--dimension-size);
    height: calc(100vh - (var(--dimension-size) * 2));
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    background: var(--theme-teal);
    color: var(--text-white);
    overflow-y: auto;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* this font size is not taking by thetag in .side bar class */
.sidebar a{
 font-size: 1.3rem;
}

/* Main content */

.content {
    grid-area: content;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================================================
   HERO IMAGE
   ========================================================= */

.heroimage {
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    max-height: 50vh;
    margin: 1vh;
    background: #f1f5f9;
}

.heroimage img {
    display: block;
    width: 100%;
    height: 50vh;
    object-fit: contain;
    object-position: center;
}


/* =========================================================
   CATEGORY
   ========================================================= */

/* .category {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 5vh;

    margin: 0 5vh 5vh;

    justify-items: center;
    align-items: start;

    background: var(--bg-page);

    border-top: 1px solid var(--border-light);

}




.category div {
    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1.5rem;

    background: #f8fafc;
    border: 1px solid var(--theme-teal);

    color: var(--theme-teal);

    text-align: center;

    font-size: clamp(1rem, 2.2vh, 1.25rem);
    font-weight: 800;
    line-height: 1.3;

    cursor: pointer;

   

    transition: 0.25s ease;
}

.category div:hover {
    background: var(--theme-teal);
    color: var(--text-white);

    transform: translateY(-6px) scale(1.02);

    box-shadow: 0 12px 28px rgba(0, 128, 128, 0.28);
} */.category { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 5vh; 
  margin: 0 5vh 5vh; 
  justify-items: center; 
  align-items: start; 
  background: var(--bg-page); 
  border-top: 1px solid var(--border-light); 
}

/* Category boxes */ 
.category div { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 1 / 1; 
  border: 1px solid var(--theme-teal); 
  cursor: pointer; 
  transition: 0.25s ease; 
  overflow: hidden; 
}

/* Target the image tag */
.category div img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; 
  z-index: 1; 
  transition: transform 0.4s ease; 
}

/* Base link setup with dark subtle static gradient mask */
.category div a {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3; /* Kept higher than the hover layer */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  text-align: center; 
  font-size: clamp(1rem, 2.2vh, 1.25rem); 
  font-weight: 800; 
  line-height: 1.3; 
  text-decoration: none;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5)); 
  color: #ffffff; 
  transition: color 0.25s ease;
}

/* New Hover Overlay: Grows from bottom to top */
.category div::before {
  content: '';
  position: absolute;
  bottom: 0; /* Anchors the growth to the bottom edge */
  left: 0;
  width: 100%;
  height: 0%; /* Starts hidden with no height */
  z-index: 2; /* Sits directly between the image and the text */
  /* Gradient goes from low opacity at the top to full opacity at the bottom */
  /* background: linear-gradient(to top, rgba(0, 128, 128, 0.95) 0%, rgba(0, 128, 128, 0.2) 100%); */
   background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgb(255, 255, 255,0.6) 100%);
  transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth "slide up" easing */
}

/* HOVER TRIGGERS */

/* 1. Triggers the teal layer to grow upwards to fill the square */
.category div:hover::before {
  height: 100%;
}

/* 2. Keeps the card zoom physics intact */
.category div:hover { 
  transform: translateY(-6px) scale(1.02); 
  box-shadow: 0 12px 28px rgba(0, 128, 128, 0.28); 
}

/* 3. Subtle background image scale */
.category div:hover img {
  transform: scale(1.05);
}

/* 4. Ensures text color transitions seamlessly on hover if needed */
.category div:hover a {
  color: var(--text-white);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    width: 100%;
    min-height: var(--dimension-size);

    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 1.75rem;

    padding: 1.5rem 2.5rem;

    background: var(--theme-teal);
    color: var(--text-white);

    align-items: start;
    align-content: center;

    overflow: hidden;

    flex-shrink: 0;

    z-index: 20;
}


/* Footer columns */

.footer div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 0.25rem;
}


/* Footer headings */

.footer h4 {
    width: 100%;

    margin-bottom: 0.35rem;
    padding-bottom: 0.2rem;

    color: var(--text-white);

    font-size: 0.85rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.06em;
 text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Footer links */

.footer a {
    display: inline-block;

    color: rgba(255, 255, 255, 0.85);

    font-size: 0.8rem;
    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
 text-decoration: none;
    transition: 0.15s ease;
}

.footer a:hover {
    color: var(--text-white);

     text-decoration: none;

    transform: translateX(3px);
}


/* Footer contact text */

.footer p {
    color: rgba(255, 255, 255, 0.85);

    font-size: 0.76rem;
    line-height: 1.3;

    word-break: break-word;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .footer {
        grid-template-columns: repeat(3, 1fr);
        min-height: var(--dimension-size);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    :root {
        --dimension-size: clamp(65px, 12vh, 85px);
    }

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


    /* Navbar */

    .navbar {
        height: auto;
        min-height: var(--dimension-size);

        padding: 0.8rem 1rem;

        flex-wrap: wrap;
        gap: 0.5rem;
    }


    /* Mobile button */

    .mobile-toggle-btn {
        display: block;

        order: 2;
        margin-left: auto;
    }


    /* Logo */

    .logo {
        order: 1;
    }


    /* Search */

    .search-box {
        order: 4;

        width: 100%;
        max-width: none;
    }


    /* Navigation */

    .nav-links {
        order: 3;

        width: 100%;

        display: none;
        flex-direction: column;

        gap: 0;

        background: var(--theme-teal-hover);

        border-radius: 8px;
        overflow: hidden;
    }

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

    .nav-links a {
        width: 100%;

        padding: 0.7rem 1rem;

        font-size: 0.95rem;

        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

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


    /* Hero section */

    .herosection {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }


    /* Sidebar */

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: auto;

        flex-direction: row;

        padding: 0.6rem 0.8rem;
        gap: 0.5rem;

        overflow-x: auto;

        white-space: nowrap;
    }

    .sidebar a {
        flex: 1 0 auto;

        padding: 0.5rem 0.85rem;

        font-size: 0.8rem;
    }


    /* Content */

    .content {
        overflow-y: visible;
    }


    /* Hero image */

    .heroimage {
        min-height: 200px;
        max-height: 280px;

        margin: 1rem;
    }


    /* Categories */

    .category {
        grid-template-columns: repeat(2, 1fr);

        gap: 0.75rem;

        padding: 1rem;

        margin: 0;
    }


    /* Footer */

    .footer {
        grid-template-columns: 1fr;

        min-height: var(--dimension-size);

        padding: 2rem 1.5rem;

        gap: 1.5rem;

        text-align: center;
    }

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

/* Dynamic home hero product images */
.heroimage {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 50vh;
  max-height: 50vh;
  margin: 1vh;
  overflow: hidden;
  background: #f1f5f9;
}
.heroimage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.2s ease;
}


/* Hero carousel navigation arrows. */
.heroimage .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    background: rgba(0,0,0,.38);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.heroimage .hero-arrow:hover {
    background: rgba(0,0,0,.62);
    transform: translateY(-50%) scale(1.05);
}
.heroimage .hero-arrow-left { left: 18px; }
.heroimage .hero-arrow-right { right: 18px; }
@media (max-width: 600px) {
    .heroimage .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .heroimage .hero-arrow-left { left: 10px; }
    .heroimage .hero-arrow-right { right: 10px; }
}
