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

:root {
    --primary-blue: #4a5fc1;
    --dark-blue: #2d3a8f;
    --light-gray: #f5f7fa;
    --dark-gray: #6b7280;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --danger-red: #dc2626;
    --danger-red-dark: #b91c1c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #fff;
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    position: relative;
}

/* ======================== Sidebar ======================== */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    cursor: pointer;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff9800, #f44336);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.navigation h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navigation ul {
    list-style: none;
    margin-bottom: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    color: var(--dark-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}
/* ======================== User Section ======================== */
#userSection {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    width: 100%;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--light-gray);
    border-radius: 8px;
    text-align: center;
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.user-info {
    width: 100%;
}

.user-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.user-info p {
    font-size: 12px;
    color: var(--dark-gray);
    margin: 4px 0 0 0;
}

/* ======================== Login Button ======================== */
.btn-login {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4a5fc1 0%, #2d3a8f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* User Profile Card */
.user-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--light-gray);
    border-radius: 8px;
    text-align: center;
}

.user-avatar-large {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

/* Logout Button */
.btn-logout {
    width: 100%;
    padding: 10px 12px;
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-logout:hover {
    background-color: #ee5a6f;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.btn-logout:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 16px;
}

/* ======================== Main Content ======================== */
.main-content {
    flex: 1;
    margin-left: 240px;
    width: calc(100% - 240px);
    max-width: 100%;
    overflow-y: auto;
    background-color: #fff;
    padding: 20px;
}

.header-banner {
    background-color: #4a5fc1;
    color: white;
    padding: 40px 32px;
    text-align: center;
    border-radius: 20px;
    margin: 24px 20px 24px 20px;
}

.header-banner h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header-banner p {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.95;
}

/* ======================== Search & Filter ======================== */
.search-filter-section {
    padding: 24px 48px 32px 48px;
    margin-left: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 16px;
    color: var(--dark-gray);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    background-color: var(--light-gray);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.1);
}

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

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.1);
}

.btn-refresh {
    padding: 10px 24px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
}

