:root {
    /* Core Brand Colors */
    --royal-red: #A51A04;
    --deep-red: #6C1103;
    --crown-gold: #EB9F1D;
    --light-gold: #F6D756;
    --copper: #B96317;

    /* Neutrals */
    --charcoal-black: #030102;
    --ivory: #F8F4E3;
    --champagne: #E0CCA3;
    --warm-brown: #674624;

    /* Optional Accents */
    --jewel-blue: #1E4055;
    --location-green: #327B17;

    /* Mapping to UI Components */
    --primary-color: var(--royal-red);
    --primary-dark: var(--deep-red);
    --secondary-color: var(--charcoal-black);
    --secondary-light: var(--warm-brown);
    --accent-color: var(--crown-gold);
    --dark-bg: var(--charcoal-black);
    --section-bg-alt: #0a0606;
    /* Slightly lighter charcoal for sectioning */
    --light-bg: #120c0c;
    /* New primary dark background */
    --card-bg: rgba(30, 20, 20, 0.4);
    /* Glassy dark card */
    --text-primary: #F8F4E3;
    /* Ivory text */
    --text-secondary: rgba(248, 244, 227, 0.7);
    --text-on-dark: var(--ivory);

    --glass-bg: rgba(248, 244, 227, 0.85);
    /* Ivory based glass */
    --glass-border: rgba(103, 70, 36, 0.1);
    /* Warm Brown based border */
    --shadow-soft: 0 10px 30px rgba(103, 70, 36, 0.15);
    --shadow-hover: 0 20px 40px rgba(103, 70, 36, 0.25);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--light-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--ivory);
}

/* Navbar Styles */
.navbar {
    background-color: transparent;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-brand {
    margin-right: 0 !important;
}

@media (min-width: 992px) {
    /*    .navbar {
        padding: 0.8rem 0;
    }*/
}

.navbar.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
    padding: 0.3rem 0;
}

@media (min-width: 992px) {
    .navbar.scrolled {
        padding: 0.5rem 0;
    }
}

.brand-text {
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-link {
    color: rgba(248, 244, 227, 0.8) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.75rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #FFFFFF !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar-toggler-icon-custom {
    font-size: 1.5rem;
}

/* Custom Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8000 100%);
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 5px 15px rgba(165, 26, 4, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(233, 78, 27, 0.4);
    color: white;
}

.btn-premium-outline {
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-premium-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Base Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--copper);
}

.glass {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transition: all 0.3s ease;
}

.glass:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: var(--crown-gold) !important;
    box-shadow: 0 0 15px rgba(235, 159, 29, 0.2) !important;
    outline: none;
}

.glass::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

select.glass option {
    background-color: var(--light-bg) !important;
    color: white !important;
}

.footer-premium {
    background-color: var(--secondary-color);
    color: white;
    position: relative;
    clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
    margin-top: 2rem;
    padding-top: 2rem !important;
    /* compensate for clip-path */
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    color: white;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Scroll Top Button */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: var(--shadow-hover);
    display: none;
    /* JS will toggle */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-scroll-top:hover {
    transform: translateY(-5px);
    background-color: var(--primary-dark);
}

/* Glass Card Enhanced (Merged above) */
.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--copper);
    letter-spacing: -0.5px;
}

.product-unit {
    font-size: 0.85rem;
    color: var(--warm-brown);
    opacity: 0.7;
    margin-left: 4px;
}

/* Feature Icons */
.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(233, 78, 27, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.glass-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #FF8000);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out forwards;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in-left {
    transform: translateX(-30px);
}

.animate-on-scroll.fade-in-right {
    transform: translateX(30px);
}

.animate-on-scroll.fade-in-up {
    transform: translateY(30px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Premium Loader */
.premium-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 2rem;
}

.premium-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid var(--royal-red);
    border-radius: 50%;
    animation: loader-spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--crown-gold);
    animation-delay: -0.3s;
}

.loader-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #FF8000;
    animation-delay: -0.6s;
}

.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    animation: loader-pulse 2s ease-in-out infinite;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--crown-gold);
    letter-spacing: 5px;
    font-size: 0.8rem;
    text-transform: uppercase;
    animation: loader-fade 2s ease-in-out infinite;
}

