/* Global Reset & Variables */
:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-glow: rgba(37, 99, 235, 0.3);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-accent: linear-gradient(90deg, #2563EB, #06B6D4);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* Helpers */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Header & Navigation */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 40px;
}

/* Custom "Title + Subtitle" Nav Item */
.nav-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--primary);
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--primary);
}

.nav-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 2px;
    color: var(--text-muted);
}

.nav-item.active .nav-subtitle {
    color: var(--accent);
    opacity: 1;
}


/* Hero Section */
.hero {
    position: relative;
    padding: 100px 0 100px;
    background: var(--primary);
    color: white;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Abstract tech grid background concept */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.2) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 20%),
        linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    /* actually needs to be lighter on dark bg */
    color: #94A3B8;
    margin-bottom: 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: #F1F5F9;
    padding: 8px 16px;
    border-radius: 20px;
    width: 300px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box i {
    color: var(--text-muted);
    margin-right: 10px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Controls Wrapper (Filter + Sort) */
.controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Compact Filter Chips */
.filter-container {
    display: flex;
    /* Added display: flex */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 800px;
    /* Increased to 800px for better 3-line layout */
    margin-left: auto;
    margin-right: auto;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.filter-pill.active {
    background: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.filter-pill.active .filter-count {
    background: var(--primary);
    color: white;
}



/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 48px;
    opacity: 0.8;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
}

.trust-item i {
    color: #38BDF8;
    /* Sky 400 */
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.25rem;
    color: var(--text-main);
}

.view-all {
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.cat-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.cat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.icon-box {
    width: 64px;
    height: 64px;
    background: #EFF6FF;
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    transition: background 0.3s, color 0.3s;
}

.cat-card:hover .icon-box {
    background: var(--accent);
    color: white;
}

.cat-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.cat-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Listings Grid */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.listing-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.listing-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.listing-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.img-placeholder::before {
    content: "\f275";
    /* fa-industry */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 3rem;
    opacity: 0.2;
}

.thumbnail .img-placeholder::before {
    font-size: 1.5rem;
}

/* Watermark Overlay System */
.listing-image,
.main-image-container {
    position: relative;
    overflow: hidden;
}

.listing-image::after,
.main-image-container::after {
    content: "UsedList.com | CNS Industrial";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    /* Slightly increased opacity for visibility */
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 4px;
    width: 150%;
    text-align: center;
}

/* Detail Page specific container adjustment */
.main-image-container {
    width: 100%;
    height: 500px;
    background: #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Branded Corner Badge */
.thumbnail {
    position: relative;
    /* Essential for badge positioning */
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: var(--primary);
}

.brand-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.brand-badge i {
    color: var(--accent);
}

.listing-item:hover .brand-badge {
    opacity: 1;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.listing-image .tag {
    z-index: 4;
    /* Keep tags on top */
}

.tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.listing-details {
    padding: 24px;
}

.listing-details .category {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.listing-details h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.listing-details .model {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.meta i {
    margin-right: 6px;
    color: #94A3B8;
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer */
.site-footer {
    background: white;
    padding: 80px 0 30px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    color: #94A3B8;
    font-size: 0.9rem;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }

    .nav-list {
        display: none;
        /* simple hide for mobile for this prototype */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-search-box {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        border: none;
        gap: 12px;
    }

    .input-group {
        background: white;
        width: 100%;
        padding: 16px;
        border-radius: 12px;
    }

    .divider {
        display: none;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Plants Page Specific Styles */
.plants-hero {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2670&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 100px 0 80px;
}

.hero-tag {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--accent);
    color: #60A5FA;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Expertise Section (Legacy Content) */
.center-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.center-header h2 {
    color: var(--accent);
    margin-bottom: 16px;
    font-size: 2rem;
}

.center-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.expertise-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.expertise-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.expertise-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Plant List (Wide Cards) */
.plant-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.plant-card {
    display: flex;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.plant-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.plant-image {
    flex: 0 0 40%;
    position: relative;
    min-height: 300px;
}

.plant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plant-details {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plant-details .category {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.plant-details h3 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--primary);
}

.plant-specs {
    list-style: none;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.plant-specs li {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plant-specs li i {
    color: var(--text-muted);
    width: 20px;
}

.plant-desc {
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15), transparent 40%);
}

.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.cta-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.requirements-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.requirements-tags span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.cta-sub {
    color: #94A3B8;
    font-size: 1.1rem;
}

/* Responsive Plants */
@media (max-width: 900px) {
    .plant-card {
        flex-direction: column;
    }

    .plant-image {
        flex: 0 0 250px;
    }

    .plant-details {
        padding: 30px;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .requirements-tags {
        justify-content: center;
    }
}

/* About Page Image Grid */
.about-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 240px);
    gap: 16px;
    position: relative;
}

.about-grid-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.about-grid-item:hover {
    transform: scale(1.02);
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

/* Specific offsets for visual interest */
.item-2 {
    transform: translateY(20px);
}

.item-4 {
    transform: translateY(20px);
}

/* Adjust responsive for grid */
@media (max-width: 968px) {
    .about-img-grid {
        grid-template-rows: repeat(2, 200px);
    }

    .item-2,
    .item-4 {
        transform: none;
    }
}