:root {
    --gb-orange: #9333ea;
    --gb-orange-dark: #7e22ce;
    --gb-orange-light: #c084fc;
    --gb-blue: #6d28d9;
    --gb-blue-dark: #3b0764;
    --gb-radius: 16px;
    --gb-shadow-soft: 0 4px 16px rgba(88, 28, 135, .08);
    --gb-shadow-hover: 0 14px 32px rgba(88, 28, 135, .18);
}

body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background: #ece9f3;
}

/* Boxed site layout: content sits in a fixed-width column with visible
   margins either side on large screens, rather than stretching edge to
   edge. Falls back to full width below the max-width breakpoint. */
.gb-page-wrap {
    max-width: 1440px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 48px rgba(59, 7, 100, .08);
    min-height: 100vh;
}

.text-orange { color: var(--gb-orange); }
.bg-orange { background-color: var(--gb-orange) !important; }
.bg-blue-dark { background-color: var(--gb-blue-dark); }
.text-white-75 { color: rgba(255,255,255,.85); }

.btn-orange {
    background: linear-gradient(135deg, var(--gb-orange-light), var(--gb-orange) 55%, var(--gb-orange-dark));
    border: 0;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(147, 51, 234, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-orange:hover {
    filter: brightness(1.08);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(147, 51, 234, .45);
}

/* Modern global polish */
.card { border-radius: var(--gb-radius); box-shadow: var(--gb-shadow-soft); }
.btn { border-radius: 10px; }
.rounded-pill.btn, .btn.rounded-pill { border-radius: 999px; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; }

.gb-header .navbar-brand { font-size: 1.4rem; }

/* Top utility bar (Alibaba-style) */
.gb-topbar {
    background: var(--gb-blue-dark);
    color: rgba(255,255,255,.85);
}
.gb-topbar-link {
    color: rgba(255,255,255,.85);
    text-decoration: none;
}
.gb-topbar-link:hover { color: #fff; }

/* Persistent header search (all pages) */
.gb-header-search {
    max-width: 640px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: visible;
    position: relative;
}
.gb-header-search input.form-control { border-radius: 0; box-shadow: none; }
.gb-header-search input.form-control:focus { box-shadow: none; }
.gb-header-search .gb-search-cat-btn { border-radius: 999px 0 0 999px; }
.gb-header-search button[type="submit"] { border-radius: 0 999px 999px 0; }
.gb-header-search .dropdown-menu { max-height: 340px; overflow-y: auto; min-width: 240px; z-index: 1050; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.gb-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gb-blue) 0%, var(--gb-blue-dark) 65%, #1e0a3c 100%);
}
.gb-hero-glow {
    position: absolute;
    top: -120px;
    right: -100px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(192,132,252,.4) 0%, rgba(192,132,252,0) 70%);
    pointer-events: none;
}
.gb-hero-title { line-height: 1.15; }
.gb-hero-badge {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-weight: 500;
    font-size: .78rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.gb-quick-link {
    color: #fff;
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    padding: .4rem .9rem;
    border-radius: 999px;
    transition: background .15s ease, transform .15s ease;
}
.gb-quick-link:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
    transform: translateY(-1px);
}
.gb-search-bar { max-width: 760px; border-radius: 999px; position: relative; z-index: 20; }
.gb-search-bar input:focus { box-shadow: none; }
.gb-search-bar input.form-control { padding: .6rem .75rem; }
.gb-search-bar > .dropdown:first-child .gb-search-cat-btn {
    border-radius: 999px 0 0 999px;
}
.gb-search-submit-btn {
    border-radius: 0 999px 999px 0;
}

.gb-hero-stat-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px;
    padding: 1.75rem 1.25rem;
    backdrop-filter: blur(6px);
}

.gb-hero-stat-strip {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.gb-hero-stat-strip > div {
    display: flex;
    flex-direction: column;
}
.gb-hero-stat-strip strong {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}
.gb-hero-stat-strip span {
    font-size: .78rem;
    color: rgba(255,255,255,.7);
}

/* Alibaba-style left category rail */
.gb-cat-rail {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    padding: .5rem;
    backdrop-filter: blur(6px);
    height: 100%;
}
.gb-cat-rail-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .6rem;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: background .15s ease;
}
.gb-cat-rail-item:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.gb-cat-rail-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #fff;
    flex-shrink: 0;
}
.gb-cat-rail-chevron {
    font-size: .65rem;
    opacity: .5;
}
.gb-cat-rail-more {
    color: var(--gb-orange);
    font-weight: 600;
    border-top: 1px solid rgba(255,255,255,.14);
    margin-top: .25rem;
    padding-top: .7rem;
}

