@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/*
 * File: css/mobile.css
 * Description: Mobile-first styles (default) and utility classes.
 */

/* === General Reset and Global Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-black: #000000;
    --color-dark-gray: #212121;
    --color-white: #FFFFFF;
    --color-very-light-gray: #f0f0f0;
    --color-light-gray: #c7c7c7;
    --color-primary-brown: #cb956d; /* Used for "Why Choose Us" underline */
    --color-cta-header: var(--color-white);
    --color-cta-primary: var(--color-black);
    --color-cta-secondary: var(--color-dark-gray);

    /* Fonts */
    --font-primary: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-primary);
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from mobile menu */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

h1, h2, h3 {
    font-weight: bold;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.8em;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

/* === Utility Flexbox Classes (Applied sitewide) === */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

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

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.gap-20 {
    gap: 20px;
}

.p-y-40 {
    padding: 40px 0;
}

.p-y-60 {
    padding: 60px 0px 0px;
}

/* === Navbar (Mobile) === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: var(--color-dark-gray);
    z-index: 1000;
    padding: 0 5%;
}

.desktop-nav-links {
    display: none; /* Hides the link list by default on mobile screens */
}

/* Logo Styling */
.logo-svg {
    height: 25px; /* Adjust size for mobile navbar height (60px) */
    width: auto;
}

/* Logo Styling */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%; /* Match navbar height */

    /* --- NEW Mobile Centering Styles --- */
    position: absolute; /* 1. Take logo out of the normal flex flow */
    left: 50%; /* 2. Start it at the center (50% from the left) */
    top: 50%; /* To ensure perfect vertical alignment */
    transform: translate(-50%, -50%); /* 3. Shift it back by half its own width to truly center it */
    z-index: 10; 
    /* --- END NEW Styles --- */
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 19px;
    cursor: pointer;
    z-index: 20;

    /* --- NEW Absolute Positioning to move it right --- */
    position: absolute;
    /* Use the same 5% padding as the navbar, but from the right */
    right: 5%; 
    /* Vertically center it: Start at 50% from top, then shift up by half its own height */
    top: 50%; 
    transform: translateY(-50%); 
    /* --- END NEW Styles --- */
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation to X-sign */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === Mobile Sliding Menu === */
.sliding-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 95%;
    height: 130%;
    background-color: var(--color-white);
    z-index: 999;
    padding: 60px 20px 20px;
    transition: right 0.3s ease-out;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.4);
}

.sliding-menu.open {
    right: 0;
}

.sliding-menu ul {
    list-style: none;
}

.sliding-menu ul li {
    padding: 20px 0px 20px 20px;
    border-bottom: 1px solid var(--color-light-gray);
    font-size: 1em;
    color: var(--color-dark-gray);
    font-weight: 500;
}

.sliding-menu ul li:last-child {
    border-bottom: none;
}

.submenu-toggle {
    cursor: pointer;
    font-size: 1.0em;
    float: right;
    transition: transform 0.3s ease;
}

.submenu-toggle.rotated {
    transform: rotate(45deg); /* Animate the '+' to an 'X' or diamond shape */
}

.submenu {
    list-style: none;
    padding-left: 15px;
    max-height: 0;
    overflow: scroll;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--color-very-light-gray);
    border-radius: 10px;
}

.submenu.open {
    max-height: 500px; /* Needs to be large enough to contain all links */
    padding: 10px;
}

.submenu li {
    padding: 8px 0;
    font-size: 0.3em;
    border-bottom: none;
}


/* === Buttons === */
.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid;
    display: inline-block;
    text-align: center;
}

.btn-header {
    background-color: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-white);
}

.btn-header:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-primary {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-black);
}

.btn-secondary {
    background-color: var(--color-light-gray);
    color: var(--color-dark-gray);
    border-color: var(--color-black);
}

.btn-secondary:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* === Homepage Banner (Mobile) === */
.hero-banner {
    height: 100vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px; /* Clearance for fixed navbar */
    
    /* FALLBACK: Load JPEG for older browsers or those that fail to load WebP.
       We assume the image path is correct relative to the CSS file: '../img/banner-bg-mobile.jpg' */
    background: url('../img/banner-bg-mobile.jpg') no-repeat center center/cover;
}

