/* ===========================
   Am Swachh - Cleaned CSS
   Option B — same structure, cleaned & responsive
   Hero image: "images/hero image.jpeg"
   Sticky navbar only on desktop (>=769px)
   =========================== */

/* ---------- Global ---------- */
:root {
    --brand-blue: #0054a6;
    --brand-blue-dark: #003d78;
    --accent-red: #ff3b3b;
    --muted-bg: #f7f9fc;
    --soft-bg: #eef3ff;
    --text: #222;
    --white: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background: var(--white);
}

/* ---------- Header / Navbar ---------- */
/* Default: non-sticky (mobile-first). We'll enable sticky on desktop with min-width query below. */
header {
    position: relative;
    top: 0;
    width: 100%;
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
    z-index: 999;
    gap: 8px;
    height: auto;
    /* allow natural height on mobile */
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    height: 56px;
}

.logo img {
    max-height: 56px;
    width: auto;
    display: block;
}

/* Nav */
nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
    margin-left: 12px;
    padding: 6px 4px;
    font-size: 15px;
}

nav a:hover {
    color: var(--brand-blue-dark);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 28px 20px;
    background: linear-gradient(rgba(0, 85, 148, 0.55), rgba(0, 85, 148, 0.55)),
        url("images/hero image.jpeg");
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.05;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    background: var(--white);
    color: var(--brand-blue);
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
}

.btn:hover {
    background: #e7e7e7;
}

/* ---------- Scrolling featured images ---------- */
.scrolling-section {
    text-align: center;
    padding: 44px 12px;
    background: var(--muted-bg);
}

.scroll-container {
    overflow: hidden;
    margin-top: 24px;
}

.scroll-track {
    display: flex;
    gap: 20px;
    animation: scroll 18s linear infinite;
}

.scroll-track img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    flex: 0 0 auto;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ---------- Products (home + products page) ---------- */
.products {
    text-align: center;
    padding: 50px 20px;
}

.product-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    padding: 18px;
    background: var(--white);
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.product-card img {
    width: 100%;
    /* use aspect-ratio for consistent heights while keeping responsive */
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform .3s ease;
}

.product-card:hover img {
    transform: scale(1.03);
}

.product-card h3 {
    margin: 12px 0 6px;
    color: var(--brand-blue);
}

.product-card p {
    color: #444;
    margin-bottom: 12px;
}

.cart-btn,
.buy-btn {
    display: inline-block;
    padding: 10px 16px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    margin: 6px 6px 0 0;
}

.cart-btn {
    background: var(--brand-blue);
    color: var(--white);
}

.cart-btn:hover {
    background: var(--brand-blue-dark);
}

.buy-btn {
    background: red;
    color: var(--white);
}

.buy-btn:hover {
    background: #d93636;
}

/* Products page specific */
.products-page-header {
    text-align: center;
    padding: 48px 18px 18px;
    background: var(--muted-bg);
}

.products-page-header h1 {
    font-size: 34px;
    color: var(--brand-blue);
    margin-bottom: 8px;
}

.products-page-header p {
    color: #444;
    font-size: 16px
}

/* Back button */
.back-btn-container {
    padding: 18px 20px;
}

