:root {
    --primary-color: #0056b3; /* Blue for progress bars and primary actions */
    --primary-light: #e6f0fa;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --bg-main: #f7f8fa; /* Soft gray background */
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #e6f4ea;
    --success-text: #137333;
    --danger-color: #fce8e6;
    --danger-text: #c5221f;
    --warning-color: #fef7e0;
    --warning-text: #b06000;
    
    --sidebar-width: 280px;
    --navbar-height: 64px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Top Navbar */
.top-navbar {
    background-color: #000;
    color: white;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nav-left a:hover {
    color: #ccc;
}

.nav-brand .brand-logo {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.icon-btn {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 0.8;
}

.mobile-menu-toggle {
    display: none;
    color: white;
}

/* Layout */
.layout-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
    min-height: calc(100vh - var(--navbar-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
}

.sidebar-nav {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-item {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: var(--bg-main);
}

.nav-item.active {
    background-color: #f0f0f0; /* specific gray from screenshot */
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    min-width: 0;
}

/* General Card */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* Loader */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #000;
    color: white;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-outline {
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-main);
}

.btn-danger-outline {
    border: 1px solid #ffcccc;
    background-color: #fff5f5;
    color: var(--danger-text);
}

.btn-danger-outline:hover {
    background-color: #ffe5e5;
}

.btn-blue {
    background-color: #0066ff;
    color: white;
}
.btn-blue:hover {
    background-color: #0052cc;
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-blue { background-color: var(--primary-light); color: var(--primary-color); }
.badge-green { background-color: var(--success-color); color: var(--success-text); }
.badge-red { background-color: var(--danger-color); color: var(--danger-text); }
.badge-yellow { background-color: var(--warning-color); color: var(--warning-text); }

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #a0a0a0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Page Titles */
.page-header {
    margin-bottom: 2rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Utility Classes */
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .layout-wrapper {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .sidebar {
        width: 100%;
        display: none; /* Hide by default on mobile, toggled by JS */
    }
    
    .sidebar.mobile-open {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-left, .nav-brand {
        display: none; /* Simplify navbar on mobile */
    }

    .top-navbar {
        justify-content: flex-end; /* Push right items to end */
    }
    
    /* Show brand in center on mobile if we want, but let's just make it simple */
    .nav-brand {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .nav-brand .brand-logo { font-size: 1.2rem; letter-spacing: 0.2rem; }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.dashboard-card:hover {
    border-color: #000;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-card svg {
    color: #666;
    transition: color 0.2s;
}

.dashboard-card:hover svg {
    color: #000;
}

.dashboard-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Progress Tracker */
.progress-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 3rem 0 1rem;
    padding: 0 1rem;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 24px;
    right: 24px;
    height: 2px;
    background-color: var(--border-color);
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 4px solid var(--bg-white);
    transition: all 0.3s;
}

.progress-step.active .step-marker, 
.progress-step.completed .step-marker {
    background-color: var(--primary-color);
}

.progress-step.active ~ .progress-step::before {
   /* We use JS or specific class to color the line between steps if needed, 
      but a simpler way is a separate element or a linear gradient on the tracker's ::before */
}

.step-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--text-main);
}

/* Connect lines (simplistic approach via pseudo-elements) */
.progress-step:not(:first-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: -1;
}
.progress-step.completed:not(:first-child)::after,
.progress-step.active:not(:first-child)::after {
    background-color: var(--primary-color);
}

/* Order Cards */
.order-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.order-id {
    font-size: 1.1rem;
    font-weight: 700;
}

.order-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.order-product {
    background-color: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: #444;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dotted var(--border-color);
}

.order-price {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Product/Wishlist Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-image-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: var(--bg-main);
    margin-bottom: 1rem;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.remove-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.remove-btn:hover {
    color: var(--danger-text);
}

.product-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-price {
    font-weight: 600;
}

/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle-btn {
    background-color: #f9a826; /* Orange color from design */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background-color 0.3s;
    position: relative;
    z-index: 2;
}

.chatbot-toggle-btn:hover {
    transform: scale(1.05);
    background-color: #e6951f;
}

.chatbot-window {
    position: absolute;
    bottom: 76px; /* slightly above the button */
    right: 0;
    width: 380px;
    height: 550px;
    background-color: #fcfcfc;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    transform-origin: bottom right;
    border: 1px solid #eaeaea;
    z-index: 1;
}

.chatbot-window.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.9) translateY(20px);
}

.chatbot-header {
    background-color: #fcfcfc;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}

/* Add a subtle premium badge background behind header */
.chatbot-header::before {
    content: "Premium";
    position: absolute;
    top: -20px;
    left: 20px;
    background: #fff;
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    color: #1a1a1a;
    border: 1px solid #eaeaea;
    border-bottom: none;
    z-index: -1;
}

.chatbot-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    position: relative;
    width: 48px;
    height: 48px;
}

.chatbot-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #4caf50;
    border: 2px solid white;
    border-radius: 50%;
}

.chatbot-info h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.chatbot-info p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.chatbot-close-btn {
    color: #666;
    padding: 0.5rem;
}

.chatbot-close-btn:hover {
    color: #000;
}

.chatbot-body {
    flex-grow: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #fcfcfc;
}

/* Scrollbar styles for chat body */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}
.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-body::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 10px;
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}
.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.chat-message.user .message-avatar {
    display: none; /* Usually user doesn't have an avatar in this design */
}

.message-content {
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    border-radius: 16px;
    position: relative;
}

.chat-message.bot .message-content {
    background-color: #f8f9fa;
    color: #1a1a1a;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-message.user .message-content {
    background-color: #f9b84e; /* Orange user bubble */
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chat-option-btn {
    background-color: white;
    border: 1px solid #fbd38d; /* Light orange border */
    color: #f6ad55; /* Orange text */
    padding: 0.75rem 1rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.chat-option-btn:hover {
    background-color: #fffaf0;
}

.chatbot-footer {
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #eaeaea;
}

.chatbot-footer.hidden {
    display: none;
}

.chatbot-input-container {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.25rem;
    transition: border-color 0.2s;
}

.chatbot-input-container:focus-within {
    border-color: #cbd5e1;
}

.country-code select {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 0.5rem;
    outline: none;
    color: #333;
    border-right: 1px solid #e2e8f0;
    margin-right: 0.5rem;
}

#chatbot-input {
    flex-grow: 1;
    border: none;
    padding: 0.5rem;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
}

.chatbot-send-btn {
    background-color: #f9a826;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-left: 0.25rem;
}

.chatbot-send-btn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
}

.chatbot-send-btn:not(:disabled):hover {
    background-color: #e6951f;
}

.chatbot-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 10;
}

.chatbot-success.hidden {
    display: none;
}

.success-illustration {
    width: 150px;
    margin-bottom: 1rem;
}

.success-icon {
    margin-bottom: 1rem;
}

.chatbot-success h2 {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.chatbot-success p {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.reach-us {
    font-style: italic;
}

.reach-us strong {
    color: #f9a826;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 5rem;
        height: 80vh;
        max-height: 600px;
    }
}
