* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #1a5f7a;
    --secondary: #57cc99;
    --accent: #ff9a3c;
    --light: #f8f9fa;
    --dark: #343a40;
}

body {
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.logo-text h1 {
    font-size: 1.8rem;
    color: var(--primary);
}

.logo-text p {
    font-size: 0.9rem;
    color: #666;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

nav a:hover {
    color: var(--primary);
}

nav a.active {
    color: var(--primary);
}

nav a.active:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    bottom: -5px;
    left: 0;
}

/* Hamburger Button - Base (hidden on desktop) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    transition: background 0.2s ease;
    z-index: 3000;
    position: relative;
}

.mobile-menu-btn:hover {
    background: rgba(26, 95, 122, 0.08);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('cover.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    height: 500px;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #ff7b00;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Product Gallery Styles */
.gallery-section {
    padding: 60px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary);
    font-size: 2.5rem;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: var(--secondary);
    color: white;
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Random Image Grid Layout */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 200px;
    grid-gap: 20px;
    grid-auto-flow: dense;
}

.image-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    /* Ensures the image doesn't spill out when zoomed */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.image-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Random sizes using grid-row spans */
.image-item:nth-child(3n) {
    grid-row: span 2;
}

.image-item:nth-child(5n) {
    grid-column: span 2;
}

.image-item:nth-child(7n) {
    grid-row: span 3;
}

.image-item:nth-child(11n) {
    grid-column: span 1;
    grid-row: span 2;
}

.image-item img {
    width: 100%;
    height: 100%;
    /* 'cover' ensures the image fills the box, 'center' keeps the focal point */
    object-fit: cover;
    object-position: center;

    /* Remove background and padding to eliminate white space */
    background-color: transparent;
    padding: 0;

    /* Keep your existing transition */
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 25px 20px 15px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.image-item:hover .image-overlay {
    transform: translateY(0);
    opacity: 1;
}

.image-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.image-overlay .price {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.image-overlay .category-tag {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Product Detail Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .product-modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-modal:hover {
    background: var(--primary);
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px 0 0 15px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures the modal shows the whole product */
    background-color: white;
}

.modal-details {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-details h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 2rem;
}

.modal-price {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-description {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.8;
}

.product-features {
    margin: 20px 0;
    padding-left: 20px;
}

.product-features li {
    margin-bottom: 8px;
    color: #555;
}

/* Contact Section */
.contact-section {
    background-color: white;
    padding: 60px 0;
    margin-top: 40px;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.contact-details {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-icon {
    background-color: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    nav ul {
        gap: 15px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .modal-content {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 300px;
        border-radius: 15px 15px 0 0;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    nav {
        display: none;
        /* Handled by overlay system */
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-auto-rows: 220px;
    }
}

@media (max-width: 576px) {
    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-item:nth-child(5n) {
        grid-column: span 1;
    }

    .category-filter {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* =========================================
   MOBILE & RESPONSIVE IMPROVEMENTS
   ========================================= */

/* Tablet & Smaller Desktop */
@media (max-width: 992px) {
    nav ul {
        gap: 15px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .modal-content {
        grid-template-columns: 1fr;
        /* Stack modal content vertically */
    }

    .modal-image {
        min-height: 250px;
        max-height: 300px;
        border-radius: 15px 15px 0 0;
    }

    .modal-details {
        padding: 25px;
    }
}

/* Mobile base layout adjustments */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 20px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .logo-text h1 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .logo-text p {
        font-size: 0.75rem;
        display: none;
    }

    .hero {
        height: auto;
        min-height: 400px;
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .image-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        gap: 15px;
    }

    .image-item:nth-child(n) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .category-filter {
        gap: 8px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex: 0 0 auto;
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .product-modal {
        width: 95%;
        height: 85vh;
        margin-top: 20px;
        display: flex;
        flex-direction: column;
    }

    .modal-content {
        overflow-y: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .modal-image img {
        object-fit: contain;
        max-height: 250px;
    }

    .close-modal {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        margin-bottom: 30px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        width: 100%;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .logo-text h1 {
        font-size: 0.85rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   PREMIUM FULL-SCREEN MOBILE NAVIGATION
   ========================================= */

/* Hamburger morphs into X when open */
.mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Full-screen overlay nav */
@media screen and (max-width: 768px) {

    .mobile-menu-btn {
        display: flex;
        z-index: 3000;
    }

    /* Hide default nav; use the overlay system */
    #mainNav {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 2500;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 0 10vw;
        pointer-events: none;

        /* Clip-path reveal: starts as a circle at top-right (button position), expands to fill screen */
        clip-path: circle(0% at calc(100% - 36px) 36px);
        transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1);
        transform: none;
        opacity: 1;
        visibility: visible;

        /* Rich dark background with subtle texture */
        background: linear-gradient(135deg, #0d3d52 0%, #1a5f7a 50%, #0a2e3d 100%);
    }

    #mainNav.active {
        clip-path: circle(150% at calc(100% - 36px) 36px);
        pointer-events: all;
    }

    /* Nav list */
    #mainNav ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    #mainNav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }

    #mainNav li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Staggered reveal when active */
    #mainNav.active li {
        opacity: 1;
        transform: translateX(0);
    }

    #mainNav.active li:nth-child(1) {
        transition-delay: 0.15s;
    }

    #mainNav.active li:nth-child(2) {
        transition-delay: 0.22s;
    }

    #mainNav.active li:nth-child(3) {
        transition-delay: 0.29s;
    }

    #mainNav.active li:nth-child(4) {
        transition-delay: 0.36s;
    }

    #mainNav.active li:nth-child(5) {
        transition-delay: 0.43s;
    }

    /* Nav links */
    #mainNav a {
        display: flex;
        align-items: center;
        padding: 22px 0;
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        font-weight: 700;
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        letter-spacing: -0.02em;
        transition: color 0.25s ease, padding-left 0.25s ease;
        position: relative;
    }

    #mainNav a::before {
        content: '';
        position: absolute;
        left: -10vw;
        top: 0;
        bottom: 0;
        width: 0;
        background: rgba(255, 255, 255, 0.04);
        transition: width 0.3s ease;
        z-index: -1;
    }

    #mainNav a:hover,
    #mainNav a.active {
        color: #fff;
        padding-left: 16px;
    }

    #mainNav a:hover::before,
    #mainNav a.active::before {
        width: calc(100% + 20vw);
    }

    #mainNav a.active {
        color: var(--secondary);
    }

    #mainNav a.active:after {
        display: none;
    }

    /* Accent dot on active link */
    #mainNav a.active::after {
        display: block;
        content: '●';
        position: absolute;
        right: 0;
        font-size: 0.5rem;
        color: var(--secondary);
        line-height: 1;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Lock body scroll when open */
    body.menu-open {
        overflow: hidden;
    }

    /* Remove the old ::before backdrop since our nav fills the screen */
    body.menu-open::before {
        display: none;
    }

    /* Decorative accent in the corner of the overlay */
    #mainNav::after {
        content: 'E&F';
        position: absolute;
        bottom: 40px;
        right: 40px;
        font-size: 5rem;
        font-weight: 900;
        color: rgba(255, 255, 255, 0.04);
        letter-spacing: -0.04em;
        pointer-events: none;
        user-select: none;
    }
}