:root {
    --erust-primary: #13ec5b;
    --erust-primary-dark: #10d14f;
    --erust-primary-light: #e8fcef;
    --erust-text: #111813;
    --erust-text-secondary: #61896f;
    --erust-bg-light: #f6f8f6;

    /* Font Families */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Typography - Body uses Open Sans */
html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background-color: var(--erust-bg-light);
    color: var(--erust-text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
}

/* Typography - Headings use Plus Jakarta Sans */
h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6,
.fw-bold,
.fw-semibold,
.section-heading,
.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Font Weight Utilities */
.fw-300 {
    font-weight: 300 !important;
}

.fw-400 {
    font-weight: 400 !important;
}

.fw-600 {
    font-weight: 600 !important;
}

/* Body text elements use Open Sans */
p,
.card-text,
.lead,
.text-muted,
.list-unstyled,
.dropdown-item,
.form-control,
.form-label,
.btn {
    font-family: var(--font-body);
    font-weight: 400;
}

/* Some headings can use lighter weight */
h5,
h6,
.card-title {
    font-weight: 400;
}

/* Light weight for special cases */
.text-light,
.text-light-emphasis {
    font-weight: 300;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Navbar */
.navbar {
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    /* max-height: 64px; Removed to allow dropdowns */
    /* overflow: hidden; Removed to allow dropdowns */
    z-index: 1030;
    /* Ensure navbar stays on top */
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--erust-primary) !important;
    font-weight: 600;
    padding: 0.5rem 0;
}

.navbar-nav .nav-link {
    font-weight: 400;
    color: var(--erust-text) !important;
    transition: color 0.2s;
    padding: 0.5rem 1rem !important;
    font-family: var(--font-body);
}

.navbar-nav .nav-link:hover {
    color: var(--erust-primary) !important;
}

/* Hover Dropdown Logic */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Mega Menu Styles */
.mega-menu {
    width: 700px;
    padding: 0;
    overflow: hidden;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1050;
    /* Ensure dropdown is above everything */
}

.mega-menu-content {
    background: #fff;
}

.mega-menu-list {
    padding: 1rem 0;
    /* max-height: 400px; Removed to show full list */
    /* overflow-y: auto; Removed to show full list */
}

.mega-menu-list .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.mega-menu-list .dropdown-item:hover {
    background-color: var(--erust-primary-light);
    color: var(--erust-text);
    border-left-color: var(--erust-primary);
}

.mega-menu-image-container {
    background-color: var(--erust-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%;
    min-height: 300px;
}

.mega-menu-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

/* Offcanvas Menu (Left Side) */
.offcanvas {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.offcanvas-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--erust-primary);
    font-size: 1.5rem;
}

.offcanvas-body {
    padding: 1.5rem;
}

.offcanvas-body .nav-link {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-family: var(--font-body);
    font-weight: 400;
}

.offcanvas-body .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.offcanvas-body .dropdown-item {
    padding: 0.5rem 0;
    font-family: var(--font-body);
    font-weight: 400;
}

/* Buttons - Global Standardized Styles */
.btn {
    border-radius: 8px;
}

/* Primary Button (Filled - Green) */
.btn-success,
.btn-erust-primary {
    border-radius: 8px;
    background-color: var(--erust-primary);
    border-color: var(--erust-primary);
    color: var(--bs-btn-active-color, #fff);
    font-weight: 600;
}

.btn-success:hover,
.btn-erust-primary:hover {
    background-color: var(--erust-primary-dark);
    border-color: var(--erust-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 169, 64, 0.3);
    color: var(--bs-btn-active-color, #fff);
}

.btn-success:active,
.btn-erust-primary:active {
    color: var(--bs-btn-active-color, #fff);
    background-color: var(--bs-btn-active-bg, var(--erust-primary-dark));
    border-color: var(--bs-btn-active-border-color, var(--erust-primary-dark));
}

/* Outline Button (Border - Green) */
.btn-outline-success,
.btn-erust-outline {
    border-radius: 8px;
    border-color: var(--erust-primary);
    color: var(--erust-primary);
    background-color: transparent;
}

.btn-outline-success:hover,
.btn-erust-outline:hover {
    background-color: var(--erust-primary);
    border-color: var(--erust-primary);
    color: var(--bs-btn-active-color, #fff);
}

.btn-outline-success:active,
.btn-erust-outline:active {
    color: var(--bs-btn-active-color, #fff);
    background-color: var(--bs-btn-active-bg, var(--erust-primary-dark));
    border-color: var(--bs-btn-active-border-color, var(--erust-primary-dark));
}

/* Global 8px Border Radius for Cards, Inputs, Search Boxes */
.card,
.form-control,
.form-select,
.input-group,
.dropdown-menu,
.alert,
.badge,
.modal-content {
    border-radius: 8px !important;
}

/* Cards */
.product-card,
.category-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.product-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-img-top {
    transition: transform 0.3s;
}

.product-card:hover .card-img-top,
.category-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badge */
.badge.bg-success {
    background-color: var(--erust-primary) !important;
    color: #000;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--erust-primary-light) 0%, #ffffff 100%);
    padding: 4rem 0;
    border-radius: 0 0 2rem 2rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Section Headings */
.section-heading {
    font-weight: 600;
    color: var(--erust-text);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

/* Section Spacing */
section {
    padding: 3rem 0;
}

section.py-5 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Container Spacing */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Card Spacing Improvements */
.card {
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 400;
    margin-bottom: 1rem;
}

.card-text {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 3rem 0 1.5rem 0;
    min-height: 96px;
}

footer .container {
    padding-top: 2rem;
    padding-bottom: 1rem;
}

footer h5,
footer h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

footer p,
footer li {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
}

footer .list-unstyled li {
    margin-bottom: 0.75rem;
}

footer a {
    transition: color 0.2s;
    font-family: var(--font-body);
    font-weight: 400;
}

footer a:hover {
    color: var(--erust-primary) !important;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 400;
}

footer .text-white-50:hover {
    color: var(--erust-primary) !important;
}

footer .social-icon {
    transition: all 0.3s ease;
    display: inline-block;
}

footer .social-icon:hover {
    color: var(--erust-primary) !important;
    transform: translateY(-3px);
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

.card-img-top {
    width: 100%;
    object-fit: cover;
}

/* Typography Size Optimizations */
.display-1 {
    font-size: 4.5rem;
    line-height: 1.2;
}

.display-2 {
    font-size: 4rem;
    line-height: 1.2;
}

.display-3 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.display-4 {
    font-size: 2.5rem;
    line-height: 1.3;
}

.display-5 {
    font-size: 2rem;
    line-height: 1.3;
}

.display-6 {
    font-size: 1.75rem;
    line-height: 1.4;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    font-weight: 600;
}

h2 {
    font-size: 2rem;
    line-height: 1.4;
    font-weight: 600;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.4;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.5;
    font-weight: 600;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 400;
}

h6 {
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 400;
}

@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem;
    }

    .display-2 {
        font-size: 2.75rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    h6 {
        font-size: 1rem;
    }
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 400;
}

p {
    font-size: 1rem;
    line-height: 1.7;
}

small,
.small {
    font-size: 0.875rem;
    line-height: 1.6;
}

footer hr {
    margin: 2rem 0 1.5rem 0;
}

/* Social Media Icons Spacing */
footer .mt-3 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    margin-right: 0.5rem;
}

footer .mt-3 a:hover {
    background-color: var(--erust-primary);
    color: #000 !important;
    transform: translateY(-2px);
}

/* Utilities */
.text-success {
    color: var(--erust-primary) !important;
}

.bg-success {
    background-color: var(--erust-primary) !important;
}


/* Certificate Badge */
.certificate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--erust-primary-light);
    border-radius: 20px;
    color: var(--erust-text);
    font-weight: 500;
}

/* Newsletter Form */
.newsletter-form {
    background: linear-gradient(135deg, var(--erust-primary) 0%, var(--erust-primary-dark) 100%);
    padding: 3rem;
    border-radius: 1rem;
    color: white;
}

.newsletter-form .form-control {
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

/* Why Choose Us Cards */
.why-choose-card {
    height: 100%;
    border: none;
    border-radius: 12px;
    transition: transform 0.2s;
}

.why-choose-card:hover {
    transform: translateY(-5px);
}

.why-choose-card .card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--erust-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.why-choose-card .card-icon .material-symbols-outlined {
    font-size: 32px;
    color: var(--erust-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .newsletter-form {
        padding: 2rem;
    }

    .main-content {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    section {
        padding: 2rem 0;
    }

    section.py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    footer {
        padding: 2rem 0 1rem 0;
    }

    footer .container {
        padding-top: 1.5rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .card-body {
        padding: 1.25rem;
    }
}

@media (min-width: 992px) {
    .main-content {
        padding-top: 2.5rem;
        padding-bottom: 4rem;
    }

    section {
        padding: 4rem 0;
    }
}

/* Loading Spinner */
.spinner-border-success {
    border-color: var(--erust-primary);
    border-right-color: transparent;
}

/* Admin Form Styles */
.form-section-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--erust-primary);
    border-bottom: 2px solid var(--erust-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-section-title i {
    margin-right: 0.5rem;
}

.form-label.fw-semibold {
    font-weight: 600;
    color: var(--erust-text);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.form-control-lg {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-lg:focus {
    border-color: var(--erust-primary);
    box-shadow: 0 0 0 0.2rem rgba(19, 236, 91, 0.25);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erust-primary);
    box-shadow: 0 0 0 0.2rem rgba(19, 236, 91, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.card.shadow-sm {
    border: none;
    border-radius: 12px;
}

.card-body {
    padding: 3rem;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .form-section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .form-control-lg {
        font-size: 1rem;
    }
}

/* Form validation styles */
.text-danger.small {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-radius: 8px;
}

/* Form button spacing */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

.btn-lg i {
    font-size: 1.1rem;
}

/* Form group spacing improvements */
.row.g-3>* {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Responsive form adjustments */
@media (max-width: 576px) {
    .col-md-6 {
        margin-bottom: 1rem;
    }

    .form-control-lg,
    .form-select-lg {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Custom Search Input */
.custom-search-wrapper {
    position: relative;
    width: 100%;
}

.custom-search-input {
    border-radius: 8px !important;
    padding-left: 1.5rem !important;
    padding-right: 3rem !important;
    border: 1px solid #ced4da;
    height: 36px;
}

.custom-search-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    border-color: #198754;
}

.custom-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #198754;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 5;
}

.custom-search-btn:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.custom-search-btn i {
    font-size: 1.2rem;
}