* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif;
}

body {
    background-color: #e9eaed;
    color: #141823;
    font-size: 13px;
    line-height: 1.38;
}

a {
    color: #3b5998;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    text-decoration: underline;
}

/* Typography Helpers */
h3, h4 {
    color: #90949c;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

label {
    display: inline-block;
    margin-bottom: .5rem;
    margin-top: .5rem;
}

/* Global Navbar */
.top-nav {
    background-color: #3b5998;
    height: 42px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #133783;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    margin-right: 30px;
}

.logo {
    color: white !important;
    font-weight: bold;
    font-size: 24px;
    text-decoration: none !important;
    font-family: Tahoma, sans-serif;
    width: 180px;
    display: inline-block;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 3px;
    padding: 2px;
    flex: 1;
    max-width: 800px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 4px 6px;
    width: 100%;
    font-size: 12px;
}

.search-btn {
    background: #f6f7f9;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    border-left: 1px solid #ccc;
}

.nav-right {
    display: flex;
    align-items: center;
    color: white;
}

.nav-right a {
    color: white;
    font-weight: 600;
    padding: 0px 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-right a:hover {
    text-decoration: none;
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.nav-divider {
    height: 18px;
    width: 1px;
    background: #1a356e;
    margin: 0 5px;
}

.nav-icons {
    display: flex;
}

.icon-link {
    position: relative;
    font-size: 16px;
}

.notification::after {
    content: attr(data-count);
    position: absolute;
    top: 0px;
    right: 0px;
    background: #fa3e3e;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #c21111;
}

/* Notification Dropdown */
.notif-dropdown {
    display: none;
    position: absolute;
    top: 32px;
    right: -10px;
    width: 330px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    color: #141823;
}

.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid #ced4da;
    border-left: 1px solid #ced4da;
}

.chat-dropdown-custom::before {
    right: 52px;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.notif-header h4 {
    margin: 0;
    color: #141823;
    font-size: 14px;
    text-transform: none;
}

.notif-header a {
    font-size: 12px;
    font-weight: normal;
}

.notif-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.notif-list li {
    display: flex;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    border-radius: 0;
}

.notif-list li:hover {
    background-color: #f6f7f9;
}

.notif-list li.unread {
    background-color: #e7f3ff;
}

.notif-list li.unread:hover {
    background-color: #d8defa;
}

.notif-icon {
    width: 36px;
    height: 36px;
    background: #eef2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.notif-icon .text-primary { color: #007bff; }
.notif-icon .text-success { color: #28a745; }
.notif-icon .text-danger { color: #dc3545; }

.notif-content {
    flex: 1;
}

.notif-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.notif-content .time {
    font-size: 11px;
    color: #90949c;
    margin-top: 5px;
    display: block;
}

.notif-footer {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #e5e5e5;
    background: #f6f7f9;
    border-radius: 0 0 8px 8px;
}

.notif-footer a {
    font-weight: bold;
}

/* App Container (Layout 3 Column) */
.app-container {
    max-width: 1300px;
    margin: 54px auto 0;
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    gap: 15px;
    padding: 0 15px;
}

/* Common Card Style */
.card {
    background: #fff;
    border: 1px solid #dfe0e4;
    border-radius: 3px;
    margin-bottom: 15px;
}

.card-header {
    margin-bottom: .75rem;
}

/* Left Sidebar */
.left-sidebar {
    position: sticky;
    top: 54px;
    height: calc(100vh - 54px);
    overflow-y: auto;
}

.sidebar-profile {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info strong {
    font-size: 12px;
}

.profile-info .edit-profile {
    font-size: 11px;
    color: #90949c;
}

.nav-menu {
    list-style: none;
    margin-bottom: 15px;
}

.nav-menu li {
    padding: 4px 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 20px;
    transition: background 0.2s;
    cursor: pointer;
}

/* Parent container for collapse skips standard flex/padding */
.nav-menu li.collapse-parent {
    display: block;
    padding: 0;
}
.nav-menu li.collapse-parent:hover {
    background-color: transparent;
}

.menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 5px;
    border-radius: 20px;
}

/* Unified Hover and Active for pills */
.nav-menu li:not(.collapse-parent):hover,
.menu-toggle:hover,
.menu-toggle.active,
.submenu li:hover,
.submenu li.active {
    background-color: #007bff;
    color: #fff !important;
}

.nav-menu li:not(.collapse-parent):hover a,
.nav-menu li:not(.collapse-parent):hover .icon,
.nav-menu li:not(.collapse-parent):hover i,
.nav-menu li:not(.collapse-parent).active a,
.nav-menu li:not(.collapse-parent).active .icon,
.nav-menu li:not(.collapse-parent).active i,
.menu-toggle:hover .icon,
.menu-toggle:hover i,
.menu-toggle:hover span,
.menu-toggle:hover .caret,
.menu-toggle.active .icon,
.menu-toggle.active i,
.menu-toggle.active span,
.menu-toggle.active .caret,
.submenu li:hover .icon,
.submenu li:hover i,
.submenu li:hover span,
.submenu li.active .icon,
.submenu li.active i,
.submenu li.active span {
    color: #fff !important;
}

.nav-menu li:not(.collapse-parent).active {
    background-color: #007bff;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 28px;
}

.submenu li {
    padding: 4px 5px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 20px;
}

.nav-menu a {
    color: #141823;
    flex-grow: 1;
}

.badge {
    font-size: 11px;
}

.badge.gray {
    color: #90949c;
}

.nav-section {
    margin-bottom: 15px;
}

.nav-section h4 {
    margin-bottom: 5px;
    padding-left: 5px;
}

/* Center Feed */
.create-post {
    padding: 0;
}

.create-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    background: #f6f7f8;
    border-radius: 3px 3px 0 0;
}

.create-tabs a {
    padding: 8px 12px;
    color: #3b5998;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.create-tabs a.active {
    color: #141823;
    background: #fff;
    border-right: 1px solid #e5e5e5;
}

.create-input {
    display: flex;
    padding: 12px;
    gap: 10px;
}

.create-input textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    color: #90949c;
    height: 40px;
}

.create-footer {
    background: #f6f7f8;
    padding: 8px 12px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.btn {
    padding: 4px 12px;
    font-weight: bold;
    font-size: 12px;
    border-radius: 2px;
    cursor: pointer;
}

.btn-primary {
    background: #4267b2;
    border-color: #4267b2;
    color: #fff;
}

.btn-primary:hover {
    background: #365899;
}

.product-post {
    padding: 12px 0 0;
}

.post-header {
    display: flex;
    gap: 10px;
    padding: 0 12px 10px;
}

.poster-name {
    font-weight: bold;
}

.post-time {
    font-size: 11px;
    color: #90949c;
}

.post-content {
    font-size: 14px;
}

.product-title {
    font-weight: bold;
    padding: 0 12px;
}

.product-desc {
    padding: 5px 12px 10px;
}

.product-media {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
}

.product-media img {
    max-width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.product-details {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #4267b2;
}

.product-stock {
    color: #90949c;
    font-size: 12px;
}

.post-actions {
    display: flex;
    padding: 4px;
    border-bottom: 1px solid #e5e5e5;
}

.action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    color: #4b4f56;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
}

.action-btn:hover {
    background: #f6f7f8;
}

.post-comments {
    background: #f6f7f9;
    padding: 12px;
}

.comment {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.comment.reply {
    margin-left: 40px;
}

.comment-body {
    background: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid #dcdee3;
    display: inline-block;
}

.comment-name {
    font-weight: bold;
    margin-right: 5px;
}

.comment-meta {
    font-size: 11px;
    color: #90949c;
    margin-top: 2px;
    margin-left: 10px;
}

.comment-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #dcdee3;
    border-radius: 0; /* Classic square input */
    outline: none;
}

/* Right Sidebar */
.widget-header {
    background: #f6f7f8;
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-content {
    padding: 10px;
}

.cart-subtitle {
    color: #90949c;
    margin-bottom: 15px;
}

.cart-item {
    margin: 10px 0;
}

.cart-item-name {
    font-weight: bold;
    color: #141823;
}

.cart-item-price {
    color: #90949c;
}

.cart-separator {
    height: 1px;
    background: #e5e5e5;
    margin: 10px 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.btn-checkout {
    width: 100%;
}

.list-header {
    background: none;
    border-bottom: none;
    padding-bottom: 0;
}

.list-header h3 {
    display: flex;
    align-items: center;
    gap: 5px;
}

.list-header span {
    text-transform: none;
    font-weight: normal;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.trend-icon {
    font-size: 16px;
}

.trending-list a {
    font-weight: bold;
}

.trending-list p {
    color: #90949c;
    font-size: 11px;
}

.see-more {
    display: block;
    margin-top: 10px;
    font-size: 12px;
}

.footer-links {
    font-size: 11px;
    color: #90949c;
    margin-top: 20px;
    padding: 0 10px;
}

.footer-links a {
    color: #90949c;
}

.footer-links p {
    margin-top: 5px;
}

/* Helpers */
.profile-pic-small {
    width: 24px;
    height: 24px;
}

.profile-pic-medium {
    width: 40px;
    height: 40px;
}

/* Sticky Container (Trending & Footer) */
.sticky-container {
    position: sticky;
    top: 50px;
    z-index: 10;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton-card {
    background-color: #f8f9fa;
    border: 0 solid rgba(0,0,0,.125);
    border-radius: .25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    overflow: hidden;
}

.skeleton-anim {
    animation: shimmer 1.5s infinite linear;
    background: #f6f7f8;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 800px 100%;
}

.skeleton-header {
    height: 40px;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.skeleton-body {
    padding: 1.25rem;
    display: flex;
    gap: 10px;
    flex: 1;
}

.skeleton-text-container {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
}
.skeleton-text.title { height: 20px; width: 80%; margin-bottom: 5px; }
.skeleton-text.desc { width: 100%; }
.skeleton-text.short { width: 40%; }

.skeleton-avatar-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.skeleton-footer {
    height: 45px;
    border-top: 1px solid rgba(0,0,0,.05);
}
