/**
 * Eco Plastic Theme — Core Design System
 * Modern, premium design tokens, typography, utilities, and grid.
 */

/* ─── Google Fonts Fallback & CSS Variables ─── */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Bengali:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* ── Brand Primary: Deep Forest Green ── */
    --eco-green:            #004321;  /* Primary Green */
    --eco-green-light:      #337F3F;  /* Eco Light Green */
    --eco-green-mid:        #1a5c2e;  /* Between primary & light */
    --eco-green-dark:       #002b14;  /* Darker hover shade */
    --eco-green-subtle:     rgba(0, 67, 33, 0.07); /* Light tint for backgrounds */
    --eco-green-glow:       rgba(0, 67, 33, 0.20); /* Shadow / glow */

    /* ── Neutral Scale (Charcoal-anchored) ── */
    --eco-charcoal:         #263238;  /* Dark Charcoal — headings, body text */
    --eco-charcoal-light:   #37474F;  /* Slightly lighter charcoal */
    --eco-charcoal-muted:   #546E7A;  /* Muted text */
    --eco-light-gray:       #ECEFF1;  /* Light Gray — backgrounds, borders */
    --eco-gray-border:      #CFD8DC;  /* Borders & dividers */
    --eco-gray-mid:         #90A4AE;  /* Placeholder / hint text */
    --eco-white:            #FFFFFF;  /* White */

    /* ── Semantic Aliases ── */
    --eco-bg-page:          #F5F7F8;  /* Soft off-white page background */
    --eco-bg-card:          #FFFFFF;
    --eco-bg-surface:       #ECEFF1;  /* --eco-light-gray */
    --eco-text-primary:     #263238;  /* --eco-charcoal */
    --eco-text-secondary:   #546E7A;  /* --eco-charcoal-muted */
    --eco-text-hint:        #90A4AE;
    --eco-border:           #CFD8DC;

    /* ── Typography ── */
    --eco-font-sans:    'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --eco-font-bengali: 'Hind Siliguri', 'Noto Sans Bengali', 'Inter', sans-serif;
    --eco-font-mono:    'Courier New', Courier, monospace;

    /* ── Spacing ── */
    --eco-space-xs:     4px;
    --eco-space-sm:     8px;
    --eco-space-md:     16px;
    --eco-space-lg:     24px;
    --eco-space-xl:     40px;
    --eco-space-2xl:    64px;

    /* ── Border Radius ── */
    --eco-radius-sm:    6px;
    --eco-radius-md:    10px;
    --eco-radius-lg:    16px;
    --eco-radius-xl:    24px;
    --eco-radius-full:  9999px;

    /* ── Shadows ── */
    --eco-shadow-sm:    0 1px 3px rgba(38, 50, 56, 0.08);
    --eco-shadow-md:    0 4px 12px rgba(38, 50, 56, 0.10);
    --eco-shadow-lg:    0 10px 30px rgba(38, 50, 56, 0.12);
    --eco-shadow-xl:    0 20px 60px rgba(38, 50, 56, 0.15);

    /* ── Transition ── */
    --eco-transition:   all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ─── Global Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* NOTE: Do NOT set overflow-x here — it disables position:sticky on all children (header etc.) */
}

body {
    font-family: var(--eco-font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--eco-text-primary);
    background-color: var(--eco-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll / mobile viewport zoom-out */
}

.site-content {
    overflow-x: hidden;
    width: 100%;
}


/* ─── Language-specific overrides for Bengali Content ─── */
html[lang^="bn"] body,
html[lang^="bn"] input,
html[lang^="bn"] select,
html[lang^="bn"] textarea,
html[lang^="bn"] button,
.eco-lang-bn {
    font-family: var(--eco-font-bengali) !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--eco-green);
    text-decoration: none;
    transition: var(--eco-transition);
}

a:hover {
    color: var(--eco-green-dark);
}

/* ─── Layout Container ─── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--eco-space-lg);
}

.container-sm  { max-width: 800px;  margin: 0 auto; padding: 0 var(--eco-space-lg); }
.container-md  { max-width: 1000px; margin: 0 auto; padding: 0 var(--eco-space-lg); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--eco-font-sans);
    font-weight: 700;
    line-height: 1.25;
    color: var(--eco-charcoal);
    margin-bottom: var(--eco-space-md);
}

h1 { font-size: clamp(2rem,   5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem,3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--eco-space-md); color: var(--eco-text-secondary); }

/* ─── Section Title ─── */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--eco-charcoal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--eco-green);
    margin-bottom: 20px;
    display: inline-block;
}

