﻿/* ===== MESUKOSEI — LUXURY DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── Base ── */
html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    background-color: #fafafa;
    margin-bottom: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ── Selection highlight ── */
.card.selected {
    border: 1px solid #1a1a1a;
    background-color: #fafafa;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* ── Responsive containers ── */
@media (min-width: 768px) {
    .img-container { padding-top: 10px; }
    .centered-container { padding-top: 10px; }
}

@media (max-width: 300px) {
    .centered-container { padding-top: 10px; }
}

@media (min-width: 800px) {
    .centered-container { padding-top: 20px; }
}

/* ── Focus states ── */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* ── Cards — minimal, no color headers ── */
.card {
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: #fff !important;
    border-bottom: 1px solid #e8e8e8;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* ── Buttons — dark primary, sharp corners ── */
.btn-primary {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    border-radius: 2px;
    letter-spacing: 0.5px;
    font-weight: 400;
    padding: 10px 24px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #1a1a1a;
    border-color: #1a1a1a;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-outline-primary:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.btn-outline-dark {
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-outline-secondary {
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-outline-danger {
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-dark {
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-success {
    background-color: #2d6a4f;
    border-color: #2d6a4f;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.btn-success:hover {
    background-color: #1b4332;
    border-color: #1b4332;
}

/* ── Navbar — luxury header ── */
.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid #e8e8e8 !important;
    box-shadow: none !important;
}

.navbar-brand {
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #1a1a1a !important;
}

/* ── Forms — minimal borders ── */
.form-control,
.form-select {
    border-radius: 2px;
    border: 1px solid #d4d4d4;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* ── Badges — refined ── */
.badge.bg-danger {
    background-color: #c41e3a !important;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background-color: #2d6a4f !important;
}

.badge.bg-primary {
    background-color: #1a1a1a !important;
}

.badge.bg-info {
    background-color: #555 !important;
}

/* ── Stat cards — monochromatic ── */
.stat-card {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
    font-size: 1.25rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-top: 0.25rem;
}

/* ── Tables — editorial ── */
.table {
    font-size: 0.9rem;
}

.table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid #1a1a1a;
}

.table tbody td {
    vertical-align: middle;
    border-color: #f0f0f0;
}

/* ── Alerts — subtle ── */
.alert {
    border-radius: 2px;
    border: none;
    font-size: 0.875rem;
}

.alert-info {
    background-color: #f0f4f8;
    color: #1a1a1a;
}

.alert-success {
    background-color: #f0f7f4;
    color: #2d6a4f;
}

.alert-warning {
    background-color: #fdf6ec;
    color: #8a6d3b;
}

.alert-danger {
    background-color: #fdf0f0;
    color: #c41e3a;
}

/* ── Nav tabs — luxury style ── */
.nav-tabs {
    border-bottom: 1px solid #e8e8e8;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: #1a1a1a;
    border-bottom-color: #ccc;
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    background-color: transparent;
    font-weight: 500;
}

/* ── Offcanvas / desktop menu ── */
@media (min-width: 992px) {
    .offcanvas {
        position: static;
        visibility: visible !important;
        transform: none !important;
        flex-grow: 1;
        width: auto !important;
        height: auto !important;
        background: none !important;
        border: 0 !important;
    }

    .navbar-nav {
        flex-direction: row;
    }

    .nav-item {
        margin-left: 1rem;
    }

    .navbar-nav .dropdown-menu {
        position: absolute;
    }
}

/* Nav links */
.nav-link {
    padding: 0.8rem 1rem;
    border-radius: 0;
    transition: color 0.2s;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-link:hover {
    background-color: transparent;
    color: #1a1a1a;
}

.dropdown-item {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
}

/* Mobile-specific */
@media (max-width: 991.98px) {
    .offcanvas-body .nav-link {
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-menu {
        border: none;
        background: transparent;
        padding: 0;
    }

    .dropdown-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
}

/* ── Messaging ── */
.container-fluid {
    overflow: hidden;
}

.conversation-list {
    height: calc(100vh - 110px);
    overflow-y: auto;
}

#messageList {
    min-height: 0;
}

.message-sent,
.message-received {
    max-width: 70%;
    margin: 0.5rem 0;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
}

.message-sent .message-content {
    border-bottom-right-radius: 0.25rem;
}

.message-received .message-content {
    border-bottom-left-radius: 0.25rem;
}

/* Mobile chat layout */
@media (max-width: 768px) {
    .conversation-list-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background: white;
    }

    .chat-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background: white;
        display: none;
    }

    .chat-container.active {
        display: flex;
    }

    .mobile-back-button {
        display: block !important;
    }

    .conversation-list {
        height: calc(100vh - 130px);
    }

    .message-container {
        height: calc(100vh - 180px) !important;
    }
}

.mobile-back-button {
    display: none;
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.message-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#conversationUserImage {
    width: 32px;
    height: 32px;
}

#conversationUserName {
    font-size: 1rem;
    font-weight: 500;
}

/* ── Message app (shared buyer/seller) ── */
.message-app {
    max-width: 100%;
    background: #fafafa;
}

.message-app .search-box {
    position: relative;
}

.message-app .search-box .form-control {
    background: #f1f3f4;
    border: none;
    border-radius: 24px;
    padding: 12px 20px 12px 45px;
    font-size: 0.9rem;
}

.message-app .message-item {
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.message-app .message-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.message-app .message-item.selected {
    background-color: rgba(26, 26, 26, 0.04);
    border-left: 3px solid #1a1a1a;
}

.message-app .unread-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #1a1a1a;
    border: 2px solid white;
    border-radius: 50%;
}

/* Chat slide-in panel */
.chat-slide-panel {
    position: absolute;
    inset: 0;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 10;
}

.chat-slide-panel.show {
    transform: translateX(0);
}

/* Chat bubbles */
.chat-bubble {
    max-width: 80%;
    margin-bottom: 1rem;
    clear: both;
}

.chat-bubble-sent {
    float: right;
}

.chat-bubble-sent .chat-bubble-content {
    background: #1a1a1a;
    color: white;
    border-radius: 1.25rem;
    border-bottom-right-radius: 0.25rem;
    padding: 0.75rem 1rem;
}

.chat-bubble-received {
    float: left;
}

.chat-bubble-received .chat-bubble-content {
    background: #f0f2f5;
    color: #1a1a1a;
    border-radius: 1.25rem;
    border-bottom-left-radius: 0.25rem;
    padding: 0.75rem 1rem;
}

/* ── Footer ── */
.footer {
    background-color: #fff;
    color: #6c757d;
    padding: 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e8e8e8;
}

.footer a {
    color: #6c757d;
    text-decoration: none;
}

.footer a:hover {
    color: #1a1a1a;
}

/* ── Page transitions ── */
main {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Product hover ── */
.product-card img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover img {
    transform: scale(1.05);
}

/* ── Seller card ── */
.seller-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seller-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Processing overlay ── */
.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: none;
}

.processing-overlay.active {
    display: flex;
}

.processing-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 2px;
    color: #1a1a1a;
}

/* ── Tooltip badge cursor ── */
.badge[data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* ── Received message color ── */
.bg-pink {
    background-color: #f8e8ee;
    color: #1a1a1a;
}

/* ── Modal refinement ── */
.modal-content {
    border-radius: 2px;
    border: 1px solid #e8e8e8;
}

.modal-header {
    border-bottom: 1px solid #e8e8e8;
}

.modal-footer {
    border-top: 1px solid #e8e8e8;
}