.btn-clear-favorites {
    padding: 10px 24px;
    background-color: var(--danger-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-clear-favorites:hover {
    background-color: var(--danger-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ======================== Categories ======================== */
.categories-section {
    padding: 12px 20px 40px 20px;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.category-select-wrapper {
    display: none;
}

.category-select {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    background-color: white;
    margin-top: 10px;
}

.category-card {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    font-size: 13px;
    background-color: white;
    white-space: nowrap;
    height: 40px;
}

.category-card:hover {
    border-color: var(--primary-blue);
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 95, 193, 0.15);
}

.category-card.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    font-weight: 600;
}

.category-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-card.active .category-icon {
    color: white;
}

.category-card:not(.active) .category-icon {
    color: var(--primary-blue);
}

.count {
    font-size: 11px;
    background-color: rgba(74, 95, 193, 0.15);
    color: var(--primary-blue);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.category-card.active .count {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ======================== Scroll to Top Button ======================== */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
    z-index: 98;
}

.scroll-to-top.visible {
    display: flex;
    opacity: 1;
}

.scroll-to-top:hover {
    background-color: var(--dark-blue);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(74, 95, 193, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}


.products-section {
    padding: 24px 20px 48px 20px;
    margin-left: 0;
    max-width: 100%;
}

.products-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--dark-gray);
    aspect-ratio: 1;
    overflow: hidden;
}

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

.product-info {
    padding: 16px;
}

.product-badge {
    display: inline-block;
    background-color: var(--light-gray);
    color: var(--primary-blue);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.product-seller {
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

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

.product-actions button {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background-color: var(--primary-blue);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.product-actions button:hover {
    background-color: var(--dark-blue);
}

/* ======================== My Sales Cards ======================== */
.my-sales-grid {
    padding: 24px 48px 48px;
}

.my-sales-empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 48px;
    color: #6b7280;
}

.my-sales-empty-state h3,
.marketplace-empty-state h3 {
    margin: 8px 0;
    font-size: 22px;
    color: var(--text-color);
}

.my-sales-empty-state p,
.marketplace-empty-state p {
    margin: 0;
    color: #6b7280;
}

.my-sales-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.marketplace-empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 56px 20px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    color: #6b7280;
    background: #fafbff;
}

.marketplace-empty-state i {
    font-size: 46px;
    margin-bottom: 12px;
    opacity: 0.45;
}

.marketplace-warning-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #f2c878;
    background: #fff7e6;
    color: #8a5b00;
    font-size: 14px;
    line-height: 1.4;
}

.marketplace-error-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 56px 20px;
    border: 1px dashed #f5b27d;
    border-radius: 14px;
    color: #7b4f23;
    background: #fff9f2;
}

.marketplace-error-state h3 {
    margin: 10px 0 8px;
    font-size: 22px;
    color: #7b4f23;
}

.marketplace-error-state i {
    color: #e67e22;
    font-size: 2.5em;
    margin-bottom: 12px;
}

.marketplace-error-state p {
    margin: 0;
    color: #8a6239;
}

.marketplace-error-state p span {
    display: inline-block;
    margin-top: 4px;
    color: #8f8f8f;
    font-size: 0.9em;
}

.marketplace-error-state button {
    margin-top: 1em;
    padding: 0.5em 1.5em;
    font-size: 1em;
    border: 1px solid #b7791f;
    background: #b7791f;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.marketplace-error-state button:hover {
    background: #8f5c18;
    border-color: #8f5c18;
}

.loading-card {
    pointer-events: none;
}

.skeleton-block,
.skeleton-line {
    background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: unimartSkeleton 1.2s infinite linear;
    border-radius: 8px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-badge {
    width: 32%;
    height: 18px;
}

.skeleton-title {
    width: 86%;
    height: 16px;
}

.skeleton-price {
    width: 44%;
    height: 18px;
}

.skeleton-meta {
    width: 60%;
    height: 12px;
}

.skeleton-button {
    width: 100%;
    height: 34px;
    margin-bottom: 0;
}

.skeleton-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

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

.my-sales-start-selling-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 16px;
    background-color: var(--primary-blue);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.sale-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.sale-status-badge {
    color: #fff;
}

.sale-status-badge.status-active {
    background-color: #f59e0b;
}

.sale-status-badge.status-sold {
    background-color: #10b981;
}

.sale-status-badge.status-withdrawn {
    background-color: #6b7280;
}

.sale-meta-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.admin-owner-line {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    margin-bottom: 2px;
    word-break: break-word;
}

.sales-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stat-box {
    min-width: 118px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.1;
}

.stat-number-loading {
    color: #9ca3af;
}

.admin-access-section {
    margin: 20px 48px 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.admin-access-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.admin-access-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-access-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.admin-access-row button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 900px) {
    .sales-stats {
        justify-content: flex-start;
        width: 100%;
    }

    .stat-box {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 0;
    }
}

.admin-email-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.admin-email-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #374151;
}

.admin-tag {
    background: #e0ecff;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
}

.admin-remove-btn {
    border: 1px solid #ef4444;
    background: #fff;
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
}

.admin-remove-btn:hover {
    background: #fee2e2;
}

.favorites-empty-hint {
    font-size: 14px;
    margin-top: 8px;
}

.favorite-image-wrapper {
    position: relative;
    cursor: pointer;
}

.favorite-unavailable-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.favorite-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.favorite-status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.favorite-status-pill.status-available {
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
}

.favorite-status-pill.status-unavailable {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.14);
}

.favorite-remove-btn {
    background-color: #ef4444;
}

.favorite-remove-btn:hover {
    background-color: #dc2626;
}

.my-sales-grid .product-image,
.my-sales-grid .product-title {
    cursor: pointer;
}

@media (max-width: 768px) {
    .my-sales-grid {
        padding: 16px;
    }

    .admin-access-section {
        margin: 16px;
    }

    .admin-access-row {
        flex-direction: column;
    }
}

/* ======================== Scrollbar ======================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

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

/* ======================== Responsive ======================== */
@media (max-width: 768px) {
    /* Hide sidebar on mobile */
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 0;
    }

    /* Header adjustments - more compact */
    .header-banner {
        padding: 20px 16px; /* Even more compact */
        margin: 12px 16px 16px; /* Reduced margins */
        border-radius: 12px; /* Smaller radius */
    }

    .header-banner h1 {
        font-size: 22px; /* Smaller title */
    }

    .header-banner p {
        font-size: 13px; /* Smaller subtitle */
    }

    /* Search bar - primary focus with clean spacing */
    .search-filter-section {
        padding: 16px; /* Reduced padding */
        margin-top: 0; /* Remove top margin */
        margin-left: 0; /* Remove left margin */
        gap: 8px; /* Clean gap */
        flex-direction: column; /* Stack vertically on mobile */
        display: flex;
    }

    .search-box {
        flex: 1;
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    .search-box input {
        padding: 12px 16px 12px 40px; /* Good touch target */
        font-size: 16px; /* Prevent zoom on iOS */
        width: 100%; /* Full width */
    }

    /* Clean filter row - filters together, refresh below for mobile */
    .filters {
        display: flex;
        gap: 8px;
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
        margin-bottom: 0;
    }

    .filter-select {
        flex: 1;
        min-width: 100px;
        padding: 10px 8px; /* Better touch target */
        font-size: 13px; /* Readable */
        min-height: 40px; /* Touch friendly */
        max-width: calc(50% - 4px);
    }

    /* Refresh button sits full width under filters on mobile */
    .btn-refresh {
        display: flex !important;
        width: 100%;
        height: 40px;
        padding: 0;
        margin-top: 8px;
        border-radius: 8px;
        justify-content: center;
        align-items: center;
        font-size: 13px;
        flex-shrink: 0;
        order: 10;
    }

    .btn-refresh span {
        display: inline;
    }

    .btn-refresh i {
        margin-right: 6px;
    }

    /* Hide category pills on mobile; use dropdown */
    .categories-section {
        display: none;
    }

    .category-select-wrapper {
        display: block;
        padding: 0 16px;
        margin-top: 8px;
    }

    .categories-section::-webkit-scrollbar {
        display: none;
    }

    .category-card {
        flex-shrink: 0;
        padding: 8px 12px;
        height: 36px;
        font-size: 12px;
        border-radius: 18px;
        gap: 6px;
        white-space: nowrap;
    }

    .category-card.active {
        background-color: var(--primary-blue);
        color: white;
        border-color: var(--primary-blue);
    }

    /* Buttons - increase touch targets */
    .product-actions button {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }

    /* Modal improvements */
    .modal-content {
        width: calc(100% - 48px);
        max-width: none;
        max-height: calc(100dvh - 48px);
        margin: 16px;
    }

    .modal-body {
        padding: 24px 20px;
    }

    /* My Sales and Favorites pages */
    .my-sales-grid,
    .favorites-section {
        padding: 16px 24px;
    }

    .sales-header,
    .favorites-header {
        padding: 32px 24px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .sales-header .orders-header-content,
    .favorites-header .orders-header-content {
        width: 100%;
    }

    .btn-refresh,
    .btn-clear-favorites {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .header-banner {
        padding: 16px 16px; /* Very compact */
        margin: 8px 16px 12px; /* Minimal margins */
        border-radius: 10px; /* Smaller radius */
    }

    .header-banner h1 {
        font-size: 18px; /* Small title */
    }

    .header-banner p {
        font-size: 12px; /* Small subtitle */
    }

    .search-filter-section {
        flex-direction: column;
        margin-left: 0;
        padding: 16px;
        gap: 12px;
    }

    .search-box {
        min-width: auto;
        margin-bottom: 8px; /* Reduced spacing */
    }

    .search-box input {
        padding: 12px 16px 12px 40px;
        font-size: 16px;
        width: 100%;
    }

    /* Filters in ONE row - [Sort ▼] [College ▼] */
    .filters {
        display: flex;
        gap: 6px;
        justify-content: flex-start;
        align-items: stretch;
        margin-bottom: 0;
        flex-wrap: wrap;
    }

    .filter-select {
        flex: 1;
        max-width: calc(50% - 3px);
        padding: 8px 8px;
        font-size: 12px;
        min-height: 36px;
    }

    /* Refresh button below filters - full width for small phones */
    .btn-refresh {
        width: 100%;
        height: 36px;
        padding: 0;
        font-size: 12px;
        min-height: auto;
        margin-top: 8px;
        margin-left: 0;
        flex-shrink: 0;
        order: 10;
    }

    .btn-refresh span {
        display: inline;
    }

    .btn-refresh i {
        margin-right: 4px;
    }

    .categories-section {
        margin-left: 0;
        padding: 8px 16px 12px; /* Reduced padding */
        gap: 6px;
        display: none;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .categories-section::-webkit-scrollbar {
        display: none;
    }

    .category-card {
        height: 32px;
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .products-section {
        margin-left: 0;
        padding: 16px;
    }

    .products-section h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .products-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 12px; /* Consistent gap */
    }

    .product-image {
        height: 160px;
        font-size: 48px;
    }

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

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }

    .product-actions button {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }

    /* Modal on very small screens */
    .modal-content {
        width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        margin: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(env(safe-area-inset-bottom, 0px) + 8px);
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
        border-radius: 16px;
    }

    .modal-body {
        padding: 20px 16px;
    }

    /* Header sections on small screens */
    .sales-header,
    .favorites-header {
        padding: 24px 16px 16px 16px;
        gap: 16px;
    }

    .btn-refresh,
    .btn-clear-favorites {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 40px;
    }
}
/* ======================== Sell Item Page ======================== */
.sell-header {
    background: linear-gradient(135deg, #4a5fc1 0%, #2d3a8f 100%);
    color: white;
    padding: 64px 48px;
    text-align: center;
    margin-bottom: 32px;
}

.sell-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sell-header p {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.9;
}

.sell-form-container {
    max-width: 700px;
    margin: 0 auto 48px;
    padding: 0 48px;
}

.sell-form {
    background: white;
}

.form-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-header i {
    font-size: 24px;
    color: var(--primary-blue);
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary-blue);
    font-size: 16px;
}

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    font-size: 14px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Earnings Breakdown */
.earnings-breakdown {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    margin-bottom: 24px;
}

.earnings-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
}

.earnings-header i {
    color: #16a34a;
}

.earnings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.earnings-row span {
    color: #166534;
}

.earnings-row strong {
    font-weight: 700;
    color: #166534;
}

.earnings-row.fee strong {
    color: #dc2626;
}

.earnings-row.total {
    border-top: 1px solid #86efac;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 15px;
}

.earnings-row.total strong {
    color: #15803d;
    font-size: 16px;
}

/* Condition Display */
.condition-display {
    background: #f0f4ff;
    border: 1px solid #dde7ff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.condition-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.condition-label {
    background: #fbbf24;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.condition-info {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
}

/* Condition Slider */
.condition-slider {
    margin-bottom: 24px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ef4444, #f97316, #eab308, #84cc16, #22c55e, #0ea5e9);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 16px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 95, 193, 0.3);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 95, 193, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dark-gray);
    text-align: center;
}

.slider-labels span {
    flex: 1;
}

.slider-labels small {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Form Help Text */
.form-help {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--dark-gray);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.form-help i {
    color: #0ea5e9;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-help small {
    display: block;
    color: #666;
    margin-top: 4px;
}

/* Image Upload */
.image-upload {
    margin-top: 12px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--primary-blue);
    background: #f0f4ff;
}

.upload-area i {
    font-size: 40px;
    color: var(--primary-blue);
    margin-bottom: 8px;
    display: block;
}

.upload-area p {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.image-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.image-requirements {
    margin-top: 12px;
    padding: 12px;
    background: #fffbeb;
    border-radius: 6px;
    font-size: 12px;
    color: var(--dark-gray);
}

.image-requirements small {
    color: #b45309;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

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

.btn-cancel:hover {
    background: var(--light-gray);
}

.btn-submit {
    background: linear-gradient(135deg, #4a5fc1 0%, #2d3a8f 100%);
    color: white;
    min-width: 200px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Active Navigation */
.nav-item.active {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

/* Responsive - Sell Item Page */
@media (max-width: 768px) {
    .sell-header {
        padding: 40px 24px;
    }

    .sell-header h1 {
        font-size: 32px;
    }

    .sell-form-container {
        padding: 0 24px;
    }

    .form-section {
        padding: 24px;
    }

    .slider-labels {
        font-size: 11px;
    }

    .slider-labels span {
        flex: 0.8;
    }
}

@media (max-width: 480px) {
    .sell-header {
        padding: 32px 16px;
        margin-bottom: 16px;
    }

    .sell-header h1 {
        font-size: 24px;
    }

    .sell-header p {
        font-size: 14px;
    }

    .sell-form-container {
        padding: 0 16px;
        margin-bottom: 24px;
    }

    .form-section {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .section-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }

    .btn-submit {
        min-width: unset;
    }

    .slider-labels {
        display: none;
    }

    .upload-area {
        padding: 30px 16px;
    }

    .upload-area i {
        font-size: 32px;
    }

    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .image-preview img {
        height: 80px;
    }
}

/* ======================== My Sales and Favorites Pages ======================== */
.sales-header,
.favorites-header {
    background: linear-gradient(135deg, #4a5fc1 0%, #2d3a8f 100%);
    color: white;
    padding: 48px 48px 32px 48px;
}

.sales-header .orders-header-content h1,
.favorites-header .orders-header-content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sales-header .orders-header-content h1 i,
.favorites-header .orders-header-content h1 i {
    font-size: 32px;
}

.sales-header .orders-header-content p,
.favorites-header .orders-header-content p {
    font-size: 16px;
    font-weight: 300;
    opacity: 0.9;
}

/* Favorites Header Button Layout */
.favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.favorites-header .orders-header-content {
    flex: 1;
}

/* My Sales Header Enhancements */
.sales-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.sales-stats-row {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

.btn-refresh-subtle {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-refresh-subtle i {
    margin-right: 8px;
}

.btn-refresh-subtle:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(9, 37, 106, 0.16);
}

@media (max-width: 820px) {
    .sales-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-refresh-subtle {
        width: 100%;
        justify-content: center;
        display: inline-flex;
        margin-top: 14px;
    }
}

/* Orders Tabs */
.orders-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--dark-gray);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button i {
    font-size: 18px;
}

.tab-count {
    background: #f0f0f0;
    color: var(--dark-gray);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.tab-button.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.tab-button.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.tab-button:hover:not(.active) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: var(--light-gray);
}

.sort-icon {
    margin-left: auto;
    font-size: 20px;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-icon:hover {
    color: var(--primary-blue);
}

/* Sales Filter Bar */
.sales-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--dark-gray);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover:not(.active) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: var(--light-gray);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Old Sales Filter (for backwards compatibility) */
.sales-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

/* Load More Button */
.load-more-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.btn-load-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
}

.btn-load-more:active {
    transform: translateY(0);
}

/* Sales Section */
.sales-section {
    padding: 24px 48px 48px;
}

/* Orders Container */
.orders-container {
    padding: 32px 48px;
    background: white;
    min-height: calc(100vh - 250px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 48px;
    text-align: center;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    margin-bottom: 24px;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
    color: var(--dark-gray);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border-color);
}

.order-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.order-date {
    font-size: 13px;
    color: var(--dark-gray);
}

.order-status {
    display: flex;
    gap: 8px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.completed {
    background: #dbeafe;
    color: #0369a1;
}

.status-badge.active {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Order Items */
.order-items {
    padding: 20px;
}

.order-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
}

.order-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e5e7eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.item-details p {
    font-size: 13px;
    color: var(--dark-gray);
    margin: 2px 0;
}

.item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 8px;
}

.item-quantity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.item-quantity span {
    font-size: 13px;
    color: var(--dark-gray);
}

/* Order Footer */
.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f9f9f9;
    border-top: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-color);
}

.total-price {
    font-size: 18px;
    color: var(--primary-blue);
}

.order-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary,
.btn-primary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-secondary:hover {
    background: var(--light-gray);
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-blue);
}

/* ======================== Product Detail Modal ======================== */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.product-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #d1d5db;
    color: #1f2937;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px;
}

/* Image Carousel */
.modal-image-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.image-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-image {
    font-size: 120px;
    transition: all 0.3s ease;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--dark-gray);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5;
}

.carousel-btn:hover {
    background: white;
    color: var(--primary-blue);
}

.carousel-btn.prev-btn {
    left: 16px;
}

.carousel-btn.next-btn {
    right: 16px;
}

.badge-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-blue);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Details Section */
.modal-details-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.modal-view-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.modal-header-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-details-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
}

