:root {
    /* Extracted from Octopilot Logo */
    --brand-green: #0e6f48; /* Darker green from the outer ring */
    --brand-red: #d93025; /* Red from the plane stripes/scarf */
    --brand-orange: #f48fb1; /* Octopus color - adjusted for warmth */
    --brand-orange-real: #ef8435; /* Actual octopus orange */
    --sky-blue: #a3d5f5; /* Background sky */
    --cloud-white: #ffffff;
    --dark-goggles: #4a3b32; /* Dark brown from goggles */

    /* Theme variables */
    --bg-body: #f8fbfe;
    --text-main: #2d3748;
    --text-muted: #4a5568;
    --text-disabled: #8994aa;
    --primary: var(--brand-green);
    --secondary: var(--brand-red);
    --accent: var(--brand-orange-real);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--brand-green);
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 100;
    color: white;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
    text-decoration: underline;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.6);
}

.current-page {
    color: white;
    font-weight: 700;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
}

.nav-right a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-right a:hover {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .top-nav {
        background: var(--brand-green); /* Ensure mobile keeps green */
        color: white;
    }
}

/* --- Header --- */
header {
    background-color: var(--brand-green);
    /* Layered background:
       1. Linear gradient (top layer)
       2. Circuit pattern SVG (middle layer)
       3. Solid color (bottom layer)
    */
    background-image:
        linear-gradient(135deg, rgba(14, 111, 72, 0.92) 0%, rgba(21, 143, 96, 0.92) 100%),
        url('../images/pcb.svg');

    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;

    color: white;
    padding: 2rem 0 6rem;
    position: relative;
    overflow: hidden;
    text-align: left;
}

/* Header Variations */
header.mini-hero {
    padding: 3rem 0;
    text-align: center;
}
header.mini-hero h1 {
    font-size: 2rem;
    margin: 0;
}
header.mini-hero::after {
    height: 20px;
}

header.store-hero {
    padding: 3rem 0 4rem;
    text-align: center;
}
header.store-hero h1 {
    font-size: 3rem;
    margin: 0 0 1rem;
}
header.store-hero::after {
    height: 40px;
}
header.store-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}


/* Decorative wave at bottom of header */
header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-body);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    position: relative;
    z-index: 2; /* Place content above clouds */
}