/* WebP Support Check: Overwrite with WebP if the browser supports it */
@supports (background-image: url("data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AA/vhAA")) {
    .hero-banner {
        background-image: url('../img/banner-bg-mobile.webp');
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Slight dark overlay */
    z-index: 1;
}

.hero-content {
    z-index: 2;
    color: var(--color-white);
    max-width: 90%;
}

.hero-content h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    text-transform: uppercase;
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: 1em;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.3s;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}
.hero-cta .btn {
    width: 100%;
    max-width: 250px;
}


/* === Product Categories Section (Updated to Flexbox) === */
.category-grid {
    display: flex; /* Changed from grid to flex */
    flex-wrap: wrap; /* Allows wrapping to 2 items per row */
    justify-content: space-evenly; /* Spreads the two items out, creating the gap */
    
    /* Removed: grid-template-columns: repeat(2, 1fr); */
    /* Removed: gap: 20px; */
    
    margin-top: 30px;
    /* padding: 0 10px; */
}

.category-grid p {
    font-weight: 600;
}

.category-item {
    text-align: center;
    padding: 2%;
    cursor: pointer;
    transition: transform 0.3s ease;
    
    /* Set width for 2 items per row on mobile, leaving space for the gap */
    width: 48%; 
    margin-bottom: 20px; /* Adds vertical space between rows */
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-circle {
    width: 100%; /* Takes up 100% of the parent's width (48% on mobile) */
    height: 0; /* Collapse element height */
    padding-top: 100%; /* Sets height equal to width (responsive square) */
    position: relative;
    border-radius: 50%;
    background-color: var(--color-light-gray);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-circle img {
    /* Center the image absolutely inside the responsive container */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; /* Keeps the image slightly smaller than the circle to maintain padding */
    height: 100%;
    object-fit: contain;
}

.load-more-btn {
    margin-top: 40px;
}

/* === About Text Section === */
.about-text-section {
    background-color: #ffffff;
    opacity: 1;
    background-image:  repeating-radial-gradient( circle at 0 0, transparent 0, #ffffff 12px ), repeating-linear-gradient( #cacaca55, #cacaca );
}

.about-text-section p {
    margin: 40px 0px 15px;
    font-size: 1.1em;
}

.about-text-section .tagline {
    font-style: italic;
    font-weight: 600;
    font-size: 1.2em;
    color: var(--color-black);
    text-align: center;
    margin-top: 30px;
    padding: 10px;
    display: inline-block;
}

/* === Brands Section === */
.brands-section {
    padding: 50px 0;
}

.brand-logos {
    display: flex;
    flex-direction: column; /* Mobile: One under the other */
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.brand-logos img {
    height: 80px;                   /* consistent logo height */
    width: auto;
    max-width: 80%;                 /* maintain aspect ratio */
    object-fit: contain;            /* prevent distortion */
    transition: transform 0.3s ease;
}
.brand-logos img:hover {
    transform: scale(1.15);
}

/* === Why Choose Us Section === */
.why-choose-us-section {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    padding: 50px 0;
}

.why-choose-us-section h2 {
    font-size: 1.8em;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.why-choose-us-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary-brown);
}

.why-choose-us-section .subtitle {
    margin-top: 10px;
    font-size: 1em;
    opacity: 0.8;
}

.why-points-grid {
    display: flex;
    flex-direction: column; /* Mobile: One below the other */
    gap: 30px;
    margin-top: 30px;
}

.why-point-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.why-point-icon {
    font-size: 2em;
    color: var(--color-primary-brown);
    flex-shrink: 0;
}

.why-point-content h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.why-point-content p {
    font-size: 0.9em;
    opacity: 0.8;
}


/* === Closing CTA Banner === */
.closing-cta-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--color-white);
}

.closing-cta-section h2 {
    font-size: 2em;
    color: var(--color-black);
    margin-bottom: 10px;
}

.closing-cta-section .subtext {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--color-dark-gray);
}

.closing-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.closing-cta-buttons .btn {
    width: 100%;
    max-width: 250px;
}

/* === Footer === */
.footer {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    padding: 40px 0 10px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-contact {
    font-size: 0.9em;
    line-height: 1.8;
}

.footer-logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--color-white);
    margin-bottom: 10px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.5em;
    color: var(--color-white);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--color-primary-brown);
}

.footer-links h4 {
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
    line-height: 2.2;
}

.footer-links a:hover {
    text-decoration: underline;
    color: var(--color-primary-brown);
}

.footer-copyright {
    padding-top: 15px;
    font-size: 0.8em;
    text-align: center;
    opacity: 0.7;
}


/* === Keyframe Animations === */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}