:root {
    --primary: #4299E1;
    --secondary: #34B289;
    --accent: #F5A623;
    --accent-v2: #AE8625;
    --accent-v3: #F7EF8A;
    --accent-v4: #D2AC47;
    --accent-v5: #EDC967;
    --brand-color: var(--accent-v4);
    --brand-color-hover: #be9938;
    --brand-on-gradient: #0b1020;
    --brand-gradient: linear-gradient(
        135deg,
        var(--accent-v2),
        var(--accent-v3),
        var(--accent-v4),
        var(--accent-v5)
    );
    --success: #38A169;
    --warning: #DD6B20;
    --error: #E53E3E;
    --info: #3182CE;

    --bg-main: #F9FAFC;
    --bg-secondary: #F0F2F7;
    --bg-tertiary: #FFFFFF;
    --bg-dark: #000000;

    --text-heading: #1A2233;
    --text-subheading: #263654;
    --text-body: #2f3c52;
    --text-secondary: #718096;
    --text-light: #E2E8F0;

    --btn-primary: var(--brand-color);
    --btn-primary-hover: var(--brand-color-hover);

    --border: #E2E8F0;
    --divider: #EDF2F7;
    --table-hover: #EDF2F7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-main);
    color: var(--text-body);
    font-family: "Nunito", sans-serif;
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 0.2px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.rich-content {
    color: var(--text-body);
    font-size: 17px;
    line-height: 1.8;
}

.rich-content > * + * {
    margin-top: 0.85em;
}

.rich-content p {
    margin: 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    color: var(--text-heading);
    line-height: 1.25;
    margin-top: 1.1em;
    margin-bottom: 0.35em;
}

.rich-content h1 {
    font-size: 2rem;
}

.rich-content h2 {
    font-size: 1.65rem;
}

.rich-content h3 {
    font-size: 1.35rem;
}

.rich-content ul,
.rich-content ol {
    margin: 0.8em 0 0.8em 1.2em;
    padding-left: 0.8em;
}

.rich-content ul {
    list-style: disc;
}

.rich-content ol {
    list-style: decimal;
}

.rich-content li + li {
    margin-top: 0.35em;
}

.rich-content strong {
    font-weight: 800;
    color: var(--text-heading);
}

.rich-content em {
    font-style: italic;
}

.rich-content a {
    color: var(--btn-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-content blockquote {
    margin: 1em 0;
    padding: 0.7em 1em;
    border-left: 4px solid var(--accent-v4);
    background: #fff9e8;
    border-radius: 8px;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.default_color_chosen {
    background-color: linear-gradient(
    135deg,
        var(--accent-v2),
        var(--accent-v3),
        var(--accent-v4),
        var(--accent-v5)
    );
}
.default_text_color_chosen {
    color: linear-gradient(
    135deg,
        var(--accent-v2),
        var(--accent-v3),
        var(--accent-v4),
        var(--accent-v5)
    );
}

.testtext {    
    color: linear-gradient(
    135deg,
        var(--accent-v2),
        var(--accent-v3),
        var(--accent-v4),
        var(--accent-v5)
    );
}

.top-bar {
    background: var(--brand-gradient);
    color: var(--bg-dark);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bg-dark);
    font-weight: 700;
}

.top-bar-item:hover {
    color: var(--bg-dark);
}

.announcement-bar {
    background: var(--brand-gradient);
    color: #0f172a;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.announcement-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 26.4s linear infinite;
    will-change: transform;
}

.announcement-segment {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.announcement-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-v5);
}

.logo-icon {
    width: auto;
    max-width: 250px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.mobile-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    line-height: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.search-wrapper {
    flex: 1;
    max-width: 600px;
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid linear-gradient(
    135deg,
        var(--accent-v2),
        var(--accent-v3),
        var(--accent-v4),
        var(--accent-v5)
    );
    border-radius: 8px;
    background: var(--bg-secondary);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-color);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(
    135deg,
        var(--accent-v3),
        var(--accent-v2),
        var(--accent-v3)
    );
    cursor: pointer;
}
.search-btn:hover {
    background: linear-gradient(
    120deg,
        var(--accent-v3),
        var(--accent-v2),
        var(--accent-v3)
    );
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    position: relative;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--brand-color);
}

.action-icon {
    font-size: 20px;
}

.action-btn:hover {
    background: var(--brand-gradient);
    color: var(--bg-dark);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    padding: 1px 6px;
    background: var(--brand-gradient);
    color: black;
    font-size: 10px;
    border-radius: 999px;
}

.nav-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}
.menu-left,
.menu-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.menu-item {
    position: relative;
}

.menu-item > a,
.menu-item > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.15px;
    cursor: pointer;
    white-space: nowrap;
}

.menu-item:hover > a,
.menu-item:hover > span {
    background: #fff;
    color: var(--accent-v4);
}

.menu-item.active > a,
.menu-item.active > span {
    color: var(--brand-color);
    border-bottom: 3px solid var(--brand-color);
}

.dropdown-item.active > a {
    color: var(--brand-color);
    font-weight: 600;
}
.featured-badge {
    background: var(--brand-gradient);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}
.arrow-right {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 999;
}

.menu-item:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item > a,
.dropdown-item > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
}

.dropdown-item > a:hover,
.dropdown-item > span:hover {
    background: var(--table-hover);
    color: var(--brand-color);
}

