:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --header-height: 60px;
    --bottom-nav-height: 70px;
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-area-top: 0px;
    --safe-area-bottom: 0px;
}

/* Support for devices with notches */
@supports (padding-top: env(safe-area-inset-top)) {
    :root {
        --safe-area-top: env(safe-area-inset-top);
        --safe-area-bottom: env(safe-area-inset-bottom);
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ========== MOBILE HEADER ========== */
.mobile-header {
    height: calc(var(--header-height) + var(--safe-area-top));
    padding-top: var(--safe-area-top);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1040;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mobile-header .btn {
    border: none;
    background: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-header .btn:hover,
.mobile-header .btn:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ========== SIDE NAVIGATION ========== */
.side-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.side-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.side-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 1051;
    transition: var(--transition-smooth);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.side-nav.show {
    left: 0;
}

.side-nav-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu-item {
    margin: 0;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition-fast);
    border-left: 4px solid transparent;
}

.nav-menu-link:hover,
.nav-menu-link.active {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.nav-menu-link i {
    font-size: 1.2rem;
    width: 24px;
    margin-right: 12px;
}

.nav-menu-link span {
    font-weight: 500;
    flex: 1;
}

.nav-menu-link .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.nav-menu-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 1rem 1.5rem;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-top: calc(var(--header-height) + var(--safe-area-top));
    margin-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - var(--safe-area-top) - var(--safe-area-bottom));
    padding: 0;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e9ecef;
    z-index: 1030;
}

.bottom-nav-container {
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: none;
    border: none;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: var(--transition-fast);
}

.bottom-nav-item span {
    line-height: 1;
    margin-top: 2px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.05);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* ========== CONTAINERS AND LAYOUT ========== */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.page-container {
    padding: 1rem;
    max-width: 100%;
}

.page-header {
    background: white;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--box-shadow);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.page-subtitle {
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition-fast);
    background: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background-color: transparent;
    border-top: 1px solid #f8f9fa;
}

/* ========== PRODUCT CARDS ========== */
.product-card {
    margin-bottom: 1rem;
    cursor: pointer;
}

.product-card .card-img-top {
    height: 160px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

.product-quantity {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
}

.btn-outline-success {
    border: 2px solid var(--success-color);
    color: var(--success-color);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: white;
}

.btn-floating {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1020;
    border: none;
    background: var(--success-color);
    color: white;
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* ========== FORMS ========== */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition-fast);
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    border: 2px solid #e9ecef;
    border-right: none;
}

.form-floating {
    margin-bottom: 1rem;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    padding: 1rem 0.75rem;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

/* ========== SEARCH AND FILTERS ========== */
.search-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem;
    box-shadow: var(--box-shadow);
}

.search-input {
    position: relative;
}

.search-input .form-control {
    padding-left: 3rem;
    border-radius: 25px;
    background-color: #f8f9fa;
    border: none;
}

.search-input .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 5;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-chip.active {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.filter-chip:hover {
    background-color: #e9ecef;
}

.filter-chip.active:hover {
    background-color: #218838;
}

/* ========== CHAT UI ========== */
.chat-container {
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 120px);
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-end;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.sent {
    flex-direction: row-reverse;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    margin-left: 1rem;
    border-radius: 18px 18px 4px 18px;
}

.message.received .message-bubble {
    background-color: white;
    color: var(--dark-color);
    margin-right: 1rem;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-bubble {
    max-width: 75%;
    padding: 1rem 1.25rem;
    word-wrap: break-word;
    position: relative;
}

.message-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
    text-align: center;
}

.chat-input-container {
    background: white;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* ========== LISTS ========== */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f8f9fa;
    padding: 1rem 1.5rem;
    background: white;
    transition: var(--transition-fast);
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* ========== ALERTS AND NOTIFICATIONS ========== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(231, 74, 59, 0.1) 100%);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* ========== LOADING STATES ========== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .card-img-top {
        height: 120px;
    }
    
    .product-card .card-img-top {
        height: 100px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .page-container {
        padding: 0.75rem;
    }
    
    .search-container {
        margin: 0.75rem;
        padding: 1rem;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 0.75rem 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .card-img-top {
        height: 100px;
    }
    
    .product-card .card-img-top {
        height: 80px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .page-container {
        padding: 0.5rem;
    }
    
    .search-container {
        margin: 0.5rem;
        padding: 0.75rem;
    }
    
    .chat-container {
        height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 100px);
        padding: 0.75rem;
    }
    
    .message-bubble {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .btn-floating {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        bottom: calc(var(--bottom-nav-height) + 15px);
        right: 15px;
    }
    
    .filter-chip {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== TOUCH IMPROVEMENTS ========== */
.btn,
.bottom-nav-item,
.nav-menu-link,
.card {
    touch-action: manipulation;
}

/* ========== UTILITY CLASSES ========== */
.text-success-custom {
    color: var(--success-color) !important;
}

.bg-success-custom {
    background-color: var(--success-color) !important;
}

.border-success-custom {
    border-color: var(--success-color) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

.shadow-custom {
    box-shadow: var(--box-shadow) !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Product Cards */
.product-card {
    margin-bottom: 1rem;
}

.product-card .card-img-top {
    height: 180px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--success-color);
}

.product-quantity {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* User Profile Cards */
.user-profile-card {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    border-radius: var(--border-radius);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    border-color: #dee2e6;
}

/* Chat UI */
.chat-container {
    height: 60vh;
    overflow-y: auto;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.message.sent {
    flex-direction: row-reverse;
}

.message.sent .message-bubble {
    background-color: var(--success-color);
    color: white;
    margin-left: 1rem;
}

.message.received .message-bubble {
    background-color: #e9ecef;
    color: var(--dark-color);
    margin-right: 1rem;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

/* Search and Filters */
.search-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.filter-chip {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: var(--light-color);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.filter-chip:hover {
    background-color: #e9ecef;
}

.filter-chip.active:hover {
    background-color: #218838;
}

/* Dashboard Stats */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Location Display */
.location-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Voice Recording */
.voice-recorder {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
}

.voice-recorder.recording {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.record-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background-color: var(--danger-color);
    color: white;
    font-size: 2rem;
    transition: all 0.2s ease-in-out;
}

.record-button:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.record-button.recording {
    background-color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Expert Articles */
.article-card {
    border-left: 4px solid var(--success-color);
    transition: border-left-color 0.2s ease-in-out;
}

.article-card:hover {
    border-left-color: #218838;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .product-card .card-img-top {
        height: 120px;
    }
    
    .btn-floating {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card {
        margin-bottom: 0.75rem;
    }
    
    .search-container {
        padding: 0.75rem;
    }
    
    .chat-container {
        height: 50vh;
        padding: 0.75rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Success/Error States */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--success-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* Utility Classes */
.text-success-custom {
    color: var(--success-color) !important;
}

.bg-success-custom {
    background-color: var(--success-color) !important;
}

.border-success-custom {
    border-color: var(--success-color) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

.shadow-custom {
    box-shadow: var(--box-shadow) !important;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for better accessibility */
.btn:focus,
.form-control:focus,
.filter-chip:focus {
    outline: 2px solid var(--success-color);
    outline-offset: 2px;
}

/* ===== MOBILE PAGE LAYOUTS ===== */
.mobile-page {
    min-height: 100vh;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    background-color: #f8f9fa;
}

.page-container {
    padding: 0 16px;
    max-width: 100%;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 4px 0 0;
}

/* ===== PROFILE HEADER ===== */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ===== STATS CARDS ===== */
.stats-section {
    border-bottom: 1px solid #e9ecef;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions-section {
    background-color: #f8f9fa;
}

.quick-action-card {
    background: white;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.quick-action-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.quick-action-card span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    background: white;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.content-section .section-header {
    padding: 16px 16px 0;
}

/* ===== MOBILE GRIDS ===== */
.mobile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #212529;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-quantity {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0 0 8px;
}

.product-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.product-actions {
    display: flex;
    gap: 4px;
    padding: 0 12px 12px;
}

.action-btn {
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    font-size: 0.875rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.action-btn.text-danger:hover {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    padding: 16px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 12px;
    color: #6c757d;
    z-index: 10;
}

.search-bar input {
    padding-left: 40px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    height: 44px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.chip {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip.active,
.chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== ARTICLE LAYOUTS ===== */
.article-list {
    padding: 0 16px 16px;
}

.article-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.article-content {
    flex: 1;
}

.article-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #212529;
    line-height: 1.4;
}

.article-preview {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 8px;
    line-height: 1.4;
}

.article-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.article-date {
    display: flex;
    align-items: center;
}

.article-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #495057;
}

.empty-description {
    font-size: 0.875rem;
    margin: 0 0 20px;
    color: #6c757d;
}

.empty-state-mini {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.875rem;
}

.empty-state-mini i {
    font-size: 2rem;
    color: #dee2e6;
    display: block;
    margin-bottom: 8px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.hero-content {
    max-width: 400px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 280px;
    margin: 0 auto;
}

/* ===== QUICK ACTIONS GRID ===== */
.quick-actions-section {
    background: white;
    padding: 24px 0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quick-action-item {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-action-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
    color: white;
}

.action-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.action-subtitle {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ===== FEATURES GRID ===== */
.features-section {
    background: #f8f9fa;
    padding: 32px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.25rem;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #212529;
}

.feature-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

/* ===== PRODUCTS SCROLL ===== */
.products-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 0 16px 16px;
    scroll-snap-type: x mandatory;
}

.products-scroll::-webkit-scrollbar {
    height: 4px;
}

.products-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.products-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.product-scroll-item {
    flex: 0 0 140px;
    scroll-snap-align: start;
}

.product-card-mini {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 180px;
    display: flex;
    flex-direction: column;
}

.product-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-image-mini {
    height: 100px;
    overflow: hidden;
}

.product-image-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-mini {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title-mini {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #212529;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-price-mini {
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.product-quantity-mini {
    font-size: 0.625rem;
    color: #6c757d;
}

/* ===== ARTICLES LIST ===== */
.articles-preview-section {
    background: white;
    padding: 24px 0;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.article-card-mini {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.article-content-mini {
    width: 100%;
}

.article-title-mini {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #212529;
    line-height: 1.3;
}

.article-preview-mini {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 8px;
    line-height: 1.4;
}

.article-meta-mini {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    padding: 32px 0;
    text-align: center;
}

.cta-content {
    max-width: 320px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.cta-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}

/* ===== PRODUCT PAGE STYLES ===== */
.product-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.back-btn,
.share-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover,
.share-btn:hover {
    background: #e9ecef;
}

.product-page-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
    text-align: center;
    flex: 1;
    padding: 0 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-image-section {
    margin-top: 56px;
    position: relative;
}

.product-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-btn-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn-overlay:hover {
    background: white;
    transform: scale(1.1);
}

.voice-note-section {
    background: white;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.voice-note-player {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
}

.voice-note-player i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.voice-note-player span {
    font-weight: 500;
    color: #495057;
}

.voice-note-player audio {
    flex: 1;
    height: 32px;
}

.product-info-section {
    background: white;
    padding: 24px 0;
}

.product-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 16px;
    color: #212529;
    line-height: 1.3;
}

.product-price-section {
    margin-bottom: 24px;
}

.price-main {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.price-unit {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 4px;
}

.product-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-item i {
    font-size: 1.25rem;
}

.meta-item div {
    flex: 1;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.meta-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.product-description {
    margin-bottom: 24px;
}

.product-description h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212529;
}

.product-description p {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

.seller-section {
    background: white;
    padding: 24px 0;
    border-top: 8px solid #f8f9fa;
}

.seller-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

.seller-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-initial {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.seller-details {
    flex: 1;
}

.seller-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #212529;
}

.seller-location,
.seller-phone {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
}

.seller-actions {
    display: flex;
    gap: 8px;
}

.seller-loading {
    text-align: center;
    padding: 20px;
}

.similar-products-section {
    background: white;
    padding: 24px 0;
    border-top: 8px solid #f8f9fa;
}

.product-actions-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 50;
}

.action-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.secondary-actions {
    display: flex;
    gap: 8px;
}

.secondary-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 8px 12px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (min-width: 768px) {
    .page-container {
        max-width: 480px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .page-container {
        max-width: 600px;
    }
}