.modal-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
}

.seller-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--light-gray);
    border-radius: 8px;
}

.seller-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-gray);
    font-size: 14px;
}

.seller-item i {
    font-size: 18px;
    color: var(--primary-blue);
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-section label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.modal-section p {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.1);
}

.modal-textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
    background-color: white;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.1);
}

.modal-textarea::placeholder {
    color: #9ca3af;
}

.qr-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
}

.qr-warning i {
    font-size: 20px;
    color: #f59e0b;
    margin-top: 2px;
}

.qr-warning strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

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

.qr-warning a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 600;
}

.qr-warning a:hover {
    color: #78350f;
}

.modal-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    color: #1e40af;
    font-size: 13px;
    font-weight: 600;
}

.feature-badge i {
    font-size: 14px;
    color: var(--primary-blue);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.modal-actions-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-action-edit {
    background: white;
    color: var(--primary-blue);
    border: 1.5px solid var(--primary-blue);
}

.btn-action-edit:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.2);
}

.btn-action-withdraw {
    background: white;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
}

.btn-action-withdraw:hover {
    background: #fee2e2;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-action-sold {
    background: #10b981;
    color: white;
    border: 1.5px solid #10b981;
}

.btn-action-sold:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-order {
    flex: 2;
    padding: 14px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-order:hover:not(:disabled) {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 193, 0.3);
}