.category-tree-dropdown {
    min-width: 320px;
    max-height: 480px;
    overflow-y: auto;
}

.category-tree-group + .category-tree-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--divider);
}

.category-tree-parent {
    display: block;
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
    border-radius: 8px;
}

.category-tree-parent:hover {
    background: var(--table-hover);
    color: var(--brand-color);
}

.category-tree-list {
    margin-left: 14px;
    padding-left: 12px;
    border-left: 1px solid #d5dbe6;
}

.category-tree-link {
    position: relative;
    display: block;
    padding: 7px 8px 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-body);
}

.category-tree-link::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    width: 10px;
    border-top: 1px solid #d5dbe6;
    transform: translateY(-50%);
}

.category-tree-link:hover,
.category-tree-link.active {
    background: var(--table-hover);
    color: var(--brand-color);
}

/* Sub dropdown */
.sub-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 220px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.dropdown-item:hover > .sub-dropdown {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-panel {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mobile-menu-close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-heading);
    cursor: pointer;
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 12px 0;
}

.mobile-menu-item {
    border-bottom: 1px solid var(--divider);
}

.mobile-menu-link {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-body);
}

.mobile-menu-link:hover {
    background: var(--bg-secondary);
}

.mobile-menu-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-toggle-icon {
    font-size: 14px;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: #f9fafb;
}

.mobile-menu-item.open .mobile-submenu {
    max-height: 1000px;
}

.mobile-submenu-inner {
    padding: 4px 16px 10px 16px;
}

.mobile-subitem-group {
    margin-bottom: 8px;
}

.mobile-subitem-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-subitem-list li {
    margin-bottom: 2px;
}

.mobile-sublink {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
}

.mobile-sublink:hover {
    color: var(--brand-color);
}
.mobile-menu-link.active,
.mobile-sublink.active {
    color: var(--brand-color);
    font-weight: 600;
}

.mobile-category-title {
    color: var(--text-heading);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.content {
    padding: 0 0 80px 0;
}

.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary), #fff);
    padding: 80px 16px;
    text-align: center;
    border-radius: 16px;
}

.hero-section h1 {
    font-size: 48px;
    color: var(--text-heading);
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    background: var(--brand-gradient);
    color: var(--brand-on-gradient);
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--brand-color);
    margin: 8px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mobile-bottom-nav {
    display: none;
}

.mob-nav-item {
    border: none;
    background: transparent;
    cursor: pointer;
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

.home-products {
    margin: 64px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: 28px;
    color: var(--text-heading);
}

.section-link {
    font-weight: 600;
    color: var(--brand-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.product-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-body {
    padding: 16px;
}

.product-category {
    font-size: 12px;
    color: var(--text-secondary);
}

.product-title {
    font-size: 18px;
    margin: 6px 0;
    color: var(--text-heading);
}

.product-desc {
    font-size: 14px;
    color: var(--text-body);
    min-height: 42px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-v4);
}

.btn-primary {
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--brand-gradient);
    color: var(--brand-on-gradient);
    font-size: 14px;
    font-weight: 700;
}

/* Tailwind helper class standardization for primary actions */
.bg-slate-900,
.bg-emerald-500,
.bg-emerald-600 {
    background: var(--brand-gradient) !important;
    color: var(--brand-on-gradient) !important;
    font-weight: 700;
}

.hover\:bg-slate-700:hover,
.hover\:bg-emerald-600:hover,
.hover\:bg-emerald-700:hover {
    background: var(--brand-gradient) !important;
    filter: brightness(0.95);
}

@media (max-width: 1024px) {
    .mega-dropdown {
        min-width: 600px;
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 1200px) {
    .top-bar {
        display: none;
    }

    .header-flex {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 2px;
        justify-content: space-between;
        position: relative;
    }

    .header-left {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: flex-start;
    }

    .mobile-hamburger {
        display: inline-flex;
        flex: 0 0 auto;
        z-index: 20;
        margin-right: 2px;
    }

    .header-actions,
    .menu,
    .nav-bar {
        display: none;
    }

    .mobile-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .header .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: space-around;
        padding: 6px 0 4px 0;
        z-index: 2000;
    }

    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 11px;
        color: #333;
        text-align: center;
    }

    .mob-icon {
        font-size: 22px;
        line-height: 22px;
    }

    .mob-label {
        font-size: 11px;
    }
    .mega-dropdown,
    .dropdown,
    .sub-dropdown {
        display: none !important;
    }
    .top-bar {
        display: none;
    }

    .header-flex {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 2px;
        justify-content: space-between;
        position: relative;
    }

    .header-left {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: flex-start;
    }

    .mobile-hamburger {
        display: inline-flex;
        flex: 0 0 auto;
        z-index: 20;
        margin-right: 2px;
    }

    .logo-icon {
        width: auto;
        max-width: 178px;
        height: 40px;
        object-fit: contain;
    }

    .mobile-menu-header .logo-icon {
        width: auto;
        max-width: 160px;
        height: 34px;
    }

    .search-wrapper {
        order: 3;
        width: 100%;
    }

    .header-actions {
        display: none;
    }

    .menu {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .content {
        padding: 22px 0 72px 0;
    }
    .hero-section {
        padding: 60px 12px;
    }

    .hero-section h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 26px;
    }

    .hero-section p {
        font-size: 16px;
    }
}