.back-btn {
    background: var(--brand-blue);
    color: var(--white);
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.back-btn:hover {
    background: var(--brand-blue-dark);
}

/* ---------- Lab tested strip ---------- */
.lab-strip {
    background: #000;
    color: #fff;
    padding: 12px 8px;
    overflow: hidden;
    white-space: nowrap;
}

.lab-track {
    display: inline-block;
    animation: labscroll 14s linear infinite;
}

.lab-track span {
    padding-right: 40px;
    font-weight: 700;
    font-size: 16px;
}

@keyframes labscroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ---------- Services slider ---------- */
.services {
    padding: 48px 16px;
    text-align: center;
    background: var(--muted-bg);
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
}

.slider {
    display: flex;
    gap: 20px;
    padding: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.service-card {
    flex: 0 0 calc(33.333% - 20px);
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    scroll-snap-align: start;
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Arrows (desktop only) */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-blue);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
}

.left {
    left: 12px;
}

.right {
    right: 12px;
}

.arrow:hover {
    background: var(--brand-blue-dark);
}

/* ---------- Testimonials ---------- */
.testimonials {
    padding: 48px 20px;
    text-align: center;
}

.testimonial-grid {
    margin-top: 20px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonial-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

/* ---------- Contact ---------- */
.contact {
    padding: 48px 20px;
    background: #e5e8ed;
    text-align: center;
}

.contact-form {
    max-width: 560px;
    margin: 18px auto 0;
    text-align: left;
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 15px;
}

.contact-form button {
    background: var(--brand-blue);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
}

.contact-form button:hover {
    background: var(--brand-blue-dark);
}

/* ---------- Footer ---------- */
footer {
    background: var(--brand-blue);
    color: #fff;
    padding: 40px 16px 18px;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-box {
    flex: 1 1 220px;
    min-width: 180px;
}

.footer-box h3 {
    font-size: 18px;
    display: inline-block;
    border-bottom: 2px solid rgba(255, 255, 255, 0.28);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.footer-box a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin: 6px 0;
}

.footer-social {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.footer-social img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    transition: transform .2s;
}

.footer-social img:hover {
    transform: scale(1.15);
}

.footer-bottom {
    text-align: center;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 14px;
}

/* ---------- Floating buttons ---------- */
.float-whatsapp,
.float-call {
    position: fixed;
    right: 18px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    z-index: 9999;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    display: block;
}

.float-whatsapp {
    bottom: 18px;
}

.float-call {
    bottom: 86px;
}

.float-whatsapp img,
.float-call img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ---------- Small helpers ---------- */
.section {
    padding: 36px 14px;
}

/* ---------- Responsive Rules ---------- */

/* Desktop & large tablets: make header sticky */
@media (min-width: 769px) {
    header {
        position: sticky;
        top: 0;
        height: 64px;
        padding: 12px 28px;
    }

    .logo {
        height: 64px;
    }

    .logo img {
        max-height: 64px;
    }

    /* services show arrows on desktop */
    .arrow {
        display: block;
    }

    /* services cards: 3 in a row */
    .service-card {
        flex: 0 0 calc(33.333% - 20px);
    }

    /* scroll track images larger on desktop */
    .scroll-track img {
        width: 250px;
        height: 250px;
    }
}

/* Medium screens (tablet) */
@media (max-width: 992px) and (min-width: 769px) {
    nav a {
        font-size: 15px;
        margin-left: 12px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .product-card img {
        aspect-ratio: 4 / 3;
    }

    .product-card {
        padding: 16px;
    }

    .service-card img {
        height: 200px;
    }
}

/* Mobile phones */
@media (max-width: 768px) {

    /* Header stacks neatly and nav centers */
    header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
    }

    nav {
        justify-content: center;
        gap: 10px;
        padding-bottom: 6px;
    }

    nav a {
        margin-left: 0;
        margin-right: 6px;
        font-size: 14px;
    }

    /* Logo smaller */
    .logo img {
        max-height: 52px;
    }

    /* Hero smaller, tighter spacing */
    .hero {
        min-height: 48vh;
        padding: 20px 12px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    /* Product grid becomes 1-column */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 20px;
    }

    .product-card img {
        height: auto;
        aspect-ratio: 4/3;
    }

    /* Scrolling images smaller */
    .scroll-track img {
        width: 160px;
        height: 160px;
    }

    /* Services: single card width, arrows hidden (use touch scroll) */
    .service-card {
        flex: 0 0 100%;
    }

    .arrow {
        display: none;
    }

    /* Testimonial single column */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* Contact card spacing */
    .contact {
        padding: 36px 14px;
    }

    .contact-form {
        padding: 18px;
    }

    /* Footer stacks */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }

    .footer-box {
        width: 100%;
    }

    .footer-bottom {
        margin-top: 12px;
        font-size: 13px;
    }

    /* Floating buttons slightly smaller & shifted left */
    .float-whatsapp,
    .float-call {
        width: 48px;
        height: 48px;
        right: 12px;
    }

    .float-call {
        bottom: 76px;
    }

    .float-whatsapp {
        bottom: 18px;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 20px;
    }

    .scroll-track img {
        width: 140px;
        height: 140px;
    }

    .product-card {
        padding: 12px;
    }

    .logo img {
        max-height: 42px;
    }

    nav a {
        font-size: 13px;
        padding: 4px 6px;
    }
}

/* ---------- Products page explicit grid overrides (keeps your original intent) ---------- */
/* Default on products page: 1 column (keeps consistent across mobile) */
.all-products .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 20px;
}

/* Tablet: 2 columns */
@media (min-width: 769px) and (max-width: 992px) {
    .all-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Desktop: 3 columns */
@media (min-width: 993px) {
    .all-products .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

/* Prevent sections from hiding under header on mobile (adds breathing space) */
@media (max-width: 768px) {
    section {
        margin-top: 8px;
    }
}


 
/* Center About Section Heading Properly */
.about h2 {
  text-align: center;
  display: block;           /* full-width */
  width: 100%;              /* ensures it centers everywhere */
  margin: 0 auto 14px auto; /* center margin */
}

/* Make the underline & icon centered properly */
.about h2::after, 
.about h2::before {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: block;
}

/* =====================================
      GLOBAL FOOTER RESPONSIVE DESIGN
      (Same for Home + Product Page)
===================================== */

footer {
    background: #0054a6;
    color: #fff;
    padding: 50px 20px 25px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    text-align: left;
}

.footer-box {
    flex: 1 1 250px;
    min-width: 240px;
}

/* Always center Follow Us section */
.footer-box:nth-child(4) {
    text-align: center;
}

.footer-social {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

/* Tablet */
@media (max-width: 992px) {
    .footer-container {
        justify-content: center;
        text-align: center;
    }
    .footer-box {
        flex: 1 1 45%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    footer {
        padding: 40px 18px 20px;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 22px;
    }
    .footer-box {
        width: 100%;
    }
    .footer-box h3 {
        font-size: 18px;
    }
    .footer-box a {
        font-size: 14px;
    }
    .footer-social img {
        width: 30px;
        height: 30px;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .footer-container {
        gap: 16px;
    }
    .footer-box h3 {
        font-size: 17px;
    }
    .footer-bottom {
        font-size: 13px;
        margin-top: 14px;
    }
}

.contact-box .contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #ccc;
}

.contact-box svg {
    color: #00c853;
    flex-shrink: 0;
}

.contact-box a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.contact-box a:hover {
    color: #000000;
}