.btn-order:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-save {
    flex: 1;
    padding: 12px 16px;
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
    gap: 8px;
}

.btn-save:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--light-gray);
}

.btn-save.favorited {
    background: #fef2f2;
    color: #ef4444;
    border-color: #ef4444;
}

.btn-save.favorited i {
    color: #ef4444;
    fill: #ef4444;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 24px;
    }

    .modal-content {
        width: calc(100% - 48px);
        margin: 16px;
        max-height: calc(100dvh - 48px);
    }

    .modal-details-section h2 {
        font-size: 28px;
    }

    .modal-price {
        font-size: 24px;
    }

    .carousel-image {
        font-size: 80px;
    }

    .modal-actions-footer {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        margin: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(env(safe-area-inset-bottom, 0px) + 8px);
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
        border-radius: 16px;
    }

    .modal-body {
        gap: 24px;
        padding: 20px 16px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }

    .modal-details-section h2 {
        font-size: 22px;
    }

    .modal-price {
        font-size: 20px;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-actions-footer {
        flex-direction: column;
        gap: 10px;
    }

    .btn-action {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* Responsive My Orders Page */
@media (max-width: 768px) {
    .orders-header,
    .sales-header,
    .favorites-header {
        padding: 32px 24px 24px 24px;
    }

    .orders-header-content h1,
    .sales-header .orders-header-content h1,
    .favorites-header .orders-header-content h1 {
        font-size: 28px;
    }

    .favorites-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .favorites-header .orders-header-content {
        width: 100%;
    }

    .btn-refresh,
    .btn-clear-favorites {
        padding: 8px 16px;
        font-size: 13px;
    }

    .orders-tabs {
        padding: 16px 24px;
    }

    .orders-container {
        padding: 24px 24px;
    }

    /* Mobile vertical filter navigation */
    .sales-filter-bar {
        padding: 16px 24px;
        justify-content: flex-start;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .filter-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
    }

    .filter-btn.active {
        background: var(--primary-blue);
        color: white;
        border-color: var(--primary-blue);
        font-weight: 600;
    }

    .order-header {
        flex-direction: column;
        gap: 12px;
    }

    .order-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .order-actions {
        width: 100%;
    }

    .btn-secondary,
    .btn-primary {
        flex: 1;
    }

    .sort-icon {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .orders-header,
    .sales-header,
    .favorites-header {
        padding: 24px 16px 16px 16px;
    }

    .orders-header-content h1,
    .sales-header .orders-header-content h1,
    .favorites-header .orders-header-content h1 {
        font-size: 20px;
    }

    .favorites-header {
        gap: 16px;
    }

    .btn-refresh,
    .btn-clear-favorites {
        padding: 8px 12px;
        font-size: 12px;
    }

    .orders-header-content p {
        font-size: 14px;
    }

    .orders-tabs {
        padding: 12px 16px;
        gap: 8px;
        overflow-x: auto;
    }

    .tab-button {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .tab-button i {
        display: none;
    }

    .orders-container {
        padding: 16px;
    }

    /* Mobile filter navigation on small screens */
    .sales-filter-bar {
        padding: 12px 16px;
    }

    .filter-group {
        gap: 6px;
    }

    .filter-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .empty-state h2 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 14px;
    }

    .order-card {
        border-radius: 8px;
    }

    .order-header {
        padding: 16px;
    }

    .order-items {
        padding: 16px;
    }

    .order-item {
        gap: 12px;
    }

    .item-image {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .item-details h4 {
        font-size: 13px;
    }

    .order-footer {
        padding: 12px 16px;
    }

    .btn-secondary,
    .btn-primary {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ======================== User Guide Page ======================== */
.guide-header {
    background: linear-gradient(135deg, #4a5fc1 0%, #2d3a8f 100%);
    color: white;
    padding: 64px 48px;
    text-align: center;
}

.guide-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
}

.guide-header p {
    font-size: 16px;
    font-weight: 300;
    opacity: 0.9;
    margin: 8px 0;
}

.guide-subtitle {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 16px;
}

.guide-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 48px;
}

.guide-section {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.guide-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.section-title:hover {
    background: var(--light-gray);
}

.section-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(74, 95, 193, 0.1);
}

.section-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    flex: 1;
}

.section-toggle {
    font-size: 16px;
    color: var(--dark-gray);
    transition: transform 0.3s ease;
}

.section-toggle.rotate {
    transform: rotate(90deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    background: white;
    transition: max-height 0.3s ease;
    border-top: 1px solid var(--border-color);
}

.section-content.active {
    max-height: 5000px;
}

.section-content > * {
    padding: 0 20px;
    margin-bottom: 20px;
}

.section-content > *:first-child {
    padding-top: 20px;
}

.section-content > *:last-child {
    margin-bottom: 0;
    padding-bottom: 20px;
}

.section-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px 0;
}

.section-content p {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.section-content ul {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.8;
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.section-content li {
    margin-bottom: 8px;
}

.section-content strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 8px;
    background: white;
}

.step.highlight {
    background: #f0f4ff;
    border-left: 4px solid var(--primary-blue);
}

.step-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-blue);
}

.step.highlight .step-icon {
    background: rgba(74, 95, 193, 0.2);
    color: var(--primary-blue);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.step-content ul {
    font-size: 13px;
    color: var(--dark-gray);
    margin: 8px 0 0 0;
    padding-left: 20px;
    line-height: 1.6;
}

.step-content li {
    margin-bottom: 6px;
}

.info-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin: 16px 0;
}

.info-box i {
    font-size: 24px;
    color: #0ea5e9;
    flex-shrink: 0;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 6px 0;
}

.info-box p {
    font-size: 13px;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.5;
}

/* Responsive - User Guide Page */
@media (max-width: 768px) {
    .guide-header {
        padding: 40px 24px;
    }

    .guide-header h1 {
        font-size: 32px;
    }

    .guide-container {
        padding: 24px 24px;
    }

    .section-title {
        gap: 12px;
        padding: 16px;
    }

    .section-icon {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .section-title h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .guide-header {
        padding: 32px 16px;
    }

    .guide-header h1 {
        font-size: 24px;
    }

    .guide-header p {
        font-size: 14px;
    }

    .guide-container {
        padding: 16px;
    }

    .section-title {
        gap: 8px;
        padding: 12px;
    }

    .section-icon {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 14px;
    }

    .section-content > * {
        padding: 0 12px;
        margin-bottom: 12px;
    }

    .section-content > *:first-child {
        padding-top: 12px;
    }

    .section-content > *:last-child {
        padding-bottom: 12px;
    }

    .step {
        gap: 12px;
        padding: 12px;
        margin-bottom: 12px;
    }

    .step-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .step-content h3 {
        font-size: 13px;
    }

    .step-content p,
    .step-content ul {
        font-size: 12px;
    }

    .info-box {
        gap: 12px;
        padding: 12px;
    }

    .info-box i {
        font-size: 20px;
    }

    .info-box h4 {
        font-size: 12px;
    }

    .info-box p {
        font-size: 11px;
    }
}

/* ======================== Payment Modal ======================== */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.payment-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.payment-modal-content {
    position: relative;
    background: #f5f5f5;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease-out;
}

.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.payment-header {
    background: white;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.payment-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.payment-title i {
    font-size: 20px;
    color: #10b981;
}

.payment-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 20px;
    color: #166534;
    font-weight: 600;
    font-size: 14px;
}

.payment-timer i {
    font-size: 14px;
}

.payment-timer.warning {
    background: #fef3c7;
    border-color: #fde047;
    color: #b45309;
}

.payment-timer.danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.payment-body {
    padding: 24px;
}

.payment-order-summary {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.payment-order-summary h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.payment-delivery {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.payment-delivery span {
    font-weight: 600;
    color: var(--text-color);
}

.payment-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0284c7;
    font-weight: 600;
}

.payment-serial-section {
    background: #fef2f2;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px dashed #dc2626;
}

.serial-label {
    font-size: 14px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 12px;
    text-align: center;
}

.serial-number {
    background: white;
    padding: 16px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #991b1b;
    text-align: center;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    border: 1px dashed #dc2626;
}

.btn-copy-serial {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #dc2626;
    border-radius: 8px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy-serial:hover {
    background: #fee2e2;
}

.payment-qr-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.qr-code-container {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.qr-code-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.qr-code-image {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 0 auto 16px;
    max-width: 280px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.wechat-pay-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.wechat-pay-logo i {
    font-size: 24px;
}

.payment-official-text {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

.btn-save-qr {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 8px;
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-qr:hover {
    background: #d1fae5;
}

.payment-steps {
    background: #ecfdf5;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}

.steps-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.payment-steps ol {
    margin: 0;
    padding-left: 20px;
}

.payment-steps li {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.5;
}

.payment-steps li:last-child {
    margin-bottom: 0;
}

.payment-after-info {
    background: #eff6ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
}

.after-payment-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
}

.payment-after-info ul {
    margin: 0;
    padding-left: 20px;
}

.payment-after-info li {
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 6px;
    line-height: 1.5;
}

.payment-after-info li:last-child {
    margin-bottom: 0;
}

.payment-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-cancel-order {
    flex: 1;
    padding: 14px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-order:hover {
    background: #f9fafb;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-payment-made {
    flex: 1;
    padding: 14px 20px;
    background: #10b981;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-payment-made:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive Payment Modal */
@media (max-width: 768px) {
    .payment-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .payment-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .payment-body {
        padding: 16px;
    }

    .serial-number {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .payment-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .payment-modal-content {
        width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        margin: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(env(safe-area-inset-bottom, 0px) + 8px);
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
        border-radius: 12px;
    }

    .payment-header {
        padding: 12px;
        border-radius: 12px 12px 0 0;
    }

    .payment-title {
        font-size: 16px;
    }

    .payment-body {
        padding: 12px;
    }

    .payment-order-summary,
    .payment-serial-section,
    .payment-qr-section,
    .payment-steps,
    .payment-after-info {
        padding: 14px;
        margin-bottom: 12px;
    }

    .serial-number {
        font-size: 14px;
        letter-spacing: 0.5px;
        padding: 12px;
        word-break: break-all;
    }

    .qr-code-container {
        padding: 14px;
    }

    .qr-code-image {
        min-height: 200px;
        max-width: 100%;
        padding: 12px;
    }

    .btn-cancel-order,
    .btn-payment-made {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ======================== Mobile Bottom Navigation ======================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 999;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    height: 100%;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.bottom-nav-item:hover {
    color: var(--primary-blue);
    background: var(--light-gray);
}

.bottom-nav-item.active {
    color: var(--primary-blue);
    font-weight: 600;
}

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

/* Show bottom nav on mobile and tablet */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .main-content {
        padding-bottom: 80px;
    }

    .scroll-to-top {
        bottom: 90px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .bottom-nav {
        display: flex;
        height: 65px;
    }

    .bottom-nav-item {
        font-size: 10px;
        gap: 2px;
        padding: 6px 8px;
    }

    .bottom-nav-item i {
        font-size: 18px;
    }

    .bottom-nav-item.active i {
        font-size: 20px;
    }

    .main-content {
        padding-bottom: 75px;
    }

    .scroll-to-top {
        bottom: 85px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