.logo-container {
    width: 280px; /* Increased size */
    height: 280px; /* Increased size */
    flex-shrink: 0;
    background: white;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.header-text {
    max-width: 600px;
}

header h1 {
    font-size: 3.5rem;
    margin: 0 0 0.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    
    text-shadow:
        -1px -1px 0 #151,
            1px -1px 0 #151,
        -1px  1px 0 #151,
            1px  1px 0 #151; /* Multiple shadows to create a 1px outline */
}

header .tagline {
    font-size: 1.5rem;
    opacity: 0.95;
    margin: 0 0 2rem;
    font-weight: 400;
    text-shadow:
        -1px -1px 0 #151,
            1px -1px 0 #151,
        -1px  1px 0 #151,
            1px  1px 0 #151; /* Multiple shadows to create a 1px outline */
}

/* Clouds Animation */
.cloud {
    position: absolute;
    background: rgba(245, 255, 250, 1.0);
    border-radius: 50px;
    z-index: 1; /* Above background, below logo (logo container z-index logic needs care) */
    animation: moveClouds 25s linear infinite;
}

.cloud::after, .cloud::before {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud.one {
    width: 120px; height: 40px;
    top: 10%; left: -150px;
    animation-duration: 55s;
}
.cloud.one::after { width: 50px; height: 50px; top: -25px; left: 20px; }
.cloud.one::before { width: 40px; height: 40px; top: -15px; left: 60px; }

.cloud.two {
    width: 160px; height: 50px;
    top: 40%; left: -200px;
    animation-duration: 75s;
    animation-delay: 5s;
}
.cloud.two::after { width: 60px; height: 60px; top: -30px; left: 30px; }
.cloud.two::before { width: 50px; height: 50px; top: -20px; left: 80px; }

.cloud.three {
    width: 100px; height: 35px;
    top: 66%; left: -120px;
    animation-duration: 48s;
    animation-delay: 15s;
}
.cloud.three::after { width: 40px; height: 40px; top: -20px; left: 15px; }
.cloud.three::before { width: 30px; height: 30px; top: -10px; left: 50px; }

@keyframes moveClouds {
    0% { transform: translateX(0); }
    100% { transform: translateX(120vw); }
}

/* --- Buttons & UI Elements --- */
.cta-button {
    display: inline-block;
    background-color: var(--brand-red);
    color: white;
    padding: 1rem 2.5rem;
    margin: 0 0.5rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cta-button:hover {
    background-color: #c52b20;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.copy-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}
.copy-btn:hover {
    background-color: #e0e0e0;
}

/* --- Sections & Grid --- */
section {
    padding: 2rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--brand-red);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    border-top: 5px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card:has(a):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Ensure cursor pointer only on cards with links */
.card:has(a), .project-highlight:has(a), .product-card:has(a) {
    cursor: pointer;
}

/* Adjust hover styles for links to trigger on card hover */
.card:has(a):hover h3, .project-highlight:has(a):hover h3, .product-card:has(a):hover h3 {
        color: var(--primary);
        transition: color 0.2s;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    background: #e6f4ea; /* Light green background */
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50%;
}

.card h3 {
    margin-top: 0;
        color: var(--primary);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.card a:hover {
    color: var(--brand-red);
}

/* --- Featured Project --- */
.project-highlight {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1rem;
}

.project-highlight a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.project-highlight:has(a):hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

@media (min-width: 768px) {
    .project-highlight {
        flex-direction: row;
    }
    .project-content {
        padding: 3rem;
        flex: 1;
    }
    .project-visual {
        flex: 1;
        background: var(--sky-blue);
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 300px;
    }
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
        color: var(--primary);
}

.tags {
    margin-bottom: 1rem;
}

.tag {
    background: #f4f6f8;
    color: var(--text-disabled);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

.project-visual {
  width: auto;
  height: auto;
  align-self: stretch;
  overflow: hidden;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Store Grid (from store.css) --- */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.product-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0; /* Thin border */
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--brand-orange-real);
}

.product-image {
    height: 220px;
    background-color: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px solid #edf2f7;
    padding-top: 1.5rem;
}

/* --- Product Detail Pages (from product.css) --- */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 3rem auto 5rem;
    align-items: start;
}

/* Gallery */
.gallery {
    position: sticky;
    top: 6rem;
}

.main-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
    background: white;
}

.thumb:hover {
    opacity: 1;
}

.thumb.active {
    border-color: var(--brand-orange-real);
    opacity: 1;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Product Info */
.product-info h1 {
    font-size: 2.5rem;
    color: var(--brand-green);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-block;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-green);
}


.buy-button {
    display: inline-block;
    background-color: var(--brand-orange-real);
    color: white;
    padding: 1rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(239, 132, 53, 0.2);
    margin-bottom: 2rem;
    border: none;
    cursor: pointer;
}

.product-footer .buy-button {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
    box-shadow: none;
}

.buy-button:hover {
    background-color: #d66a1f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(239, 132, 53, 0.3);
}

.inventory {
    font-size: 0.9rem;
    color: var(--brand-green);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.description h3 {
    color: var(--brand-green);
    margin-top: 2rem;
}

.description ul {
    padding-left: 1.5rem;
}

.description li {
    margin-bottom: 0.5rem;
}

.specs-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    border-left: 4px solid var(--sky-blue);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    cursor: default;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--brand-orange-real);
}

/* --- Common Products Components --- */
#products {
    background-color: #f0f7fb; /* Very light blue */
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: left;
    transition: all 0.2s;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    position: relative;
}

.product-card h3 {
        color: var(--primary);
}

.product-card a {
    margin-top: auto;
    align-self: flex-end;
}

.product-card a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.product-card:has(a):hover {
    border-color: var(--brand-orange-real);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}


/* --- Footer --- */
footer {
    background-color: var(--dark-goggles);
    color: white;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    margin-top: 4rem;
}

footer a {
    color: var(--sky-blue);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    header {
        text-align: center;
        padding: 3rem 0 3rem; /* Adjusted for mobile header padding */
    }

    header::after {
        height: 30px;
    }

    .logo-container {
        width: 200px;
        height: 200px;
        margin-bottom: 1rem;
    }

    header h1 {
        font-size: 2.2rem;
    }
    header .tagline {
        font-size: 1.1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery {
        position: static;
    }

    .product-info h1 {
        font-size: 2rem;
    }
    
    .top-nav {
        width: 100%;
        left: 0;
        top: 0;
        padding: 10px;
        background: var(--brand-green);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        color: white;
    }
}