/* Search bar with attached category dropdown (Alibaba-style) */
.gb-search-cat-btn {
    background: #f1f3f6;
    border: 0;
    border-radius: 0;
    color: #1f2937;
    font-size: .85rem;
    font-weight: 600;
    padding: 0 1.1rem;
    white-space: nowrap;
}
.gb-search-cat-btn:hover,
.gb-search-cat-btn:focus {
    background: #e5e8ee;
    color: #1f2937;
}
.gb-search-bar .dropdown-menu {
    max-height: 340px;
    overflow-y: auto;
    min-width: 240px;
    z-index: 1050;
}

.gb-hero-wave {
    height: 48px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.4);
    margin-top: -1px;
}

/* ---------------------------------------------------------------------- */
/* Categories                                                              */
/* ---------------------------------------------------------------------- */
.card { border-radius: 14px; }

.gb-category-card .card {
    border-radius: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.gb-category-card .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.1) !important;
}
.gb-category-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 6px 14px -4px rgba(0,0,0,.25);
    transition: transform .2s ease, box-shadow .2s ease;
}
.gb-category-card .card:hover .gb-category-icon {
    transform: scale(1.1) rotate(-4deg);
    box-shadow: 0 10px 20px -4px rgba(0,0,0,.3);
}

/* ---------------------------------------------------------------------- */
/* Feature cards + CTA band                                                */
/* ---------------------------------------------------------------------- */
.gb-feature-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #eef1f5;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.gb-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    border-color: transparent;
}
.gb-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--gb-orange), var(--gb-blue));
}

.gb-cta-band {
    background: linear-gradient(120deg, var(--gb-blue-dark) 0%, var(--gb-blue) 55%, #4c1d95 100%);
}

/* Hero trending panel (compact, sits on the right of the purple hero) */
.gb-hero-trending-panel {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 22px;
    padding: 1.1rem;
    backdrop-filter: blur(8px);
    max-width: 440px;
    margin: 0 auto;
}
.gb-hero-trending-label {
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .75rem;
}
.gb-hero-trending-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.gb-hero-trending-thumb {
    height: 250px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.gb-hero-trending-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gb-hero-carousel-nav { width: auto; opacity: 1; }
.gb-hero-carousel-nav.carousel-control-prev { left: -18px; }
.gb-hero-carousel-nav.carousel-control-next { right: -18px; }
.gb-carousel-arrow-sm { width: 34px; height: 34px; font-size: .8rem; }
.gb-carousel-indicators-light { margin-top: .85rem; }
.gb-carousel-indicators-light button { background-color: rgba(255,255,255,.4); }
.gb-carousel-indicators-light button.active { background-color: #fff; }

/* Shared carousel arrow + indicator styling */
.gb-carousel-arrow {
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--gb-orange);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--gb-shadow-soft);
    font-size: 1rem;
}
.carousel-control-prev, .carousel-control-next { width: auto; opacity: 1; }
.gb-carousel-indicators {
    position: static;
    margin-top: 1.5rem;
    gap: .4rem;
}
.gb-carousel-indicators button {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: #d8b4fe; opacity: 1; border: 0;
}
.gb-carousel-indicators button.active { background-color: var(--gb-orange); width: 22px; border-radius: 4px; }

/* Footer */
.gb-footer-link { color: rgba(255,255,255,.6); text-decoration: none; }
.gb-footer-link:hover { color: #fff; }
.gb-footer-social {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: background .15s ease;
}
.gb-footer-social:hover { background: var(--gb-orange); color: #fff; }

/* Product cards (catalog, search, related products) */
.gb-product-card { border-radius: 14px; transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.gb-product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08) !important; }
.gb-product-thumb { height: 180px; background: #f8f9fa; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.gb-product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gb-product-card:hover .gb-product-thumb img { transform: scale(1.08); }
.gb-product-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 1.5rem; }
.gb-product-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.6em; font-size: .92rem;
}
.gb-ta-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,.95);
    color: var(--gb-blue-dark);
    font-size: .65rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.gb-filters .form-label { margin-bottom: .25rem; }

/* RTL support hook — layout swaps to dir="rtl" per active language in later phases */
html[dir="rtl"] body { text-align: right; }

/* Installer wizard */
.gb-install-steps { max-width: 720px; margin: 0 auto; }
.gb-step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.gb-step-indicator .step {
    flex: 1;
    text-align: center;
    padding-bottom: .5rem;
    border-bottom: 3px solid #e5e7eb;
    color: #9ca3af;
    font-size: .85rem;
    font-weight: 600;
}
.gb-step-indicator .step.active,
.gb-step-indicator .step.done {
    border-color: var(--gb-orange);
    color: var(--gb-blue-dark);
}

/* Brand logo */
.gb-logo { height: 44px; width: auto; display: block; }
.gb-header .navbar-brand { padding: 0; }
.gb-logo-plate { display: inline-block; background: #fff; border-radius: 10px; padding: 6px 12px; }
.gb-logo-plate .gb-logo { height: 38px; }
@media (max-width: 576px) { .gb-logo { height: 36px; } }