@keyframes loader-fade {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Blazor Error UI (Preserved) */
#blazor-error-ui {
    background: #FFF3CD;
    color: #856404;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Layout Styles */
.public-layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-content {
    flex: 1;
    padding-top: 90px;
    /* Space for fixed navbar */
}

/* Dark Navigation Effects */
.dark-glass {
    background: linear-gradient(to bottom, rgba(3, 1, 2, 0.95), rgba(3, 1, 2, 0.85)) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(3, 1, 2, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 992px) {
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-toggler {
        display: none !important;
        /* Hide toggler on mobile as requested */
    }
}

.logo-img {
    filter: drop-shadow(0 0 10px rgba(178, 34, 34, 0.5));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 100%;
}

.bottom-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary-color);
}

.bottom-nav-link.active i {
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .public-content {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    .btn-scroll-top {
        bottom: 90px;
        /* Move above bottom nav */
    }
}

/* Sidebar & Admin Styles (Preserved/Updated) */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar {
    background-image: linear-gradient(180deg, var(--dark-bg) 0%, #16213e 70%);
    color: white;
}

.top-row {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: auto;
    display: flex;
    align-items: center;
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
        height: 100vh;
    }

    .sidebar {
        width: 220px;
        height: 100vh;
        position: sticky;
        top: 0;
        overflow-x: hidden !important;
        background-color: var(--dark-bg);
        display: flex;
        flex-direction: column;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 10;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: rgba(178, 34, 34, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid rgba(178, 34, 34, 0.2);
}

.process-step h5 {
    color: white;
    font-weight: 600;
}

/* Admin NavMenu Styles */
.nav-item {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
}

.nav-item ::deep a {
    color: rgba(248, 244, 227, 0.7);
    border-radius: 12px;
    margin: 0.3rem 0;
    padding: 0.9rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item ::deep a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-item ::deep a.active {
    background: linear-gradient(90deg, rgba(165, 26, 4, 0.15) 0%, transparent 100%);
    color: var(--crown-gold);
    border-left: 3px solid var(--crown-gold);
}

/* Global Dropdown Polish */
.premium-input-sm option {
    background-color: #1a1515 !important;
    color: white !important;
    padding: 10px;
}

select.premium-input-sm {
    cursor: pointer;
}

.nav-item ::deep a.active i {
    color: var(--crown-gold);
    filter: drop-shadow(0 0 8px rgba(235, 159, 29, 0.5));
}

/* Pin Logout to Bottom using Flexbox */
.nav-scrollable nav {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.nav-item:last-child {
    margin-top: auto;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

/* Custom Scrollbar for Sidebar */
.nav-scrollable {
    scrollbar-width: thin;
    scrollbar-color: var(--crown-gold) rgba(0, 0, 0, 0.2);
    overflow-x: hidden !important;
}

.nav-scrollable::-webkit-scrollbar {
    width: 3px;
    height: 0;
}

.nav-scrollable::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.nav-scrollable::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--crown-gold) 0%, var(--copper) 100%);
    border-radius: 10px;
}

.nav-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--light-gold);
}

/* Responsive Branding in Header */
.brand-title-responsive {
    font-size: 1.2rem;
}

.brand-tagline-responsive {
    font-size: 0.45rem;
}

.mobile-logo-adj {
    height: 55px;
}

@media (min-width: 576px) {
    .brand-title-responsive {
        font-size: 1.5rem;
    }

    .brand-tagline-responsive {
        font-size: 0.55rem;
    }

    .mobile-logo-adj {
        height: 75px;
    }
}

@media (min-width: 768px) {
    .brand-title-responsive {
        font-size: 1.85rem;
    }

    .brand-tagline-responsive {
        font-size: 0.65rem;
    }
}

/* Hero & FAQ Responsive Polish */
.mobile-hero-title {
    font-size: 2.2rem !important;
}

@media (min-width: 768px) {
    .mobile-hero-title {
        font-size: 3.5rem !important;
    }
}

@media (min-width: 992px) {
    .mobile-hero-title {
        font-size: 4.5rem !important;
    }
}

.faq-grid h6 {
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .faq-grid h6 {
        font-size: 1.1rem;
    }
}

/* Text Truncation Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}