/* ─── Buttons ─── */
.eco-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--eco-radius-md);
    font-family: var(--eco-font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--eco-transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.eco-btn-details {
    background: var(--eco-light-gray);
    color: var(--eco-charcoal-light);
    border: 1.5px solid var(--eco-gray-border);
}

.eco-btn-details:hover {
    background: var(--eco-gray-border);
    color: var(--eco-charcoal);
    transform: translateY(-1px);
}

.eco-btn-whatsapp {
    background: var(--eco-whatsapp-btn, #25D366);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--eco-whatsapp-btn-shadow, rgba(37, 211, 102, 0.35));
}

.eco-btn-whatsapp:hover {
    background: var(--eco-whatsapp-btn-hover, #1da851);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--eco-whatsapp-btn-shadow, rgba(37, 211, 102, 0.4));
}

/* ─── Badge ─── */
.eco-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: var(--eco-radius-full);
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.eco-badge-new {
    background: var(--eco-green);
    color: #fff;
}

.eco-badge-featured {
    background: var(--eco-green-light);
    color: #ffffff;
    top: 12px;
    left: 12px;
    right: auto;
}

/* ─── Product Card Grid ─── */
.eco-product-card-item {
    background: var(--eco-bg-card);
    border-radius: var(--eco-radius-lg);
    overflow: hidden;
    box-shadow: var(--eco-shadow-sm);
    border: 1px solid var(--eco-light-gray);
    transition: var(--eco-transition);
    display: flex;
    flex-direction: column;
}

.eco-product-card-item:hover {
    box-shadow: var(--eco-shadow-lg);
    transform: translateY(-4px);
    border-color: var(--eco-green-light);
}

.eco-card-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--eco-light-gray);
    width: 100%;
}

.eco-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.eco-product-card-item:hover .eco-card-thumbnail {
    transform: scale(1.04);
}

.eco-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--eco-light-gray);
}

.eco-card-no-image .dashicons {
    font-size: 48px;
    color: var(--eco-gray-border);
}

.eco-card-body {
    padding: 16px 18px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.eco-card-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--eco-green-light);
    background: var(--eco-green-subtle);
    padding: 2px 8px;
    border-radius: var(--eco-radius-full);
    display: inline-block;
    width: fit-content;
}

.eco-card-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-family: var(--eco-font-mono);
    background: var(--eco-bg-page);
    border: 1px solid var(--eco-border);
    padding: 3px 10px;
    border-radius: var(--eco-radius-sm);
    color: var(--eco-text-primary);
    margin-top: 8px;
    width: fit-content;
}

.eco-card-id-label {
    font-weight: 700;
    color: var(--eco-green-light);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
}

.eco-card-id-val {
    font-weight: 600;
}

.eco-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.eco-card-title a {
    color: var(--eco-charcoal);
}

.eco-card-title a:hover {
    color: var(--eco-green);
}

.eco-card-model {
    font-size: 11px;
    color: var(--eco-gray-mid);
    font-family: var(--eco-font-mono);
    margin: 0;
}

.eco-card-excerpt {
    font-size: 13px;
    color: var(--eco-text-secondary);
    line-height: 1.55;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.1em;
}

.eco-card-footer {
    padding: 12px 18px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--eco-light-gray);
}

.eco-card-footer .eco-btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 9px 12px;
}

/* ─── No Results ─── */
.eco-no-results {
    text-align: center;
    padding: 80px 20px;
}

.eco-no-results .page-title {
    color: var(--eco-gray-mid);
    font-size: 1.5rem;
    font-weight: 600;
}

/* ─── Archive Layout ─── */
.eco-archive-container {
    padding-top: var(--eco-space-xl);
    padding-bottom: var(--eco-space-2xl);
}

.eco-archive-header {
    text-align: center;
    margin-bottom: var(--eco-space-xl);
}

.eco-archive-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--eco-charcoal);
    margin-bottom: 10px;
}

.eco-archive-subtitle {
    color: var(--eco-text-secondary);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
}

.eco-archive-layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--eco-space-xl);
    align-items: start;
}

.eco-archive-sidebar {
    position: sticky;
    top: 90px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .eco-archive-layout-grid {
        grid-template-columns: 220px 1fr;
        gap: var(--eco-space-lg);
    }
}

@media (max-width: 768px) {
    .eco-archive-layout-grid {
        grid-template-columns: 1fr;
    }

    .eco-archive-sidebar {
        position: static;
        order: -1;
    }

    .eco-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ── 2-column mobile card: tighter spacing so text/buttons fit ── */
@media (max-width: 480px) {
    .eco-card-body {
        padding: 10px 12px 6px;
        gap: 3px;
    }
    .eco-card-title {
        font-size: 0.88rem;
        line-height: 1.3;
    }
    .eco-card-category {
        font-size: 9px;
        padding: 2px 6px;
    }
    .eco-card-id {
        font-size: 10px;
        padding: 2px 8px;
        margin-top: 4px;
    }
    .eco-card-excerpt {
        font-size: 12px;
        height: 2.8em;
        -webkit-line-clamp: 2;
    }
    .eco-card-model {
        font-size: 10px;
    }
    .eco-card-footer {
        padding: 8px 12px 10px;
        gap: 7px;
    }
    .eco-card-footer .eco-btn {
        padding: 9px 10px;
        font-size: 12px;
        gap: 5px;
    }
    .eco-card-footer .eco-btn svg {
        width: 14px;
        height: 14px;
    }
    .eco-badge {
        font-size: 9px;
        padding: 2px 7px;
        top: 8px;
        right: 8px;
    }
    .eco-badge-featured {
        top: 8px;
        left: 8px;
    }
}


